All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.main-9566fd75cb1628f3d0fa.js Maven / Gradle / Ivy

Go to download

Light web application allowing to provide a light HTTP server to test components locally.

There is a newer version: 10.57.0
Show newest version
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "/";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 1680);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(process) {

if (process.env.NODE_ENV === 'production') {
  module.exports = __webpack_require__(1885);
} else {
  module.exports = __webpack_require__(1886);
}

/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))

/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  Copyright (c) 2016 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
/* global define */

(function () {
	'use strict';

	var hasOwn = {}.hasOwnProperty;

	function classNames () {
		var classes = [];

		for (var i = 0; i < arguments.length; i++) {
			var arg = arguments[i];
			if (!arg) continue;

			var argType = typeof arg;

			if (argType === 'string' || argType === 'number') {
				classes.push(arg);
			} else if (Array.isArray(arg)) {
				classes.push(classNames.apply(null, arg));
			} else if (argType === 'object') {
				for (var key in arg) {
					if (hasOwn.call(arg, key) && arg[key]) {
						classes.push(key);
					}
				}
			}
		}

		return classes.join(' ');
	}

	if (typeof module !== 'undefined' && module.exports) {
		module.exports = classNames;
	} else if (true) {
		// register as 'classnames', consistent with npm package name
		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {
			return classNames;
		}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
	} else {
		window.classNames = classNames;
	}
}());


/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(process) {/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

if (process.env.NODE_ENV !== 'production') {
  var ReactIs = __webpack_require__(47);

  // By explicitly using `prop-types` you are opting into new development behavior.
  // http://fb.me/prop-types-in-prod
  var throwOnDirectAccess = true;
  module.exports = __webpack_require__(2191)(ReactIs.isElement, throwOnDirectAccess);
} else {
  // By explicitly using `prop-types` you are opting into new production behavior.
  // http://fb.me/prop-types-in-prod
  module.exports = __webpack_require__(2193)();
}

/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))

/***/ }),
/* 3 */
/***/ (function(module, exports) {

// shim for using process in browser
var process = module.exports = {};

// cached from whatever global is present so that test runners that stub it
// don't break things.  But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals.  It's inside a
// function because try/catches deoptimize in certain engines.

var cachedSetTimeout;
var cachedClearTimeout;

function defaultSetTimout() {
    throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
    throw new Error('clearTimeout has not been defined');
}
(function () {
    try {
        if (typeof setTimeout === 'function') {
            cachedSetTimeout = setTimeout;
        } else {
            cachedSetTimeout = defaultSetTimout;
        }
    } catch (e) {
        cachedSetTimeout = defaultSetTimout;
    }
    try {
        if (typeof clearTimeout === 'function') {
            cachedClearTimeout = clearTimeout;
        } else {
            cachedClearTimeout = defaultClearTimeout;
        }
    } catch (e) {
        cachedClearTimeout = defaultClearTimeout;
    }
} ())
function runTimeout(fun) {
    if (cachedSetTimeout === setTimeout) {
        //normal enviroments in sane situations
        return setTimeout(fun, 0);
    }
    // if setTimeout wasn't available but was latter defined
    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
        cachedSetTimeout = setTimeout;
        return setTimeout(fun, 0);
    }
    try {
        // when when somebody has screwed with setTimeout but no I.E. maddness
        return cachedSetTimeout(fun, 0);
    } catch(e){
        try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
            return cachedSetTimeout.call(null, fun, 0);
        } catch(e){
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
            return cachedSetTimeout.call(this, fun, 0);
        }
    }


}
function runClearTimeout(marker) {
    if (cachedClearTimeout === clearTimeout) {
        //normal enviroments in sane situations
        return clearTimeout(marker);
    }
    // if clearTimeout wasn't available but was latter defined
    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
        cachedClearTimeout = clearTimeout;
        return clearTimeout(marker);
    }
    try {
        // when when somebody has screwed with setTimeout but no I.E. maddness
        return cachedClearTimeout(marker);
    } catch (e){
        try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
            return cachedClearTimeout.call(null, marker);
        } catch (e){
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
            return cachedClearTimeout.call(this, marker);
        }
    }



}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;

function cleanUpNextTick() {
    if (!draining || !currentQueue) {
        return;
    }
    draining = false;
    if (currentQueue.length) {
        queue = currentQueue.concat(queue);
    } else {
        queueIndex = -1;
    }
    if (queue.length) {
        drainQueue();
    }
}

function drainQueue() {
    if (draining) {
        return;
    }
    var timeout = runTimeout(cleanUpNextTick);
    draining = true;

    var len = queue.length;
    while(len) {
        currentQueue = queue;
        queue = [];
        while (++queueIndex < len) {
            if (currentQueue) {
                currentQueue[queueIndex].run();
            }
        }
        queueIndex = -1;
        len = queue.length;
    }
    currentQueue = null;
    draining = false;
    runClearTimeout(timeout);
}

process.nextTick = function (fun) {
    var args = new Array(arguments.length - 1);
    if (arguments.length > 1) {
        for (var i = 1; i < arguments.length; i++) {
            args[i - 1] = arguments[i];
        }
    }
    queue.push(new Item(fun, args));
    if (queue.length === 1 && !draining) {
        runTimeout(drainQueue);
    }
};

// v8 likes predictible objects
function Item(fun, array) {
    this.fun = fun;
    this.array = array;
}
Item.prototype.run = function () {
    this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};

function noop() {}

process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;

process.listeners = function (name) { return [] }

process.binding = function (name) {
    throw new Error('process.binding is not supported');
};

process.cwd = function () { return '/' };
process.chdir = function (dir) {
    throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };


/***/ }),
/* 4 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = _inheritsLoose;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_js_object_create__ = __webpack_require__(1068);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_js_object_create___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__core_js_object_create__);

function _inheritsLoose(subClass, superClass) {
  subClass.prototype = __WEBPACK_IMPORTED_MODULE_0__core_js_object_create___default()(superClass.prototype);
  subClass.prototype.constructor = subClass;
  subClass.__proto__ = superClass;
}

/***/ }),
/* 5 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = _extends;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_js_object_assign__ = __webpack_require__(440);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_js_object_assign___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__core_js_object_assign__);

function _extends() {
  _extends = __WEBPACK_IMPORTED_MODULE_0__core_js_object_assign___default.a || 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;
  };

  return _extends.apply(this, arguments);
}

/***/ }),
/* 6 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = _objectWithoutPropertiesLoose;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_js_object_keys__ = __webpack_require__(1070);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core_js_object_keys___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__core_js_object_keys__);

function _objectWithoutPropertiesLoose(source, excluded) {
  if (source == null) return {};
  var target = {};

  var sourceKeys = __WEBPACK_IMPORTED_MODULE_0__core_js_object_keys___default()(source);

  var key, i;

  for (i = 0; i < sourceKeys.length; i++) {
    key = sourceKeys[i];
    if (excluded.indexOf(key) >= 0) continue;
    target[key] = source[key];
  }

  return target;
}

/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(process) {/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

if (process.env.NODE_ENV !== 'production') {
  var ReactIs = __webpack_require__(47);

  // By explicitly using `prop-types` you are opting into new development behavior.
  // http://fb.me/prop-types-in-prod
  var throwOnDirectAccess = true;
  module.exports = __webpack_require__(3862)(ReactIs.isElement, throwOnDirectAccess);
} else {
  // By explicitly using `prop-types` you are opting into new production behavior.
  // http://fb.me/prop-types-in-prod
  module.exports = __webpack_require__(3864)();
}

/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))

/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(28);
var core = __webpack_require__(117);
var hide = __webpack_require__(97);
var redefine = __webpack_require__(98);
var ctx = __webpack_require__(118);
var PROTOTYPE = 'prototype';

var $export = function (type, name, source) {
  var IS_FORCED = type & $export.F;
  var IS_GLOBAL = type & $export.G;
  var IS_STATIC = type & $export.S;
  var IS_PROTO = type & $export.P;
  var IS_BIND = type & $export.B;
  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  var key, own, out, exp;
  if (IS_GLOBAL) source = name;
  for (key in source) {
    // contains in native
    own = !IS_FORCED && target && target[key] !== undefined;
    // export native or passed
    out = (own ? target : source)[key];
    // bind timers to global for call from export context
    exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
    // extend global
    if (target) redefine(target, key, out, type & $export.U);
    // export
    if (exports[key] != out) hide(exports, key, exp);
    if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  }
};
global.core = core;
// type bitmap
$export.F = 1;   // forced
$export.G = 2;   // global
$export.S = 4;   // static
$export.P = 8;   // proto
$export.B = 16;  // bind
$export.W = 32;  // wrap
$export.U = 64;  // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;


/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {

var isDate = __webpack_require__(740)

var MILLISECONDS_IN_HOUR = 3600000
var MILLISECONDS_IN_MINUTE = 60000
var DEFAULT_ADDITIONAL_DIGITS = 2

var parseTokenDateTimeDelimeter = /[T ]/
var parseTokenPlainTime = /:/

// year tokens
var parseTokenYY = /^(\d{2})$/
var parseTokensYYY = [
  /^([+-]\d{2})$/, // 0 additional digits
  /^([+-]\d{3})$/, // 1 additional digit
  /^([+-]\d{4})$/ // 2 additional digits
]

var parseTokenYYYY = /^(\d{4})/
var parseTokensYYYYY = [
  /^([+-]\d{4})/, // 0 additional digits
  /^([+-]\d{5})/, // 1 additional digit
  /^([+-]\d{6})/ // 2 additional digits
]

// date tokens
var parseTokenMM = /^-(\d{2})$/
var parseTokenDDD = /^-?(\d{3})$/
var parseTokenMMDD = /^-?(\d{2})-?(\d{2})$/
var parseTokenWww = /^-?W(\d{2})$/
var parseTokenWwwD = /^-?W(\d{2})-?(\d{1})$/

// time tokens
var parseTokenHH = /^(\d{2}([.,]\d*)?)$/
var parseTokenHHMM = /^(\d{2}):?(\d{2}([.,]\d*)?)$/
var parseTokenHHMMSS = /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/

// timezone tokens
var parseTokenTimezone = /([Z+-].*)$/
var parseTokenTimezoneZ = /^(Z)$/
var parseTokenTimezoneHH = /^([+-])(\d{2})$/
var parseTokenTimezoneHHMM = /^([+-])(\d{2}):?(\d{2})$/

/**
 * @category Common Helpers
 * @summary Convert the given argument to an instance of Date.
 *
 * @description
 * Convert the given argument to an instance of Date.
 *
 * If the argument is an instance of Date, the function returns its clone.
 *
 * If the argument is a number, it is treated as a timestamp.
 *
 * If an argument is a string, the function tries to parse it.
 * Function accepts complete ISO 8601 formats as well as partial implementations.
 * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601
 *
 * If all above fails, the function passes the given argument to Date constructor.
 *
 * @param {Date|String|Number} argument - the value to convert
 * @param {Object} [options] - the object with options
 * @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format
 * @returns {Date} the parsed date in the local time zone
 *
 * @example
 * // Convert string '2014-02-11T11:30:30' to date:
 * var result = parse('2014-02-11T11:30:30')
 * //=> Tue Feb 11 2014 11:30:30
 *
 * @example
 * // Parse string '+02014101',
 * // if the additional number of digits in the extended year format is 1:
 * var result = parse('+02014101', {additionalDigits: 1})
 * //=> Fri Apr 11 2014 00:00:00
 */
function parse (argument, options) {
  if (isDate(argument)) {
    // Prevent the date to lose the milliseconds when passed to new Date() in IE10
    return new Date(argument.getTime())
  } else if (typeof argument !== 'string') {
    return new Date(argument)
  }

  options = options || {}
  var additionalDigits = options.additionalDigits
  if (additionalDigits == null) {
    additionalDigits = DEFAULT_ADDITIONAL_DIGITS
  }

  var dateStrings = splitDateString(argument)

  var parseYearResult = parseYear(dateStrings.date, additionalDigits)
  var year = parseYearResult.year
  var restDateString = parseYearResult.restDateString

  var date = parseDate(restDateString, year)

  if (date) {
    var timestamp = date.getTime()
    var time = 0
    var offset

    if (dateStrings.time) {
      time = parseTime(dateStrings.time)
    }

    if (dateStrings.timezone) {
      offset = parseTimezone(dateStrings.timezone)
    } else {
      // get offset accurate to hour in timezones that change offset
      offset = new Date(timestamp + time).getTimezoneOffset()
      offset = new Date(timestamp + time + offset * MILLISECONDS_IN_MINUTE).getTimezoneOffset()
    }

    return new Date(timestamp + time + offset * MILLISECONDS_IN_MINUTE)
  } else {
    return new Date(argument)
  }
}

function splitDateString (dateString) {
  var dateStrings = {}
  var array = dateString.split(parseTokenDateTimeDelimeter)
  var timeString

  if (parseTokenPlainTime.test(array[0])) {
    dateStrings.date = null
    timeString = array[0]
  } else {
    dateStrings.date = array[0]
    timeString = array[1]
  }

  if (timeString) {
    var token = parseTokenTimezone.exec(timeString)
    if (token) {
      dateStrings.time = timeString.replace(token[1], '')
      dateStrings.timezone = token[1]
    } else {
      dateStrings.time = timeString
    }
  }

  return dateStrings
}

function parseYear (dateString, additionalDigits) {
  var parseTokenYYY = parseTokensYYY[additionalDigits]
  var parseTokenYYYYY = parseTokensYYYYY[additionalDigits]

  var token

  // YYYY or ±YYYYY
  token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString)
  if (token) {
    var yearString = token[1]
    return {
      year: parseInt(yearString, 10),
      restDateString: dateString.slice(yearString.length)
    }
  }

  // YY or ±YYY
  token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString)
  if (token) {
    var centuryString = token[1]
    return {
      year: parseInt(centuryString, 10) * 100,
      restDateString: dateString.slice(centuryString.length)
    }
  }

  // Invalid ISO-formatted year
  return {
    year: null
  }
}

function parseDate (dateString, year) {
  // Invalid ISO-formatted year
  if (year === null) {
    return null
  }

  var token
  var date
  var month
  var week

  // YYYY
  if (dateString.length === 0) {
    date = new Date(0)
    date.setUTCFullYear(year)
    return date
  }

  // YYYY-MM
  token = parseTokenMM.exec(dateString)
  if (token) {
    date = new Date(0)
    month = parseInt(token[1], 10) - 1
    date.setUTCFullYear(year, month)
    return date
  }

  // YYYY-DDD or YYYYDDD
  token = parseTokenDDD.exec(dateString)
  if (token) {
    date = new Date(0)
    var dayOfYear = parseInt(token[1], 10)
    date.setUTCFullYear(year, 0, dayOfYear)
    return date
  }

  // YYYY-MM-DD or YYYYMMDD
  token = parseTokenMMDD.exec(dateString)
  if (token) {
    date = new Date(0)
    month = parseInt(token[1], 10) - 1
    var day = parseInt(token[2], 10)
    date.setUTCFullYear(year, month, day)
    return date
  }

  // YYYY-Www or YYYYWww
  token = parseTokenWww.exec(dateString)
  if (token) {
    week = parseInt(token[1], 10) - 1
    return dayOfISOYear(year, week)
  }

  // YYYY-Www-D or YYYYWwwD
  token = parseTokenWwwD.exec(dateString)
  if (token) {
    week = parseInt(token[1], 10) - 1
    var dayOfWeek = parseInt(token[2], 10) - 1
    return dayOfISOYear(year, week, dayOfWeek)
  }

  // Invalid ISO-formatted date
  return null
}

function parseTime (timeString) {
  var token
  var hours
  var minutes

  // hh
  token = parseTokenHH.exec(timeString)
  if (token) {
    hours = parseFloat(token[1].replace(',', '.'))
    return (hours % 24) * MILLISECONDS_IN_HOUR
  }

  // hh:mm or hhmm
  token = parseTokenHHMM.exec(timeString)
  if (token) {
    hours = parseInt(token[1], 10)
    minutes = parseFloat(token[2].replace(',', '.'))
    return (hours % 24) * MILLISECONDS_IN_HOUR +
      minutes * MILLISECONDS_IN_MINUTE
  }

  // hh:mm:ss or hhmmss
  token = parseTokenHHMMSS.exec(timeString)
  if (token) {
    hours = parseInt(token[1], 10)
    minutes = parseInt(token[2], 10)
    var seconds = parseFloat(token[3].replace(',', '.'))
    return (hours % 24) * MILLISECONDS_IN_HOUR +
      minutes * MILLISECONDS_IN_MINUTE +
      seconds * 1000
  }

  // Invalid ISO-formatted time
  return null
}

function parseTimezone (timezoneString) {
  var token
  var absoluteOffset

  // Z
  token = parseTokenTimezoneZ.exec(timezoneString)
  if (token) {
    return 0
  }

  // ±hh
  token = parseTokenTimezoneHH.exec(timezoneString)
  if (token) {
    absoluteOffset = parseInt(token[2], 10) * 60
    return (token[1] === '+') ? -absoluteOffset : absoluteOffset
  }

  // ±hh:mm or ±hhmm
  token = parseTokenTimezoneHHMM.exec(timezoneString)
  if (token) {
    absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10)
    return (token[1] === '+') ? -absoluteOffset : absoluteOffset
  }

  return 0
}

function dayOfISOYear (isoYear, week, day) {
  week = week || 0
  day = day || 0
  var date = new Date(0)
  date.setUTCFullYear(isoYear, 0, 4)
  var fourthOfJanuaryDay = date.getUTCDay() || 7
  var diff = week * 7 + day + 1 - fourthOfJanuaryDay
  date.setUTCDate(date.getUTCDate() + diff)
  return date
}

module.exports = parse


/***/ }),
/* 10 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Trans__ = __webpack_require__(2164);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Trans", function() { return __WEBPACK_IMPORTED_MODULE_0__Trans__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__useTranslation__ = __webpack_require__(637);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useTranslation", function() { return __WEBPACK_IMPORTED_MODULE_1__useTranslation__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__withTranslation__ = __webpack_require__(2170);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withTranslation", function() { return __WEBPACK_IMPORTED_MODULE_2__withTranslation__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Translation__ = __webpack_require__(2171);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Translation", function() { return __WEBPACK_IMPORTED_MODULE_3__Translation__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__I18nextProvider__ = __webpack_require__(2172);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "I18nextProvider", function() { return __WEBPACK_IMPORTED_MODULE_4__I18nextProvider__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__withSSR__ = __webpack_require__(2173);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withSSR", function() { return __WEBPACK_IMPORTED_MODULE_5__withSSR__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__useSSR__ = __webpack_require__(1061);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useSSR", function() { return __WEBPACK_IMPORTED_MODULE_6__useSSR__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__context__ = __webpack_require__(274);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "I18nContext", function() { return __WEBPACK_IMPORTED_MODULE_7__context__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "initReactI18next", function() { return __WEBPACK_IMPORTED_MODULE_7__context__["h"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "setDefaults", function() { return __WEBPACK_IMPORTED_MODULE_7__context__["i"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaults", function() { return __WEBPACK_IMPORTED_MODULE_7__context__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "setI18n", function() { return __WEBPACK_IMPORTED_MODULE_7__context__["j"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getI18n", function() { return __WEBPACK_IMPORTED_MODULE_7__context__["f"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "composeInitialProps", function() { return __WEBPACK_IMPORTED_MODULE_7__context__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getInitialProps", function() { return __WEBPACK_IMPORTED_MODULE_7__context__["g"]; });









/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(process) {/**
 * Copyright 2013-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */

if (process.env.NODE_ENV !== 'production') {
  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
    Symbol.for &&
    Symbol.for('react.element')) ||
    0xeac7;

  var isValidElement = function(object) {
    return typeof object === 'object' &&
      object !== null &&
      object.$$typeof === REACT_ELEMENT_TYPE;
  };

  // By explicitly using `prop-types` you are opting into new development behavior.
  // http://fb.me/prop-types-in-prod
  var throwOnDirectAccess = true;
  module.exports = __webpack_require__(2032)(isValidElement, throwOnDirectAccess);
} else {
  // By explicitly using `prop-types` you are opting into new production behavior.
  // http://fb.me/prop-types-in-prod
  module.exports = __webpack_require__(2034)();
}

/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))

/***/ }),
/* 12 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["prefix"] = prefix;
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bsClass", function() { return bsClass; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bsStyles", function() { return bsStyles; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bsSizes", function() { return bsSizes; });
/* harmony export (immutable) */ __webpack_exports__["getClassSet"] = getClassSet;
/* harmony export (immutable) */ __webpack_exports__["splitBsProps"] = splitBsProps;
/* harmony export (immutable) */ __webpack_exports__["splitBsPropsAndOmit"] = splitBsPropsAndOmit;
/* harmony export (immutable) */ __webpack_exports__["addStyle"] = addStyle;
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_curry", function() { return _curry; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries__ = __webpack_require__(226);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(648);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(2);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__StyleConfig__ = __webpack_require__(76);


// TODO: The publicly exposed parts of this should be in lib/BootstrapUtils.




function curry(fn) {
  return function () {
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    var last = args[args.length - 1];

    if (typeof last === 'function') {
      return fn.apply(void 0, args);
    }

    return function (Component) {
      return fn.apply(void 0, args.concat([Component]));
    };
  };
}

function prefix(props, variant) {
  var bsClass = (props.bsClass || '').trim();
  !(bsClass != null) ? process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false, 'A `bsClass` prop is required for this component') : __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false) : void 0;
  return bsClass + (variant ? "-" + variant : '');
}
var bsClass = curry(function (defaultClass, Component) {
  var propTypes = Component.propTypes || (Component.propTypes = {});
  var defaultProps = Component.defaultProps || (Component.defaultProps = {});
  propTypes.bsClass = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string;
  defaultProps.bsClass = defaultClass;
  return Component;
});
var bsStyles = curry(function (styles, defaultStyle, Component) {
  if (typeof defaultStyle !== 'string') {
    Component = defaultStyle;
    defaultStyle = undefined;
  }

  var existing = Component.STYLES || [];
  var propTypes = Component.propTypes || {};
  styles.forEach(function (style) {
    if (existing.indexOf(style) === -1) {
      existing.push(style);
    }
  });
  var propType = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(existing); // expose the values on the propType function for documentation

  Component.STYLES = existing;
  propType._values = existing;
  Component.propTypes = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, propTypes, {
    bsStyle: propType
  });

  if (defaultStyle !== undefined) {
    var defaultProps = Component.defaultProps || (Component.defaultProps = {});
    defaultProps.bsStyle = defaultStyle;
  }

  return Component;
});
var bsSizes = curry(function (sizes, defaultSize, Component) {
  if (typeof defaultSize !== 'string') {
    Component = defaultSize;
    defaultSize = undefined;
  }

  var existing = Component.SIZES || [];
  var propTypes = Component.propTypes || {};
  sizes.forEach(function (size) {
    if (existing.indexOf(size) === -1) {
      existing.push(size);
    }
  });
  var values = [];
  existing.forEach(function (size) {
    var mappedSize = __WEBPACK_IMPORTED_MODULE_4__StyleConfig__["b" /* SIZE_MAP */][size];

    if (mappedSize && mappedSize !== size) {
      values.push(mappedSize);
    }

    values.push(size);
  });
  var propType = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(values);
  propType._values = values; // expose the values on the propType function for documentation

  Component.SIZES = existing;
  Component.propTypes = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, propTypes, {
    bsSize: propType
  });

  if (defaultSize !== undefined) {
    if (!Component.defaultProps) {
      Component.defaultProps = {};
    }

    Component.defaultProps.bsSize = defaultSize;
  }

  return Component;
});
function getClassSet(props) {
  var _classes;

  var classes = (_classes = {}, _classes[prefix(props)] = true, _classes);

  if (props.bsSize) {
    var bsSize = __WEBPACK_IMPORTED_MODULE_4__StyleConfig__["b" /* SIZE_MAP */][props.bsSize] || props.bsSize;
    classes[prefix(props, bsSize)] = true;
  }

  if (props.bsStyle) {
    classes[prefix(props, props.bsStyle)] = true;
  }

  return classes;
}

function getBsProps(props) {
  return {
    bsClass: props.bsClass,
    bsSize: props.bsSize,
    bsStyle: props.bsStyle,
    bsRole: props.bsRole
  };
}

function isBsProp(propName) {
  return propName === 'bsClass' || propName === 'bsSize' || propName === 'bsStyle' || propName === 'bsRole';
}

function splitBsProps(props) {
  var elementProps = {};

  __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries___default()(props).forEach(function (_ref) {
    var propName = _ref[0],
        propValue = _ref[1];

    if (!isBsProp(propName)) {
      elementProps[propName] = propValue;
    }
  });

  return [getBsProps(props), elementProps];
}
function splitBsPropsAndOmit(props, omittedPropNames) {
  var isOmittedProp = {};
  omittedPropNames.forEach(function (propName) {
    isOmittedProp[propName] = true;
  });
  var elementProps = {};

  __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries___default()(props).forEach(function (_ref2) {
    var propName = _ref2[0],
        propValue = _ref2[1];

    if (!isBsProp(propName) && !isOmittedProp[propName]) {
      elementProps[propName] = propValue;
    }
  });

  return [getBsProps(props), elementProps];
}
/**
 * Add a style variant to a Component. Mutates the propTypes of the component
 * in order to validate the new variant.
 */

function addStyle(Component) {
  for (var _len2 = arguments.length, styleVariant = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
    styleVariant[_key2 - 1] = arguments[_key2];
  }

  bsStyles(styleVariant, Component);
}
var _curry = curry;
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3)))

/***/ }),
/* 13 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["prefix"] = prefix;
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bsClass", function() { return bsClass; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bsStyles", function() { return bsStyles; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bsSizes", function() { return bsSizes; });
/* harmony export (immutable) */ __webpack_exports__["getClassSet"] = getClassSet;
/* harmony export (immutable) */ __webpack_exports__["splitBsProps"] = splitBsProps;
/* harmony export (immutable) */ __webpack_exports__["splitBsPropsAndOmit"] = splitBsPropsAndOmit;
/* harmony export (immutable) */ __webpack_exports__["addStyle"] = addStyle;
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_curry", function() { return _curry; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries__ = __webpack_require__(226);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(874);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__StyleConfig__ = __webpack_require__(79);


// TODO: The publicly exposed parts of this should be in lib/BootstrapUtils.




function curry(fn) {
  return function () {
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    var last = args[args.length - 1];

    if (typeof last === 'function') {
      return fn.apply(void 0, args);
    }

    return function (Component) {
      return fn.apply(void 0, args.concat([Component]));
    };
  };
}

function prefix(props, variant) {
  var bsClass = (props.bsClass || '').trim();
  !(bsClass != null) ? process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false, 'A `bsClass` prop is required for this component') : __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false) : void 0;
  return bsClass + (variant ? "-" + variant : '');
}
var bsClass = curry(function (defaultClass, Component) {
  var propTypes = Component.propTypes || (Component.propTypes = {});
  var defaultProps = Component.defaultProps || (Component.defaultProps = {});
  propTypes.bsClass = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string;
  defaultProps.bsClass = defaultClass;
  return Component;
});
var bsStyles = curry(function (styles, defaultStyle, Component) {
  if (typeof defaultStyle !== 'string') {
    Component = defaultStyle;
    defaultStyle = undefined;
  }

  var existing = Component.STYLES || [];
  var propTypes = Component.propTypes || {};
  styles.forEach(function (style) {
    if (existing.indexOf(style) === -1) {
      existing.push(style);
    }
  });
  var propType = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(existing); // expose the values on the propType function for documentation

  Component.STYLES = existing;
  propType._values = existing;
  Component.propTypes = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, propTypes, {
    bsStyle: propType
  });

  if (defaultStyle !== undefined) {
    var defaultProps = Component.defaultProps || (Component.defaultProps = {});
    defaultProps.bsStyle = defaultStyle;
  }

  return Component;
});
var bsSizes = curry(function (sizes, defaultSize, Component) {
  if (typeof defaultSize !== 'string') {
    Component = defaultSize;
    defaultSize = undefined;
  }

  var existing = Component.SIZES || [];
  var propTypes = Component.propTypes || {};
  sizes.forEach(function (size) {
    if (existing.indexOf(size) === -1) {
      existing.push(size);
    }
  });
  var values = [];
  existing.forEach(function (size) {
    var mappedSize = __WEBPACK_IMPORTED_MODULE_4__StyleConfig__["b" /* SIZE_MAP */][size];

    if (mappedSize && mappedSize !== size) {
      values.push(mappedSize);
    }

    values.push(size);
  });
  var propType = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(values);
  propType._values = values; // expose the values on the propType function for documentation

  Component.SIZES = existing;
  Component.propTypes = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, propTypes, {
    bsSize: propType
  });

  if (defaultSize !== undefined) {
    if (!Component.defaultProps) {
      Component.defaultProps = {};
    }

    Component.defaultProps.bsSize = defaultSize;
  }

  return Component;
});
function getClassSet(props) {
  var _classes;

  var classes = (_classes = {}, _classes[prefix(props)] = true, _classes);

  if (props.bsSize) {
    var bsSize = __WEBPACK_IMPORTED_MODULE_4__StyleConfig__["b" /* SIZE_MAP */][props.bsSize] || props.bsSize;
    classes[prefix(props, bsSize)] = true;
  }

  if (props.bsStyle) {
    classes[prefix(props, props.bsStyle)] = true;
  }

  return classes;
}

function getBsProps(props) {
  return {
    bsClass: props.bsClass,
    bsSize: props.bsSize,
    bsStyle: props.bsStyle,
    bsRole: props.bsRole
  };
}

function isBsProp(propName) {
  return propName === 'bsClass' || propName === 'bsSize' || propName === 'bsStyle' || propName === 'bsRole';
}

function splitBsProps(props) {
  var elementProps = {};

  __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries___default()(props).forEach(function (_ref) {
    var propName = _ref[0],
        propValue = _ref[1];

    if (!isBsProp(propName)) {
      elementProps[propName] = propValue;
    }
  });

  return [getBsProps(props), elementProps];
}
function splitBsPropsAndOmit(props, omittedPropNames) {
  var isOmittedProp = {};
  omittedPropNames.forEach(function (propName) {
    isOmittedProp[propName] = true;
  });
  var elementProps = {};

  __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries___default()(props).forEach(function (_ref2) {
    var propName = _ref2[0],
        propValue = _ref2[1];

    if (!isBsProp(propName) && !isOmittedProp[propName]) {
      elementProps[propName] = propValue;
    }
  });

  return [getBsProps(props), elementProps];
}
/**
 * Add a style variant to a Component. Mutates the propTypes of the component
 * in order to validate the new variant.
 */

function addStyle(Component) {
  for (var _len2 = arguments.length, styleVariant = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
    styleVariant[_key2 - 1] = arguments[_key2];
  }

  bsStyles(styleVariant, Component);
}
var _curry = curry;
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3)))

/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = exports.CIRCULAR_PROGRESS_SIZE = void 0;
var I18N_DOMAIN_COMPONENTS = 'tui-components';
var CIRCULAR_PROGRESS_SIZE = {
  small: 'small',
  "default": 'default',
  large: 'large'
};
exports.CIRCULAR_PROGRESS_SIZE = CIRCULAR_PROGRESS_SIZE;
var _default = I18N_DOMAIN_COMPONENTS;
exports["default"] = _default;
//# sourceMappingURL=constants.js.map

/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(global) {

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getI18nInstance = getI18nInstance;
exports["default"] = getDefaultT;
exports.getCurrentLanguage = getCurrentLanguage;

var _i18next = _interopRequireWildcard(__webpack_require__(341));

var _reactI18next = __webpack_require__(10);

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

if (!(0, _reactI18next.getI18n)()) {
  // eslint-disable-next-line no-console
  console.warn('@talend/react-components used without i18n host.'); // https://github.com/i18next/i18next/issues/936#issuecomment-307550677

  (0, _reactI18next.setI18n)((0, _i18next.createInstance)({}, function () {}));
}

function getI18nInstance() {
  if (!(0, _reactI18next.getI18n)()) {
    return (0, _i18next.createInstance)({}, function () {});
  }

  return _i18next["default"];
}

function getDefaultT() {
  var i18n = (0, _reactI18next.getI18n)();

  if (i18n) {
    return i18n.t.bind((0, _reactI18next.getI18n)());
  }

  return global.I18NEXT_T;
}

function getCurrentLanguage() {
  if (_i18next["default"].language) {
    return _i18next["default"].language;
  }

  return 'en';
}
//# sourceMappingURL=translate.js.map
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27)))

/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _react = __webpack_require__(0);

var _react2 = _interopRequireDefault(_react);

var _reactIs = __webpack_require__(47);

var _createChainableTypeChecker = __webpack_require__(347);

var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function elementType(props, propName, componentName, location, propFullName) {
  var propValue = props[propName];

  if (_react2.default.isValidElement(propValue)) {
    return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`,expected an element type (a string ') + ', component class, or function component).');
  }

  if (!(0, _reactIs.isValidElementType)(propValue)) {
    return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + ', component class, or function component).');
  }

  return null;
}

exports.default = (0, _createChainableTypeChecker2.default)(elementType);
module.exports = exports['default'];

/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(process) {/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

if (process.env.NODE_ENV !== 'production') {
  var ReactIs = __webpack_require__(47);

  // By explicitly using `prop-types` you are opting into new development behavior.
  // http://fb.me/prop-types-in-prod
  var throwOnDirectAccess = true;
  module.exports = __webpack_require__(3487)(ReactIs.isElement, throwOnDirectAccess);
} else {
  // By explicitly using `prop-types` you are opting into new production behavior.
  // http://fb.me/prop-types-in-prod
  module.exports = __webpack_require__(3489)();
}

/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))

/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(process) {

function checkDCE() {
  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
  if (
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
  ) {
    return;
  }
  if (process.env.NODE_ENV !== 'production') {
    // This branch is unreachable because this function is only called
    // in production, but the condition is true only in development.
    // Therefore if the branch is still here, dead code elimination wasn't
    // properly applied.
    // Don't change the message. React DevTools relies on it. Also make sure
    // this message doesn't occur elsewhere in this function, or it will cause
    // a false positive.
    throw new Error('^_^');
  }
  try {
    // Verify that the code above has been dead code eliminated (DCE'd).
    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
  } catch (err) {
    // DevTools shouldn't crash React, no matter what.
    // We should still report in case we break this code.
    console.error(err);
  }
}

if (process.env.NODE_ENV === 'production') {
  // DCE check should happen before ReactDOM bundle executes so that
  // DevTools can report bad minification during injection.
  checkDCE();
  module.exports = __webpack_require__(2005);
} else {
  module.exports = __webpack_require__(2008);
}

/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))

/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _Icon = _interopRequireDefault(__webpack_require__(697));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var _default = _Icon["default"];
exports["default"] = _default;
//# sourceMappingURL=index.js.map

/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(35);
module.exports = function (it) {
  if (!isObject(it)) throw TypeError(it + ' is not an object!');
  return it;
};


/***/ }),
/* 21 */
/***/ (function(module, exports) {

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}

module.exports = _interopRequireDefault;

/***/ }),
/* 22 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return PRESENTATION_ATTRIBUTES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EVENT_ATTRIBUTES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return SCALE_TYPES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return LEGEND_TYPES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return TOOLTIP_TYPES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return getDisplayName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return findAllByType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return findChildByType; });
/* unused harmony export withoutType */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return getPresentationAttributes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return filterEventAttributes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return filterEventsOfChild; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return validateWidthHeight; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isSsr; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return filterSvgElements; });
/* unused harmony export isSingleChildEqual */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isChildrenEqual; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return renderByOrder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return getReactEventByType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return parseChildIndex; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isNil__ = __webpack_require__(106);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isNil__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isString__ = __webpack_require__(508);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isString___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isString__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isObject__ = __webpack_require__(93);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isObject___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isObject__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction__ = __webpack_require__(40);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_isArray__ = __webpack_require__(39);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_isArray__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(17);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__DataUtils__ = __webpack_require__(42);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ShallowEqual__ = __webpack_require__(512);






function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }

function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }





var PRESENTATION_ATTRIBUTES = {
  'aria-current': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  // state
  'aria-details': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-disabled': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  // state
  'aria-hidden': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  // state
  'aria-invalid': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  // state
  'aria-keyshortcuts': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-label': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-roledescription': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  // Widget Attributes
  'aria-autocomplete': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-checked': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-expanded': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-haspopup': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-level': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-modal': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-multiline': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-multiselectable': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-orientation': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-placeholder': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-pressed': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-readonly': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-required': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-selected': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-sort': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-valuemax': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-valuemin': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-valuenow': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-valuetext': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  // Live Region Attributes
  'aria-atomic': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-busy': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-live': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-relevant': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  // Drag-and-Drop Attributes
  'aria-dropeffect': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-grabbed': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  // Relationship Attributes
  'aria-activedescendant': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-colcount': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-colindex': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-colspan': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-controls': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-describedby': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-errormessage': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-flowto': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-labelledby': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-owns': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-posinset': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-rowcount': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-rowindex': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-rowspan': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  'aria-setsize': __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
  alignmentBaseline: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  angle: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
  baselineShift: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  clip: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  clipPath: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  clipRule: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  color: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  colorInterpolation: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  colorInterpolationFilters: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  colorProfile: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  colorRendering: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  cursor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  direction: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['ltr', 'rtl', 'inherit']),
  display: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  dominantBaseline: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  enableBackground: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  fill: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  fillOpacity: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number]),
  fillRule: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['nonzero', 'evenodd', 'inherit']),
  filter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  floodColor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  floodOpacity: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number]),
  font: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  fontFamily: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  fontSize: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  fontSizeAdjust: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  fontStretch: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['normal', 'wider', 'narrower', 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', 'inherit']),
  fontStyle: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['normal', 'italic', 'oblique', 'inherit']),
  fontVariant: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['normal', 'small-caps', 'inherit']),
  fontWeight: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['normal', 'bold', 'bolder', 'lighter', 100, 200, 300, 400, 500, 600, 700, 800, 900, 'inherit']),
  glyphOrientationHorizontal: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  glyphOrientationVertical: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  imageRendering: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['auto', 'optimizeSpeed', 'optimizeQuality', 'inherit']),
  kerning: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  letterSpacing: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  lightingColor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  lineHeight: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  markerEnd: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  markerMid: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  markerStart: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  mask: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  opacity: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  overflow: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['visible', 'hidden', 'scroll', 'auto', 'inherit']),
  pointerEvents: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'none', 'inherit']),
  shapeRendering: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['auto', 'optimizeSpeed', 'crispEdges', 'geometricPrecision', 'inherit']),
  stopColor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  stopOpacity: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  stroke: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  strokeDasharray: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  strokeDashoffset: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  strokeLinecap: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['butt', 'round', 'square', 'inherit']),
  strokeLinejoin: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['miter', 'round', 'bevel', 'inherit']),
  strokeMiterlimit: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  strokeOpacity: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  strokeWidth: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  textAnchor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['start', 'middle', 'end', 'inherit']),
  textDecoration: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['none', 'underline', 'overline', 'line-through', 'blink', 'inherit']),
  textRendering: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['auto', 'optimizeSpeed', 'optimizeLegibility', 'geometricPrecision', 'inherit']),
  unicodeBidi: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['normal', 'embed', 'bidi-override', 'inherit']),
  visibility: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['visible', 'hidden', 'collapse', 'inherit']),
  wordSpacing: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
  writingMode: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['lr-tb', 'rl-tb', 'tb-rl', 'lr', 'rl', 'tb', 'inherit']),
  transform: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  role: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  focusable: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  tabIndex: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
  style: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
  width: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
  height: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
  dx: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
  dy: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
  x: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
  y: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
  r: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
  // The radius of Rectangle
  radius: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.array])
};
var EVENT_ATTRIBUTES = {
  onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
  onMouseDown: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
  onMouseUp: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
  onMouseOver: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
  onMouseMove: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
  onMouseOut: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
  onMouseEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
  onMouseLeave: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
  onTouchEnd: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
  onTouchMove: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
  onTouchStart: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
  onTouchCancel: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func
};
var REACT_BROWSER_EVENT_MAP = {
  click: 'onClick',
  mousedown: 'onMouseDown',
  mouseup: 'onMouseUp',
  mouseover: 'onMouseOver',
  mousemove: 'onMouseMove',
  mouseout: 'onMouseOut',
  mouseenter: 'onMouseEnter',
  mouseleave: 'onMouseLeave',
  touchcancel: 'onTouchCancel',
  touchend: 'onTouchEnd',
  touchmove: 'onTouchMove',
  touchstart: 'onTouchStart'
};
var SCALE_TYPES = ['auto', 'linear', 'pow', 'sqrt', 'log', 'identity', 'time', 'band', 'point', 'ordinal', 'quantile', 'quantize', 'utc', 'sequential', 'threshold'];
var LEGEND_TYPES = ['plainline', 'line', 'square', 'rect', 'circle', 'cross', 'diamond', 'star', 'triangle', 'wye', 'none'];
var TOOLTIP_TYPES = ['none'];
/**
 * Get the display name of a component
 * @param  {Object} Comp Specified Component
 * @return {String}      Display name of Component
 */

var getDisplayName = function getDisplayName(Comp) {
  if (typeof Comp === 'string') {
    return Comp;
  }

  if (!Comp) {
    return '';
  }

  return Comp.displayName || Comp.name || 'Component';
};
/*
 * Find and return all matched children by type. `type` can be a React element class or
 * string
 */

var findAllByType = function findAllByType(children, type) {
  var result = [];
  var types = [];

  if (__WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(type)) {
    types = type.map(function (t) {
      return getDisplayName(t);
    });
  } else {
    types = [getDisplayName(type)];
  }

  __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.forEach(children, function (child) {
    var childType = child && child.type && (child.type.displayName || child.type.name);

    if (types.indexOf(childType) !== -1) {
      result.push(child);
    }
  });
  return result;
};
/*
 * Return the first matched child by type, return null otherwise.
 * `type` can be a React element class or string.
 */

var findChildByType = function findChildByType(children, type) {
  var result = findAllByType(children, type);
  return result && result[0];
};
/*
 * Create a new array of children excluding the ones matched the type
 */

var withoutType = function withoutType(children, type) {
  var newChildren = [];
  var types;

  if (__WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(type)) {
    types = type.map(function (t) {
      return getDisplayName(t);
    });
  } else {
    types = [getDisplayName(type)];
  }

  __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.forEach(children, function (child) {
    if (child && child.type && child.type.displayName && types.indexOf(child.type.displayName) !== -1) {
      return;
    }

    newChildren.push(child);
  });
  return newChildren;
};
/**
 * get all the presentation attribute of svg element
 * @param  {Object} el A react element or the props of a react element
 * @return {Object}    attributes or null
 */

var getPresentationAttributes = function getPresentationAttributes(el) {
  if (!el || __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(el)) {
    return null;
  }

  var props = __WEBPACK_IMPORTED_MODULE_5_react___default.a.isValidElement(el) ? el.props : el;

  if (!__WEBPACK_IMPORTED_MODULE_2_lodash_isObject___default()(props)) {
    return null;
  }

  var out = null; // eslint-disable-next-line no-restricted-syntax

  for (var i in props) {
    if ({}.hasOwnProperty.call(props, i) && PRESENTATION_ATTRIBUTES[i]) {
      if (!out) out = {};
      out[i] = props[i];
    }
  }

  return out;
};

var getEventHandlerOfElement = function getEventHandlerOfElement(originalHandler, props) {
  return function (e) {
    originalHandler(props, e);
    return null;
  };
};
/**
 * get all the event attribute of svg element
 * @param  {Object}   el           A react element or the props of a react element
 * @param  {Function} newHandler   New handler of event
 * @param  {Boolean}  wrapCallback Wrap callback and return more parameters or not
 * @return {Object}                attributes or null
 */


var filterEventAttributes = function filterEventAttributes(el, newHandler) {
  var wrapCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

  if (!el || __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(el)) {
    return null;
  }

  var props = __WEBPACK_IMPORTED_MODULE_5_react___default.a.isValidElement(el) ? el.props : el;

  if (!__WEBPACK_IMPORTED_MODULE_2_lodash_isObject___default()(props)) {
    return null;
  }

  var out = null; // eslint-disable-next-line no-restricted-syntax

  for (var i in props) {
    if ({}.hasOwnProperty.call(props, i) && EVENT_ATTRIBUTES[i]) {
      if (!out) out = {};
      out[i] = newHandler || (wrapCallback ? getEventHandlerOfElement(props[i], props) : props[i]);
    }
  }

  return out;
};

var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, data, index) {
  return function (e) {
    originalHandler(data, index, e);
    return null;
  };
};

var filterEventsOfChild = function filterEventsOfChild(props, data, index) {
  if (!__WEBPACK_IMPORTED_MODULE_2_lodash_isObject___default()(props)) {
    return null;
  }

  var out = null; // eslint-disable-next-line no-restricted-syntax

  for (var i in props) {
    if ({}.hasOwnProperty.call(props, i) && EVENT_ATTRIBUTES[i] && __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(props[i])) {
      if (!out) out = {};
      out[i] = getEventHandlerOfChild(props[i], data, index);
    }
  }

  return out;
};
/**
 * validate the width and height props of a chart element
 * @param  {Object} el A chart element
 * @return {Boolean}   true If the props width and height are number, and greater than 0
 */

var validateWidthHeight = function validateWidthHeight(el) {
  if (!el || !el.props) {
    return false;
  }

  var _el$props = el.props,
      width = _el$props.width,
      height = _el$props.height;

  if (!Object(__WEBPACK_IMPORTED_MODULE_7__DataUtils__["h" /* isNumber */])(width) || width <= 0 || !Object(__WEBPACK_IMPORTED_MODULE_7__DataUtils__["h" /* isNumber */])(height) || height <= 0) {
    return false;
  }

  return true;
};
var isSsr = function isSsr() {
  return !(typeof window !== 'undefined' && window.document && window.document.createElement && window.setTimeout);
};
var SVG_TAGS = ['a', 'altGlyph', 'altGlyphDef', 'altGlyphItem', 'animate', 'animateColor', 'animateMotion', 'animateTransform', 'circle', 'clipPath', 'color-profile', 'cursor', 'defs', 'desc', 'ellipse', 'feBlend', 'feColormatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'filter', 'font', 'font-face', 'font-face-format', 'font-face-name', 'font-face-url', 'foreignObject', 'g', 'glyph', 'glyphRef', 'hkern', 'image', 'line', 'lineGradient', 'marker', 'mask', 'metadata', 'missing-glyph', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'script', 'set', 'stop', 'style', 'svg', 'switch', 'symbol', 'text', 'textPath', 'title', 'tref', 'tspan', 'use', 'view', 'vkern'];

var isSvgElement = function isSvgElement(child) {
  return child && child.type && __WEBPACK_IMPORTED_MODULE_1_lodash_isString___default()(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
};
/**
 * Filter all the svg elements of children
 * @param  {Array} children The children of a react element
 * @return {Array}          All the svg elements
 */


var filterSvgElements = function filterSvgElements(children) {
  var svgElements = [];
  __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.forEach(children, function (entry) {
    if (entry && entry.type && __WEBPACK_IMPORTED_MODULE_1_lodash_isString___default()(entry.type) && SVG_TAGS.indexOf(entry.type) >= 0) {
      svgElements.push(entry);
    }
  });
  return svgElements;
};
var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
  if (__WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(nextChild) && __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(prevChild)) {
    return true;
  }

  if (!__WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(nextChild) && !__WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(prevChild)) {
    var _ref = nextChild.props || {},
        nextChildren = _ref.children,
        nextProps = _objectWithoutProperties(_ref, ["children"]);

    var _ref2 = prevChild.props || {},
        prevChildren = _ref2.children,
        prevProps = _objectWithoutProperties(_ref2, ["children"]);

    if (nextChildren && prevChildren) {
      // eslint-disable-next-line no-use-before-define
      return Object(__WEBPACK_IMPORTED_MODULE_8__ShallowEqual__["a" /* shallowEqual */])(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
    }

    if (!nextChildren && !prevChildren) {
      return Object(__WEBPACK_IMPORTED_MODULE_8__ShallowEqual__["a" /* shallowEqual */])(nextProps, prevProps);
    }

    return false;
  }

  return false;
};
/**
 * Wether props of children changed
 * @param  {Object} nextChildren The latest children
 * @param  {Object} prevChildren The prev children
 * @return {Boolean}             equal or not
 */

var isChildrenEqual = function isChildrenEqual(nextChildren, prevChildren) {
  if (nextChildren === prevChildren) {
    return true;
  }

  if (__WEBPACK_IMPORTED_MODULE_5_react__["Children"].count(nextChildren) !== __WEBPACK_IMPORTED_MODULE_5_react__["Children"].count(prevChildren)) {
    return false;
  }

  var count = __WEBPACK_IMPORTED_MODULE_5_react__["Children"].count(nextChildren);

  if (count === 0) {
    return true;
  }

  if (count === 1) {
    return isSingleChildEqual(__WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(nextChildren) ? nextChildren[0] : nextChildren, __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(prevChildren) ? prevChildren[0] : prevChildren);
  }

  for (var _i = 0; _i < count; _i++) {
    var nextChild = nextChildren[_i];
    var prevChild = prevChildren[_i];

    if (__WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(nextChild) || __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(prevChild)) {
      if (!isChildrenEqual(nextChild, prevChild)) {
        return false;
      }
    } else if (!isSingleChildEqual(nextChild, prevChild)) {
      return false;
    }
  }

  return true;
};
var renderByOrder = function renderByOrder(children, renderMap) {
  var elements = [];
  var record = {};
  __WEBPACK_IMPORTED_MODULE_5_react__["Children"].forEach(children, function (child, index) {
    if (child && isSvgElement(child)) {
      elements.push(child);
    } else if (child && renderMap[getDisplayName(child.type)]) {
      var displayName = getDisplayName(child.type);
      var _renderMap$displayNam = renderMap[displayName],
          handler = _renderMap$displayNam.handler,
          once = _renderMap$displayNam.once;

      if (once && !record[displayName] || !once) {
        var results = handler(child, displayName, index);

        if (__WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(results)) {
          elements = [elements].concat(_toConsumableArray(results));
        } else {
          elements.push(results);
        }

        record[displayName] = true;
      }
    }
  });
  return elements;
};
var getReactEventByType = function getReactEventByType(e) {
  var type = e && e.type;

  if (type && REACT_BROWSER_EVENT_MAP[type]) {
    return REACT_BROWSER_EVENT_MAP[type];
  }

  return null;
};
var parseChildIndex = function parseChildIndex(child, children) {
  var result = -1;
  __WEBPACK_IMPORTED_MODULE_5_react__["Children"].forEach(children, function (entry, index) {
    if (entry === child) {
      result = index;
    }
  });
  return result;
};

/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {

var _Object$create = __webpack_require__(1068);

function _inheritsLoose(subClass, superClass) {
  subClass.prototype = _Object$create(superClass.prototype);
  subClass.prototype.constructor = subClass;
  subClass.__proto__ = superClass;
}

module.exports = _inheritsLoose;

/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {

var _Object$assign = __webpack_require__(440);

function _extends() {
  module.exports = _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;
  };

  return _extends.apply(this, arguments);
}

module.exports = _extends;

/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getTheme = getTheme;
exports["default"] = void 0;

var _classnames = _interopRequireDefault(__webpack_require__(1));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

/**
 * This function take cssModules files & generate a function that you can use to
 * duplicate the classes: the generated from the css module & the generic allowing any host app
 * to override / extend the style
 * @param  {...object} cssThemes the css module you want to handle
 * @example {
 * // myScssFile.scss
 * .error {
 * 		color: red;
 * }
 *
 * // MyJsFile
 * import myCSS from './myScssFile.scss'
 * import { getTheme } from '../theme';
 *
 * const theme = getTheme(myCSS);
 * const rendererThing = 
* // This will output ->
* } */ function getTheme() { for (var _len = arguments.length, cssThemes = new Array(_len), _key = 0; _key < _len; _key++) { cssThemes[_key] = arguments[_key]; } return function applyTheme() { for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { params[_key2] = arguments[_key2]; } var classnamesParams = params.reduce(function (acc, param) { if (Array.isArray(param)) { acc.push.apply(acc, _toConsumableArray(param.map(function (element) { return applyTheme(element); }))); } else if (_typeof(param) === 'object') { var newObj = Object.entries(param).reduce(function (objAcc, _ref) { var _ref2 = _slicedToArray(_ref, 2), key = _ref2[0], value = _ref2[1]; // eslint-disable-next-line no-param-reassign objAcc[key] = value; cssThemes.forEach(function (cssTheme) { if (cssTheme[key]) { // eslint-disable-next-line no-param-reassign objAcc[cssTheme[key]] = value; } }); return objAcc; }, {}); acc.push(newObj); } else if (typeof param === 'string') { acc.push(param); cssThemes.forEach(function (cssTheme) { if (cssTheme[param]) { acc.push(cssTheme[param]); } }); } return acc; }, []); return _classnames["default"].apply(void 0, _toConsumableArray(classnamesParams)); }; } var _default = getTheme; exports["default"] = _default; //# sourceMappingURL=theme.js.map /***/ }), /* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; /***/ }), /* 27 */ /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || Function("return this")() || (1,eval)("this"); } catch(e) { // This works if the window reference is available if(typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /* 28 */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = function() {}; if (process.env.NODE_ENV !== 'production') { warning = function(condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (format.length < 10 || (/^[s\W]*$/).test(format)) { throw new Error( 'The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format ); } if (!condition) { var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch(x) {} } }; } module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 30 */ /***/ (function(module, exports, __webpack_require__) { var _Object$keys = __webpack_require__(1070); function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = _Object$keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } module.exports = _objectWithoutPropertiesLoose; /***/ }), /* 31 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export bpfrpt_proptype_CellPosition */ /* unused harmony export bpfrpt_proptype_CellRendererParams */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return bpfrpt_proptype_CellRenderer; }); /* unused harmony export bpfrpt_proptype_CellCache */ /* unused harmony export bpfrpt_proptype_StyleCache */ /* unused harmony export bpfrpt_proptype_CellRangeRendererParams */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return bpfrpt_proptype_CellRangeRenderer; }); /* unused harmony export bpfrpt_proptype_CellSizeGetter */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return bpfrpt_proptype_CellSize; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return bpfrpt_proptype_NoContentRenderer; }); /* unused harmony export bpfrpt_proptype_Scroll */ /* unused harmony export bpfrpt_proptype_ScrollbarPresenceChange */ /* unused harmony export bpfrpt_proptype_RenderedSection */ /* unused harmony export bpfrpt_proptype_OverscanIndicesGetterParams */ /* unused harmony export bpfrpt_proptype_OverscanIndices */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return bpfrpt_proptype_OverscanIndicesGetter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bpfrpt_proptype_Alignment; }); /* unused harmony export bpfrpt_proptype_VisibleCellRange */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__ = __webpack_require__(732); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); var bpfrpt_proptype_CellPosition = process.env.NODE_ENV === 'production' ? null : { columnIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, rowIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired }; var bpfrpt_proptype_CellRendererParams = process.env.NODE_ENV === 'production' ? null : { columnIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, isScrolling: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired, isVisible: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired, key: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string.isRequired, parent: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired, rowIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, style: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired }; var bpfrpt_proptype_CellRenderer = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func; var bpfrpt_proptype_CellCache = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.objectOf(__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node.isRequired); var bpfrpt_proptype_StyleCache = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.objectOf(__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired); var bpfrpt_proptype_CellRangeRendererParams = process.env.NODE_ENV === 'production' ? null : { cellCache: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.objectOf(__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node.isRequired).isRequired, cellRenderer: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func.isRequired, columnSizeAndPositionManager: function columnSizeAndPositionManager() { return (typeof __WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__["a" /* default */] === 'function' ? __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.instanceOf(__WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__["a" /* default */]).isRequired : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.any.isRequired).apply(this, arguments); }, columnStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, columnStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, deferredMeasurementCache: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object, horizontalOffsetAdjustment: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, isScrolling: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired, isScrollingOptOut: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired, parent: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired, rowSizeAndPositionManager: function rowSizeAndPositionManager() { return (typeof __WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__["a" /* default */] === 'function' ? __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.instanceOf(__WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__["a" /* default */]).isRequired : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.any.isRequired).apply(this, arguments); }, rowStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, rowStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, scrollLeft: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, scrollTop: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, styleCache: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.objectOf(__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired).isRequired, verticalOffsetAdjustment: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, visibleColumnIndices: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired, visibleRowIndices: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired }; var bpfrpt_proptype_CellRangeRenderer = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func; var bpfrpt_proptype_CellSizeGetter = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func; var bpfrpt_proptype_CellSize = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number]); var bpfrpt_proptype_NoContentRenderer = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func; var bpfrpt_proptype_Scroll = process.env.NODE_ENV === 'production' ? null : { clientHeight: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, clientWidth: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, scrollHeight: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, scrollLeft: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, scrollTop: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, scrollWidth: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired }; var bpfrpt_proptype_ScrollbarPresenceChange = process.env.NODE_ENV === 'production' ? null : { horizontal: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired, vertical: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired, size: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired }; var bpfrpt_proptype_RenderedSection = process.env.NODE_ENV === 'production' ? null : { columnOverscanStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, columnOverscanStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, columnStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, columnStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, rowOverscanStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, rowOverscanStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, rowStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, rowStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired }; var bpfrpt_proptype_OverscanIndicesGetterParams = process.env.NODE_ENV === 'production' ? null : { // One of SCROLL_DIRECTION_HORIZONTAL or SCROLL_DIRECTION_VERTICAL direction: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf(['horizontal', 'vertical']).isRequired, // One of SCROLL_DIRECTION_BACKWARD or SCROLL_DIRECTION_FORWARD scrollDirection: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf([-1, 1]).isRequired, // Number of rows or columns in the current axis cellCount: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, // Maximum number of cells to over-render in either direction overscanCellsCount: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, // Begin of range of visible cells startIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, // End of range of visible cells stopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired }; var bpfrpt_proptype_OverscanIndices = process.env.NODE_ENV === 'production' ? null : { overscanStartIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired, overscanStopIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired }; var bpfrpt_proptype_OverscanIndicesGetter = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func; var bpfrpt_proptype_Alignment = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf(['auto', 'end', 'start', 'center']); var bpfrpt_proptype_VisibleCellRange = process.env.NODE_ENV === 'production' ? null : { start: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number, stop: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number }; /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "Action", { enumerable: true, get: function get() { return _Action["default"]; } }); Object.defineProperty(exports, "Actions", { enumerable: true, get: function get() { return _Actions["default"]; } }); Object.defineProperty(exports, "ActionButton", { enumerable: true, get: function get() { return _ActionButton["default"]; } }); Object.defineProperty(exports, "ActionDropdown", { enumerable: true, get: function get() { return _ActionDropdown["default"]; } }); Object.defineProperty(exports, "ActionFile", { enumerable: true, get: function get() { return _ActionFile["default"]; } }); Object.defineProperty(exports, "ActionIconToggle", { enumerable: true, get: function get() { return _ActionIconToggle["default"]; } }); Object.defineProperty(exports, "ActionSplitDropdown", { enumerable: true, get: function get() { return _ActionSplitDropdown["default"]; } }); var _Action = _interopRequireDefault(__webpack_require__(46)); var _Actions = _interopRequireDefault(__webpack_require__(1149)); var _ActionButton = _interopRequireDefault(__webpack_require__(358)); var _ActionDropdown = _interopRequireDefault(__webpack_require__(231)); var _ActionFile = _interopRequireDefault(__webpack_require__(1144)); var _ActionIconToggle = _interopRequireDefault(__webpack_require__(465)); var _ActionSplitDropdown = _interopRequireDefault(__webpack_require__(1145)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } //# sourceMappingURL=index.js.map /***/ }), /* 33 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /* 34 */ /***/ (function(module, exports) { // Source: http://jsfiddle.net/vWx8V/ // http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes /** * Conenience method returns corresponding value for given keyName or keyCode. * * @param {Mixed} keyCode {Number} or keyName {String} * @return {Mixed} * @api public */ function keyCode(searchInput) { // Keyboard Events if (searchInput && 'object' === typeof searchInput) { var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode if (hasKeyCode) searchInput = hasKeyCode } // Numbers if ('number' === typeof searchInput) return names[searchInput] // Everything else (cast to string) var search = String(searchInput) // check codes var foundNamedKey = codes[search.toLowerCase()] if (foundNamedKey) return foundNamedKey // check aliases var foundNamedKey = aliases[search.toLowerCase()] if (foundNamedKey) return foundNamedKey // weird character? if (search.length === 1) return search.charCodeAt(0) return undefined } /** * Compares a keyboard event with a given keyCode or keyName. * * @param {Event} event Keyboard event that should be tested * @param {Mixed} keyCode {Number} or keyName {String} * @return {Boolean} * @api public */ keyCode.isEventKey = function isEventKey(event, nameOrCode) { if (event && 'object' === typeof event) { var keyCode = event.which || event.keyCode || event.charCode if (keyCode === null || keyCode === undefined) { return false; } if (typeof nameOrCode === 'string') { // check codes var foundNamedKey = codes[nameOrCode.toLowerCase()] if (foundNamedKey) { return foundNamedKey === keyCode; } // check aliases var foundNamedKey = aliases[nameOrCode.toLowerCase()] if (foundNamedKey) { return foundNamedKey === keyCode; } } else if (typeof nameOrCode === 'number') { return nameOrCode === keyCode; } return false; } } exports = module.exports = keyCode; /** * Get by name * * exports.code['enter'] // => 13 */ var codes = exports.code = exports.codes = { 'backspace': 8, 'tab': 9, 'enter': 13, 'shift': 16, 'ctrl': 17, 'alt': 18, 'pause/break': 19, 'caps lock': 20, 'esc': 27, 'space': 32, 'page up': 33, 'page down': 34, 'end': 35, 'home': 36, 'left': 37, 'up': 38, 'right': 39, 'down': 40, 'insert': 45, 'delete': 46, 'command': 91, 'left command': 91, 'right command': 93, 'numpad *': 106, 'numpad +': 107, 'numpad -': 109, 'numpad .': 110, 'numpad /': 111, 'num lock': 144, 'scroll lock': 145, 'my computer': 182, 'my calculator': 183, ';': 186, '=': 187, ',': 188, '-': 189, '.': 190, '/': 191, '`': 192, '[': 219, '\\': 220, ']': 221, "'": 222 } // Helper aliases var aliases = exports.aliases = { 'windows': 91, '⇧': 16, '⌥': 18, '⌃': 17, '⌘': 91, 'ctl': 17, 'control': 17, 'option': 18, 'pause': 19, 'break': 19, 'caps': 20, 'return': 13, 'escape': 27, 'spc': 32, 'spacebar': 32, 'pgup': 33, 'pgdn': 34, 'ins': 45, 'del': 46, 'cmd': 91 } /*! * Programatically add the following */ // lower case chars for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32 // numbers for (var i = 48; i < 58; i++) codes[i - 48] = i // function keys for (i = 1; i < 13; i++) codes['f'+i] = i + 111 // numpad keys for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96 /** * Get by code * * exports.name[13] // => 'Enter' */ var names = exports.names = exports.title = {} // title for backward compat // Create reverse mapping for (i in codes) names[codes[i]] = i // Add aliases for (var alias in aliases) { codes[alias] = aliases[alias] } /***/ }), /* 35 */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(1198); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; (0, _defineProperty2.default)(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /***/ }), /* 37 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof2 = __webpack_require__(723); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; }; /***/ }), /* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _setPrototypeOf = __webpack_require__(2709); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); var _create = __webpack_require__(2713); var _create2 = _interopRequireDefault(_create); var _typeof2 = __webpack_require__(723); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); } subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; }; /***/ }), /* 39 */ /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /* 40 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(200), isObject = __webpack_require__(93); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /* 41 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(169); var core = __webpack_require__(384); var hide = __webpack_require__(1397); var redefine = __webpack_require__(1401); var ctx = __webpack_require__(1404); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); var key, own, out, exp; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // extend global if (target) redefine(target, key, out, type & $export.U); // export if (exports[key] != out) hide(exports, key, exp); if (IS_PROTO && expProto[key] != out) expProto[key] = out; } }; global.core = core; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /* 42 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return mathSign; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return isPercent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return isNumber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return isNumOrStr; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return uniqueId; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getPercentValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getAnyElementOfObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return hasDuplicate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return interpolateNumber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return findEntryInArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getLinearRegression; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_get__ = __webpack_require__(203); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_get___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_get__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isArray__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isArray__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNaN__ = __webpack_require__(510); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNaN___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNaN__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNumber__ = __webpack_require__(511); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isNumber___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isNumber__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_isString__ = __webpack_require__(508); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_isString___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_isString__); var mathSign = function mathSign(value) { if (value === 0) { return 0; } if (value > 0) { return 1; } return -1; }; var isPercent = function isPercent(value) { return __WEBPACK_IMPORTED_MODULE_4_lodash_isString___default()(value) && value.indexOf('%') === value.length - 1; }; var isNumber = function isNumber(value) { return __WEBPACK_IMPORTED_MODULE_3_lodash_isNumber___default()(value) && !__WEBPACK_IMPORTED_MODULE_2_lodash_isNaN___default()(value); }; var isNumOrStr = function isNumOrStr(value) { return isNumber(value) || __WEBPACK_IMPORTED_MODULE_4_lodash_isString___default()(value); }; var idCounter = 0; var uniqueId = function uniqueId(prefix) { var id = ++idCounter; return "".concat(prefix || '').concat(id); }; /** * Get percent value of a total value * @param {Number|String} percent A percent * @param {Number} totalValue Total value * @param {NUmber} defaultValue The value returned when percent is undefined or invalid * @param {Boolean} validate If set to be true, the result will be validated * @return {Number} value */ var getPercentValue = function getPercentValue(percent, totalValue) { var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; var validate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; if (!isNumber(percent) && !__WEBPACK_IMPORTED_MODULE_4_lodash_isString___default()(percent)) { return defaultValue; } var value; if (isPercent(percent)) { var index = percent.indexOf('%'); value = totalValue * parseFloat(percent.slice(0, index)) / 100; } else { value = +percent; } if (__WEBPACK_IMPORTED_MODULE_2_lodash_isNaN___default()(value)) { value = defaultValue; } if (validate && value > totalValue) { value = totalValue; } return value; }; var getAnyElementOfObject = function getAnyElementOfObject(obj) { if (!obj) { return null; } var keys = Object.keys(obj); if (keys && keys.length) { return obj[keys[0]]; } return null; }; var hasDuplicate = function hasDuplicate(ary) { if (!__WEBPACK_IMPORTED_MODULE_1_lodash_isArray___default()(ary)) { return false; } var len = ary.length; var cache = {}; for (var i = 0; i < len; i++) { if (!cache[ary[i]]) { cache[ary[i]] = true; } else { return true; } } return false; }; var interpolateNumber = function interpolateNumber(numberA, numberB) { if (isNumber(numberA) && isNumber(numberB)) { return function (t) { return numberA + t * (numberB - numberA); }; } return function () { return numberB; }; }; var findEntryInArray = function findEntryInArray(ary, specifiedKey, specifiedValue) { if (!ary || !ary.length) { return null; } return ary.find(function (entry) { return entry && (typeof specifiedKey === 'function' ? specifiedKey(entry) : __WEBPACK_IMPORTED_MODULE_0_lodash_get___default()(entry, specifiedKey)) === specifiedValue; }); }; /** * The least square linear regression * @param {Array} data The array of points * @returns {Object} The domain of x, and the parameter of linear function */ var getLinearRegression = function getLinearRegression(data) { if (!data || !data.length) { return null; } var len = data.length; var xsum = 0; var ysum = 0; var xysum = 0; var xxsum = 0; var xmin = Infinity; var xmax = -Infinity; for (var i = 0; i < len; i++) { xsum += data[i].cx; ysum += data[i].cy; xysum += data[i].cx * data[i].cy; xxsum += data[i].cx * data[i].cx; xmin = Math.min(xmin, data[i].cx); xmax = Math.max(xmax, data[i].cx); } var a = len * xxsum !== xsum * xsum ? (len * xysum - xsum * ysum) / (len * xxsum - xsum * xsum) : 0; return { xmin: xmin, xmax: xmax, a: a, b: (ysum - a * xsum) / len }; }; /***/ }), /* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "TextMode", { enumerable: true, get: function get() { return _TextMode["default"]; } }); exports["default"] = void 0; var _FieldTemplate = _interopRequireDefault(__webpack_require__(4120)); var _TextMode = _interopRequireDefault(__webpack_require__(1624)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _FieldTemplate["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 44 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = _assertThisInitialized; function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } /***/ }), /* 45 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (immutable) */ __webpack_exports__["__extends"] = __extends; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; }); /* harmony export (immutable) */ __webpack_exports__["__rest"] = __rest; /* harmony export (immutable) */ __webpack_exports__["__decorate"] = __decorate; /* harmony export (immutable) */ __webpack_exports__["__param"] = __param; /* harmony export (immutable) */ __webpack_exports__["__metadata"] = __metadata; /* harmony export (immutable) */ __webpack_exports__["__awaiter"] = __awaiter; /* harmony export (immutable) */ __webpack_exports__["__generator"] = __generator; /* harmony export (immutable) */ __webpack_exports__["__createBinding"] = __createBinding; /* harmony export (immutable) */ __webpack_exports__["__exportStar"] = __exportStar; /* harmony export (immutable) */ __webpack_exports__["__values"] = __values; /* harmony export (immutable) */ __webpack_exports__["__read"] = __read; /* harmony export (immutable) */ __webpack_exports__["__spread"] = __spread; /* harmony export (immutable) */ __webpack_exports__["__spreadArrays"] = __spreadArrays; /* harmony export (immutable) */ __webpack_exports__["__await"] = __await; /* harmony export (immutable) */ __webpack_exports__["__asyncGenerator"] = __asyncGenerator; /* harmony export (immutable) */ __webpack_exports__["__asyncDelegator"] = __asyncDelegator; /* harmony export (immutable) */ __webpack_exports__["__asyncValues"] = __asyncValues; /* harmony export (immutable) */ __webpack_exports__["__makeTemplateObject"] = __makeTemplateObject; /* harmony export (immutable) */ __webpack_exports__["__importStar"] = __importStar; /* harmony export (immutable) */ __webpack_exports__["__importDefault"] = __importDefault; /* harmony export (immutable) */ __webpack_exports__["__classPrivateFieldGet"] = __classPrivateFieldGet; /* harmony export (immutable) */ __webpack_exports__["__classPrivateFieldSet"] = __classPrivateFieldSet; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; } return __assign.apply(this, arguments); } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } function __createBinding(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; } function __exportStar(m, exports) { for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; } function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; }; function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result.default = mod; return result; } function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, privateMap) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return privateMap.get(receiver); } function __classPrivateFieldSet(receiver, privateMap, value) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to set private field on non-instance"); } privateMap.set(receiver, value); return value; } /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Action = _interopRequireDefault(__webpack_require__(357)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Action["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { module.exports = __webpack_require__(2036); } else { module.exports = __webpack_require__(2037); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== 'production') { var ReactIs = __webpack_require__(47); // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(2721)(ReactIs.isElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(2723)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(324)('wks'); var uid = __webpack_require__(211); var Symbol = __webpack_require__(28).Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(120); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var invariant = function(condition, format, a, b, c, d, e, f) { if (process.env.NODE_ENV !== 'production') { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error( 'Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.' ); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error( format.replace(/%s/g, function() { return args[argIndex++]; }) ); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 52 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__async__ = __webpack_require__(2059); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__browser__ = __webpack_require__(1025); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_1__browser__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__dsn__ = __webpack_require__(2060); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__dsn__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__error__ = __webpack_require__(621); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_3__error__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__instrument__ = __webpack_require__(2062); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_4__instrument__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__is__ = __webpack_require__(223); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_5__is__["a"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_5__is__["b"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_5__is__["d"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_5__is__["e"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_5__is__["f"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_5__is__["g"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_5__is__["h"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "z", function() { return __WEBPACK_IMPORTED_MODULE_5__is__["i"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "A", function() { return __WEBPACK_IMPORTED_MODULE_5__is__["k"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "B", function() { return __WEBPACK_IMPORTED_MODULE_5__is__["m"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__logger__ = __webpack_require__(622); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "C", function() { return __WEBPACK_IMPORTED_MODULE_6__logger__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__memo__ = __webpack_require__(1026); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__misc__ = __webpack_require__(337); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_8__misc__["a"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_8__misc__["b"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_8__misc__["c"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_8__misc__["d"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_8__misc__["e"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_8__misc__["f"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "F", function() { return __WEBPACK_IMPORTED_MODULE_8__misc__["g"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "G", function() { return __WEBPACK_IMPORTED_MODULE_8__misc__["h"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "M", function() { return __WEBPACK_IMPORTED_MODULE_8__misc__["i"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__node__ = __webpack_require__(623); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_9__node__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__object__ = __webpack_require__(624); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_10__object__["a"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_10__object__["b"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "D", function() { return __WEBPACK_IMPORTED_MODULE_10__object__["c"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "E", function() { return __WEBPACK_IMPORTED_MODULE_10__object__["d"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "L", function() { return __WEBPACK_IMPORTED_MODULE_10__object__["e"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__path__ = __webpack_require__(2063); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__promisebuffer__ = __webpack_require__(2064); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_12__promisebuffer__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__stacktrace__ = __webpack_require__(625); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_13__stacktrace__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__string__ = __webpack_require__(626); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_14__string__["a"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "H", function() { return __WEBPACK_IMPORTED_MODULE_14__string__["b"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "K", function() { return __WEBPACK_IMPORTED_MODULE_14__string__["d"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__supports__ = __webpack_require__(1027); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "I", function() { return __WEBPACK_IMPORTED_MODULE_15__supports__["a"]; }); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "J", function() { return __WEBPACK_IMPORTED_MODULE_15__supports__["d"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__syncpromise__ = __webpack_require__(1028); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_16__syncpromise__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__time__ = __webpack_require__(2065); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_17__time__["a"]; }); //# sourceMappingURL=index.js.map /***/ }), /* 53 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(33)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 54 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { var _interopRequireDefault = __webpack_require__(21); exports.__esModule = true; exports.prefix = prefix; exports.getClassSet = getClassSet; exports.splitBsProps = splitBsProps; exports.splitBsPropsAndOmit = splitBsPropsAndOmit; exports.addStyle = addStyle; exports._curry = exports.bsSizes = exports.bsStyles = exports.bsClass = void 0; var _entries = _interopRequireDefault(__webpack_require__(226)); var _extends2 = _interopRequireDefault(__webpack_require__(24)); var _invariant = _interopRequireDefault(__webpack_require__(648)); var _propTypes = _interopRequireDefault(__webpack_require__(2)); var _StyleConfig = __webpack_require__(230); // TODO: The publicly exposed parts of this should be in lib/BootstrapUtils. function curry(fn) { return function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var last = args[args.length - 1]; if (typeof last === 'function') { return fn.apply(void 0, args); } return function (Component) { return fn.apply(void 0, args.concat([Component])); }; }; } function prefix(props, variant) { var bsClass = (props.bsClass || '').trim(); !(bsClass != null) ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, 'A `bsClass` prop is required for this component') : invariant(false) : void 0; return bsClass + (variant ? "-" + variant : ''); } var bsClass = curry(function (defaultClass, Component) { var propTypes = Component.propTypes || (Component.propTypes = {}); var defaultProps = Component.defaultProps || (Component.defaultProps = {}); propTypes.bsClass = _propTypes.default.string; defaultProps.bsClass = defaultClass; return Component; }); exports.bsClass = bsClass; var bsStyles = curry(function (styles, defaultStyle, Component) { if (typeof defaultStyle !== 'string') { Component = defaultStyle; defaultStyle = undefined; } var existing = Component.STYLES || []; var propTypes = Component.propTypes || {}; styles.forEach(function (style) { if (existing.indexOf(style) === -1) { existing.push(style); } }); var propType = _propTypes.default.oneOf(existing); // expose the values on the propType function for documentation Component.STYLES = existing; propType._values = existing; Component.propTypes = (0, _extends2.default)({}, propTypes, { bsStyle: propType }); if (defaultStyle !== undefined) { var defaultProps = Component.defaultProps || (Component.defaultProps = {}); defaultProps.bsStyle = defaultStyle; } return Component; }); exports.bsStyles = bsStyles; var bsSizes = curry(function (sizes, defaultSize, Component) { if (typeof defaultSize !== 'string') { Component = defaultSize; defaultSize = undefined; } var existing = Component.SIZES || []; var propTypes = Component.propTypes || {}; sizes.forEach(function (size) { if (existing.indexOf(size) === -1) { existing.push(size); } }); var values = []; existing.forEach(function (size) { var mappedSize = _StyleConfig.SIZE_MAP[size]; if (mappedSize && mappedSize !== size) { values.push(mappedSize); } values.push(size); }); var propType = _propTypes.default.oneOf(values); propType._values = values; // expose the values on the propType function for documentation Component.SIZES = existing; Component.propTypes = (0, _extends2.default)({}, propTypes, { bsSize: propType }); if (defaultSize !== undefined) { if (!Component.defaultProps) { Component.defaultProps = {}; } Component.defaultProps.bsSize = defaultSize; } return Component; }); exports.bsSizes = bsSizes; function getClassSet(props) { var _classes; var classes = (_classes = {}, _classes[prefix(props)] = true, _classes); if (props.bsSize) { var bsSize = _StyleConfig.SIZE_MAP[props.bsSize] || props.bsSize; classes[prefix(props, bsSize)] = true; } if (props.bsStyle) { classes[prefix(props, props.bsStyle)] = true; } return classes; } function getBsProps(props) { return { bsClass: props.bsClass, bsSize: props.bsSize, bsStyle: props.bsStyle, bsRole: props.bsRole }; } function isBsProp(propName) { return propName === 'bsClass' || propName === 'bsSize' || propName === 'bsStyle' || propName === 'bsRole'; } function splitBsProps(props) { var elementProps = {}; (0, _entries.default)(props).forEach(function (_ref) { var propName = _ref[0], propValue = _ref[1]; if (!isBsProp(propName)) { elementProps[propName] = propValue; } }); return [getBsProps(props), elementProps]; } function splitBsPropsAndOmit(props, omittedPropNames) { var isOmittedProp = {}; omittedPropNames.forEach(function (propName) { isOmittedProp[propName] = true; }); var elementProps = {}; (0, _entries.default)(props).forEach(function (_ref2) { var propName = _ref2[0], propValue = _ref2[1]; if (!isBsProp(propName) && !isOmittedProp[propName]) { elementProps[propName] = propValue; } }); return [getBsProps(props), elementProps]; } /** * Add a style variant to a Component. Mutates the propTypes of the component * in order to validate the new variant. */ function addStyle(Component) { for (var _len2 = arguments.length, styleVariant = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { styleVariant[_key2 - 1] = arguments[_key2]; } bsStyles(styleVariant, Component); } var _curry = curry; exports._curry = _curry; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _TooltipTrigger = _interopRequireDefault(__webpack_require__(2419)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _TooltipTrigger["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _assign = __webpack_require__(1207); var _assign2 = _interopRequireDefault(_assign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _assign2.default || 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; }; /***/ }), /* 57 */ /***/ (function(module, exports) { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } module.exports = _interopRequireDefault; /***/ }), /* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Inject = _interopRequireDefault(__webpack_require__(2375)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Inject["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(687); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /* 60 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__); function _extends() { _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; }; return _extends.apply(this, arguments); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /** * @fileOverview Layer */ var propTypes = { className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node), __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node]) }; function Layer(props) { var children = props.children, className = props.className, others = _objectWithoutProperties(props, ["children", "className"]); var layerClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('recharts-layer', className); return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("g", _extends({ className: layerClass }, others), children); } Layer.propTypes = propTypes; /* harmony default export */ __webpack_exports__["a"] = (Layer); /***/ }), /* 61 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generateId = generateId; exports.generateDescriptionId = generateDescriptionId; exports.generateErrorId = generateErrorId; var _uuid = _interopRequireDefault(__webpack_require__(1601)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function generateId(id, suffix) { if (id) { return "".concat(id, "-").concat(suffix); } return _uuid["default"].v4(); } function generateDescriptionId(id) { return generateId(id, 'description'); } function generateErrorId(id) { return generateId(id, 'error'); } //# sourceMappingURL=generateId.js.map /***/ }), /* 62 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(20); var IE8_DOM_DEFINE = __webpack_require__(928); var toPrimitive = __webpack_require__(133); var dP = Object.defineProperty; exports.f = __webpack_require__(53) ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /* 63 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(134); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /* 64 */ /***/ (function(module, exports) { module.exports = function(module) { if(!module.webpackPolyfill) { module.deprecate = function() {}; module.paths = []; // module.parent = undefined by default if(!module.children) module.children = []; Object.defineProperty(module, "loaded", { enumerable: true, get: function() { return module.l; } }); Object.defineProperty(module, "id", { enumerable: true, get: function() { return module.i; } }); module.webpackPolyfill = 1; } return module; }; /***/ }), /* 65 */ /***/ (function(module, exports) { var core = module.exports = { version: '2.6.10' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /* 66 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(setImmediate) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; 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; }; exports.getDefaultRegistry = getDefaultRegistry; exports.getWidget = getWidget; exports.getDefaultFormState = getDefaultFormState; exports.getUiOptions = getUiOptions; exports.isObject = isObject; exports.mergeObjects = mergeObjects; exports.asNumber = asNumber; exports.orderProperties = orderProperties; exports.isConstant = isConstant; exports.toConstant = toConstant; exports.isSelect = isSelect; exports.isMultiSelect = isMultiSelect; exports.isFilesArray = isFilesArray; exports.isFixedItems = isFixedItems; exports.allowAdditionalItems = allowAdditionalItems; exports.optionsList = optionsList; exports.retrieveSchema = retrieveSchema; exports.deepEquals = deepEquals; exports.shouldRender = shouldRender; exports.toIdSchema = toIdSchema; exports.parseDateString = parseDateString; exports.toDateString = toDateString; exports.pad = pad; exports.setState = setState; exports.dataURItoBlob = dataURItoBlob; exports.rangeSpec = rangeSpec; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); __webpack_require__(1545); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var widgetMap = { boolean: { checkbox: "CheckboxWidget", radio: "RadioWidget", select: "SelectWidget", hidden: "HiddenWidget" }, string: { text: "TextWidget", password: "PasswordWidget", email: "EmailWidget", hostname: "TextWidget", ipv4: "TextWidget", ipv6: "TextWidget", uri: "URLWidget", "data-url": "FileWidget", radio: "RadioWidget", select: "SelectWidget", textarea: "TextareaWidget", hidden: "HiddenWidget", date: "DateWidget", datetime: "DateTimeWidget", "date-time": "DateTimeWidget", "alt-date": "AltDateWidget", "alt-datetime": "AltDateTimeWidget", color: "ColorWidget", file: "FileWidget" }, number: { text: "TextWidget", select: "SelectWidget", updown: "UpDownWidget", range: "RangeWidget", radio: "RadioWidget", hidden: "HiddenWidget" }, integer: { text: "TextWidget", select: "SelectWidget", updown: "UpDownWidget", range: "RangeWidget", radio: "RadioWidget", hidden: "HiddenWidget" }, array: { select: "SelectWidget", checkboxes: "CheckboxesWidget", files: "FileWidget" } }; function getDefaultRegistry() { return { fields: __webpack_require__(3865).default, widgets: __webpack_require__(3871).default, definitions: {}, formContext: {} }; } function getWidget(schema, widget) { var registeredWidgets = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var type = schema.type; function mergeOptions(Widget) { // cache return value as property of widget for proper react reconciliation if (!Widget.MergedWidget) { (function () { var defaultOptions = Widget.defaultProps && Widget.defaultProps.options || {}; Widget.MergedWidget = function (_ref) { var _ref$options = _ref.options, options = _ref$options === undefined ? {} : _ref$options, props = _objectWithoutProperties(_ref, ["options"]); return _react2.default.createElement(Widget, _extends({ options: _extends({}, defaultOptions, options) }, props)); }; })(); } return Widget.MergedWidget; } if (typeof widget === "function") { return mergeOptions(widget); } if (typeof widget !== "string") { throw new Error("Unsupported widget definition: " + (typeof widget === "undefined" ? "undefined" : _typeof(widget))); } if (registeredWidgets.hasOwnProperty(widget)) { var registeredWidget = registeredWidgets[widget]; return getWidget(schema, registeredWidget, registeredWidgets); } if (!widgetMap.hasOwnProperty(type)) { throw new Error("No widget for type \"" + type + "\""); } if (widgetMap[type].hasOwnProperty(widget)) { var _registeredWidget = registeredWidgets[widgetMap[type][widget]]; return getWidget(schema, _registeredWidget, registeredWidgets); } throw new Error("No widget \"" + widget + "\" for type \"" + type + "\""); } function computeDefaults(schema, parentDefaults) { var definitions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; // Compute the defaults recursively: give highest priority to deepest nodes. var defaults = parentDefaults; if (isObject(defaults) && isObject(schema.default)) { // For object defaults, only override parent defaults that are defined in // schema.default. defaults = mergeObjects(defaults, schema.default); } else if ("default" in schema) { // Use schema defaults for this node. defaults = schema.default; } else if ("$ref" in schema) { // Use referenced schema defaults for this node. var refSchema = findSchemaDefinition(schema.$ref, definitions); return computeDefaults(refSchema, defaults, definitions); } else if (isFixedItems(schema)) { defaults = schema.items.map(function (itemSchema) { return computeDefaults(itemSchema, undefined, definitions); }); } // Not defaults defined for this node, fallback to generic typed ones. if (typeof defaults === "undefined") { defaults = schema.default; } switch (schema.type) { // We need to recur for object schema inner default values. case "object": return Object.keys(schema.properties || {}).reduce(function (acc, key) { // Compute the defaults for this node, with the parent defaults we might // have from a previous run: defaults[key]. acc[key] = computeDefaults(schema.properties[key], (defaults || {})[key], definitions); return acc; }, {}); case "array": if (schema.minItems) { if (!isMultiSelect(schema, definitions)) { var defaultsLength = defaults ? defaults.length : 0; if (schema.minItems > defaultsLength) { var defaultEntries = defaults || []; // populate the array with the defaults var fillerEntries = new Array(schema.minItems - defaultsLength).fill(computeDefaults(schema.items, schema.items.defaults, definitions)); // then fill up the rest with either the item default or empty, up to minItems return defaultEntries.concat(fillerEntries); } } else { return []; } } } return defaults; } function getDefaultFormState(_schema, formData) { var definitions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; if (!isObject(_schema)) { throw new Error("Invalid schema: " + _schema); } var schema = retrieveSchema(_schema, definitions); var defaults = computeDefaults(schema, _schema.default, definitions); if (typeof formData === "undefined") { // No form data? Use schema defaults. return defaults; } if (isObject(formData)) { // Override schema defaults with form data. return mergeObjects(defaults, formData); } return formData || defaults; } function getUiOptions(uiSchema) { // get all passed options from ui:widget, ui:options, and ui: return Object.keys(uiSchema).filter(function (key) { return key.indexOf("ui:") === 0; }).reduce(function (options, key) { var value = uiSchema[key]; if (key === "ui:widget" && isObject(value)) { console.warn("Setting options via ui:widget object is deprecated, use ui:options instead"); return _extends({}, options, value.options || {}, { widget: value.component }); } if (key === "ui:options" && isObject(value)) { return _extends({}, options, value); } return _extends({}, options, _defineProperty({}, key.substring(3), value)); }, {}); } function isObject(thing) { return (typeof thing === "undefined" ? "undefined" : _typeof(thing)) === "object" && thing !== null && !Array.isArray(thing); } function mergeObjects(obj1, obj2) { var concatArrays = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; // Recursively merge deeply nested objects. var acc = Object.assign({}, obj1); // Prevent mutation of source object. return Object.keys(obj2).reduce(function (acc, key) { var left = obj1[key], right = obj2[key]; if (obj1.hasOwnProperty(key) && isObject(right)) { acc[key] = mergeObjects(left, right, concatArrays); } else if (concatArrays && Array.isArray(left) && Array.isArray(right)) { acc[key] = left.concat(right); } else { acc[key] = right; } return acc; }, acc); } function asNumber(value) { if (value === "") { return undefined; } if (/\.$/.test(value)) { // "3." can't really be considered a number even if it parses in js. The // user is most likely entering a float. return value; } if (/\.0$/.test(value)) { // we need to return this as a string here, to allow for input like 3.07 return value; } var n = Number(value); var valid = typeof n === "number" && !Number.isNaN(n); if (/\.\d*0$/.test(value)) { // It's a number, that's cool - but we need it as a string so it doesn't screw // with the user when entering dollar amounts or other values (such as those with // specific precision or number of significant digits) return value; } return valid ? n : value; } function orderProperties(properties, order) { if (!Array.isArray(order)) { return properties; } var arrayToHash = function arrayToHash(arr) { return arr.reduce(function (prev, curr) { prev[curr] = true; return prev; }, {}); }; var errorPropList = function errorPropList(arr) { return arr.length > 1 ? "properties '" + arr.join("', '") + "'" : "property '" + arr[0] + "'"; }; var propertyHash = arrayToHash(properties); var orderHash = arrayToHash(order); var extraneous = order.filter(function (prop) { return prop !== "*" && !propertyHash[prop]; }); if (extraneous.length) { throw new Error("uiSchema order list contains extraneous " + errorPropList(extraneous)); } var rest = properties.filter(function (prop) { return !orderHash[prop]; }); var restIndex = order.indexOf("*"); if (restIndex === -1) { if (rest.length) { throw new Error("uiSchema order list does not contain " + errorPropList(rest)); } return order; } if (restIndex !== order.lastIndexOf("*")) { throw new Error("uiSchema order list contains more than one wildcard item"); } var complete = [].concat(_toConsumableArray(order)); complete.splice.apply(complete, [restIndex, 1].concat(_toConsumableArray(rest))); return complete; } /** * This function checks if the given schema matches a single * constant value. */ function isConstant(schema) { return Array.isArray(schema.enum) && schema.enum.length === 1 || schema.hasOwnProperty("const"); } function toConstant(schema) { if (Array.isArray(schema.enum) && schema.enum.length === 1) { return schema.enum[0]; } else if (schema.hasOwnProperty("const")) { return schema.const; } else { throw new Error("schema cannot be inferred as a constant"); } } function isSelect(_schema) { var definitions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var schema = retrieveSchema(_schema, definitions); var altSchemas = schema.oneOf || schema.anyOf; if (Array.isArray(schema.enum)) { return true; } else if (Array.isArray(altSchemas)) { return altSchemas.every(function (altSchemas) { return isConstant(altSchemas); }); } return false; } function isMultiSelect(schema) { var definitions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (!schema.uniqueItems || !schema.items) { return false; } return isSelect(schema.items, definitions); } function isFilesArray(schema, uiSchema) { var definitions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; if (uiSchema["ui:widget"] === "files") { return true; } else if (schema.items) { var itemsSchema = retrieveSchema(schema.items, definitions); return itemsSchema.type === "string" && itemsSchema.format === "data-url"; } return false; } function isFixedItems(schema) { return Array.isArray(schema.items) && schema.items.length > 0 && schema.items.every(function (item) { return isObject(item); }); } function allowAdditionalItems(schema) { if (schema.additionalItems === true) { console.warn("additionalItems=true is currently not supported"); } return isObject(schema.additionalItems); } function optionsList(schema) { if (schema.enum) { return schema.enum.map(function (value, i) { var label = schema.enumNames && schema.enumNames[i] || String(value); return { label: label, value: value }; }); } else { var altSchemas = schema.oneOf || schema.anyOf; return altSchemas.map(function (schema, i) { var value = toConstant(schema); var label = schema.title || String(value); return { label: label, value: value }; }); } } function findSchemaDefinition($ref) { var definitions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; // Extract and use the referenced definition if we have it. var match = /^#\/definitions\/(.*)$/.exec($ref); if (match && match[1]) { var parts = match[1].split("/"); var current = definitions; var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var part = _step.value; part = part.replace(/~1/g, "/").replace(/~0/g, "~"); if (current.hasOwnProperty(part)) { current = current[part]; } else { // No matching definition found, that's an error (bogus schema?) throw new Error("Could not find a definition for " + $ref + "."); } } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator.return) { _iterator.return(); } } finally { if (_didIteratorError) { throw _iteratorError; } } } return current; } // No matching definition found, that's an error (bogus schema?) throw new Error("Could not find a definition for " + $ref + "."); } function retrieveSchema(schema) { var definitions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; // No $ref attribute found, returning the original schema. if (!schema.hasOwnProperty("$ref")) { return schema; } // Retrieve the referenced schema definition. var $refSchema = findSchemaDefinition(schema.$ref, definitions); // Drop the $ref property of the source schema. var $ref = schema.$ref, localSchema = _objectWithoutProperties(schema, ["$ref"]); // Update referenced schema definition with local schema properties. return _extends({}, $refSchema, localSchema); } function isArguments(object) { return Object.prototype.toString.call(object) === "[object Arguments]"; } function deepEquals(a, b) { var ca = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; var cb = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; // Partially extracted from node-deeper and adapted to exclude comparison // checks for functions. // https://github.com/othiym23/node-deeper if (a === b) { return true; } else if (typeof a === "function" || typeof b === "function") { // Assume all functions are equivalent // see https://github.com/mozilla-services/react-jsonschema-form/issues/255 return true; } else if ((typeof a === "undefined" ? "undefined" : _typeof(a)) !== "object" || (typeof b === "undefined" ? "undefined" : _typeof(b)) !== "object") { return false; } else if (a === null || b === null) { return false; } else if (a instanceof Date && b instanceof Date) { return a.getTime() === b.getTime(); } else if (a instanceof RegExp && b instanceof RegExp) { return a.source === b.source && a.global === b.global && a.multiline === b.multiline && a.lastIndex === b.lastIndex && a.ignoreCase === b.ignoreCase; } else if (isArguments(a) || isArguments(b)) { if (!(isArguments(a) && isArguments(b))) { return false; } var slice = Array.prototype.slice; return deepEquals(slice.call(a), slice.call(b), ca, cb); } else { if (a.constructor !== b.constructor) { return false; } var ka = Object.keys(a); var kb = Object.keys(b); // don't bother with stack acrobatics if there's nothing there if (ka.length === 0 && kb.length === 0) { return true; } if (ka.length !== kb.length) { return false; } var cal = ca.length; while (cal--) { if (ca[cal] === a) { return cb[cal] === b; } } ca.push(a); cb.push(b); ka.sort(); kb.sort(); for (var j = ka.length - 1; j >= 0; j--) { if (ka[j] !== kb[j]) { return false; } } var key = void 0; for (var k = ka.length - 1; k >= 0; k--) { key = ka[k]; if (!deepEquals(a[key], b[key], ca, cb)) { return false; } } ca.pop(); cb.pop(); return true; } } function shouldRender(comp, nextProps, nextState) { var props = comp.props, state = comp.state; return !deepEquals(props, nextProps) || !deepEquals(state, nextState); } function toIdSchema(schema, id, definitions) { var idSchema = { $id: id || "root" }; if ("$ref" in schema) { var _schema = retrieveSchema(schema, definitions); return toIdSchema(_schema, id, definitions); } if ("items" in schema && !schema.items.$ref) { return toIdSchema(schema.items, id, definitions); } if (schema.type !== "object") { return idSchema; } for (var name in schema.properties || {}) { var field = schema.properties[name]; var fieldId = idSchema.$id + "_" + name; idSchema[name] = toIdSchema(field, fieldId, definitions); } return idSchema; } function parseDateString(dateString) { var includeTime = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; if (!dateString) { return { year: -1, month: -1, day: -1, hour: includeTime ? -1 : 0, minute: includeTime ? -1 : 0, second: includeTime ? -1 : 0 }; } var date = new Date(dateString); if (Number.isNaN(date.getTime())) { throw new Error("Unable to parse date " + dateString); } return { year: date.getUTCFullYear(), month: date.getUTCMonth() + 1, // oh you, javascript. day: date.getUTCDate(), hour: includeTime ? date.getUTCHours() : 0, minute: includeTime ? date.getUTCMinutes() : 0, second: includeTime ? date.getUTCSeconds() : 0 }; } function toDateString(_ref2) { var year = _ref2.year, month = _ref2.month, day = _ref2.day, _ref2$hour = _ref2.hour, hour = _ref2$hour === undefined ? 0 : _ref2$hour, _ref2$minute = _ref2.minute, minute = _ref2$minute === undefined ? 0 : _ref2$minute, _ref2$second = _ref2.second, second = _ref2$second === undefined ? 0 : _ref2$second; var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var utcTime = Date.UTC(year, month - 1, day, hour, minute, second); var datetime = new Date(utcTime).toJSON(); return time ? datetime : datetime.slice(0, 10); } function pad(num, size) { var s = String(num); while (s.length < size) { s = "0" + s; } return s; } function setState(instance, state, callback) { var safeRenderCompletion = instance.props.safeRenderCompletion; if (safeRenderCompletion) { instance.setState(state, callback); } else { instance.setState(state); setImmediate(callback); } } function dataURItoBlob(dataURI) { // Split metadata from data var splitted = dataURI.split(","); // Split params var params = splitted[0].split(";"); // Get mime-type from params var type = params[0].replace("data:", ""); // Filter the name property from params var properties = params.filter(function (param) { return param.split("=")[0] === "name"; }); // Look for the name and use unknown if no name property. var name = void 0; if (properties.length !== 1) { name = "unknown"; } else { // Because we filtered out the other property, // we only have the name case here. name = properties[0].split("=")[1]; } // Built the Uint8Array Blob parameter from the base64 string. var binary = atob(splitted[1]); var array = []; for (var i = 0; i < binary.length; i++) { array.push(binary.charCodeAt(i)); } // Create the blob object var blob = new window.Blob([new Uint8Array(array)], { type: type }); return { blob: blob, name: name }; } function rangeSpec(schema) { var spec = {}; if (schema.multipleOf) { spec.step = schema.multipleOf; } if (schema.minimum || schema.minimum === 0) { spec.min = schema.minimum; } if (schema.maximum || schema.maximum === 0) { spec.max = schema.maximum; } return spec; } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1544).setImmediate)) /***/ }), /* 67 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(671), baseClone = __webpack_require__(1110), baseUnset = __webpack_require__(2360), castPath = __webpack_require__(462), copyObject = __webpack_require__(351), customOmitClone = __webpack_require__(2367), flatRest = __webpack_require__(1130), getAllKeysIn = __webpack_require__(1125); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** * The opposite of `_.pick`; this method creates an object composed of the * own and inherited enumerable property paths of `object` that are not omitted. * * **Note:** This method is considerably slower than `_.pick`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to omit. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ var omit = flatRest(function(object, paths) { var result = {}; if (object == null) { return result; } var isDeep = false; paths = arrayMap(paths, function(path) { path = castPath(path, object); isDeep || (isDeep = path.length > 1); return path; }); copyObject(object, getAllKeysIn(object), result); if (isDeep) { result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); } var length = paths.length; while (length--) { baseUnset(result, paths[length]); } return result; }); module.exports = omit; /***/ }), /* 68 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** * Safe chained function * * Will only create a new function if needed, * otherwise will pass back existing functions or null. * * @param {function} functions to chain * @returns {function|null} */ function createChainedFunction() { for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { funcs[_key] = arguments[_key]; } return funcs.filter(function (f) { return f != null; }).reduce(function (acc, f) { if (typeof f !== 'function') { throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.'); } if (acc === null) { return f; } return function chainedFunction() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } acc.apply(this, args); f.apply(this, args); }; }, null); } /* harmony default export */ __webpack_exports__["a"] = (createChainedFunction); /***/ }), /* 69 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** * Safe chained function * * Will only create a new function if needed, * otherwise will pass back existing functions or null. * * @param {function} functions to chain * @returns {function|null} */ function createChainedFunction() { for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { funcs[_key] = arguments[_key]; } return funcs.filter(function (f) { return f != null; }).reduce(function (acc, f) { if (typeof f !== 'function') { throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.'); } if (acc === null) { return f; } return function chainedFunction() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } acc.apply(this, args); f.apply(this, args); }; }, null); } /* harmony default export */ __webpack_exports__["a"] = (createChainedFunction); /***/ }), /* 70 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* object-assign (c) Sindre Sorhus @license MIT */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } module.exports = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /***/ }), /* 71 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Accordion__ = __webpack_require__(2180); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Accordion", function() { return __WEBPACK_IMPORTED_MODULE_0__Accordion__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Alert__ = __webpack_require__(2197); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Alert", function() { return __WEBPACK_IMPORTED_MODULE_1__Alert__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Badge__ = __webpack_require__(2200); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Badge", function() { return __WEBPACK_IMPORTED_MODULE_2__Badge__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Breadcrumb__ = __webpack_require__(2201); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Breadcrumb", function() { return __WEBPACK_IMPORTED_MODULE_3__Breadcrumb__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__BreadcrumbItem__ = __webpack_require__(1075); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BreadcrumbItem", function() { return __WEBPACK_IMPORTED_MODULE_4__BreadcrumbItem__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Button__ = __webpack_require__(348); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return __WEBPACK_IMPORTED_MODULE_5__Button__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ButtonGroup__ = __webpack_require__(650); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonGroup", function() { return __WEBPACK_IMPORTED_MODULE_6__ButtonGroup__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ButtonToolbar__ = __webpack_require__(2202); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonToolbar", function() { return __WEBPACK_IMPORTED_MODULE_7__ButtonToolbar__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Carousel__ = __webpack_require__(2203); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Carousel", function() { return __WEBPACK_IMPORTED_MODULE_8__Carousel__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__CarouselItem__ = __webpack_require__(1076); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "CarouselItem", function() { return __WEBPACK_IMPORTED_MODULE_9__CarouselItem__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Checkbox__ = __webpack_require__(2212); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Checkbox", function() { return __WEBPACK_IMPORTED_MODULE_10__Checkbox__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Clearfix__ = __webpack_require__(2213); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Clearfix", function() { return __WEBPACK_IMPORTED_MODULE_11__Clearfix__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__CloseButton__ = __webpack_require__(649); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "CloseButton", function() { return __WEBPACK_IMPORTED_MODULE_12__CloseButton__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__ControlLabel__ = __webpack_require__(2214); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ControlLabel", function() { return __WEBPACK_IMPORTED_MODULE_13__ControlLabel__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__Col__ = __webpack_require__(2215); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Col", function() { return __WEBPACK_IMPORTED_MODULE_14__Col__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__Collapse__ = __webpack_require__(653); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Collapse", function() { return __WEBPACK_IMPORTED_MODULE_15__Collapse__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__Dropdown__ = __webpack_require__(445); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Dropdown", function() { return __WEBPACK_IMPORTED_MODULE_16__Dropdown__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__DropdownButton__ = __webpack_require__(2232); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "DropdownButton", function() { return __WEBPACK_IMPORTED_MODULE_17__DropdownButton__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__Fade__ = __webpack_require__(448); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Fade", function() { return __WEBPACK_IMPORTED_MODULE_18__Fade__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__Form__ = __webpack_require__(2233); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return __WEBPACK_IMPORTED_MODULE_19__Form__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__FormControl__ = __webpack_require__(2234); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FormControl", function() { return __WEBPACK_IMPORTED_MODULE_20__FormControl__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__FormGroup__ = __webpack_require__(2237); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FormGroup", function() { return __WEBPACK_IMPORTED_MODULE_21__FormGroup__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__Glyphicon__ = __webpack_require__(652); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Glyphicon", function() { return __WEBPACK_IMPORTED_MODULE_22__Glyphicon__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__Grid__ = __webpack_require__(1090); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return __WEBPACK_IMPORTED_MODULE_23__Grid__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__HelpBlock__ = __webpack_require__(2238); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "HelpBlock", function() { return __WEBPACK_IMPORTED_MODULE_24__HelpBlock__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__Image__ = __webpack_require__(2239); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Image", function() { return __WEBPACK_IMPORTED_MODULE_25__Image__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__InputGroup__ = __webpack_require__(2240); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "InputGroup", function() { return __WEBPACK_IMPORTED_MODULE_26__InputGroup__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__Jumbotron__ = __webpack_require__(2243); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Jumbotron", function() { return __WEBPACK_IMPORTED_MODULE_27__Jumbotron__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__Label__ = __webpack_require__(2244); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Label", function() { return __WEBPACK_IMPORTED_MODULE_28__Label__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__ListGroup__ = __webpack_require__(2245); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ListGroup", function() { return __WEBPACK_IMPORTED_MODULE_29__ListGroup__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__ListGroupItem__ = __webpack_require__(1091); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ListGroupItem", function() { return __WEBPACK_IMPORTED_MODULE_30__ListGroupItem__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__Media__ = __webpack_require__(449); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Media", function() { return __WEBPACK_IMPORTED_MODULE_31__Media__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__MenuItem__ = __webpack_require__(2252); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MenuItem", function() { return __WEBPACK_IMPORTED_MODULE_32__MenuItem__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__Modal__ = __webpack_require__(2253); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Modal", function() { return __WEBPACK_IMPORTED_MODULE_33__Modal__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__ModalBody__ = __webpack_require__(1094); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ModalBody", function() { return __WEBPACK_IMPORTED_MODULE_34__ModalBody__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__ModalDialog__ = __webpack_require__(1095); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ModalDialog", function() { return __WEBPACK_IMPORTED_MODULE_35__ModalDialog__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__ModalFooter__ = __webpack_require__(1096); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ModalFooter", function() { return __WEBPACK_IMPORTED_MODULE_36__ModalFooter__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__ModalHeader__ = __webpack_require__(1097); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ModalHeader", function() { return __WEBPACK_IMPORTED_MODULE_37__ModalHeader__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__ModalTitle__ = __webpack_require__(1098); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ModalTitle", function() { return __WEBPACK_IMPORTED_MODULE_38__ModalTitle__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__Nav__ = __webpack_require__(1099); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Nav", function() { return __WEBPACK_IMPORTED_MODULE_39__Nav__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__Navbar__ = __webpack_require__(2264); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Navbar", function() { return __WEBPACK_IMPORTED_MODULE_40__Navbar__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__NavbarBrand__ = __webpack_require__(1100); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NavbarBrand", function() { return __WEBPACK_IMPORTED_MODULE_41__NavbarBrand__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__NavDropdown__ = __webpack_require__(2268); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NavDropdown", function() { return __WEBPACK_IMPORTED_MODULE_42__NavDropdown__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__NavItem__ = __webpack_require__(1101); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NavItem", function() { return __WEBPACK_IMPORTED_MODULE_43__NavItem__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__Overlay__ = __webpack_require__(1102); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Overlay", function() { return __WEBPACK_IMPORTED_MODULE_44__Overlay__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__OverlayTrigger__ = __webpack_require__(2274); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "OverlayTrigger", function() { return __WEBPACK_IMPORTED_MODULE_45__OverlayTrigger__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__PageHeader__ = __webpack_require__(2277); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "PageHeader", function() { return __WEBPACK_IMPORTED_MODULE_46__PageHeader__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__PageItem__ = __webpack_require__(2278); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "PageItem", function() { return __WEBPACK_IMPORTED_MODULE_47__PageItem__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__Pager__ = __webpack_require__(2280); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Pager", function() { return __WEBPACK_IMPORTED_MODULE_48__Pager__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__Pagination__ = __webpack_require__(2281); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Pagination", function() { return __WEBPACK_IMPORTED_MODULE_49__Pagination__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__Panel__ = __webpack_require__(2283); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Panel", function() { return __WEBPACK_IMPORTED_MODULE_50__Panel__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_51__PanelGroup__ = __webpack_require__(1069); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "PanelGroup", function() { return __WEBPACK_IMPORTED_MODULE_51__PanelGroup__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_52__Popover__ = __webpack_require__(2289); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Popover", function() { return __WEBPACK_IMPORTED_MODULE_52__Popover__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_53__ProgressBar__ = __webpack_require__(2290); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ProgressBar", function() { return __WEBPACK_IMPORTED_MODULE_53__ProgressBar__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_54__Radio__ = __webpack_require__(2291); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Radio", function() { return __WEBPACK_IMPORTED_MODULE_54__Radio__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_55__ResponsiveEmbed__ = __webpack_require__(2292); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ResponsiveEmbed", function() { return __WEBPACK_IMPORTED_MODULE_55__ResponsiveEmbed__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_56__Row__ = __webpack_require__(2293); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return __WEBPACK_IMPORTED_MODULE_56__Row__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_57__SafeAnchor__ = __webpack_require__(124); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SafeAnchor", function() { return __WEBPACK_IMPORTED_MODULE_57__SafeAnchor__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_58__SplitButton__ = __webpack_require__(2294); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SplitButton", function() { return __WEBPACK_IMPORTED_MODULE_58__SplitButton__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_59__Tab__ = __webpack_require__(2296); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Tab", function() { return __WEBPACK_IMPORTED_MODULE_59__Tab__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__TabContainer__ = __webpack_require__(669); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TabContainer", function() { return __WEBPACK_IMPORTED_MODULE_60__TabContainer__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_61__TabContent__ = __webpack_require__(670); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TabContent", function() { return __WEBPACK_IMPORTED_MODULE_61__TabContent__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_62__Table__ = __webpack_require__(2297); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Table", function() { return __WEBPACK_IMPORTED_MODULE_62__Table__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_63__TabPane__ = __webpack_require__(1108); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TabPane", function() { return __WEBPACK_IMPORTED_MODULE_63__TabPane__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_64__Tabs__ = __webpack_require__(2298); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Tabs", function() { return __WEBPACK_IMPORTED_MODULE_64__Tabs__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__Thumbnail__ = __webpack_require__(2299); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Thumbnail", function() { return __WEBPACK_IMPORTED_MODULE_65__Thumbnail__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_66__ToggleButton__ = __webpack_require__(1109); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ToggleButton", function() { return __WEBPACK_IMPORTED_MODULE_66__ToggleButton__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_67__ToggleButtonGroup__ = __webpack_require__(2300); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ToggleButtonGroup", function() { return __WEBPACK_IMPORTED_MODULE_67__ToggleButtonGroup__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_68__Tooltip__ = __webpack_require__(2301); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return __WEBPACK_IMPORTED_MODULE_68__Tooltip__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_69__Well__ = __webpack_require__(2302); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Well", function() { return __WEBPACK_IMPORTED_MODULE_69__Well__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_70__utils__ = __webpack_require__(2303); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "utils", function() { return __WEBPACK_IMPORTED_MODULE_70__utils__; }); /***/ }), /* 72 */ /***/ (function(module, exports) { var core = module.exports = { version: '2.6.11' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /* 73 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.I18N_DOMAIN_FORMS = void 0; // eslint-disable-next-line import/prefer-default-export var I18N_DOMAIN_FORMS = 'tui-forms'; exports.I18N_DOMAIN_FORMS = I18N_DOMAIN_FORMS; //# sourceMappingURL=constants.js.map /***/ }), /* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _default = { ERROR: 'REACT_CMF.ERROR', ERROR_REPORTED: 'REACT_CMF.ERROR_REPORTED', REGISTRY_EXPRESSION_PREFIX: 'expression', REGISTRY_COMPONENT_PREFIX: '_.route.component', REGISTRY_ACTION_CREATOR_PREFIX: 'actionCreator', SAGA_PREFIX: 'saga', DID_MOUNT_SAGA_START: 'DID_MOUNT_SAGA_START', WILL_UNMOUNT_SAGA_STOP: 'WILL_UNMOUNT_SAGA_STOP', IS_HANDLER: 'on', IS_HANDLER_DISPATCH: 'Dispatch', IS_HANDLER_ACTION_CREATOR: 'ActionCreator', IS_HANDLER_DISPATCH_REGEX: /^(on).*(Dispatch)$/, IS_HANDLER_ACTION_CREATOR_REGEX: /^(on).*(ActionCreator)$/, IS_HANDLER_SETSTATE: 'SetState', IS_HANDLER_SETSTATE_REGEX: /^(on).*(SetState)$/, COLLECTION_ADD_OR_REPLACE: 'REACT_CMF.COLLECTION_ADD_OR_REPLACE', COLLECTION_REMOVE: 'REACT_CMF.COLLECTION_REMOVE', COLLECTION_MUTATE: 'REACT_CMF.COLLECTION_MUTATE', COMPONENT_ADD_STATE: 'REACT_CMF.COMPONENT_ADD_STATE', COMPONENT_MERGE_STATE: 'REACT_CMF.COMPONENT_MERGE_STATE', COMPONENT_REMOVE_STATE: 'REACT_CMF.COMPONENT_REMOVE_STATE', REQUEST_SETTINGS: 'REACT_CMF.REQUEST_SETTINGS', REQUEST_KO: 'REACT_CMF.REQUEST_SETTINGS_KO', REQUEST_OK: 'REACT_CMF.REQUEST_SETTINGS_OK', CMF_PROPS: ['didMountActionCreator', // componentDidMount action creator id in registry 'keepComponentState', // redux state management on unmount 'view', // view component id in registry 'saga', 'willUnMountActionCreator', // componentWillUnmount action creator id in registry 'initialState', 'renderIf'], INJECTED_STATE_PROPS: ['setState', 'deleteState', 'updateState', 'state', 'initState'], INJECTED_ROUTER_PROPS: ['location', 'params', 'route', 'routeParams', 'router', 'routes'], INJECTED_PROPS: ['setState', 'deleteState', 'updateState', 'componentId', 'state', 'initState', 'dispatch', 'dispatchActionCreator'] }; exports["default"] = _default; //# sourceMappingURL=constant.js.map /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { exports.__esModule = true; exports.default = uncontrollable; var _react = _interopRequireDefault(__webpack_require__(0)); var _invariant = _interopRequireDefault(__webpack_require__(1072)); var Utils = _interopRequireWildcard(__webpack_require__(2194)); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } function uncontrollable(Component, controlledValues, methods) { if (methods === void 0) { methods = []; } var displayName = Component.displayName || Component.name || 'Component'; var isCompositeComponent = Utils.isReactComponent(Component); var controlledProps = Object.keys(controlledValues); var PROPS_TO_OMIT = controlledProps.map(Utils.defaultKey); !(isCompositeComponent || !methods.length) ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, '[uncontrollable] stateless function components cannot pass through methods ' + 'because they have no associated instances. Check component: ' + displayName + ', ' + 'attempting to pass through methods: ' + methods.join(', ')) : invariant(false) : void 0; var UncontrolledComponent = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(UncontrolledComponent, _React$Component); function UncontrolledComponent() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; _this.handlers = Object.create(null); controlledProps.forEach(function (propName) { var handlerName = controlledValues[propName]; var handleChange = function handleChange(value) { if (_this.props[handlerName]) { var _this$props; _this._notifying = true; for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } (_this$props = _this.props)[handlerName].apply(_this$props, [value].concat(args)); _this._notifying = false; } _this._values[propName] = value; if (!_this.unmounted) _this.forceUpdate(); }; _this.handlers[handlerName] = handleChange; }); if (isCompositeComponent) _this.attachRef = function (ref) { _this.inner = ref; }; return _this; } var _proto = UncontrolledComponent.prototype; _proto.shouldComponentUpdate = function shouldComponentUpdate() { //let the forceUpdate trigger the update return !this._notifying; }; _proto.componentWillMount = function componentWillMount() { var _this2 = this; var props = this.props; this._values = Object.create(null); controlledProps.forEach(function (key) { _this2._values[key] = props[Utils.defaultKey(key)]; }); }; _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var _this3 = this; var props = this.props; controlledProps.forEach(function (key) { /** * If a prop switches from controlled to Uncontrolled * reset its value to the defaultValue */ if (!Utils.isProp(nextProps, key) && Utils.isProp(props, key)) { _this3._values[key] = nextProps[Utils.defaultKey(key)]; } }); }; _proto.componentWillUnmount = function componentWillUnmount() { this.unmounted = true; }; _proto.getControlledInstance = function getControlledInstance() { return this.inner; }; _proto.render = function render() { var _this4 = this; var props = _extends({}, this.props); PROPS_TO_OMIT.forEach(function (prop) { delete props[prop]; }); var newProps = {}; controlledProps.forEach(function (propName) { var propValue = _this4.props[propName]; newProps[propName] = propValue !== undefined ? propValue : _this4._values[propName]; }); return _react.default.createElement(Component, _extends({}, props, newProps, this.handlers, { ref: this.attachRef })); }; return UncontrolledComponent; }(_react.default.Component); UncontrolledComponent.displayName = "Uncontrolled(" + displayName + ")"; UncontrolledComponent.propTypes = Utils.uncontrolledPropTypes(controlledValues, displayName); methods.forEach(function (method) { UncontrolledComponent.prototype[method] = function $proxiedMethod() { var _inner; return (_inner = this.inner)[method].apply(_inner, arguments); }; }); UncontrolledComponent.ControlledComponent = Component; /** * useful when wrapping a Component and you want to control * everything */ UncontrolledComponent.deferControlTo = function (newComponent, additions, nextMethods) { if (additions === void 0) { additions = {}; } return uncontrollable(newComponent, _extends({}, controlledValues, additions), nextMethods); }; return UncontrolledComponent; } module.exports = exports["default"]; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 76 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return Size; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SIZE_MAP; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEVICE_SIZES; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return State; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return Style; }); var Size = { LARGE: 'large', SMALL: 'small', XSMALL: 'xsmall' }; var SIZE_MAP = { large: 'lg', medium: 'md', small: 'sm', xsmall: 'xs', lg: 'lg', md: 'md', sm: 'sm', xs: 'xs' }; var DEVICE_SIZES = ['lg', 'md', 'sm', 'xs']; var State = { SUCCESS: 'success', WARNING: 'warning', DANGER: 'danger', INFO: 'info' }; var Style = { DEFAULT: 'default', PRIMARY: 'primary', LINK: 'link', INVERSE: 'inverse' }; /***/ }), /* 77 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Skeleton = _interopRequireDefault(__webpack_require__(1142)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Skeleton["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(2686), __esModule: true }; /***/ }), /* 79 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return Size; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SIZE_MAP; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEVICE_SIZES; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return State; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return Style; }); var Size = { LARGE: 'large', SMALL: 'small', XSMALL: 'xsmall' }; var SIZE_MAP = { large: 'lg', medium: 'md', small: 'sm', xsmall: 'xs', lg: 'lg', md: 'md', sm: 'sm', xs: 'xs' }; var DEVICE_SIZES = ['lg', 'md', 'sm', 'xs']; var State = { SUCCESS: 'success', WARNING: 'warning', DANGER: 'danger', INFO: 'info' }; var Style = { DEFAULT: 'default', PRIMARY: 'primary', LINK: 'link', INVERSE: 'inverse' }; /***/ }), /* 80 */ /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /* 81 */ /***/ (function(module, exports, __webpack_require__) { /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ (function (global, factory) { true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.Immutable = factory()); }(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice; function createClass(ctor, superClass) { if (superClass) { ctor.prototype = Object.create(superClass.prototype); } ctor.prototype.constructor = ctor; } function Iterable(value) { return isIterable(value) ? value : Seq(value); } createClass(KeyedIterable, Iterable); function KeyedIterable(value) { return isKeyed(value) ? value : KeyedSeq(value); } createClass(IndexedIterable, Iterable); function IndexedIterable(value) { return isIndexed(value) ? value : IndexedSeq(value); } createClass(SetIterable, Iterable); function SetIterable(value) { return isIterable(value) && !isAssociative(value) ? value : SetSeq(value); } function isIterable(maybeIterable) { return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]); } function isKeyed(maybeKeyed) { return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]); } function isIndexed(maybeIndexed) { return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]); } function isAssociative(maybeAssociative) { return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); } function isOrdered(maybeOrdered) { return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]); } Iterable.isIterable = isIterable; Iterable.isKeyed = isKeyed; Iterable.isIndexed = isIndexed; Iterable.isAssociative = isAssociative; Iterable.isOrdered = isOrdered; Iterable.Keyed = KeyedIterable; Iterable.Indexed = IndexedIterable; Iterable.Set = SetIterable; var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'; var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'; var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@'; var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; // Used for setting prototype methods that IE8 chokes on. var DELETE = 'delete'; // Constants describing the size of trie nodes. var SHIFT = 5; // Resulted in best performance after ______? var SIZE = 1 << SHIFT; var MASK = SIZE - 1; // A consistent shared value representing "not set" which equals nothing other // than itself, and nothing that could be provided externally. var NOT_SET = {}; // Boolean references, Rough equivalent of `bool &`. var CHANGE_LENGTH = { value: false }; var DID_ALTER = { value: false }; function MakeRef(ref) { ref.value = false; return ref; } function SetRef(ref) { ref && (ref.value = true); } // A function which returns a value representing an "owner" for transient writes // to tries. The return value will only ever equal itself, and will not equal // the return of any subsequent call of this function. function OwnerID() {} // http://jsperf.com/copy-array-inline function arrCopy(arr, offset) { offset = offset || 0; var len = Math.max(0, arr.length - offset); var newArr = new Array(len); for (var ii = 0; ii < len; ii++) { newArr[ii] = arr[ii + offset]; } return newArr; } function ensureSize(iter) { if (iter.size === undefined) { iter.size = iter.__iterate(returnTrue); } return iter.size; } function wrapIndex(iter, index) { // This implements "is array index" which the ECMAString spec defines as: // // A String property name P is an array index if and only if // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal // to 2^32−1. // // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects if (typeof index !== 'number') { var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32 if ('' + uint32Index !== index || uint32Index === 4294967295) { return NaN; } index = uint32Index; } return index < 0 ? ensureSize(iter) + index : index; } function returnTrue() { return true; } function wholeSlice(begin, end, size) { return (begin === 0 || (size !== undefined && begin <= -size)) && (end === undefined || (size !== undefined && end >= size)); } function resolveBegin(begin, size) { return resolveIndex(begin, size, 0); } function resolveEnd(end, size) { return resolveIndex(end, size, size); } function resolveIndex(index, size, defaultIndex) { return index === undefined ? defaultIndex : index < 0 ? Math.max(0, size + index) : size === undefined ? index : Math.min(size, index); } /* global Symbol */ var ITERATE_KEYS = 0; var ITERATE_VALUES = 1; var ITERATE_ENTRIES = 2; var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; function Iterator(next) { this.next = next; } Iterator.prototype.toString = function() { return '[Iterator]'; }; Iterator.KEYS = ITERATE_KEYS; Iterator.VALUES = ITERATE_VALUES; Iterator.ENTRIES = ITERATE_ENTRIES; Iterator.prototype.inspect = Iterator.prototype.toSource = function () { return this.toString(); } Iterator.prototype[ITERATOR_SYMBOL] = function () { return this; }; function iteratorValue(type, k, v, iteratorResult) { var value = type === 0 ? k : type === 1 ? v : [k, v]; iteratorResult ? (iteratorResult.value = value) : (iteratorResult = { value: value, done: false }); return iteratorResult; } function iteratorDone() { return { value: undefined, done: true }; } function hasIterator(maybeIterable) { return !!getIteratorFn(maybeIterable); } function isIterator(maybeIterator) { return maybeIterator && typeof maybeIterator.next === 'function'; } function getIterator(iterable) { var iteratorFn = getIteratorFn(iterable); return iteratorFn && iteratorFn.call(iterable); } function getIteratorFn(iterable) { var iteratorFn = iterable && ( (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || iterable[FAUX_ITERATOR_SYMBOL] ); if (typeof iteratorFn === 'function') { return iteratorFn; } } function isArrayLike(value) { return value && typeof value.length === 'number'; } createClass(Seq, Iterable); function Seq(value) { return value === null || value === undefined ? emptySequence() : isIterable(value) ? value.toSeq() : seqFromValue(value); } Seq.of = function(/*...values*/) { return Seq(arguments); }; Seq.prototype.toSeq = function() { return this; }; Seq.prototype.toString = function() { return this.__toString('Seq {', '}'); }; Seq.prototype.cacheResult = function() { if (!this._cache && this.__iterateUncached) { this._cache = this.entrySeq().toArray(); this.size = this._cache.length; } return this; }; // abstract __iterateUncached(fn, reverse) Seq.prototype.__iterate = function(fn, reverse) { return seqIterate(this, fn, reverse, true); }; // abstract __iteratorUncached(type, reverse) Seq.prototype.__iterator = function(type, reverse) { return seqIterator(this, type, reverse, true); }; createClass(KeyedSeq, Seq); function KeyedSeq(value) { return value === null || value === undefined ? emptySequence().toKeyedSeq() : isIterable(value) ? (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) : keyedSeqFromValue(value); } KeyedSeq.prototype.toKeyedSeq = function() { return this; }; createClass(IndexedSeq, Seq); function IndexedSeq(value) { return value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value.toIndexedSeq(); } IndexedSeq.of = function(/*...values*/) { return IndexedSeq(arguments); }; IndexedSeq.prototype.toIndexedSeq = function() { return this; }; IndexedSeq.prototype.toString = function() { return this.__toString('Seq [', ']'); }; IndexedSeq.prototype.__iterate = function(fn, reverse) { return seqIterate(this, fn, reverse, false); }; IndexedSeq.prototype.__iterator = function(type, reverse) { return seqIterator(this, type, reverse, false); }; createClass(SetSeq, Seq); function SetSeq(value) { return ( value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value ).toSetSeq(); } SetSeq.of = function(/*...values*/) { return SetSeq(arguments); }; SetSeq.prototype.toSetSeq = function() { return this; }; Seq.isSeq = isSeq; Seq.Keyed = KeyedSeq; Seq.Set = SetSeq; Seq.Indexed = IndexedSeq; var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@'; Seq.prototype[IS_SEQ_SENTINEL] = true; createClass(ArraySeq, IndexedSeq); function ArraySeq(array) { this._array = array; this.size = array.length; } ArraySeq.prototype.get = function(index, notSetValue) { return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; }; ArraySeq.prototype.__iterate = function(fn, reverse) { var array = this._array; var maxIndex = array.length - 1; for (var ii = 0; ii <= maxIndex; ii++) { if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) { return ii + 1; } } return ii; }; ArraySeq.prototype.__iterator = function(type, reverse) { var array = this._array; var maxIndex = array.length - 1; var ii = 0; return new Iterator(function() {return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])} ); }; createClass(ObjectSeq, KeyedSeq); function ObjectSeq(object) { var keys = Object.keys(object); this._object = object; this._keys = keys; this.size = keys.length; } ObjectSeq.prototype.get = function(key, notSetValue) { if (notSetValue !== undefined && !this.has(key)) { return notSetValue; } return this._object[key]; }; ObjectSeq.prototype.has = function(key) { return this._object.hasOwnProperty(key); }; ObjectSeq.prototype.__iterate = function(fn, reverse) { var object = this._object; var keys = this._keys; var maxIndex = keys.length - 1; for (var ii = 0; ii <= maxIndex; ii++) { var key = keys[reverse ? maxIndex - ii : ii]; if (fn(object[key], key, this) === false) { return ii + 1; } } return ii; }; ObjectSeq.prototype.__iterator = function(type, reverse) { var object = this._object; var keys = this._keys; var maxIndex = keys.length - 1; var ii = 0; return new Iterator(function() { var key = keys[reverse ? maxIndex - ii : ii]; return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]); }); }; ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true; createClass(IterableSeq, IndexedSeq); function IterableSeq(iterable) { this._iterable = iterable; this.size = iterable.length || iterable.size; } IterableSeq.prototype.__iterateUncached = function(fn, reverse) { if (reverse) { return this.cacheResult().__iterate(fn, reverse); } var iterable = this._iterable; var iterator = getIterator(iterable); var iterations = 0; if (isIterator(iterator)) { var step; while (!(step = iterator.next()).done) { if (fn(step.value, iterations++, this) === false) { break; } } } return iterations; }; IterableSeq.prototype.__iteratorUncached = function(type, reverse) { if (reverse) { return this.cacheResult().__iterator(type, reverse); } var iterable = this._iterable; var iterator = getIterator(iterable); if (!isIterator(iterator)) { return new Iterator(iteratorDone); } var iterations = 0; return new Iterator(function() { var step = iterator.next(); return step.done ? step : iteratorValue(type, iterations++, step.value); }); }; createClass(IteratorSeq, IndexedSeq); function IteratorSeq(iterator) { this._iterator = iterator; this._iteratorCache = []; } IteratorSeq.prototype.__iterateUncached = function(fn, reverse) { if (reverse) { return this.cacheResult().__iterate(fn, reverse); } var iterator = this._iterator; var cache = this._iteratorCache; var iterations = 0; while (iterations < cache.length) { if (fn(cache[iterations], iterations++, this) === false) { return iterations; } } var step; while (!(step = iterator.next()).done) { var val = step.value; cache[iterations] = val; if (fn(val, iterations++, this) === false) { break; } } return iterations; }; IteratorSeq.prototype.__iteratorUncached = function(type, reverse) { if (reverse) { return this.cacheResult().__iterator(type, reverse); } var iterator = this._iterator; var cache = this._iteratorCache; var iterations = 0; return new Iterator(function() { if (iterations >= cache.length) { var step = iterator.next(); if (step.done) { return step; } cache[iterations] = step.value; } return iteratorValue(type, iterations, cache[iterations++]); }); }; // # pragma Helper functions function isSeq(maybeSeq) { return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]); } var EMPTY_SEQ; function emptySequence() { return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); } function keyedSeqFromValue(value) { var seq = Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : typeof value === 'object' ? new ObjectSeq(value) : undefined; if (!seq) { throw new TypeError( 'Expected Array or iterable object of [k, v] entries, '+ 'or keyed object: ' + value ); } return seq; } function indexedSeqFromValue(value) { var seq = maybeIndexedSeqFromValue(value); if (!seq) { throw new TypeError( 'Expected Array or iterable object of values: ' + value ); } return seq; } function seqFromValue(value) { var seq = maybeIndexedSeqFromValue(value) || (typeof value === 'object' && new ObjectSeq(value)); if (!seq) { throw new TypeError( 'Expected Array or iterable object of values, or keyed object: ' + value ); } return seq; } function maybeIndexedSeqFromValue(value) { return ( isArrayLike(value) ? new ArraySeq(value) : isIterator(value) ? new IteratorSeq(value) : hasIterator(value) ? new IterableSeq(value) : undefined ); } function seqIterate(seq, fn, reverse, useKeys) { var cache = seq._cache; if (cache) { var maxIndex = cache.length - 1; for (var ii = 0; ii <= maxIndex; ii++) { var entry = cache[reverse ? maxIndex - ii : ii]; if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) { return ii + 1; } } return ii; } return seq.__iterateUncached(fn, reverse); } function seqIterator(seq, type, reverse, useKeys) { var cache = seq._cache; if (cache) { var maxIndex = cache.length - 1; var ii = 0; return new Iterator(function() { var entry = cache[reverse ? maxIndex - ii : ii]; return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]); }); } return seq.__iteratorUncached(type, reverse); } function fromJS(json, converter) { return converter ? fromJSWith(converter, json, '', {'': json}) : fromJSDefault(json); } function fromJSWith(converter, json, key, parentJSON) { if (Array.isArray(json)) { return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)})); } if (isPlainObj(json)) { return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)})); } return json; } function fromJSDefault(json) { if (Array.isArray(json)) { return IndexedSeq(json).map(fromJSDefault).toList(); } if (isPlainObj(json)) { return KeyedSeq(json).map(fromJSDefault).toMap(); } return json; } function isPlainObj(value) { return value && (value.constructor === Object || value.constructor === undefined); } /** * An extension of the "same-value" algorithm as [described for use by ES6 Map * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality) * * NaN is considered the same as NaN, however -0 and 0 are considered the same * value, which is different from the algorithm described by * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). * * This is extended further to allow Objects to describe the values they * represent, by way of `valueOf` or `equals` (and `hashCode`). * * Note: because of this extension, the key equality of Immutable.Map and the * value equality of Immutable.Set will differ from ES6 Map and Set. * * ### Defining custom values * * The easiest way to describe the value an object represents is by implementing * `valueOf`. For example, `Date` represents a value by returning a unix * timestamp for `valueOf`: * * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ... * var date2 = new Date(1234567890000); * date1.valueOf(); // 1234567890000 * assert( date1 !== date2 ); * assert( Immutable.is( date1, date2 ) ); * * Note: overriding `valueOf` may have other implications if you use this object * where JavaScript expects a primitive, such as implicit string coercion. * * For more complex types, especially collections, implementing `valueOf` may * not be performant. An alternative is to implement `equals` and `hashCode`. * * `equals` takes another object, presumably of similar type, and returns true * if the it is equal. Equality is symmetrical, so the same result should be * returned if this and the argument are flipped. * * assert( a.equals(b) === b.equals(a) ); * * `hashCode` returns a 32bit integer number representing the object which will * be used to determine how to store the value object in a Map or Set. You must * provide both or neither methods, one must not exist without the other. * * Also, an important relationship between these methods must be upheld: if two * values are equal, they *must* return the same hashCode. If the values are not * equal, they might have the same hashCode; this is called a hash collision, * and while undesirable for performance reasons, it is acceptable. * * if (a.equals(b)) { * assert( a.hashCode() === b.hashCode() ); * } * * All Immutable collections implement `equals` and `hashCode`. * */ function is(valueA, valueB) { if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { return true; } if (!valueA || !valueB) { return false; } if (typeof valueA.valueOf === 'function' && typeof valueB.valueOf === 'function') { valueA = valueA.valueOf(); valueB = valueB.valueOf(); if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { return true; } if (!valueA || !valueB) { return false; } } if (typeof valueA.equals === 'function' && typeof valueB.equals === 'function' && valueA.equals(valueB)) { return true; } return false; } function deepEqual(a, b) { if (a === b) { return true; } if ( !isIterable(b) || a.size !== undefined && b.size !== undefined && a.size !== b.size || a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash || isKeyed(a) !== isKeyed(b) || isIndexed(a) !== isIndexed(b) || isOrdered(a) !== isOrdered(b) ) { return false; } if (a.size === 0 && b.size === 0) { return true; } var notAssociative = !isAssociative(a); if (isOrdered(a)) { var entries = a.entries(); return b.every(function(v, k) { var entry = entries.next().value; return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); }) && entries.next().done; } var flipped = false; if (a.size === undefined) { if (b.size === undefined) { if (typeof a.cacheResult === 'function') { a.cacheResult(); } } else { flipped = true; var _ = a; a = b; b = _; } } var allEqual = true; var bSize = b.__iterate(function(v, k) { if (notAssociative ? !a.has(v) : flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) { allEqual = false; return false; } }); return allEqual && a.size === bSize; } createClass(Repeat, IndexedSeq); function Repeat(value, times) { if (!(this instanceof Repeat)) { return new Repeat(value, times); } this._value = value; this.size = times === undefined ? Infinity : Math.max(0, times); if (this.size === 0) { if (EMPTY_REPEAT) { return EMPTY_REPEAT; } EMPTY_REPEAT = this; } } Repeat.prototype.toString = function() { if (this.size === 0) { return 'Repeat []'; } return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]'; }; Repeat.prototype.get = function(index, notSetValue) { return this.has(index) ? this._value : notSetValue; }; Repeat.prototype.includes = function(searchValue) { return is(this._value, searchValue); }; Repeat.prototype.slice = function(begin, end) { var size = this.size; return wholeSlice(begin, end, size) ? this : new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size)); }; Repeat.prototype.reverse = function() { return this; }; Repeat.prototype.indexOf = function(searchValue) { if (is(this._value, searchValue)) { return 0; } return -1; }; Repeat.prototype.lastIndexOf = function(searchValue) { if (is(this._value, searchValue)) { return this.size; } return -1; }; Repeat.prototype.__iterate = function(fn, reverse) { for (var ii = 0; ii < this.size; ii++) { if (fn(this._value, ii, this) === false) { return ii + 1; } } return ii; }; Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this; var ii = 0; return new Iterator(function() {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()} ); }; Repeat.prototype.equals = function(other) { return other instanceof Repeat ? is(this._value, other._value) : deepEqual(other); }; var EMPTY_REPEAT; function invariant(condition, error) { if (!condition) throw new Error(error); } createClass(Range, IndexedSeq); function Range(start, end, step) { if (!(this instanceof Range)) { return new Range(start, end, step); } invariant(step !== 0, 'Cannot step a Range by 0'); start = start || 0; if (end === undefined) { end = Infinity; } step = step === undefined ? 1 : Math.abs(step); if (end < start) { step = -step; } this._start = start; this._end = end; this._step = step; this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1); if (this.size === 0) { if (EMPTY_RANGE) { return EMPTY_RANGE; } EMPTY_RANGE = this; } } Range.prototype.toString = function() { if (this.size === 0) { return 'Range []'; } return 'Range [ ' + this._start + '...' + this._end + (this._step !== 1 ? ' by ' + this._step : '') + ' ]'; }; Range.prototype.get = function(index, notSetValue) { return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue; }; Range.prototype.includes = function(searchValue) { var possibleIndex = (searchValue - this._start) / this._step; return possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex); }; Range.prototype.slice = function(begin, end) { if (wholeSlice(begin, end, this.size)) { return this; } begin = resolveBegin(begin, this.size); end = resolveEnd(end, this.size); if (end <= begin) { return new Range(0, 0); } return new Range(this.get(begin, this._end), this.get(end, this._end), this._step); }; Range.prototype.indexOf = function(searchValue) { var offsetValue = searchValue - this._start; if (offsetValue % this._step === 0) { var index = offsetValue / this._step; if (index >= 0 && index < this.size) { return index } } return -1; }; Range.prototype.lastIndexOf = function(searchValue) { return this.indexOf(searchValue); }; Range.prototype.__iterate = function(fn, reverse) { var maxIndex = this.size - 1; var step = this._step; var value = reverse ? this._start + maxIndex * step : this._start; for (var ii = 0; ii <= maxIndex; ii++) { if (fn(value, ii, this) === false) { return ii + 1; } value += reverse ? -step : step; } return ii; }; Range.prototype.__iterator = function(type, reverse) { var maxIndex = this.size - 1; var step = this._step; var value = reverse ? this._start + maxIndex * step : this._start; var ii = 0; return new Iterator(function() { var v = value; value += reverse ? -step : step; return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v); }); }; Range.prototype.equals = function(other) { return other instanceof Range ? this._start === other._start && this._end === other._end && this._step === other._step : deepEqual(this, other); }; var EMPTY_RANGE; createClass(Collection, Iterable); function Collection() { throw TypeError('Abstract'); } createClass(KeyedCollection, Collection);function KeyedCollection() {} createClass(IndexedCollection, Collection);function IndexedCollection() {} createClass(SetCollection, Collection);function SetCollection() {} Collection.Keyed = KeyedCollection; Collection.Indexed = IndexedCollection; Collection.Set = SetCollection; var imul = typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ? Math.imul : function imul(a, b) { a = a | 0; // int b = b | 0; // int var c = a & 0xffff; var d = b & 0xffff; // Shift by 0 fixes the sign on the high part. return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int }; // v8 has an optimization for storing 31-bit signed numbers. // Values which have either 00 or 11 as the high order bits qualify. // This function drops the highest order bit in a signed number, maintaining // the sign bit. function smi(i32) { return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF); } function hash(o) { if (o === false || o === null || o === undefined) { return 0; } if (typeof o.valueOf === 'function') { o = o.valueOf(); if (o === false || o === null || o === undefined) { return 0; } } if (o === true) { return 1; } var type = typeof o; if (type === 'number') { if (o !== o || o === Infinity) { return 0; } var h = o | 0; if (h !== o) { h ^= o * 0xFFFFFFFF; } while (o > 0xFFFFFFFF) { o /= 0xFFFFFFFF; h ^= o; } return smi(h); } if (type === 'string') { return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o); } if (typeof o.hashCode === 'function') { return o.hashCode(); } if (type === 'object') { return hashJSObj(o); } if (typeof o.toString === 'function') { return hashString(o.toString()); } throw new Error('Value type ' + type + ' cannot be hashed.'); } function cachedHashString(string) { var hash = stringHashCache[string]; if (hash === undefined) { hash = hashString(string); if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) { STRING_HASH_CACHE_SIZE = 0; stringHashCache = {}; } STRING_HASH_CACHE_SIZE++; stringHashCache[string] = hash; } return hash; } // http://jsperf.com/hashing-strings function hashString(string) { // This is the hash from JVM // The hash code for a string is computed as // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1], // where s[i] is the ith character of the string and n is the length of // the string. We "mod" the result to make it between 0 (inclusive) and 2^31 // (exclusive) by dropping high bits. var hash = 0; for (var ii = 0; ii < string.length; ii++) { hash = 31 * hash + string.charCodeAt(ii) | 0; } return smi(hash); } function hashJSObj(obj) { var hash; if (usingWeakMap) { hash = weakMap.get(obj); if (hash !== undefined) { return hash; } } hash = obj[UID_HASH_KEY]; if (hash !== undefined) { return hash; } if (!canDefineProperty) { hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY]; if (hash !== undefined) { return hash; } hash = getIENodeHash(obj); if (hash !== undefined) { return hash; } } hash = ++objHashUID; if (objHashUID & 0x40000000) { objHashUID = 0; } if (usingWeakMap) { weakMap.set(obj, hash); } else if (isExtensible !== undefined && isExtensible(obj) === false) { throw new Error('Non-extensible objects are not allowed as keys.'); } else if (canDefineProperty) { Object.defineProperty(obj, UID_HASH_KEY, { 'enumerable': false, 'configurable': false, 'writable': false, 'value': hash }); } else if (obj.propertyIsEnumerable !== undefined && obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) { // Since we can't define a non-enumerable property on the object // we'll hijack one of the less-used non-enumerable properties to // save our hash on it. Since this is a function it will not show up in // `JSON.stringify` which is what we want. obj.propertyIsEnumerable = function() { return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments); }; obj.propertyIsEnumerable[UID_HASH_KEY] = hash; } else if (obj.nodeType !== undefined) { // At this point we couldn't get the IE `uniqueID` to use as a hash // and we couldn't use a non-enumerable property to exploit the // dontEnum bug so we simply add the `UID_HASH_KEY` on the node // itself. obj[UID_HASH_KEY] = hash; } else { throw new Error('Unable to set a non-enumerable property on object.'); } return hash; } // Get references to ES5 object methods. var isExtensible = Object.isExtensible; // True if Object.defineProperty works as expected. IE8 fails this test. var canDefineProperty = (function() { try { Object.defineProperty({}, '@', {}); return true; } catch (e) { return false; } }()); // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it // and avoid memory leaks from the IE cloneNode bug. function getIENodeHash(node) { if (node && node.nodeType > 0) { switch (node.nodeType) { case 1: // Element return node.uniqueID; case 9: // Document return node.documentElement && node.documentElement.uniqueID; } } } // If possible, use a WeakMap. var usingWeakMap = typeof WeakMap === 'function'; var weakMap; if (usingWeakMap) { weakMap = new WeakMap(); } var objHashUID = 0; var UID_HASH_KEY = '__immutablehash__'; if (typeof Symbol === 'function') { UID_HASH_KEY = Symbol(UID_HASH_KEY); } var STRING_HASH_CACHE_MIN_STRLEN = 16; var STRING_HASH_CACHE_MAX_SIZE = 255; var STRING_HASH_CACHE_SIZE = 0; var stringHashCache = {}; function assertNotInfinite(size) { invariant( size !== Infinity, 'Cannot perform this action with an infinite size.' ); } createClass(Map, KeyedCollection); // @pragma Construction function Map(value) { return value === null || value === undefined ? emptyMap() : isMap(value) && !isOrdered(value) ? value : emptyMap().withMutations(function(map ) { var iter = KeyedIterable(value); assertNotInfinite(iter.size); iter.forEach(function(v, k) {return map.set(k, v)}); }); } Map.of = function() {var keyValues = SLICE$0.call(arguments, 0); return emptyMap().withMutations(function(map ) { for (var i = 0; i < keyValues.length; i += 2) { if (i + 1 >= keyValues.length) { throw new Error('Missing value for key: ' + keyValues[i]); } map.set(keyValues[i], keyValues[i + 1]); } }); }; Map.prototype.toString = function() { return this.__toString('Map {', '}'); }; // @pragma Access Map.prototype.get = function(k, notSetValue) { return this._root ? this._root.get(0, undefined, k, notSetValue) : notSetValue; }; // @pragma Modification Map.prototype.set = function(k, v) { return updateMap(this, k, v); }; Map.prototype.setIn = function(keyPath, v) { return this.updateIn(keyPath, NOT_SET, function() {return v}); }; Map.prototype.remove = function(k) { return updateMap(this, k, NOT_SET); }; Map.prototype.deleteIn = function(keyPath) { return this.updateIn(keyPath, function() {return NOT_SET}); }; Map.prototype.update = function(k, notSetValue, updater) { return arguments.length === 1 ? k(this) : this.updateIn([k], notSetValue, updater); }; Map.prototype.updateIn = function(keyPath, notSetValue, updater) { if (!updater) { updater = notSetValue; notSetValue = undefined; } var updatedValue = updateInDeepMap( this, forceIterator(keyPath), notSetValue, updater ); return updatedValue === NOT_SET ? undefined : updatedValue; }; Map.prototype.clear = function() { if (this.size === 0) { return this; } if (this.__ownerID) { this.size = 0; this._root = null; this.__hash = undefined; this.__altered = true; return this; } return emptyMap(); }; // @pragma Composition Map.prototype.merge = function(/*...iters*/) { return mergeIntoMapWith(this, undefined, arguments); }; Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1); return mergeIntoMapWith(this, merger, iters); }; Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1); return this.updateIn( keyPath, emptyMap(), function(m ) {return typeof m.merge === 'function' ? m.merge.apply(m, iters) : iters[iters.length - 1]} ); }; Map.prototype.mergeDeep = function(/*...iters*/) { return mergeIntoMapWith(this, deepMerger, arguments); }; Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1); return mergeIntoMapWith(this, deepMergerWith(merger), iters); }; Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1); return this.updateIn( keyPath, emptyMap(), function(m ) {return typeof m.mergeDeep === 'function' ? m.mergeDeep.apply(m, iters) : iters[iters.length - 1]} ); }; Map.prototype.sort = function(comparator) { // Late binding return OrderedMap(sortFactory(this, comparator)); }; Map.prototype.sortBy = function(mapper, comparator) { // Late binding return OrderedMap(sortFactory(this, comparator, mapper)); }; // @pragma Mutability Map.prototype.withMutations = function(fn) { var mutable = this.asMutable(); fn(mutable); return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; }; Map.prototype.asMutable = function() { return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); }; Map.prototype.asImmutable = function() { return this.__ensureOwner(); }; Map.prototype.wasAltered = function() { return this.__altered; }; Map.prototype.__iterator = function(type, reverse) { return new MapIterator(this, type, reverse); }; Map.prototype.__iterate = function(fn, reverse) {var this$0 = this; var iterations = 0; this._root && this._root.iterate(function(entry ) { iterations++; return fn(entry[1], entry[0], this$0); }, reverse); return iterations; }; Map.prototype.__ensureOwner = function(ownerID) { if (ownerID === this.__ownerID) { return this; } if (!ownerID) { this.__ownerID = ownerID; this.__altered = false; return this; } return makeMap(this.size, this._root, ownerID, this.__hash); }; function isMap(maybeMap) { return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]); } Map.isMap = isMap; var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@'; var MapPrototype = Map.prototype; MapPrototype[IS_MAP_SENTINEL] = true; MapPrototype[DELETE] = MapPrototype.remove; MapPrototype.removeIn = MapPrototype.deleteIn; // #pragma Trie Nodes function ArrayMapNode(ownerID, entries) { this.ownerID = ownerID; this.entries = entries; } ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) { var entries = this.entries; for (var ii = 0, len = entries.length; ii < len; ii++) { if (is(key, entries[ii][0])) { return entries[ii][1]; } } return notSetValue; }; ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { var removed = value === NOT_SET; var entries = this.entries; var idx = 0; for (var len = entries.length; idx < len; idx++) { if (is(key, entries[idx][0])) { break; } } var exists = idx < len; if (exists ? entries[idx][1] === value : removed) { return this; } SetRef(didAlter); (removed || !exists) && SetRef(didChangeSize); if (removed && entries.length === 1) { return; // undefined } if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) { return createNodes(ownerID, entries, key, value); } var isEditable = ownerID && ownerID === this.ownerID; var newEntries = isEditable ? entries : arrCopy(entries); if (exists) { if (removed) { idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop()); } else { newEntries[idx] = [key, value]; } } else { newEntries.push([key, value]); } if (isEditable) { this.entries = newEntries; return this; } return new ArrayMapNode(ownerID, newEntries); }; function BitmapIndexedNode(ownerID, bitmap, nodes) { this.ownerID = ownerID; this.bitmap = bitmap; this.nodes = nodes; } BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) { if (keyHash === undefined) { keyHash = hash(key); } var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK)); var bitmap = this.bitmap; return (bitmap & bit) === 0 ? notSetValue : this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue); }; BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { if (keyHash === undefined) { keyHash = hash(key); } var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; var bit = 1 << keyHashFrag; var bitmap = this.bitmap; var exists = (bitmap & bit) !== 0; if (!exists && value === NOT_SET) { return this; } var idx = popCount(bitmap & (bit - 1)); var nodes = this.nodes; var node = exists ? nodes[idx] : undefined; var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter); if (newNode === node) { return this; } if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); } if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) { return nodes[idx ^ 1]; } if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) { return newNode; } var isEditable = ownerID && ownerID === this.ownerID; var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit; var newNodes = exists ? newNode ? setIn(nodes, idx, newNode, isEditable) : spliceOut(nodes, idx, isEditable) : spliceIn(nodes, idx, newNode, isEditable); if (isEditable) { this.bitmap = newBitmap; this.nodes = newNodes; return this; } return new BitmapIndexedNode(ownerID, newBitmap, newNodes); }; function HashArrayMapNode(ownerID, count, nodes) { this.ownerID = ownerID; this.count = count; this.nodes = nodes; } HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) { if (keyHash === undefined) { keyHash = hash(key); } var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; var node = this.nodes[idx]; return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue; }; HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { if (keyHash === undefined) { keyHash = hash(key); } var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; var removed = value === NOT_SET; var nodes = this.nodes; var node = nodes[idx]; if (removed && !node) { return this; } var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter); if (newNode === node) { return this; } var newCount = this.count; if (!node) { newCount++; } else if (!newNode) { newCount--; if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { return packNodes(ownerID, nodes, newCount, idx); } } var isEditable = ownerID && ownerID === this.ownerID; var newNodes = setIn(nodes, idx, newNode, isEditable); if (isEditable) { this.count = newCount; this.nodes = newNodes; return this; } return new HashArrayMapNode(ownerID, newCount, newNodes); }; function HashCollisionNode(ownerID, keyHash, entries) { this.ownerID = ownerID; this.keyHash = keyHash; this.entries = entries; } HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) { var entries = this.entries; for (var ii = 0, len = entries.length; ii < len; ii++) { if (is(key, entries[ii][0])) { return entries[ii][1]; } } return notSetValue; }; HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { if (keyHash === undefined) { keyHash = hash(key); } var removed = value === NOT_SET; if (keyHash !== this.keyHash) { if (removed) { return this; } SetRef(didAlter); SetRef(didChangeSize); return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]); } var entries = this.entries; var idx = 0; for (var len = entries.length; idx < len; idx++) { if (is(key, entries[idx][0])) { break; } } var exists = idx < len; if (exists ? entries[idx][1] === value : removed) { return this; } SetRef(didAlter); (removed || !exists) && SetRef(didChangeSize); if (removed && len === 2) { return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]); } var isEditable = ownerID && ownerID === this.ownerID; var newEntries = isEditable ? entries : arrCopy(entries); if (exists) { if (removed) { idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop()); } else { newEntries[idx] = [key, value]; } } else { newEntries.push([key, value]); } if (isEditable) { this.entries = newEntries; return this; } return new HashCollisionNode(ownerID, this.keyHash, newEntries); }; function ValueNode(ownerID, keyHash, entry) { this.ownerID = ownerID; this.keyHash = keyHash; this.entry = entry; } ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) { return is(key, this.entry[0]) ? this.entry[1] : notSetValue; }; ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { var removed = value === NOT_SET; var keyMatch = is(key, this.entry[0]); if (keyMatch ? value === this.entry[1] : removed) { return this; } SetRef(didAlter); if (removed) { SetRef(didChangeSize); return; // undefined } if (keyMatch) { if (ownerID && ownerID === this.ownerID) { this.entry[1] = value; return this; } return new ValueNode(ownerID, this.keyHash, [key, value]); } SetRef(didChangeSize); return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]); }; // #pragma Iterators ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function (fn, reverse) { var entries = this.entries; for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) { if (fn(entries[reverse ? maxIndex - ii : ii]) === false) { return false; } } } BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function (fn, reverse) { var nodes = this.nodes; for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { var node = nodes[reverse ? maxIndex - ii : ii]; if (node && node.iterate(fn, reverse) === false) { return false; } } } ValueNode.prototype.iterate = function (fn, reverse) { return fn(this.entry); } createClass(MapIterator, Iterator); function MapIterator(map, type, reverse) { this._type = type; this._reverse = reverse; this._stack = map._root && mapIteratorFrame(map._root); } MapIterator.prototype.next = function() { var type = this._type; var stack = this._stack; while (stack) { var node = stack.node; var index = stack.index++; var maxIndex; if (node.entry) { if (index === 0) { return mapIteratorValue(type, node.entry); } } else if (node.entries) { maxIndex = node.entries.length - 1; if (index <= maxIndex) { return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]); } } else { maxIndex = node.nodes.length - 1; if (index <= maxIndex) { var subNode = node.nodes[this._reverse ? maxIndex - index : index]; if (subNode) { if (subNode.entry) { return mapIteratorValue(type, subNode.entry); } stack = this._stack = mapIteratorFrame(subNode, stack); } continue; } } stack = this._stack = this._stack.__prev; } return iteratorDone(); }; function mapIteratorValue(type, entry) { return iteratorValue(type, entry[0], entry[1]); } function mapIteratorFrame(node, prev) { return { node: node, index: 0, __prev: prev }; } function makeMap(size, root, ownerID, hash) { var map = Object.create(MapPrototype); map.size = size; map._root = root; map.__ownerID = ownerID; map.__hash = hash; map.__altered = false; return map; } var EMPTY_MAP; function emptyMap() { return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); } function updateMap(map, k, v) { var newRoot; var newSize; if (!map._root) { if (v === NOT_SET) { return map; } newSize = 1; newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]); } else { var didChangeSize = MakeRef(CHANGE_LENGTH); var didAlter = MakeRef(DID_ALTER); newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter); if (!didAlter.value) { return map; } newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0); } if (map.__ownerID) { map.size = newSize; map._root = newRoot; map.__hash = undefined; map.__altered = true; return map; } return newRoot ? makeMap(newSize, newRoot) : emptyMap(); } function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { if (!node) { if (value === NOT_SET) { return node; } SetRef(didAlter); SetRef(didChangeSize); return new ValueNode(ownerID, keyHash, [key, value]); } return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter); } function isLeafNode(node) { return node.constructor === ValueNode || node.constructor === HashCollisionNode; } function mergeIntoNode(node, ownerID, shift, keyHash, entry) { if (node.keyHash === keyHash) { return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]); } var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK; var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; var newNode; var nodes = idx1 === idx2 ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] : ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]); return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes); } function createNodes(ownerID, entries, key, value) { if (!ownerID) { ownerID = new OwnerID(); } var node = new ValueNode(ownerID, hash(key), [key, value]); for (var ii = 0; ii < entries.length; ii++) { var entry = entries[ii]; node = node.update(ownerID, 0, undefined, entry[0], entry[1]); } return node; } function packNodes(ownerID, nodes, count, excluding) { var bitmap = 0; var packedII = 0; var packedNodes = new Array(count); for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) { var node = nodes[ii]; if (node !== undefined && ii !== excluding) { bitmap |= bit; packedNodes[packedII++] = node; } } return new BitmapIndexedNode(ownerID, bitmap, packedNodes); } function expandNodes(ownerID, nodes, bitmap, including, node) { var count = 0; var expandedNodes = new Array(SIZE); for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; } expandedNodes[including] = node; return new HashArrayMapNode(ownerID, count + 1, expandedNodes); } function mergeIntoMapWith(map, merger, iterables) { var iters = []; for (var ii = 0; ii < iterables.length; ii++) { var value = iterables[ii]; var iter = KeyedIterable(value); if (!isIterable(value)) { iter = iter.map(function(v ) {return fromJS(v)}); } iters.push(iter); } return mergeIntoCollectionWith(map, merger, iters); } function deepMerger(existing, value, key) { return existing && existing.mergeDeep && isIterable(value) ? existing.mergeDeep(value) : is(existing, value) ? existing : value; } function deepMergerWith(merger) { return function(existing, value, key) { if (existing && existing.mergeDeepWith && isIterable(value)) { return existing.mergeDeepWith(merger, value); } var nextValue = merger(existing, value, key); return is(existing, nextValue) ? existing : nextValue; }; } function mergeIntoCollectionWith(collection, merger, iters) { iters = iters.filter(function(x ) {return x.size !== 0}); if (iters.length === 0) { return collection; } if (collection.size === 0 && !collection.__ownerID && iters.length === 1) { return collection.constructor(iters[0]); } return collection.withMutations(function(collection ) { var mergeIntoMap = merger ? function(value, key) { collection.update(key, NOT_SET, function(existing ) {return existing === NOT_SET ? value : merger(existing, value, key)} ); } : function(value, key) { collection.set(key, value); } for (var ii = 0; ii < iters.length; ii++) { iters[ii].forEach(mergeIntoMap); } }); } function updateInDeepMap(existing, keyPathIter, notSetValue, updater) { var isNotSet = existing === NOT_SET; var step = keyPathIter.next(); if (step.done) { var existingValue = isNotSet ? notSetValue : existing; var newValue = updater(existingValue); return newValue === existingValue ? existing : newValue; } invariant( isNotSet || (existing && existing.set), 'invalid keyPath' ); var key = step.value; var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET); var nextUpdated = updateInDeepMap( nextExisting, keyPathIter, notSetValue, updater ); return nextUpdated === nextExisting ? existing : nextUpdated === NOT_SET ? existing.remove(key) : (isNotSet ? emptyMap() : existing).set(key, nextUpdated); } function popCount(x) { x = x - ((x >> 1) & 0x55555555); x = (x & 0x33333333) + ((x >> 2) & 0x33333333); x = (x + (x >> 4)) & 0x0f0f0f0f; x = x + (x >> 8); x = x + (x >> 16); return x & 0x7f; } function setIn(array, idx, val, canEdit) { var newArray = canEdit ? array : arrCopy(array); newArray[idx] = val; return newArray; } function spliceIn(array, idx, val, canEdit) { var newLen = array.length + 1; if (canEdit && idx + 1 === newLen) { array[idx] = val; return array; } var newArray = new Array(newLen); var after = 0; for (var ii = 0; ii < newLen; ii++) { if (ii === idx) { newArray[ii] = val; after = -1; } else { newArray[ii] = array[ii + after]; } } return newArray; } function spliceOut(array, idx, canEdit) { var newLen = array.length - 1; if (canEdit && idx === newLen) { array.pop(); return array; } var newArray = new Array(newLen); var after = 0; for (var ii = 0; ii < newLen; ii++) { if (ii === idx) { after = 1; } newArray[ii] = array[ii + after]; } return newArray; } var MAX_ARRAY_MAP_SIZE = SIZE / 4; var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; createClass(List, IndexedCollection); // @pragma Construction function List(value) { var empty = emptyList(); if (value === null || value === undefined) { return empty; } if (isList(value)) { return value; } var iter = IndexedIterable(value); var size = iter.size; if (size === 0) { return empty; } assertNotInfinite(size); if (size > 0 && size < SIZE) { return makeList(0, size, SHIFT, null, new VNode(iter.toArray())); } return empty.withMutations(function(list ) { list.setSize(size); iter.forEach(function(v, i) {return list.set(i, v)}); }); } List.of = function(/*...values*/) { return this(arguments); }; List.prototype.toString = function() { return this.__toString('List [', ']'); }; // @pragma Access List.prototype.get = function(index, notSetValue) { index = wrapIndex(this, index); if (index >= 0 && index < this.size) { index += this._origin; var node = listNodeFor(this, index); return node && node.array[index & MASK]; } return notSetValue; }; // @pragma Modification List.prototype.set = function(index, value) { return updateList(this, index, value); }; List.prototype.remove = function(index) { return !this.has(index) ? this : index === 0 ? this.shift() : index === this.size - 1 ? this.pop() : this.splice(index, 1); }; List.prototype.insert = function(index, value) { return this.splice(index, 0, value); }; List.prototype.clear = function() { if (this.size === 0) { return this; } if (this.__ownerID) { this.size = this._origin = this._capacity = 0; this._level = SHIFT; this._root = this._tail = null; this.__hash = undefined; this.__altered = true; return this; } return emptyList(); }; List.prototype.push = function(/*...values*/) { var values = arguments; var oldSize = this.size; return this.withMutations(function(list ) { setListBounds(list, 0, oldSize + values.length); for (var ii = 0; ii < values.length; ii++) { list.set(oldSize + ii, values[ii]); } }); }; List.prototype.pop = function() { return setListBounds(this, 0, -1); }; List.prototype.unshift = function(/*...values*/) { var values = arguments; return this.withMutations(function(list ) { setListBounds(list, -values.length); for (var ii = 0; ii < values.length; ii++) { list.set(ii, values[ii]); } }); }; List.prototype.shift = function() { return setListBounds(this, 1); }; // @pragma Composition List.prototype.merge = function(/*...iters*/) { return mergeIntoListWith(this, undefined, arguments); }; List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1); return mergeIntoListWith(this, merger, iters); }; List.prototype.mergeDeep = function(/*...iters*/) { return mergeIntoListWith(this, deepMerger, arguments); }; List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1); return mergeIntoListWith(this, deepMergerWith(merger), iters); }; List.prototype.setSize = function(size) { return setListBounds(this, 0, size); }; // @pragma Iteration List.prototype.slice = function(begin, end) { var size = this.size; if (wholeSlice(begin, end, size)) { return this; } return setListBounds( this, resolveBegin(begin, size), resolveEnd(end, size) ); }; List.prototype.__iterator = function(type, reverse) { var index = 0; var values = iterateList(this, reverse); return new Iterator(function() { var value = values(); return value === DONE ? iteratorDone() : iteratorValue(type, index++, value); }); }; List.prototype.__iterate = function(fn, reverse) { var index = 0; var values = iterateList(this, reverse); var value; while ((value = values()) !== DONE) { if (fn(value, index++, this) === false) { break; } } return index; }; List.prototype.__ensureOwner = function(ownerID) { if (ownerID === this.__ownerID) { return this; } if (!ownerID) { this.__ownerID = ownerID; return this; } return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash); }; function isList(maybeList) { return !!(maybeList && maybeList[IS_LIST_SENTINEL]); } List.isList = isList; var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@'; var ListPrototype = List.prototype; ListPrototype[IS_LIST_SENTINEL] = true; ListPrototype[DELETE] = ListPrototype.remove; ListPrototype.setIn = MapPrototype.setIn; ListPrototype.deleteIn = ListPrototype.removeIn = MapPrototype.removeIn; ListPrototype.update = MapPrototype.update; ListPrototype.updateIn = MapPrototype.updateIn; ListPrototype.mergeIn = MapPrototype.mergeIn; ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn; ListPrototype.withMutations = MapPrototype.withMutations; ListPrototype.asMutable = MapPrototype.asMutable; ListPrototype.asImmutable = MapPrototype.asImmutable; ListPrototype.wasAltered = MapPrototype.wasAltered; function VNode(array, ownerID) { this.array = array; this.ownerID = ownerID; } // TODO: seems like these methods are very similar VNode.prototype.removeBefore = function(ownerID, level, index) { if (index === level ? 1 << level : 0 || this.array.length === 0) { return this; } var originIndex = (index >>> level) & MASK; if (originIndex >= this.array.length) { return new VNode([], ownerID); } var removingFirst = originIndex === 0; var newChild; if (level > 0) { var oldChild = this.array[originIndex]; newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index); if (newChild === oldChild && removingFirst) { return this; } } if (removingFirst && !newChild) { return this; } var editable = editableVNode(this, ownerID); if (!removingFirst) { for (var ii = 0; ii < originIndex; ii++) { editable.array[ii] = undefined; } } if (newChild) { editable.array[originIndex] = newChild; } return editable; }; VNode.prototype.removeAfter = function(ownerID, level, index) { if (index === (level ? 1 << level : 0) || this.array.length === 0) { return this; } var sizeIndex = ((index - 1) >>> level) & MASK; if (sizeIndex >= this.array.length) { return this; } var newChild; if (level > 0) { var oldChild = this.array[sizeIndex]; newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); if (newChild === oldChild && sizeIndex === this.array.length - 1) { return this; } } var editable = editableVNode(this, ownerID); editable.array.splice(sizeIndex + 1); if (newChild) { editable.array[sizeIndex] = newChild; } return editable; }; var DONE = {}; function iterateList(list, reverse) { var left = list._origin; var right = list._capacity; var tailPos = getTailOffset(right); var tail = list._tail; return iterateNodeOrLeaf(list._root, list._level, 0); function iterateNodeOrLeaf(node, level, offset) { return level === 0 ? iterateLeaf(node, offset) : iterateNode(node, level, offset); } function iterateLeaf(node, offset) { var array = offset === tailPos ? tail && tail.array : node && node.array; var from = offset > left ? 0 : left - offset; var to = right - offset; if (to > SIZE) { to = SIZE; } return function() { if (from === to) { return DONE; } var idx = reverse ? --to : from++; return array && array[idx]; }; } function iterateNode(node, level, offset) { var values; var array = node && node.array; var from = offset > left ? 0 : (left - offset) >> level; var to = ((right - offset) >> level) + 1; if (to > SIZE) { to = SIZE; } return function() { do { if (values) { var value = values(); if (value !== DONE) { return value; } values = null; } if (from === to) { return DONE; } var idx = reverse ? --to : from++; values = iterateNodeOrLeaf( array && array[idx], level - SHIFT, offset + (idx << level) ); } while (true); }; } } function makeList(origin, capacity, level, root, tail, ownerID, hash) { var list = Object.create(ListPrototype); list.size = capacity - origin; list._origin = origin; list._capacity = capacity; list._level = level; list._root = root; list._tail = tail; list.__ownerID = ownerID; list.__hash = hash; list.__altered = false; return list; } var EMPTY_LIST; function emptyList() { return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT)); } function updateList(list, index, value) { index = wrapIndex(list, index); if (index !== index) { return list; } if (index >= list.size || index < 0) { return list.withMutations(function(list ) { index < 0 ? setListBounds(list, index).set(0, value) : setListBounds(list, 0, index + 1).set(index, value) }); } index += list._origin; var newTail = list._tail; var newRoot = list._root; var didAlter = MakeRef(DID_ALTER); if (index >= getTailOffset(list._capacity)) { newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter); } else { newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter); } if (!didAlter.value) { return list; } if (list.__ownerID) { list._root = newRoot; list._tail = newTail; list.__hash = undefined; list.__altered = true; return list; } return makeList(list._origin, list._capacity, list._level, newRoot, newTail); } function updateVNode(node, ownerID, level, index, value, didAlter) { var idx = (index >>> level) & MASK; var nodeHas = node && idx < node.array.length; if (!nodeHas && value === undefined) { return node; } var newNode; if (level > 0) { var lowerNode = node && node.array[idx]; var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter); if (newLowerNode === lowerNode) { return node; } newNode = editableVNode(node, ownerID); newNode.array[idx] = newLowerNode; return newNode; } if (nodeHas && node.array[idx] === value) { return node; } SetRef(didAlter); newNode = editableVNode(node, ownerID); if (value === undefined && idx === newNode.array.length - 1) { newNode.array.pop(); } else { newNode.array[idx] = value; } return newNode; } function editableVNode(node, ownerID) { if (ownerID && node && ownerID === node.ownerID) { return node; } return new VNode(node ? node.array.slice() : [], ownerID); } function listNodeFor(list, rawIndex) { if (rawIndex >= getTailOffset(list._capacity)) { return list._tail; } if (rawIndex < 1 << (list._level + SHIFT)) { var node = list._root; var level = list._level; while (node && level > 0) { node = node.array[(rawIndex >>> level) & MASK]; level -= SHIFT; } return node; } } function setListBounds(list, begin, end) { // Sanitize begin & end using this shorthand for ToInt32(argument) // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 if (begin !== undefined) { begin = begin | 0; } if (end !== undefined) { end = end | 0; } var owner = list.__ownerID || new OwnerID(); var oldOrigin = list._origin; var oldCapacity = list._capacity; var newOrigin = oldOrigin + begin; var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end; if (newOrigin === oldOrigin && newCapacity === oldCapacity) { return list; } // If it's going to end after it starts, it's empty. if (newOrigin >= newCapacity) { return list.clear(); } var newLevel = list._level; var newRoot = list._root; // New origin might need creating a higher root. var offsetShift = 0; while (newOrigin + offsetShift < 0) { newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner); newLevel += SHIFT; offsetShift += 1 << newLevel; } if (offsetShift) { newOrigin += offsetShift; oldOrigin += offsetShift; newCapacity += offsetShift; oldCapacity += offsetShift; } var oldTailOffset = getTailOffset(oldCapacity); var newTailOffset = getTailOffset(newCapacity); // New size might need creating a higher root. while (newTailOffset >= 1 << (newLevel + SHIFT)) { newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner); newLevel += SHIFT; } // Locate or create the new tail. var oldTail = list._tail; var newTail = newTailOffset < oldTailOffset ? listNodeFor(list, newCapacity - 1) : newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail; // Merge Tail into tree. if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) { newRoot = editableVNode(newRoot, owner); var node = newRoot; for (var level = newLevel; level > SHIFT; level -= SHIFT) { var idx = (oldTailOffset >>> level) & MASK; node = node.array[idx] = editableVNode(node.array[idx], owner); } node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail; } // If the size has been reduced, there's a chance the tail needs to be trimmed. if (newCapacity < oldCapacity) { newTail = newTail && newTail.removeAfter(owner, 0, newCapacity); } // If the new origin is within the tail, then we do not need a root. if (newOrigin >= newTailOffset) { newOrigin -= newTailOffset; newCapacity -= newTailOffset; newLevel = SHIFT; newRoot = null; newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); // Otherwise, if the root has been trimmed, garbage collect. } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { offsetShift = 0; // Identify the new top root node of the subtree of the old root. while (newRoot) { var beginIndex = (newOrigin >>> newLevel) & MASK; if (beginIndex !== (newTailOffset >>> newLevel) & MASK) { break; } if (beginIndex) { offsetShift += (1 << newLevel) * beginIndex; } newLevel -= SHIFT; newRoot = newRoot.array[beginIndex]; } // Trim the new sides of the new root. if (newRoot && newOrigin > oldOrigin) { newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift); } if (newRoot && newTailOffset < oldTailOffset) { newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift); } if (offsetShift) { newOrigin -= offsetShift; newCapacity -= offsetShift; } } if (list.__ownerID) { list.size = newCapacity - newOrigin; list._origin = newOrigin; list._capacity = newCapacity; list._level = newLevel; list._root = newRoot; list._tail = newTail; list.__hash = undefined; list.__altered = true; return list; } return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); } function mergeIntoListWith(list, merger, iterables) { var iters = []; var maxSize = 0; for (var ii = 0; ii < iterables.length; ii++) { var value = iterables[ii]; var iter = IndexedIterable(value); if (iter.size > maxSize) { maxSize = iter.size; } if (!isIterable(value)) { iter = iter.map(function(v ) {return fromJS(v)}); } iters.push(iter); } if (maxSize > list.size) { list = list.setSize(maxSize); } return mergeIntoCollectionWith(list, merger, iters); } function getTailOffset(size) { return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT); } createClass(OrderedMap, Map); // @pragma Construction function OrderedMap(value) { return value === null || value === undefined ? emptyOrderedMap() : isOrderedMap(value) ? value : emptyOrderedMap().withMutations(function(map ) { var iter = KeyedIterable(value); assertNotInfinite(iter.size); iter.forEach(function(v, k) {return map.set(k, v)}); }); } OrderedMap.of = function(/*...values*/) { return this(arguments); }; OrderedMap.prototype.toString = function() { return this.__toString('OrderedMap {', '}'); }; // @pragma Access OrderedMap.prototype.get = function(k, notSetValue) { var index = this._map.get(k); return index !== undefined ? this._list.get(index)[1] : notSetValue; }; // @pragma Modification OrderedMap.prototype.clear = function() { if (this.size === 0) { return this; } if (this.__ownerID) { this.size = 0; this._map.clear(); this._list.clear(); return this; } return emptyOrderedMap(); }; OrderedMap.prototype.set = function(k, v) { return updateOrderedMap(this, k, v); }; OrderedMap.prototype.remove = function(k) { return updateOrderedMap(this, k, NOT_SET); }; OrderedMap.prototype.wasAltered = function() { return this._map.wasAltered() || this._list.wasAltered(); }; OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this; return this._list.__iterate( function(entry ) {return entry && fn(entry[1], entry[0], this$0)}, reverse ); }; OrderedMap.prototype.__iterator = function(type, reverse) { return this._list.fromEntrySeq().__iterator(type, reverse); }; OrderedMap.prototype.__ensureOwner = function(ownerID) { if (ownerID === this.__ownerID) { return this; } var newMap = this._map.__ensureOwner(ownerID); var newList = this._list.__ensureOwner(ownerID); if (!ownerID) { this.__ownerID = ownerID; this._map = newMap; this._list = newList; return this; } return makeOrderedMap(newMap, newList, ownerID, this.__hash); }; function isOrderedMap(maybeOrderedMap) { return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); } OrderedMap.isOrderedMap = isOrderedMap; OrderedMap.prototype[IS_ORDERED_SENTINEL] = true; OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; function makeOrderedMap(map, list, ownerID, hash) { var omap = Object.create(OrderedMap.prototype); omap.size = map ? map.size : 0; omap._map = map; omap._list = list; omap.__ownerID = ownerID; omap.__hash = hash; return omap; } var EMPTY_ORDERED_MAP; function emptyOrderedMap() { return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())); } function updateOrderedMap(omap, k, v) { var map = omap._map; var list = omap._list; var i = map.get(k); var has = i !== undefined; var newMap; var newList; if (v === NOT_SET) { // removed if (!has) { return omap; } if (list.size >= SIZE && list.size >= map.size * 2) { newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx}); newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap(); if (omap.__ownerID) { newMap.__ownerID = newList.__ownerID = omap.__ownerID; } } else { newMap = map.remove(k); newList = i === list.size - 1 ? list.pop() : list.set(i, undefined); } } else { if (has) { if (v === list.get(i)[1]) { return omap; } newMap = map; newList = list.set(i, [k, v]); } else { newMap = map.set(k, list.size); newList = list.set(list.size, [k, v]); } } if (omap.__ownerID) { omap.size = newMap.size; omap._map = newMap; omap._list = newList; omap.__hash = undefined; return omap; } return makeOrderedMap(newMap, newList); } createClass(ToKeyedSequence, KeyedSeq); function ToKeyedSequence(indexed, useKeys) { this._iter = indexed; this._useKeys = useKeys; this.size = indexed.size; } ToKeyedSequence.prototype.get = function(key, notSetValue) { return this._iter.get(key, notSetValue); }; ToKeyedSequence.prototype.has = function(key) { return this._iter.has(key); }; ToKeyedSequence.prototype.valueSeq = function() { return this._iter.valueSeq(); }; ToKeyedSequence.prototype.reverse = function() {var this$0 = this; var reversedSequence = reverseFactory(this, true); if (!this._useKeys) { reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()}; } return reversedSequence; }; ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this; var mappedSequence = mapFactory(this, mapper, context); if (!this._useKeys) { mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)}; } return mappedSequence; }; ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; var ii; return this._iter.__iterate( this._useKeys ? function(v, k) {return fn(v, k, this$0)} : ((ii = reverse ? resolveSize(this) : 0), function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}), reverse ); }; ToKeyedSequence.prototype.__iterator = function(type, reverse) { if (this._useKeys) { return this._iter.__iterator(type, reverse); } var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); var ii = reverse ? resolveSize(this) : 0; return new Iterator(function() { var step = iterator.next(); return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step); }); }; ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true; createClass(ToIndexedSequence, IndexedSeq); function ToIndexedSequence(iter) { this._iter = iter; this.size = iter.size; } ToIndexedSequence.prototype.includes = function(value) { return this._iter.includes(value); }; ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; var iterations = 0; return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse); }; ToIndexedSequence.prototype.__iterator = function(type, reverse) { var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); var iterations = 0; return new Iterator(function() { var step = iterator.next(); return step.done ? step : iteratorValue(type, iterations++, step.value, step) }); }; createClass(ToSetSequence, SetSeq); function ToSetSequence(iter) { this._iter = iter; this.size = iter.size; } ToSetSequence.prototype.has = function(key) { return this._iter.includes(key); }; ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse); }; ToSetSequence.prototype.__iterator = function(type, reverse) { var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); return new Iterator(function() { var step = iterator.next(); return step.done ? step : iteratorValue(type, step.value, step.value, step); }); }; createClass(FromEntriesSequence, KeyedSeq); function FromEntriesSequence(entries) { this._iter = entries; this.size = entries.size; } FromEntriesSequence.prototype.entrySeq = function() { return this._iter.toSeq(); }; FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; return this._iter.__iterate(function(entry ) { // Check if entry exists first so array access doesn't throw for holes // in the parent iteration. if (entry) { validateEntry(entry); var indexedIterable = isIterable(entry); return fn( indexedIterable ? entry.get(1) : entry[1], indexedIterable ? entry.get(0) : entry[0], this$0 ); } }, reverse); }; FromEntriesSequence.prototype.__iterator = function(type, reverse) { var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); return new Iterator(function() { while (true) { var step = iterator.next(); if (step.done) { return step; } var entry = step.value; // Check if entry exists first so array access doesn't throw for holes // in the parent iteration. if (entry) { validateEntry(entry); var indexedIterable = isIterable(entry); return iteratorValue( type, indexedIterable ? entry.get(0) : entry[0], indexedIterable ? entry.get(1) : entry[1], step ); } } }); }; ToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough; function flipFactory(iterable) { var flipSequence = makeSequence(iterable); flipSequence._iter = iterable; flipSequence.size = iterable.size; flipSequence.flip = function() {return iterable}; flipSequence.reverse = function () { var reversedSequence = iterable.reverse.apply(this); // super.reverse() reversedSequence.flip = function() {return iterable.reverse()}; return reversedSequence; }; flipSequence.has = function(key ) {return iterable.includes(key)}; flipSequence.includes = function(key ) {return iterable.has(key)}; flipSequence.cacheResult = cacheResultThrough; flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse); } flipSequence.__iteratorUncached = function(type, reverse) { if (type === ITERATE_ENTRIES) { var iterator = iterable.__iterator(type, reverse); return new Iterator(function() { var step = iterator.next(); if (!step.done) { var k = step.value[0]; step.value[0] = step.value[1]; step.value[1] = k; } return step; }); } return iterable.__iterator( type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse ); } return flipSequence; } function mapFactory(iterable, mapper, context) { var mappedSequence = makeSequence(iterable); mappedSequence.size = iterable.size; mappedSequence.has = function(key ) {return iterable.has(key)}; mappedSequence.get = function(key, notSetValue) { var v = iterable.get(key, NOT_SET); return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable); }; mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; return iterable.__iterate( function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false}, reverse ); } mappedSequence.__iteratorUncached = function (type, reverse) { var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); return new Iterator(function() { var step = iterator.next(); if (step.done) { return step; } var entry = step.value; var key = entry[0]; return iteratorValue( type, key, mapper.call(context, entry[1], key, iterable), step ); }); } return mappedSequence; } function reverseFactory(iterable, useKeys) { var reversedSequence = makeSequence(iterable); reversedSequence._iter = iterable; reversedSequence.size = iterable.size; reversedSequence.reverse = function() {return iterable}; if (iterable.flip) { reversedSequence.flip = function () { var flipSequence = flipFactory(iterable); flipSequence.reverse = function() {return iterable.flip()}; return flipSequence; }; } reversedSequence.get = function(key, notSetValue) {return iterable.get(useKeys ? key : -1 - key, notSetValue)}; reversedSequence.has = function(key ) {return iterable.has(useKeys ? key : -1 - key)}; reversedSequence.includes = function(value ) {return iterable.includes(value)}; reversedSequence.cacheResult = cacheResultThrough; reversedSequence.__iterate = function (fn, reverse) {var this$0 = this; return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse); }; reversedSequence.__iterator = function(type, reverse) {return iterable.__iterator(type, !reverse)}; return reversedSequence; } function filterFactory(iterable, predicate, context, useKeys) { var filterSequence = makeSequence(iterable); if (useKeys) { filterSequence.has = function(key ) { var v = iterable.get(key, NOT_SET); return v !== NOT_SET && !!predicate.call(context, v, key, iterable); }; filterSequence.get = function(key, notSetValue) { var v = iterable.get(key, NOT_SET); return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue; }; } filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; var iterations = 0; iterable.__iterate(function(v, k, c) { if (predicate.call(context, v, k, c)) { iterations++; return fn(v, useKeys ? k : iterations - 1, this$0); } }, reverse); return iterations; }; filterSequence.__iteratorUncached = function (type, reverse) { var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); var iterations = 0; return new Iterator(function() { while (true) { var step = iterator.next(); if (step.done) { return step; } var entry = step.value; var key = entry[0]; var value = entry[1]; if (predicate.call(context, value, key, iterable)) { return iteratorValue(type, useKeys ? key : iterations++, value, step); } } }); } return filterSequence; } function countByFactory(iterable, grouper, context) { var groups = Map().asMutable(); iterable.__iterate(function(v, k) { groups.update( grouper.call(context, v, k, iterable), 0, function(a ) {return a + 1} ); }); return groups.asImmutable(); } function groupByFactory(iterable, grouper, context) { var isKeyedIter = isKeyed(iterable); var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable(); iterable.__iterate(function(v, k) { groups.update( grouper.call(context, v, k, iterable), function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)} ); }); var coerce = iterableClass(iterable); return groups.map(function(arr ) {return reify(iterable, coerce(arr))}); } function sliceFactory(iterable, begin, end, useKeys) { var originalSize = iterable.size; // Sanitize begin & end using this shorthand for ToInt32(argument) // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 if (begin !== undefined) { begin = begin | 0; } if (end !== undefined) { if (end === Infinity) { end = originalSize; } else { end = end | 0; } } if (wholeSlice(begin, end, originalSize)) { return iterable; } var resolvedBegin = resolveBegin(begin, originalSize); var resolvedEnd = resolveEnd(end, originalSize); // begin or end will be NaN if they were provided as negative numbers and // this iterable's size is unknown. In that case, cache first so there is // a known size and these do not resolve to NaN. if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) { return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys); } // Note: resolvedEnd is undefined when the original sequence's length is // unknown and this slice did not supply an end and should contain all // elements after resolvedBegin. // In that case, resolvedSize will be NaN and sliceSize will remain undefined. var resolvedSize = resolvedEnd - resolvedBegin; var sliceSize; if (resolvedSize === resolvedSize) { sliceSize = resolvedSize < 0 ? 0 : resolvedSize; } var sliceSeq = makeSequence(iterable); // If iterable.size is undefined, the size of the realized sliceSeq is // unknown at this point unless the number of items to slice is 0 sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined; if (!useKeys && isSeq(iterable) && sliceSize >= 0) { sliceSeq.get = function (index, notSetValue) { index = wrapIndex(this, index); return index >= 0 && index < sliceSize ? iterable.get(index + resolvedBegin, notSetValue) : notSetValue; } } sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this; if (sliceSize === 0) { return 0; } if (reverse) { return this.cacheResult().__iterate(fn, reverse); } var skipped = 0; var isSkipping = true; var iterations = 0; iterable.__iterate(function(v, k) { if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) { iterations++; return fn(v, useKeys ? k : iterations - 1, this$0) !== false && iterations !== sliceSize; } }); return iterations; }; sliceSeq.__iteratorUncached = function(type, reverse) { if (sliceSize !== 0 && reverse) { return this.cacheResult().__iterator(type, reverse); } // Don't bother instantiating parent iterator if taking 0. var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse); var skipped = 0; var iterations = 0; return new Iterator(function() { while (skipped++ < resolvedBegin) { iterator.next(); } if (++iterations > sliceSize) { return iteratorDone(); } var step = iterator.next(); if (useKeys || type === ITERATE_VALUES) { return step; } else if (type === ITERATE_KEYS) { return iteratorValue(type, iterations - 1, undefined, step); } else { return iteratorValue(type, iterations - 1, step.value[1], step); } }); } return sliceSeq; } function takeWhileFactory(iterable, predicate, context) { var takeSequence = makeSequence(iterable); takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this; if (reverse) { return this.cacheResult().__iterate(fn, reverse); } var iterations = 0; iterable.__iterate(function(v, k, c) {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)} ); return iterations; }; takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this; if (reverse) { return this.cacheResult().__iterator(type, reverse); } var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); var iterating = true; return new Iterator(function() { if (!iterating) { return iteratorDone(); } var step = iterator.next(); if (step.done) { return step; } var entry = step.value; var k = entry[0]; var v = entry[1]; if (!predicate.call(context, v, k, this$0)) { iterating = false; return iteratorDone(); } return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); }); }; return takeSequence; } function skipWhileFactory(iterable, predicate, context, useKeys) { var skipSequence = makeSequence(iterable); skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; if (reverse) { return this.cacheResult().__iterate(fn, reverse); } var isSkipping = true; var iterations = 0; iterable.__iterate(function(v, k, c) { if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) { iterations++; return fn(v, useKeys ? k : iterations - 1, this$0); } }); return iterations; }; skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this; if (reverse) { return this.cacheResult().__iterator(type, reverse); } var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); var skipping = true; var iterations = 0; return new Iterator(function() { var step, k, v; do { step = iterator.next(); if (step.done) { if (useKeys || type === ITERATE_VALUES) { return step; } else if (type === ITERATE_KEYS) { return iteratorValue(type, iterations++, undefined, step); } else { return iteratorValue(type, iterations++, step.value[1], step); } } var entry = step.value; k = entry[0]; v = entry[1]; skipping && (skipping = predicate.call(context, v, k, this$0)); } while (skipping); return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); }); }; return skipSequence; } function concatFactory(iterable, values) { var isKeyedIterable = isKeyed(iterable); var iters = [iterable].concat(values).map(function(v ) { if (!isIterable(v)) { v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [v]); } else if (isKeyedIterable) { v = KeyedIterable(v); } return v; }).filter(function(v ) {return v.size !== 0}); if (iters.length === 0) { return iterable; } if (iters.length === 1) { var singleton = iters[0]; if (singleton === iterable || isKeyedIterable && isKeyed(singleton) || isIndexed(iterable) && isIndexed(singleton)) { return singleton; } } var concatSeq = new ArraySeq(iters); if (isKeyedIterable) { concatSeq = concatSeq.toKeyedSeq(); } else if (!isIndexed(iterable)) { concatSeq = concatSeq.toSetSeq(); } concatSeq = concatSeq.flatten(true); concatSeq.size = iters.reduce( function(sum, seq) { if (sum !== undefined) { var size = seq.size; if (size !== undefined) { return sum + size; } } }, 0 ); return concatSeq; } function flattenFactory(iterable, depth, useKeys) { var flatSequence = makeSequence(iterable); flatSequence.__iterateUncached = function(fn, reverse) { var iterations = 0; var stopped = false; function flatDeep(iter, currentDepth) {var this$0 = this; iter.__iterate(function(v, k) { if ((!depth || currentDepth < depth) && isIterable(v)) { flatDeep(v, currentDepth + 1); } else if (fn(v, useKeys ? k : iterations++, this$0) === false) { stopped = true; } return !stopped; }, reverse); } flatDeep(iterable, 0); return iterations; } flatSequence.__iteratorUncached = function(type, reverse) { var iterator = iterable.__iterator(type, reverse); var stack = []; var iterations = 0; return new Iterator(function() { while (iterator) { var step = iterator.next(); if (step.done !== false) { iterator = stack.pop(); continue; } var v = step.value; if (type === ITERATE_ENTRIES) { v = v[1]; } if ((!depth || stack.length < depth) && isIterable(v)) { stack.push(iterator); iterator = v.__iterator(type, reverse); } else { return useKeys ? step : iteratorValue(type, iterations++, v, step); } } return iteratorDone(); }); } return flatSequence; } function flatMapFactory(iterable, mapper, context) { var coerce = iterableClass(iterable); return iterable.toSeq().map( function(v, k) {return coerce(mapper.call(context, v, k, iterable))} ).flatten(true); } function interposeFactory(iterable, separator) { var interposedSequence = makeSequence(iterable); interposedSequence.size = iterable.size && iterable.size * 2 -1; interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this; var iterations = 0; iterable.__iterate(function(v, k) {return (!iterations || fn(separator, iterations++, this$0) !== false) && fn(v, iterations++, this$0) !== false}, reverse ); return iterations; }; interposedSequence.__iteratorUncached = function(type, reverse) { var iterator = iterable.__iterator(ITERATE_VALUES, reverse); var iterations = 0; var step; return new Iterator(function() { if (!step || iterations % 2) { step = iterator.next(); if (step.done) { return step; } } return iterations % 2 ? iteratorValue(type, iterations++, separator) : iteratorValue(type, iterations++, step.value, step); }); }; return interposedSequence; } function sortFactory(iterable, comparator, mapper) { if (!comparator) { comparator = defaultComparator; } var isKeyedIterable = isKeyed(iterable); var index = 0; var entries = iterable.toSeq().map( function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]} ).toArray(); entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach( isKeyedIterable ? function(v, i) { entries[i].length = 2; } : function(v, i) { entries[i] = v[1]; } ); return isKeyedIterable ? KeyedSeq(entries) : isIndexed(iterable) ? IndexedSeq(entries) : SetSeq(entries); } function maxFactory(iterable, comparator, mapper) { if (!comparator) { comparator = defaultComparator; } if (mapper) { var entry = iterable.toSeq() .map(function(v, k) {return [v, mapper(v, k, iterable)]}) .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a}); return entry && entry[0]; } else { return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a}); } } function maxCompare(comparator, a, b) { var comp = comparator(b, a); // b is considered the new max if the comparator declares them equal, but // they are not equal and b is in fact a nullish value. return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0; } function zipWithFactory(keyIter, zipper, iters) { var zipSequence = makeSequence(keyIter); zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min(); // Note: this a generic base implementation of __iterate in terms of // __iterator which may be more generically useful in the future. zipSequence.__iterate = function(fn, reverse) { /* generic: var iterator = this.__iterator(ITERATE_ENTRIES, reverse); var step; var iterations = 0; while (!(step = iterator.next()).done) { iterations++; if (fn(step.value[1], step.value[0], this) === false) { break; } } return iterations; */ // indexed: var iterator = this.__iterator(ITERATE_VALUES, reverse); var step; var iterations = 0; while (!(step = iterator.next()).done) { if (fn(step.value, iterations++, this) === false) { break; } } return iterations; }; zipSequence.__iteratorUncached = function(type, reverse) { var iterators = iters.map(function(i ) {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))} ); var iterations = 0; var isDone = false; return new Iterator(function() { var steps; if (!isDone) { steps = iterators.map(function(i ) {return i.next()}); isDone = steps.some(function(s ) {return s.done}); } if (isDone) { return iteratorDone(); } return iteratorValue( type, iterations++, zipper.apply(null, steps.map(function(s ) {return s.value})) ); }); }; return zipSequence } // #pragma Helper Functions function reify(iter, seq) { return isSeq(iter) ? seq : iter.constructor(seq); } function validateEntry(entry) { if (entry !== Object(entry)) { throw new TypeError('Expected [K, V] tuple: ' + entry); } } function resolveSize(iter) { assertNotInfinite(iter.size); return ensureSize(iter); } function iterableClass(iterable) { return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable; } function makeSequence(iterable) { return Object.create( ( isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq ).prototype ); } function cacheResultThrough() { if (this._iter.cacheResult) { this._iter.cacheResult(); this.size = this._iter.size; return this; } else { return Seq.prototype.cacheResult.call(this); } } function defaultComparator(a, b) { return a > b ? 1 : a < b ? -1 : 0; } function forceIterator(keyPath) { var iter = getIterator(keyPath); if (!iter) { // Array might not be iterable in this environment, so we need a fallback // to our wrapped type. if (!isArrayLike(keyPath)) { throw new TypeError('Expected iterable or array-like: ' + keyPath); } iter = getIterator(Iterable(keyPath)); } return iter; } createClass(Record, KeyedCollection); function Record(defaultValues, name) { var hasInitialized; var RecordType = function Record(values) { if (values instanceof RecordType) { return values; } if (!(this instanceof RecordType)) { return new RecordType(values); } if (!hasInitialized) { hasInitialized = true; var keys = Object.keys(defaultValues); setProps(RecordTypePrototype, keys); RecordTypePrototype.size = keys.length; RecordTypePrototype._name = name; RecordTypePrototype._keys = keys; RecordTypePrototype._defaultValues = defaultValues; } this._map = Map(values); }; var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype); RecordTypePrototype.constructor = RecordType; return RecordType; } Record.prototype.toString = function() { return this.__toString(recordName(this) + ' {', '}'); }; // @pragma Access Record.prototype.has = function(k) { return this._defaultValues.hasOwnProperty(k); }; Record.prototype.get = function(k, notSetValue) { if (!this.has(k)) { return notSetValue; } var defaultVal = this._defaultValues[k]; return this._map ? this._map.get(k, defaultVal) : defaultVal; }; // @pragma Modification Record.prototype.clear = function() { if (this.__ownerID) { this._map && this._map.clear(); return this; } var RecordType = this.constructor; return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap())); }; Record.prototype.set = function(k, v) { if (!this.has(k)) { throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this)); } if (this._map && !this._map.has(k)) { var defaultVal = this._defaultValues[k]; if (v === defaultVal) { return this; } } var newMap = this._map && this._map.set(k, v); if (this.__ownerID || newMap === this._map) { return this; } return makeRecord(this, newMap); }; Record.prototype.remove = function(k) { if (!this.has(k)) { return this; } var newMap = this._map && this._map.remove(k); if (this.__ownerID || newMap === this._map) { return this; } return makeRecord(this, newMap); }; Record.prototype.wasAltered = function() { return this._map.wasAltered(); }; Record.prototype.__iterator = function(type, reverse) {var this$0 = this; return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse); }; Record.prototype.__iterate = function(fn, reverse) {var this$0 = this; return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse); }; Record.prototype.__ensureOwner = function(ownerID) { if (ownerID === this.__ownerID) { return this; } var newMap = this._map && this._map.__ensureOwner(ownerID); if (!ownerID) { this.__ownerID = ownerID; this._map = newMap; return this; } return makeRecord(this, newMap, ownerID); }; var RecordPrototype = Record.prototype; RecordPrototype[DELETE] = RecordPrototype.remove; RecordPrototype.deleteIn = RecordPrototype.removeIn = MapPrototype.removeIn; RecordPrototype.merge = MapPrototype.merge; RecordPrototype.mergeWith = MapPrototype.mergeWith; RecordPrototype.mergeIn = MapPrototype.mergeIn; RecordPrototype.mergeDeep = MapPrototype.mergeDeep; RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith; RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn; RecordPrototype.setIn = MapPrototype.setIn; RecordPrototype.update = MapPrototype.update; RecordPrototype.updateIn = MapPrototype.updateIn; RecordPrototype.withMutations = MapPrototype.withMutations; RecordPrototype.asMutable = MapPrototype.asMutable; RecordPrototype.asImmutable = MapPrototype.asImmutable; function makeRecord(likeRecord, map, ownerID) { var record = Object.create(Object.getPrototypeOf(likeRecord)); record._map = map; record.__ownerID = ownerID; return record; } function recordName(record) { return record._name || record.constructor.name || 'Record'; } function setProps(prototype, names) { try { names.forEach(setProp.bind(undefined, prototype)); } catch (error) { // Object.defineProperty failed. Probably IE8. } } function setProp(prototype, name) { Object.defineProperty(prototype, name, { get: function() { return this.get(name); }, set: function(value) { invariant(this.__ownerID, 'Cannot set on an immutable record.'); this.set(name, value); } }); } createClass(Set, SetCollection); // @pragma Construction function Set(value) { return value === null || value === undefined ? emptySet() : isSet(value) && !isOrdered(value) ? value : emptySet().withMutations(function(set ) { var iter = SetIterable(value); assertNotInfinite(iter.size); iter.forEach(function(v ) {return set.add(v)}); }); } Set.of = function(/*...values*/) { return this(arguments); }; Set.fromKeys = function(value) { return this(KeyedIterable(value).keySeq()); }; Set.prototype.toString = function() { return this.__toString('Set {', '}'); }; // @pragma Access Set.prototype.has = function(value) { return this._map.has(value); }; // @pragma Modification Set.prototype.add = function(value) { return updateSet(this, this._map.set(value, true)); }; Set.prototype.remove = function(value) { return updateSet(this, this._map.remove(value)); }; Set.prototype.clear = function() { return updateSet(this, this._map.clear()); }; // @pragma Composition Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0); iters = iters.filter(function(x ) {return x.size !== 0}); if (iters.length === 0) { return this; } if (this.size === 0 && !this.__ownerID && iters.length === 1) { return this.constructor(iters[0]); } return this.withMutations(function(set ) { for (var ii = 0; ii < iters.length; ii++) { SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)}); } }); }; Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0); if (iters.length === 0) { return this; } iters = iters.map(function(iter ) {return SetIterable(iter)}); var originalSet = this; return this.withMutations(function(set ) { originalSet.forEach(function(value ) { if (!iters.every(function(iter ) {return iter.includes(value)})) { set.remove(value); } }); }); }; Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0); if (iters.length === 0) { return this; } iters = iters.map(function(iter ) {return SetIterable(iter)}); var originalSet = this; return this.withMutations(function(set ) { originalSet.forEach(function(value ) { if (iters.some(function(iter ) {return iter.includes(value)})) { set.remove(value); } }); }); }; Set.prototype.merge = function() { return this.union.apply(this, arguments); }; Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1); return this.union.apply(this, iters); }; Set.prototype.sort = function(comparator) { // Late binding return OrderedSet(sortFactory(this, comparator)); }; Set.prototype.sortBy = function(mapper, comparator) { // Late binding return OrderedSet(sortFactory(this, comparator, mapper)); }; Set.prototype.wasAltered = function() { return this._map.wasAltered(); }; Set.prototype.__iterate = function(fn, reverse) {var this$0 = this; return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse); }; Set.prototype.__iterator = function(type, reverse) { return this._map.map(function(_, k) {return k}).__iterator(type, reverse); }; Set.prototype.__ensureOwner = function(ownerID) { if (ownerID === this.__ownerID) { return this; } var newMap = this._map.__ensureOwner(ownerID); if (!ownerID) { this.__ownerID = ownerID; this._map = newMap; return this; } return this.__make(newMap, ownerID); }; function isSet(maybeSet) { return !!(maybeSet && maybeSet[IS_SET_SENTINEL]); } Set.isSet = isSet; var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@'; var SetPrototype = Set.prototype; SetPrototype[IS_SET_SENTINEL] = true; SetPrototype[DELETE] = SetPrototype.remove; SetPrototype.mergeDeep = SetPrototype.merge; SetPrototype.mergeDeepWith = SetPrototype.mergeWith; SetPrototype.withMutations = MapPrototype.withMutations; SetPrototype.asMutable = MapPrototype.asMutable; SetPrototype.asImmutable = MapPrototype.asImmutable; SetPrototype.__empty = emptySet; SetPrototype.__make = makeSet; function updateSet(set, newMap) { if (set.__ownerID) { set.size = newMap.size; set._map = newMap; return set; } return newMap === set._map ? set : newMap.size === 0 ? set.__empty() : set.__make(newMap); } function makeSet(map, ownerID) { var set = Object.create(SetPrototype); set.size = map ? map.size : 0; set._map = map; set.__ownerID = ownerID; return set; } var EMPTY_SET; function emptySet() { return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); } createClass(OrderedSet, Set); // @pragma Construction function OrderedSet(value) { return value === null || value === undefined ? emptyOrderedSet() : isOrderedSet(value) ? value : emptyOrderedSet().withMutations(function(set ) { var iter = SetIterable(value); assertNotInfinite(iter.size); iter.forEach(function(v ) {return set.add(v)}); }); } OrderedSet.of = function(/*...values*/) { return this(arguments); }; OrderedSet.fromKeys = function(value) { return this(KeyedIterable(value).keySeq()); }; OrderedSet.prototype.toString = function() { return this.__toString('OrderedSet {', '}'); }; function isOrderedSet(maybeOrderedSet) { return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); } OrderedSet.isOrderedSet = isOrderedSet; var OrderedSetPrototype = OrderedSet.prototype; OrderedSetPrototype[IS_ORDERED_SENTINEL] = true; OrderedSetPrototype.__empty = emptyOrderedSet; OrderedSetPrototype.__make = makeOrderedSet; function makeOrderedSet(map, ownerID) { var set = Object.create(OrderedSetPrototype); set.size = map ? map.size : 0; set._map = map; set.__ownerID = ownerID; return set; } var EMPTY_ORDERED_SET; function emptyOrderedSet() { return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())); } createClass(Stack, IndexedCollection); // @pragma Construction function Stack(value) { return value === null || value === undefined ? emptyStack() : isStack(value) ? value : emptyStack().unshiftAll(value); } Stack.of = function(/*...values*/) { return this(arguments); }; Stack.prototype.toString = function() { return this.__toString('Stack [', ']'); }; // @pragma Access Stack.prototype.get = function(index, notSetValue) { var head = this._head; index = wrapIndex(this, index); while (head && index--) { head = head.next; } return head ? head.value : notSetValue; }; Stack.prototype.peek = function() { return this._head && this._head.value; }; // @pragma Modification Stack.prototype.push = function(/*...values*/) { if (arguments.length === 0) { return this; } var newSize = this.size + arguments.length; var head = this._head; for (var ii = arguments.length - 1; ii >= 0; ii--) { head = { value: arguments[ii], next: head }; } if (this.__ownerID) { this.size = newSize; this._head = head; this.__hash = undefined; this.__altered = true; return this; } return makeStack(newSize, head); }; Stack.prototype.pushAll = function(iter) { iter = IndexedIterable(iter); if (iter.size === 0) { return this; } assertNotInfinite(iter.size); var newSize = this.size; var head = this._head; iter.reverse().forEach(function(value ) { newSize++; head = { value: value, next: head }; }); if (this.__ownerID) { this.size = newSize; this._head = head; this.__hash = undefined; this.__altered = true; return this; } return makeStack(newSize, head); }; Stack.prototype.pop = function() { return this.slice(1); }; Stack.prototype.unshift = function(/*...values*/) { return this.push.apply(this, arguments); }; Stack.prototype.unshiftAll = function(iter) { return this.pushAll(iter); }; Stack.prototype.shift = function() { return this.pop.apply(this, arguments); }; Stack.prototype.clear = function() { if (this.size === 0) { return this; } if (this.__ownerID) { this.size = 0; this._head = undefined; this.__hash = undefined; this.__altered = true; return this; } return emptyStack(); }; Stack.prototype.slice = function(begin, end) { if (wholeSlice(begin, end, this.size)) { return this; } var resolvedBegin = resolveBegin(begin, this.size); var resolvedEnd = resolveEnd(end, this.size); if (resolvedEnd !== this.size) { // super.slice(begin, end); return IndexedCollection.prototype.slice.call(this, begin, end); } var newSize = this.size - resolvedBegin; var head = this._head; while (resolvedBegin--) { head = head.next; } if (this.__ownerID) { this.size = newSize; this._head = head; this.__hash = undefined; this.__altered = true; return this; } return makeStack(newSize, head); }; // @pragma Mutability Stack.prototype.__ensureOwner = function(ownerID) { if (ownerID === this.__ownerID) { return this; } if (!ownerID) { this.__ownerID = ownerID; this.__altered = false; return this; } return makeStack(this.size, this._head, ownerID, this.__hash); }; // @pragma Iteration Stack.prototype.__iterate = function(fn, reverse) { if (reverse) { return this.reverse().__iterate(fn); } var iterations = 0; var node = this._head; while (node) { if (fn(node.value, iterations++, this) === false) { break; } node = node.next; } return iterations; }; Stack.prototype.__iterator = function(type, reverse) { if (reverse) { return this.reverse().__iterator(type); } var iterations = 0; var node = this._head; return new Iterator(function() { if (node) { var value = node.value; node = node.next; return iteratorValue(type, iterations++, value); } return iteratorDone(); }); }; function isStack(maybeStack) { return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]); } Stack.isStack = isStack; var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@'; var StackPrototype = Stack.prototype; StackPrototype[IS_STACK_SENTINEL] = true; StackPrototype.withMutations = MapPrototype.withMutations; StackPrototype.asMutable = MapPrototype.asMutable; StackPrototype.asImmutable = MapPrototype.asImmutable; StackPrototype.wasAltered = MapPrototype.wasAltered; function makeStack(size, head, ownerID, hash) { var map = Object.create(StackPrototype); map.size = size; map._head = head; map.__ownerID = ownerID; map.__hash = hash; map.__altered = false; return map; } var EMPTY_STACK; function emptyStack() { return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); } /** * Contributes additional methods to a constructor */ function mixin(ctor, methods) { var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; }; Object.keys(methods).forEach(keyCopier); Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier); return ctor; } Iterable.Iterator = Iterator; mixin(Iterable, { // ### Conversion to other types toArray: function() { assertNotInfinite(this.size); var array = new Array(this.size || 0); this.valueSeq().__iterate(function(v, i) { array[i] = v; }); return array; }, toIndexedSeq: function() { return new ToIndexedSequence(this); }, toJS: function() { return this.toSeq().map( function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value} ).__toJS(); }, toJSON: function() { return this.toSeq().map( function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value} ).__toJS(); }, toKeyedSeq: function() { return new ToKeyedSequence(this, true); }, toMap: function() { // Use Late Binding here to solve the circular dependency. return Map(this.toKeyedSeq()); }, toObject: function() { assertNotInfinite(this.size); var object = {}; this.__iterate(function(v, k) { object[k] = v; }); return object; }, toOrderedMap: function() { // Use Late Binding here to solve the circular dependency. return OrderedMap(this.toKeyedSeq()); }, toOrderedSet: function() { // Use Late Binding here to solve the circular dependency. return OrderedSet(isKeyed(this) ? this.valueSeq() : this); }, toSet: function() { // Use Late Binding here to solve the circular dependency. return Set(isKeyed(this) ? this.valueSeq() : this); }, toSetSeq: function() { return new ToSetSequence(this); }, toSeq: function() { return isIndexed(this) ? this.toIndexedSeq() : isKeyed(this) ? this.toKeyedSeq() : this.toSetSeq(); }, toStack: function() { // Use Late Binding here to solve the circular dependency. return Stack(isKeyed(this) ? this.valueSeq() : this); }, toList: function() { // Use Late Binding here to solve the circular dependency. return List(isKeyed(this) ? this.valueSeq() : this); }, // ### Common JavaScript methods and properties toString: function() { return '[Iterable]'; }, __toString: function(head, tail) { if (this.size === 0) { return head + tail; } return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail; }, // ### ES6 Collection methods (ES6 Array and Map) concat: function() {var values = SLICE$0.call(arguments, 0); return reify(this, concatFactory(this, values)); }, includes: function(searchValue) { return this.some(function(value ) {return is(value, searchValue)}); }, entries: function() { return this.__iterator(ITERATE_ENTRIES); }, every: function(predicate, context) { assertNotInfinite(this.size); var returnValue = true; this.__iterate(function(v, k, c) { if (!predicate.call(context, v, k, c)) { returnValue = false; return false; } }); return returnValue; }, filter: function(predicate, context) { return reify(this, filterFactory(this, predicate, context, true)); }, find: function(predicate, context, notSetValue) { var entry = this.findEntry(predicate, context); return entry ? entry[1] : notSetValue; }, forEach: function(sideEffect, context) { assertNotInfinite(this.size); return this.__iterate(context ? sideEffect.bind(context) : sideEffect); }, join: function(separator) { assertNotInfinite(this.size); separator = separator !== undefined ? '' + separator : ','; var joined = ''; var isFirst = true; this.__iterate(function(v ) { isFirst ? (isFirst = false) : (joined += separator); joined += v !== null && v !== undefined ? v.toString() : ''; }); return joined; }, keys: function() { return this.__iterator(ITERATE_KEYS); }, map: function(mapper, context) { return reify(this, mapFactory(this, mapper, context)); }, reduce: function(reducer, initialReduction, context) { assertNotInfinite(this.size); var reduction; var useFirst; if (arguments.length < 2) { useFirst = true; } else { reduction = initialReduction; } this.__iterate(function(v, k, c) { if (useFirst) { useFirst = false; reduction = v; } else { reduction = reducer.call(context, reduction, v, k, c); } }); return reduction; }, reduceRight: function(reducer, initialReduction, context) { var reversed = this.toKeyedSeq().reverse(); return reversed.reduce.apply(reversed, arguments); }, reverse: function() { return reify(this, reverseFactory(this, true)); }, slice: function(begin, end) { return reify(this, sliceFactory(this, begin, end, true)); }, some: function(predicate, context) { return !this.every(not(predicate), context); }, sort: function(comparator) { return reify(this, sortFactory(this, comparator)); }, values: function() { return this.__iterator(ITERATE_VALUES); }, // ### More sequential methods butLast: function() { return this.slice(0, -1); }, isEmpty: function() { return this.size !== undefined ? this.size === 0 : !this.some(function() {return true}); }, count: function(predicate, context) { return ensureSize( predicate ? this.toSeq().filter(predicate, context) : this ); }, countBy: function(grouper, context) { return countByFactory(this, grouper, context); }, equals: function(other) { return deepEqual(this, other); }, entrySeq: function() { var iterable = this; if (iterable._cache) { // We cache as an entries array, so we can just return the cache! return new ArraySeq(iterable._cache); } var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq(); entriesSequence.fromEntrySeq = function() {return iterable.toSeq()}; return entriesSequence; }, filterNot: function(predicate, context) { return this.filter(not(predicate), context); }, findEntry: function(predicate, context, notSetValue) { var found = notSetValue; this.__iterate(function(v, k, c) { if (predicate.call(context, v, k, c)) { found = [k, v]; return false; } }); return found; }, findKey: function(predicate, context) { var entry = this.findEntry(predicate, context); return entry && entry[0]; }, findLast: function(predicate, context, notSetValue) { return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); }, findLastEntry: function(predicate, context, notSetValue) { return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue); }, findLastKey: function(predicate, context) { return this.toKeyedSeq().reverse().findKey(predicate, context); }, first: function() { return this.find(returnTrue); }, flatMap: function(mapper, context) { return reify(this, flatMapFactory(this, mapper, context)); }, flatten: function(depth) { return reify(this, flattenFactory(this, depth, true)); }, fromEntrySeq: function() { return new FromEntriesSequence(this); }, get: function(searchKey, notSetValue) { return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue); }, getIn: function(searchKeyPath, notSetValue) { var nested = this; // Note: in an ES6 environment, we would prefer: // for (var key of searchKeyPath) { var iter = forceIterator(searchKeyPath); var step; while (!(step = iter.next()).done) { var key = step.value; nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET; if (nested === NOT_SET) { return notSetValue; } } return nested; }, groupBy: function(grouper, context) { return groupByFactory(this, grouper, context); }, has: function(searchKey) { return this.get(searchKey, NOT_SET) !== NOT_SET; }, hasIn: function(searchKeyPath) { return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET; }, isSubset: function(iter) { iter = typeof iter.includes === 'function' ? iter : Iterable(iter); return this.every(function(value ) {return iter.includes(value)}); }, isSuperset: function(iter) { iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter); return iter.isSubset(this); }, keyOf: function(searchValue) { return this.findKey(function(value ) {return is(value, searchValue)}); }, keySeq: function() { return this.toSeq().map(keyMapper).toIndexedSeq(); }, last: function() { return this.toSeq().reverse().first(); }, lastKeyOf: function(searchValue) { return this.toKeyedSeq().reverse().keyOf(searchValue); }, max: function(comparator) { return maxFactory(this, comparator); }, maxBy: function(mapper, comparator) { return maxFactory(this, comparator, mapper); }, min: function(comparator) { return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator); }, minBy: function(mapper, comparator) { return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper); }, rest: function() { return this.slice(1); }, skip: function(amount) { return this.slice(Math.max(0, amount)); }, skipLast: function(amount) { return reify(this, this.toSeq().reverse().skip(amount).reverse()); }, skipWhile: function(predicate, context) { return reify(this, skipWhileFactory(this, predicate, context, true)); }, skipUntil: function(predicate, context) { return this.skipWhile(not(predicate), context); }, sortBy: function(mapper, comparator) { return reify(this, sortFactory(this, comparator, mapper)); }, take: function(amount) { return this.slice(0, Math.max(0, amount)); }, takeLast: function(amount) { return reify(this, this.toSeq().reverse().take(amount).reverse()); }, takeWhile: function(predicate, context) { return reify(this, takeWhileFactory(this, predicate, context)); }, takeUntil: function(predicate, context) { return this.takeWhile(not(predicate), context); }, valueSeq: function() { return this.toIndexedSeq(); }, // ### Hashable Object hashCode: function() { return this.__hash || (this.__hash = hashIterable(this)); } // ### Internal // abstract __iterate(fn, reverse) // abstract __iterator(type, reverse) }); // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'; // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'; // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@'; // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; var IterablePrototype = Iterable.prototype; IterablePrototype[IS_ITERABLE_SENTINEL] = true; IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values; IterablePrototype.__toJS = IterablePrototype.toArray; IterablePrototype.__toStringMapper = quoteString; IterablePrototype.inspect = IterablePrototype.toSource = function() { return this.toString(); }; IterablePrototype.chain = IterablePrototype.flatMap; IterablePrototype.contains = IterablePrototype.includes; mixin(KeyedIterable, { // ### More sequential methods flip: function() { return reify(this, flipFactory(this)); }, mapEntries: function(mapper, context) {var this$0 = this; var iterations = 0; return reify(this, this.toSeq().map( function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)} ).fromEntrySeq() ); }, mapKeys: function(mapper, context) {var this$0 = this; return reify(this, this.toSeq().flip().map( function(k, v) {return mapper.call(context, k, v, this$0)} ).flip() ); } }); var KeyedIterablePrototype = KeyedIterable.prototype; KeyedIterablePrototype[IS_KEYED_SENTINEL] = true; KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries; KeyedIterablePrototype.__toJS = IterablePrototype.toObject; KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)}; mixin(IndexedIterable, { // ### Conversion to other types toKeyedSeq: function() { return new ToKeyedSequence(this, false); }, // ### ES6 Collection methods (ES6 Array and Map) filter: function(predicate, context) { return reify(this, filterFactory(this, predicate, context, false)); }, findIndex: function(predicate, context) { var entry = this.findEntry(predicate, context); return entry ? entry[0] : -1; }, indexOf: function(searchValue) { var key = this.keyOf(searchValue); return key === undefined ? -1 : key; }, lastIndexOf: function(searchValue) { var key = this.lastKeyOf(searchValue); return key === undefined ? -1 : key; }, reverse: function() { return reify(this, reverseFactory(this, false)); }, slice: function(begin, end) { return reify(this, sliceFactory(this, begin, end, false)); }, splice: function(index, removeNum /*, ...values*/) { var numArgs = arguments.length; removeNum = Math.max(removeNum | 0, 0); if (numArgs === 0 || (numArgs === 2 && !removeNum)) { return this; } // If index is negative, it should resolve relative to the size of the // collection. However size may be expensive to compute if not cached, so // only call count() if the number is in fact negative. index = resolveBegin(index, index < 0 ? this.count() : this.size); var spliced = this.slice(0, index); return reify( this, numArgs === 1 ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)) ); }, // ### More collection methods findLastIndex: function(predicate, context) { var entry = this.findLastEntry(predicate, context); return entry ? entry[0] : -1; }, first: function() { return this.get(0); }, flatten: function(depth) { return reify(this, flattenFactory(this, depth, false)); }, get: function(index, notSetValue) { index = wrapIndex(this, index); return (index < 0 || (this.size === Infinity || (this.size !== undefined && index > this.size))) ? notSetValue : this.find(function(_, key) {return key === index}, undefined, notSetValue); }, has: function(index) { index = wrapIndex(this, index); return index >= 0 && (this.size !== undefined ? this.size === Infinity || index < this.size : this.indexOf(index) !== -1 ); }, interpose: function(separator) { return reify(this, interposeFactory(this, separator)); }, interleave: function(/*...iterables*/) { var iterables = [this].concat(arrCopy(arguments)); var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables); var interleaved = zipped.flatten(true); if (zipped.size) { interleaved.size = zipped.size * iterables.length; } return reify(this, interleaved); }, keySeq: function() { return Range(0, this.size); }, last: function() { return this.get(-1); }, skipWhile: function(predicate, context) { return reify(this, skipWhileFactory(this, predicate, context, false)); }, zip: function(/*, ...iterables */) { var iterables = [this].concat(arrCopy(arguments)); return reify(this, zipWithFactory(this, defaultZipper, iterables)); }, zipWith: function(zipper/*, ...iterables */) { var iterables = arrCopy(arguments); iterables[0] = this; return reify(this, zipWithFactory(this, zipper, iterables)); } }); IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true; IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true; mixin(SetIterable, { // ### ES6 Collection methods (ES6 Array and Map) get: function(value, notSetValue) { return this.has(value) ? value : notSetValue; }, includes: function(value) { return this.has(value); }, // ### More sequential methods keySeq: function() { return this.valueSeq(); } }); SetIterable.prototype.has = IterablePrototype.includes; SetIterable.prototype.contains = SetIterable.prototype.includes; // Mixin subclasses mixin(KeyedSeq, KeyedIterable.prototype); mixin(IndexedSeq, IndexedIterable.prototype); mixin(SetSeq, SetIterable.prototype); mixin(KeyedCollection, KeyedIterable.prototype); mixin(IndexedCollection, IndexedIterable.prototype); mixin(SetCollection, SetIterable.prototype); // #pragma Helper functions function keyMapper(v, k) { return k; } function entryMapper(v, k) { return [k, v]; } function not(predicate) { return function() { return !predicate.apply(this, arguments); } } function neg(predicate) { return function() { return -predicate.apply(this, arguments); } } function quoteString(value) { return typeof value === 'string' ? JSON.stringify(value) : String(value); } function defaultZipper() { return arrCopy(arguments); } function defaultNegComparator(a, b) { return a < b ? 1 : a > b ? -1 : 0; } function hashIterable(iterable) { if (iterable.size === Infinity) { return 0; } var ordered = isOrdered(iterable); var keyed = isKeyed(iterable); var h = ordered ? 1 : 0; var size = iterable.__iterate( keyed ? ordered ? function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } : function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } : ordered ? function(v ) { h = 31 * h + hash(v) | 0; } : function(v ) { h = h + hash(v) | 0; } ); return murmurHashOfSize(size, h); } function murmurHashOfSize(size, h) { h = imul(h, 0xCC9E2D51); h = imul(h << 15 | h >>> -15, 0x1B873593); h = imul(h << 13 | h >>> -13, 5); h = (h + 0xE6546B64 | 0) ^ size; h = imul(h ^ h >>> 16, 0x85EBCA6B); h = imul(h ^ h >>> 13, 0xC2B2AE35); h = smi(h ^ h >>> 16); return h; } function hashMerge(a, b) { return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int } var Immutable = { Iterable: Iterable, Seq: Seq, Collection: Collection, Map: Map, OrderedMap: OrderedMap, List: List, Stack: Stack, Set: Set, OrderedSet: OrderedSet, Record: Record, Range: Range, Repeat: Repeat, is: is, fromJS: fromJS }; return Immutable; })); /***/ }), /* 82 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(123); var core = __webpack_require__(72); var ctx = __webpack_require__(344); var hide = __webpack_require__(184); var has = __webpack_require__(186); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var IS_WRAP = type & $export.W; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE]; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; var key, own, out; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; if (own && has(exports, key)) continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function (C) { var F = function (a, b, c) { if (this instanceof C) { switch (arguments.length) { case 0: return new C(); case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if (IS_PROTO) { (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /* 83 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return lazyLoadCallback; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return propsCallback; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return stateCallback; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return childContextCallback; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return skipCallback; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return renderCallback; }); /* unused harmony export componentWillMountCallback */ /* unused harmony export componentDidMountCallback */ /* unused harmony export componentWillUnmountCallback */ /* unused harmony export componentWillReceivePropsCallback */ /* unused harmony export shouldComponentUpdateCallback */ /* unused harmony export componentWillUpdateCallback */ /* unused harmony export componentDidUpdateCallback */ /* harmony export (immutable) */ __webpack_exports__["b"] = createBlueprint; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__combine__ = __webpack_require__(782); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_resolveValue__ = __webpack_require__(297); var lazyLoadCallback = function (callback) { return ({ kind: "lazyLoadCallback", callback: callback }); }; var propsCallback = function (callback) { return ({ kind: "propsCallback", callback: callback }); }; var stateCallback = function (callback) { return ({ kind: "stateCallback", callback: callback }); }; var childContextCallback = function (callback) { return ({ kind: "childContextCallback", callback: callback }); }; var skipCallback = function (callback) { return ({ kind: "skipCallback", callback: callback }); }; var renderCallback = function (callback) { return ({ kind: "renderCallback", callback: callback }); }; var componentWillMountCallback = function (callback) { return ({ kind: "componentWillMountCallback", callback: callback }); }; var componentDidMountCallback = function (callback) { return ({ kind: "componentDidMountCallback", callback: callback }); }; var componentWillUnmountCallback = function (callback) { return ({ kind: "componentWillUnmountCallback", callback: callback }); }; var componentWillReceivePropsCallback = function (callback) { return ({ kind: "componentWillReceivePropsCallback", callback: callback }); }; var shouldComponentUpdateCallback = function (callback) { return ({ kind: "shouldComponentUpdateCallback", callback: callback }); }; var componentWillUpdateCallback = function (callback) { return ({ kind: "componentWillUpdateCallback", callback: callback }); }; var componentDidUpdateCallback = function (callback) { return ({ kind: "componentDidUpdateCallback", callback: callback }); }; function createBlueprint() { var composables = []; for (var _i = 0; _i < arguments.length; _i++) { composables[_i] = arguments[_i]; } var componentCallbacks = __WEBPACK_IMPORTED_MODULE_0__combine__["b" /* default */].apply(void 0, composables); return { staticCallbacks: componentCallbacks.filter(function (c) { return c.staticCallback; }).map(function (c) { return c.staticCallback; }), instanceCallbacks: function () { var result = []; componentCallbacks.forEach(function (c) { if (!c.instanceCallbacks) { return; } var instanceCallbacks = Object(__WEBPACK_IMPORTED_MODULE_1__utils_resolveValue__["a" /* default */])(c.instanceCallbacks); if (!instanceCallbacks) { return; } result.push.apply(result, instanceCallbacks); }); return result; }, }; } //# sourceMappingURL=blueprint.js.map /***/ }), /* 84 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getValueByDataKey; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return getDomainOfDataByKey; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return calculateActiveTickIndex; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return getMainColorOfGraphicItem; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return getLegendProps; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getBarSizeList; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getBarPosition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return appendOffsetOfLegend; }); /* unused harmony export getDomainOfErrorBars */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return parseErrorBarsOfAxis; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return getDomainOfItemsWithSameAxis; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return isCategorialAxis; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return getCoordinatesOfGrid; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return getTicksOfAxis; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return combineEventHandlers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return parseScale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return checkDomainOfScale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return findPositionOfBar; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return truncateByDomain; }); /* unused harmony export offsetSign */ /* unused harmony export getStackedData */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return getStackGroupsByAxisId; }); /* unused harmony export calculateDomainOfTicks */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getTicksOfScale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return getCateCoordinateOfLine; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return getCateCoordinateOfBar; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getBaseValueOfBar; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return getStackedDataOfItem; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return getDomainOfStackGroups; }); /* unused harmony export MIN_VALUE_REG */ /* unused harmony export MAX_VALUE_REG */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return parseSpecifiedDomain; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getBandSizeOfAxis; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return parseDomainOfCategoryAxis; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isEqual__ = __webpack_require__(150); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isEqual___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isEqual__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_sortBy__ = __webpack_require__(840); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_sortBy___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_sortBy__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNaN__ = __webpack_require__(510); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNaN___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNaN__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isString__ = __webpack_require__(508); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isString___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isString__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_isArray__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_isArray__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_max__ = __webpack_require__(1435); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_max___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_lodash_max__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_min__ = __webpack_require__(1437); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_min___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash_min__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_flatMap__ = __webpack_require__(3562); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_lodash_flatMap___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_lodash_flatMap__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_lodash_get__ = __webpack_require__(203); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_lodash_get___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_lodash_get__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_lodash_isNil__ = __webpack_require__(106); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_lodash_isNil__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_recharts_scale__ = __webpack_require__(3564); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_recharts_scale___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_recharts_scale__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_d3_scale__ = __webpack_require__(1441); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_d3_shape__ = __webpack_require__(500); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__DataUtils__ = __webpack_require__(42); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__cartesian_ErrorBar__ = __webpack_require__(388); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__component_Legend__ = __webpack_require__(830); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__ReactUtils__ = __webpack_require__(22); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var getValueByDataKey = function getValueByDataKey(obj, dataKey, defaultValue) { if (__WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(obj) || __WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(dataKey)) { return defaultValue; } if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["g" /* isNumOrStr */])(dataKey)) { return __WEBPACK_IMPORTED_MODULE_9_lodash_get___default()(obj, dataKey, defaultValue); } if (__WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(dataKey)) { return dataKey(obj); } return defaultValue; }; /** * Get domain of data by key * @param {Array} data The data displayed in the chart * @param {String} key The unique key of a group of data * @param {String} type The type of axis * @param {Boolean} filterNil Whether or not filter nil values * @return {Array} Domain of data */ var getDomainOfDataByKey = function getDomainOfDataByKey(data, key, type, filterNil) { var flattenData = __WEBPACK_IMPORTED_MODULE_7_lodash_flatMap___default()(data, function (entry) { return getValueByDataKey(entry, key); }); if (type === 'number') { var domain = flattenData.filter(function (entry) { return Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["h" /* isNumber */])(entry) || parseFloat(entry, 10); }); return domain.length ? [__WEBPACK_IMPORTED_MODULE_6_lodash_min___default()(domain), __WEBPACK_IMPORTED_MODULE_5_lodash_max___default()(domain)] : [Infinity, -Infinity]; } var validateData = filterNil ? flattenData.filter(function (entry) { return !__WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(entry); }) : flattenData; return validateData.map(function (entry) { return Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["g" /* isNumOrStr */])(entry) ? entry : ''; }); }; var calculateActiveTickIndex = function calculateActiveTickIndex(coordinate, ticks, unsortedTicks, axis) { var index = -1; var len = ticks.length; if (len > 1) { if (axis && axis.axisType === 'angleAxis' && Math.abs(Math.abs(axis.range[1] - axis.range[0]) - 360) <= 1e-6) { var range = axis.range; // ticks are distributed in a circle for (var i = 0; i < len; i++) { var before = i > 0 ? unsortedTicks[i - 1].coordinate : unsortedTicks[len - 1].coordinate; var cur = unsortedTicks[i].coordinate; var after = i >= len - 1 ? unsortedTicks[0].coordinate : unsortedTicks[i + 1].coordinate; var sameDirectionCoord = void 0; if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["j" /* mathSign */])(cur - before) !== Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["j" /* mathSign */])(after - cur)) { var diffInterval = []; if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["j" /* mathSign */])(after - cur) === Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["j" /* mathSign */])(range[1] - range[0])) { sameDirectionCoord = after; var curInRange = cur + range[1] - range[0]; diffInterval[0] = Math.min(curInRange, (curInRange + before) / 2); diffInterval[1] = Math.max(curInRange, (curInRange + before) / 2); } else { sameDirectionCoord = before; var afterInRange = after + range[1] - range[0]; diffInterval[0] = Math.min(cur, (afterInRange + cur) / 2); diffInterval[1] = Math.max(cur, (afterInRange + cur) / 2); } var sameInterval = [Math.min(cur, (sameDirectionCoord + cur) / 2), Math.max(cur, (sameDirectionCoord + cur) / 2)]; if (coordinate > sameInterval[0] && coordinate <= sameInterval[1] || coordinate >= diffInterval[0] && coordinate <= diffInterval[1]) { index = unsortedTicks[i].index; break; } } else { var min = Math.min(before, after); var max = Math.max(before, after); if (coordinate > (min + cur) / 2 && coordinate <= (max + cur) / 2) { index = unsortedTicks[i].index; break; } } } } else { // ticks are distributed in a single direction for (var _i = 0; _i < len; _i++) { if (_i === 0 && coordinate <= (ticks[_i].coordinate + ticks[_i + 1].coordinate) / 2 || _i > 0 && _i < len - 1 && coordinate > (ticks[_i].coordinate + ticks[_i - 1].coordinate) / 2 && coordinate <= (ticks[_i].coordinate + ticks[_i + 1].coordinate) / 2 || _i === len - 1 && coordinate > (ticks[_i].coordinate + ticks[_i - 1].coordinate) / 2) { index = ticks[_i].index; break; } } } } else { index = 0; } return index; }; /** * Get the main color of each graphic item * @param {ReactElement} item A graphic item * @return {String} Color */ var getMainColorOfGraphicItem = function getMainColorOfGraphicItem(item) { var displayName = item.type.displayName; var _item$props = item.props, stroke = _item$props.stroke, fill = _item$props.fill; var result; switch (displayName) { case 'Line': result = stroke; break; case 'Area': case 'Radar': result = stroke && stroke !== 'none' ? stroke : fill; break; default: result = fill; break; } return result; }; var getLegendProps = function getLegendProps(_ref) { var children = _ref.children, formatedGraphicalItems = _ref.formatedGraphicalItems, legendWidth = _ref.legendWidth, legendContent = _ref.legendContent; var legendItem = Object(__WEBPACK_IMPORTED_MODULE_17__ReactUtils__["j" /* findChildByType */])(children, __WEBPACK_IMPORTED_MODULE_16__component_Legend__["a" /* default */]); if (!legendItem) { return null; } var legendData; if (legendItem.props && legendItem.props.payload) { legendData = legendItem.props && legendItem.props.payload; } else if (legendContent === 'children') { legendData = (formatedGraphicalItems || []).reduce(function (result, _ref2) { var item = _ref2.item, props = _ref2.props; var data = props.sectors || props.data || []; return result.concat(data.map(function (entry) { return { type: legendItem.props.iconType || item.props.legendType, value: entry.name, color: entry.fill, payload: entry }; })); }, []); } else { legendData = (formatedGraphicalItems || []).map(function (_ref3) { var item = _ref3.item; var _item$props2 = item.props, dataKey = _item$props2.dataKey, name = _item$props2.name, legendType = _item$props2.legendType, hide = _item$props2.hide; return { inactive: hide, dataKey: dataKey, type: legendItem.props.iconType || legendType || 'square', color: getMainColorOfGraphicItem(item), value: name || dataKey, payload: item.props }; }); } return _objectSpread({}, legendItem.props, {}, __WEBPACK_IMPORTED_MODULE_16__component_Legend__["a" /* default */].getWithHeight(legendItem, legendWidth), { payload: legendData, item: legendItem }); }; /** * Calculate the size of all groups for stacked bar graph * @param {Object} stackGroups The items grouped by axisId and stackId * @return {Object} The size of all groups */ var getBarSizeList = function getBarSizeList(_ref4) { var globalSize = _ref4.barSize, _ref4$stackGroups = _ref4.stackGroups, stackGroups = _ref4$stackGroups === void 0 ? {} : _ref4$stackGroups; if (!stackGroups) { return {}; } var result = {}; var numericAxisIds = Object.keys(stackGroups); for (var i = 0, len = numericAxisIds.length; i < len; i++) { var sgs = stackGroups[numericAxisIds[i]].stackGroups; var stackIds = Object.keys(sgs); for (var j = 0, sLen = stackIds.length; j < sLen; j++) { var _sgs$stackIds$j = sgs[stackIds[j]], items = _sgs$stackIds$j.items, cateAxisId = _sgs$stackIds$j.cateAxisId; var barItems = items.filter(function (item) { return Object(__WEBPACK_IMPORTED_MODULE_17__ReactUtils__["k" /* getDisplayName */])(item.type).indexOf('Bar') >= 0; }); if (barItems && barItems.length) { var selfSize = barItems[0].props.barSize; var cateId = barItems[0].props[cateAxisId]; if (!result[cateId]) { result[cateId] = []; } result[cateId].push({ item: barItems[0], stackList: barItems.slice(1), barSize: __WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(selfSize) ? globalSize : selfSize }); } } } return result; }; /** * Calculate the size of each bar and the gap between two bars * @param {Number} bandSize The size of each category * @param {sizeList} sizeList The size of all groups * @param {maxBarSize} maxBarSize The maximum size of bar * @return {Number} The size of each bar and the gap between two bars */ var getBarPosition = function getBarPosition(_ref5) { var barGap = _ref5.barGap, barCategoryGap = _ref5.barCategoryGap, bandSize = _ref5.bandSize, _ref5$sizeList = _ref5.sizeList, sizeList = _ref5$sizeList === void 0 ? [] : _ref5$sizeList, maxBarSize = _ref5.maxBarSize; var len = sizeList.length; if (len < 1) return null; var realBarGap = Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["d" /* getPercentValue */])(barGap, bandSize, 0, true); var result; // whether or not is barSize setted by user if (sizeList[0].barSize === +sizeList[0].barSize) { var useFull = false; var fullBarSize = bandSize / len; var sum = sizeList.reduce(function (res, entry) { return res + entry.barSize || 0; }, 0); sum += (len - 1) * realBarGap; if (sum >= bandSize) { sum -= (len - 1) * realBarGap; realBarGap = 0; } if (sum >= bandSize && fullBarSize > 0) { useFull = true; fullBarSize *= 0.9; sum = len * fullBarSize; } var offset = (bandSize - sum) / 2 >> 0; var prev = { offset: offset - realBarGap, size: 0 }; result = sizeList.reduce(function (res, entry) { var newRes = [].concat(_toConsumableArray(res), [{ item: entry.item, position: { offset: prev.offset + prev.size + realBarGap, size: useFull ? fullBarSize : entry.barSize } }]); prev = newRes[newRes.length - 1].position; if (entry.stackList && entry.stackList.length) { entry.stackList.forEach(function (item) { newRes.push({ item: item, position: prev }); }); } return newRes; }, []); } else { var _offset = Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["d" /* getPercentValue */])(barCategoryGap, bandSize, 0, true); if (bandSize - 2 * _offset - (len - 1) * realBarGap <= 0) { realBarGap = 0; } var originalSize = (bandSize - 2 * _offset - (len - 1) * realBarGap) / len; if (originalSize > 1) { originalSize >>= 0; } var size = maxBarSize === +maxBarSize ? Math.min(originalSize, maxBarSize) : originalSize; result = sizeList.reduce(function (res, entry, i) { var newRes = [].concat(_toConsumableArray(res), [{ item: entry.item, position: { offset: _offset + (originalSize + realBarGap) * i + (originalSize - size) / 2, size: size } }]); if (entry.stackList && entry.stackList.length) { entry.stackList.forEach(function (item) { newRes.push({ item: item, position: newRes[newRes.length - 1].position }); }); } return newRes; }, []); } return result; }; var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, legendBox) { var children = props.children, width = props.width, height = props.height, margin = props.margin; var legendWidth = width - (margin.left || 0) - (margin.right || 0); var legendHeight = height - (margin.top || 0) - (margin.bottom || 0); var legendProps = getLegendProps({ children: children, items: items, legendWidth: legendWidth, legendHeight: legendHeight }); var newOffset = offset; if (legendProps) { var box = legendBox || {}; var align = legendProps.align, verticalAlign = legendProps.verticalAlign, layout = legendProps.layout; if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'center') && Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["h" /* isNumber */])(offset[align])) { newOffset = _objectSpread({}, offset, _defineProperty({}, align, newOffset[align] + (box.width || 0))); } if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["h" /* isNumber */])(offset[verticalAlign])) { newOffset = _objectSpread({}, offset, _defineProperty({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0))); } } return newOffset; }; var getDomainOfErrorBars = function getDomainOfErrorBars(data, item, dataKey, axisType) { var children = item.props.children; var errorBars = Object(__WEBPACK_IMPORTED_MODULE_17__ReactUtils__["i" /* findAllByType */])(children, __WEBPACK_IMPORTED_MODULE_15__cartesian_ErrorBar__["a" /* default */]).filter(function (errorBarChild) { var direction = errorBarChild.props.direction; return __WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(direction) || __WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(axisType) ? true : axisType.indexOf(direction) >= 0; }); if (errorBars && errorBars.length) { var keys = errorBars.map(function (errorBarChild) { return errorBarChild.props.dataKey; }); return data.reduce(function (result, entry) { var entryValue = getValueByDataKey(entry, dataKey, 0); var mainValue = __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(entryValue) ? [__WEBPACK_IMPORTED_MODULE_6_lodash_min___default()(entryValue), __WEBPACK_IMPORTED_MODULE_5_lodash_max___default()(entryValue)] : [entryValue, entryValue]; var errorDomain = keys.reduce(function (prevErrorArr, k) { var errorValue = getValueByDataKey(entry, k, 0); var lowerValue = mainValue[0] - Math.abs(__WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(errorValue) ? errorValue[0] : errorValue); var upperValue = mainValue[1] + Math.abs(__WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(errorValue) ? errorValue[1] : errorValue); return [Math.min(lowerValue, prevErrorArr[0]), Math.max(upperValue, prevErrorArr[1])]; }, [Infinity, -Infinity]); return [Math.min(errorDomain[0], result[0]), Math.max(errorDomain[1], result[1])]; }, [Infinity, -Infinity]); } return null; }; var parseErrorBarsOfAxis = function parseErrorBarsOfAxis(data, items, dataKey, axisType) { var domains = items.map(function (item) { return getDomainOfErrorBars(data, item, dataKey, axisType); }).filter(function (entry) { return !__WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(entry); }); if (domains && domains.length) { return domains.reduce(function (result, entry) { return [Math.min(result[0], entry[0]), Math.max(result[1], entry[1])]; }, [Infinity, -Infinity]); } return null; }; /** * Get domain of data by the configuration of item element * @param {Array} data The data displayed in the chart * @param {Array} items The instances of item * @param {String} type The type of axis, number - Number Axis, category - Category Axis * @param {Boolean} filterNil Whether or not filter nil values * @return {Array} Domain */ var getDomainOfItemsWithSameAxis = function getDomainOfItemsWithSameAxis(data, items, type, filterNil) { var domains = items.map(function (item) { var dataKey = item.props.dataKey; if (type === 'number' && dataKey) { return getDomainOfErrorBars(data, item, dataKey) || getDomainOfDataByKey(data, dataKey, type, filterNil); } return getDomainOfDataByKey(data, dataKey, type, filterNil); }); if (type === 'number') { // Calculate the domain of number axis return domains.reduce(function (result, entry) { return [Math.min(result[0], entry[0]), Math.max(result[1], entry[1])]; }, [Infinity, -Infinity]); } var tag = {}; // Get the union set of category axis return domains.reduce(function (result, entry) { for (var i = 0, len = entry.length; i < len; i++) { if (!tag[entry[i]]) { tag[entry[i]] = true; result.push(entry[i]); } } return result; }, []); }; var isCategorialAxis = function isCategorialAxis(layout, axisType) { return layout === 'horizontal' && axisType === 'xAxis' || layout === 'vertical' && axisType === 'yAxis' || layout === 'centric' && axisType === 'angleAxis' || layout === 'radial' && axisType === 'radiusAxis'; }; /** * Calculate the Coordinates of grid * @param {Array} ticks The ticks in axis * @param {Number} min The minimun value of axis * @param {Number} max The maximun value of axis * @return {Array} Coordinates */ var getCoordinatesOfGrid = function getCoordinatesOfGrid(ticks, min, max) { var hasMin, hasMax; var values = ticks.map(function (entry) { if (entry.coordinate === min) { hasMin = true; } if (entry.coordinate === max) { hasMax = true; } return entry.coordinate; }); if (!hasMin) { values.push(min); } if (!hasMax) { values.push(max); } return values; }; /** * Get the ticks of an axis * @param {Object} axis The configuration of an axis * @param {Boolean} isGrid Whether or not are the ticks in grid * @param {Boolean} isAll Return the ticks of all the points or not * @return {Array} Ticks */ var getTicksOfAxis = function getTicksOfAxis(axis, isGrid, isAll) { if (!axis) return null; var scale = axis.scale; var duplicateDomain = axis.duplicateDomain, type = axis.type, range = axis.range; var offset = (isGrid || isAll) && type === 'category' && scale.bandwidth ? scale.bandwidth() / 2 : 0; offset = axis.axisType === 'angleAxis' ? Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["j" /* mathSign */])(range[0] - range[1]) * 2 * offset : offset; // The ticks setted by user should only affect the ticks adjacent to axis line if (isGrid && (axis.ticks || axis.niceTicks)) { return (axis.ticks || axis.niceTicks).map(function (entry) { var scaleContent = duplicateDomain ? duplicateDomain.indexOf(entry) : entry; return { coordinate: scale(scaleContent) + offset, value: entry, offset: offset }; }); } if (axis.isCategorial && axis.categoricalDomain) { return axis.categoricalDomain.map(function (entry, index) { return { coordinate: scale(entry), value: entry, index: index, offset: offset }; }); } if (scale.ticks && !isAll) { return scale.ticks(axis.tickCount).map(function (entry) { return { coordinate: scale(entry) + offset, value: entry, offset: offset }; }); } // When axis has duplicated text, serial numbers are used to generate scale return scale.domain().map(function (entry, index) { return { coordinate: scale(entry) + offset, value: duplicateDomain ? duplicateDomain[entry] : entry, index: index, offset: offset }; }); }; /** * combine the handlers * @param {Function} defaultHandler Internal private handler * @param {Function} parentHandler Handler function specified in parent component * @param {Function} childHandler Handler function specified in child component * @return {Function} The combined handler */ var combineEventHandlers = function combineEventHandlers(defaultHandler, parentHandler, childHandler) { var customizedHandler; if (__WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(childHandler)) { customizedHandler = childHandler; } else if (__WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(parentHandler)) { customizedHandler = parentHandler; } if (__WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(defaultHandler) || customizedHandler) { return function (arg1, arg2, arg3, arg4) { if (__WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(defaultHandler)) { defaultHandler(arg1, arg2, arg3, arg4); } if (__WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(customizedHandler)) { customizedHandler(arg1, arg2, arg3, arg4); } }; } return null; }; /** * Parse the scale function of axis * @param {Object} axis The option of axis * @param {String} chartType The displayName of chart * @return {Function} The scale funcion */ var parseScale = function parseScale(axis, chartType) { var scale = axis.scale, type = axis.type, layout = axis.layout, axisType = axis.axisType; if (scale === 'auto') { if (layout === 'radial' && axisType === 'radiusAxis') { return { scale: __WEBPACK_IMPORTED_MODULE_12_d3_scale__["scaleBand"](), realScaleType: 'band' }; } if (layout === 'radial' && axisType === 'angleAxis') { return { scale: __WEBPACK_IMPORTED_MODULE_12_d3_scale__["scaleLinear"](), realScaleType: 'linear' }; } if (type === 'category' && chartType && (chartType.indexOf('LineChart') >= 0 || chartType.indexOf('AreaChart') >= 0)) { return { scale: __WEBPACK_IMPORTED_MODULE_12_d3_scale__["scalePoint"](), realScaleType: 'point' }; } if (type === 'category') { return { scale: __WEBPACK_IMPORTED_MODULE_12_d3_scale__["scaleBand"](), realScaleType: 'band' }; } return { scale: __WEBPACK_IMPORTED_MODULE_12_d3_scale__["scaleLinear"](), realScaleType: 'linear' }; } if (__WEBPACK_IMPORTED_MODULE_3_lodash_isString___default()(scale)) { var name = "scale".concat(scale.slice(0, 1).toUpperCase()).concat(scale.slice(1)); return { scale: (__WEBPACK_IMPORTED_MODULE_12_d3_scale__[name] || __WEBPACK_IMPORTED_MODULE_12_d3_scale__["scalePoint"])(), realScaleType: __WEBPACK_IMPORTED_MODULE_12_d3_scale__[name] ? name : 'point' }; } return __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(scale) ? { scale: scale } : { scale: __WEBPACK_IMPORTED_MODULE_12_d3_scale__["scalePoint"](), realScaleType: 'point' }; }; var EPS = 1e-4; var checkDomainOfScale = function checkDomainOfScale(scale) { var domain = scale.domain(); if (!domain || domain.length <= 2) { return; } var len = domain.length; var range = scale.range(); var min = Math.min(range[0], range[1]) - EPS; var max = Math.max(range[0], range[1]) + EPS; var first = scale(domain[0]); var last = scale(domain[len - 1]); if (first < min || first > max || last < min || last > max) { scale.domain([domain[0], domain[len - 1]]); } }; var findPositionOfBar = function findPositionOfBar(barPosition, child) { if (!barPosition) { return null; } for (var i = 0, len = barPosition.length; i < len; i++) { if (barPosition[i].item === child) { return barPosition[i].position; } } return null; }; var truncateByDomain = function truncateByDomain(value, domain) { if (!domain || domain.length !== 2 || !Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["h" /* isNumber */])(domain[0]) || !Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["h" /* isNumber */])(domain[1])) { return value; } var min = Math.min(domain[0], domain[1]); var max = Math.max(domain[0], domain[1]); var result = [value[0], value[1]]; if (!Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["h" /* isNumber */])(value[0]) || value[0] < min) { result[0] = min; } if (!Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["h" /* isNumber */])(value[1]) || value[1] > max) { result[1] = max; } if (result[0] > max) { result[0] = max; } if (result[1] < min) { result[1] = min; } return result; }; /* eslint no-param-reassign: 0 */ var offsetSign = function offsetSign(series) { var n = series.length; if (n <= 0) { return; } for (var j = 0, m = series[0].length; j < m; ++j) { var positive = 0; var negative = 0; for (var i = 0; i < n; ++i) { var value = __WEBPACK_IMPORTED_MODULE_2_lodash_isNaN___default()(series[i][j][1]) ? series[i][j][0] : series[i][j][1]; /* eslint-disable prefer-destructuring */ if (value >= 0) { series[i][j][0] = positive; series[i][j][1] = positive + value; positive = series[i][j][1]; } else { series[i][j][0] = negative; series[i][j][1] = negative + value; negative = series[i][j][1]; } /* eslint-enable prefer-destructuring */ } } }; var STACK_OFFSET_MAP = { sign: offsetSign, expand: __WEBPACK_IMPORTED_MODULE_13_d3_shape__["stackOffsetExpand"], none: __WEBPACK_IMPORTED_MODULE_13_d3_shape__["stackOffsetNone"], silhouette: __WEBPACK_IMPORTED_MODULE_13_d3_shape__["stackOffsetSilhouette"], wiggle: __WEBPACK_IMPORTED_MODULE_13_d3_shape__["stackOffsetWiggle"] }; var getStackedData = function getStackedData(data, stackItems, offsetType) { var dataKeys = stackItems.map(function (item) { return item.props.dataKey; }); var stack = Object(__WEBPACK_IMPORTED_MODULE_13_d3_shape__["stack"])().keys(dataKeys).value(function (d, key) { return +getValueByDataKey(d, key, 0); }).order(__WEBPACK_IMPORTED_MODULE_13_d3_shape__["stackOrderNone"]).offset(STACK_OFFSET_MAP[offsetType]); return stack(data); }; var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numericAxisId, cateAxisId, offsetType, reverseStackOrder) { if (!data) { return null; } // reversing items to affect render order (for layering) var items = reverseStackOrder ? _items.reverse() : _items; var stackGroups = items.reduce(function (result, item) { var _item$props3 = item.props, stackId = _item$props3.stackId, hide = _item$props3.hide; if (hide) { return result; } var axisId = item.props[numericAxisId]; var parentGroup = result[axisId] || { hasStack: false, stackGroups: {} }; if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["g" /* isNumOrStr */])(stackId)) { var childGroup = parentGroup.stackGroups[stackId] || { numericAxisId: numericAxisId, cateAxisId: cateAxisId, items: [] }; childGroup.items.push(item); parentGroup.hasStack = true; parentGroup.stackGroups[stackId] = childGroup; } else { parentGroup.stackGroups[Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["k" /* uniqueId */])('_stackId_')] = { numericAxisId: numericAxisId, cateAxisId: cateAxisId, items: [item] }; } return _objectSpread({}, result, _defineProperty({}, axisId, parentGroup)); }, {}); return Object.keys(stackGroups).reduce(function (result, axisId) { var group = stackGroups[axisId]; if (group.hasStack) { group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) { var g = group.stackGroups[stackId]; return _objectSpread({}, res, _defineProperty({}, stackId, { numericAxisId: numericAxisId, cateAxisId: cateAxisId, items: g.items, stackedData: getStackedData(data, g.items, offsetType) })); }, {}); } return _objectSpread({}, result, _defineProperty({}, axisId, group)); }, {}); }; /** * get domain of ticks * @param {Array} ticks Ticks of axis * @param {String} type The type of axis * @return {Array} domain */ var calculateDomainOfTicks = function calculateDomainOfTicks(ticks, type) { if (type === 'number') { return [__WEBPACK_IMPORTED_MODULE_6_lodash_min___default()(ticks), __WEBPACK_IMPORTED_MODULE_5_lodash_max___default()(ticks)]; } return ticks; }; /** * Configure the scale function of axis * @param {Object} scale The scale function * @param {Object} opts The configuration of axis * @return {Object} null */ var getTicksOfScale = function getTicksOfScale(scale, opts) { var realScaleType = opts.realScaleType, type = opts.type, tickCount = opts.tickCount, originalDomain = opts.originalDomain, allowDecimals = opts.allowDecimals; var scaleType = realScaleType || opts.scale; if (scaleType !== 'auto' && scaleType !== 'linear') { return null; } if (tickCount && type === 'number' && originalDomain && (originalDomain[0] === 'auto' || originalDomain[1] === 'auto')) { // Calculate the ticks by the number of grid when the axis is a number axis var domain = scale.domain(); var tickValues = Object(__WEBPACK_IMPORTED_MODULE_11_recharts_scale__["getNiceTickValues"])(domain, tickCount, allowDecimals); scale.domain(calculateDomainOfTicks(tickValues, type)); return { niceTicks: tickValues }; } if (tickCount && type === 'number') { var _domain = scale.domain(); var _tickValues = Object(__WEBPACK_IMPORTED_MODULE_11_recharts_scale__["getTickValuesFixedDomain"])(_domain, tickCount, allowDecimals); return { niceTicks: _tickValues }; } return null; }; var getCateCoordinateOfLine = function getCateCoordinateOfLine(_ref6) { var axis = _ref6.axis, ticks = _ref6.ticks, bandSize = _ref6.bandSize, entry = _ref6.entry, index = _ref6.index, dataKey = _ref6.dataKey; if (axis.type === 'category') { // find coordinate of category axis by the value of category if (!axis.allowDuplicatedCategory && axis.dataKey && !__WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(entry[axis.dataKey])) { var matchedTick = Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["a" /* findEntryInArray */])(ticks, 'value', entry[axis.dataKey]); if (matchedTick) { return matchedTick.coordinate + bandSize / 2; } } return ticks[index] ? ticks[index].coordinate + bandSize / 2 : null; } var value = getValueByDataKey(entry, !__WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(dataKey) ? dataKey : axis.dataKey); return !__WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(value) ? axis.scale(value) : null; }; var getCateCoordinateOfBar = function getCateCoordinateOfBar(_ref7) { var axis = _ref7.axis, ticks = _ref7.ticks, offset = _ref7.offset, bandSize = _ref7.bandSize, entry = _ref7.entry, index = _ref7.index; if (axis.type === 'category') { return ticks[index] ? ticks[index].coordinate + offset : null; } var value = getValueByDataKey(entry, axis.dataKey, axis.domain[index]); return !__WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(value) ? axis.scale(value) - bandSize / 2 + offset : null; }; var getBaseValueOfBar = function getBaseValueOfBar(_ref8) { var numericAxis = _ref8.numericAxis; var domain = numericAxis.scale.domain(); if (numericAxis.type === 'number') { var min = Math.min(domain[0], domain[1]); var max = Math.max(domain[0], domain[1]); if (min <= 0 && max >= 0) { return 0; } if (max < 0) { return max; } return min; } return domain[0]; }; var getStackedDataOfItem = function getStackedDataOfItem(item, stackGroups) { var stackId = item.props.stackId; if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["g" /* isNumOrStr */])(stackId)) { var group = stackGroups[stackId]; if (group && group.items.length) { var itemIndex = -1; for (var i = 0, len = group.items.length; i < len; i++) { if (group.items[i] === item) { itemIndex = i; break; } } return itemIndex >= 0 ? group.stackedData[itemIndex] : null; } } return null; }; var getDomainOfSingle = function getDomainOfSingle(data) { return data.reduce(function (result, entry) { return [__WEBPACK_IMPORTED_MODULE_6_lodash_min___default()(entry.concat([result[0]]).filter(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["h" /* isNumber */])), __WEBPACK_IMPORTED_MODULE_5_lodash_max___default()(entry.concat([result[1]]).filter(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["h" /* isNumber */]))]; }, [Infinity, -Infinity]); }; var getDomainOfStackGroups = function getDomainOfStackGroups(stackGroups, startIndex, endIndex) { return Object.keys(stackGroups).reduce(function (result, stackId) { var group = stackGroups[stackId]; var stackedData = group.stackedData; var domain = stackedData.reduce(function (res, entry) { var s = getDomainOfSingle(entry.slice(startIndex, endIndex + 1)); return [Math.min(res[0], s[0]), Math.max(res[1], s[1])]; }, [Infinity, -Infinity]); return [Math.min(domain[0], result[0]), Math.max(domain[1], result[1])]; }, [Infinity, -Infinity]).map(function (result) { return result === Infinity || result === -Infinity ? 0 : result; }); }; var MIN_VALUE_REG = /^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/; var MAX_VALUE_REG = /^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/; var parseSpecifiedDomain = function parseSpecifiedDomain(specifiedDomain, dataDomain, allowDataOverflow) { if (!__WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(specifiedDomain)) { return dataDomain; } var domain = []; /* eslint-disable prefer-destructuring */ if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["h" /* isNumber */])(specifiedDomain[0])) { domain[0] = allowDataOverflow ? specifiedDomain[0] : Math.min(specifiedDomain[0], dataDomain[0]); } else if (MIN_VALUE_REG.test(specifiedDomain[0])) { var value = +MIN_VALUE_REG.exec(specifiedDomain[0])[1]; domain[0] = dataDomain[0] - value; } else if (__WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(specifiedDomain[0])) { domain[0] = specifiedDomain[0](dataDomain[0]); } else { domain[0] = dataDomain[0]; } if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__["h" /* isNumber */])(specifiedDomain[1])) { domain[1] = allowDataOverflow ? specifiedDomain[1] : Math.max(specifiedDomain[1], dataDomain[1]); } else if (MAX_VALUE_REG.test(specifiedDomain[1])) { var _value = +MAX_VALUE_REG.exec(specifiedDomain[1])[1]; domain[1] = dataDomain[1] + _value; } else if (__WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(specifiedDomain[1])) { domain[1] = specifiedDomain[1](dataDomain[1]); } else { domain[1] = dataDomain[1]; } /* eslint-enable prefer-destructuring */ return domain; }; /** * Calculate the size between two category * @param {Object} axis The options of axis * @param {Array} ticks The ticks of axis * @return {Number} Size */ var getBandSizeOfAxis = function getBandSizeOfAxis(axis, ticks) { if (axis && axis.scale && axis.scale.bandwidth) { return axis.scale.bandwidth(); } if (axis && ticks && ticks.length >= 2) { var orderedTicks = __WEBPACK_IMPORTED_MODULE_1_lodash_sortBy___default()(ticks, function (o) { return o.coordinate; }); var bandSize = Infinity; for (var i = 1, len = orderedTicks.length; i < len; i++) { var cur = orderedTicks[i]; var prev = orderedTicks[i - 1]; bandSize = Math.min((cur.coordinate || 0) - (prev.coordinate || 0), bandSize); } return bandSize === Infinity ? 0 : bandSize; } return 0; }; /** * parse the domain of a category axis when a domain is specified * @param {Array} specifiedDomain The domain specified by users * @param {Array} calculatedDomain The domain calculated by dateKey * @param {ReactElement} axisChild The axis element * @returns {Array} domains */ var parseDomainOfCategoryAxis = function parseDomainOfCategoryAxis(specifiedDomain, calculatedDomain, axisChild) { if (!specifiedDomain || !specifiedDomain.length) { return calculatedDomain; } if (__WEBPACK_IMPORTED_MODULE_0_lodash_isEqual___default()(specifiedDomain, __WEBPACK_IMPORTED_MODULE_9_lodash_get___default()(axisChild, 'type.defaultProps.domain'))) { return calculatedDomain; } return specifiedDomain; }; /***/ }), /* 85 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = newInterval; var t0 = new Date, t1 = new Date; function newInterval(floori, offseti, count, field) { function interval(date) { return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date; } interval.floor = function(date) { return floori(date = new Date(+date)), date; }; interval.ceil = function(date) { return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; }; interval.round = function(date) { var d0 = interval(date), d1 = interval.ceil(date); return date - d0 < d1 - date ? d0 : d1; }; interval.offset = function(date, step) { return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; }; interval.range = function(start, stop, step) { var range = [], previous; start = interval.ceil(start); step = step == null ? 1 : Math.floor(step); if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date do range.push(previous = new Date(+start)), offseti(start, step), floori(start); while (previous < start && start < stop); return range; }; interval.filter = function(test) { return newInterval(function(date) { if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); }, function(date, step) { if (date >= date) { if (step < 0) while (++step <= 0) { while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty } else while (--step >= 0) { while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty } } }); }; if (count) { interval.count = function(start, end) { t0.setTime(+start), t1.setTime(+end); floori(t0), floori(t1); return Math.floor(count(t0, t1)); }; interval.every = function(step) { step = Math.floor(step); return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? function(d) { return field(d) % step === 0; } : function(d) { return interval.count(0, d) % step === 0; }); }; } return interval; } /***/ }), /* 86 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(967); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 87 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); // TODO: This module should be ElementChildren, and should use named exports. /** * Iterates through children that are typically specified as `props.children`, * but only maps over children that are "valid components". * * The mapFunction provided index will be normalised to the components mapped, * so an invalid component would not increase the index. * * @param {?*} children Children tree container. * @param {function(*, int)} func. * @param {*} context Context for func. * @return {object} Object containing the ordered map of results. */ function map(children, func, context) { var index = 0; return __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.map(children, function (child) { if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return child; } return func.call(context, child, index++); }); } /** * Iterates through children that are "valid components". * * The provided forEachFunc(child, index) will be called for each * leaf child with the index reflecting the position relative to "valid components". * * @param {?*} children Children tree container. * @param {function(*, int)} func. * @param {*} context Context for context. */ function forEach(children, func, context) { var index = 0; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } func.call(context, child, index++); }); } /** * Count the number of "valid components" in the Children container. * * @param {?*} children Children tree container. * @returns {number} */ function count(children) { var result = 0; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } ++result; }); return result; } /** * Finds children that are typically specified as `props.children`, * but only iterates over children that are "valid components". * * The provided forEachFunc(child, index) will be called for each * leaf child with the index reflecting the position relative to "valid components". * * @param {?*} children Children tree container. * @param {function(*, int)} func. * @param {*} context Context for func. * @returns {array} of children that meet the func return statement */ function filter(children, func, context) { var index = 0; var result = []; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } if (func.call(context, child, index++)) { result.push(child); } }); return result; } function find(children, func, context) { var index = 0; var result; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (result) { return; } if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } if (func.call(context, child, index++)) { result = child; } }); return result; } function every(children, func, context) { var index = 0; var result = true; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (!result) { return; } if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } if (!func.call(context, child, index++)) { result = false; } }); return result; } function some(children, func, context) { var index = 0; var result = false; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (result) { return; } if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } if (func.call(context, child, index++)) { result = true; } }); return result; } function toArray(children) { var result = []; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } result.push(child); }); return result; } /* harmony default export */ __webpack_exports__["a"] = ({ map: map, forEach: forEach, count: count, find: find, filter: filter, every: every, some: some, toArray: toArray }); /***/ }), /* 88 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2198); /***/ }), /* 89 */ /***/ (function(module, exports, __webpack_require__) { var v1 = __webpack_require__(2420); var v4 = __webpack_require__(2421); var uuid = v4; uuid.v1 = v1; uuid.v4 = v4; module.exports = uuid; /***/ }), /* 90 */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), /* 91 */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(719)('wks'); var uid = __webpack_require__(471); var Symbol = __webpack_require__(90).Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /* 92 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Grid__ = __webpack_require__(1206); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__Grid__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__Grid__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__accessibilityOverscanIndicesGetter__ = __webpack_require__(2741); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__accessibilityOverscanIndicesGetter__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultCellRangeRenderer__ = __webpack_require__(1209); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_2__defaultCellRangeRenderer__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultOverscanIndicesGetter__ = __webpack_require__(1208); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_3__defaultOverscanIndicesGetter__["c"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__types__ = __webpack_require__(31); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_4__types__["e"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__types__["a"]; }); /* unused harmony reexport bpfrpt_proptype_CellPosition */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_4__types__["d"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_4__types__["f"]; }); /* unused harmony reexport bpfrpt_proptype_RenderedSection */ /* unused harmony reexport bpfrpt_proptype_CellRendererParams */ /* unused harmony reexport bpfrpt_proptype_Scroll */ /***/ }), /* 93 */ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 94 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = initRange; /* harmony export (immutable) */ __webpack_exports__["a"] = initInterpolator; function initRange(domain, range) { switch (arguments.length) { case 0: break; case 1: this.range(domain); break; default: this.range(range).domain(domain); break; } return this; } function initInterpolator(domain, interpolator) { switch (arguments.length) { case 0: break; case 1: this.interpolator(domain); break; default: this.interpolator(interpolator).domain(domain); break; } return this; } /***/ }), /* 95 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); // TODO: This module should be ElementChildren, and should use named exports. /** * Iterates through children that are typically specified as `props.children`, * but only maps over children that are "valid components". * * The mapFunction provided index will be normalised to the components mapped, * so an invalid component would not increase the index. * * @param {?*} children Children tree container. * @param {function(*, int)} func. * @param {*} context Context for func. * @return {object} Object containing the ordered map of results. */ function map(children, func, context) { var index = 0; return __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.map(children, function (child) { if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return child; } return func.call(context, child, index++); }); } /** * Iterates through children that are "valid components". * * The provided forEachFunc(child, index) will be called for each * leaf child with the index reflecting the position relative to "valid components". * * @param {?*} children Children tree container. * @param {function(*, int)} func. * @param {*} context Context for context. */ function forEach(children, func, context) { var index = 0; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } func.call(context, child, index++); }); } /** * Count the number of "valid components" in the Children container. * * @param {?*} children Children tree container. * @returns {number} */ function count(children) { var result = 0; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } ++result; }); return result; } /** * Finds children that are typically specified as `props.children`, * but only iterates over children that are "valid components". * * The provided forEachFunc(child, index) will be called for each * leaf child with the index reflecting the position relative to "valid components". * * @param {?*} children Children tree container. * @param {function(*, int)} func. * @param {*} context Context for func. * @returns {array} of children that meet the func return statement */ function filter(children, func, context) { var index = 0; var result = []; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } if (func.call(context, child, index++)) { result.push(child); } }); return result; } function find(children, func, context) { var index = 0; var result; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (result) { return; } if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } if (func.call(context, child, index++)) { result = child; } }); return result; } function every(children, func, context) { var index = 0; var result = true; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (!result) { return; } if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } if (!func.call(context, child, index++)) { result = false; } }); return result; } function some(children, func, context) { var index = 0; var result = false; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (result) { return; } if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } if (func.call(context, child, index++)) { result = true; } }); return result; } function toArray(children) { var result = []; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (child) { if (!__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(child)) { return; } result.push(child); }); return result; } /* harmony default export */ __webpack_exports__["a"] = ({ map: map, forEach: forEach, count: count, find: find, filter: filter, every: every, some: some, toArray: toArray }); /***/ }), /* 96 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getValue = getValue; exports.convertValue = convertValue; exports.mutateValue = mutateValue; exports.extractDataAttributes = extractDataAttributes; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * Get a value stored in properties, identified by key * @param {object} properties The properties store * @param {object} schema The schema containing the key chain (array of strings) * to access to the value */ function getValue(properties, schema) { if (!schema.key) { return undefined; } return schema.key.reduce(function (accu, nextKey) { return accu && accu[nextKey]; }, properties); } /** * Convert a string value to the wanted type * @param type The string type * @param value The value to convert */ function convertValue(type, value) { if (value === '') { return undefined; } if (type === 'number') { return parseFloat(value); } return value; } /** * Mutate the properties, setting the value in the path identified by key * @param {object | array} properties The original properties store * @param {array} key The key chain (array of strings) to identify the path * @param {any} value The value to set * @returns {object} The new mutated properties. */ function mutateValueFromKey() { var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var key = arguments.length > 1 ? arguments[1] : undefined; var value = arguments.length > 2 ? arguments[2] : undefined; if (!key || !key.length) { return value; } var nextKey = key[0]; var restKeys = key.slice(1); var nextValue = mutateValueFromKey(properties[nextKey], restKeys, value); var nextProperties; if (properties instanceof Array) { nextProperties = properties.slice(0); } else { nextProperties = _objectSpread({}, properties); } if (nextValue === undefined) { delete nextProperties[nextKey]; return nextProperties; } nextProperties[nextKey] = nextValue; return nextProperties; } /** * Mutate the properties, setting the value in the input identified by schema * @param {object | array} properties The original properties store * @param {object} schema The input schema * @param {any} value The value to set * @returns {object} The new mutated properties. */ function mutateValue(properties, schema, value) { return mutateValueFromKey(properties, schema.key, value); } /** * Extract all the data-* attributes from the given props. * @param {object} props Some properties * @param {int} index An index if the data-* properties need to be suffixed with an index. * @return {object} Only the data-* properties with '.index' suffix if available. */ function extractDataAttributes(props, index) { var dataProps = {}; Object.keys(props).forEach(function (propName) { if (propName.startsWith('data-')) { dataProps[propName] = "".concat(props[propName]).concat(index !== undefined ? ".".concat(index) : ''); } }); return dataProps; } //# sourceMappingURL=properties.js.map /***/ }), /* 97 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(62); var createDesc = __webpack_require__(210); module.exports = __webpack_require__(53) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /* 98 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(28); var hide = __webpack_require__(97); var has = __webpack_require__(108); var SRC = __webpack_require__(211)('src'); var $toString = __webpack_require__(1684); var TO_STRING = 'toString'; var TPL = ('' + $toString).split(TO_STRING); __webpack_require__(117).inspectSource = function (it) { return $toString.call(it); }; (module.exports = function (O, key, val, safe) { var isFunction = typeof val == 'function'; if (isFunction) has(val, 'name') || hide(val, 'name', key); if (O[key] === val) return; if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); if (O === global) { O[key] = val; } else if (!safe) { delete O[key]; hide(O, key, val); } else if (O[key]) { O[key] = val; } else { hide(O, key, val); } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, TO_STRING, function toString() { return typeof this == 'function' && this[SRC] || $toString.call(this); }); /***/ }), /* 99 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(8); var fails = __webpack_require__(33); var defined = __webpack_require__(134); var quot = /"/g; // B.2.3.2.1 CreateHTML(string, tag, attribute, value) var createHTML = function (string, tag, attribute, value) { var S = String(defined(string)); var p1 = '<' + tag; if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; return p1 + '>' + S + ''; }; module.exports = function (NAME, exec) { var O = {}; O[NAME] = exec(createHTML); $export($export.P + $export.F * fails(function () { var test = ''[NAME]('"'); return test !== test.toLowerCase() || test.split('"').length > 3; }), 'String', O); }; /***/ }), /* 100 */ /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /* 101 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(419); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /* 102 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__ = __webpack_require__(2058); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["c"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["d"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["e"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["l"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["f"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["g"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["h"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["i"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["j"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["k"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_0__sentry_minimal__["m"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sentry_hub__ = __webpack_require__(272); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_1__sentry_hub__["c"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_1__sentry_hub__["d"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_1__sentry_hub__["e"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_1__sentry_hub__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_1__sentry_hub__["f"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_1__sentry_hub__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__api__ = __webpack_require__(2067); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__api__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseclient__ = __webpack_require__(2068); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_3__baseclient__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__basebackend__ = __webpack_require__(2070); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_4__basebackend__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__request__ = __webpack_require__(2071); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_5__request__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__sdk__ = __webpack_require__(2072); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_6__sdk__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__transports_noop__ = __webpack_require__(1029); /* unused harmony reexport NoopTransport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__integrations__ = __webpack_require__(2073); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_8__integrations__; }); //# sourceMappingURL=index.js.map /***/ }), /* 103 */ /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /* 104 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ArrowKeyStepper__ = __webpack_require__(2685); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ArrowKeyStepper", function() { return __WEBPACK_IMPORTED_MODULE_0__ArrowKeyStepper__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AutoSizer__ = __webpack_require__(2742); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "AutoSizer", function() { return __WEBPACK_IMPORTED_MODULE_1__AutoSizer__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__CellMeasurer__ = __webpack_require__(1220); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "CellMeasurer", function() { return __WEBPACK_IMPORTED_MODULE_2__CellMeasurer__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "CellMeasurerCache", function() { return __WEBPACK_IMPORTED_MODULE_2__CellMeasurer__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Collection__ = __webpack_require__(2745); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Collection", function() { return __WEBPACK_IMPORTED_MODULE_3__Collection__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ColumnSizer__ = __webpack_require__(2752); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnSizer", function() { return __WEBPACK_IMPORTED_MODULE_4__ColumnSizer__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Grid__ = __webpack_require__(92); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "accessibilityOverscanIndicesGetter", function() { return __WEBPACK_IMPORTED_MODULE_5__Grid__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultCellRangeRenderer", function() { return __WEBPACK_IMPORTED_MODULE_5__Grid__["h"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultOverscanIndicesGetter", function() { return __WEBPACK_IMPORTED_MODULE_5__Grid__["i"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return __WEBPACK_IMPORTED_MODULE_5__Grid__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__InfiniteLoader__ = __webpack_require__(2754); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "InfiniteLoader", function() { return __WEBPACK_IMPORTED_MODULE_6__InfiniteLoader__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__List__ = __webpack_require__(2756); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "List", function() { return __WEBPACK_IMPORTED_MODULE_7__List__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Masonry__ = __webpack_require__(2759); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createMasonryCellPositioner", function() { return __WEBPACK_IMPORTED_MODULE_8__Masonry__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Masonry", function() { return __WEBPACK_IMPORTED_MODULE_8__Masonry__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__MultiGrid__ = __webpack_require__(2771); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MultiGrid", function() { return __WEBPACK_IMPORTED_MODULE_9__MultiGrid__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ScrollSync__ = __webpack_require__(2774); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollSync", function() { return __WEBPACK_IMPORTED_MODULE_10__ScrollSync__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Table__ = __webpack_require__(2776); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createTableMultiSort", function() { return __WEBPACK_IMPORTED_MODULE_11__Table__["e"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultTableCellDataGetter", function() { return __WEBPACK_IMPORTED_MODULE_11__Table__["f"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultTableCellRenderer", function() { return __WEBPACK_IMPORTED_MODULE_11__Table__["g"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultTableHeaderRenderer", function() { return __WEBPACK_IMPORTED_MODULE_11__Table__["h"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultTableHeaderRowRenderer", function() { return __WEBPACK_IMPORTED_MODULE_11__Table__["i"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultTableRowRenderer", function() { return __WEBPACK_IMPORTED_MODULE_11__Table__["j"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Table", function() { return __WEBPACK_IMPORTED_MODULE_11__Table__["d"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Column", function() { return __WEBPACK_IMPORTED_MODULE_11__Table__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SortDirection", function() { return __WEBPACK_IMPORTED_MODULE_11__Table__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SortIndicator", function() { return __WEBPACK_IMPORTED_MODULE_11__Table__["c"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__WindowScroller__ = __webpack_require__(2779); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WindowScroller", function() { return __WEBPACK_IMPORTED_MODULE_12__WindowScroller__["a"]; }); /***/ }), /* 105 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.internalIds = exports.SELECTION_MODE = exports.SORT_BY = exports.cellTitleDisplayModes = exports.listTypes = void 0; var listTypes = { TABLE: 'TABLE', LARGE: 'LARGE', COLLAPSIBLE_PANEL: 'COLLAPSIBLE_PANEL' }; exports.listTypes = listTypes; var cellTitleDisplayModes = { TITLE_MODE_TEXT: 'text', TITLE_MODE_INPUT: 'input' }; exports.cellTitleDisplayModes = cellTitleDisplayModes; var SORT_BY = { ASC: 'ASC', DESC: 'DESC' }; exports.SORT_BY = SORT_BY; var SELECTION_MODE = { MULTI: 'MULTI', SINGLE: 'SINGLE' }; exports.SELECTION_MODE = SELECTION_MODE; var internalIds = { rowSelector: 'tc-list-internal-row-selector' }; exports.internalIds = internalIds; //# sourceMappingURL=constants.js.map /***/ }), /* 106 */ /***/ (function(module, exports) { /** * Checks if `value` is `null` or `undefined`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is nullish, else `false`. * @example * * _.isNil(null); * // => true * * _.isNil(void 0); * // => true * * _.isNil(NaN); * // => false */ function isNil(value) { return value == null; } module.exports = isNil; /***/ }), /* 107 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var check = function (it) { return it && it.Math == Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 module.exports = // eslint-disable-next-line no-undef check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || check(typeof self == 'object' && self) || check(typeof global == 'object' && global) || // eslint-disable-next-line no-new-func Function('return this')(); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27))) /***/ }), /* 108 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /* 109 */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(325); var defined = __webpack_require__(134); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /* 110 */ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(326); var createDesc = __webpack_require__(210); var toIObject = __webpack_require__(109); var toPrimitive = __webpack_require__(133); var has = __webpack_require__(108); var IE8_DOM_DEFINE = __webpack_require__(928); var gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(53) ? gOPD : function getOwnPropertyDescriptor(O, P) { O = toIObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { return gOPD(O, P); } catch (e) { /* empty */ } if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }), /* 111 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(108); var toObject = __webpack_require__(63); var IE_PROTO = __webpack_require__(562)('IE_PROTO'); var ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function (O) { O = toObject(O); if (has(O, IE_PROTO)) return O[IE_PROTO]; if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }), /* 112 */ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 113 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return sym; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return TASK; }); /* unused harmony export HELPER */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MATCH; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CANCEL; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SAGA_ACTION; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return SELF_CANCELLATION; }); /* unused harmony export konst */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return kTrue; }); /* unused harmony export kFalse */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return noop; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return ident; }); /* harmony export (immutable) */ __webpack_exports__["h"] = check; /* unused harmony export hasOwn */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return is; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return object; }); /* harmony export (immutable) */ __webpack_exports__["w"] = remove; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return array; }); /* harmony export (immutable) */ __webpack_exports__["l"] = deferred; /* harmony export (immutable) */ __webpack_exports__["g"] = arrayOfDeffered; /* harmony export (immutable) */ __webpack_exports__["m"] = delay; /* harmony export (immutable) */ __webpack_exports__["j"] = createMockTask; /* unused harmony export autoInc */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return uid; }); /* harmony export (immutable) */ __webpack_exports__["t"] = makeIterator; /* harmony export (immutable) */ __webpack_exports__["s"] = log; /* harmony export (immutable) */ __webpack_exports__["n"] = deprecate; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return updateIncentive; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return internalErr; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return createSetContextWarning; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return wrapSagaDispatch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return cloneableGenerator; }); 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; }; 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; }; var sym = function sym(id) { return '@@redux-saga/' + id; }; var TASK = sym('TASK'); var HELPER = sym('HELPER'); var MATCH = sym('MATCH'); var CANCEL = sym('CANCEL_PROMISE'); var SAGA_ACTION = sym('SAGA_ACTION'); var SELF_CANCELLATION = sym('SELF_CANCELLATION'); var konst = function konst(v) { return function () { return v; }; }; var kTrue = konst(true); var kFalse = konst(false); var noop = function noop() {}; var ident = function ident(v) { return v; }; function check(value, predicate, error) { if (!predicate(value)) { log('error', 'uncaught at check', error); throw new Error(error); } } var hasOwnProperty = Object.prototype.hasOwnProperty; function hasOwn(object, property) { return is.notUndef(object) && hasOwnProperty.call(object, property); } var is = { undef: function undef(v) { return v === null || v === undefined; }, notUndef: function notUndef(v) { return v !== null && v !== undefined; }, func: function func(f) { return typeof f === 'function'; }, number: function number(n) { return typeof n === 'number'; }, string: function string(s) { return typeof s === 'string'; }, array: Array.isArray, object: function object(obj) { return obj && !is.array(obj) && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object'; }, promise: function promise(p) { return p && is.func(p.then); }, iterator: function iterator(it) { return it && is.func(it.next) && is.func(it.throw); }, iterable: function iterable(it) { return it && is.func(Symbol) ? is.func(it[Symbol.iterator]) : is.array(it); }, task: function task(t) { return t && t[TASK]; }, observable: function observable(ob) { return ob && is.func(ob.subscribe); }, buffer: function buffer(buf) { return buf && is.func(buf.isEmpty) && is.func(buf.take) && is.func(buf.put); }, pattern: function pattern(pat) { return pat && (is.string(pat) || (typeof pat === 'undefined' ? 'undefined' : _typeof(pat)) === 'symbol' || is.func(pat) || is.array(pat)); }, channel: function channel(ch) { return ch && is.func(ch.take) && is.func(ch.close); }, helper: function helper(it) { return it && it[HELPER]; }, stringableFunc: function stringableFunc(f) { return is.func(f) && hasOwn(f, 'toString'); } }; var object = { assign: function assign(target, source) { for (var i in source) { if (hasOwn(source, i)) { target[i] = source[i]; } } } }; function remove(array, item) { var index = array.indexOf(item); if (index >= 0) { array.splice(index, 1); } } var array = { from: function from(obj) { var arr = Array(obj.length); for (var i in obj) { if (hasOwn(obj, i)) { arr[i] = obj[i]; } } return arr; } }; function deferred() { var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var def = _extends({}, props); var promise = new Promise(function (resolve, reject) { def.resolve = resolve; def.reject = reject; }); def.promise = promise; return def; } function arrayOfDeffered(length) { var arr = []; for (var i = 0; i < length; i++) { arr.push(deferred()); } return arr; } function delay(ms) { var val = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var timeoutId = void 0; var promise = new Promise(function (resolve) { timeoutId = setTimeout(function () { return resolve(val); }, ms); }); promise[CANCEL] = function () { return clearTimeout(timeoutId); }; return promise; } function createMockTask() { var _ref; var running = true; var _result = void 0, _error = void 0; return _ref = {}, _ref[TASK] = true, _ref.isRunning = function isRunning() { return running; }, _ref.result = function result() { return _result; }, _ref.error = function error() { return _error; }, _ref.setRunning = function setRunning(b) { return running = b; }, _ref.setResult = function setResult(r) { return _result = r; }, _ref.setError = function setError(e) { return _error = e; }, _ref; } function autoInc() { var seed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; return function () { return ++seed; }; } var uid = autoInc(); var kThrow = function kThrow(err) { throw err; }; var kReturn = function kReturn(value) { return { value: value, done: true }; }; function makeIterator(next) { var thro = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : kThrow; var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; var isHelper = arguments[3]; var iterator = { name: name, next: next, throw: thro, return: kReturn }; if (isHelper) { iterator[HELPER] = true; } if (typeof Symbol !== 'undefined') { iterator[Symbol.iterator] = function () { return iterator; }; } return iterator; } /** Print error in a useful way whether in a browser environment (with expandable error stack traces), or in a node.js environment (text-only log output) **/ function log(level, message) { var error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; /*eslint-disable no-console*/ if (typeof window === 'undefined') { console.log('redux-saga ' + level + ': ' + message + '\n' + (error && error.stack || error)); } else { console[level](message, error); } } function deprecate(fn, deprecationWarning) { return function () { if (process.env.NODE_ENV === 'development') log('warn', deprecationWarning); return fn.apply(undefined, arguments); }; } var updateIncentive = function updateIncentive(deprecated, preferred) { return deprecated + ' has been deprecated in favor of ' + preferred + ', please update your code'; }; var internalErr = function internalErr(err) { return new Error('\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project\'s github repo.\n Error: ' + err + '\n'); }; var createSetContextWarning = function createSetContextWarning(ctx, props) { return (ctx ? ctx + '.' : '') + 'setContext(props): argument ' + props + ' is not a plain object'; }; var wrapSagaDispatch = function wrapSagaDispatch(dispatch) { return function (action) { return dispatch(Object.defineProperty(action, SAGA_ACTION, { value: true })); }; }; var cloneableGenerator = function cloneableGenerator(generatorFunc) { return function () { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var history = []; var gen = generatorFunc.apply(undefined, args); return { next: function next(arg) { history.push(arg); return gen.next(arg); }, clone: function clone() { var clonedGen = cloneableGenerator(generatorFunc).apply(undefined, args); history.forEach(function (arg) { return clonedGen.next(arg); }); return clonedGen; }, return: function _return(value) { return gen.return(value); }, throw: function _throw(exception) { return gen.throw(exception); } }; }; }; /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 114 */ /***/ (function(module, exports, __webpack_require__) { var baseMatches = __webpack_require__(3495), baseMatchesProperty = __webpack_require__(3515), identity = __webpack_require__(296), isArray = __webpack_require__(39), property = __webpack_require__(3519); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }), /* 115 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Animate__ = __webpack_require__(1422); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__easing__ = __webpack_require__(1424); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__(515); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__AnimateGroup__ = __webpack_require__(3535); /* unused harmony reexport configSpring */ /* unused harmony reexport configBezier */ /* unused harmony reexport AnimateGroup */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__util__["e"]; }); /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__Animate__["a" /* default */]); /***/ }), /* 116 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = getDefaultT; var _i18next = __webpack_require__(341); var _reactI18next = __webpack_require__(10); // eslint-disable-next-line import/prefer-default-export function getDefaultT() { return (0, _reactI18next.getI18n)().t.bind((0, _reactI18next.getI18n)()); } if (!(0, _reactI18next.getI18n)()) { // eslint-disable-next-line no-console console.warn('@talend/react-forms used without i18n host.'); (0, _reactI18next.setI18n)((0, _i18next.createInstance)({}, function () {})); } //# sourceMappingURL=translate.js.map /***/ }), /* 117 */ /***/ (function(module, exports) { var core = module.exports = { version: '2.6.10' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /* 118 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(80); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /* 119 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /* 120 */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /* 121 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__(33); module.exports = function (method, arg) { return !!method && fails(function () { // eslint-disable-next-line no-useless-call arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); }); }; /***/ }), /* 122 */ /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__(433); function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { defineProperty(target, key, source[key]); }); } return target; } module.exports = _objectSpread; /***/ }), /* 123 */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), /* 124 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_createChainedFunction__ = __webpack_require__(68); var propTypes = { href: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, onClick: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, onKeyDown: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, disabled: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, role: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, tabIndex: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string]), /** * this is sort of silly but needed for Button */ componentClass: __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'a' }; function isTrivialHref(href) { return !href || href.trim() === '#'; } /** * There are situations due to browser quirks or Bootstrap CSS where * an anchor tag is needed, when semantically a button tag is the * better choice. SafeAnchor ensures that when an anchor is used like a * button its accessible. It also emulates input `disabled` behavior for * links, which is usually desirable for Buttons, NavItems, MenuItems, etc. */ var SafeAnchor = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(SafeAnchor, _React$Component); function SafeAnchor(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; _this.handleClick = _this.handleClick.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleKeyDown = _this.handleKeyDown.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); return _this; } var _proto = SafeAnchor.prototype; _proto.handleClick = function handleClick(event) { var _this$props = this.props, disabled = _this$props.disabled, href = _this$props.href, onClick = _this$props.onClick; if (disabled || isTrivialHref(href)) { event.preventDefault(); } if (disabled) { event.stopPropagation(); return; } if (onClick) { onClick(event); } }; _proto.handleKeyDown = function handleKeyDown(event) { if (event.key === ' ') { event.preventDefault(); this.handleClick(event); } }; _proto.render = function render() { var _this$props2 = this.props, Component = _this$props2.componentClass, disabled = _this$props2.disabled, onKeyDown = _this$props2.onKeyDown, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props2, ["componentClass", "disabled", "onKeyDown"]); if (isTrivialHref(props.href)) { props.role = props.role || 'button'; // we want to make sure there is a href attribute on the node // otherwise, the cursor incorrectly styled (except with role='button') props.href = props.href || '#'; } if (disabled) { props.tabIndex = -1; props.style = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({ pointerEvents: 'none' }, props.style); } return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { onClick: this.handleClick, onKeyDown: Object(__WEBPACK_IMPORTED_MODULE_7__utils_createChainedFunction__["a" /* default */])(this.handleKeyDown, onKeyDown) })); }; return SafeAnchor; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); SafeAnchor.propTypes = propTypes; SafeAnchor.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (SafeAnchor); /***/ }), /* 125 */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(643)('wks'); var uid = __webpack_require__(444); var Symbol = __webpack_require__(123).Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /* 126 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(1112); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 127 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(90); var core = __webpack_require__(65); var ctx = __webpack_require__(286); var hide = __webpack_require__(236); var has = __webpack_require__(235); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var IS_WRAP = type & $export.W; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE]; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; var key, own, out; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; if (own && has(exports, key)) continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function (C) { var F = function (a, b, c) { if (this instanceof C) { switch (arguments.length) { case 0: return new C(); case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if (IS_PROTO) { (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /* 128 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(1260); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 129 */ /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /* 130 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RADIAN; }); /* unused harmony export degreeToRadian */ /* unused harmony export radianToDegree */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return polarToCartesian; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getMaxRadius; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return formatAxisMap; }); /* unused harmony export distanceBetweenPoints */ /* unused harmony export getAngleOfPoint */ /* unused harmony export formatAngleOfSector */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return inRangeOfSector; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isNil__ = __webpack_require__(106); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isNil__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__DataUtils__ = __webpack_require__(42); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ChartUtils__ = __webpack_require__(84); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var RADIAN = Math.PI / 180; var degreeToRadian = function degreeToRadian(angle) { return angle * Math.PI / 180; }; var radianToDegree = function radianToDegree(angleInRadian) { return angleInRadian * 180 / Math.PI; }; var polarToCartesian = function polarToCartesian(cx, cy, radius, angle) { return { x: cx + Math.cos(-RADIAN * angle) * radius, y: cy + Math.sin(-RADIAN * angle) * radius }; }; var getMaxRadius = function getMaxRadius(width, height) { var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { top: 0, right: 0, bottom: 0, left: 0 }; return Math.min(Math.abs(width - (offset.left || 0) - (offset.right || 0)), Math.abs(height - (offset.top || 0) - (offset.bottom || 0))) / 2; }; /** * Calculate the scale function, position, width, height of axes * @param {Object} props Latest props * @param {Object} axisMap The configuration of axes * @param {Object} offset The offset of main part in the svg element * @param {Object} axisType The type of axes, radius-axis or angle-axis * @param {String} chartName The name of chart * @return {Object} Configuration */ var formatAxisMap = function formatAxisMap(props, axisMap, offset, axisType, chartName) { var width = props.width, height = props.height; var startAngle = props.startAngle, endAngle = props.endAngle; var cx = Object(__WEBPACK_IMPORTED_MODULE_1__DataUtils__["d" /* getPercentValue */])(props.cx, width, width / 2); var cy = Object(__WEBPACK_IMPORTED_MODULE_1__DataUtils__["d" /* getPercentValue */])(props.cy, height, height / 2); var maxRadius = getMaxRadius(width, height, offset); var innerRadius = Object(__WEBPACK_IMPORTED_MODULE_1__DataUtils__["d" /* getPercentValue */])(props.innerRadius, maxRadius, 0); var outerRadius = Object(__WEBPACK_IMPORTED_MODULE_1__DataUtils__["d" /* getPercentValue */])(props.outerRadius, maxRadius, maxRadius * 0.8); var ids = Object.keys(axisMap); return ids.reduce(function (result, id) { var axis = axisMap[id]; var domain = axis.domain, reversed = axis.reversed; var range; if (__WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(axis.range)) { if (axisType === 'angleAxis') { range = [startAngle, endAngle]; } else if (axisType === 'radiusAxis') { range = [innerRadius, outerRadius]; } if (reversed) { range = [range[1], range[0]]; } } else { range = axis.range; var _range = range; var _range2 = _slicedToArray(_range, 2); startAngle = _range2[0]; endAngle = _range2[1]; } var _parseScale = Object(__WEBPACK_IMPORTED_MODULE_2__ChartUtils__["z" /* parseScale */])(axis, chartName), realScaleType = _parseScale.realScaleType, scale = _parseScale.scale; scale.domain(domain).range(range); Object(__WEBPACK_IMPORTED_MODULE_2__ChartUtils__["c" /* checkDomainOfScale */])(scale); var ticks = Object(__WEBPACK_IMPORTED_MODULE_2__ChartUtils__["u" /* getTicksOfScale */])(scale, _objectSpread({}, axis, { realScaleType: realScaleType })); var finalAxis = _objectSpread({}, axis, {}, ticks, { range: range, radius: outerRadius, realScaleType: realScaleType, scale: scale, cx: cx, cy: cy, innerRadius: innerRadius, outerRadius: outerRadius, startAngle: startAngle, endAngle: endAngle }); return _objectSpread({}, result, _defineProperty({}, id, finalAxis)); }, {}); }; var distanceBetweenPoints = function distanceBetweenPoints(point, anotherPoint) { var x1 = point.x, y1 = point.y; var x2 = anotherPoint.x, y2 = anotherPoint.y; return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)); }; var getAngleOfPoint = function getAngleOfPoint(_ref, _ref2) { var x = _ref.x, y = _ref.y; var cx = _ref2.cx, cy = _ref2.cy; var radius = distanceBetweenPoints({ x: x, y: y }, { x: cx, y: cy }); if (radius <= 0) { return { radius: radius }; } var cos = (x - cx) / radius; var angleInRadian = Math.acos(cos); if (y > cy) { angleInRadian = 2 * Math.PI - angleInRadian; } return { radius: radius, angle: radianToDegree(angleInRadian), angleInRadian: angleInRadian }; }; var formatAngleOfSector = function formatAngleOfSector(_ref3) { var startAngle = _ref3.startAngle, endAngle = _ref3.endAngle; var startCnt = Math.floor(startAngle / 360); var endCnt = Math.floor(endAngle / 360); var min = Math.min(startCnt, endCnt); return { startAngle: startAngle - min * 360, endAngle: endAngle - min * 360 }; }; var reverseFormatAngleOfSetor = function reverseFormatAngleOfSetor(angle, _ref4) { var startAngle = _ref4.startAngle, endAngle = _ref4.endAngle; var startCnt = Math.floor(startAngle / 360); var endCnt = Math.floor(endAngle / 360); var min = Math.min(startCnt, endCnt); return angle + min * 360; }; var inRangeOfSector = function inRangeOfSector(_ref5, sector) { var x = _ref5.x, y = _ref5.y; var _getAngleOfPoint = getAngleOfPoint({ x: x, y: y }, sector), radius = _getAngleOfPoint.radius, angle = _getAngleOfPoint.angle; var innerRadius = sector.innerRadius, outerRadius = sector.outerRadius; if (radius < innerRadius || radius > outerRadius) { return false; } if (radius === 0) { return true; } var _formatAngleOfSector = formatAngleOfSector(sector), startAngle = _formatAngleOfSector.startAngle, endAngle = _formatAngleOfSector.endAngle; var formatAngle = angle; var inRange; if (startAngle <= endAngle) { while (formatAngle > endAngle) { formatAngle -= 360; } while (formatAngle < startAngle) { formatAngle += 360; } inRange = formatAngle >= startAngle && formatAngle <= endAngle; } else { while (formatAngle > startAngle) { formatAngle -= 360; } while (formatAngle < endAngle) { formatAngle += 360; } inRange = formatAngle >= endAngle && formatAngle <= startAngle; } if (inRange) { return _objectSpread({}, sector, { radius: radius, angle: reverseFormatAngleOfSetor(formatAngle, sector) }); } return null; }; /***/ }), /* 131 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (error) { return true; } }; /***/ }), /* 132 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_createChainedFunction__ = __webpack_require__(69); var propTypes = { href: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, onClick: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, onKeyDown: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, disabled: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, role: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, tabIndex: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string]), /** * this is sort of silly but needed for Button */ componentClass: __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'a' }; function isTrivialHref(href) { return !href || href.trim() === '#'; } /** * There are situations due to browser quirks or Bootstrap CSS where * an anchor tag is needed, when semantically a button tag is the * better choice. SafeAnchor ensures that when an anchor is used like a * button its accessible. It also emulates input `disabled` behavior for * links, which is usually desirable for Buttons, NavItems, MenuItems, etc. */ var SafeAnchor = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(SafeAnchor, _React$Component); function SafeAnchor(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; _this.handleClick = _this.handleClick.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleKeyDown = _this.handleKeyDown.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); return _this; } var _proto = SafeAnchor.prototype; _proto.handleClick = function handleClick(event) { var _this$props = this.props, disabled = _this$props.disabled, href = _this$props.href, onClick = _this$props.onClick; if (disabled || isTrivialHref(href)) { event.preventDefault(); } if (disabled) { event.stopPropagation(); return; } if (onClick) { onClick(event); } }; _proto.handleKeyDown = function handleKeyDown(event) { if (event.key === ' ') { event.preventDefault(); this.handleClick(event); } }; _proto.render = function render() { var _this$props2 = this.props, Component = _this$props2.componentClass, disabled = _this$props2.disabled, onKeyDown = _this$props2.onKeyDown, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props2, ["componentClass", "disabled", "onKeyDown"]); if (isTrivialHref(props.href)) { props.role = props.role || 'button'; // we want to make sure there is a href attribute on the node // otherwise, the cursor incorrectly styled (except with role='button') props.href = props.href || '#'; } if (disabled) { props.tabIndex = -1; props.style = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({ pointerEvents: 'none' }, props.style); } return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { onClick: this.handleClick, onKeyDown: Object(__WEBPACK_IMPORTED_MODULE_7__utils_createChainedFunction__["a" /* default */])(this.handleKeyDown, onKeyDown) })); }; return SafeAnchor; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); SafeAnchor.propTypes = propTypes; SafeAnchor.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (SafeAnchor); /***/ }), /* 133 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(35); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /* 134 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /* 135 */ /***/ (function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(8); var core = __webpack_require__(117); var fails = __webpack_require__(33); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; /***/ }), /* 136 */ /***/ (function(module, exports, __webpack_require__) { // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var ctx = __webpack_require__(118); var IObject = __webpack_require__(325); var toObject = __webpack_require__(63); var toLength = __webpack_require__(50); var asc = __webpack_require__(578); module.exports = function (TYPE, $create) { var IS_MAP = TYPE == 1; var IS_FILTER = TYPE == 2; var IS_SOME = TYPE == 3; var IS_EVERY = TYPE == 4; var IS_FIND_INDEX = TYPE == 6; var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; var create = $create || asc; return function ($this, callbackfn, that) { var O = toObject($this); var self = IObject(O); var f = ctx(callbackfn, that, 3); var length = toLength(self.length); var index = 0; var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; var val, res; for (;length > index; index++) if (NO_HOLES || index in self) { val = self[index]; res = f(val, index, O); if (TYPE) { if (IS_MAP) result[index] = res; // map else if (res) switch (TYPE) { case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if (IS_EVERY) return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; /***/ }), /* 137 */ /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /* 138 */ /***/ (function(module, exports) { function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } module.exports = _classCallCheck; /***/ }), /* 139 */ /***/ (function(module, exports) { function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } module.exports = _createClass; /***/ }), /* 140 */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 141 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(185)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 142 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = void 0; var _default = !!(typeof window !== 'undefined' && window.document && window.document.createElement); exports.default = _default; module.exports = exports["default"]; /***/ }), /* 143 */ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 144 */ /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /* 145 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = void 0; /** * Safe chained function * * Will only create a new function if needed, * otherwise will pass back existing functions or null. * * @param {function} functions to chain * @returns {function|null} */ function createChainedFunction() { for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { funcs[_key] = arguments[_key]; } return funcs.filter(function (f) { return f != null; }).reduce(function (acc, f) { if (typeof f !== 'function') { throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.'); } if (acc === null) { return f; } return function chainedFunction() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } acc.apply(this, args); f.apply(this, args); }; }, null); } var _default = createChainedFunction; exports.default = _default; module.exports = exports["default"]; /***/ }), /* 146 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(195); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /* 147 */ /***/ (function(module, exports, __webpack_require__) { var getDayOfYear = __webpack_require__(1236) var getISOWeek = __webpack_require__(741) var getISOYear = __webpack_require__(239) var parse = __webpack_require__(9) var isValid = __webpack_require__(1238) var enLocale = __webpack_require__(742) /** * @category Common Helpers * @summary Format the date. * * @description * Return the formatted date string in the given format. * * Accepted tokens: * | Unit | Token | Result examples | * |-------------------------|-------|----------------------------------| * | Month | M | 1, 2, ..., 12 | * | | Mo | 1st, 2nd, ..., 12th | * | | MM | 01, 02, ..., 12 | * | | MMM | Jan, Feb, ..., Dec | * | | MMMM | January, February, ..., December | * | Quarter | Q | 1, 2, 3, 4 | * | | Qo | 1st, 2nd, 3rd, 4th | * | Day of month | D | 1, 2, ..., 31 | * | | Do | 1st, 2nd, ..., 31st | * | | DD | 01, 02, ..., 31 | * | Day of year | DDD | 1, 2, ..., 366 | * | | DDDo | 1st, 2nd, ..., 366th | * | | DDDD | 001, 002, ..., 366 | * | Day of week | d | 0, 1, ..., 6 | * | | do | 0th, 1st, ..., 6th | * | | dd | Su, Mo, ..., Sa | * | | ddd | Sun, Mon, ..., Sat | * | | dddd | Sunday, Monday, ..., Saturday | * | Day of ISO week | E | 1, 2, ..., 7 | * | ISO week | W | 1, 2, ..., 53 | * | | Wo | 1st, 2nd, ..., 53rd | * | | WW | 01, 02, ..., 53 | * | Year | YY | 00, 01, ..., 99 | * | | YYYY | 1900, 1901, ..., 2099 | * | ISO week-numbering year | GG | 00, 01, ..., 99 | * | | GGGG | 1900, 1901, ..., 2099 | * | AM/PM | A | AM, PM | * | | a | am, pm | * | | aa | a.m., p.m. | * | Hour | H | 0, 1, ... 23 | * | | HH | 00, 01, ... 23 | * | | h | 1, 2, ..., 12 | * | | hh | 01, 02, ..., 12 | * | Minute | m | 0, 1, ..., 59 | * | | mm | 00, 01, ..., 59 | * | Second | s | 0, 1, ..., 59 | * | | ss | 00, 01, ..., 59 | * | 1/10 of second | S | 0, 1, ..., 9 | * | 1/100 of second | SS | 00, 01, ..., 99 | * | Millisecond | SSS | 000, 001, ..., 999 | * | Timezone | Z | -01:00, +00:00, ... +12:00 | * | | ZZ | -0100, +0000, ..., +1200 | * | Seconds timestamp | X | 512969520 | * | Milliseconds timestamp | x | 512969520900 | * * The characters wrapped in square brackets are escaped. * * The result may vary by locale. * * @param {Date|String|Number} date - the original date * @param {String} [format='YYYY-MM-DDTHH:mm:ss.SSSZ'] - the string of tokens * @param {Object} [options] - the object with options * @param {Object} [options.locale=enLocale] - the locale object * @returns {String} the formatted date string * * @example * // Represent 11 February 2014 in middle-endian format: * var result = format( * new Date(2014, 1, 11), * 'MM/DD/YYYY' * ) * //=> '02/11/2014' * * @example * // Represent 2 July 2014 in Esperanto: * var eoLocale = require('date-fns/locale/eo') * var result = format( * new Date(2014, 6, 2), * 'Do [de] MMMM YYYY', * {locale: eoLocale} * ) * //=> '2-a de julio 2014' */ function format (dirtyDate, formatStr, options) { formatStr = formatStr || 'YYYY-MM-DDTHH:mm:ss.SSSZ' options = options || {} var locale = options.locale var localeFormatters = enLocale.format.formatters var formattingTokensRegExp = enLocale.format.formattingTokensRegExp if (locale && locale.format && locale.format.formatters) { localeFormatters = locale.format.formatters if (locale.format.formattingTokensRegExp) { formattingTokensRegExp = locale.format.formattingTokensRegExp } } var date = parse(dirtyDate) if (!isValid(date)) { return 'Invalid Date' } var formatFn = buildFormatFn(formatStr, localeFormatters, formattingTokensRegExp) return formatFn(date) } var formatters = { // Month: 1, 2, ..., 12 'M': function (date) { return date.getMonth() + 1 }, // Month: 01, 02, ..., 12 'MM': function (date) { return addLeadingZeros(date.getMonth() + 1, 2) }, // Quarter: 1, 2, 3, 4 'Q': function (date) { return Math.ceil((date.getMonth() + 1) / 3) }, // Day of month: 1, 2, ..., 31 'D': function (date) { return date.getDate() }, // Day of month: 01, 02, ..., 31 'DD': function (date) { return addLeadingZeros(date.getDate(), 2) }, // Day of year: 1, 2, ..., 366 'DDD': function (date) { return getDayOfYear(date) }, // Day of year: 001, 002, ..., 366 'DDDD': function (date) { return addLeadingZeros(getDayOfYear(date), 3) }, // Day of week: 0, 1, ..., 6 'd': function (date) { return date.getDay() }, // Day of ISO week: 1, 2, ..., 7 'E': function (date) { return date.getDay() || 7 }, // ISO week: 1, 2, ..., 53 'W': function (date) { return getISOWeek(date) }, // ISO week: 01, 02, ..., 53 'WW': function (date) { return addLeadingZeros(getISOWeek(date), 2) }, // Year: 00, 01, ..., 99 'YY': function (date) { return addLeadingZeros(date.getFullYear(), 4).substr(2) }, // Year: 1900, 1901, ..., 2099 'YYYY': function (date) { return addLeadingZeros(date.getFullYear(), 4) }, // ISO week-numbering year: 00, 01, ..., 99 'GG': function (date) { return String(getISOYear(date)).substr(2) }, // ISO week-numbering year: 1900, 1901, ..., 2099 'GGGG': function (date) { return getISOYear(date) }, // Hour: 0, 1, ... 23 'H': function (date) { return date.getHours() }, // Hour: 00, 01, ..., 23 'HH': function (date) { return addLeadingZeros(date.getHours(), 2) }, // Hour: 1, 2, ..., 12 'h': function (date) { var hours = date.getHours() if (hours === 0) { return 12 } else if (hours > 12) { return hours % 12 } else { return hours } }, // Hour: 01, 02, ..., 12 'hh': function (date) { return addLeadingZeros(formatters['h'](date), 2) }, // Minute: 0, 1, ..., 59 'm': function (date) { return date.getMinutes() }, // Minute: 00, 01, ..., 59 'mm': function (date) { return addLeadingZeros(date.getMinutes(), 2) }, // Second: 0, 1, ..., 59 's': function (date) { return date.getSeconds() }, // Second: 00, 01, ..., 59 'ss': function (date) { return addLeadingZeros(date.getSeconds(), 2) }, // 1/10 of second: 0, 1, ..., 9 'S': function (date) { return Math.floor(date.getMilliseconds() / 100) }, // 1/100 of second: 00, 01, ..., 99 'SS': function (date) { return addLeadingZeros(Math.floor(date.getMilliseconds() / 10), 2) }, // Millisecond: 000, 001, ..., 999 'SSS': function (date) { return addLeadingZeros(date.getMilliseconds(), 3) }, // Timezone: -01:00, +00:00, ... +12:00 'Z': function (date) { return formatTimezone(date.getTimezoneOffset(), ':') }, // Timezone: -0100, +0000, ... +1200 'ZZ': function (date) { return formatTimezone(date.getTimezoneOffset()) }, // Seconds timestamp: 512969520 'X': function (date) { return Math.floor(date.getTime() / 1000) }, // Milliseconds timestamp: 512969520900 'x': function (date) { return date.getTime() } } function buildFormatFn (formatStr, localeFormatters, formattingTokensRegExp) { var array = formatStr.match(formattingTokensRegExp) var length = array.length var i var formatter for (i = 0; i < length; i++) { formatter = localeFormatters[array[i]] || formatters[array[i]] if (formatter) { array[i] = formatter } else { array[i] = removeFormattingTokens(array[i]) } } return function (date) { var output = '' for (var i = 0; i < length; i++) { if (array[i] instanceof Function) { output += array[i](date, formatters) } else { output += array[i] } } return output } } function removeFormattingTokens (input) { if (input.match(/\[[\s\S]/)) { return input.replace(/^\[|]$/g, '') } return input.replace(/\\/g, '') } function formatTimezone (offset, delimeter) { delimeter = delimeter || '' var sign = offset > 0 ? '-' : '+' var absOffset = Math.abs(offset) var hours = Math.floor(absOffset / 60) var minutes = absOffset % 60 return sign + addLeadingZeros(hours, 2) + delimeter + addLeadingZeros(minutes, 2) } function addLeadingZeros (number, targetLength) { var output = Math.abs(number).toString() while (output.length < targetLength) { output = '0' + output } return output } module.exports = format /***/ }), /* 148 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(200), getPrototype = __webpack_require__(765), isObjectLike = __webpack_require__(129); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; /***/ }), /* 149 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = Content; exports.defaultColumnConfiguration = void 0; var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(2)); var _reactVirtualized = __webpack_require__(104); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function DefaultRenderer(_ref) { var cellData = _ref.cellData; return /*#__PURE__*/_react["default"].createElement("div", { className: "tc-virtualizedlist-default-cell" }, cellData); } DefaultRenderer.propTypes = { cellData: _propTypes["default"].string }; var defaultColumnConfiguration = _objectSpread(_objectSpread({}, _reactVirtualized.Column.defaultProps), {}, { cellRenderer: DefaultRenderer, width: -1 }); // this is a fake component to be usable in JSX, // but the element is used as props object internally (VirtualizedList / RV) exports.defaultColumnConfiguration = defaultColumnConfiguration; function Content() { return null; } Content.displayName = 'Content'; Content.defaultProps = defaultColumnConfiguration; //# sourceMappingURL=Content.component.js.map /***/ }), /* 150 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(832); /** * Performs a deep comparison between two values to determine if they are * equivalent. * * **Note:** This method supports comparing arrays, array buffers, booleans, * date objects, error objects, maps, numbers, `Object` objects, regexes, * sets, strings, symbols, and typed arrays. `Object` objects are compared * by their own, not inherited, enumerable properties. Functions and DOM * nodes are compared by strict equality, i.e. `===`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true * * object === other; * // => false */ function isEqual(value, other) { return baseIsEqual(value, other); } module.exports = isEqual; /***/ }), /* 151 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__bisect__ = __webpack_require__(1442); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__bisect__["a"]; }); /* unused harmony reexport bisectRight */ /* unused harmony reexport bisectLeft */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ascending__ = __webpack_require__(308); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__ascending__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bisector__ = __webpack_require__(1443); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__bisector__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__cross__ = __webpack_require__(3568); /* unused harmony reexport cross */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__descending__ = __webpack_require__(3569); /* unused harmony reexport descending */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__deviation__ = __webpack_require__(1445); /* unused harmony reexport deviation */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__extent__ = __webpack_require__(1447); /* unused harmony reexport extent */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__histogram__ = __webpack_require__(3570); /* unused harmony reexport histogram */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__threshold_freedmanDiaconis__ = __webpack_require__(3573); /* unused harmony reexport thresholdFreedmanDiaconis */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__threshold_scott__ = __webpack_require__(3574); /* unused harmony reexport thresholdScott */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__threshold_sturges__ = __webpack_require__(1451); /* unused harmony reexport thresholdSturges */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__max__ = __webpack_require__(3575); /* unused harmony reexport max */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__mean__ = __webpack_require__(3576); /* unused harmony reexport mean */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__median__ = __webpack_require__(3577); /* unused harmony reexport median */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__merge__ = __webpack_require__(3578); /* unused harmony reexport merge */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__min__ = __webpack_require__(1452); /* unused harmony reexport min */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__pairs__ = __webpack_require__(1444); /* unused harmony reexport pairs */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__permute__ = __webpack_require__(3579); /* unused harmony reexport permute */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__quantile__ = __webpack_require__(842); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_18__quantile__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__range__ = __webpack_require__(1449); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_19__range__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__scan__ = __webpack_require__(3580); /* unused harmony reexport scan */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__shuffle__ = __webpack_require__(3581); /* unused harmony reexport shuffle */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__sum__ = __webpack_require__(3582); /* unused harmony reexport sum */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__ticks__ = __webpack_require__(1450); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_23__ticks__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_23__ticks__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_23__ticks__["c"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__transpose__ = __webpack_require__(1453); /* unused harmony reexport transpose */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__variance__ = __webpack_require__(1446); /* unused harmony reexport variance */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__zip__ = __webpack_require__(3583); /* unused harmony reexport zip */ /***/ }), /* 152 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(1562); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 153 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Widget = _interopRequireDefault(__webpack_require__(4104)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Widget["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 154 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(1650); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 155 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; if (__webpack_require__(53)) { var LIBRARY = __webpack_require__(176); var global = __webpack_require__(28); var fails = __webpack_require__(33); var $export = __webpack_require__(8); var $typed = __webpack_require__(411); var $buffer = __webpack_require__(586); var ctx = __webpack_require__(118); var anInstance = __webpack_require__(217); var propertyDesc = __webpack_require__(210); var hide = __webpack_require__(97); var redefineAll = __webpack_require__(219); var toInteger = __webpack_require__(120); var toLength = __webpack_require__(50); var toIndex = __webpack_require__(956); var toAbsoluteIndex = __webpack_require__(213); var toPrimitive = __webpack_require__(133); var has = __webpack_require__(108); var classof = __webpack_require__(260); var isObject = __webpack_require__(35); var toObject = __webpack_require__(63); var isArrayIter = __webpack_require__(575); var create = __webpack_require__(214); var getPrototypeOf = __webpack_require__(111); var gOPN = __webpack_require__(215).f; var getIterFn = __webpack_require__(577); var uid = __webpack_require__(211); var wks = __webpack_require__(49); var createArrayMethod = __webpack_require__(136); var createArrayIncludes = __webpack_require__(401); var speciesConstructor = __webpack_require__(328); var ArrayIterators = __webpack_require__(580); var Iterators = __webpack_require__(262); var $iterDetect = __webpack_require__(406); var setSpecies = __webpack_require__(216); var arrayFill = __webpack_require__(579); var arrayCopyWithin = __webpack_require__(945); var $DP = __webpack_require__(62); var $GOPD = __webpack_require__(110); var dP = $DP.f; var gOPD = $GOPD.f; var RangeError = global.RangeError; var TypeError = global.TypeError; var Uint8Array = global.Uint8Array; var ARRAY_BUFFER = 'ArrayBuffer'; var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; var PROTOTYPE = 'prototype'; var ArrayProto = Array[PROTOTYPE]; var $ArrayBuffer = $buffer.ArrayBuffer; var $DataView = $buffer.DataView; var arrayForEach = createArrayMethod(0); var arrayFilter = createArrayMethod(2); var arraySome = createArrayMethod(3); var arrayEvery = createArrayMethod(4); var arrayFind = createArrayMethod(5); var arrayFindIndex = createArrayMethod(6); var arrayIncludes = createArrayIncludes(true); var arrayIndexOf = createArrayIncludes(false); var arrayValues = ArrayIterators.values; var arrayKeys = ArrayIterators.keys; var arrayEntries = ArrayIterators.entries; var arrayLastIndexOf = ArrayProto.lastIndexOf; var arrayReduce = ArrayProto.reduce; var arrayReduceRight = ArrayProto.reduceRight; var arrayJoin = ArrayProto.join; var arraySort = ArrayProto.sort; var arraySlice = ArrayProto.slice; var arrayToString = ArrayProto.toString; var arrayToLocaleString = ArrayProto.toLocaleString; var ITERATOR = wks('iterator'); var TAG = wks('toStringTag'); var TYPED_CONSTRUCTOR = uid('typed_constructor'); var DEF_CONSTRUCTOR = uid('def_constructor'); var ALL_CONSTRUCTORS = $typed.CONSTR; var TYPED_ARRAY = $typed.TYPED; var VIEW = $typed.VIEW; var WRONG_LENGTH = 'Wrong length!'; var $map = createArrayMethod(1, function (O, length) { return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); }); var LITTLE_ENDIAN = fails(function () { // eslint-disable-next-line no-undef return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; }); var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { new Uint8Array(1).set({}); }); var toOffset = function (it, BYTES) { var offset = toInteger(it); if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); return offset; }; var validate = function (it) { if (isObject(it) && TYPED_ARRAY in it) return it; throw TypeError(it + ' is not a typed array!'); }; var allocate = function (C, length) { if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { throw TypeError('It is not a typed array constructor!'); } return new C(length); }; var speciesFromList = function (O, list) { return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); }; var fromList = function (C, list) { var index = 0; var length = list.length; var result = allocate(C, length); while (length > index) result[index] = list[index++]; return result; }; var addGetter = function (it, key, internal) { dP(it, key, { get: function () { return this._d[internal]; } }); }; var $from = function from(source /* , mapfn, thisArg */) { var O = toObject(source); var aLen = arguments.length; var mapfn = aLen > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var iterFn = getIterFn(O); var i, length, values, result, step, iterator; if (iterFn != undefined && !isArrayIter(iterFn)) { for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { values.push(step.value); } O = values; } if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { result[i] = mapping ? mapfn(O[i], i) : O[i]; } return result; }; var $of = function of(/* ...items */) { var index = 0; var length = arguments.length; var result = allocate(this, length); while (length > index) result[index] = arguments[index++]; return result; }; // iOS Safari 6.x fails here var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); var $toLocaleString = function toLocaleString() { return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); }; var proto = { copyWithin: function copyWithin(target, start /* , end */) { return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); }, every: function every(callbackfn /* , thisArg */) { return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars return arrayFill.apply(validate(this), arguments); }, filter: function filter(callbackfn /* , thisArg */) { return speciesFromList(this, arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined)); }, find: function find(predicate /* , thisArg */) { return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, findIndex: function findIndex(predicate /* , thisArg */) { return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, forEach: function forEach(callbackfn /* , thisArg */) { arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, indexOf: function indexOf(searchElement /* , fromIndex */) { return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, includes: function includes(searchElement /* , fromIndex */) { return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, join: function join(separator) { // eslint-disable-line no-unused-vars return arrayJoin.apply(validate(this), arguments); }, lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars return arrayLastIndexOf.apply(validate(this), arguments); }, map: function map(mapfn /* , thisArg */) { return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); }, reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars return arrayReduce.apply(validate(this), arguments); }, reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars return arrayReduceRight.apply(validate(this), arguments); }, reverse: function reverse() { var that = this; var length = validate(that).length; var middle = Math.floor(length / 2); var index = 0; var value; while (index < middle) { value = that[index]; that[index++] = that[--length]; that[length] = value; } return that; }, some: function some(callbackfn /* , thisArg */) { return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, sort: function sort(comparefn) { return arraySort.call(validate(this), comparefn); }, subarray: function subarray(begin, end) { var O = validate(this); var length = O.length; var $begin = toAbsoluteIndex(begin, length); return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( O.buffer, O.byteOffset + $begin * O.BYTES_PER_ELEMENT, toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) ); } }; var $slice = function slice(start, end) { return speciesFromList(this, arraySlice.call(validate(this), start, end)); }; var $set = function set(arrayLike /* , offset */) { validate(this); var offset = toOffset(arguments[1], 1); var length = this.length; var src = toObject(arrayLike); var len = toLength(src.length); var index = 0; if (len + offset > length) throw RangeError(WRONG_LENGTH); while (index < len) this[offset + index] = src[index++]; }; var $iterators = { entries: function entries() { return arrayEntries.call(validate(this)); }, keys: function keys() { return arrayKeys.call(validate(this)); }, values: function values() { return arrayValues.call(validate(this)); } }; var isTAIndex = function (target, key) { return isObject(target) && target[TYPED_ARRAY] && typeof key != 'symbol' && key in target && String(+key) == String(key); }; var $getDesc = function getOwnPropertyDescriptor(target, key) { return isTAIndex(target, key = toPrimitive(key, true)) ? propertyDesc(2, target[key]) : gOPD(target, key); }; var $setDesc = function defineProperty(target, key, desc) { if (isTAIndex(target, key = toPrimitive(key, true)) && isObject(desc) && has(desc, 'value') && !has(desc, 'get') && !has(desc, 'set') // TODO: add validation descriptor w/o calling accessors && !desc.configurable && (!has(desc, 'writable') || desc.writable) && (!has(desc, 'enumerable') || desc.enumerable) ) { target[key] = desc.value; return target; } return dP(target, key, desc); }; if (!ALL_CONSTRUCTORS) { $GOPD.f = $getDesc; $DP.f = $setDesc; } $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { getOwnPropertyDescriptor: $getDesc, defineProperty: $setDesc }); if (fails(function () { arrayToString.call({}); })) { arrayToString = arrayToLocaleString = function toString() { return arrayJoin.call(this); }; } var $TypedArrayPrototype$ = redefineAll({}, proto); redefineAll($TypedArrayPrototype$, $iterators); hide($TypedArrayPrototype$, ITERATOR, $iterators.values); redefineAll($TypedArrayPrototype$, { slice: $slice, set: $set, constructor: function () { /* noop */ }, toString: arrayToString, toLocaleString: $toLocaleString }); addGetter($TypedArrayPrototype$, 'buffer', 'b'); addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); addGetter($TypedArrayPrototype$, 'byteLength', 'l'); addGetter($TypedArrayPrototype$, 'length', 'e'); dP($TypedArrayPrototype$, TAG, { get: function () { return this[TYPED_ARRAY]; } }); // eslint-disable-next-line max-statements module.exports = function (KEY, BYTES, wrapper, CLAMPED) { CLAMPED = !!CLAMPED; var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; var GETTER = 'get' + KEY; var SETTER = 'set' + KEY; var TypedArray = global[NAME]; var Base = TypedArray || {}; var TAC = TypedArray && getPrototypeOf(TypedArray); var FORCED = !TypedArray || !$typed.ABV; var O = {}; var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; var getter = function (that, index) { var data = that._d; return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); }; var setter = function (that, index, value) { var data = that._d; if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); }; var addElement = function (that, index) { dP(that, index, { get: function () { return getter(this, index); }, set: function (value) { return setter(this, index, value); }, enumerable: true }); }; if (FORCED) { TypedArray = wrapper(function (that, data, $offset, $length) { anInstance(that, TypedArray, NAME, '_d'); var index = 0; var offset = 0; var buffer, byteLength, length, klass; if (!isObject(data)) { length = toIndex(data); byteLength = length * BYTES; buffer = new $ArrayBuffer(byteLength); } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { buffer = data; offset = toOffset($offset, BYTES); var $len = data.byteLength; if ($length === undefined) { if ($len % BYTES) throw RangeError(WRONG_LENGTH); byteLength = $len - offset; if (byteLength < 0) throw RangeError(WRONG_LENGTH); } else { byteLength = toLength($length) * BYTES; if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); } length = byteLength / BYTES; } else if (TYPED_ARRAY in data) { return fromList(TypedArray, data); } else { return $from.call(TypedArray, data); } hide(that, '_d', { b: buffer, o: offset, l: byteLength, e: length, v: new $DataView(buffer) }); while (index < length) addElement(that, index++); }); TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); hide(TypedArrayPrototype, 'constructor', TypedArray); } else if (!fails(function () { TypedArray(1); }) || !fails(function () { new TypedArray(-1); // eslint-disable-line no-new }) || !$iterDetect(function (iter) { new TypedArray(); // eslint-disable-line no-new new TypedArray(null); // eslint-disable-line no-new new TypedArray(1.5); // eslint-disable-line no-new new TypedArray(iter); // eslint-disable-line no-new }, true)) { TypedArray = wrapper(function (that, data, $offset, $length) { anInstance(that, TypedArray, NAME); var klass; // `ws` module bug, temporarily remove validation length for Uint8Array // https://github.com/websockets/ws/pull/645 if (!isObject(data)) return new Base(toIndex(data)); if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { return $length !== undefined ? new Base(data, toOffset($offset, BYTES), $length) : $offset !== undefined ? new Base(data, toOffset($offset, BYTES)) : new Base(data); } if (TYPED_ARRAY in data) return fromList(TypedArray, data); return $from.call(TypedArray, data); }); arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); }); TypedArray[PROTOTYPE] = TypedArrayPrototype; if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; } var $nativeIterator = TypedArrayPrototype[ITERATOR]; var CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); var $iterator = $iterators.values; hide(TypedArray, TYPED_CONSTRUCTOR, true); hide(TypedArrayPrototype, TYPED_ARRAY, NAME); hide(TypedArrayPrototype, VIEW, true); hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { dP(TypedArrayPrototype, TAG, { get: function () { return NAME; } }); } O[NAME] = TypedArray; $export($export.G + $export.W + $export.F * (TypedArray != Base), O); $export($export.S, NAME, { BYTES_PER_ELEMENT: BYTES }); $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { from: $from, of: $of }); if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); $export($export.P, NAME, proto); setSpecies(NAME); $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; $export($export.P + $export.F * fails(function () { new TypedArray(1).slice(); }), NAME, { slice: $slice }); $export($export.P + $export.F * (fails(function () { return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); }) || !fails(function () { TypedArrayPrototype.toLocaleString.call([1, 2]); })), NAME, { toLocaleString: $toLocaleString }); Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); }; } else module.exports = function () { /* empty */ }; /***/ }), /* 156 */ /***/ (function(module, exports, __webpack_require__) { var Map = __webpack_require__(951); var $export = __webpack_require__(8); var shared = __webpack_require__(324)('metadata'); var store = shared.store || (shared.store = new (__webpack_require__(954))()); var getOrCreateMetadataMap = function (target, targetKey, create) { var targetMetadata = store.get(target); if (!targetMetadata) { if (!create) return undefined; store.set(target, targetMetadata = new Map()); } var keyMetadata = targetMetadata.get(targetKey); if (!keyMetadata) { if (!create) return undefined; targetMetadata.set(targetKey, keyMetadata = new Map()); } return keyMetadata; }; var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? false : metadataMap.has(MetadataKey); }; var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); }; var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); }; var ordinaryOwnMetadataKeys = function (target, targetKey) { var metadataMap = getOrCreateMetadataMap(target, targetKey, false); var keys = []; if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); }); return keys; }; var toMetaKey = function (it) { return it === undefined || typeof it == 'symbol' ? it : String(it); }; var exp = function (O) { $export($export.S, 'Reflect', O); }; module.exports = { store: store, map: getOrCreateMetadataMap, has: ordinaryHasOwnMetadata, get: ordinaryGetOwnMetadata, set: ordinaryDefineOwnMetadata, keys: ordinaryOwnMetadataKeys, key: toMetaKey, exp: exp }; /***/ }), /* 157 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__internal_io__ = __webpack_require__(271); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["r"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takem", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["u"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "put", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["m"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "all", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["n"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "call", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["e"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["c"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "cps", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["h"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fork", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["j"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "spawn", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["q"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "join", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["l"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "cancel", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["f"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "select", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["o"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "actionChannel", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "cancelled", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["g"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "flush", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["i"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getContext", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["k"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "setContext", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["p"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeEvery", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["s"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeLatest", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["t"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["v"]; }); /***/ }), /* 158 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(225); var IE8_DOM_DEFINE = __webpack_require__(1064); var toPrimitive = __webpack_require__(638); var dP = Object.defineProperty; exports.f = __webpack_require__(141) ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /* 159 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = all; var _createChainableTypeChecker = __webpack_require__(347); var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function all() { for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) { validators[_key] = arguments[_key]; } function allPropTypes() { for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } var error = null; validators.forEach(function (validator) { if (error != null) { return; } var result = validator.apply(undefined, args); if (result != null) { error = result; } }); return error; } return (0, _createChainableTypeChecker2.default)(allPropTypes); } module.exports = exports['default']; /***/ }), /* 160 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { exports.__esModule = true; exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined; var _propTypes = __webpack_require__(349); var PropTypes = _interopRequireWildcard(_propTypes); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(18); var _reactDom2 = _interopRequireDefault(_reactDom); var _PropTypes = __webpack_require__(1081); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var UNMOUNTED = exports.UNMOUNTED = 'unmounted'; var EXITED = exports.EXITED = 'exited'; var ENTERING = exports.ENTERING = 'entering'; var ENTERED = exports.ENTERED = 'entered'; var EXITING = exports.EXITING = 'exiting'; /** * The Transition component lets you describe a transition from one component * state to another _over time_ with a simple declarative API. Most commonly * it's used to animate the mounting and unmounting of a component, but can also * be used to describe in-place transition states as well. * * By default the `Transition` component does not alter the behavior of the * component it renders, it only tracks "enter" and "exit" states for the components. * It's up to you to give meaning and effect to those states. For example we can * add styles to a component when it enters or exits: * * ```jsx * import Transition from 'react-transition-group/Transition'; * * const duration = 300; * * const defaultStyle = { * transition: `opacity ${duration}ms ease-in-out`, * opacity: 0, * } * * const transitionStyles = { * entering: { opacity: 0 }, * entered: { opacity: 1 }, * }; * * const Fade = ({ in: inProp }) => ( * * {(state) => ( *
* I'm a fade Transition! *
* )} *
* ); * ``` * * As noted the `Transition` component doesn't _do_ anything by itself to its child component. * What it does do is track transition states over time so you can update the * component (such as by adding styles or classes) when it changes states. * * There are 4 main states a Transition can be in: * - `'entering'` * - `'entered'` * - `'exiting'` * - `'exited'` * * Transition state is toggled via the `in` prop. When `true` the component begins the * "Enter" stage. During this stage, the component will shift from its current transition state, * to `'entering'` for the duration of the transition and then to the `'entered'` stage once * it's complete. Let's take the following example: * * ```jsx * state = { in: false }; * * toggleEnterState = () => { * this.setState({ in: true }); * } * * render() { * return ( *
* * *
* ); * } * ``` * * When the button is clicked the component will shift to the `'entering'` state and * stay there for 500ms (the value of `timeout`) before it finally switches to `'entered'`. * * When `in` is `false` the same thing happens except the state moves from `'exiting'` to `'exited'`. * * ## Timing * * Timing is often the trickiest part of animation, mistakes can result in slight delays * that are hard to pin down. A common example is when you want to add an exit transition, * you should set the desired final styles when the state is `'exiting'`. That's when the * transition to those styles will start and, if you matched the `timeout` prop with the * CSS Transition duration, it will end exactly when the state changes to `'exited'`. * * > **Note**: For simpler transitions the `Transition` component might be enough, but * > take into account that it's platform-agnostic, while the `CSSTransition` component * > [forces reflows](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215) * > in order to make more complex transitions more predictable. For example, even though * > classes `example-enter` and `example-enter-active` are applied immediately one after * > another, you can still transition from one to the other because of the forced reflow * > (read [this issue](https://github.com/reactjs/react-transition-group/issues/159#issuecomment-322761171) * > for more info). Take this into account when choosing between `Transition` and * > `CSSTransition`. * * ## Example * * * */ var Transition = function (_React$Component) { _inherits(Transition, _React$Component); function Transition(props, context) { _classCallCheck(this, Transition); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear; var initialStatus = void 0; _this.nextStatus = null; if (props.in) { if (appear) { initialStatus = EXITED; _this.nextStatus = ENTERING; } else { initialStatus = ENTERED; } } else { if (props.unmountOnExit || props.mountOnEnter) { initialStatus = UNMOUNTED; } else { initialStatus = EXITED; } } _this.state = { status: initialStatus }; _this.nextCallback = null; return _this; } Transition.prototype.getChildContext = function getChildContext() { return { transitionGroup: null }; // allows for nested Transitions }; Transition.prototype.componentDidMount = function componentDidMount() { this.updateStatus(true); }; Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var _ref = this.pendingState || this.state, status = _ref.status; if (nextProps.in) { if (status === UNMOUNTED) { this.setState({ status: EXITED }); } if (status !== ENTERING && status !== ENTERED) { this.nextStatus = ENTERING; } } else { if (status === ENTERING || status === ENTERED) { this.nextStatus = EXITING; } } }; Transition.prototype.componentDidUpdate = function componentDidUpdate() { this.updateStatus(); }; Transition.prototype.componentWillUnmount = function componentWillUnmount() { this.cancelNextCallback(); }; Transition.prototype.getTimeouts = function getTimeouts() { var timeout = this.props.timeout; var exit = void 0, enter = void 0, appear = void 0; exit = enter = appear = timeout; if (timeout != null && typeof timeout !== 'number') { exit = timeout.exit; enter = timeout.enter; appear = timeout.appear; } return { exit: exit, enter: enter, appear: appear }; }; Transition.prototype.updateStatus = function updateStatus() { var mounting = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var nextStatus = this.nextStatus; if (nextStatus !== null) { this.nextStatus = null; // nextStatus will always be ENTERING or EXITING. this.cancelNextCallback(); var node = _reactDom2.default.findDOMNode(this); if (nextStatus === ENTERING) { this.performEnter(node, mounting); } else { this.performExit(node); } } else if (this.props.unmountOnExit && this.state.status === EXITED) { this.setState({ status: UNMOUNTED }); } }; Transition.prototype.performEnter = function performEnter(node, mounting) { var _this2 = this; var enter = this.props.enter; var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting; var timeouts = this.getTimeouts(); // no enter animation skip right to ENTERED // if we are mounting and running this it means appear _must_ be set if (!mounting && !enter) { this.safeSetState({ status: ENTERED }, function () { _this2.props.onEntered(node); }); return; } this.props.onEnter(node, appearing); this.safeSetState({ status: ENTERING }, function () { _this2.props.onEntering(node, appearing); // FIXME: appear timeout? _this2.onTransitionEnd(node, timeouts.enter, function () { _this2.safeSetState({ status: ENTERED }, function () { _this2.props.onEntered(node, appearing); }); }); }); }; Transition.prototype.performExit = function performExit(node) { var _this3 = this; var exit = this.props.exit; var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED if (!exit) { this.safeSetState({ status: EXITED }, function () { _this3.props.onExited(node); }); return; } this.props.onExit(node); this.safeSetState({ status: EXITING }, function () { _this3.props.onExiting(node); _this3.onTransitionEnd(node, timeouts.exit, function () { _this3.safeSetState({ status: EXITED }, function () { _this3.props.onExited(node); }); }); }); }; Transition.prototype.cancelNextCallback = function cancelNextCallback() { if (this.nextCallback !== null) { this.nextCallback.cancel(); this.nextCallback = null; } }; Transition.prototype.safeSetState = function safeSetState(nextState, callback) { var _this4 = this; // We need to track pending updates for instances where a cWRP fires quickly // after cDM and before the state flushes, which would double trigger a // transition this.pendingState = nextState; // This shouldn't be necessary, but there are weird race conditions with // setState callbacks and unmounting in testing, so always make sure that // we can cancel any pending setState callbacks after we unmount. callback = this.setNextCallback(callback); this.setState(nextState, function () { _this4.pendingState = null; callback(); }); }; Transition.prototype.setNextCallback = function setNextCallback(callback) { var _this5 = this; var active = true; this.nextCallback = function (event) { if (active) { active = false; _this5.nextCallback = null; callback(event); } }; this.nextCallback.cancel = function () { active = false; }; return this.nextCallback; }; Transition.prototype.onTransitionEnd = function onTransitionEnd(node, timeout, handler) { this.setNextCallback(handler); if (node) { if (this.props.addEndListener) { this.props.addEndListener(node, this.nextCallback); } if (timeout != null) { setTimeout(this.nextCallback, timeout); } } else { setTimeout(this.nextCallback, 0); } }; Transition.prototype.render = function render() { var status = this.state.status; if (status === UNMOUNTED) { return null; } var _props = this.props, children = _props.children, childProps = _objectWithoutProperties(_props, ['children']); // filter props for Transtition delete childProps.in; delete childProps.mountOnEnter; delete childProps.unmountOnExit; delete childProps.appear; delete childProps.enter; delete childProps.exit; delete childProps.timeout; delete childProps.addEndListener; delete childProps.onEnter; delete childProps.onEntering; delete childProps.onEntered; delete childProps.onExit; delete childProps.onExiting; delete childProps.onExited; if (typeof children === 'function') { return children(status, childProps); } var child = _react2.default.Children.only(children); return _react2.default.cloneElement(child, childProps); }; return Transition; }(_react2.default.Component); Transition.contextTypes = { transitionGroup: PropTypes.object }; Transition.childContextTypes = { transitionGroup: function transitionGroup() {} }; Transition.propTypes = process.env.NODE_ENV !== "production" ? { /** * A `function` child can be used instead of a React element. * This function is called with the current transition status * ('entering', 'entered', 'exiting', 'exited', 'unmounted'), which can be used * to apply context specific props to a component. * * ```jsx * * {(status) => ( * * )} * * ``` */ children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired, /** * Show the component; triggers the enter or exit states */ in: PropTypes.bool, /** * By default the child component is mounted immediately along with * the parent `Transition` component. If you want to "lazy mount" the component on the * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay * mounted, even on "exited", unless you also specify `unmountOnExit`. */ mountOnEnter: PropTypes.bool, /** * By default the child component stays mounted after it reaches the `'exited'` state. * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting. */ unmountOnExit: PropTypes.bool, /** * Normally a component is not transitioned if it is shown when the `` component mounts. * If you want to transition on the first mount set `appear` to `true`, and the * component will transition in as soon as the `` mounts. * * > Note: there are no specific "appear" states. `appear` only adds an additional `enter` transition. */ appear: PropTypes.bool, /** * Enable or disable enter transitions. */ enter: PropTypes.bool, /** * Enable or disable exit transitions. */ exit: PropTypes.bool, /** * The duration of the transition, in milliseconds. * Required unless `addEndListener` is provided * * You may specify a single timeout for all transitions like: `timeout={500}`, * or individually like: * * ```jsx * timeout={{ * enter: 300, * exit: 500, * }} * ``` * * @type {number | { enter?: number, exit?: number }} */ timeout: function timeout(props) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var pt = _PropTypes.timeoutsShape; if (!props.addEndListener) pt = pt.isRequired; return pt.apply(undefined, [props].concat(args)); }, /** * Add a custom transition end trigger. Called with the transitioning * DOM node and a `done` callback. Allows for more fine grained transition end * logic. **Note:** Timeouts are still used as a fallback if provided. * * ```jsx * addEndListener={(node, done) => { * // use the css transitionend event to mark the finish of a transition * node.addEventListener('transitionend', done, false); * }} * ``` */ addEndListener: PropTypes.func, /** * Callback fired before the "entering" status is applied. An extra parameter * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount * * @type Function(node: HtmlElement, isAppearing: bool) -> void */ onEnter: PropTypes.func, /** * Callback fired after the "entering" status is applied. An extra parameter * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount * * @type Function(node: HtmlElement, isAppearing: bool) */ onEntering: PropTypes.func, /** * Callback fired after the "entered" status is applied. An extra parameter * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount * * @type Function(node: HtmlElement, isAppearing: bool) -> void */ onEntered: PropTypes.func, /** * Callback fired before the "exiting" status is applied. * * @type Function(node: HtmlElement) -> void */ onExit: PropTypes.func, /** * Callback fired after the "exiting" status is applied. * * @type Function(node: HtmlElement) -> void */ onExiting: PropTypes.func, /** * Callback fired after the "exited" status is applied. * * @type Function(node: HtmlElement) -> void */ onExited: PropTypes.func } : {}; // Name the function so it is clearer in the documentation function noop() {} Transition.defaultProps = { in: false, mountOnEnter: false, unmountOnExit: false, appear: false, enter: true, exit: true, onEnter: noop, onEntering: noop, onEntered: noop, onExit: noop, onExiting: noop, onExited: noop }; Transition.UNMOUNTED = 0; Transition.EXITED = 1; Transition.ENTERING = 2; Transition.ENTERED = 3; Transition.EXITING = 4; exports.default = Transition; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 161 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(57); exports.__esModule = true; exports.default = void 0; var _inDOM = _interopRequireDefault(__webpack_require__(142)); var _default = function () { // HTML DOM and SVG DOM may have different support levels, // so we need to check on context instead of a document root element. return _inDOM.default ? function (context, node) { if (context.contains) { return context.contains(node); } else if (context.compareDocumentPosition) { return context === node || !!(context.compareDocumentPosition(node) & 16); } else { return fallback(context, node); } } : fallback; }(); exports.default = _default; function fallback(context, node) { if (node) do { if (node === context) return true; } while (node = node.parentNode); return false; } module.exports = exports["default"]; /***/ }), /* 162 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = isRequiredForA11y; function isRequiredForA11y(validator) { return function validate(props, propName, componentName, location, propFullName) { var componentNameSafe = componentName || '<>'; var propFullNameSafe = propFullName || propName; if (props[propName] == null) { return new Error('The ' + location + ' `' + propFullNameSafe + '` is required to make ' + ('`' + componentNameSafe + '` accessible for users of assistive ') + 'technologies such as screen readers.'); } for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { args[_key - 5] = arguments[_key]; } return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args)); }; } module.exports = exports['default']; /***/ }), /* 163 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _FocusManager = _interopRequireDefault(__webpack_require__(2640)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _FocusManager["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 164 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(146); var IE8_DOM_DEFINE = __webpack_require__(1197); var toPrimitive = __webpack_require__(722); var dP = Object.defineProperty; exports.f = __webpack_require__(165) ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /* 165 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(287)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 166 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Day Helpers * @summary Return the start of a day for the given date. * * @description * Return the start of a day for the given date. * The result will be in the local timezone. * * @param {Date|String|Number} date - the original date * @returns {Date} the start of a day * * @example * // The start of a day for 2 September 2014 11:55:00: * var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0)) * //=> Tue Sep 02 2014 00:00:00 */ function startOfDay (dirtyDate) { var date = parse(dirtyDate) date.setHours(0, 0, 0, 0) return date } module.exports = startOfDay /***/ }), /* 167 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.focusOnCalendar = focusOnCalendar; exports.withCalendarGesture = withCalendarGesture; exports.withMonthCalendarGesture = withMonthCalendarGesture; var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(2)); var _keycode = _interopRequireDefault(__webpack_require__(34)); var _omit = _interopRequireDefault(__webpack_require__(67)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var FIRST = 0; var LAST = Number.POSITIVE_INFINITY; function focusOn(element) { if (element) { element.focus(); } } /** * Select all items in current calendar */ function getAllItems(calendarRef) { return calendarRef.querySelectorAll('td > button[data-value]'); } /** * Focus on the item within the current calendar. * If the day index is out of the calendar's limits, it focuses on the limits. */ function focusWithinCurrentCalendar(calendarRef, indexToFocus) { var allItems = getAllItems(calendarRef); if (indexToFocus === FIRST || indexToFocus < 0) { focusOn(allItems[0]); } else if (indexToFocus === LAST || indexToFocus > allItems.length - 1) { focusOn(allItems[allItems.length - 1]); } else { focusOn(allItems[indexToFocus]); } } /** * Get the day corresponding to the offset. * - positive offset : we count from the beginning of the month. Ex : days 1-31 + offset 5 = day 5 * - negative offset < 0 : we count from the end of the month. Ex : days 1-31 + offset -2 = day 29 */ function getDay(calendarRef, offset) { var allItems = getAllItems(calendarRef); var index = offset >= 0 ? offset : allItems.length + offset; return allItems[index]; } /** * Focus on the day, managing the switch to previous/next month */ function focusOnDay(calendarRef, indexToFocus, _ref) { var goToPreviousMonth = _ref.goToPreviousMonth, goToNextMonth = _ref.goToNextMonth; var allItems = getAllItems(calendarRef); if (indexToFocus < 0) { goToPreviousMonth(function () { focusOn(getDay(calendarRef, indexToFocus)); }); } else if (indexToFocus > allItems.length - 1) { goToNextMonth(function () { focusOn(getDay(calendarRef, indexToFocus - allItems.length)); }); } else { focusOn(allItems[indexToFocus]); } } /** * Switch month and focus on the same focused day or the month's limits if it's out of the limits */ function switchMonth(calendarRef, indexToFocus, monthSwitcher) { monthSwitcher(function () { focusOn(focusWithinCurrentCalendar(calendarRef, indexToFocus)); }); } /** * Focus management on calendar. * - try to focus on the selected item * - try to focus on the 1st not disabled item * - try to focus on the 1st item */ function focusOnCalendar(containerRef) { var target = containerRef.querySelector('td[aria-current="date"] > button'); if (!target) { target = containerRef.querySelector('td > button[disabled=false]'); } if (!target) { target = containerRef.querySelector('td > button[data-value]'); } if (target) { target.focus(); } } function withCalendarGesture(WrappedComponent) { var CalendarGesture = /*#__PURE__*/function (_React$Component) { _inherits(CalendarGesture, _React$Component); var _super = _createSuper(CalendarGesture); function CalendarGesture(props) { var _this; _classCallCheck(this, CalendarGesture); _this = _super.call(this, props); _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this)); _this.preventScroll = _this.preventScroll.bind(_assertThisInitialized(_this)); return _this; } _createClass(CalendarGesture, [{ key: "componentDidMount", value: function componentDidMount() { this.ref.addEventListener('keydown', this.preventScroll); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.ref.removeEventListener('keydown', this.preventScroll); } }, { key: "onKeyDown", value: function onKeyDown(event, calendarRef, dayIndex) { switch (event.keyCode) { case _keycode["default"].codes.left: event.stopPropagation(); focusOnDay(calendarRef, dayIndex - 1, this.props); break; case _keycode["default"].codes.right: event.stopPropagation(); focusOnDay(calendarRef, dayIndex + 1, this.props); break; case _keycode["default"].codes.up: event.stopPropagation(); focusOnDay(calendarRef, dayIndex - 7, this.props); break; case _keycode["default"].codes.down: event.stopPropagation(); focusOnDay(calendarRef, dayIndex + 7, this.props); break; case _keycode["default"].codes.home: event.stopPropagation(); focusWithinCurrentCalendar(calendarRef, FIRST); break; case _keycode["default"].codes.end: event.stopPropagation(); focusWithinCurrentCalendar(calendarRef, LAST); break; case _keycode["default"].codes['page up']: event.stopPropagation(); switchMonth(calendarRef, dayIndex, this.props.goToPreviousMonth); break; case _keycode["default"].codes['page down']: event.stopPropagation(); switchMonth(calendarRef, dayIndex, this.props.goToNextMonth); break; default: break; } } }, { key: "preventScroll", value: function preventScroll(event) { var arrows = [_keycode["default"].codes.left, _keycode["default"].codes.right, _keycode["default"].codes.up, _keycode["default"].codes.down, _keycode["default"].codes.home, _keycode["default"].codes['page up'], _keycode["default"].codes['page down']]; if (arrows.includes(event.keyCode)) { event.preventDefault(); } } }, { key: "render", value: function render() { var _this2 = this; return /*#__PURE__*/_react["default"].createElement("div", { ref: function ref(_ref2) { _this2.ref = _ref2; } }, /*#__PURE__*/_react["default"].createElement(WrappedComponent, _extends({}, this.props, { onKeyDown: this.onKeyDown }))); } }]); return CalendarGesture; }(_react["default"].Component); CalendarGesture.propTypes = _objectSpread(_objectSpread({}, (0, _omit["default"])(WrappedComponent.propTypes, 'onKeyDown')), {}, { goToPreviousMonth: _propTypes["default"].func.isRequired, goToNextMonth: _propTypes["default"].func.isRequired }); CalendarGesture.displayName = "CalendarGesture(".concat(WrappedComponent.displayName, ")"); return CalendarGesture; } function withMonthCalendarGesture(WrappedComponent, rowSize) { var MonthCalendarGesture = /*#__PURE__*/function (_React$Component2) { _inherits(MonthCalendarGesture, _React$Component2); var _super2 = _createSuper(MonthCalendarGesture); function MonthCalendarGesture(props) { var _this3; _classCallCheck(this, MonthCalendarGesture); _this3 = _super2.call(this, props); _this3.onKeyDown = _this3.onKeyDown.bind(_assertThisInitialized(_this3)); _this3.preventScroll = _this3.preventScroll.bind(_assertThisInitialized(_this3)); return _this3; } _createClass(MonthCalendarGesture, [{ key: "componentDidMount", value: function componentDidMount() { this.ref.addEventListener('keydown', this.preventScroll); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.ref.removeEventListener('keydown', this.preventScroll); } }, { key: "onKeyDown", value: function onKeyDown(event, calendarRef, monthIndex) { switch (event.keyCode) { case _keycode["default"].codes.left: event.stopPropagation(); focusWithinCurrentCalendar(calendarRef, monthIndex - 1); break; case _keycode["default"].codes.right: event.stopPropagation(); focusWithinCurrentCalendar(calendarRef, monthIndex + 1); break; case _keycode["default"].codes.up: event.stopPropagation(); focusWithinCurrentCalendar(calendarRef, monthIndex - rowSize); break; case _keycode["default"].codes.down: event.stopPropagation(); focusWithinCurrentCalendar(calendarRef, monthIndex + rowSize); break; case _keycode["default"].codes.home: event.stopPropagation(); focusWithinCurrentCalendar(calendarRef, FIRST); break; case _keycode["default"].codes.end: event.stopPropagation(); focusWithinCurrentCalendar(calendarRef, LAST); break; default: break; } } }, { key: "preventScroll", value: function preventScroll(event) { var arrows = [_keycode["default"].codes.left, _keycode["default"].codes.right, _keycode["default"].codes.up, _keycode["default"].codes.down, _keycode["default"].codes.home, _keycode["default"].codes.end]; if (arrows.includes(event.keyCode)) { event.preventDefault(); } } }, { key: "render", value: function render() { var _this4 = this; return /*#__PURE__*/_react["default"].createElement("div", { ref: function ref(_ref3) { _this4.ref = _ref3; } }, /*#__PURE__*/_react["default"].createElement(WrappedComponent, _extends({}, this.props, { onKeyDown: this.onKeyDown }))); } }]); return MonthCalendarGesture; }(_react["default"].Component); MonthCalendarGesture.propTypes = _objectSpread({}, (0, _omit["default"])(WrappedComponent.propTypes, 'onKeyDown')); MonthCalendarGesture.displayName = "MonthCalendarGesture(".concat(WrappedComponent.displayName, ")"); return MonthCalendarGesture; } //# sourceMappingURL=withCalendarGesture.js.map /***/ }), /* 168 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assemble__ = __webpack_require__(1285); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__assemble__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__blueprint__ = __webpack_require__(83); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__combine__ = __webpack_require__(782); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__combine__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__compose__ = __webpack_require__(2995); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__debug__ = __webpack_require__(2996); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__defaultProps__ = __webpack_require__(2997); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_5__defaultProps__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__flattenProp__ = __webpack_require__(2998); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__setStatic__ = __webpack_require__(784); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__setDisplayName__ = __webpack_require__(2999); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_8__setDisplayName__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__setPropTypes__ = __webpack_require__(3000); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__wrapDisplayName__ = __webpack_require__(3001); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__mapProps__ = __webpack_require__(245); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__omitProps__ = __webpack_require__(3002); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_12__omitProps__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__getContext__ = __webpack_require__(3003); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__branch__ = __webpack_require__(3004); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__isolate__ = __webpack_require__(3006); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_15__isolate__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__integrate__ = __webpack_require__(3007); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_16__integrate__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__noOp__ = __webpack_require__(1287); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__renameProp__ = __webpack_require__(3008); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__renameProps__ = __webpack_require__(3009); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__withContext__ = __webpack_require__(3011); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__withHandlers__ = __webpack_require__(3012); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_21__withHandlers__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__withProps__ = __webpack_require__(3013); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_22__withProps__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__withPropsOnChange__ = __webpack_require__(3014); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__withState__ = __webpack_require__(3016); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_24__withState__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__withReducer__ = __webpack_require__(3017); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__onWillMount__ = __webpack_require__(3018); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__onDidMount__ = __webpack_require__(3019); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_27__onDidMount__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__onWillUnmount__ = __webpack_require__(3020); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_28__onWillUnmount__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__onWillReceiveProps__ = __webpack_require__(3021); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_29__onWillReceiveProps__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__onWillUpdate__ = __webpack_require__(3022); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__onDidUpdate__ = __webpack_require__(3023); /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_31__onDidUpdate__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__shouldUpdate__ = __webpack_require__(787); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__toClass__ = __webpack_require__(3024); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__pure__ = __webpack_require__(3025); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__onlyUpdateForKeys__ = __webpack_require__(3026); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__renderComponent__ = __webpack_require__(1288); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__renderNothing__ = __webpack_require__(3027); /* unused harmony namespace reexport */ //# sourceMappingURL=index.js.map /***/ }), /* 169 */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), /* 170 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return durationSecond; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return durationMinute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return durationHour; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return durationDay; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return durationWeek; }); var durationSecond = 1e3; var durationMinute = 6e4; var durationHour = 36e5; var durationDay = 864e5; var durationWeek = 6048e5; /***/ }), /* 171 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isObject__ = __webpack_require__(93); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isObject___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isObject__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(106); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_last__ = __webpack_require__(1475); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_last___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_last__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_isArray__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_isArray__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Label__ = __webpack_require__(205); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__container_Layer__ = __webpack_require__(60); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__util_ChartUtils__ = __webpack_require__(84); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function _extends() { _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; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } var propTypes = { id: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, data: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object), valueAccessor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, clockWise: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, dataKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func]) }; var defaultProps = { valueAccessor: function valueAccessor(entry) { return __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(entry.value) ? __WEBPACK_IMPORTED_MODULE_3_lodash_last___default()(entry.value) : entry.value; } }; function LabelList(props) { var data = props.data, valueAccessor = props.valueAccessor, dataKey = props.dataKey, clockWise = props.clockWise, id = props.id, others = _objectWithoutProperties(props, ["data", "valueAccessor", "dataKey", "clockWise", "id"]); if (!data || !data.length) { return null; } return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__container_Layer__["a" /* default */], { className: "recharts-label-list" }, data.map(function (entry, index) { var value = __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(dataKey) ? valueAccessor(entry, index) : Object(__WEBPACK_IMPORTED_MODULE_10__util_ChartUtils__["v" /* getValueByDataKey */])(entry && entry.payload, dataKey); var idProps = __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(id) ? {} : { id: "".concat(id, "-").concat(index) }; return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__Label__["a" /* default */], _extends({}, Object(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["l" /* getPresentationAttributes */])(entry), others, idProps, { index: index, value: value, viewBox: __WEBPACK_IMPORTED_MODULE_7__Label__["a" /* default */].parseViewBox(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(clockWise) ? entry : _objectSpread({}, entry, { clockWise: clockWise })), key: "label-".concat(index) // eslint-disable-line react/no-array-index-key })); })); } LabelList.propTypes = propTypes; LabelList.displayName = 'LabelList'; var parseLabelList = function parseLabelList(label, data) { if (!label) { return null; } if (label === true) { return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(LabelList, { key: "labelList-implicit", data: data }); } if (__WEBPACK_IMPORTED_MODULE_5_react___default.a.isValidElement(label) || __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(label)) { return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(LabelList, { key: "labelList-implicit", data: data, content: label }); } if (__WEBPACK_IMPORTED_MODULE_0_lodash_isObject___default()(label)) { return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(LabelList, _extends({ data: data }, label, { key: "labelList-implicit" })); } return null; }; var renderCallByParent = function renderCallByParent(parentProps, data) { var ckeckPropsLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; if (!parentProps || !parentProps.children && ckeckPropsLabel && !parentProps.label) { return null; } var children = parentProps.children; var explicitChilren = Object(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["i" /* findAllByType */])(children, LabelList).map(function (child, index) { return Object(__WEBPACK_IMPORTED_MODULE_5_react__["cloneElement"])(child, { data: data, key: "labelList-".concat(index) }); }); if (!ckeckPropsLabel) { return explicitChilren; } var implicitLabelList = parseLabelList(parentProps.label, data); return [implicitLabelList].concat(_toConsumableArray(explicitChilren)); }; LabelList.renderCallByParent = renderCallByParent; LabelList.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (LabelList); /***/ }), /* 172 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_every__ = __webpack_require__(1485); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_every___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_every__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_find__ = __webpack_require__(3652); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_find___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_find__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_sortBy__ = __webpack_require__(840); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_sortBy___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_sortBy__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_range__ = __webpack_require__(1482); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_range___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_range__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_throttle__ = __webpack_require__(3656); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_throttle___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_lodash_throttle__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_isNil__ = __webpack_require__(106); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash_isNil__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__container_Surface__ = __webpack_require__(385); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__container_Layer__ = __webpack_require__(60); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__component_Tooltip__ = __webpack_require__(514); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__component_Legend__ = __webpack_require__(830); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__shape_Curve__ = __webpack_require__(311); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__shape_Cross__ = __webpack_require__(1476); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__shape_Sector__ = __webpack_require__(523); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__shape_Dot__ = __webpack_require__(253); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__shape_Rectangle__ = __webpack_require__(312); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__cartesian_CartesianAxis__ = __webpack_require__(1488); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__cartesian_Brush__ = __webpack_require__(1481); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__util_DOMUtils__ = __webpack_require__(518); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__util_DataUtils__ = __webpack_require__(42); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__ = __webpack_require__(84); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__util_DetectReferenceElementsDomain__ = __webpack_require__(3657); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__util_PolarUtils__ = __webpack_require__(130); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__util_ShallowEqual__ = __webpack_require__(512); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__util_Events__ = __webpack_require__(3658); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var ORIENT_MAP = { xAxis: ['bottom', 'top'], yAxis: ['left', 'right'] }; var originCoordinate = { x: 0, y: 0 }; var generateCategoricalChart = function generateCategoricalChart(_ref) { var chartName = _ref.chartName, GraphicalChild = _ref.GraphicalChild, _ref$eventType = _ref.eventType, eventType = _ref$eventType === void 0 ? 'axis' : _ref$eventType, axisComponents = _ref.axisComponents, legendContent = _ref.legendContent, formatAxisMap = _ref.formatAxisMap, defaultProps = _ref.defaultProps, propTypes = _ref.propTypes; var CategoricalChartWrapper = /*#__PURE__*/ function (_Component) { _inherits(CategoricalChartWrapper, _Component); /** * Returns default, reset state for the categorical chart. * @param {Object} props Props object to use when creating the default state * @return {Object} Whole new state */ function CategoricalChartWrapper(_props) { var _this; _classCallCheck(this, CategoricalChartWrapper); _this = _possibleConstructorReturn(this, _getPrototypeOf(CategoricalChartWrapper).call(this, _props)); _this.handleLegendBBoxUpdate = function (box) { if (box && _this.legendInstance) { var _this$state = _this.state, dataStartIndex = _this$state.dataStartIndex, dataEndIndex = _this$state.dataEndIndex, updateId = _this$state.updateId; _this.setState(_this.updateStateOfAxisMapsOffsetAndStackGroups({ props: _this.props, dataStartIndex: dataStartIndex, dataEndIndex: dataEndIndex, updateId: updateId })); } }; _this.handleReceiveSyncEvent = function (cId, chartId, data) { var _this$props = _this.props, syncId = _this$props.syncId, layout = _this$props.layout; var updateId = _this.state.updateId; if (syncId === cId && chartId !== _this.uniqueChartId) { var dataStartIndex = data.dataStartIndex, dataEndIndex = data.dataEndIndex; if (!__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(data.dataStartIndex) || !__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(data.dataEndIndex)) { _this.setState(_objectSpread({ dataStartIndex: dataStartIndex, dataEndIndex: dataEndIndex }, _this.updateStateOfAxisMapsOffsetAndStackGroups({ props: _this.props, dataStartIndex: dataStartIndex, dataEndIndex: dataEndIndex, updateId: updateId }))); } else if (!__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(data.activeTooltipIndex)) { var chartX = data.chartX, chartY = data.chartY, activeTooltipIndex = data.activeTooltipIndex; var _this$state2 = _this.state, offset = _this$state2.offset, tooltipTicks = _this$state2.tooltipTicks; if (!offset) { return; } var viewBox = _objectSpread({}, offset, { x: offset.left, y: offset.top }); // When a categotical chart is combined with another chart, the value of chartX // and chartY may beyond the boundaries. var validateChartX = Math.min(chartX, viewBox.x + viewBox.width); var validateChartY = Math.min(chartY, viewBox.y + viewBox.height); var activeLabel = tooltipTicks[activeTooltipIndex] && tooltipTicks[activeTooltipIndex].value; var activePayload = _this.getTooltipContent(activeTooltipIndex); var activeCoordinate = tooltipTicks[activeTooltipIndex] ? { x: layout === 'horizontal' ? tooltipTicks[activeTooltipIndex].coordinate : validateChartX, y: layout === 'horizontal' ? validateChartY : tooltipTicks[activeTooltipIndex].coordinate } : originCoordinate; _this.setState(_objectSpread({}, data, { activeLabel: activeLabel, activeCoordinate: activeCoordinate, activePayload: activePayload })); } else { _this.setState(data); } } }; _this.handleBrushChange = function (_ref2) { var startIndex = _ref2.startIndex, endIndex = _ref2.endIndex; // Only trigger changes if the extents of the brush have actually changed if (startIndex !== _this.state.dataStartIndex || endIndex !== _this.state.dataEndIndex) { var updateId = _this.state.updateId; _this.setState(function () { return _objectSpread({ dataStartIndex: startIndex, dataEndIndex: endIndex }, _this.updateStateOfAxisMapsOffsetAndStackGroups({ props: _this.props, dataStartIndex: startIndex, dataEndIndex: endIndex, updateId: updateId })); }); _this.triggerSyncEvent({ dataStartIndex: startIndex, dataEndIndex: endIndex }); } }; _this.handleMouseEnter = function (e) { var onMouseEnter = _this.props.onMouseEnter; var mouse = _this.getMouseInfo(e); if (mouse) { var nextState = _objectSpread({}, mouse, { isTooltipActive: true }); _this.setState(nextState); _this.triggerSyncEvent(nextState); if (__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(onMouseEnter)) { onMouseEnter(nextState, e); } } }; _this.triggeredAfterMouseMove = function (e) { var onMouseMove = _this.props.onMouseMove; var mouse = _this.getMouseInfo(e); var nextState = mouse ? _objectSpread({}, mouse, { isTooltipActive: true }) : { isTooltipActive: false }; _this.setState(nextState); _this.triggerSyncEvent(nextState); if (__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(onMouseMove)) { onMouseMove(nextState, e); } }; _this.handleItemMouseEnter = function (el) { _this.setState(function () { return { isTooltipActive: true, activeItem: el, activePayload: el.tooltipPayload, activeCoordinate: el.tooltipPosition || { x: el.cx, y: el.cy } }; }); }; _this.handleItemMouseLeave = function () { _this.setState(function () { return { isTooltipActive: false }; }); }; _this.handleMouseMove = function (e) { if (e && __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(e.persist)) { e.persist(); } _this.triggeredAfterMouseMove(e); }; _this.handleMouseLeave = function (e) { var onMouseLeave = _this.props.onMouseLeave; var nextState = { isTooltipActive: false }; _this.setState(nextState); _this.triggerSyncEvent(nextState); if (__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(onMouseLeave)) { onMouseLeave(nextState, e); } }; _this.handleOuterEvent = function (e) { var eventName = Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["m" /* getReactEventByType */])(e); if (eventName && __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(_this.props[eventName])) { var mouse = _this.getMouseInfo(e); var handler = _this.props[eventName]; handler(mouse, e); } }; _this.handleClick = function (e) { var onClick = _this.props.onClick; if (__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(onClick)) { var mouse = _this.getMouseInfo(e); onClick(mouse, e); } }; _this.handleMouseDown = function (e) { var onMouseDown = _this.props.onMouseDown; if (__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(onMouseDown)) { var mouse = _this.getMouseInfo(e); onMouseDown(mouse, e); } }; _this.handleMouseUp = function (e) { var onMouseUp = _this.props.onMouseUp; if (__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(onMouseUp)) { var mouse = _this.getMouseInfo(e); onMouseUp(mouse, e); } }; _this.handleTouchMove = function (e) { if (e.changedTouches != null && e.changedTouches.length > 0) { _this.handleMouseMove(e.changedTouches[0]); } }; _this.handleTouchStart = function (e) { if (e.changedTouches != null && e.changedTouches.length > 0) { _this.handleMouseDown(e.changedTouches[0]); } }; _this.handleTouchEnd = function (e) { if (e.changedTouches != null && e.changedTouches.length > 0) { _this.handleMouseUp(e.changedTouches[0]); } }; _this.verticalCoordinatesGenerator = function (_ref3) { var xAxis = _ref3.xAxis, width = _ref3.width, height = _ref3.height, offset = _ref3.offset; return Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["l" /* getCoordinatesOfGrid */])(__WEBPACK_IMPORTED_MODULE_20__cartesian_CartesianAxis__["a" /* default */].getTicks(_objectSpread({}, __WEBPACK_IMPORTED_MODULE_20__cartesian_CartesianAxis__["a" /* default */].defaultProps, {}, xAxis, { ticks: Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["t" /* getTicksOfAxis */])(xAxis, true), viewBox: { x: 0, y: 0, width: width, height: height } })), offset.left, offset.left + offset.width); }; _this.horizontalCoordinatesGenerator = function (_ref4) { var yAxis = _ref4.yAxis, width = _ref4.width, height = _ref4.height, offset = _ref4.offset; return Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["l" /* getCoordinatesOfGrid */])(__WEBPACK_IMPORTED_MODULE_20__cartesian_CartesianAxis__["a" /* default */].getTicks(_objectSpread({}, __WEBPACK_IMPORTED_MODULE_20__cartesian_CartesianAxis__["a" /* default */].defaultProps, {}, yAxis, { ticks: Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["t" /* getTicksOfAxis */])(yAxis, true), viewBox: { x: 0, y: 0, width: width, height: height } })), offset.top, offset.top + offset.height); }; _this.axesTicksGenerator = function (axis) { return Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["t" /* getTicksOfAxis */])(axis, true); }; _this.tooltipTicksGenerator = function (axisMap) { var axis = Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["b" /* getAnyElementOfObject */])(axisMap); var tooltipTicks = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["t" /* getTicksOfAxis */])(axis, false, true); return { tooltipTicks: tooltipTicks, orderedTooltipTicks: __WEBPACK_IMPORTED_MODULE_2_lodash_sortBy___default()(tooltipTicks, function (o) { return o.coordinate; }), tooltipAxis: axis, tooltipAxisBandSize: Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["f" /* getBandSizeOfAxis */])(axis) }; }; _this.renderCursor = function (element) { var _this$state3 = _this.state, isTooltipActive = _this$state3.isTooltipActive, activeCoordinate = _this$state3.activeCoordinate, activePayload = _this$state3.activePayload, offset = _this$state3.offset; if (!element || !element.props.cursor || !isTooltipActive || !activeCoordinate) { return null; } var layout = _this.props.layout; var restProps; var cursorComp = __WEBPACK_IMPORTED_MODULE_14__shape_Curve__["a" /* default */]; if (chartName === 'ScatterChart') { restProps = activeCoordinate; cursorComp = __WEBPACK_IMPORTED_MODULE_15__shape_Cross__["a" /* default */]; } else if (chartName === 'BarChart') { restProps = _this.getCursorRectangle(); cursorComp = __WEBPACK_IMPORTED_MODULE_18__shape_Rectangle__["a" /* default */]; } else if (layout === 'radial') { var _this$getCursorPoints = _this.getCursorPoints(), cx = _this$getCursorPoints.cx, cy = _this$getCursorPoints.cy, radius = _this$getCursorPoints.radius, startAngle = _this$getCursorPoints.startAngle, endAngle = _this$getCursorPoints.endAngle; restProps = { cx: cx, cy: cy, startAngle: startAngle, endAngle: endAngle, innerRadius: radius, outerRadius: radius }; cursorComp = __WEBPACK_IMPORTED_MODULE_16__shape_Sector__["a" /* default */]; } else { restProps = { points: _this.getCursorPoints() }; cursorComp = __WEBPACK_IMPORTED_MODULE_14__shape_Curve__["a" /* default */]; } var key = element.key || '_recharts-cursor'; var cursorProps = _objectSpread({ stroke: '#ccc', pointerEvents: 'none' }, offset, {}, restProps, {}, Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["l" /* getPresentationAttributes */])(element.props.cursor), { payload: activePayload, key: key, className: 'recharts-tooltip-cursor' }); return Object(__WEBPACK_IMPORTED_MODULE_7_react__["isValidElement"])(element.props.cursor) ? Object(__WEBPACK_IMPORTED_MODULE_7_react__["cloneElement"])(element.props.cursor, cursorProps) : Object(__WEBPACK_IMPORTED_MODULE_7_react__["createElement"])(cursorComp, cursorProps); }; _this.renderPolarAxis = function (element, displayName, index) { var axisType = element.type.axisType; var axisMap = _this.state["".concat(axisType, "Map")]; var axisOption = axisMap[element.props["".concat(axisType, "Id")]]; return Object(__WEBPACK_IMPORTED_MODULE_7_react__["cloneElement"])(element, _objectSpread({}, axisOption, { className: axisType, key: element.key || "".concat(displayName, "-").concat(index), ticks: Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["t" /* getTicksOfAxis */])(axisOption, true) })); }; _this.renderXAxis = function (element, displayName, index) { var xAxisMap = _this.state.xAxisMap; var axisObj = xAxisMap[element.props.xAxisId]; return _this.renderAxis(axisObj, element, displayName, index); }; _this.renderYAxis = function (element, displayName, index) { var yAxisMap = _this.state.yAxisMap; var axisObj = yAxisMap[element.props.yAxisId]; return _this.renderAxis(axisObj, element, displayName, index); }; _this.renderGrid = function (element) { var _this$state4 = _this.state, xAxisMap = _this$state4.xAxisMap, yAxisMap = _this$state4.yAxisMap, offset = _this$state4.offset; var _this$props2 = _this.props, width = _this$props2.width, height = _this$props2.height; var xAxis = Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["b" /* getAnyElementOfObject */])(xAxisMap); var yAxisWithFiniteDomain = __WEBPACK_IMPORTED_MODULE_1_lodash_find___default()(yAxisMap, function (axis) { return __WEBPACK_IMPORTED_MODULE_0_lodash_every___default()(axis.domain, Number.isFinite); }); var yAxis = yAxisWithFiniteDomain || Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["b" /* getAnyElementOfObject */])(yAxisMap); var props = element.props || {}; return Object(__WEBPACK_IMPORTED_MODULE_7_react__["cloneElement"])(element, { key: element.key || 'grid', x: Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["h" /* isNumber */])(props.x) ? props.x : offset.left, y: Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["h" /* isNumber */])(props.y) ? props.y : offset.top, width: Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["h" /* isNumber */])(props.width) ? props.width : offset.width, height: Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["h" /* isNumber */])(props.height) ? props.height : offset.height, xAxis: xAxis, yAxis: yAxis, offset: offset, chartWidth: width, chartHeight: height, verticalCoordinatesGenerator: props.verticalCoordinatesGenerator || _this.verticalCoordinatesGenerator, horizontalCoordinatesGenerator: props.horizontalCoordinatesGenerator || _this.horizontalCoordinatesGenerator }); }; _this.renderPolarGrid = function (element) { var _this$state5 = _this.state, radiusAxisMap = _this$state5.radiusAxisMap, angleAxisMap = _this$state5.angleAxisMap; var radiusAxis = Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["b" /* getAnyElementOfObject */])(radiusAxisMap); var angleAxis = Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["b" /* getAnyElementOfObject */])(angleAxisMap); var cx = angleAxis.cx, cy = angleAxis.cy, innerRadius = angleAxis.innerRadius, outerRadius = angleAxis.outerRadius; return Object(__WEBPACK_IMPORTED_MODULE_7_react__["cloneElement"])(element, { polarAngles: Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["t" /* getTicksOfAxis */])(angleAxis, true).map(function (entry) { return entry.coordinate; }), polarRadius: Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["t" /* getTicksOfAxis */])(radiusAxis, true).map(function (entry) { return entry.coordinate; }), cx: cx, cy: cy, innerRadius: innerRadius, outerRadius: outerRadius, key: element.key || 'polar-grid' }); }; _this.renderBrush = function (element) { var _this$props3 = _this.props, margin = _this$props3.margin, data = _this$props3.data; var _this$state6 = _this.state, offset = _this$state6.offset, dataStartIndex = _this$state6.dataStartIndex, dataEndIndex = _this$state6.dataEndIndex, updateId = _this$state6.updateId; // TODO: update brush when children update return Object(__WEBPACK_IMPORTED_MODULE_7_react__["cloneElement"])(element, { key: element.key || '_recharts-brush', onChange: Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["d" /* combineEventHandlers */])(_this.handleBrushChange, null, element.props.onChange), data: data, x: Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["h" /* isNumber */])(element.props.x) ? element.props.x : offset.left, y: Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["h" /* isNumber */])(element.props.y) ? element.props.y : offset.top + offset.height + offset.brushBottom - (margin.bottom || 0), width: Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["h" /* isNumber */])(element.props.width) ? element.props.width : offset.width, startIndex: dataStartIndex, endIndex: dataEndIndex, updateId: "brush-".concat(updateId) }); }; _this.renderReferenceElement = function (element, displayName, index) { if (!element) { return null; } var _assertThisInitialize = _assertThisInitialized(_this), clipPathId = _assertThisInitialize.clipPathId; var _this$state7 = _this.state, xAxisMap = _this$state7.xAxisMap, yAxisMap = _this$state7.yAxisMap, offset = _this$state7.offset; var _element$props = element.props, xAxisId = _element$props.xAxisId, yAxisId = _element$props.yAxisId; return Object(__WEBPACK_IMPORTED_MODULE_7_react__["cloneElement"])(element, { key: element.key || "".concat(displayName, "-").concat(index), xAxis: xAxisMap[xAxisId], yAxis: yAxisMap[yAxisId], viewBox: { x: offset.left, y: offset.top, width: offset.width, height: offset.height }, clipPathId: clipPathId }); }; _this.renderGraphicChild = function (element, displayName, index) { var item = _this.filterFormatItem(element, displayName, index); if (!item) { return null; } var graphicalItem = Object(__WEBPACK_IMPORTED_MODULE_7_react__["cloneElement"])(element, item.props); var _this$state8 = _this.state, isTooltipActive = _this$state8.isTooltipActive, tooltipAxis = _this$state8.tooltipAxis, activeTooltipIndex = _this$state8.activeTooltipIndex, activeLabel = _this$state8.activeLabel; var children = _this.props.children; var tooltipItem = Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["j" /* findChildByType */])(children, __WEBPACK_IMPORTED_MODULE_12__component_Tooltip__["a" /* default */]); var _item$props = item.props, points = _item$props.points, isRange = _item$props.isRange, baseLine = _item$props.baseLine; var _item$item$props = item.item.props, activeDot = _item$item$props.activeDot, hide = _item$item$props.hide; var hasActive = !hide && isTooltipActive && tooltipItem && activeDot && activeTooltipIndex >= 0; function findWithPayload(entry) { return tooltipAxis.dataKey(entry.payload); } if (hasActive) { var activePoint, basePoint; if (tooltipAxis.dataKey && !tooltipAxis.allowDuplicatedCategory) { var specifiedKey = typeof tooltipAxis.dataKey === 'function' ? findWithPayload : 'payload.'.concat(tooltipAxis.dataKey); activePoint = Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["a" /* findEntryInArray */])(points, specifiedKey, activeLabel); basePoint = isRange && baseLine && Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["a" /* findEntryInArray */])(baseLine, specifiedKey, activeLabel); } else { activePoint = points[activeTooltipIndex]; basePoint = isRange && baseLine && baseLine[activeTooltipIndex]; } if (!__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(activePoint)) { return [graphicalItem].concat(_toConsumableArray(_this.renderActivePoints({ item: item, activePoint: activePoint, basePoint: basePoint, childIndex: activeTooltipIndex, isRange: isRange }))); } } if (isRange) { return [graphicalItem, null, null]; } return [graphicalItem, null]; }; _this.renderCustomized = function (element) { return Object(__WEBPACK_IMPORTED_MODULE_7_react__["cloneElement"])(element, _objectSpread({}, _this.props, {}, _this.state)); }; var defaultState = _this.constructor.createDefaultState(_props); var _updateId = 0; _this.state = _objectSpread({}, defaultState, { updateId: 0 }, _this.updateStateOfAxisMapsOffsetAndStackGroups(_objectSpread({ props: _props }, defaultState, { updateId: _updateId }))); _this.uniqueChartId = __WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(_props.id) ? Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["k" /* uniqueId */])('recharts') : _props.id; _this.clipPathId = "".concat(_this.uniqueChartId, "-clip"); if (_props.throttleDelay) { _this.triggeredAfterMouseMove = __WEBPACK_IMPORTED_MODULE_5_lodash_throttle___default()(_this.triggeredAfterMouseMove, _props.throttleDelay); } return _this; } /* eslint-disable react/no-did-mount-set-state */ _createClass(CategoricalChartWrapper, [{ key: "componentDidMount", value: function componentDidMount() { if (!__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(this.props.syncId)) { this.addListener(); } } // eslint-disable-next-line camelcase }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { var _this2 = this; var _this$props4 = this.props, data = _this$props4.data, children = _this$props4.children, width = _this$props4.width, height = _this$props4.height, layout = _this$props4.layout, stackOffset = _this$props4.stackOffset, margin = _this$props4.margin; var updateId = this.state.updateId; if (nextProps.data !== data || nextProps.width !== width || nextProps.height !== height || nextProps.layout !== layout || nextProps.stackOffset !== stackOffset || !Object(__WEBPACK_IMPORTED_MODULE_27__util_ShallowEqual__["a" /* shallowEqual */])(nextProps.margin, margin)) { var defaultState = this.constructor.createDefaultState(nextProps); this.setState(_objectSpread({}, defaultState, { updateId: updateId + 1 }, this.updateStateOfAxisMapsOffsetAndStackGroups(_objectSpread({ props: nextProps }, defaultState, { updateId: updateId + 1 })))); } else if (!Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["n" /* isChildrenEqual */])(nextProps.children, children)) { // update configuration in chilren var hasGlobalData = !__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(nextProps.data); var newUpdateId = hasGlobalData ? updateId : updateId + 1; this.setState(function (prevState) { return _objectSpread({ updateId: newUpdateId }, _this2.updateStateOfAxisMapsOffsetAndStackGroups(_objectSpread({ props: nextProps }, prevState, { updateId: newUpdateId }))); }); } // add syncId if (__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(this.props.syncId) && !__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(nextProps.syncId)) { this.addListener(); } // remove syncId if (!__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(this.props.syncId) && __WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(nextProps.syncId)) { this.removeListener(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (!__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(this.props.syncId)) { this.removeListener(); } if (typeof this.triggeredAfterMouseMove.cancel === 'function') { this.triggeredAfterMouseMove.cancel(); } } /** * Get the configuration of all x-axis or y-axis * @param {Object} props Latest props * @param {String} axisType The type of axis * @param {Array} graphicalItems The instances of item * @param {Object} stackGroups The items grouped by axisId and stackId * @param {Number} dataStartIndex The start index of the data series when a brush is applied * @param {Number} dataEndIndex The end index of the data series when a brush is applied * @return {Object} Configuration */ }, { key: "getAxisMap", value: function getAxisMap(props, _ref5) { var _ref5$axisType = _ref5.axisType, axisType = _ref5$axisType === void 0 ? 'xAxis' : _ref5$axisType, AxisComp = _ref5.AxisComp, graphicalItems = _ref5.graphicalItems, stackGroups = _ref5.stackGroups, dataStartIndex = _ref5.dataStartIndex, dataEndIndex = _ref5.dataEndIndex; var children = props.children; var axisIdKey = "".concat(axisType, "Id"); // Get all the instance of Axis var axes = Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["i" /* findAllByType */])(children, AxisComp); var axisMap = {}; if (axes && axes.length) { axisMap = this.getAxisMapByAxes(props, { axes: axes, graphicalItems: graphicalItems, axisType: axisType, axisIdKey: axisIdKey, stackGroups: stackGroups, dataStartIndex: dataStartIndex, dataEndIndex: dataEndIndex }); } else if (graphicalItems && graphicalItems.length) { axisMap = this.getAxisMapByItems(props, { Axis: AxisComp, graphicalItems: graphicalItems, axisType: axisType, axisIdKey: axisIdKey, stackGroups: stackGroups, dataStartIndex: dataStartIndex, dataEndIndex: dataEndIndex }); } return axisMap; } /** * Get the configuration of axis by the options of axis instance * @param {Object} props Latest props * @param {Array} axes The instance of axes * @param {Array} graphicalItems The instances of item * @param {String} axisType The type of axis, xAxis - x-axis, yAxis - y-axis * @param {String} axisIdKey The unique id of an axis * @param {Object} stackGroups The items grouped by axisId and stackId * @param {Number} dataStartIndex The start index of the data series when a brush is applied * @param {Number} dataEndIndex The end index of the data series when a brush is applied * @return {Object} Configuration */ }, { key: "getAxisMapByAxes", value: function getAxisMapByAxes(props, _ref6) { var _this3 = this; var axes = _ref6.axes, graphicalItems = _ref6.graphicalItems, axisType = _ref6.axisType, axisIdKey = _ref6.axisIdKey, stackGroups = _ref6.stackGroups, dataStartIndex = _ref6.dataStartIndex, dataEndIndex = _ref6.dataEndIndex; var layout = props.layout, children = props.children, stackOffset = props.stackOffset; var isCategorial = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["w" /* isCategorialAxis */])(layout, axisType); // Eliminate duplicated axes var axisMap = axes.reduce(function (result, child) { var _child$props = child.props, type = _child$props.type, dataKey = _child$props.dataKey, allowDataOverflow = _child$props.allowDataOverflow, allowDuplicatedCategory = _child$props.allowDuplicatedCategory, scale = _child$props.scale, ticks = _child$props.ticks; var axisId = child.props[axisIdKey]; var displayedData = _this3.constructor.getDisplayedData(props, { graphicalItems: graphicalItems.filter(function (item) { return item.props[axisIdKey] === axisId; }), dataStartIndex: dataStartIndex, dataEndIndex: dataEndIndex }); var len = displayedData.length; if (!result[axisId]) { var domain, duplicateDomain, categoricalDomain; if (dataKey) { domain = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["m" /* getDomainOfDataByKey */])(displayedData, dataKey, type); if (type === 'category' && isCategorial) { var duplicate = Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["e" /* hasDuplicate */])(domain); if (allowDuplicatedCategory && duplicate) { duplicateDomain = domain; // When category axis has duplicated text, serial numbers are used to generate scale domain = __WEBPACK_IMPORTED_MODULE_4_lodash_range___default()(0, len); } else if (!allowDuplicatedCategory) { // remove duplicated category domain = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["x" /* parseDomainOfCategoryAxis */])(child.props.domain, domain, child).reduce(function (finalDomain, entry) { return finalDomain.indexOf(entry) >= 0 ? finalDomain : [].concat(_toConsumableArray(finalDomain), [entry]); }, []); } } else if (type === 'category') { if (!allowDuplicatedCategory) { domain = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["x" /* parseDomainOfCategoryAxis */])(child.props.domain, domain, child).reduce(function (finalDomain, entry) { return finalDomain.indexOf(entry) >= 0 || entry === '' || __WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(entry) ? finalDomain : [].concat(_toConsumableArray(finalDomain), [entry]); }, []); } else { // eliminate undefined or null or empty string domain = domain.filter(function (entry) { return entry !== '' && !__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(entry); }); } } else if (type === 'number') { var errorBarsDomain = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["y" /* parseErrorBarsOfAxis */])(displayedData, graphicalItems.filter(function (item) { return item.props[axisIdKey] === axisId && !item.props.hide; }), dataKey, axisType); if (errorBarsDomain) { domain = errorBarsDomain; } } if (isCategorial && (type === 'number' || scale !== 'auto')) { categoricalDomain = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["m" /* getDomainOfDataByKey */])(displayedData, dataKey, 'category'); } } else if (isCategorial) { domain = __WEBPACK_IMPORTED_MODULE_4_lodash_range___default()(0, len); } else if (stackGroups && stackGroups[axisId] && stackGroups[axisId].hasStack && type === 'number') { // when stackOffset is 'expand', the domain may be calculated as [0, 1.000000000002] domain = stackOffset === 'expand' ? [0, 1] : Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["o" /* getDomainOfStackGroups */])(stackGroups[axisId].stackGroups, dataStartIndex, dataEndIndex); } else { domain = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["n" /* getDomainOfItemsWithSameAxis */])(displayedData, graphicalItems.filter(function (item) { return item.props[axisIdKey] === axisId && !item.props.hide; }), type, true); } if (type === 'number') { // To detect wether there is any reference lines whose props alwaysShow is true domain = Object(__WEBPACK_IMPORTED_MODULE_25__util_DetectReferenceElementsDomain__["a" /* detectReferenceElementsDomain */])(children, domain, axisId, axisType, ticks); if (child.props.domain) { domain = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["A" /* parseSpecifiedDomain */])(child.props.domain, domain, allowDataOverflow); } } return _objectSpread({}, result, _defineProperty({}, axisId, _objectSpread({}, child.props, { axisType: axisType, domain: domain, categoricalDomain: categoricalDomain, duplicateDomain: duplicateDomain, originalDomain: child.props.domain, isCategorial: isCategorial, layout: layout }))); } return result; }, {}); return axisMap; } /** * Get the configuration of axis by the options of item, * this kind of axis does not display in chart * @param {Object} props Latest props * @param {Array} graphicalItems The instances of item * @param {ReactElement} Axis Axis Component * @param {String} axisType The type of axis, xAxis - x-axis, yAxis - y-axis * @param {String} axisIdKey The unique id of an axis * @param {Object} stackGroups The items grouped by axisId and stackId * @param {Number} dataStartIndex The start index of the data series when a brush is applied * @param {Number} dataEndIndex The end index of the data series when a brush is applied * @return {Object} Configuration */ }, { key: "getAxisMapByItems", value: function getAxisMapByItems(props, _ref7) { var graphicalItems = _ref7.graphicalItems, Axis = _ref7.Axis, axisType = _ref7.axisType, axisIdKey = _ref7.axisIdKey, stackGroups = _ref7.stackGroups, dataStartIndex = _ref7.dataStartIndex, dataEndIndex = _ref7.dataEndIndex; var layout = props.layout, children = props.children; var displayedData = this.constructor.getDisplayedData(props, { graphicalItems: graphicalItems, dataStartIndex: dataStartIndex, dataEndIndex: dataEndIndex }); var len = displayedData.length; var isCategorial = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["w" /* isCategorialAxis */])(layout, axisType); var index = -1; // The default type of x-axis is category axis, // The default contents of x-axis is the serial numbers of data // The default type of y-axis is number axis // The default contents of y-axis is the domain of data var axisMap = graphicalItems.reduce(function (result, child) { var axisId = child.props[axisIdKey]; if (!result[axisId]) { index++; var domain; if (isCategorial) { domain = __WEBPACK_IMPORTED_MODULE_4_lodash_range___default()(0, len); } else if (stackGroups && stackGroups[axisId] && stackGroups[axisId].hasStack) { domain = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["o" /* getDomainOfStackGroups */])(stackGroups[axisId].stackGroups, dataStartIndex, dataEndIndex); domain = Object(__WEBPACK_IMPORTED_MODULE_25__util_DetectReferenceElementsDomain__["a" /* detectReferenceElementsDomain */])(children, domain, axisId, axisType); } else { domain = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["A" /* parseSpecifiedDomain */])(Axis.defaultProps.domain, Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["n" /* getDomainOfItemsWithSameAxis */])(displayedData, graphicalItems.filter(function (item) { return item.props[axisIdKey] === axisId && !item.props.hide; }), 'number'), Axis.defaultProps.allowDataOverflow); domain = Object(__WEBPACK_IMPORTED_MODULE_25__util_DetectReferenceElementsDomain__["a" /* detectReferenceElementsDomain */])(children, domain, axisId, axisType); } return _objectSpread({}, result, _defineProperty({}, axisId, _objectSpread({ axisType: axisType }, Axis.defaultProps, { hide: true, orientation: ORIENT_MAP[axisType] && ORIENT_MAP[axisType][index % 2], domain: domain, originalDomain: Axis.defaultProps.domain, isCategorial: isCategorial, layout: layout // specify scale when no Axis // scale: isCategorial ? 'band' : 'linear', }))); } return result; }, {}); return axisMap; } }, { key: "getActiveCoordinate", value: function getActiveCoordinate(tooltipTicks, activeIndex, rangeObj) { var layout = this.props.layout; var entry = tooltipTicks.find(function (tick) { return tick && tick.index === activeIndex; }); if (entry) { if (layout === 'horizontal') { return { x: entry.coordinate, y: rangeObj.y }; } if (layout === 'vertical') { return { x: rangeObj.x, y: entry.coordinate }; } if (layout === 'centric') { var _angle = entry.coordinate; var _radius = rangeObj.radius; return _objectSpread({}, rangeObj, {}, Object(__WEBPACK_IMPORTED_MODULE_26__util_PolarUtils__["e" /* polarToCartesian */])(rangeObj.cx, rangeObj.cy, _radius, _angle), { angle: _angle, radius: _radius }); } var radius = entry.coordinate; var angle = rangeObj.angle; return _objectSpread({}, rangeObj, {}, Object(__WEBPACK_IMPORTED_MODULE_26__util_PolarUtils__["e" /* polarToCartesian */])(rangeObj.cx, rangeObj.cy, radius, angle), { angle: angle, radius: radius }); } return originCoordinate; } /** * Get the information of mouse in chart, return null when the mouse is not in the chart * @param {Object} event The event object * @return {Object} Mouse data */ }, { key: "getMouseInfo", value: function getMouseInfo(event) { if (!this.container) { return null; } var containerOffset = Object(__WEBPACK_IMPORTED_MODULE_22__util_DOMUtils__["b" /* getOffset */])(this.container); var e = Object(__WEBPACK_IMPORTED_MODULE_22__util_DOMUtils__["a" /* calculateChartCoordinate */])(event, containerOffset); var rangeObj = this.inRange(e.chartX, e.chartY); if (!rangeObj) { return null; } var _this$state9 = this.state, xAxisMap = _this$state9.xAxisMap, yAxisMap = _this$state9.yAxisMap; if (eventType !== 'axis' && xAxisMap && yAxisMap) { var xScale = Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["b" /* getAnyElementOfObject */])(xAxisMap).scale; var yScale = Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["b" /* getAnyElementOfObject */])(yAxisMap).scale; var xValue = xScale && xScale.invert ? xScale.invert(e.chartX) : null; var yValue = yScale && yScale.invert ? yScale.invert(e.chartY) : null; return _objectSpread({}, e, { xValue: xValue, yValue: yValue }); } var _this$state10 = this.state, ticks = _this$state10.orderedTooltipTicks, axis = _this$state10.tooltipAxis, tooltipTicks = _this$state10.tooltipTicks; var pos = this.calculateTooltipPos(rangeObj); var activeIndex = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["b" /* calculateActiveTickIndex */])(pos, ticks, tooltipTicks, axis); if (activeIndex >= 0 && tooltipTicks) { var activeLabel = tooltipTicks[activeIndex] && tooltipTicks[activeIndex].value; var activePayload = this.getTooltipContent(activeIndex, activeLabel); var activeCoordinate = this.getActiveCoordinate(ticks, activeIndex, rangeObj); return _objectSpread({}, e, { activeTooltipIndex: activeIndex, activeLabel: activeLabel, activePayload: activePayload, activeCoordinate: activeCoordinate }); } return null; } /** * Get the content to be displayed in the tooltip * @param {Number} activeIndex Active index of data * @param {String} activeLabel Active label of data * @return {Array} The content of tooltip */ }, { key: "getTooltipContent", value: function getTooltipContent(activeIndex, activeLabel) { var _this$state11 = this.state, graphicalItems = _this$state11.graphicalItems, tooltipAxis = _this$state11.tooltipAxis; var displayedData = this.constructor.getDisplayedData(this.props, this.state); if (activeIndex < 0 || !graphicalItems || !graphicalItems.length || activeIndex >= displayedData.length) { return null; } // get data by activeIndex when the axis don't allow duplicated category return graphicalItems.reduce(function (result, child) { var hide = child.props.hide; if (hide) { return result; } var _child$props2 = child.props, dataKey = _child$props2.dataKey, name = _child$props2.name, unit = _child$props2.unit, formatter = _child$props2.formatter, data = _child$props2.data, tooltipType = _child$props2.tooltipType; var payload; if (tooltipAxis.dataKey && !tooltipAxis.allowDuplicatedCategory) { // graphic child has data props payload = Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["a" /* findEntryInArray */])(data || displayedData, tooltipAxis.dataKey, activeLabel); } else { payload = data && data[activeIndex] || displayedData[activeIndex]; } if (!payload) { return result; } return [].concat(_toConsumableArray(result), [_objectSpread({}, Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["l" /* getPresentationAttributes */])(child), { dataKey: dataKey, unit: unit, formatter: formatter, name: name || dataKey, color: Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["q" /* getMainColorOfGraphicItem */])(child), value: Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["v" /* getValueByDataKey */])(payload, dataKey), type: tooltipType, payload: payload })]); }, []); } }, { key: "getFormatItems", value: function getFormatItems(props, currentState) { var _this4 = this; var graphicalItems = currentState.graphicalItems, stackGroups = currentState.stackGroups, offset = currentState.offset, updateId = currentState.updateId, dataStartIndex = currentState.dataStartIndex, dataEndIndex = currentState.dataEndIndex; var barSize = props.barSize, layout = props.layout, barGap = props.barGap, barCategoryGap = props.barCategoryGap, globalMaxBarSize = props.maxBarSize; var _this$constructor$get = this.constructor.getAxisNameByLayout(layout), numericAxisName = _this$constructor$get.numericAxisName, cateAxisName = _this$constructor$get.cateAxisName; var hasBar = this.constructor.hasBar(graphicalItems); var sizeList = hasBar && Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["h" /* getBarSizeList */])({ barSize: barSize, stackGroups: stackGroups }); var formatedItems = []; graphicalItems.forEach(function (item, index) { var displayedData = _this4.constructor.getDisplayedData(props, { dataStartIndex: dataStartIndex, dataEndIndex: dataEndIndex }, item); var _item$props2 = item.props, dataKey = _item$props2.dataKey, childMaxBarSize = _item$props2.maxBarSize; var numericAxisId = item.props["".concat(numericAxisName, "Id")]; var cateAxisId = item.props["".concat(cateAxisName, "Id")]; var axisObj = axisComponents.reduce(function (result, entry) { var _objectSpread4; var axisMap = currentState["".concat(entry.axisType, "Map")]; var id = item.props["".concat(entry.axisType, "Id")]; var axis = axisMap && axisMap[id]; return _objectSpread({}, result, (_objectSpread4 = {}, _defineProperty(_objectSpread4, entry.axisType, axis), _defineProperty(_objectSpread4, "".concat(entry.axisType, "Ticks"), Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["t" /* getTicksOfAxis */])(axis)), _objectSpread4)); }, {}); var cateAxis = axisObj[cateAxisName]; var cateTicks = axisObj["".concat(cateAxisName, "Ticks")]; var stackedData = stackGroups && stackGroups[numericAxisId] && stackGroups[numericAxisId].hasStack && Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["s" /* getStackedDataOfItem */])(item, stackGroups[numericAxisId].stackGroups); var bandSize = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["f" /* getBandSizeOfAxis */])(cateAxis, cateTicks); var maxBarSize = __WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(childMaxBarSize) ? globalMaxBarSize : childMaxBarSize; var barPosition = hasBar && Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["g" /* getBarPosition */])({ barGap: barGap, barCategoryGap: barCategoryGap, bandSize: bandSize, sizeList: sizeList[cateAxisId], maxBarSize: maxBarSize }); var componsedFn = item && item.type && item.type.getComposedData; if (componsedFn) { var _objectSpread5; formatedItems.push({ props: _objectSpread({}, componsedFn(_objectSpread({}, axisObj, { displayedData: displayedData, props: props, dataKey: dataKey, item: item, bandSize: bandSize, barPosition: barPosition, offset: offset, stackedData: stackedData, layout: layout, dataStartIndex: dataStartIndex, dataEndIndex: dataEndIndex, onItemMouseLeave: Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["d" /* combineEventHandlers */])(_this4.handleItemMouseLeave, null, item.props.onMouseLeave), onItemMouseEnter: Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["d" /* combineEventHandlers */])(_this4.handleItemMouseEnter, null, item.props.onMouseEnter) })), (_objectSpread5 = { key: item.key || "item-".concat(index) }, _defineProperty(_objectSpread5, numericAxisName, axisObj[numericAxisName]), _defineProperty(_objectSpread5, cateAxisName, axisObj[cateAxisName]), _defineProperty(_objectSpread5, "animationId", updateId), _objectSpread5)), childIndex: Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["p" /* parseChildIndex */])(item, props.children), item: item }); } }); return formatedItems; } }, { key: "getCursorRectangle", value: function getCursorRectangle() { var layout = this.props.layout; var _this$state12 = this.state, activeCoordinate = _this$state12.activeCoordinate, offset = _this$state12.offset, tooltipAxisBandSize = _this$state12.tooltipAxisBandSize; var halfSize = tooltipAxisBandSize / 2; return { stroke: 'none', fill: '#ccc', x: layout === 'horizontal' ? activeCoordinate.x - halfSize : offset.left + 0.5, y: layout === 'horizontal' ? offset.top + 0.5 : activeCoordinate.y - halfSize, width: layout === 'horizontal' ? tooltipAxisBandSize : offset.width - 1, height: layout === 'horizontal' ? offset.height - 1 : tooltipAxisBandSize }; } }, { key: "getCursorPoints", value: function getCursorPoints() { var layout = this.props.layout; var _this$state13 = this.state, activeCoordinate = _this$state13.activeCoordinate, offset = _this$state13.offset; var x1, y1, x2, y2; if (layout === 'horizontal') { x1 = activeCoordinate.x; x2 = x1; y1 = offset.top; y2 = offset.top + offset.height; } else if (layout === 'vertical') { y1 = activeCoordinate.y; y2 = y1; x1 = offset.left; x2 = offset.left + offset.width; } else if (!__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(activeCoordinate.cx) || !__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(activeCoordinate.cy)) { if (layout === 'centric') { var cx = activeCoordinate.cx, cy = activeCoordinate.cy, innerRadius = activeCoordinate.innerRadius, outerRadius = activeCoordinate.outerRadius, angle = activeCoordinate.angle; var innerPoint = Object(__WEBPACK_IMPORTED_MODULE_26__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, innerRadius, angle); var outerPoint = Object(__WEBPACK_IMPORTED_MODULE_26__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, outerRadius, angle); x1 = innerPoint.x; y1 = innerPoint.y; x2 = outerPoint.x; y2 = outerPoint.y; } else { var _cx = activeCoordinate.cx, _cy = activeCoordinate.cy, radius = activeCoordinate.radius, startAngle = activeCoordinate.startAngle, endAngle = activeCoordinate.endAngle; var startPoint = Object(__WEBPACK_IMPORTED_MODULE_26__util_PolarUtils__["e" /* polarToCartesian */])(_cx, _cy, radius, startAngle); var endPoint = Object(__WEBPACK_IMPORTED_MODULE_26__util_PolarUtils__["e" /* polarToCartesian */])(_cx, _cy, radius, endAngle); return { points: [startPoint, endPoint], cx: _cx, cy: _cy, radius: radius, startAngle: startAngle, endAngle: endAngle }; } } return [{ x: x1, y: y1 }, { x: x2, y: y2 }]; } }, { key: "calculateTooltipPos", value: function calculateTooltipPos(rangeObj) { var layout = this.props.layout; if (layout === 'horizontal') { return rangeObj.x; } if (layout === 'vertical') { return rangeObj.y; } if (layout === 'centric') { return rangeObj.angle; } return rangeObj.radius; } }, { key: "inRange", value: function inRange(x, y) { var layout = this.props.layout; if (layout === 'horizontal' || layout === 'vertical') { var offset = this.state.offset; var isInRange = x >= offset.left && x <= offset.left + offset.width && y >= offset.top && y <= offset.top + offset.height; return isInRange ? { x: x, y: y } : null; } var _this$state14 = this.state, angleAxisMap = _this$state14.angleAxisMap, radiusAxisMap = _this$state14.radiusAxisMap; if (angleAxisMap && radiusAxisMap) { var angleAxis = Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["b" /* getAnyElementOfObject */])(angleAxisMap); return Object(__WEBPACK_IMPORTED_MODULE_26__util_PolarUtils__["d" /* inRangeOfSector */])({ x: x, y: y }, angleAxis); } return null; } }, { key: "parseEventsOfWrapper", value: function parseEventsOfWrapper() { var children = this.props.children; var tooltipItem = Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["j" /* findChildByType */])(children, __WEBPACK_IMPORTED_MODULE_12__component_Tooltip__["a" /* default */]); var tooltipEvents = tooltipItem && eventType === 'axis' ? { onMouseEnter: this.handleMouseEnter, onMouseMove: this.handleMouseMove, onMouseLeave: this.handleMouseLeave, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd } : {}; var outerEvents = Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["f" /* filterEventAttributes */])(this.props, this.handleOuterEvent); return _objectSpread({}, outerEvents, {}, tooltipEvents); } /** * The AxisMaps are expensive to render on large data sets * so provide the ability to store them in state and only update them when necessary * they are dependent upon the start and end index of * the brush so it's important that this method is called _after_ * the state is updated with any new start/end indices * * @param {Object} props The props object to be used for updating the axismaps * @param {Number} dataStartIndex The start index of the data series when a brush is applied * @param {Number} dataEndIndex The end index of the data series when a brush is applied * @param {Number} updateId The update id * @return {Object} state New state to set */ }, { key: "updateStateOfAxisMapsOffsetAndStackGroups", value: function updateStateOfAxisMapsOffsetAndStackGroups(_ref8) { var _this5 = this; var props = _ref8.props, dataStartIndex = _ref8.dataStartIndex, dataEndIndex = _ref8.dataEndIndex, updateId = _ref8.updateId; if (!Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["r" /* validateWidthHeight */])({ props: props })) { return null; } var children = props.children, layout = props.layout, stackOffset = props.stackOffset, data = props.data, reverseStackOrder = props.reverseStackOrder; var _this$constructor$get2 = this.constructor.getAxisNameByLayout(layout), numericAxisName = _this$constructor$get2.numericAxisName, cateAxisName = _this$constructor$get2.cateAxisName; var graphicalItems = Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["i" /* findAllByType */])(children, GraphicalChild); var stackGroups = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["r" /* getStackGroupsByAxisId */])(data, graphicalItems, "".concat(numericAxisName, "Id"), "".concat(cateAxisName, "Id"), stackOffset, reverseStackOrder); var axisObj = axisComponents.reduce(function (result, entry) { var name = "".concat(entry.axisType, "Map"); return _objectSpread({}, result, _defineProperty({}, name, _this5.getAxisMap(props, _objectSpread({}, entry, { graphicalItems: graphicalItems, stackGroups: entry.axisType === numericAxisName && stackGroups, dataStartIndex: dataStartIndex, dataEndIndex: dataEndIndex })))); }, {}); var offset = this.calculateOffset(_objectSpread({}, axisObj, { props: props, graphicalItems: graphicalItems })); Object.keys(axisObj).forEach(function (key) { axisObj[key] = formatAxisMap(props, axisObj[key], offset, key.replace('Map', ''), chartName); }); var cateAxisMap = axisObj["".concat(cateAxisName, "Map")]; var ticksObj = this.tooltipTicksGenerator(cateAxisMap); var formatedGraphicalItems = this.getFormatItems(props, _objectSpread({}, axisObj, { dataStartIndex: dataStartIndex, dataEndIndex: dataEndIndex, updateId: updateId, graphicalItems: graphicalItems, stackGroups: stackGroups, offset: offset })); return _objectSpread({ formatedGraphicalItems: formatedGraphicalItems, graphicalItems: graphicalItems, offset: offset, stackGroups: stackGroups }, ticksObj, {}, axisObj); } /* eslint-disable no-underscore-dangle */ }, { key: "addListener", value: function addListener() { __WEBPACK_IMPORTED_MODULE_28__util_Events__["b" /* eventCenter */].on(__WEBPACK_IMPORTED_MODULE_28__util_Events__["a" /* SYNC_EVENT */], this.handleReceiveSyncEvent); if (__WEBPACK_IMPORTED_MODULE_28__util_Events__["b" /* eventCenter */].setMaxListeners && __WEBPACK_IMPORTED_MODULE_28__util_Events__["b" /* eventCenter */]._maxListeners) { __WEBPACK_IMPORTED_MODULE_28__util_Events__["b" /* eventCenter */].setMaxListeners(__WEBPACK_IMPORTED_MODULE_28__util_Events__["b" /* eventCenter */]._maxListeners + 1); } } }, { key: "removeListener", value: function removeListener() { __WEBPACK_IMPORTED_MODULE_28__util_Events__["b" /* eventCenter */].removeListener(__WEBPACK_IMPORTED_MODULE_28__util_Events__["a" /* SYNC_EVENT */], this.handleReceiveSyncEvent); if (__WEBPACK_IMPORTED_MODULE_28__util_Events__["b" /* eventCenter */].setMaxListeners && __WEBPACK_IMPORTED_MODULE_28__util_Events__["b" /* eventCenter */]._maxListeners) { __WEBPACK_IMPORTED_MODULE_28__util_Events__["b" /* eventCenter */].setMaxListeners(__WEBPACK_IMPORTED_MODULE_28__util_Events__["b" /* eventCenter */]._maxListeners - 1); } } /** * Calculate the offset of main part in the svg element * @param {Object} props Latest props * @param {Array} graphicalItems The instances of item * @param {Object} xAxisMap The configuration of x-axis * @param {Object} yAxisMap The configuration of y-axis * @return {Object} The offset of main part in the svg element */ }, { key: "calculateOffset", value: function calculateOffset(_ref9) { var props = _ref9.props, graphicalItems = _ref9.graphicalItems, _ref9$xAxisMap = _ref9.xAxisMap, xAxisMap = _ref9$xAxisMap === void 0 ? {} : _ref9$xAxisMap, _ref9$yAxisMap = _ref9.yAxisMap, yAxisMap = _ref9$yAxisMap === void 0 ? {} : _ref9$yAxisMap; var width = props.width, height = props.height, children = props.children; var margin = props.margin || {}; var brushItem = Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["j" /* findChildByType */])(children, __WEBPACK_IMPORTED_MODULE_21__cartesian_Brush__["a" /* default */]); var legendItem = Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["j" /* findChildByType */])(children, __WEBPACK_IMPORTED_MODULE_13__component_Legend__["a" /* default */]); var offsetH = Object.keys(yAxisMap).reduce(function (result, id) { var entry = yAxisMap[id]; var orientation = entry.orientation; if (!entry.mirror && !entry.hide) { return _objectSpread({}, result, _defineProperty({}, orientation, result[orientation] + entry.width)); } return result; }, { left: margin.left || 0, right: margin.right || 0 }); var offsetV = Object.keys(xAxisMap).reduce(function (result, id) { var entry = xAxisMap[id]; var orientation = entry.orientation; if (!entry.mirror && !entry.hide) { return _objectSpread({}, result, _defineProperty({}, orientation, result[orientation] + entry.height)); } return result; }, { top: margin.top || 0, bottom: margin.bottom || 0 }); var offset = _objectSpread({}, offsetV, {}, offsetH); var brushBottom = offset.bottom; if (brushItem) { offset.bottom += brushItem.props.height || __WEBPACK_IMPORTED_MODULE_21__cartesian_Brush__["a" /* default */].defaultProps.height; } if (legendItem && this.legendInstance) { var legendBox = this.legendInstance.getBBox(); offset = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["a" /* appendOffsetOfLegend */])(offset, graphicalItems, props, legendBox); } return _objectSpread({ brushBottom: brushBottom }, offset, { width: width - offset.left - offset.right, height: height - offset.top - offset.bottom }); } }, { key: "triggerSyncEvent", value: function triggerSyncEvent(data) { var syncId = this.props.syncId; if (!__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(syncId)) { __WEBPACK_IMPORTED_MODULE_28__util_Events__["b" /* eventCenter */].emit(__WEBPACK_IMPORTED_MODULE_28__util_Events__["a" /* SYNC_EVENT */], syncId, this.uniqueChartId, data); } } }, { key: "filterFormatItem", value: function filterFormatItem(item, displayName, childIndex) { var formatedGraphicalItems = this.state.formatedGraphicalItems; for (var i = 0, len = formatedGraphicalItems.length; i < len; i++) { var entry = formatedGraphicalItems[i]; if (entry.item === item || entry.props.key === item.key || displayName === Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["k" /* getDisplayName */])(entry.item.type) && childIndex === entry.childIndex) { return entry; } } return null; } }, { key: "renderAxis", /** * Draw axis * @param {Object} axisOptions The options of axis * @param {Object} element The axis element * @param {String} displayName The display name of axis * @param {Number} index The index of element * @return {ReactElement} The instance of x-axes */ value: function renderAxis(axisOptions, element, displayName, index) { var _this$props5 = this.props, width = _this$props5.width, height = _this$props5.height; return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_20__cartesian_CartesianAxis__["a" /* default */], _extends({}, axisOptions, { className: "recharts-".concat(axisOptions.axisType, " ").concat(axisOptions.axisType), key: element.key || "".concat(displayName, "-").concat(index), viewBox: { x: 0, y: 0, width: width, height: height }, ticksGenerator: this.axesTicksGenerator })); } /** * Draw grid * @param {ReactElement} element the grid item * @return {ReactElement} The instance of grid */ }, { key: "renderLegend", /** * Draw legend * @return {ReactElement} The instance of Legend */ value: function renderLegend() { var _this6 = this; var formatedGraphicalItems = this.state.formatedGraphicalItems; var _this$props6 = this.props, children = _this$props6.children, width = _this$props6.width, height = _this$props6.height; var margin = this.props.margin || {}; var legendWidth = width - (margin.left || 0) - (margin.right || 0); var legendHeight = height - (margin.top || 0) - (margin.bottom || 0); var props = Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["p" /* getLegendProps */])({ children: children, formatedGraphicalItems: formatedGraphicalItems, legendWidth: legendWidth, legendHeight: legendHeight, legendContent: legendContent }); if (!props) { return null; } var item = props.item, otherProps = _objectWithoutProperties(props, ["item"]); return Object(__WEBPACK_IMPORTED_MODULE_7_react__["cloneElement"])(item, _objectSpread({}, otherProps, { chartWidth: width, chartHeight: height, margin: margin, ref: function ref(legend) { _this6.legendInstance = legend; }, onBBoxUpdate: this.handleLegendBBoxUpdate })); } /** * Draw Tooltip * @return {ReactElement} The instance of Tooltip */ }, { key: "renderTooltip", value: function renderTooltip() { var children = this.props.children; var tooltipItem = Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["j" /* findChildByType */])(children, __WEBPACK_IMPORTED_MODULE_12__component_Tooltip__["a" /* default */]); if (!tooltipItem) { return null; } var _this$state15 = this.state, isTooltipActive = _this$state15.isTooltipActive, activeCoordinate = _this$state15.activeCoordinate, activePayload = _this$state15.activePayload, activeLabel = _this$state15.activeLabel, offset = _this$state15.offset; return Object(__WEBPACK_IMPORTED_MODULE_7_react__["cloneElement"])(tooltipItem, { viewBox: _objectSpread({}, offset, { x: offset.left, y: offset.top }), active: isTooltipActive, label: activeLabel, payload: isTooltipActive ? activePayload : [], coordinate: activeCoordinate }); } }, { key: "renderActivePoints", value: function renderActivePoints(_ref10) { var item = _ref10.item, activePoint = _ref10.activePoint, basePoint = _ref10.basePoint, childIndex = _ref10.childIndex, isRange = _ref10.isRange; var result = []; var key = item.props.key; var _item$item$props2 = item.item.props, activeDot = _item$item$props2.activeDot, dataKey = _item$item$props2.dataKey; var dotProps = _objectSpread({ index: childIndex, dataKey: dataKey, cx: activePoint.x, cy: activePoint.y, r: 4, fill: Object(__WEBPACK_IMPORTED_MODULE_24__util_ChartUtils__["q" /* getMainColorOfGraphicItem */])(item.item), strokeWidth: 2, stroke: '#fff', payload: activePoint.payload, value: activePoint.value, key: "".concat(key, "-activePoint-").concat(childIndex) }, Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["l" /* getPresentationAttributes */])(activeDot), {}, Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["f" /* filterEventAttributes */])(activeDot)); result.push(this.constructor.renderActiveDot(activeDot, dotProps, childIndex)); if (basePoint) { result.push(this.constructor.renderActiveDot(activeDot, _objectSpread({}, dotProps, { cx: basePoint.x, cy: basePoint.y, key: "".concat(key, "-basePoint-").concat(childIndex) }), childIndex)); } else if (isRange) { result.push(null); } return result; } }, { key: "renderClipPath", value: function renderClipPath() { var clipPathId = this.clipPathId; var _this$state$offset = this.state.offset, left = _this$state$offset.left, top = _this$state$offset.top, height = _this$state$offset.height, width = _this$state$offset.width; return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("defs", null, __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("clipPath", { id: clipPathId }, __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("rect", { x: left, y: top, height: height, width: width }))); } }, { key: "render", value: function render() { var _this7 = this; if (!Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["r" /* validateWidthHeight */])(this)) { return null; } var _this$props7 = this.props, children = _this$props7.children, className = _this$props7.className, width = _this$props7.width, height = _this$props7.height, style = _this$props7.style, compact = _this$props7.compact, others = _objectWithoutProperties(_this$props7, ["children", "className", "width", "height", "style", "compact"]); var attrs = Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["l" /* getPresentationAttributes */])(others); var map = { CartesianGrid: { handler: this.renderGrid, once: true }, ReferenceArea: { handler: this.renderReferenceElement }, ReferenceLine: { handler: this.renderReferenceElement }, ReferenceDot: { handler: this.renderReferenceElement }, XAxis: { handler: this.renderXAxis }, YAxis: { handler: this.renderYAxis }, Brush: { handler: this.renderBrush, once: true }, Bar: { handler: this.renderGraphicChild }, Line: { handler: this.renderGraphicChild }, Area: { handler: this.renderGraphicChild }, Radar: { handler: this.renderGraphicChild }, RadialBar: { handler: this.renderGraphicChild }, Scatter: { handler: this.renderGraphicChild }, Pie: { handler: this.renderGraphicChild }, Funnel: { handler: this.renderGraphicChild }, Tooltip: { handler: this.renderCursor, once: true }, PolarGrid: { handler: this.renderPolarGrid, once: true }, PolarAngleAxis: { handler: this.renderPolarAxis }, PolarRadiusAxis: { handler: this.renderPolarAxis }, Customized: { handler: this.renderCustomized } }; // The "compact" mode is mainly used as the panorama within Brush if (compact) { return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__container_Surface__["a" /* default */], _extends({}, attrs, { width: width, height: height }), this.renderClipPath(), Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["q" /* renderByOrder */])(children, map)); } var events = this.parseEventsOfWrapper(); return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div", _extends({ className: __WEBPACK_IMPORTED_MODULE_9_classnames___default()('recharts-wrapper', className), style: _objectSpread({ position: 'relative', cursor: 'default', width: width, height: height }, style) }, events, { ref: function ref(node) { _this7.container = node; } }), __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__container_Surface__["a" /* default */], _extends({}, attrs, { width: width, height: height }), this.renderClipPath(), Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["q" /* renderByOrder */])(children, map)), this.renderLegend(), this.renderTooltip()); } }], [{ key: "getAxisNameByLayout", value: function getAxisNameByLayout(layout) { if (layout === 'horizontal') { return { numericAxisName: 'yAxis', cateAxisName: 'xAxis' }; } if (layout === 'vertical') { return { numericAxisName: 'xAxis', cateAxisName: 'yAxis' }; } if (layout === 'centric') { return { numericAxisName: 'radiusAxis', cateAxisName: 'angleAxis' }; } return { numericAxisName: 'angleAxis', cateAxisName: 'radiusAxis' }; } }, { key: "renderActiveDot", value: function renderActiveDot(option, props) { var dot; if (Object(__WEBPACK_IMPORTED_MODULE_7_react__["isValidElement"])(option)) { dot = Object(__WEBPACK_IMPORTED_MODULE_7_react__["cloneElement"])(option, props); } else if (__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(option)) { dot = option(props); } else { dot = __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_17__shape_Dot__["a" /* default */], props); } return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__container_Layer__["a" /* default */], { className: "recharts-active-dot", key: props.key }, dot); } }]); return CategoricalChartWrapper; }(__WEBPACK_IMPORTED_MODULE_7_react__["Component"]); CategoricalChartWrapper.displayName = chartName; CategoricalChartWrapper.propTypes = _objectSpread({ syncId: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number]), compact: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, width: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, height: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, data: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object), layout: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOf(['horizontal', 'vertical']), stackOffset: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOf(['sign', 'expand', 'none', 'wiggle', 'silhouette']), throttleDelay: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, margin: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.shape({ top: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, right: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, bottom: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, left: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number }), barCategoryGap: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string]), barGap: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string]), barSize: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string]), maxBarSize: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, style: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object, className: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string, children: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node), __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.node]), defaultShowTooltip: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, onClick: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, onMouseLeave: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, onMouseEnter: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, onMouseMove: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, onMouseDown: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, onMouseUp: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, reverseStackOrder: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, id: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string }, propTypes); CategoricalChartWrapper.defaultProps = _objectSpread({ layout: 'horizontal', stackOffset: 'none', barCategoryGap: '10%', barGap: 4, margin: { top: 5, right: 5, bottom: 5, left: 5 }, reverseStackOrder: false }, defaultProps); CategoricalChartWrapper.createDefaultState = function (props) { var children = props.children, defaultShowTooltip = props.defaultShowTooltip; var brushItem = Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["j" /* findChildByType */])(children, __WEBPACK_IMPORTED_MODULE_21__cartesian_Brush__["a" /* default */]); var startIndex = brushItem && brushItem.props && brushItem.props.startIndex || 0; var endIndex = brushItem && brushItem.props && brushItem.props.endIndex || props.data && props.data.length - 1 || 0; return { chartX: 0, chartY: 0, dataStartIndex: startIndex, dataEndIndex: endIndex, activeTooltipIndex: -1, isTooltipActive: !__WEBPACK_IMPORTED_MODULE_6_lodash_isNil___default()(defaultShowTooltip) ? defaultShowTooltip : false }; }; CategoricalChartWrapper.hasBar = function (graphicalItems) { if (!graphicalItems || !graphicalItems.length) { return false; } return graphicalItems.some(function (item) { var name = Object(__WEBPACK_IMPORTED_MODULE_19__util_ReactUtils__["k" /* getDisplayName */])(item && item.type); return name && name.indexOf('Bar') >= 0; }); }; CategoricalChartWrapper.getDisplayedData = function (props, _ref11, item) { var graphicalItems = _ref11.graphicalItems, dataStartIndex = _ref11.dataStartIndex, dataEndIndex = _ref11.dataEndIndex; var itemsData = (graphicalItems || []).reduce(function (result, child) { var itemData = child.props.data; if (itemData && itemData.length) { return [].concat(_toConsumableArray(result), _toConsumableArray(itemData)); } return result; }, []); if (itemsData && itemsData.length > 0) { return itemsData; } if (item && item.props && item.props.data && item.props.data.length > 0) { return item.props.data; } var data = props.data; if (data && data.length && Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["h" /* isNumber */])(dataStartIndex) && Object(__WEBPACK_IMPORTED_MODULE_23__util_DataUtils__["h" /* isNumber */])(dataEndIndex)) { return data.slice(dataStartIndex, dataEndIndex + 1); } return []; }; return CategoricalChartWrapper; }; /* harmony default export */ __webpack_exports__["a"] = (generateCategoricalChart); /***/ }), /* 173 */ /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /* 174 */ /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /* 175 */ /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /* 176 */ /***/ (function(module, exports) { module.exports = false; /***/ }), /* 177 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(211)('meta'); var isObject = __webpack_require__(35); var has = __webpack_require__(108); var setDesc = __webpack_require__(62).f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var FREEZE = !__webpack_require__(33)(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function (it, create) { if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }), /* 178 */ /***/ (function(module, exports, __webpack_require__) { // 22.1.3.31 Array.prototype[@@unscopables] var UNSCOPABLES = __webpack_require__(49)('unscopables'); var ArrayProto = Array.prototype; if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(97)(ArrayProto, UNSCOPABLES, {}); module.exports = function (key) { ArrayProto[UNSCOPABLES][key] = true; }; /***/ }), /* 179 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _registry = _interopRequireDefault(__webpack_require__(180)); var _constant = _interopRequireDefault(__webpack_require__(74)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * return a function from the registry * @param {object} context * @param {string} id the id of the action creator * @return {function} */ function get(context, id) { var creator = context.registry["".concat(_constant["default"].REGISTRY_ACTION_CREATOR_PREFIX, ":").concat(id)]; if (!creator) { throw new Error("actionCreator not found in the registry: ".concat(id)); } return creator; } /** * register your action creator. The action creator is a function with * the following arguments: * - event which trigger this action * - data attached to the action (could contains anything) * - context of the current react app (could contains registry, getState, ...) * @param {String} id * @param {Function} actionCreator (event, data, context) */ function register(id, actionCreator, context) { if (actionCreator === undefined) { throw new Error("CMF: you can't register an undefined value for the following action creator: '".concat(id, "'.\n\t\t\tYou may have an import error in your code. Check the stack trace and your bootstrap config imports.\n\t\t\thttps://github.com/Talend/ui/tree/master/packages/cmf/src/bootstrap.md")); } _registry["default"].addToRegistry("".concat(_constant["default"].REGISTRY_ACTION_CREATOR_PREFIX, ":").concat(id), actionCreator, context); } /** * This function allow to register an object with some action creators * @param {object} actionCreators map of action creators * @param {object} context optional context to get the registry */ var registerMany = _registry["default"].getRegisterMany(register); var _default = { get: get, register: register, registerMany: registerMany }; exports["default"] = _default; //# sourceMappingURL=actionCreator.js.map /***/ }), /* 180 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; /** * Internal. This is the core of react-cmf. * The registry will register everything from a react component to redux action. * @module react-cmf/lib/registry */ /* eslint no-underscore-dangle: ["error", {"allow": ["_registry", "_isLocked"] }] */ /** * @typedef {Object} Registry */ /** * The registry that will have the singleton * - getRegistry() -> the registry which is a simple key/value POJO * @type {Registry} */ var Registry = { _registry: {}, _isLocked: false, getRegistry: function getRegistry() { return this._registry; }, lock: function lock() { this._isLocked = true; }, isLocked: function isLocked() { return this._isLocked; } }; /** * Returns the global registry if no context found. If count is found it returns * the context.registry * @param {object} context React context * @return {Registry} the registry singleton instance */ function getRegistry(context) { if (context && context.registry) { return context.registry; } return Registry.getRegistry(); } /** * Internal. Call this one to add anything you want into the registry. * It will be added only if not locked. * Be warned any existing content will be overridden. * You should use this to add a new configurable concept to CMF. * By default it's internally used to register expression, component and actionCreator * @param {string} id Where you want it to store in the registry to get it later * @param {any} item Everything you want, a function, an object or whatever */ function addToRegistry(id, item, context) { if (Registry.isLocked()) { throw new Error("CMF: The registry is locked, you cannot therefore add '".concat(id, "' in it. ") + 'Please check your CMF configuration, it should not move after the initial ' + 'configuration before bootstrap.'); } var registry = getRegistry(context); if (registry[id]) { // eslint-disable-next-line no-console console.warn("CMF: The '".concat(id, "' object is registered, overriding an existing '").concat(id, "' object. ") + 'Please check your CMF configuration, you might not want that.'); } if (item === undefined) { throw new Error("CMF: you can't register undefined in '".concat(id, "'.\n\t\t\tYou may have an import error in your configuration")); } registry[id] = item; } /** * Internal: return element registred under the ID. * @param {string} id the object's id in the registry you want to get * @param {object} context cmf context * @return {any} the object you are looking for */ function getFromRegistry(id, context) { return getRegistry(context)[id]; } /** * This function is a curry that return a generic function to register components in registry * @param {function} registerFn a function that register a item in the registry */ function getRegisterMany(registerFn) { return function (itemsToRegister, context) { Object.keys(itemsToRegister).forEach(function (key) { registerFn(key, itemsToRegister[key], context); }); }; } var registerMany = getRegisterMany(addToRegistry); /** * Lock the registry */ function lock() { Registry.lock(); } var _default = { Registry: Registry, addToRegistry: addToRegistry, getRegistry: getRegistry, getFromRegistry: getFromRegistry, getRegisterMany: getRegisterMany, lock: lock, registerMany: registerMany }; exports["default"] = _default; //# sourceMappingURL=registry.js.map /***/ }), /* 181 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(1010); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(2029); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(2030); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(2031); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(1014); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(1013); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_4__compose__["a"]; }); /* * This is a dummy function to check if the function name has been altered by minification. * If the function has been minified and NODE_ENV !== 'production', warn the user. */ function isCrushed() {} if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') { Object(__WEBPACK_IMPORTED_MODULE_5__utils_warning__["a" /* default */])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.'); } /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 182 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__loglevel__ = __webpack_require__(2055); /* unused harmony reexport LogLevel */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__severity__ = __webpack_require__(2056); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__severity__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__status__ = __webpack_require__(2057); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__status__["a"]; }); //# sourceMappingURL=index.js.map /***/ }), /* 183 */ /***/ (function(module, exports) { function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } module.exports = _assertThisInitialized; /***/ }), /* 184 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(158); var createDesc = __webpack_require__(345); module.exports = __webpack_require__(141) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /* 185 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /* 186 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /* 187 */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(639); var defined = __webpack_require__(441); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /* 188 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = ownerDocument; function ownerDocument(node) { return node && node.ownerDocument || document; } module.exports = exports["default"]; /***/ }), /* 189 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _CircularProgress = _interopRequireDefault(__webpack_require__(696)); var _constants = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } _CircularProgress["default"].SIZE = _constants.CIRCULAR_PROGRESS_SIZE; var _default = _CircularProgress["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 190 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return FOCUS_GROUP; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return FOCUS_DISABLED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FOCUS_ALLOW; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return FOCUS_AUTO; }); var FOCUS_GROUP = 'data-focus-lock'; var FOCUS_DISABLED = 'data-focus-lock-disabled'; var FOCUS_ALLOW = 'data-no-focus-lock'; var FOCUS_AUTO = 'data-autofocus-inside'; /***/ }), /* 191 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Badge = _interopRequireDefault(__webpack_require__(2529)); var _BadgeComposition = _interopRequireDefault(__webpack_require__(1166)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } Object.entries(_BadgeComposition["default"]).forEach(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), key = _ref2[0], value = _ref2[1]; _Badge["default"][key] = value; }); var _default = _Badge["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 192 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _platform2 = __webpack_require__(2556); var _platform3 = _interopRequireDefault(_platform2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // deep clone of original platform var platform = JSON.parse(JSON.stringify(_platform3.default)); // operating system // sugar for https://github.com/bestiejs/platform.js // make sure to ALWAYS reference the layout engine, // even if it is not necessary for the condition, // as this makes grepping for this stuff simpler var os = platform.os.family || ''; var ANDROID = os === 'Android'; var WINDOWS = os.slice(0, 7) === 'Windows'; var OSX = os === 'OS X'; var IOS = os === 'iOS'; // layout var BLINK = platform.layout === 'Blink'; var GECKO = platform.layout === 'Gecko'; var TRIDENT = platform.layout === 'Trident'; var EDGE = platform.layout === 'EdgeHTML'; var WEBKIT = platform.layout === 'WebKit'; // browser version (not layout engine version!) var version = parseFloat(platform.version); var majorVersion = Math.floor(version); platform.majorVersion = majorVersion; platform.is = { // operating system ANDROID: ANDROID, WINDOWS: WINDOWS, OSX: OSX, IOS: IOS, // layout BLINK: BLINK, // "Chrome", "Chrome Mobile", "Opera" GECKO: GECKO, // "Firefox" TRIDENT: TRIDENT, // "Internet Explorer" EDGE: EDGE, // "Microsoft Edge" WEBKIT: WEBKIT, // "Safari" // INTERNET EXPLORERS IE9: TRIDENT && majorVersion === 9, IE10: TRIDENT && majorVersion === 10, IE11: TRIDENT && majorVersion === 11 }; exports.default = platform; module.exports = exports['default']; //# sourceMappingURL=platform.js.map /***/ }), /* 193 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; module.exports = exports['default']; //# sourceMappingURL=gif.js.map /***/ }), /* 194 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _require = __webpack_require__(2618), DebounceInput = _require.DebounceInput; DebounceInput.DebounceInput = DebounceInput; module.exports = DebounceInput; /***/ }), /* 195 */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 196 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyfill", function() { return polyfill; }); /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ function componentWillMount() { // Call this.constructor.gDSFP to support sub-classes. var state = this.constructor.getDerivedStateFromProps(this.props, this.state); if (state !== null && state !== undefined) { this.setState(state); } } function componentWillReceiveProps(nextProps) { // Call this.constructor.gDSFP to support sub-classes. // Use the setState() updater to ensure state isn't stale in certain edge cases. function updater(prevState) { var state = this.constructor.getDerivedStateFromProps(nextProps, prevState); return state !== null && state !== undefined ? state : null; } // Binding "this" is important for shallow renderer support. this.setState(updater.bind(this)); } function componentWillUpdate(nextProps, nextState) { try { var prevProps = this.props; var prevState = this.state; this.props = nextProps; this.state = nextState; this.__reactInternalSnapshotFlag = true; this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate( prevProps, prevState ); } finally { this.props = prevProps; this.state = prevState; } } // React may warn about cWM/cWRP/cWU methods being deprecated. // Add a flag to suppress these warnings for this special case. componentWillMount.__suppressDeprecationWarning = true; componentWillReceiveProps.__suppressDeprecationWarning = true; componentWillUpdate.__suppressDeprecationWarning = true; function polyfill(Component) { var prototype = Component.prototype; if (!prototype || !prototype.isReactComponent) { throw new Error('Can only polyfill class components'); } if ( typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function' ) { return Component; } // If new component APIs are defined, "unsafe" lifecycles won't be called. // Error if any of these lifecycles are present, // Because they would work differently between older and newer (16.3+) versions of React. var foundWillMountName = null; var foundWillReceivePropsName = null; var foundWillUpdateName = null; if (typeof prototype.componentWillMount === 'function') { foundWillMountName = 'componentWillMount'; } else if (typeof prototype.UNSAFE_componentWillMount === 'function') { foundWillMountName = 'UNSAFE_componentWillMount'; } if (typeof prototype.componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'componentWillReceiveProps'; } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; } if (typeof prototype.componentWillUpdate === 'function') { foundWillUpdateName = 'componentWillUpdate'; } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') { foundWillUpdateName = 'UNSAFE_componentWillUpdate'; } if ( foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null ) { var componentName = Component.displayName || Component.name; var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()'; throw Error( 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks' ); } // React <= 16.2 does not support static getDerivedStateFromProps. // As a workaround, use cWM and cWRP to invoke the new static lifecycle. // Newer versions of React will ignore these lifecycles if gDSFP exists. if (typeof Component.getDerivedStateFromProps === 'function') { prototype.componentWillMount = componentWillMount; prototype.componentWillReceiveProps = componentWillReceiveProps; } // React <= 16.2 does not support getSnapshotBeforeUpdate. // As a workaround, use cWU to invoke the new lifecycle. // Newer versions of React will ignore that lifecycle if gSBU exists. if (typeof prototype.getSnapshotBeforeUpdate === 'function') { if (typeof prototype.componentDidUpdate !== 'function') { throw new Error( 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype' ); } prototype.componentWillUpdate = componentWillUpdate; var componentDidUpdate = prototype.componentDidUpdate; prototype.componentDidUpdate = function componentDidUpdatePolyfill( prevProps, prevState, maybeSnapshot ) { // 16.3+ will not execute our will-update method; // It will pass a snapshot value to did-update though. // Older versions will require our polyfilled will-update value. // We need to handle both cases, but can't just check for the presence of "maybeSnapshot", // Because for <= 15.x versions this might be a "prevContext" object. // We also can't just check "__reactInternalSnapshot", // Because get-snapshot might return a falsy value. // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior. var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot; componentDidUpdate.call(this, prevProps, prevState, snapshot); }; } return Component; } /***/ }), /* 197 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }; /***/ }), /* 198 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(1198); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (obj, key, value) { if (key in obj) { (0, _defineProperty2.default)(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; /***/ }), /* 199 */ /***/ (function(module, exports, __webpack_require__) { var getTimezoneOffsetInMilliseconds = __webpack_require__(2792) var isDate = __webpack_require__(1240) var MILLISECONDS_IN_HOUR = 3600000 var MILLISECONDS_IN_MINUTE = 60000 var DEFAULT_ADDITIONAL_DIGITS = 2 var parseTokenDateTimeDelimeter = /[T ]/ var parseTokenPlainTime = /:/ // year tokens var parseTokenYY = /^(\d{2})$/ var parseTokensYYY = [ /^([+-]\d{2})$/, // 0 additional digits /^([+-]\d{3})$/, // 1 additional digit /^([+-]\d{4})$/ // 2 additional digits ] var parseTokenYYYY = /^(\d{4})/ var parseTokensYYYYY = [ /^([+-]\d{4})/, // 0 additional digits /^([+-]\d{5})/, // 1 additional digit /^([+-]\d{6})/ // 2 additional digits ] // date tokens var parseTokenMM = /^-(\d{2})$/ var parseTokenDDD = /^-?(\d{3})$/ var parseTokenMMDD = /^-?(\d{2})-?(\d{2})$/ var parseTokenWww = /^-?W(\d{2})$/ var parseTokenWwwD = /^-?W(\d{2})-?(\d{1})$/ // time tokens var parseTokenHH = /^(\d{2}([.,]\d*)?)$/ var parseTokenHHMM = /^(\d{2}):?(\d{2}([.,]\d*)?)$/ var parseTokenHHMMSS = /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/ // timezone tokens var parseTokenTimezone = /([Z+-].*)$/ var parseTokenTimezoneZ = /^(Z)$/ var parseTokenTimezoneHH = /^([+-])(\d{2})$/ var parseTokenTimezoneHHMM = /^([+-])(\d{2}):?(\d{2})$/ /** * @category Common Helpers * @summary Convert the given argument to an instance of Date. * * @description * Convert the given argument to an instance of Date. * * If the argument is an instance of Date, the function returns its clone. * * If the argument is a number, it is treated as a timestamp. * * If an argument is a string, the function tries to parse it. * Function accepts complete ISO 8601 formats as well as partial implementations. * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601 * * If all above fails, the function passes the given argument to Date constructor. * * @param {Date|String|Number} argument - the value to convert * @param {Object} [options] - the object with options * @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format * @returns {Date} the parsed date in the local time zone * * @example * // Convert string '2014-02-11T11:30:30' to date: * var result = parse('2014-02-11T11:30:30') * //=> Tue Feb 11 2014 11:30:30 * * @example * // Parse string '+02014101', * // if the additional number of digits in the extended year format is 1: * var result = parse('+02014101', {additionalDigits: 1}) * //=> Fri Apr 11 2014 00:00:00 */ function parse (argument, dirtyOptions) { if (isDate(argument)) { // Prevent the date to lose the milliseconds when passed to new Date() in IE10 return new Date(argument.getTime()) } else if (typeof argument !== 'string') { return new Date(argument) } var options = dirtyOptions || {} var additionalDigits = options.additionalDigits if (additionalDigits == null) { additionalDigits = DEFAULT_ADDITIONAL_DIGITS } else { additionalDigits = Number(additionalDigits) } var dateStrings = splitDateString(argument) var parseYearResult = parseYear(dateStrings.date, additionalDigits) var year = parseYearResult.year var restDateString = parseYearResult.restDateString var date = parseDate(restDateString, year) if (date) { var timestamp = date.getTime() var time = 0 var offset if (dateStrings.time) { time = parseTime(dateStrings.time) } if (dateStrings.timezone) { offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE } else { var fullTime = timestamp + time var fullTimeDate = new Date(fullTime) offset = getTimezoneOffsetInMilliseconds(fullTimeDate) // Adjust time when it's coming from DST var fullTimeDateNextDay = new Date(fullTime) fullTimeDateNextDay.setDate(fullTimeDate.getDate() + 1) var offsetDiff = getTimezoneOffsetInMilliseconds(fullTimeDateNextDay) - getTimezoneOffsetInMilliseconds(fullTimeDate) if (offsetDiff > 0) { offset += offsetDiff } } return new Date(timestamp + time + offset) } else { return new Date(argument) } } function splitDateString (dateString) { var dateStrings = {} var array = dateString.split(parseTokenDateTimeDelimeter) var timeString if (parseTokenPlainTime.test(array[0])) { dateStrings.date = null timeString = array[0] } else { dateStrings.date = array[0] timeString = array[1] } if (timeString) { var token = parseTokenTimezone.exec(timeString) if (token) { dateStrings.time = timeString.replace(token[1], '') dateStrings.timezone = token[1] } else { dateStrings.time = timeString } } return dateStrings } function parseYear (dateString, additionalDigits) { var parseTokenYYY = parseTokensYYY[additionalDigits] var parseTokenYYYYY = parseTokensYYYYY[additionalDigits] var token // YYYY or ±YYYYY token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString) if (token) { var yearString = token[1] return { year: parseInt(yearString, 10), restDateString: dateString.slice(yearString.length) } } // YY or ±YYY token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString) if (token) { var centuryString = token[1] return { year: parseInt(centuryString, 10) * 100, restDateString: dateString.slice(centuryString.length) } } // Invalid ISO-formatted year return { year: null } } function parseDate (dateString, year) { // Invalid ISO-formatted year if (year === null) { return null } var token var date var month var week // YYYY if (dateString.length === 0) { date = new Date(0) date.setUTCFullYear(year) return date } // YYYY-MM token = parseTokenMM.exec(dateString) if (token) { date = new Date(0) month = parseInt(token[1], 10) - 1 date.setUTCFullYear(year, month) return date } // YYYY-DDD or YYYYDDD token = parseTokenDDD.exec(dateString) if (token) { date = new Date(0) var dayOfYear = parseInt(token[1], 10) date.setUTCFullYear(year, 0, dayOfYear) return date } // YYYY-MM-DD or YYYYMMDD token = parseTokenMMDD.exec(dateString) if (token) { date = new Date(0) month = parseInt(token[1], 10) - 1 var day = parseInt(token[2], 10) date.setUTCFullYear(year, month, day) return date } // YYYY-Www or YYYYWww token = parseTokenWww.exec(dateString) if (token) { week = parseInt(token[1], 10) - 1 return dayOfISOYear(year, week) } // YYYY-Www-D or YYYYWwwD token = parseTokenWwwD.exec(dateString) if (token) { week = parseInt(token[1], 10) - 1 var dayOfWeek = parseInt(token[2], 10) - 1 return dayOfISOYear(year, week, dayOfWeek) } // Invalid ISO-formatted date return null } function parseTime (timeString) { var token var hours var minutes // hh token = parseTokenHH.exec(timeString) if (token) { hours = parseFloat(token[1].replace(',', '.')) return (hours % 24) * MILLISECONDS_IN_HOUR } // hh:mm or hhmm token = parseTokenHHMM.exec(timeString) if (token) { hours = parseInt(token[1], 10) minutes = parseFloat(token[2].replace(',', '.')) return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE } // hh:mm:ss or hhmmss token = parseTokenHHMMSS.exec(timeString) if (token) { hours = parseInt(token[1], 10) minutes = parseInt(token[2], 10) var seconds = parseFloat(token[3].replace(',', '.')) return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE + seconds * 1000 } // Invalid ISO-formatted time return null } function parseTimezone (timezoneString) { var token var absoluteOffset // Z token = parseTokenTimezoneZ.exec(timezoneString) if (token) { return 0 } // ±hh token = parseTokenTimezoneHH.exec(timezoneString) if (token) { absoluteOffset = parseInt(token[2], 10) * 60 return (token[1] === '+') ? -absoluteOffset : absoluteOffset } // ±hh:mm or ±hhmm token = parseTokenTimezoneHHMM.exec(timezoneString) if (token) { absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10) return (token[1] === '+') ? -absoluteOffset : absoluteOffset } return 0 } function dayOfISOYear (isoYear, week, day) { week = week || 0 day = day || 0 var date = new Date(0) date.setUTCFullYear(isoYear, 0, 4) var fourthOfJanuaryDay = date.getUTCDay() || 7 var diff = week * 7 + day + 1 - fourthOfJanuaryDay date.setUTCDate(date.getUTCDate() + diff) return date } module.exports = parse /***/ }), /* 200 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(294), getRawTag = __webpack_require__(2915), objectToString = __webpack_require__(2916); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /* 201 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tc-column-chooser":"ColumnChooser__tc-column-chooser___18UrI","tc-column-chooser-header":"ColumnChooser__tc-column-chooser-header___1FAA_","tc-column-chooser-header-title":"ColumnChooser__tc-column-chooser-header-title___1o-0C","tc-column-chooser-filter":"ColumnChooser__tc-column-chooser-filter___3MjQs","tc-column-chooser-body":"ColumnChooser__tc-column-chooser-body___g4YPT","tc-column-chooser-footer":"ColumnChooser__tc-column-chooser-footer___3fHpK","tc-column-chooser-row":"ColumnChooser__tc-column-chooser-row___3RJ07","tc-column-chooser-row-select-all":"ColumnChooser__tc-column-chooser-row-select-all___ypXaR","tc-column-chooser-row-label":"ColumnChooser__tc-column-chooser-row-label___1qljj","tc-column-chooser-row-locked-icon":"ColumnChooser__tc-column-chooser-row-locked-icon___3sYwZ"}; /***/ }), /* 202 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /* 203 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(828); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /* 204 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== 'production') { var ReactIs = __webpack_require__(47); // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(3523)(ReactIs.isElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(3525)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 205 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isObject__ = __webpack_require__(93); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isObject___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isObject__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(106); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Text__ = __webpack_require__(250); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__util_DataUtils__ = __webpack_require__(42); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__ = __webpack_require__(130); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function _extends() { _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; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var cartesianViewBoxShape = __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ x: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, y: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, width: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, height: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number }); var polarViewBoxShape = __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ cx: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, cy: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, innerRadius: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, outerRadius: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, startAngle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, endAngle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number }); var propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_7__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], { viewBox: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([cartesianViewBoxShape, polarViewBoxShape]), formatter: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, value: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string]), offset: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, position: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['top', 'left', 'right', 'bottom', 'inside', 'outside', 'insideLeft', 'insideRight', 'insideTop', 'insideBottom', 'insideTopLeft', 'insideBottomLeft', 'insideTopRight', 'insideBottomRight', 'insideStart', 'insideEnd', 'end', 'center', 'centerTop', 'centerBottom']), children: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.node), __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.node]), className: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, content: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.element, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func]) }); var defaultProps = { offset: 5 }; var getLabel = function getLabel(props) { var value = props.value, formatter = props.formatter; var label = __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(props.children) ? value : props.children; if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(formatter)) { return formatter(label); } return label; }; var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) { var sign = Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["j" /* mathSign */])(endAngle - startAngle); var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 360); return sign * deltaAngle; }; var renderRadialLabel = function renderRadialLabel(labelProps, label, attrs) { var position = labelProps.position, viewBox = labelProps.viewBox, offset = labelProps.offset, className = labelProps.className; var cx = viewBox.cx, cy = viewBox.cy, innerRadius = viewBox.innerRadius, outerRadius = viewBox.outerRadius, startAngle = viewBox.startAngle, endAngle = viewBox.endAngle, clockWise = viewBox.clockWise; var radius = (innerRadius + outerRadius) / 2; var deltaAngle = getDeltaAngle(startAngle, endAngle); var sign = deltaAngle >= 0 ? 1 : -1; var labelAngle, direction; if (position === 'insideStart') { labelAngle = startAngle + sign * offset; direction = clockWise; } else if (position === 'insideEnd') { labelAngle = endAngle - sign * offset; direction = !clockWise; } else if (position === 'end') { labelAngle = endAngle + sign * offset; direction = clockWise; } direction = deltaAngle <= 0 ? direction : !direction; var startPoint = Object(__WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, radius, labelAngle); var endPoint = Object(__WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, radius, labelAngle + (direction ? 1 : -1) * 359); var path = "M".concat(startPoint.x, ",").concat(startPoint.y, "\n A").concat(radius, ",").concat(radius, ",0,1,").concat(direction ? 0 : 1, ",\n ").concat(endPoint.x, ",").concat(endPoint.y); var id = __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(labelProps.id) ? Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["k" /* uniqueId */])('recharts-radial-line-') : labelProps.id; return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("text", _extends({}, attrs, { dominantBaseline: "central", className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()('recharts-radial-bar-label', className) }), __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("defs", null, __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("path", { id: id, d: path })), __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("textPath", { xlinkHref: "#".concat(id) }, label)); }; var getAttrsOfPolarLabel = function getAttrsOfPolarLabel(props) { var viewBox = props.viewBox, offset = props.offset, position = props.position; var cx = viewBox.cx, cy = viewBox.cy, innerRadius = viewBox.innerRadius, outerRadius = viewBox.outerRadius, startAngle = viewBox.startAngle, endAngle = viewBox.endAngle; var midAngle = (startAngle + endAngle) / 2; if (position === 'outside') { var _polarToCartesian = Object(__WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, outerRadius + offset, midAngle), _x = _polarToCartesian.x, _y = _polarToCartesian.y; return { x: _x, y: _y, textAnchor: _x >= cx ? 'start' : 'end', verticalAnchor: 'middle' }; } if (position === 'center') { return { x: cx, y: cy, textAnchor: 'middle', verticalAnchor: 'middle' }; } if (position === 'centerTop') { return { x: cx, y: cy, textAnchor: 'middle', verticalAnchor: 'start' }; } if (position === 'centerBottom') { return { x: cx, y: cy, textAnchor: 'middle', verticalAnchor: 'end' }; } var r = (innerRadius + outerRadius) / 2; var _polarToCartesian2 = Object(__WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, r, midAngle), x = _polarToCartesian2.x, y = _polarToCartesian2.y; return { x: x, y: y, textAnchor: 'middle', verticalAnchor: 'middle' }; }; var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) { var viewBox = props.viewBox, offset = props.offset, position = props.position; var x = viewBox.x, y = viewBox.y, width = viewBox.width, height = viewBox.height; var sign = height >= 0 ? 1 : -1; if (position === 'top') { return { x: x + width / 2, y: y - sign * offset, textAnchor: 'middle', verticalAnchor: sign > 0 ? 'end' : 'start' }; } if (position === 'bottom') { return { x: x + width / 2, y: y + height + sign * offset, textAnchor: 'middle', verticalAnchor: 'start' }; } if (position === 'left') { return { x: x - offset, y: y + height / 2, textAnchor: 'end', verticalAnchor: 'middle' }; } if (position === 'right') { return { x: x + width + offset, y: y + height / 2, textAnchor: 'start', verticalAnchor: 'middle' }; } if (position === 'insideLeft') { return { x: x + offset, y: y + height / 2, textAnchor: 'start', verticalAnchor: 'middle' }; } if (position === 'insideRight') { return { x: x + width - offset, y: y + height / 2, textAnchor: 'end', verticalAnchor: 'middle' }; } if (position === 'insideTop') { return { x: x + width / 2, y: y + sign * offset, textAnchor: 'middle', verticalAnchor: 'start' }; } if (position === 'insideBottom') { return { x: x + width / 2, y: y + height - sign * offset, textAnchor: 'middle', verticalAnchor: 'end' }; } if (position === 'insideTopLeft') { return { x: x + offset, y: y + sign * offset, textAnchor: 'start', verticalAnchor: 'start' }; } if (position === 'insideTopRight') { return { x: x + width - offset, y: y + sign * offset, textAnchor: 'end', verticalAnchor: 'start' }; } if (position === 'insideBottomLeft') { return { x: x + offset, y: y + height - sign * offset, textAnchor: 'start', verticalAnchor: 'end' }; } if (position === 'insideBottomRight') { return { x: x + width - offset, y: y + height - sign * offset, textAnchor: 'end', verticalAnchor: 'end' }; } if (__WEBPACK_IMPORTED_MODULE_0_lodash_isObject___default()(position) && (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(position.x) || Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["i" /* isPercent */])(position.x)) && (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(position.y) || Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["i" /* isPercent */])(position.y))) { return { x: x + Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["d" /* getPercentValue */])(position.x, width), y: y + Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["d" /* getPercentValue */])(position.y, height), textAnchor: 'end', verticalAnchor: 'end' }; } return { x: x + width / 2, y: y + height / 2, textAnchor: 'middle', verticalAnchor: 'middle' }; }; var isPolar = function isPolar(viewBox) { return Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(viewBox.cx); }; function Label(props) { var viewBox = props.viewBox, position = props.position, value = props.value, children = props.children, content = props.content, _props$className = props.className, className = _props$className === void 0 ? '' : _props$className; if (!viewBox || __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(value) && __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(children) && !Object(__WEBPACK_IMPORTED_MODULE_3_react__["isValidElement"])(content) && !__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(content)) { return null; } if (Object(__WEBPACK_IMPORTED_MODULE_3_react__["isValidElement"])(content)) { return Object(__WEBPACK_IMPORTED_MODULE_3_react__["cloneElement"])(content, props); } var label; if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(content)) { label = content(props); if (Object(__WEBPACK_IMPORTED_MODULE_3_react__["isValidElement"])(label)) { return label; } } else { label = getLabel(props); } var isPolarLabel = isPolar(viewBox); var attrs = Object(__WEBPACK_IMPORTED_MODULE_7__util_ReactUtils__["l" /* getPresentationAttributes */])(props); var events = Object(__WEBPACK_IMPORTED_MODULE_7__util_ReactUtils__["f" /* filterEventAttributes */])(props); if (isPolarLabel && (position === 'insideStart' || position === 'insideEnd' || position === 'end')) { return renderRadialLabel(props, label, attrs); } var positionAttrs = isPolarLabel ? getAttrsOfPolarLabel(props) : getAttrsOfCartesianLabel(props); return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__Text__["a" /* default */], _extends({ className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()('recharts-label', className) }, attrs, positionAttrs, events), label); } Label.displayName = 'Label'; Label.defaultProps = defaultProps; Label.propTypes = propTypes; var parseViewBox = function parseViewBox(props) { var cx = props.cx, cy = props.cy, angle = props.angle, startAngle = props.startAngle, endAngle = props.endAngle, r = props.r, radius = props.radius, innerRadius = props.innerRadius, outerRadius = props.outerRadius, x = props.x, y = props.y, top = props.top, left = props.left, width = props.width, height = props.height, clockWise = props.clockWise; if (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(width) && Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(height)) { if (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(x) && Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(y)) { return { x: x, y: y, width: width, height: height }; } if (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(top) && Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(left)) { return { x: top, y: left, width: width, height: height }; } } if (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(x) && Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(y)) { return { x: x, y: y, width: 0, height: 0 }; } if (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(cx) && Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["h" /* isNumber */])(cy)) { return { cx: cx, cy: cy, startAngle: startAngle || angle || 0, endAngle: endAngle || angle || 0, innerRadius: innerRadius || 0, outerRadius: outerRadius || radius || r || 0, clockWise: clockWise }; } if (props.viewBox) { return props.viewBox; } return {}; }; var parseLabel = function parseLabel(label, viewBox) { if (!label) { return null; } if (label === true) { return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Label, { key: "label-implicit", viewBox: viewBox }); } if (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__["g" /* isNumOrStr */])(label)) { return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Label, { key: "label-implicit", viewBox: viewBox, value: label }); } if (Object(__WEBPACK_IMPORTED_MODULE_3_react__["isValidElement"])(label)) { if (label.type === Label) { return Object(__WEBPACK_IMPORTED_MODULE_3_react__["cloneElement"])(label, { key: 'label-implicit', viewBox: viewBox }); } return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Label, { key: "label-implicit", content: label, viewBox: viewBox }); } if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(label)) { return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Label, { key: "label-implicit", content: label, viewBox: viewBox }); } if (__WEBPACK_IMPORTED_MODULE_0_lodash_isObject___default()(label)) { return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Label, _extends({ viewBox: viewBox }, label, { key: "label-implicit" })); } return null; }; var renderCallByParent = function renderCallByParent(parentProps, viewBox) { var ckeckPropsLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; if (!parentProps || !parentProps.children && ckeckPropsLabel && !parentProps.label) { return null; } var children = parentProps.children; var parentViewBox = parseViewBox(parentProps); var explicitChilren = Object(__WEBPACK_IMPORTED_MODULE_7__util_ReactUtils__["i" /* findAllByType */])(children, Label).map(function (child, index) { return Object(__WEBPACK_IMPORTED_MODULE_3_react__["cloneElement"])(child, { viewBox: viewBox || parentViewBox, key: "label-".concat(index) }); }); if (!ckeckPropsLabel) { return explicitChilren; } var implicitLabel = parseLabel(parentProps.label, viewBox || parentViewBox); return [implicitLabel].concat(_toConsumableArray(explicitChilren)); }; Label.parseViewBox = parseViewBox; Label.renderCallByParent = renderCallByParent; /* harmony default export */ __webpack_exports__["a"] = (Label); /***/ }), /* 206 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["c"] = identity; /* harmony export (immutable) */ __webpack_exports__["a"] = copy; /* harmony export (immutable) */ __webpack_exports__["d"] = transformer; /* harmony export (immutable) */ __webpack_exports__["b"] = continuous; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(151); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(3591); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__array__ = __webpack_require__(251); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__constant__ = __webpack_require__(3607); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__number__ = __webpack_require__(1463); var unit = [0, 1]; function identity(x) { return x; } function normalize(a, b) { return (b -= (a = +a)) ? function(x) { return (x - a) / b; } : Object(__WEBPACK_IMPORTED_MODULE_3__constant__["a" /* default */])(isNaN(b) ? NaN : 0.5); } function clamper(domain) { var a = domain[0], b = domain[domain.length - 1], t; if (a > b) t = a, a = b, b = t; return function(x) { return Math.max(a, Math.min(b, x)); }; } // normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. // interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b]. function bimap(domain, range, interpolate) { var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1]; if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0); else d0 = normalize(d0, d1), r0 = interpolate(r0, r1); return function(x) { return r0(d0(x)); }; } function polymap(domain, range, interpolate) { var j = Math.min(domain.length, range.length) - 1, d = new Array(j), r = new Array(j), i = -1; // Reverse descending domains. if (domain[j] < domain[0]) { domain = domain.slice().reverse(); range = range.slice().reverse(); } while (++i < j) { d[i] = normalize(domain[i], domain[i + 1]); r[i] = interpolate(range[i], range[i + 1]); } return function(x) { var i = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["b" /* bisect */])(domain, x, 1, j) - 1; return r[i](d[i](x)); }; } function copy(source, target) { return target .domain(source.domain()) .range(source.range()) .interpolate(source.interpolate()) .clamp(source.clamp()) .unknown(source.unknown()); } function transformer() { var domain = unit, range = unit, interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["a" /* interpolate */], transform, untransform, unknown, clamp = identity, piecewise, output, input; function rescale() { piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap; output = input = null; return scale; } function scale(x) { return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x))); } scale.invert = function(y) { return clamp(untransform((input || (input = piecewise(range, domain.map(transform), __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["b" /* interpolateNumber */])))(y))); }; scale.domain = function(_) { return arguments.length ? (domain = __WEBPACK_IMPORTED_MODULE_2__array__["a" /* map */].call(_, __WEBPACK_IMPORTED_MODULE_4__number__["a" /* default */]), clamp === identity || (clamp = clamper(domain)), rescale()) : domain.slice(); }; scale.range = function(_) { return arguments.length ? (range = __WEBPACK_IMPORTED_MODULE_2__array__["b" /* slice */].call(_), rescale()) : range.slice(); }; scale.rangeRound = function(_) { return range = __WEBPACK_IMPORTED_MODULE_2__array__["b" /* slice */].call(_), interpolate = __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__["c" /* interpolateRound */], rescale(); }; scale.clamp = function(_) { return arguments.length ? (clamp = _ ? clamper(domain) : identity, scale) : clamp !== identity; }; scale.interpolate = function(_) { return arguments.length ? (interpolate = _, rescale()) : interpolate; }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; return function(t, u) { transform = t, untransform = u; return rescale(); }; } function continuous(transform, untransform) { return transformer()(transform, untransform); } /***/ }), /* 207 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return formatAxisMap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return rectWithPoints; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return rectWithCoords; }); /* unused harmony export ScaleHelper */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LabeledScaleHelper; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_every__ = __webpack_require__(1485); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_every___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_every__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_mapValues__ = __webpack_require__(3649); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_mapValues___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_mapValues__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ChartUtils__ = __webpack_require__(84); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * Calculate the scale function, position, width, height of axes * @param {Object} props Latest props * @param {Object} axisMap The configuration of axes * @param {Object} offset The offset of main part in the svg element * @param {String} axisType The type of axes, x-axis or y-axis * @param {String} chartName The name of chart * @return {Object} Configuration */ var formatAxisMap = function formatAxisMap(props, axisMap, offset, axisType, chartName) { var width = props.width, height = props.height, layout = props.layout; var ids = Object.keys(axisMap); var steps = { left: offset.left, leftMirror: offset.left, right: width - offset.right, rightMirror: width - offset.right, top: offset.top, topMirror: offset.top, bottom: height - offset.bottom, bottomMirror: height - offset.bottom }; return ids.reduce(function (result, id) { var axis = axisMap[id]; var orientation = axis.orientation, domain = axis.domain, _axis$padding = axis.padding, padding = _axis$padding === void 0 ? {} : _axis$padding, mirror = axis.mirror, reversed = axis.reversed; var offsetKey = "".concat(orientation).concat(mirror ? 'Mirror' : ''); var range, x, y, needSpace; if (axisType === 'xAxis') { range = [offset.left + (padding.left || 0), offset.left + offset.width - (padding.right || 0)]; } else if (axisType === 'yAxis') { range = layout === 'horizontal' ? [offset.top + offset.height - (padding.bottom || 0), offset.top + (padding.top || 0)] : [offset.top + (padding.top || 0), offset.top + offset.height - (padding.bottom || 0)]; } else { range = axis.range; } if (reversed) { range = [range[1], range[0]]; } var _parseScale = Object(__WEBPACK_IMPORTED_MODULE_2__ChartUtils__["z" /* parseScale */])(axis, chartName), scale = _parseScale.scale, realScaleType = _parseScale.realScaleType; scale.domain(domain).range(range); Object(__WEBPACK_IMPORTED_MODULE_2__ChartUtils__["c" /* checkDomainOfScale */])(scale); var ticks = Object(__WEBPACK_IMPORTED_MODULE_2__ChartUtils__["u" /* getTicksOfScale */])(scale, _objectSpread({}, axis, { realScaleType: realScaleType })); if (axisType === 'xAxis') { needSpace = orientation === 'top' && !mirror || orientation === 'bottom' && mirror; x = offset.left; y = steps[offsetKey] - needSpace * axis.height; } else if (axisType === 'yAxis') { needSpace = orientation === 'left' && !mirror || orientation === 'right' && mirror; x = steps[offsetKey] - needSpace * axis.width; y = offset.top; } var finalAxis = _objectSpread({}, axis, {}, ticks, { realScaleType: realScaleType, x: x, y: y, scale: scale, width: axisType === 'xAxis' ? offset.width : axis.width, height: axisType === 'yAxis' ? offset.height : axis.height }); finalAxis.bandSize = Object(__WEBPACK_IMPORTED_MODULE_2__ChartUtils__["f" /* getBandSizeOfAxis */])(finalAxis, ticks); if (!axis.hide && axisType === 'xAxis') { steps[offsetKey] += (needSpace ? -1 : 1) * finalAxis.height; } else if (!axis.hide) { steps[offsetKey] += (needSpace ? -1 : 1) * finalAxis.width; } return _objectSpread({}, result, _defineProperty({}, id, finalAxis)); }, {}); }; var rectWithPoints = function rectWithPoints(_ref, _ref2) { var x1 = _ref.x, y1 = _ref.y; var x2 = _ref2.x, y2 = _ref2.y; return { x: Math.min(x1, x2), y: Math.min(y1, y2), width: Math.abs(x2 - x1), height: Math.abs(y2 - y1) }; }; /** * Compute the x, y, width, and height of a box from two reference points. * @param {Object} coords x1, x2, y1, and y2 * @return {Object} object */ var rectWithCoords = function rectWithCoords(_ref3) { var x1 = _ref3.x1, y1 = _ref3.y1, x2 = _ref3.x2, y2 = _ref3.y2; return rectWithPoints({ x: x1, y: y1 }, { x: x2, y: y2 }); }; var ScaleHelper = /*#__PURE__*/ function () { _createClass(ScaleHelper, null, [{ key: "create", value: function create(obj) { return new ScaleHelper(obj); } }]); function ScaleHelper(scale) { _classCallCheck(this, ScaleHelper); this.scale = scale; } _createClass(ScaleHelper, [{ key: "apply", value: function apply(value) { var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, bandAware = _ref4.bandAware, position = _ref4.position; if (value === undefined) { return undefined; } if (position) { switch (position) { case 'start': { return this.scale(value); } case 'middle': { var offset = this.bandwidth ? this.bandwidth() / 2 : 0; return this.scale(value) + offset; } case 'end': { var _offset = this.bandwidth ? this.bandwidth() : 0; return this.scale(value) + _offset; } default: { return this.scale(value); } } } if (bandAware) { var _offset2 = this.bandwidth ? this.bandwidth() / 2 : 0; return this.scale(value) + _offset2; } return this.scale(value); } }, { key: "isInRange", value: function isInRange(value) { var range = this.range(); var first = range[0]; var last = range[range.length - 1]; return first <= last ? value >= first && value <= last : value >= last && value <= first; } }, { key: "domain", get: function get() { return this.scale.domain; } }, { key: "range", get: function get() { return this.scale.range; } }, { key: "rangeMin", get: function get() { return this.range()[0]; } }, { key: "rangeMax", get: function get() { return this.range()[1]; } }, { key: "bandwidth", get: function get() { return this.scale.bandwidth; } }]); return ScaleHelper; }(); ScaleHelper.EPS = 1e-4; var LabeledScaleHelper = /*#__PURE__*/ function () { _createClass(LabeledScaleHelper, null, [{ key: "create", value: function create(obj) { return new this(obj); } }]); function LabeledScaleHelper(scales) { _classCallCheck(this, LabeledScaleHelper); this.scales = __WEBPACK_IMPORTED_MODULE_1_lodash_mapValues___default()(scales, ScaleHelper.create); Object.assign(this, this.scales); } _createClass(LabeledScaleHelper, [{ key: "apply", value: function apply(coords) { var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, bandAware = _ref5.bandAware; var scales = this.scales; return __WEBPACK_IMPORTED_MODULE_1_lodash_mapValues___default()(coords, function (value, label) { return scales[label].apply(value, { bandAware: bandAware }); }); } }, { key: "isInRange", value: function isInRange(coords) { var scales = this.scales; return __WEBPACK_IMPORTED_MODULE_0_lodash_every___default()(coords, function (value, label) { return scales[label].isInRange(value); }); } }]); return LabeledScaleHelper; }(); /***/ }), /* 208 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(1561); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /* 209 */ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 210 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /* 211 */ /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /* 212 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(930); var enumBugKeys = __webpack_require__(563); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /* 213 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(120); var max = Math.max; var min = Math.min; module.exports = function (index, length) { index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }), /* 214 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(20); var dPs = __webpack_require__(931); var enumBugKeys = __webpack_require__(563); var IE_PROTO = __webpack_require__(562)('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(560)('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __webpack_require__(564).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /* 215 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(930); var hiddenKeys = __webpack_require__(563).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; /***/ }), /* 216 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var global = __webpack_require__(28); var dP = __webpack_require__(62); var DESCRIPTORS = __webpack_require__(53); var SPECIES = __webpack_require__(49)('species'); module.exports = function (KEY) { var C = global[KEY]; if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { configurable: true, get: function () { return this; } }); }; /***/ }), /* 217 */ /***/ (function(module, exports) { module.exports = function (it, Constructor, name, forbiddenField) { if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { throw TypeError(name + ': incorrect invocation!'); } return it; }; /***/ }), /* 218 */ /***/ (function(module, exports, __webpack_require__) { var ctx = __webpack_require__(118); var call = __webpack_require__(943); var isArrayIter = __webpack_require__(575); var anObject = __webpack_require__(20); var toLength = __webpack_require__(50); var getIterFn = __webpack_require__(577); var BREAK = {}; var RETURN = {}; var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); var f = ctx(fn, that, entries ? 2 : 1); var index = 0; var length, step, iterator, result; if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if (result === BREAK || result === RETURN) return result; } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { result = call(iterator, f, step.value, entries); if (result === BREAK || result === RETURN) return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN; /***/ }), /* 219 */ /***/ (function(module, exports, __webpack_require__) { var redefine = __webpack_require__(98); module.exports = function (target, src, safe) { for (var key in src) redefine(target, key, src[key], safe); return target; }; /***/ }), /* 220 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(35); module.exports = function (it, TYPE) { if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); return it; }; /***/ }), /* 221 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var collectionsActions = _interopRequireWildcard(__webpack_require__(1889)); var componentsActions = _interopRequireWildcard(__webpack_require__(1916)); var settingsActions = _interopRequireWildcard(__webpack_require__(1917)); var saga = _interopRequireWildcard(__webpack_require__(1978)); var _http = _interopRequireDefault(__webpack_require__(424)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } /** * @module react-cmf/lib/actions * @see module:react-cmf/lib/actions/collectionsActions * @see module:react-cmf/lib/actions/componentsActions * @see module:react-cmf/lib/actions/settingsActions */ /** * exported API * @example import { collectionsActions, componentsActions, settingsActions } from 'react-cmf/lib/actions'; * @type {Object} */ var _default = { collectionsActions: collectionsActions, componentsActions: componentsActions, settingsActions: settingsActions, http: _http["default"], collections: collectionsActions, components: componentsActions, settings: settingsActions, saga: saga }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 222 */ /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(1891), getValue = __webpack_require__(1896); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /* 223 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["d"] = isError; /* harmony export (immutable) */ __webpack_exports__["e"] = isErrorEvent; /* harmony export (immutable) */ __webpack_exports__["a"] = isDOMError; /* harmony export (immutable) */ __webpack_exports__["b"] = isDOMException; /* harmony export (immutable) */ __webpack_exports__["k"] = isString; /* harmony export (immutable) */ __webpack_exports__["i"] = isPrimitive; /* harmony export (immutable) */ __webpack_exports__["h"] = isPlainObject; /* harmony export (immutable) */ __webpack_exports__["f"] = isEvent; /* harmony export (immutable) */ __webpack_exports__["c"] = isElement; /* harmony export (immutable) */ __webpack_exports__["j"] = isRegExp; /* harmony export (immutable) */ __webpack_exports__["m"] = isThenable; /* harmony export (immutable) */ __webpack_exports__["l"] = isSyntheticEvent; /* harmony export (immutable) */ __webpack_exports__["g"] = isInstanceOf; /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /** * Checks whether given value's type is one of a few Error or Error-like * {@link isError}. * * @param wat A value to be checked. * @returns A boolean representing the result. */ function isError(wat) { switch (Object.prototype.toString.call(wat)) { case '[object Error]': return true; case '[object Exception]': return true; case '[object DOMException]': return true; default: return isInstanceOf(wat, Error); } } /** * Checks whether given value's type is ErrorEvent * {@link isErrorEvent}. * * @param wat A value to be checked. * @returns A boolean representing the result. */ function isErrorEvent(wat) { return Object.prototype.toString.call(wat) === '[object ErrorEvent]'; } /** * Checks whether given value's type is DOMError * {@link isDOMError}. * * @param wat A value to be checked. * @returns A boolean representing the result. */ function isDOMError(wat) { return Object.prototype.toString.call(wat) === '[object DOMError]'; } /** * Checks whether given value's type is DOMException * {@link isDOMException}. * * @param wat A value to be checked. * @returns A boolean representing the result. */ function isDOMException(wat) { return Object.prototype.toString.call(wat) === '[object DOMException]'; } /** * Checks whether given value's type is a string * {@link isString}. * * @param wat A value to be checked. * @returns A boolean representing the result. */ function isString(wat) { return Object.prototype.toString.call(wat) === '[object String]'; } /** * Checks whether given value's is a primitive (undefined, null, number, boolean, string) * {@link isPrimitive}. * * @param wat A value to be checked. * @returns A boolean representing the result. */ function isPrimitive(wat) { return wat === null || (typeof wat !== 'object' && typeof wat !== 'function'); } /** * Checks whether given value's type is an object literal * {@link isPlainObject}. * * @param wat A value to be checked. * @returns A boolean representing the result. */ function isPlainObject(wat) { return Object.prototype.toString.call(wat) === '[object Object]'; } /** * Checks whether given value's type is an Event instance * {@link isEvent}. * * @param wat A value to be checked. * @returns A boolean representing the result. */ function isEvent(wat) { return typeof Event !== 'undefined' && isInstanceOf(wat, Event); } /** * Checks whether given value's type is an Element instance * {@link isElement}. * * @param wat A value to be checked. * @returns A boolean representing the result. */ function isElement(wat) { return typeof Element !== 'undefined' && isInstanceOf(wat, Element); } /** * Checks whether given value's type is an regexp * {@link isRegExp}. * * @param wat A value to be checked. * @returns A boolean representing the result. */ function isRegExp(wat) { return Object.prototype.toString.call(wat) === '[object RegExp]'; } /** * Checks whether given value has a then function. * @param wat A value to be checked. */ function isThenable(wat) { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access return Boolean(wat && wat.then && typeof wat.then === 'function'); } /** * Checks whether given value's type is a SyntheticEvent * {@link isSyntheticEvent}. * * @param wat A value to be checked. * @returns A boolean representing the result. */ function isSyntheticEvent(wat) { return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat; } /** * Checks whether given value's type is an instance of provided constructor. * {@link isInstanceOf}. * * @param wat A value to be checked. * @param base A constructor to be used in a check. * @returns A boolean representing the result. */ function isInstanceOf(wat, base) { try { return wat instanceof base; } catch (_e) { return false; } } //# sourceMappingURL=is.js.map /***/ }), /* 224 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Copyright (C) 2006-2021 Talend Inc. - www.talend.com * * Licensed under the Apache License, Version 2.0 (the 'License'); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an 'AS IS' BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ var GET_COMPONENT_LIST_LOADING = exports.GET_COMPONENT_LIST_LOADING = 'GET_COMPONENT_LIST_LOADING'; var GET_COMPONENT_LIST_OK = exports.GET_COMPONENT_LIST_OK = 'GET_COMPONENT_LIST_OK'; var GET_COMPONENT_LIST_ERROR = exports.GET_COMPONENT_LIST_ERROR = 'GET_COMPONENT_LIST_ERROR'; var GET_ICONS_LIST_OK = exports.GET_ICONS_LIST_OK = 'GET_ICONS_LIST_OK'; var SELECT_COMPONENT_NODE = exports.SELECT_COMPONENT_NODE = 'SELECT_COMPONENT_NODE'; var TOGGLE_COMPONENT_NODE = exports.TOGGLE_COMPONENT_NODE = 'TOGGLE_COMPONENT_NODE'; var SWITCH_TREE = exports.SWITCH_TREE = 'SWITCH_TREE'; var CLOSE_DOCUMENTATION_MODAL = exports.CLOSE_DOCUMENTATION_MODAL = 'CLOSE_DOCUMENTATION_MODAL'; var CHANGE_COMPONENT_ERRORS = exports.CHANGE_COMPONENT_ERRORS = 'CHANGE_COMPONENT_ERRORS'; var CHANGE_COMPONENT_PROPERTIES = exports.CHANGE_COMPONENT_PROPERTIES = 'CHANGE_COMPONENT_PROPERTIES'; var GET_COMPONENT_LOADING = exports.GET_COMPONENT_LOADING = 'GET_COMPONENT_LOADING'; var GET_COMPONENT_OK = exports.GET_COMPONENT_OK = 'GET_COMPONENT_OK'; var GET_COMPONENT_ERROR = exports.GET_COMPONENT_ERROR = 'GET_COMPONENT_ERROR'; var BACK_TO_COMPONENT_EDIT = exports.BACK_TO_COMPONENT_EDIT = 'BACK_TO_COMPONENT_EDIT'; var SUBMIT_COMPONENT = exports.SUBMIT_COMPONENT = 'SUBMIT_COMPONENT'; var DOCUMENTATION_LOADING = exports.DOCUMENTATION_LOADING = 'DOCUMENTATION_LOADING'; var DOCUMENTATION_LOADED = exports.DOCUMENTATION_LOADED = 'DOCUMENTATION_LOADED'; var DOCUMENTATION_LOADED_ERROR = exports.DOCUMENTATION_LOADED_ERROR = 'DOCUMENTATION_LOADED_ERROR'; var GET_ICON = exports.GET_ICON = 'GET_ICON'; var FAMILY_RELOADING = exports.FAMILY_RELOADING = 'FAMILY_RELOADING'; var FAMILY_RELOADED = exports.FAMILY_RELOADED = 'FAMILY_RELOADED'; var FAMILY_RELOADED_ERROR = exports.FAMILY_RELOADED_ERROR = 'FAMILY_RELOADED_ERROR'; var ADD_NOTIFICATION = exports.ADD_NOTIFICATION = 'ADD_NOTIFICATION'; var REMOVE_NOTIFICATION = exports.REMOVE_NOTIFICATION = 'REMOVE_NOTIFICATION'; /***/ }), /* 225 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(140); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /* 226 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2195); /***/ }), /* 227 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(57); exports.__esModule = true; exports.default = style; var _camelizeStyle = _interopRequireDefault(__webpack_require__(1078)); var _hyphenateStyle = _interopRequireDefault(__webpack_require__(2207)); var _getComputedStyle2 = _interopRequireDefault(__webpack_require__(2209)); var _removeStyle = _interopRequireDefault(__webpack_require__(2210)); var _properties = __webpack_require__(651); var _isTransform = _interopRequireDefault(__webpack_require__(2211)); function style(node, property, value) { var css = ''; var transforms = ''; var props = property; if (typeof property === 'string') { if (value === undefined) { return node.style[(0, _camelizeStyle.default)(property)] || (0, _getComputedStyle2.default)(node).getPropertyValue((0, _hyphenateStyle.default)(property)); } else { (props = {})[property] = value; } } Object.keys(props).forEach(function (key) { var value = props[key]; if (!value && value !== 0) { (0, _removeStyle.default)(node, (0, _hyphenateStyle.default)(key)); } else if ((0, _isTransform.default)(key)) { transforms += key + "(" + value + ") "; } else { css += (0, _hyphenateStyle.default)(key) + ": " + value + ";"; } }); if (transforms) { css += _properties.transform + ": " + transforms + ";"; } node.style.cssText += ';' + css; } module.exports = exports["default"]; /***/ }), /* 228 */ /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(2315), getValue = __webpack_require__(2320); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /* 229 */ /***/ (function(module, exports) { function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } module.exports = _assertThisInitialized; /***/ }), /* 230 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.Style = exports.State = exports.DEVICE_SIZES = exports.SIZE_MAP = exports.Size = void 0; var Size = { LARGE: 'large', SMALL: 'small', XSMALL: 'xsmall' }; exports.Size = Size; var SIZE_MAP = { large: 'lg', medium: 'md', small: 'sm', xsmall: 'xs', lg: 'lg', md: 'md', sm: 'sm', xs: 'xs' }; exports.SIZE_MAP = SIZE_MAP; var DEVICE_SIZES = ['lg', 'md', 'sm', 'xs']; exports.DEVICE_SIZES = DEVICE_SIZES; var State = { SUCCESS: 'success', WARNING: 'warning', DANGER: 'danger', INFO: 'info' }; exports.State = State; var Style = { DEFAULT: 'default', PRIMARY: 'primary', LINK: 'link', INVERSE: 'inverse' }; exports.Style = Style; /***/ }), /* 231 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "DROPDOWN_CONTAINER_CN", { enumerable: true, get: function get() { return _ActionDropdown.DROPDOWN_CONTAINER_CN; } }); exports["default"] = void 0; var _ActionDropdown = _interopRequireWildcard(__webpack_require__(2440)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } var _default = _ActionDropdown["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 232 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return toArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return asArray; }); var toArray = function toArray(a) { var ret = Array(a.length); for (var i = 0; i < a.length; ++i) { ret[i] = a[i]; } return ret; }; var arrayFind = function arrayFind(array, search) { return array.filter(function (a) { return a === search; })[0]; }; var asArray = function asArray(a) { return Array.isArray(a) ? a : [a]; }; /***/ }), /* 233 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function get() { return _Checkbox["default"]; } }); exports["default"] = void 0; var _Toggle = _interopRequireDefault(__webpack_require__(1164)); var _LabelToggle = _interopRequireDefault(__webpack_require__(2516)); var _Checkbox = _interopRequireDefault(__webpack_require__(363)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } _Toggle["default"].Label = _LabelToggle["default"]; var _default = _Toggle["default"]; // TODO 6.0: remove this export, it is attached to Toggle component exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 234 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tc-badge":"Badge__tc-badge___2_bZy","tc-badge-readonly":"Badge__tc-badge-readonly___1dzW7","tc-badge-button":"Badge__tc-badge-button___111Or","tc-badge-white":"Badge__tc-badge-white___38Bke","tc-badge-category":"Badge__tc-badge-category___1npGX","tc-badge-separator":"Badge__tc-badge-separator___2KApG","tc-badge-separator-icon":"Badge__tc-badge-separator-icon___3ICTZ","tc-badge-label":"Badge__tc-badge-label___3wkKi","tc-badge-label-text":"Badge__tc-badge-label-text___1iYps","tc-badge-label-text-with-categ":"Badge__tc-badge-label-text-with-categ___k1Kri","tc-badge-label-icon":"Badge__tc-badge-label-icon___1Jzdh","tc-badge-delete-icon":"Badge__tc-badge-delete-icon___37NcG","tc-badge-dropdown":"Badge__tc-badge-dropdown___3lq4R","tc-badge-display-large":"Badge__tc-badge-display-large___35GpV","tc-badge-display-small":"Badge__tc-badge-display-small___83uv0","tc-badge-aslink":"Badge__tc-badge-aslink___fw-QJ","tc-badge-disabled":"Badge__tc-badge-disabled___3xLN3","tc-badge-edit":"Badge__tc-badge-edit___8mGtA","tc-badge-selected":"Badge__tc-badge-selected___Md463","tc-badge--valid":"Badge__tc-badge--valid___CVJkA","tc-badge--invalid":"Badge__tc-badge--invalid___Nae-T","tc-badge--empty":"Badge__tc-badge--empty___3Cu8I","tc-badge--pattern":"Badge__tc-badge--pattern___2lR1h","tc-badge--value":"Badge__tc-badge--value___1VPdv"}; /***/ }), /* 235 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /* 236 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(164); var createDesc = __webpack_require__(367); module.exports = __webpack_require__(165) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /* 237 */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(1202); var defined = __webpack_require__(717); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /* 238 */ /***/ (function(module, exports, __webpack_require__) { var startOfWeek = __webpack_require__(290) /** * @category ISO Week Helpers * @summary Return the start of an ISO week for the given date. * * @description * Return the start of an ISO week for the given date. * The result will be in the local timezone. * * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date * * @param {Date|String|Number} date - the original date * @returns {Date} the start of an ISO week * * @example * // The start of an ISO week for 2 September 2014 11:55:00: * var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) * //=> Mon Sep 01 2014 00:00:00 */ function startOfISOWeek (dirtyDate) { return startOfWeek(dirtyDate, {weekStartsOn: 1}) } module.exports = startOfISOWeek /***/ }), /* 239 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) var startOfISOWeek = __webpack_require__(238) /** * @category ISO Week-Numbering Year Helpers * @summary Get the ISO week-numbering year of the given date. * * @description * Get the ISO week-numbering year of the given date, * which always starts 3 days before the year's first Thursday. * * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date * * @param {Date|String|Number} date - the given date * @returns {Number} the ISO week-numbering year * * @example * // Which ISO-week numbering year is 2 January 2005? * var result = getISOYear(new Date(2005, 0, 2)) * //=> 2004 */ function getISOYear (dirtyDate) { var date = parse(dirtyDate) var year = date.getFullYear() var fourthOfJanuaryOfNextYear = new Date(0) fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4) fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0) var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear) var fourthOfJanuaryOfThisYear = new Date(0) fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4) fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0) var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear) if (date.getTime() >= startOfNextYear.getTime()) { return year + 1 } else if (date.getTime() >= startOfThisYear.getTime()) { return year } else { return year - 1 } } module.exports = getISOYear /***/ }), /* 240 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Year Helpers * @summary Get the year of the given date. * * @description * Get the year of the given date. * * @param {Date|String|Number} date - the given date * @returns {Number} the year * * @example * // Which year is 2 July 2014? * var result = getYear(new Date(2014, 6, 2)) * //=> 2014 */ function getYear (dirtyDate) { var date = parse(dirtyDate) var year = date.getFullYear() return year } module.exports = getYear /***/ }), /* 241 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Day Helpers * @summary Add the specified number of days to the given date. * * @description * Add the specified number of days to the given date. * * @param {Date|String|Number} date - the date to be changed * @param {Number} amount - the amount of days to be added * @returns {Date} the new date with the days added * * @example * // Add 10 days to 1 September 2014: * var result = addDays(new Date(2014, 8, 1), 10) * //=> Thu Sep 11 2014 00:00:00 */ function addDays (dirtyDate, amount) { var date = parse(dirtyDate) date.setDate(date.getDate() + amount) return date } module.exports = addDays /***/ }), /* 242 */ /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(2923), getValue = __webpack_require__(2926); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /* 243 */ /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /* 244 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(40), isLength = __webpack_require__(771); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /* 245 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export mapProps */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__blueprint__ = __webpack_require__(83); function mapProps(propsMapper) { return { instanceCallbacks: [ Object(__WEBPACK_IMPORTED_MODULE_0__blueprint__["d" /* propsCallback */])(function (props) { return (propsMapper(props)); }), ], }; } /* harmony default export */ __webpack_exports__["a"] = (mapProps); //# sourceMappingURL=mapProps.js.map /***/ }), /* 246 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createSimpleLifecycle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createComparingLifecycle; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__blueprint__ = __webpack_require__(83); var createSimpleLifecycle = function (kind, callback) { return ({ instanceCallbacks: [{ kind: kind, callback: function (props) { return function () { return callback(props); }; } }] }); }; var createComparingLifecycle = function (kind, callback) { return ({ instanceCallbacks: function () { var prevProps; return [ Object(__WEBPACK_IMPORTED_MODULE_0__blueprint__["d" /* propsCallback */])(function (props) { if (prevProps === undefined) { prevProps = props; } return props; }), { kind: kind, callback: function (props) { return function () { var prevPropsTmp = prevProps; prevProps = props; var result = callback(prevPropsTmp, props); return result; }; }, }, ]; }, }); }; //# sourceMappingURL=lifecycle.js.map /***/ }), /* 247 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); var _exportNames = { cellDictionary: true, headerDictionary: true }; Object.defineProperty(exports, "cellDictionary", { enumerable: true, get: function get() { return _dictionary.cellDictionary; } }); Object.defineProperty(exports, "headerDictionary", { enumerable: true, get: function get() { return _dictionary.headerDictionary; } }); exports["default"] = void 0; var _Content = _interopRequireDefault(__webpack_require__(149)); var _VirtualizedList = _interopRequireDefault(__webpack_require__(3178)); var _dictionary = __webpack_require__(1318); var _CellActions = __webpack_require__(1322); var _CellBadge = __webpack_require__(1324); var _CellCheckbox = __webpack_require__(800); var _CellDatetime = __webpack_require__(1326); var _CellTextIcon = __webpack_require__(1358); var _CellTitle = __webpack_require__(799); var _CellBoolean = __webpack_require__(3331); var _CellLabel = __webpack_require__(1325); var _CellIconText = __webpack_require__(3335); var _constants = __webpack_require__(105); Object.keys(_constants).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _constants[key]; } }); }); var rowUtils = _interopRequireWildcard(__webpack_require__(301)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } // For compatibility _VirtualizedList["default"].Content = _Content["default"]; _VirtualizedList["default"].Actions = _CellActions.ActionsColumn; _VirtualizedList["default"].Badge = _CellBadge.BadgeColumn; _VirtualizedList["default"].Checkbox = _CellCheckbox.CheckboxColumn; _VirtualizedList["default"].Datetime = _CellDatetime.DatetimeColumn; _VirtualizedList["default"].Text = _Content["default"]; _VirtualizedList["default"].TextIcon = _CellTextIcon.TextIconColumn; _VirtualizedList["default"].Title = _CellTitle.TitleColumn; _VirtualizedList["default"].Boolean = _CellBoolean.BooleanColumn; _VirtualizedList["default"].Label = _CellLabel.LabelColumn; _VirtualizedList["default"].IconText = _CellIconText.IconTextColumn; _VirtualizedList["default"].cellDictionary = _dictionary.cellDictionary; _VirtualizedList["default"].headerDictionary = _dictionary.headerDictionary; _VirtualizedList["default"].rowUtils = rowUtils; _VirtualizedList["default"].LIST_TYPES = _constants.listTypes; _VirtualizedList["default"].SORT_BY = _constants.SORT_BY; _VirtualizedList["default"].SELECTION_MODE = _constants.SELECTION_MODE; var _default = _VirtualizedList["default"]; // TODO 6.0: remove those exports, they are attached to exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 248 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports.useListContext = useListContext; exports.ListContext = void 0; var _react = _interopRequireWildcard(__webpack_require__(0)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } // eslint-disable-next-line import/prefer-default-export var ListContext = /*#__PURE__*/_react["default"].createContext(); exports.ListContext = ListContext; function useListContext() { var context = (0, _react.useContext)(ListContext); if (!context) { throw Error('@talend/react-components > List: you are using a sub component out of List.Manager.'); } return context; } //# sourceMappingURL=context.js.map /***/ }), /* 249 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony default export */ __webpack_exports__["a"] = (function(x) { return function constant() { return x; }; }); /***/ }), /* 250 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isNil__ = __webpack_require__(106); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isNil__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_reduce_css_calc__ = __webpack_require__(3553); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_reduce_css_calc___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_reduce_css_calc__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_DataUtils__ = __webpack_require__(42); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util_DOMUtils__ = __webpack_require__(518); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var BREAKING_SPACES = /[ \f\n\r\t\v\u2028\u2029]+/; var calculateWordWidths = function calculateWordWidths(props) { try { var words = !__WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(props.children) ? props.children.toString().split(BREAKING_SPACES) : []; var wordsWithComputedWidth = words.map(function (word) { return { word: word, width: Object(__WEBPACK_IMPORTED_MODULE_7__util_DOMUtils__["c" /* getStringSize */])(word, props.style).width }; }); var spaceWidth = Object(__WEBPACK_IMPORTED_MODULE_7__util_DOMUtils__["c" /* getStringSize */])("\xA0", props.style).width; return { wordsWithComputedWidth: wordsWithComputedWidth, spaceWidth: spaceWidth }; } catch (e) { return null; } }; var Text = /*#__PURE__*/ function (_Component) { _inherits(Text, _Component); function Text(_props) { var _this; _classCallCheck(this, Text); _this = _possibleConstructorReturn(this, _getPrototypeOf(Text).call(this, _props)); _this.getWordsWithoutCalculate = function (props) { var words = !__WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(props.children) ? props.children.toString().split(BREAKING_SPACES) : []; return [{ words: words }]; }; _this.state = { wordsByLines: _this.getWordsByLines(_props, true) }; return _this; } _createClass(Text, [{ key: "componentDidMount", value: function componentDidMount() { this.updateWordsByLines(this.props, true); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.width !== this.props.width || prevProps.scaleToFit !== this.props.scaleToFit || prevProps.children !== this.props.children || prevProps.style !== this.props.style) { var needCalculate = this.props.children !== prevProps.children || this.props.style !== prevProps.style; this.updateWordsByLines(this.props, needCalculate); } } }, { key: "updateWordsByLines", value: function updateWordsByLines(props, needCalculate) { this.setState({ wordsByLines: this.getWordsByLines(props, needCalculate) }); } }, { key: "getWordsByLines", value: function getWordsByLines(props, needCalculate) { // Only perform calculations if using features that require them (multiline, scaleToFit) if ((props.width || props.scaleToFit) && !Object(__WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__["o" /* isSsr */])()) { if (needCalculate) { var wordWidths = calculateWordWidths(props); if (wordWidths) { var wordsWithComputedWidth = wordWidths.wordsWithComputedWidth, spaceWidth = wordWidths.spaceWidth; this.wordsWithComputedWidth = wordsWithComputedWidth; this.spaceWidth = spaceWidth; } else { return this.getWordsWithoutCalculate(props); } } return this.calculateWordsByLines(this.wordsWithComputedWidth, this.spaceWidth, props.width); } return this.getWordsWithoutCalculate(props); } }, { key: "calculateWordsByLines", value: function calculateWordsByLines(wordsWithComputedWidth, spaceWidth, lineWidth) { var scaleToFit = this.props.scaleToFit; return (wordsWithComputedWidth || []).reduce(function (result, _ref) { var word = _ref.word, width = _ref.width; var currentLine = result[result.length - 1]; if (currentLine && (lineWidth == null || scaleToFit || currentLine.width + width + spaceWidth < lineWidth)) { // Word can be added to an existing line currentLine.words.push(word); currentLine.width += width + spaceWidth; } else { // Add first word to line or word is too long to scaleToFit on existing line var newLine = { words: [word], width: width }; result.push(newLine); } return result; }, []); } }, { key: "render", value: function render() { var _this$props = this.props, dx = _this$props.dx, dy = _this$props.dy, textAnchor = _this$props.textAnchor, verticalAnchor = _this$props.verticalAnchor, scaleToFit = _this$props.scaleToFit, angle = _this$props.angle, lineHeight = _this$props.lineHeight, capHeight = _this$props.capHeight, className = _this$props.className, textProps = _objectWithoutProperties(_this$props, ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className"]); var wordsByLines = this.state.wordsByLines; if (!Object(__WEBPACK_IMPORTED_MODULE_5__util_DataUtils__["g" /* isNumOrStr */])(textProps.x) || !Object(__WEBPACK_IMPORTED_MODULE_5__util_DataUtils__["g" /* isNumOrStr */])(textProps.y)) { return null; } var x = textProps.x + (Object(__WEBPACK_IMPORTED_MODULE_5__util_DataUtils__["h" /* isNumber */])(dx) ? dx : 0); var y = textProps.y + (Object(__WEBPACK_IMPORTED_MODULE_5__util_DataUtils__["h" /* isNumber */])(dy) ? dy : 0); var startDy; switch (verticalAnchor) { case 'start': startDy = __WEBPACK_IMPORTED_MODULE_3_reduce_css_calc___default()("calc(".concat(capHeight, ")")); break; case 'middle': startDy = __WEBPACK_IMPORTED_MODULE_3_reduce_css_calc___default()("calc(".concat((wordsByLines.length - 1) / 2, " * -").concat(lineHeight, " + (").concat(capHeight, " / 2))")); break; default: startDy = __WEBPACK_IMPORTED_MODULE_3_reduce_css_calc___default()("calc(".concat(wordsByLines.length - 1, " * -").concat(lineHeight, ")")); break; } var transforms = []; if (scaleToFit) { var lineWidth = wordsByLines[0].width; transforms.push("scale(".concat(this.props.width / lineWidth, ")")); } if (angle) { transforms.push("rotate(".concat(angle, ", ").concat(x, ", ").concat(y, ")")); } if (transforms.length) { textProps.transform = transforms.join(' '); } return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("text", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__["l" /* getPresentationAttributes */])(textProps), Object(__WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__["f" /* filterEventAttributes */])(textProps), { x: x, y: y, className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()('recharts-text', className), textAnchor: textAnchor }), wordsByLines.map(function (line, index) { return (// eslint-disable-next-line react/no-array-index-key __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tspan", { x: x, dy: index === 0 ? startDy : lineHeight, key: index }, line.words.join(' ')) ); })); } }]); return Text; }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]); Text.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], { scaleToFit: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool, angle: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number, textAnchor: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf(['start', 'middle', 'end', 'inherit']), verticalAnchor: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf(['start', 'middle', 'end']), style: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object }); Text.defaultProps = { x: 0, y: 0, lineHeight: '1em', capHeight: '0.71em', // Magic number from d3 scaleToFit: false, textAnchor: 'start', verticalAnchor: 'end' // Maintain compat with existing charts / default SVG behavior }; /* harmony default export */ __webpack_exports__["a"] = (Text); /***/ }), /* 251 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return map; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return slice; }); var array = Array.prototype; var map = array.map; var slice = array.slice; /***/ }), /* 252 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = linearish; /* harmony export (immutable) */ __webpack_exports__["a"] = linear; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(151); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__continuous__ = __webpack_require__(206); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__init__ = __webpack_require__(94); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__tickFormat__ = __webpack_require__(1464); function linearish(scale) { var domain = scale.domain; scale.ticks = function(count) { var d = domain(); return Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["h" /* ticks */])(d[0], d[d.length - 1], count == null ? 10 : count); }; scale.tickFormat = function(count, specifier) { var d = domain(); return Object(__WEBPACK_IMPORTED_MODULE_3__tickFormat__["a" /* default */])(d[0], d[d.length - 1], count == null ? 10 : count, specifier); }; scale.nice = function(count) { if (count == null) count = 10; var d = domain(), i0 = 0, i1 = d.length - 1, start = d[i0], stop = d[i1], step; if (stop < start) { step = start, start = stop, stop = step; step = i0, i0 = i1, i1 = step; } step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["f" /* tickIncrement */])(start, stop, count); if (step > 0) { start = Math.floor(start / step) * step; stop = Math.ceil(stop / step) * step; step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["f" /* tickIncrement */])(start, stop, count); } else if (step < 0) { start = Math.ceil(start * step) / step; stop = Math.floor(stop * step) / step; step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["f" /* tickIncrement */])(start, stop, count); } if (step > 0) { d[i0] = Math.floor(start / step) * step; d[i1] = Math.ceil(stop / step) * step; domain(d); } else if (step < 0) { d[i0] = Math.ceil(start * step) / step; d[i1] = Math.floor(stop * step) / step; domain(d); } return scale; }; return scale; } function linear() { var scale = Object(__WEBPACK_IMPORTED_MODULE_1__continuous__["b" /* default */])(__WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */], __WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */]); scale.copy = function() { return Object(__WEBPACK_IMPORTED_MODULE_1__continuous__["a" /* copy */])(scale, linear()); }; __WEBPACK_IMPORTED_MODULE_2__init__["b" /* initRange */].apply(scale, arguments); return linearish(scale); } /***/ }), /* 253 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__ = __webpack_require__(22); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Dot */ var Dot = /*#__PURE__*/ function (_PureComponent) { _inherits(Dot, _PureComponent); function Dot() { _classCallCheck(this, Dot); return _possibleConstructorReturn(this, _getPrototypeOf(Dot).apply(this, arguments)); } _createClass(Dot, [{ key: "render", value: function render() { var _this$props = this.props, cx = _this$props.cx, cy = _this$props.cy, r = _this$props.r, className = _this$props.className; var layerClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('recharts-dot', className); if (cx === +cx && cy === +cy && r === +r) { return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("circle", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props), Object(__WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__["f" /* filterEventAttributes */])(this.props, null, true), { className: layerClass, cx: cx, cy: cy, r: r })); } return null; } }]); return Dot; }(__WEBPACK_IMPORTED_MODULE_0_react__["PureComponent"]); Dot.displayName = 'Dot'; Dot.propTypes = { className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, cx: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, cy: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, r: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number }; /* harmony default export */ __webpack_exports__["a"] = (Dot); /***/ }), /* 254 */ /***/ (function(module, exports, __webpack_require__) { var fails = __webpack_require__(131); // Thank's IE8 for his funny defineProperty module.exports = !fails(function () { return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; }); /***/ }), /* 255 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /* 256 */ /***/ (function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /* 257 */ /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(3908), getValue = __webpack_require__(3911); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /* 258 */ /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(4233), getValue = __webpack_require__(4238); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /* 259 */ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(62).f; var has = __webpack_require__(108); var TAG = __webpack_require__(49)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /* 260 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(119); var TAG = __webpack_require__(49)('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /* 261 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(8); var defined = __webpack_require__(134); var fails = __webpack_require__(33); var spaces = __webpack_require__(566); var space = '[' + spaces + ']'; var non = '\u200b\u0085'; var ltrim = RegExp('^' + space + space + '*'); var rtrim = RegExp(space + space + '*$'); var exporter = function (KEY, exec, ALIAS) { var exp = {}; var FORCE = fails(function () { return !!spaces[KEY]() || non[KEY]() != non; }); var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; if (ALIAS) exp[ALIAS] = fn; $export($export.P + $export.F * FORCE, 'String', exp); }; // 1 -> String#trimLeft // 2 -> String#trimRight // 3 -> String#trim var trim = exporter.trim = function (string, TYPE) { string = String(defined(string)); if (TYPE & 1) string = string.replace(ltrim, ''); if (TYPE & 2) string = string.replace(rtrim, ''); return string; }; module.exports = exporter; /***/ }), /* 262 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /* 263 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "actions", { enumerable: true, get: function get() { return _actions["default"]; } }); Object.defineProperty(exports, "cmfConnect", { enumerable: true, get: function get() { return _cmfConnect["default"]; } }); Object.defineProperty(exports, "ErrorBoundary", { enumerable: true, get: function get() { return _ErrorBoundary["default"]; } }); Object.defineProperty(exports, "Inject", { enumerable: true, get: function get() { return _Inject["default"]; } }); Object.defineProperty(exports, "sagas", { enumerable: true, get: function get() { return _sagas["default"]; } }); Object.defineProperty(exports, "selectors", { enumerable: true, get: function get() { return _selectors["default"]; } }); Object.defineProperty(exports, "App", { enumerable: true, get: function get() { return _App["default"]; } }); Object.defineProperty(exports, "reducers", { enumerable: true, get: function get() { return _reducers["default"]; } }); Object.defineProperty(exports, "registry", { enumerable: true, get: function get() { return _registry["default"]; } }); Object.defineProperty(exports, "RegistryProvider", { enumerable: true, get: function get() { return _RegistryProvider["default"]; } }); Object.defineProperty(exports, "store", { enumerable: true, get: function get() { return _store["default"]; } }); Object.defineProperty(exports, "componentState", { enumerable: true, get: function get() { return _componentState["default"]; } }); exports["default"] = exports.httpMiddleware = exports.getErrorMiddleware = exports.Dispatcher = void 0; var _actions = _interopRequireDefault(__webpack_require__(221)); var _actionCreator = _interopRequireDefault(__webpack_require__(179)); var _bootstrap = _interopRequireDefault(__webpack_require__(2004)); var _cmfConnect = _interopRequireDefault(__webpack_require__(1047)); var _cmfModule = _interopRequireDefault(__webpack_require__(1046)); var _component = _interopRequireDefault(__webpack_require__(432)); var _Dispatcher = _interopRequireDefault(__webpack_require__(2122)); var _ErrorBoundary = _interopRequireDefault(__webpack_require__(1023)); var _expression = _interopRequireDefault(__webpack_require__(339)); var _expressions = _interopRequireDefault(__webpack_require__(1045)); var _Inject = _interopRequireDefault(__webpack_require__(2124)); var _matchPath = _interopRequireDefault(__webpack_require__(2125)); var _sagas = _interopRequireDefault(__webpack_require__(632)); var _selectors = _interopRequireDefault(__webpack_require__(1039)); var _settings = _interopRequireDefault(__webpack_require__(620)); var _localStorage = _interopRequireDefault(__webpack_require__(2127)); var _onError = _interopRequireDefault(__webpack_require__(431)); var _action = _interopRequireDefault(__webpack_require__(1053)); var _App = _interopRequireDefault(__webpack_require__(1015)); var _reducers = _interopRequireDefault(__webpack_require__(1042)); var _registry = _interopRequireDefault(__webpack_require__(180)); var _RegistryProvider = _interopRequireDefault(__webpack_require__(1022)); var _store = _interopRequireDefault(__webpack_require__(1041)); var _middlewares = _interopRequireDefault(__webpack_require__(2129)); var _componentState = _interopRequireDefault(__webpack_require__(1051)); var _constant = _interopRequireDefault(__webpack_require__(74)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * @module react-cmf */ // DEPRECATED APIs var Dispatcher = _Dispatcher["default"]; exports.Dispatcher = Dispatcher; var getErrorMiddleware = _middlewares["default"].error; exports.getErrorMiddleware = getErrorMiddleware; var httpMiddleware = _middlewares["default"].http; exports.httpMiddleware = httpMiddleware; function registerInternals(context) { _actionCreator["default"].register('cmf.saga.start', _actions["default"].saga.start, context); _actionCreator["default"].register('cmf.saga.stop', _actions["default"].saga.stop, context); _expression["default"].registerMany(_expressions["default"], context); } /** * API exported * @type {Object} * @example import cmf from '@talend/react-cmf'; cmf.actionCreator.register(...); cmf.connect()(MyComponent); cmf.actions.collections.addOrReplace(...); * @example import { Inject } from '@talend/react-cmf'; import { Dispatcher } from '@talend/react-cmf'; * @see module:react-cmf/lib/api */ var _default = { action: _action["default"], actions: _actions["default"], actionCreator: _actionCreator["default"], bootstrap: _bootstrap["default"], component: _component["default"], connect: _cmfConnect["default"], constants: _constant["default"], expression: _expression["default"], expressions: _expressions["default"], middlewares: _middlewares["default"], module: _cmfModule["default"], onError: _onError["default"], registerInternals: registerInternals, registry: _registry["default"], router: { matchPath: _matchPath["default"] }, saga: _sagas["default"], sagas: _sagas["default"], selectors: _selectors["default"], settings: _settings["default"], localStorage: _localStorage["default"] }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 264 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(265), getRawTag = __webpack_require__(1892), objectToString = __webpack_require__(1893); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /* 265 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(86); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /* 266 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(100), isKey = __webpack_require__(595), stringToPath = __webpack_require__(1918), toString = __webpack_require__(1937); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /* 267 */ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(418); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /* 268 */ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(607), baseAssignValue = __webpack_require__(608); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /* 269 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(992), baseKeysIn = __webpack_require__(1983), isArrayLike = __webpack_require__(334); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; /***/ }), /* 270 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return END; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isEnd; }); /* harmony export (immutable) */ __webpack_exports__["c"] = emitter; /* unused harmony export INVALID_BUFFER */ /* unused harmony export UNDEFINED_INPUT_ERROR */ /* harmony export (immutable) */ __webpack_exports__["b"] = channel; /* harmony export (immutable) */ __webpack_exports__["d"] = eventChannel; /* harmony export (immutable) */ __webpack_exports__["f"] = stdChannel; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(113); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__buffers__ = __webpack_require__(430); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler__ = __webpack_require__(1006); 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; }; var CHANNEL_END_TYPE = '@@redux-saga/CHANNEL_END'; var END = { type: CHANNEL_END_TYPE }; var isEnd = function isEnd(a) { return a && a.type === CHANNEL_END_TYPE; }; function emitter() { var subscribers = []; function subscribe(sub) { subscribers.push(sub); return function () { return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["w" /* remove */])(subscribers, sub); }; } function emit(item) { var arr = subscribers.slice(); for (var i = 0, len = arr.length; i < len; i++) { arr[i](item); } } return { subscribe: subscribe, emit: emit }; } var INVALID_BUFFER = 'invalid buffer passed to channel factory function'; var UNDEFINED_INPUT_ERROR = 'Saga was provided with an undefined action'; if (process.env.NODE_ENV !== 'production') { UNDEFINED_INPUT_ERROR += '\nHints:\n - check that your Action Creator returns a non-undefined value\n - if the Saga was started using runSaga, check that your subscribe source provides the action to its listeners\n '; } function channel() { var buffer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : __WEBPACK_IMPORTED_MODULE_1__buffers__["a" /* buffers */].fixed(); var closed = false; var takers = []; Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(buffer, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].buffer, INVALID_BUFFER); function checkForbiddenStates() { if (closed && takers.length) { throw Object(__WEBPACK_IMPORTED_MODULE_0__utils__["p" /* internalErr */])('Cannot have a closed channel with pending takers'); } if (takers.length && !buffer.isEmpty()) { throw Object(__WEBPACK_IMPORTED_MODULE_0__utils__["p" /* internalErr */])('Cannot have pending takers with non empty buffer'); } } function put(input) { checkForbiddenStates(); Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(input, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, UNDEFINED_INPUT_ERROR); if (closed) { return; } if (!takers.length) { return buffer.put(input); } for (var i = 0; i < takers.length; i++) { var cb = takers[i]; if (!cb[__WEBPACK_IMPORTED_MODULE_0__utils__["b" /* MATCH */]] || cb[__WEBPACK_IMPORTED_MODULE_0__utils__["b" /* MATCH */]](input)) { takers.splice(i, 1); return cb(input); } } } function take(cb) { checkForbiddenStates(); Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(cb, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func, "channel.take's callback must be a function"); if (closed && buffer.isEmpty()) { cb(END); } else if (!buffer.isEmpty()) { cb(buffer.take()); } else { takers.push(cb); cb.cancel = function () { return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["w" /* remove */])(takers, cb); }; } } function flush(cb) { checkForbiddenStates(); // TODO: check if some new state should be forbidden now Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(cb, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func, "channel.flush' callback must be a function"); if (closed && buffer.isEmpty()) { cb(END); return; } cb(buffer.flush()); } function close() { checkForbiddenStates(); if (!closed) { closed = true; if (takers.length) { var arr = takers; takers = []; for (var i = 0, len = arr.length; i < len; i++) { arr[i](END); } } } } return { take: take, put: put, flush: flush, close: close, get __takers__() { return takers; }, get __closed__() { return closed; } }; } function eventChannel(subscribe) { var buffer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : __WEBPACK_IMPORTED_MODULE_1__buffers__["a" /* buffers */].none(); var matcher = arguments[2]; /** should be if(typeof matcher !== undefined) instead? see PR #273 for a background discussion **/ if (arguments.length > 2) { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(matcher, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func, 'Invalid match function passed to eventChannel'); } var chan = channel(buffer); var close = function close() { if (!chan.__closed__) { if (unsubscribe) { unsubscribe(); } chan.close(); } }; var unsubscribe = subscribe(function (input) { if (isEnd(input)) { close(); return; } if (matcher && !matcher(input)) { return; } chan.put(input); }); if (chan.__closed__) { unsubscribe(); } if (!__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func(unsubscribe)) { throw new Error('in eventChannel: subscribe should return a function to unsubscribe'); } return { take: chan.take, flush: chan.flush, close: close }; } function stdChannel(subscribe) { var chan = eventChannel(function (cb) { return subscribe(function (input) { if (input[__WEBPACK_IMPORTED_MODULE_0__utils__["c" /* SAGA_ACTION */]]) { cb(input); return; } Object(__WEBPACK_IMPORTED_MODULE_2__scheduler__["a" /* asap */])(function () { return cb(input); }); }); }); return _extends({}, chan, { take: function take(cb, matcher) { if (arguments.length > 1) { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(matcher, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func, "channel.take's matcher argument must be a function"); cb[__WEBPACK_IMPORTED_MODULE_0__utils__["b" /* MATCH */]] = matcher; } chan.take(cb); } }); } /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 271 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["r"] = take; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return takem; }); /* harmony export (immutable) */ __webpack_exports__["m"] = put; /* harmony export (immutable) */ __webpack_exports__["b"] = all; /* harmony export (immutable) */ __webpack_exports__["n"] = race; /* harmony export (immutable) */ __webpack_exports__["e"] = call; /* harmony export (immutable) */ __webpack_exports__["c"] = apply; /* harmony export (immutable) */ __webpack_exports__["h"] = cps; /* harmony export (immutable) */ __webpack_exports__["j"] = fork; /* harmony export (immutable) */ __webpack_exports__["q"] = spawn; /* harmony export (immutable) */ __webpack_exports__["l"] = join; /* harmony export (immutable) */ __webpack_exports__["f"] = cancel; /* harmony export (immutable) */ __webpack_exports__["o"] = select; /* harmony export (immutable) */ __webpack_exports__["a"] = actionChannel; /* harmony export (immutable) */ __webpack_exports__["g"] = cancelled; /* harmony export (immutable) */ __webpack_exports__["i"] = flush; /* harmony export (immutable) */ __webpack_exports__["k"] = getContext; /* harmony export (immutable) */ __webpack_exports__["p"] = setContext; /* harmony export (immutable) */ __webpack_exports__["s"] = takeEvery; /* harmony export (immutable) */ __webpack_exports__["t"] = takeLatest; /* harmony export (immutable) */ __webpack_exports__["v"] = throttle; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return asEffect; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(113); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sagaHelpers__ = __webpack_require__(1009); var IO = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["x" /* sym */])('IO'); var TAKE = 'TAKE'; var PUT = 'PUT'; var ALL = 'ALL'; var RACE = 'RACE'; var CALL = 'CALL'; var CPS = 'CPS'; var FORK = 'FORK'; var JOIN = 'JOIN'; var CANCEL = 'CANCEL'; var SELECT = 'SELECT'; var ACTION_CHANNEL = 'ACTION_CHANNEL'; var CANCELLED = 'CANCELLED'; var FLUSH = 'FLUSH'; var GET_CONTEXT = 'GET_CONTEXT'; var SET_CONTEXT = 'SET_CONTEXT'; var TEST_HINT = '\n(HINT: if you are getting this errors in tests, consider using createMockTask from redux-saga/utils)'; var effect = function effect(type, payload) { var _ref; return _ref = {}, _ref[IO] = true, _ref[type] = payload, _ref; }; function take() { var patternOrChannel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '*'; if (arguments.length) { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(arguments[0], __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'take(patternOrChannel): patternOrChannel is undefined'); } if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].pattern(patternOrChannel)) { return effect(TAKE, { pattern: patternOrChannel }); } if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].channel(patternOrChannel)) { return effect(TAKE, { channel: patternOrChannel }); } throw new Error('take(patternOrChannel): argument ' + String(patternOrChannel) + ' is not valid channel or a valid pattern'); } take.maybe = function () { var eff = take.apply(undefined, arguments); eff[TAKE].maybe = true; return eff; }; var takem = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_0__utils__["n" /* deprecate */])(take.maybe, /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_0__utils__["z" /* updateIncentive */])('takem', 'take.maybe')); function put(channel, action) { if (arguments.length > 1) { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(channel, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'put(channel, action): argument channel is undefined'); Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(channel, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].channel, 'put(channel, action): argument ' + channel + ' is not a valid channel'); Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(action, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'put(channel, action): argument action is undefined'); } else { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(channel, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'put(action): argument action is undefined'); action = channel; channel = null; } return effect(PUT, { channel: channel, action: action }); } put.resolve = function () { var eff = put.apply(undefined, arguments); eff[PUT].resolve = true; return eff; }; put.sync = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["n" /* deprecate */])(put.resolve, Object(__WEBPACK_IMPORTED_MODULE_0__utils__["z" /* updateIncentive */])('put.sync', 'put.resolve')); function all(effects) { return effect(ALL, effects); } function race(effects) { return effect(RACE, effects); } function getFnCallDesc(meth, fn, args) { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(fn, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, meth + ': argument fn is undefined'); var context = null; if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].array(fn)) { var _fn = fn; context = _fn[0]; fn = _fn[1]; } else if (fn.fn) { var _fn2 = fn; context = _fn2.context; fn = _fn2.fn; } if (context && __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].string(fn) && __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func(context[fn])) { fn = context[fn]; } Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(fn, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func, meth + ': argument ' + fn + ' is not a function'); return { context: context, fn: fn, args: args }; } function call(fn) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return effect(CALL, getFnCallDesc('call', fn, args)); } function apply(context, fn) { var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; return effect(CALL, getFnCallDesc('apply', { context: context, fn: fn }, args)); } function cps(fn) { for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } return effect(CPS, getFnCallDesc('cps', fn, args)); } function fork(fn) { for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { args[_key3 - 1] = arguments[_key3]; } return effect(FORK, getFnCallDesc('fork', fn, args)); } function spawn(fn) { for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { args[_key4 - 1] = arguments[_key4]; } var eff = fork.apply(undefined, [fn].concat(args)); eff[FORK].detached = true; return eff; } function join() { for (var _len5 = arguments.length, tasks = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { tasks[_key5] = arguments[_key5]; } if (tasks.length > 1) { return all(tasks.map(function (t) { return join(t); })); } var task = tasks[0]; Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(task, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'join(task): argument task is undefined'); Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(task, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].task, 'join(task): argument ' + task + ' is not a valid Task object ' + TEST_HINT); return effect(JOIN, task); } function cancel() { for (var _len6 = arguments.length, tasks = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { tasks[_key6] = arguments[_key6]; } if (tasks.length > 1) { return all(tasks.map(function (t) { return cancel(t); })); } var task = tasks[0]; if (tasks.length === 1) { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(task, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'cancel(task): argument task is undefined'); Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(task, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].task, 'cancel(task): argument ' + task + ' is not a valid Task object ' + TEST_HINT); } return effect(CANCEL, task || __WEBPACK_IMPORTED_MODULE_0__utils__["d" /* SELF_CANCELLATION */]); } function select(selector) { for (var _len7 = arguments.length, args = Array(_len7 > 1 ? _len7 - 1 : 0), _key7 = 1; _key7 < _len7; _key7++) { args[_key7 - 1] = arguments[_key7]; } if (arguments.length === 0) { selector = __WEBPACK_IMPORTED_MODULE_0__utils__["o" /* ident */]; } else { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(selector, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'select(selector,[...]): argument selector is undefined'); Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(selector, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func, 'select(selector,[...]): argument ' + selector + ' is not a function'); } return effect(SELECT, { selector: selector, args: args }); } /** channel(pattern, [buffer]) => creates an event channel for store actions **/ function actionChannel(pattern, buffer) { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(pattern, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'actionChannel(pattern,...): argument pattern is undefined'); if (arguments.length > 1) { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(buffer, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].notUndef, 'actionChannel(pattern, buffer): argument buffer is undefined'); Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(buffer, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].buffer, 'actionChannel(pattern, buffer): argument ' + buffer + ' is not a valid buffer'); } return effect(ACTION_CHANNEL, { pattern: pattern, buffer: buffer }); } function cancelled() { return effect(CANCELLED, {}); } function flush(channel) { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(channel, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].channel, 'flush(channel): argument ' + channel + ' is not valid channel'); return effect(FLUSH, channel); } function getContext(prop) { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(prop, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].string, 'getContext(prop): argument ' + prop + ' is not a string'); return effect(GET_CONTEXT, prop); } function setContext(props) { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(props, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].object, Object(__WEBPACK_IMPORTED_MODULE_0__utils__["k" /* createSetContextWarning */])(null, props)); return effect(SET_CONTEXT, props); } function takeEvery(patternOrChannel, worker) { for (var _len8 = arguments.length, args = Array(_len8 > 2 ? _len8 - 2 : 0), _key8 = 2; _key8 < _len8; _key8++) { args[_key8 - 2] = arguments[_key8]; } return fork.apply(undefined, [__WEBPACK_IMPORTED_MODULE_1__sagaHelpers__["b" /* takeEveryHelper */], patternOrChannel, worker].concat(args)); } function takeLatest(patternOrChannel, worker) { for (var _len9 = arguments.length, args = Array(_len9 > 2 ? _len9 - 2 : 0), _key9 = 2; _key9 < _len9; _key9++) { args[_key9 - 2] = arguments[_key9]; } return fork.apply(undefined, [__WEBPACK_IMPORTED_MODULE_1__sagaHelpers__["d" /* takeLatestHelper */], patternOrChannel, worker].concat(args)); } function throttle(ms, pattern, worker) { for (var _len10 = arguments.length, args = Array(_len10 > 3 ? _len10 - 3 : 0), _key10 = 3; _key10 < _len10; _key10++) { args[_key10 - 3] = arguments[_key10]; } return fork.apply(undefined, [__WEBPACK_IMPORTED_MODULE_1__sagaHelpers__["f" /* throttleHelper */], ms, pattern, worker].concat(args)); } var createAsEffectType = function createAsEffectType(type) { return function (effect) { return effect && effect[IO] && effect[type]; }; }; var asEffect = { take: createAsEffectType(TAKE), put: createAsEffectType(PUT), all: createAsEffectType(ALL), race: createAsEffectType(RACE), call: createAsEffectType(CALL), cps: createAsEffectType(CPS), fork: createAsEffectType(FORK), join: createAsEffectType(JOIN), cancel: createAsEffectType(CANCEL), select: createAsEffectType(SELECT), actionChannel: createAsEffectType(ACTION_CHANNEL), cancelled: createAsEffectType(CANCELLED), flush: createAsEffectType(FLUSH), getContext: createAsEffectType(GET_CONTEXT), setContext: createAsEffectType(SET_CONTEXT) }; /***/ }), /* 272 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scope__ = __webpack_require__(1024); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__scope__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__scope__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hub__ = __webpack_require__(2066); /* unused harmony reexport getActiveDomain */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_1__hub__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_1__hub__["c"]; }); /* unused harmony reexport getMainCarrier */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__hub__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_1__hub__["d"]; }); /* unused harmony reexport setHubOnCarrier */ //# sourceMappingURL=index.js.map /***/ }), /* 273 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_objectSpread__ = __webpack_require__(122); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_objectSpread___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_objectSpread__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_classCallCheck__ = __webpack_require__(138); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_classCallCheck__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_createClass__ = __webpack_require__(139); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_createClass__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_toConsumableArray__ = __webpack_require__(2150); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_toConsumableArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_toConsumableArray__); var consoleLogger = { type: 'logger', log: function log(args) { this.output('log', args); }, warn: function warn(args) { this.output('warn', args); }, error: function error(args) { this.output('error', args); }, output: function output(type, args) { var _console; /* eslint no-console: 0 */ if (console && console[type]) (_console = console)[type].apply(_console, __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_toConsumableArray___default()(args)); } }; var Logger = /*#__PURE__*/ function () { function Logger(concreteLogger) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_classCallCheck___default()(this, Logger); this.init(concreteLogger, options); } __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_createClass___default()(Logger, [{ key: "init", value: function init(concreteLogger) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; this.prefix = options.prefix || 'i18next:'; this.logger = concreteLogger || consoleLogger; this.options = options; this.debug = options.debug; } }, { key: "setDebug", value: function setDebug(bool) { this.debug = bool; } }, { key: "log", value: function log() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return this.forward(args, 'log', '', true); } }, { key: "warn", value: function warn() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } return this.forward(args, 'warn', '', true); } }, { key: "error", value: function error() { for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } return this.forward(args, 'error', ''); } }, { key: "deprecate", value: function deprecate() { for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { args[_key4] = arguments[_key4]; } return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true); } }, { key: "forward", value: function forward(args, lvl, prefix, debugOnly) { if (debugOnly && !this.debug) return null; if (typeof args[0] === 'string') args[0] = "".concat(prefix).concat(this.prefix, " ").concat(args[0]); return this.logger[lvl](args); } }, { key: "create", value: function create(moduleName) { return new Logger(this.logger, __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_objectSpread___default()({}, { prefix: "".concat(this.prefix, ":").concat(moduleName, ":") }, this.options)); } }]); return Logger; }(); /* harmony default export */ __webpack_exports__["a"] = (new Logger()); /***/ }), /* 274 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return I18nContext; }); /* harmony export (immutable) */ __webpack_exports__["k"] = usedI18nextProvider; /* harmony export (immutable) */ __webpack_exports__["e"] = getHasUsedI18nextProvider; /* harmony export (immutable) */ __webpack_exports__["i"] = setDefaults; /* harmony export (immutable) */ __webpack_exports__["d"] = getDefaults; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ReportNamespaces; }); /* harmony export (immutable) */ __webpack_exports__["j"] = setI18n; /* harmony export (immutable) */ __webpack_exports__["f"] = getI18n; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return initReactI18next; }); /* harmony export (immutable) */ __webpack_exports__["c"] = composeInitialProps; /* harmony export (immutable) */ __webpack_exports__["g"] = getInitialProps; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck__ = __webpack_require__(138); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass__ = __webpack_require__(139); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_objectSpread__ = __webpack_require__(122); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_objectSpread___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_objectSpread__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__); var defaultOptions = { bindI18n: 'languageChanging languageChanged', bindI18nStore: '', // nsMode: 'fallback' // loop through all namespaces given to hook, HOC, render prop for key lookup transEmptyNodeValue: '', transSupportBasicHtmlNodes: true, transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'], // hashTransKey: key => key // calculate a key for Trans component based on defaultValue useSuspense: true }; var i18nInstance; var hasUsedI18nextProvider; var I18nContext = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createContext(); function usedI18nextProvider(used) { hasUsedI18nextProvider = used; } function getHasUsedI18nextProvider() { return hasUsedI18nextProvider; } function setDefaults() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; defaultOptions = __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_objectSpread___default()({}, defaultOptions, options); } function getDefaults() { return defaultOptions; } var ReportNamespaces = /*#__PURE__*/ function () { function ReportNamespaces() { __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck___default()(this, ReportNamespaces); this.usedNamespaces = {}; } __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass___default()(ReportNamespaces, [{ key: "addUsedNamespaces", value: function addUsedNamespaces(namespaces) { var _this = this; namespaces.forEach(function (ns) { if (!_this.usedNamespaces[ns]) _this.usedNamespaces[ns] = true; }); } }, { key: "getUsedNamespaces", value: function getUsedNamespaces() { return Object.keys(this.usedNamespaces); } }]); return ReportNamespaces; }(); function setI18n(instance) { i18nInstance = instance; } function getI18n() { return i18nInstance; } var initReactI18next = { type: '3rdParty', init: function init(instance) { setDefaults(instance.options.react); setI18n(instance); } }; function composeInitialProps(ForComponent) { return function (ctx) { return new Promise(function (resolve) { var i18nInitialProps = getInitialProps(); if (ForComponent.getInitialProps) { ForComponent.getInitialProps(ctx).then(function (componentsInitialProps) { resolve(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_objectSpread___default()({}, componentsInitialProps, i18nInitialProps)); }); } else { resolve(i18nInitialProps); } }); }; // Avoid async for now - so we do not need to pull in regenerator // return async ctx => { // const componentsInitialProps = ForComponent.getInitialProps // ? await ForComponent.getInitialProps(ctx) // : {}; // const i18nInitialProps = getInitialProps(); // return { // ...componentsInitialProps, // ...i18nInitialProps, // }; // }; } function getInitialProps() { var i18n = getI18n(); var namespaces = i18n.reportNamespaces ? i18n.reportNamespaces.getUsedNamespaces() : []; var ret = {}; var initialI18nStore = {}; i18n.languages.forEach(function (l) { initialI18nStore[l] = {}; namespaces.forEach(function (ns) { initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {}; }); }); ret.initialI18nStore = initialI18nStore; ret.initialLanguage = i18n.language; return ret; } /***/ }), /* 275 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(1067); var enumBugKeys = __webpack_require__(644); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /* 276 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(441); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /* 277 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (componentOrElement) { return (0, _ownerDocument2.default)(_reactDom2.default.findDOMNode(componentOrElement)); }; var _reactDom = __webpack_require__(18); var _reactDom2 = _interopRequireDefault(_reactDom); var _ownerDocument = __webpack_require__(188); var _ownerDocument2 = _interopRequireDefault(_ownerDocument); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } module.exports = exports['default']; /***/ }), /* 278 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(57); exports.__esModule = true; exports.default = scrollbarSize; var _inDOM = _interopRequireDefault(__webpack_require__(142)); var size; function scrollbarSize(recalc) { if (!size && size !== 0 || recalc) { if (_inDOM.default) { var scrollDiv = document.createElement('div'); scrollDiv.style.position = 'absolute'; scrollDiv.style.top = '-9999px'; scrollDiv.style.width = '50px'; scrollDiv.style.height = '50px'; scrollDiv.style.overflow = 'scroll'; document.body.appendChild(scrollDiv); size = scrollDiv.offsetWidth - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); } } return size; } module.exports = exports["default"]; /***/ }), /* 279 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _createChainableTypeChecker = __webpack_require__(2286); var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function elementType(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue); if (_react2.default.isValidElement(propValue)) { return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).'); } if (propType !== 'function' && propType !== 'string') { return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).'); } return null; } exports.default = (0, _createChainableTypeChecker2.default)(elementType); /***/ }), /* 280 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(281), getRawTag = __webpack_require__(2316), objectToString = __webpack_require__(2317); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /* 281 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(126); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /* 282 */ /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(2347), Map = __webpack_require__(673), Promise = __webpack_require__(2348), Set = __webpack_require__(1126), WeakMap = __webpack_require__(1127), baseGetTag = __webpack_require__(280), toSource = __webpack_require__(1113); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /* 283 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== 'production') { var ReactIs = __webpack_require__(47); // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(2467)(ReactIs.isElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(2469)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 284 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generate = generate; exports.focus = focus; exports.validate = validate; var _focus = __webpack_require__(2587); var _focus2 = _interopRequireDefault(_focus); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function generate(element) { return '' + element + ''; } function focus(element) { if (element.focus) { return; } try { HTMLElement.prototype.focus.call(element); } catch (e) { (0, _focus2.default)(element); } } function validate(element, focusTarget, _document) { focus(focusTarget); return _document.activeElement === focusTarget; } //# sourceMappingURL=svg.js.map /***/ }), /* 285 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(717); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /* 286 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(472); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /* 287 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /* 288 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /* 289 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export bpfrpt_proptype_Index */ /* unused harmony export bpfrpt_proptype_PositionInfo */ /* unused harmony export bpfrpt_proptype_ScrollPosition */ /* unused harmony export bpfrpt_proptype_SizeAndPositionInfo */ /* unused harmony export bpfrpt_proptype_SizeInfo */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); var bpfrpt_proptype_Index = process.env.NODE_ENV === 'production' ? null : { index: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired }; var bpfrpt_proptype_PositionInfo = process.env.NODE_ENV === 'production' ? null : { x: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, y: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired }; var bpfrpt_proptype_ScrollPosition = process.env.NODE_ENV === 'production' ? null : { scrollLeft: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, scrollTop: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired }; var bpfrpt_proptype_SizeAndPositionInfo = process.env.NODE_ENV === 'production' ? null : { height: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, width: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, x: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, y: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired }; var bpfrpt_proptype_SizeInfo = process.env.NODE_ENV === 'production' ? null : { height: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, width: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired }; /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 290 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Week Helpers * @summary Return the start of a week for the given date. * * @description * Return the start of a week for the given date. * The result will be in the local timezone. * * @param {Date|String|Number} date - the original date * @param {Object} [options] - the object with options * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) * @returns {Date} the start of a week * * @example * // The start of a week for 2 September 2014 11:55:00: * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0)) * //=> Sun Aug 31 2014 00:00:00 * * @example * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00: * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1}) * //=> Mon Sep 01 2014 00:00:00 */ function startOfWeek (dirtyDate, options) { var weekStartsOn = options ? (options.weekStartsOn || 0) : 0 var date = parse(dirtyDate) var day = date.getDay() var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn date.setDate(date.getDate() - diff) date.setHours(0, 0, 0, 0) return date } module.exports = startOfWeek /***/ }), /* 291 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) var getDaysInMonth = __webpack_require__(754) /** * @category Month Helpers * @summary Set the month to the given date. * * @description * Set the month to the given date. * * @param {Date|String|Number} date - the date to be changed * @param {Number} month - the month of the new date * @returns {Date} the new date with the month setted * * @example * // Set February to 1 September 2014: * var result = setMonth(new Date(2014, 8, 1), 1) * //=> Sat Feb 01 2014 00:00:00 */ function setMonth (dirtyDate, month) { var date = parse(dirtyDate) var year = date.getFullYear() var day = date.getDate() var dateWithDesiredMonth = new Date(0) dateWithDesiredMonth.setFullYear(year, month, 15) dateWithDesiredMonth.setHours(0, 0, 0, 0) var daysInMonth = getDaysInMonth(dateWithDesiredMonth) // Set the last day of the new month // if the original date was the last day of the longer month date.setMonth(month, Math.min(day, daysInMonth)) return date } module.exports = setMonth /***/ }), /* 292 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) var getDaysInMonth = __webpack_require__(754) /** * @category Month Helpers * @summary Add the specified number of months to the given date. * * @description * Add the specified number of months to the given date. * * @param {Date|String|Number} date - the date to be changed * @param {Number} amount - the amount of months to be added * @returns {Date} the new date with the months added * * @example * // Add 5 months to 1 September 2014: * var result = addMonths(new Date(2014, 8, 1), 5) * //=> Sun Feb 01 2015 00:00:00 */ function addMonths (dirtyDate, amount) { var date = parse(dirtyDate) var desiredMonth = date.getMonth() + amount var dateWithDesiredMonth = new Date(0) dateWithDesiredMonth.setFullYear(date.getFullYear(), desiredMonth, 1) dateWithDesiredMonth.setHours(0, 0, 0, 0) var daysInMonth = getDaysInMonth(dateWithDesiredMonth) // Set the last day of the new month // if the original date was the last day of the longer month date.setMonth(desiredMonth, Math.min(daysInMonth, date.getDate())) return date } module.exports = addMonths /***/ }), /* 293 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DateTimeContext = void 0; var _react = _interopRequireDefault(__webpack_require__(0)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /* eslint-disable import/prefer-default-export */ var DateTimeContext = /*#__PURE__*/_react["default"].createContext(); exports.DateTimeContext = DateTimeContext; //# sourceMappingURL=Context.js.map /***/ }), /* 294 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(128); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /* 295 */ /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /* 296 */ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 297 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export resolveValue */ function resolveValue(valueOrCallback) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } return typeof valueOrCallback === "function" ? (_a = valueOrCallback).call.apply(_a, [null].concat(args)) : valueOrCallback; var _a; } /* harmony default export */ __webpack_exports__["a"] = (resolveValue); //# sourceMappingURL=resolveValue.js.map /***/ }), /* 298 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export pick */ function pick(obj) { var keys = []; for (var _i = 1; _i < arguments.length; _i++) { keys[_i - 1] = arguments[_i]; } var result = {}; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (obj.hasOwnProperty(key)) { result[key] = obj[key]; } } return result; } ; /* harmony default export */ __webpack_exports__["a"] = (pick); //# sourceMappingURL=pick.js.map /***/ }), /* 299 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _TabBar = _interopRequireDefault(__webpack_require__(3048)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _TabBar["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 300 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _FilterBar = _interopRequireDefault(__webpack_require__(3072)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _FilterBar["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 301 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCellRenderer = getCellRenderer; exports.getCellType = getCellType; exports.getId = getId; exports.getColumnData = getColumnData; exports.getDataKey = getDataKey; exports.getLabel = getLabel; exports.getRowData = getRowData; exports.getCellData = getCellData; exports.extractSpecialFields = extractSpecialFields; exports.renderCell = renderCell; var _react = _interopRequireDefault(__webpack_require__(0)); var _CellTitle = __webpack_require__(799); var _constants = __webpack_require__(105); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * This utility file contains any common functions that are used in row renderers * - get infos from parent props, content field, ... * - render a cell * - ... */ /** * Get the cell renderer from VirtualizedList.Content configuration * @param field The VirtualizedList.Content instance */ function getCellRenderer(field) { return field.props.cellRenderer; } /** * Get the cellType from VirtualizedList.Content configuration * @param field The VirtualizedList.Content instance */ function getCellType(field) { return field.props.cellType; } /** * Get the id from row parent instance * @param parent The row parent instance */ function getId(parent) { return parent.props.id; } /** * Enhance VirtualizedList.Content columnData with the row parent id * @param field The VirtualizedList.Content instance */ function getColumnData(field) { return field.props.columnData; } /** * Get the data property key from VirtualizedList.Content instance * @param field The VirtualizedList.Content instance */ function getDataKey(field) { return field.props.dataKey; } /** * Get the content label from VirtualizedList.Content instance * @param field The VirtualizedList.Content instance */ function getLabel(field) { return field.props.label; } /** * Get the collection item * @param parent The row parent instance * @param index The item index in the collection */ function getRowData(parent, index) { return parent.props.rowGetter(index); } /** * Get cell data * @param field The VirtualizedList.Content instance * @param parent The row instance * @param index The item index in collection */ function getCellData(field, parent, index) { return field.props.cellDataGetter({ columnData: getColumnData(field), dataKey: getDataKey(field), rowData: getRowData(parent, index) }); } /** * Extract the title VirtualizedList.Content from the other ones * @param parent The row parent */ function extractSpecialFields(parent) { var children = _react["default"].Children.toArray(parent.props.children); var titleField = children.find(function (field) { return getCellType(field) === _CellTitle.cellType; }); var selectionField = children.find(function (field) { return field.props.id === _constants.internalIds.rowSelector; }); var otherFields = children.filter(function (field) { return field !== titleField && field !== selectionField; }); return { titleField: titleField, selectionField: selectionField, otherFields: otherFields }; } /** * Render a cell * @param index The item index in collection * @param parent The row parent instance * @param field The VirtualizedList.Content instance */ function renderCell(index, parent, field, type) { var cellRenderer = getCellRenderer(field); return cellRenderer({ cellData: getCellData(field, parent, index), columnData: getColumnData(field), dataKey: getDataKey(field), rowData: getRowData(parent, index), rowIndex: index, type: type }); } //# sourceMappingURL=gridrow.js.map /***/ }), /* 302 */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 303 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(202)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 304 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(200), isObjectLike = __webpack_require__(129); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /* 305 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(1418), baseKeys = __webpack_require__(3509), isArrayLike = __webpack_require__(244); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /* 306 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return warn; }); /* eslint no-console: 0 */ var isDev = process.env.NODE_ENV !== 'production'; var warn = function warn(condition, format, a, b, c, d, e, f) { if (isDev && typeof console !== 'undefined' && console.warn) { if (format === undefined) { console.warn('LogUtils requires an error message argument'); } if (!condition) { if (format === undefined) { console.warn('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; console.warn(format.replace(/%s/g, function () { return args[argIndex++]; })); } } } }; /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 307 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_ReactUtils__ = __webpack_require__(22); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * @fileOverview Cross */ function Cell() { return null; } Cell.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_0__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */]); Cell.displayName = 'Cell'; /* harmony default export */ __webpack_exports__["a"] = (Cell); /***/ }), /* 308 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony default export */ __webpack_exports__["a"] = (function(a, b) { return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; }); /***/ }), /* 309 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__color_js__ = __webpack_require__(845); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__color_js__["e"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_0__color_js__["g"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__color_js__["f"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__lab_js__ = __webpack_require__(3592); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_1__lab_js__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_1__lab_js__["b"]; }); /* unused harmony reexport lch */ /* unused harmony reexport gray */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cubehelix_js__ = __webpack_require__(3593); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__cubehelix_js__["a"]; }); /***/ }), /* 310 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["c"] = hue; /* harmony export (immutable) */ __webpack_exports__["b"] = gamma; /* harmony export (immutable) */ __webpack_exports__["a"] = nogamma; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(1458); function linear(a, d) { return function(t) { return a + t * d; }; } function exponential(a, b, y) { return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { return Math.pow(a + t * b, y); }; } function hue(a, b) { var d = b - a; return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(isNaN(a) ? b : a); } function gamma(y) { return (y = +y) === 1 ? nogamma : function(a, b) { return b - a ? exponential(a, b, y) : Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(isNaN(a) ? b : a); }; } function nogamma(a, b) { var d = b - a; return d ? linear(a, d) : Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(isNaN(a) ? b : a); } /***/ }), /* 311 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isArray__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isArray__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_d3_shape__ = __webpack_require__(500); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util_DataUtils__ = __webpack_require__(42); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Curve */ var CURVE_FACTORIES = { curveBasisClosed: __WEBPACK_IMPORTED_MODULE_4_d3_shape__["curveBasisClosed"], curveBasisOpen: __WEBPACK_IMPORTED_MODULE_4_d3_shape__["curveBasisOpen"], curveBasis: __WEBPACK_IMPORTED_MODULE_4_d3_shape__["curveBasis"], curveLinearClosed: __WEBPACK_IMPORTED_MODULE_4_d3_shape__["curveLinearClosed"], curveLinear: __WEBPACK_IMPORTED_MODULE_4_d3_shape__["curveLinear"], curveMonotoneX: __WEBPACK_IMPORTED_MODULE_4_d3_shape__["curveMonotoneX"], curveMonotoneY: __WEBPACK_IMPORTED_MODULE_4_d3_shape__["curveMonotoneY"], curveNatural: __WEBPACK_IMPORTED_MODULE_4_d3_shape__["curveNatural"], curveStep: __WEBPACK_IMPORTED_MODULE_4_d3_shape__["curveStep"], curveStepAfter: __WEBPACK_IMPORTED_MODULE_4_d3_shape__["curveStepAfter"], curveStepBefore: __WEBPACK_IMPORTED_MODULE_4_d3_shape__["curveStepBefore"] }; var defined = function defined(p) { return p.x === +p.x && p.y === +p.y; }; var getX = function getX(p) { return p.x; }; var getY = function getY(p) { return p.y; }; var getCurveFactory = function getCurveFactory(type, layout) { if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(type)) { return type; } var name = "curve".concat(type.slice(0, 1).toUpperCase()).concat(type.slice(1)); if (name === 'curveMonotone' && layout) { return CURVE_FACTORIES["".concat(name).concat(layout === 'vertical' ? 'Y' : 'X')]; } return CURVE_FACTORIES[name] || __WEBPACK_IMPORTED_MODULE_4_d3_shape__["curveLinear"]; }; var Curve = /*#__PURE__*/ function (_PureComponent) { _inherits(Curve, _PureComponent); function Curve() { _classCallCheck(this, Curve); return _possibleConstructorReturn(this, _getPrototypeOf(Curve).apply(this, arguments)); } _createClass(Curve, [{ key: "getPath", /** * Calculate the path of curve * @return {String} path */ value: function getPath() { var _this$props = this.props, type = _this$props.type, points = _this$props.points, baseLine = _this$props.baseLine, layout = _this$props.layout, connectNulls = _this$props.connectNulls; var curveFactory = getCurveFactory(type, layout); var formatPoints = connectNulls ? points.filter(function (entry) { return defined(entry); }) : points; var lineFunction; if (__WEBPACK_IMPORTED_MODULE_0_lodash_isArray___default()(baseLine)) { var formatBaseLine = connectNulls ? baseLine.filter(function (base) { return defined(base); }) : baseLine; var areaPoints = formatPoints.map(function (entry, index) { return _objectSpread({}, entry, { base: formatBaseLine[index] }); }); if (layout === 'vertical') { lineFunction = Object(__WEBPACK_IMPORTED_MODULE_4_d3_shape__["area"])().y(getY).x1(getX).x0(function (d) { return d.base.x; }); } else { lineFunction = Object(__WEBPACK_IMPORTED_MODULE_4_d3_shape__["area"])().x(getX).y1(getY).y0(function (d) { return d.base.y; }); } lineFunction.defined(defined).curve(curveFactory); return lineFunction(areaPoints); } if (layout === 'vertical' && Object(__WEBPACK_IMPORTED_MODULE_7__util_DataUtils__["h" /* isNumber */])(baseLine)) { lineFunction = Object(__WEBPACK_IMPORTED_MODULE_4_d3_shape__["area"])().y(getY).x1(getX).x0(baseLine); } else if (Object(__WEBPACK_IMPORTED_MODULE_7__util_DataUtils__["h" /* isNumber */])(baseLine)) { lineFunction = Object(__WEBPACK_IMPORTED_MODULE_4_d3_shape__["area"])().x(getX).y1(getY).y0(baseLine); } else { lineFunction = Object(__WEBPACK_IMPORTED_MODULE_4_d3_shape__["line"])().x(getX).y(getY); } lineFunction.defined(defined).curve(curveFactory); return lineFunction(formatPoints); } }, { key: "render", value: function render() { var _this$props2 = this.props, className = _this$props2.className, points = _this$props2.points, path = _this$props2.path, pathRef = _this$props2.pathRef; if ((!points || !points.length) && !path) { return null; } var realPath = points && points.length ? this.getPath() : path; return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("path", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props), Object(__WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__["f" /* filterEventAttributes */])(this.props, null, true), { className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()('recharts-curve', className), d: realPath, ref: pathRef })); } }]); return Curve; }(__WEBPACK_IMPORTED_MODULE_2_react__["PureComponent"]); Curve.displayName = 'Curve'; Curve.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], { className: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, type: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(['basis', 'basisClosed', 'basisOpen', 'linear', 'linearClosed', 'natural', 'monotoneX', 'monotoneY', 'monotone', 'step', 'stepBefore', 'stepAfter']), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func]), layout: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(['horizontal', 'vertical']), baseLine: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.array]), points: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object), connectNulls: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool, path: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, pathRef: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func }); Curve.defaultProps = { type: 'linear', points: [], connectNulls: false }; /* harmony default export */ __webpack_exports__["a"] = (Curve); /***/ }), /* 312 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_smooth__ = __webpack_require__(115); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__ = __webpack_require__(22); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Rectangle */ var getRectangePath = function getRectangePath(x, y, width, height, radius) { var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2); var ySign = height >= 0 ? 1 : -1; var xSign = width >= 0 ? 1 : -1; var clockWise = height >= 0 && width >= 0 || height < 0 && width < 0 ? 1 : 0; var path; if (maxRadius > 0 && radius instanceof Array) { var newRadius = []; for (var i = 0, len = 4; i < len; i++) { newRadius[i] = radius[i] > maxRadius ? maxRadius : radius[i]; } path = "M".concat(x, ",").concat(y + ySign * newRadius[0]); if (newRadius[0] > 0) { path += "A ".concat(newRadius[0], ",").concat(newRadius[0], ",0,0,").concat(clockWise, ",").concat(x + xSign * newRadius[0], ",").concat(y); } path += "L ".concat(x + width - xSign * newRadius[1], ",").concat(y); if (newRadius[1] > 0) { path += "A ".concat(newRadius[1], ",").concat(newRadius[1], ",0,0,").concat(clockWise, ",\n ").concat(x + width, ",").concat(y + ySign * newRadius[1]); } path += "L ".concat(x + width, ",").concat(y + height - ySign * newRadius[2]); if (newRadius[2] > 0) { path += "A ".concat(newRadius[2], ",").concat(newRadius[2], ",0,0,").concat(clockWise, ",\n ").concat(x + width - xSign * newRadius[2], ",").concat(y + height); } path += "L ".concat(x + xSign * newRadius[3], ",").concat(y + height); if (newRadius[3] > 0) { path += "A ".concat(newRadius[3], ",").concat(newRadius[3], ",0,0,").concat(clockWise, ",\n ").concat(x, ",").concat(y + height - ySign * newRadius[3]); } path += 'Z'; } else if (maxRadius > 0 && radius === +radius && radius > 0) { var _newRadius = Math.min(maxRadius, radius); path = "M ".concat(x, ",").concat(y + ySign * _newRadius, "\n A ").concat(_newRadius, ",").concat(_newRadius, ",0,0,").concat(clockWise, ",").concat(x + xSign * _newRadius, ",").concat(y, "\n L ").concat(x + width - xSign * _newRadius, ",").concat(y, "\n A ").concat(_newRadius, ",").concat(_newRadius, ",0,0,").concat(clockWise, ",").concat(x + width, ",").concat(y + ySign * _newRadius, "\n L ").concat(x + width, ",").concat(y + height - ySign * _newRadius, "\n A ").concat(_newRadius, ",").concat(_newRadius, ",0,0,").concat(clockWise, ",").concat(x + width - xSign * _newRadius, ",").concat(y + height, "\n L ").concat(x + xSign * _newRadius, ",").concat(y + height, "\n A ").concat(_newRadius, ",").concat(_newRadius, ",0,0,").concat(clockWise, ",").concat(x, ",").concat(y + height - ySign * _newRadius, " Z"); } else { path = "M ".concat(x, ",").concat(y, " h ").concat(width, " v ").concat(height, " h ").concat(-width, " Z"); } return path; }; var Rectangle = /*#__PURE__*/ function (_PureComponent) { _inherits(Rectangle, _PureComponent); function Rectangle() { var _getPrototypeOf2; var _this; _classCallCheck(this, Rectangle); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Rectangle)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { totalLength: -1 }; return _this; } _createClass(Rectangle, [{ key: "componentDidMount", /* eslint-disable react/no-did-mount-set-state */ value: function componentDidMount() { if (this.node && this.node.getTotalLength) { try { var totalLength = this.node.getTotalLength(); if (totalLength) { this.setState({ totalLength: totalLength }); } } catch (err) {// calculate total length error } } } }, { key: "render", value: function render() { var _this2 = this; var _this$props = this.props, x = _this$props.x, y = _this$props.y, width = _this$props.width, height = _this$props.height, radius = _this$props.radius, className = _this$props.className; var totalLength = this.state.totalLength; var _this$props2 = this.props, animationEasing = _this$props2.animationEasing, animationDuration = _this$props2.animationDuration, animationBegin = _this$props2.animationBegin, isAnimationActive = _this$props2.isAnimationActive, isUpdateAnimationActive = _this$props2.isUpdateAnimationActive; if (x !== +x || y !== +y || width !== +width || height !== +height || width === 0 || height === 0) { return null; } var layerClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('recharts-rectangle', className); if (!isUpdateAnimationActive) { return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props), Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["f" /* filterEventAttributes */])(this.props), { className: layerClass, d: getRectangePath(x, y, width, height, radius) })); } return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_react_smooth__["a" /* default */], { canBegin: totalLength > 0, from: { width: width, height: height, x: x, y: y }, to: { width: width, height: height, x: x, y: y }, duration: animationDuration, animationEasing: animationEasing, isActive: isUpdateAnimationActive }, function (_ref) { var currWidth = _ref.width, currHeight = _ref.height, currX = _ref.x, currY = _ref.y; return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_react_smooth__["a" /* default */], { canBegin: totalLength > 0, from: "0px ".concat(totalLength === -1 ? 1 : totalLength, "px"), to: "".concat(totalLength, "px 0px"), attributeName: "strokeDasharray", begin: animationBegin, duration: animationDuration, isActive: isAnimationActive, easing: animationEasing }, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["l" /* getPresentationAttributes */])(_this2.props), Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["f" /* filterEventAttributes */])(_this2.props), { className: layerClass, d: getRectangePath(currX, currY, currWidth, currHeight, radius), ref: function ref(node) { _this2.node = node; } }))); }); } }]); return Rectangle; }(__WEBPACK_IMPORTED_MODULE_0_react__["PureComponent"]); Rectangle.displayName = 'Rectangle'; Rectangle.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], {}, __WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["a" /* EVENT_ATTRIBUTES */], { className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, x: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, y: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, width: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, height: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, radius: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array]), isAnimationActive: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, isUpdateAnimationActive: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, animationBegin: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, animationDuration: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, animationEasing: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear']) }); Rectangle.defaultProps = { x: 0, y: 0, width: 0, height: 0, // The radius of border // The radius of four corners when radius is a number // The radius of left-top, right-top, right-bottom, left-bottom when radius is an array radius: 0, isAnimationActive: false, isUpdateAnimationActive: false, animationBegin: 0, animationDuration: 1500, animationEasing: 'ease' }; /* harmony default export */ __webpack_exports__["a"] = (Rectangle); /***/ }), /* 313 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ReactUtils__ = __webpack_require__(22); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview X Axis */ var XAxis = /*#__PURE__*/ function (_PureComponent) { _inherits(XAxis, _PureComponent); function XAxis() { _classCallCheck(this, XAxis); return _possibleConstructorReturn(this, _getPrototypeOf(XAxis).apply(this, arguments)); } _createClass(XAxis, [{ key: "render", value: function render() { return null; } }]); return XAxis; }(__WEBPACK_IMPORTED_MODULE_0_react__["PureComponent"]); XAxis.displayName = 'XAxis'; XAxis.propTypes = { allowDecimals: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, allowDuplicatedCategory: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, hide: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, // The name of data displayed in the axis name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number]), // The unit of data displayed in the axis unit: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number]), // The unique id of x-axis xAxisId: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number]), domain: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['auto', 'dataMin', 'dataMax'])])), // The key of data displayed in the axis dataKey: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func]), // The width of axis which is usually calculated internally width: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, // The height of axis, which need to be setted by user height: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, mirror: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, // The orientation of axis orientation: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['top', 'bottom']), type: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['number', 'category']), // Ticks can be any type when the axis is the type of category // Ticks must be numbers when the axis is the type of number ticks: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array, // The count of ticks tickCount: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, // The formatter function of tick tickFormatter: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, padding: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({ left: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, right: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number }), allowDataOverflow: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, scale: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_2__util_ReactUtils__["d" /* SCALE_TYPES */]), __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func]), tick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.element]), axisLine: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]), tickLine: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]), minTickGap: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, tickSize: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, interval: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['preserveStart', 'preserveEnd', 'preserveStartEnd'])]), reversed: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool }; XAxis.defaultProps = { allowDecimals: true, hide: false, orientation: 'bottom', width: 0, height: 30, mirror: false, xAxisId: 0, tickCount: 5, type: 'category', domain: [0, 'auto'], padding: { left: 0, right: 0 }, allowDataOverflow: false, scale: 'auto', reversed: false, allowDuplicatedCategory: true }; /* harmony default export */ __webpack_exports__["a"] = (XAxis); /***/ }), /* 314 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Y Axis */ var YAxis = /*#__PURE__*/ function (_PureComponent) { _inherits(YAxis, _PureComponent); function YAxis() { _classCallCheck(this, YAxis); return _possibleConstructorReturn(this, _getPrototypeOf(YAxis).apply(this, arguments)); } _createClass(YAxis, [{ key: "render", value: function render() { return null; } }]); return YAxis; }(__WEBPACK_IMPORTED_MODULE_0_react__["PureComponent"]); YAxis.displayName = 'YAxis'; YAxis.propTypes = { allowDecimals: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, allowDuplicatedCategory: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, hide: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, // The name of data displayed in the axis name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number]), // The unit of data displayed in the axis unit: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number]), // The unique id of y-axis yAxisId: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number]), domain: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['auto', 'dataMin', 'dataMax'])])), // The key of data displayed in the axis dataKey: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func]), // Ticks can be any type when the axis is the type of category // Ticks must be numbers when the axis is the type of number ticks: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array, // The count of ticks tickCount: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, // The formatter function of tick tickFormatter: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, // The width of axis, which need to be setted by user width: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, // The height of axis which is usually calculated in Chart height: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, mirror: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, // The orientation of axis orientation: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['left', 'right']), type: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['number', 'category']), padding: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({ top: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, bottom: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number }), allowDataOverflow: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, scale: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['auto', 'linear', 'pow', 'sqrt', 'log', 'identity', 'time', 'band', 'point', 'ordinal', 'quantile', 'quantize', 'utc', 'sequential', 'threshold']), __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func]), tick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.element]), axisLine: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]), tickLine: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]), minTickGap: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, tickSize: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, interval: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['preserveStart', 'preserveEnd', 'preserveStartEnd'])]), reversed: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool }; YAxis.defaultProps = { allowDuplicatedCategory: true, allowDecimals: true, hide: false, orientation: 'left', width: 60, height: 0, mirror: false, yAxisId: 0, tickCount: 5, type: 'number', domain: [0, 'auto'], padding: { top: 0, bottom: 0 }, allowDataOverflow: false, scale: 'auto', reversed: false }; /* harmony default export */ __webpack_exports__["a"] = (YAxis); /***/ }), /* 315 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(107); var getOwnPropertyDescriptor = __webpack_require__(1503).f; var createNonEnumerableProperty = __webpack_require__(317); var redefine = __webpack_require__(1508); var setGlobal = __webpack_require__(863); var copyConstructorProperties = __webpack_require__(3738); var isForced = __webpack_require__(3744); /* options.target - name of the target object options.global - target is the global object options.stat - export as static methods of target options.proto - export as prototype methods of target options.real - real prototype method for the `pure` version options.forced - export even if the native feature is available options.bind - bind methods to the target, required for the `pure` version options.wrap - wrap constructors to preventing global pollution, required for the `pure` version options.unsafe - use the simple assignment of property instead of delete + defineProperty options.sham - add a flag to not completely full polyfills options.enumerable - export as enumerable property options.noTargetGet - prevent calling a getter on target */ module.exports = function (options, source) { var TARGET = options.target; var GLOBAL = options.global; var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { target = global; } else if (STATIC) { target = global[TARGET] || setGlobal(TARGET, {}); } else { target = (global[TARGET] || {}).prototype; } if (target) for (key in source) { sourceProperty = source[key]; if (options.noTargetGet) { descriptor = getOwnPropertyDescriptor(target, key); targetProperty = descriptor && descriptor.value; } else targetProperty = target[key]; FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target if (!FORCED && targetProperty !== undefined) { if (typeof sourceProperty === typeof targetProperty) continue; copyConstructorProperties(sourceProperty, targetProperty); } // add a flag to not completely full polyfills if (options.sham || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty(sourceProperty, 'sham', true); } // extend global redefine(target, key, sourceProperty, options); } }; /***/ }), /* 316 */ /***/ (function(module, exports) { // `RequireObjectCoercible` abstract operation // https://tc39.github.io/ecma262/#sec-requireobjectcoercible module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /* 317 */ /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(254); var definePropertyModule = __webpack_require__(862); var createPropertyDescriptor = __webpack_require__(1505); module.exports = DESCRIPTORS ? function (object, key, value) { return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /* 318 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(393), getRawTag = __webpack_require__(3900), objectToString = __webpack_require__(3901); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /* 319 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var uri = __webpack_require__(884); var ValidationError = exports.ValidationError = function ValidationError (message, instance, schema, propertyPath, name, argument) { if (propertyPath) { this.property = propertyPath; } if (message) { this.message = message; } if (schema) { if (schema.id) { this.schema = schema.id; } else { this.schema = schema; } } if (instance !== undefined) { this.instance = instance; } this.name = name; this.argument = argument; this.stack = this.toString(); }; ValidationError.prototype.toString = function toString() { return this.property + ' ' + this.message; }; var ValidatorResult = exports.ValidatorResult = function ValidatorResult(instance, schema, options, ctx) { this.instance = instance; this.schema = schema; this.propertyPath = ctx.propertyPath; this.errors = []; this.throwError = options && options.throwError; this.disableFormat = options && options.disableFormat === true; }; ValidatorResult.prototype.addError = function addError(detail) { var err; if (typeof detail == 'string') { err = new ValidationError(detail, this.instance, this.schema, this.propertyPath); } else { if (!detail) throw new Error('Missing error detail'); if (!detail.message) throw new Error('Missing error message'); if (!detail.name) throw new Error('Missing validator type'); err = new ValidationError(detail.message, this.instance, this.schema, this.propertyPath, detail.name, detail.argument); } if (this.throwError) { throw err; } this.errors.push(err); return err; }; ValidatorResult.prototype.importErrors = function importErrors(res) { if (typeof res == 'string' || (res && res.validatorType)) { this.addError(res); } else if (res && res.errors) { Array.prototype.push.apply(this.errors, res.errors); } }; function stringizer (v,i){ return i+': '+v.toString()+'\n'; } ValidatorResult.prototype.toString = function toString(res) { return this.errors.map(stringizer).join(''); }; Object.defineProperty(ValidatorResult.prototype, "valid", { get: function() { return !this.errors.length; } }); /** * Describes a problem with a Schema which prevents validation of an instance * @name SchemaError * @constructor */ var SchemaError = exports.SchemaError = function SchemaError (msg, schema) { this.message = msg; this.schema = schema; Error.call(this, msg); Error.captureStackTrace(this, SchemaError); }; SchemaError.prototype = Object.create(Error.prototype, { constructor: {value: SchemaError, enumerable: false}, name: {value: 'SchemaError', enumerable: false}, }); var SchemaContext = exports.SchemaContext = function SchemaContext (schema, options, propertyPath, base, schemas) { this.schema = schema; this.options = options; this.propertyPath = propertyPath; this.base = base; this.schemas = schemas; }; SchemaContext.prototype.resolve = function resolve (target) { return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema, propertyName){ var propertyPath = (propertyName===undefined) ? this.propertyPath : this.propertyPath+makeSuffix(propertyName); var base = uri.resolve(this.base, schema.id||''); var ctx = new SchemaContext(schema, this.options, propertyPath, base, Object.create(this.schemas)); if(schema.id && !ctx.schemas[base]){ ctx.schemas[base] = schema; } return ctx; }; var FORMAT_REGEXPS = exports.FORMAT_REGEXPS = { 'date-time': /^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/, 'date': /^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/, 'time': /^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/, 'email': /^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/, 'ip-address': /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/, 'ipv6': /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/, 'uri': /^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/, 'color': /^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/, // hostname regex from: http://stackoverflow.com/a/1420225/5628 'hostname': /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/, 'host-name': /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/, 'alpha': /^[a-zA-Z]+$/, 'alphanumeric': /^[a-zA-Z0-9]+$/, 'utc-millisec': function (input) { return (typeof input === 'string') && parseFloat(input) === parseInt(input, 10) && !isNaN(input); }, 'regex': function (input) { var result = true; try { new RegExp(input); } catch (e) { result = false; } return result; }, 'style': /\s*(.+?):\s*([^;]+);?/, 'phone': /^\+(?:[0-9] ?){6,14}[0-9]$/, }; FORMAT_REGEXPS.regexp = FORMAT_REGEXPS.regex; FORMAT_REGEXPS.pattern = FORMAT_REGEXPS.regex; FORMAT_REGEXPS.ipv4 = FORMAT_REGEXPS['ip-address']; exports.isFormat = function isFormat (input, format, validator) { if (typeof input === 'string' && FORMAT_REGEXPS[format] !== undefined) { if (FORMAT_REGEXPS[format] instanceof RegExp) { return FORMAT_REGEXPS[format].test(input); } if (typeof FORMAT_REGEXPS[format] === 'function') { return FORMAT_REGEXPS[format](input); } } else if (validator && validator.customFormats && typeof validator.customFormats[format] === 'function') { return validator.customFormats[format](input); } return true; }; var makeSuffix = exports.makeSuffix = function makeSuffix (key) { key = key.toString(); // This function could be capable of outputting valid a ECMAScript string, but the // resulting code for testing which form to use would be tens of thousands of characters long // That means this will use the name form for some illegal forms if (!key.match(/[.\s\[\]]/) && !key.match(/^[\d]/)) { return '.' + key; } if (key.match(/^\d+$/)) { return '[' + key + ']'; } return '[' + JSON.stringify(key) + ']'; }; exports.deepCompareStrict = function deepCompareStrict (a, b) { if (typeof a !== typeof b) { return false; } if (Array.isArray(a)) { if (!Array.isArray(b)) { return false; } if (a.length !== b.length) { return false; } return a.every(function (v, i) { return deepCompareStrict(a[i], b[i]); }); } if (typeof a === 'object') { if (!a || !b) { return a === b; } var aKeys = Object.keys(a); var bKeys = Object.keys(b); if (aKeys.length !== bKeys.length) { return false; } return aKeys.every(function (v) { return deepCompareStrict(a[v], b[v]); }); } return a === b; }; function deepMerger (target, dst, e, i) { if (typeof e === 'object') { dst[i] = deepMerge(target[i], e); } else { if (target.indexOf(e) === -1) { dst.push(e); } } } function copyist (src, dst, key) { dst[key] = src[key]; } function copyistWithDeepMerge (target, src, dst, key) { if (typeof src[key] !== 'object' || !src[key]) { dst[key] = src[key]; } else { if (!target[key]) { dst[key] = src[key]; } else { dst[key] = deepMerge(target[key], src[key]); } } } function deepMerge (target, src) { var array = Array.isArray(src); var dst = array && [] || {}; if (array) { target = target || []; dst = dst.concat(target); src.forEach(deepMerger.bind(null, target, dst)); } else { if (target && typeof target === 'object') { Object.keys(target).forEach(copyist.bind(null, target, dst)); } Object.keys(src).forEach(copyistWithDeepMerge.bind(null, target, src, dst)); } return dst; } module.exports.deepMerge = deepMerge; /** * Validates instance against the provided schema * Implements URI+JSON Pointer encoding, e.g. "%7e"="~0"=>"~", "~1"="%2f"=>"/" * @param o * @param s The path to walk o along * @return any */ exports.objectGetPath = function objectGetPath(o, s) { var parts = s.split('/').slice(1); var k; while (typeof (k=parts.shift()) == 'string') { var n = decodeURIComponent(k.replace(/~0/,'~').replace(/~1/g,'/')); if (!(n in o)) return; o = o[n]; } return o; }; function pathEncoder (v) { return '/'+encodeURIComponent(v).replace(/~/g,'%7E'); } /** * Accept an Array of property names and return a JSON Pointer URI fragment * @param Array a * @return {String} */ exports.encodePath = function encodePointer(a){ // ~ must be encoded explicitly because hacks // the slash is encoded by encodeURIComponent return a.map(pathEncoder).join(''); }; /** * Calculate the number of decimal places a number uses * We need this to get correct results out of multipleOf and divisibleBy * when either figure is has decimal places, due to IEEE-754 float issues. * @param number * @returns {number} */ exports.getDecimalPlaces = function getDecimalPlaces(number) { var decimalPlaces = 0; if (isNaN(number)) return decimalPlaces; if (typeof number !== 'number') { number = Number(number); } var parts = number.toString().split('e'); if (parts.length === 2) { if (parts[1][0] !== '-') { return decimalPlaces; } else { decimalPlaces = Number(parts[1].slice(1)); } } var decimalParts = parts[0].split('.'); if (decimalParts.length === 2) { decimalPlaces += decimalParts[1].length; } return decimalPlaces; }; /***/ }), /* 320 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = { copy: copy, checkDataType: checkDataType, checkDataTypes: checkDataTypes, coerceToTypes: coerceToTypes, toHash: toHash, getProperty: getProperty, escapeQuotes: escapeQuotes, equal: __webpack_require__(908), ucs2length: __webpack_require__(4191), varOccurences: varOccurences, varReplace: varReplace, cleanUpCode: cleanUpCode, finalCleanUpCode: finalCleanUpCode, schemaHasRules: schemaHasRules, schemaHasRulesExcept: schemaHasRulesExcept, schemaUnknownRules: schemaUnknownRules, toQuotedString: toQuotedString, getPathExpr: getPathExpr, getPath: getPath, getData: getData, unescapeFragment: unescapeFragment, unescapeJsonPointer: unescapeJsonPointer, escapeFragment: escapeFragment, escapeJsonPointer: escapeJsonPointer }; function copy(o, to) { to = to || {}; for (var key in o) to[key] = o[key]; return to; } function checkDataType(dataType, data, negate) { var EQUAL = negate ? ' !== ' : ' === ' , AND = negate ? ' || ' : ' && ' , OK = negate ? '!' : '' , NOT = negate ? '' : '!'; switch (dataType) { case 'null': return data + EQUAL + 'null'; case 'array': return OK + 'Array.isArray(' + data + ')'; case 'object': return '(' + OK + data + AND + 'typeof ' + data + EQUAL + '"object"' + AND + NOT + 'Array.isArray(' + data + '))'; case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + NOT + '(' + data + ' % 1)' + AND + data + EQUAL + data + ')'; default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; } } function checkDataTypes(dataTypes, data) { switch (dataTypes.length) { case 1: return checkDataType(dataTypes[0], data, true); default: var code = ''; var types = toHash(dataTypes); if (types.array && types.object) { code = types.null ? '(': '(!' + data + ' || '; code += 'typeof ' + data + ' !== "object")'; delete types.null; delete types.array; delete types.object; } if (types.number) delete types.integer; for (var t in types) code += (code ? ' && ' : '' ) + checkDataType(t, data, true); return code; } } var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); function coerceToTypes(optionCoerceTypes, dataTypes) { if (Array.isArray(dataTypes)) { var types = []; for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); return paths[lvl - up]; } if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); data = 'data' + ((lvl - up) || ''); if (!jsonPointer) return data; } var expr = data; var segments = jsonPointer.split('/'); for (var i=0; i [1, 2, 3] * * curried(1, 2)(3); * // => [1, 2, 3] * * curried(1, 2, 3); * // => [1, 2, 3] * * // Curried with placeholders. * curried(1)(_, 3)(2); * // => [1, 2, 3] */ function curry(func, arity, guard) { arity = guard ? undefined : arity; var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curry.placeholder; return result; } // Assign default placeholders. curry.placeholder = {}; module.exports = curry; /***/ }), /* 330 */ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 331 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /* 332 */ /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /* 333 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(992), baseKeys = __webpack_require__(1963), isArrayLike = __webpack_require__(334); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /* 334 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(587), isLength = __webpack_require__(603); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /* 335 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_Provider__ = __webpack_require__(2035); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__ = __webpack_require__(1019); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__connect_connect__ = __webpack_require__(2042); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createProvider", function() { return __WEBPACK_IMPORTED_MODULE_0__components_Provider__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return __WEBPACK_IMPORTED_MODULE_1__components_connectAdvanced__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return __WEBPACK_IMPORTED_MODULE_2__connect_connect__["a"]; }); /***/ }), /* 336 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var REACT_STATICS = { childContextTypes: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = getPrototypeOf && getPrototypeOf(Object); function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } var keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); } catch (e) {} } } return targetComponent; } return targetComponent; } module.exports = hoistNonReactStatics; /***/ }), /* 337 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (immutable) */ __webpack_exports__["e"] = getGlobalObject; /* harmony export (immutable) */ __webpack_exports__["i"] = uuid4; /* harmony export (immutable) */ __webpack_exports__["h"] = parseUrl; /* harmony export (immutable) */ __webpack_exports__["d"] = getEventDescription; /* harmony export (immutable) */ __webpack_exports__["c"] = consoleSandbox; /* harmony export (immutable) */ __webpack_exports__["b"] = addExceptionTypeValue; /* harmony export (immutable) */ __webpack_exports__["a"] = addExceptionMechanism; /* harmony export (immutable) */ __webpack_exports__["f"] = getLocationHref; /* unused harmony export parseSemver */ /* harmony export (immutable) */ __webpack_exports__["g"] = parseRetryAfterHeader; /* unused harmony export addContextToFrame */ /* unused harmony export stripUrlQueryAndFragment */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__node__ = __webpack_require__(623); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__string__ = __webpack_require__(626); var fallbackGlobalObject = {}; /** * Safely get global scope object * * @returns Global scope object */ function getGlobalObject() { return (Object(__WEBPACK_IMPORTED_MODULE_0__node__["b" /* isNodeEnv */])() ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : fallbackGlobalObject); } /** * UUID4 generator * * @returns string Generated UUID4. */ function uuid4() { var global = getGlobalObject(); var crypto = global.crypto || global.msCrypto; if (!(crypto === void 0) && crypto.getRandomValues) { // Use window.crypto API if available var arr = new Uint16Array(8); crypto.getRandomValues(arr); // set 4 in byte 7 // eslint-disable-next-line no-bitwise arr[3] = (arr[3] & 0xfff) | 0x4000; // set 2 most significant bits of byte 9 to '10' // eslint-disable-next-line no-bitwise arr[4] = (arr[4] & 0x3fff) | 0x8000; var pad = function (num) { var v = num.toString(16); while (v.length < 4) { v = "0" + v; } return v; }; return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])); } // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523 return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) { // eslint-disable-next-line no-bitwise var r = (Math.random() * 16) | 0; // eslint-disable-next-line no-bitwise var v = c === 'x' ? r : (r & 0x3) | 0x8; return v.toString(16); }); } /** * Parses string form of URL into an object * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B * // intentionally using regex and not href parsing trick because React Native and other * // environments where DOM might not be available * @returns parsed URL object */ function parseUrl(url) { if (!url) { return {}; } var match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); if (!match) { return {}; } // coerce to undefined values to empty string so we don't get 'undefined' var query = match[6] || ''; var fragment = match[8] || ''; return { host: match[4], path: match[5], protocol: match[2], relative: match[5] + query + fragment, }; } /** * Extracts either message or type+value from an event that can be used for user-facing logs * @returns event's description */ function getEventDescription(event) { if (event.message) { return event.message; } if (event.exception && event.exception.values && event.exception.values[0]) { var exception = event.exception.values[0]; if (exception.type && exception.value) { return exception.type + ": " + exception.value; } return exception.type || exception.value || event.event_id || ''; } return event.event_id || ''; } /** JSDoc */ function consoleSandbox(callback) { var global = getGlobalObject(); var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert']; if (!('console' in global)) { return callback(); } // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access var originalConsole = global.console; var wrappedLevels = {}; // Restore all wrapped console methods levels.forEach(function (level) { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access if (level in global.console && originalConsole[level].__sentry_original__) { wrappedLevels[level] = originalConsole[level]; originalConsole[level] = originalConsole[level].__sentry_original__; } }); // Perform callback manipulations var result = callback(); // Revert restoration to wrapped state Object.keys(wrappedLevels).forEach(function (level) { originalConsole[level] = wrappedLevels[level]; }); return result; } /** * Adds exception values, type and value to an synthetic Exception. * @param event The event to modify. * @param value Value of the exception. * @param type Type of the exception. * @hidden */ function addExceptionTypeValue(event, value, type) { event.exception = event.exception || {}; event.exception.values = event.exception.values || []; event.exception.values[0] = event.exception.values[0] || {}; event.exception.values[0].value = event.exception.values[0].value || value || ''; event.exception.values[0].type = event.exception.values[0].type || type || 'Error'; } /** * Adds exception mechanism to a given event. * @param event The event to modify. * @param mechanism Mechanism of the mechanism. * @hidden */ function addExceptionMechanism(event, mechanism) { if (mechanism === void 0) { mechanism = {}; } // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better? try { // @ts-ignore Type 'Mechanism | {}' is not assignable to type 'Mechanism | undefined' // eslint-disable-next-line @typescript-eslint/no-non-null-assertion event.exception.values[0].mechanism = event.exception.values[0].mechanism || {}; Object.keys(mechanism).forEach(function (key) { // @ts-ignore Mechanism has no index signature // eslint-disable-next-line @typescript-eslint/no-non-null-assertion event.exception.values[0].mechanism[key] = mechanism[key]; }); } catch (_oO) { // no-empty } } /** * A safe form of location.href */ function getLocationHref() { try { return document.location.href; } catch (oO) { return ''; } } // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; /** * Parses input into a SemVer interface * @param input string representation of a semver version */ function parseSemver(input) { var match = input.match(SEMVER_REGEXP) || []; var major = parseInt(match[1], 10); var minor = parseInt(match[2], 10); var patch = parseInt(match[3], 10); return { buildmetadata: match[5], major: isNaN(major) ? undefined : major, minor: isNaN(minor) ? undefined : minor, patch: isNaN(patch) ? undefined : patch, prerelease: match[4], }; } var defaultRetryAfter = 60 * 1000; // 60 seconds /** * Extracts Retry-After value from the request header or returns default value * @param now current unix timestamp * @param header string representation of 'Retry-After' header */ function parseRetryAfterHeader(now, header) { if (!header) { return defaultRetryAfter; } var headerDelay = parseInt("" + header, 10); if (!isNaN(headerDelay)) { return headerDelay * 1000; } var headerDate = Date.parse("" + header); if (!isNaN(headerDate)) { return headerDate - now; } return defaultRetryAfter; } /** * This function adds context (pre/post/line) lines to the provided frame * * @param lines string[] containing all lines * @param frame StackFrame that will be mutated * @param linesOfContext number of context lines we want to add pre/post */ function addContextToFrame(lines, frame, linesOfContext) { if (linesOfContext === void 0) { linesOfContext = 5; } var lineno = frame.lineno || 0; var maxLines = lines.length; var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0); frame.pre_context = lines .slice(Math.max(0, sourceLine - linesOfContext), sourceLine) .map(function (line) { return Object(__WEBPACK_IMPORTED_MODULE_1__string__["c" /* snipLine */])(line, 0); }); frame.context_line = Object(__WEBPACK_IMPORTED_MODULE_1__string__["c" /* snipLine */])(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0); frame.post_context = lines .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext) .map(function (line) { return Object(__WEBPACK_IMPORTED_MODULE_1__string__["c" /* snipLine */])(line, 0); }); } /** * Strip the query string and fragment off of a given URL or path (if present) * * @param urlPath Full URL or path, including possible query string and/or fragment * @returns URL or path without query string or fragment */ function stripUrlQueryAndFragment(urlPath) { // eslint-disable-next-line no-useless-escape return urlPath.split(/[\?#]/, 1)[0]; } //# sourceMappingURL=misc.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(27))) /***/ }), /* 338 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = shouldIgnoreOnError; /* unused harmony export ignoreNextOnError */ /* harmony export (immutable) */ __webpack_exports__["c"] = wrap; /* harmony export (immutable) */ __webpack_exports__["a"] = injectReportDialog; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(45); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sentry_core__ = __webpack_require__(102); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__sentry_utils__ = __webpack_require__(52); var ignoreOnError = 0; /** * @hidden */ function shouldIgnoreOnError() { return ignoreOnError > 0; } /** * @hidden */ function ignoreNextOnError() { // onerror should trigger before setTimeout ignoreOnError += 1; setTimeout(function () { ignoreOnError -= 1; }); } /** * Instruments the given function and sends an event to Sentry every time the * function throws an exception. * * @param fn A function to wrap. * @returns The wrapped function. * @hidden */ function wrap(fn, options, before) { if (options === void 0) { options = {}; } if (typeof fn !== 'function') { return fn; } try { // We don't wanna wrap it twice if (fn.__sentry__) { return fn; } // If this has already been wrapped in the past, return that wrapped function if (fn.__sentry_wrapped__) { return fn.__sentry_wrapped__; } } catch (e) { // Just accessing custom props in some Selenium environments // can cause a "Permission denied" exception (see raven-js#495). // Bail on wrapping and return the function as-is (defers to window.onerror). return fn; } /* eslint-disable prefer-rest-params */ // eslint-disable-next-line @typescript-eslint/no-explicit-any var sentryWrapped = function () { var args = Array.prototype.slice.call(arguments); try { if (before && typeof before === 'function') { before.apply(this, arguments); } // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access var wrappedArguments = args.map(function (arg) { return wrap(arg, options); }); if (fn.handleEvent) { // Attempt to invoke user-land function // NOTE: If you are a Sentry user, and you are seeing this stack frame, it // means the sentry.javascript SDK caught an error invoking your application code. This // is expected behavior and NOT indicative of a bug with sentry.javascript. // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access return fn.handleEvent.apply(this, wrappedArguments); } // Attempt to invoke user-land function // NOTE: If you are a Sentry user, and you are seeing this stack frame, it // means the sentry.javascript SDK caught an error invoking your application code. This // is expected behavior and NOT indicative of a bug with sentry.javascript. return fn.apply(this, wrappedArguments); } catch (ex) { ignoreNextOnError(); Object(__WEBPACK_IMPORTED_MODULE_1__sentry_core__["y" /* withScope */])(function (scope) { scope.addEventProcessor(function (event) { var processedEvent = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, event); if (options.mechanism) { Object(__WEBPACK_IMPORTED_MODULE_2__sentry_utils__["f" /* addExceptionTypeValue */])(processedEvent, undefined, undefined); Object(__WEBPACK_IMPORTED_MODULE_2__sentry_utils__["e" /* addExceptionMechanism */])(processedEvent, options.mechanism); } processedEvent.extra = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, processedEvent.extra), { arguments: args }); return processedEvent; }); Object(__WEBPACK_IMPORTED_MODULE_1__sentry_core__["j" /* captureException */])(ex); }); throw ex; } }; /* eslint-enable prefer-rest-params */ // Accessing some objects may throw // ref: https://github.com/getsentry/sentry-javascript/issues/1168 try { for (var property in fn) { if (Object.prototype.hasOwnProperty.call(fn, property)) { sentryWrapped[property] = fn[property]; } } } catch (_oO) { } // eslint-disable-line no-empty fn.prototype = fn.prototype || {}; sentryWrapped.prototype = fn.prototype; Object.defineProperty(fn, '__sentry_wrapped__', { enumerable: false, value: sentryWrapped, }); // Signal that this function has been wrapped/filled already // for both debugging and to prevent it to being wrapped/filled twice Object.defineProperties(sentryWrapped, { __sentry__: { enumerable: false, value: true, }, __sentry_original__: { enumerable: false, value: fn, }, }); // Restore original function name (not all browsers allow that) try { var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name'); if (descriptor.configurable) { Object.defineProperty(sentryWrapped, 'name', { get: function () { return fn.name; }, }); } // eslint-disable-next-line no-empty } catch (_oO) { } return sentryWrapped; } /** * Injects the Report Dialog script * @hidden */ function injectReportDialog(options) { if (options === void 0) { options = {}; } if (!options.eventId) { __WEBPACK_IMPORTED_MODULE_2__sentry_utils__["C" /* logger */].error("Missing eventId option in showReportDialog call"); return; } if (!options.dsn) { __WEBPACK_IMPORTED_MODULE_2__sentry_utils__["C" /* logger */].error("Missing dsn option in showReportDialog call"); return; } var script = document.createElement('script'); script.async = true; script.src = new __WEBPACK_IMPORTED_MODULE_1__sentry_core__["a" /* API */](options.dsn).getReportDialogEndpoint(options); if (options.onLoad) { // eslint-disable-next-line @typescript-eslint/unbound-method script.onload = options.onLoad; } (document.head || document.body).appendChild(script); } //# sourceMappingURL=helpers.js.map /***/ }), /* 339 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(11)); var _react = _interopRequireDefault(__webpack_require__(0)); var _invariant = _interopRequireDefault(__webpack_require__(51)); var _forIn = _interopRequireDefault(__webpack_require__(2085)); var _constant = _interopRequireDefault(__webpack_require__(74)); var _registry = _interopRequireDefault(__webpack_require__(180)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var regexExpression = new RegExp('(.*)Expression'); /** * @typedef {Object} Context * @property {string} store * @property {string} registry */ /** * This module define expression which are just function * used to be called in the way you want in your APP with a context and a payload as params * @module react-cmf/lib/expression */ /** * register an expression * @param {string} id the id of the expression to call it later * @param {function} func the function you want to register under this id * @param {Context} context React context is optional */ function register(id, func, context) { _registry["default"].addToRegistry("".concat(_constant["default"].REGISTRY_EXPRESSION_PREFIX, ":").concat(id), func, context); } /** * get an expression from it's id * @param {string} id of the expression you want to get * @param {Context} context React context is optional */ function get(id, context) { return _registry["default"].getFromRegistry("".concat(_constant["default"].REGISTRY_EXPRESSION_PREFIX, ":").concat(id), context); } /** * expressions are registred function which can be called through configuration * @param {string|object} expression to call * @param {object} React context * @param {object} payload will be in expression argument */ function call(expression, context, payload) { var id; var args; if (_typeof(expression) === 'object') { id = expression.id; args = expression.args; } else if (typeof expression === 'string') { id = expression; args = []; } if (!id) { (0, _invariant["default"])(process.env.NODE_ENV === 'production', 'you must provide an expression id'); } var check = get(id, context); if (!check) { (0, _invariant["default"])(process.env.NODE_ENV === 'production', "you must register expression ".concat(id, " first")); } return check.apply(void 0, [{ context: context, payload: payload }].concat(_toConsumableArray(args))); } /** * this function will try to find all props.properties that should be evaluated agains * a registered function, the attrs parameter will be deprecated. * Each parameter name ending with Expression will be automaticaly evaluated * against their registered Expression and the result put inside a properties with name * matching the original expression attributes minus the 'Expression' part * * @param {Object.} props React props * @param {Array.} attrs of attribute to get * @param {Context} context React context * @param {payload} payload optional payload to pass * @deprecated the array param will be deprecated and replaced with context * @deprecated the context will be replaced by the payload */ function getProps(props, attrs, context) { var payload = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var newProps = _objectSpread(_objectSpread({}, props), payload); attrs.forEach(function (attr) { var value = props[attr]; if (typeof value === 'string' || _typeof(value) === 'object') { // eslint-disable-next-line console.warn("beware this is present just for the sake of backward compatibility,\n\t\t\t\tyou should use properties ending with Expression to see them evaluated\n\t\t\t\texample: instead of using ".concat(attr, ", ").concat(attr, "Expression will be evaluated\n\t\t\t\tand result put in ").concat(attr)); newProps[attr] = call(value, context, newProps); } }); (0, _forIn["default"])(props, function (value, key) { var match = regexExpression.exec(key); if (match) { newProps[match[1]] = call(props[match[0]], context, newProps); delete newProps[match[0]]; } }); return newProps; } /** * Internal: you should not have to use it * This function will compute a new props object with extra props * using the convention `fooExpression` will return { foo }; * @param {object} state redux state * @param {object} ownProps any props you want to process with expression */ function mapStateToProps(state, ownProps) { var ctx = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var props = {}; var context = _objectSpread({ store: { getState: function getState() { return state; } }, registry: _registry["default"].getRegistry() }, ctx); (0, _forIn["default"])(ownProps, function (value, key) { var match = regexExpression.exec(key); if (match) { props[match[1]] = call(ownProps[match[0]], context, ownProps); } }); return props; } /** * Internal: you should not have to use it * this function cleanup the object by returning a new one by removing * all key that finish with Expression (ie `fooExpression`); * @param {object} props any props object */ function mergeProps(props) { var newProps = _objectSpread({}, props); (0, _forIn["default"])(newProps, function (value, key) { var match = regexExpression.exec(key); if (match) { delete newProps[match[0]]; } }); return newProps; } /** * * @param {any} Component * @param {*} attrs */ function withExpression(Component, attrs) { function WithExpression(props, context) { return /*#__PURE__*/_react["default"].createElement(Component, getProps(props, attrs, context)); } WithExpression.contextTypes = { registry: _propTypes["default"].object, store: _propTypes["default"].object, router: _propTypes["default"].object }; WithExpression.displayName = "WithExpression(".concat(Component.displayName || Component.name, ")"); return WithExpression; } var registerMany = _registry["default"].getRegisterMany(register); var _default = { register: register, registerMany: registerMany, get: get, call: call, getProps: getProps, withExpression: withExpression, mapStateToProps: mapStateToProps, mergeProps: mergeProps }; exports["default"] = _default; //# sourceMappingURL=expression.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 340 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, module) {/** * Lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright JS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', asyncTag = '[object AsyncFunction]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', nullTag = '[object Null]', objectTag = '[object Object]', promiseTag = '[object Promise]', proxyTag = '[object Proxy]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', undefinedTag = '[object Undefined]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } /** Used for built-in method references. */ var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined, Symbol = root.Symbol, Uint8Array = root.Uint8Array, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, symToStringTag = Symbol ? Symbol.toStringTag : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeKeys = overArg(Object.keys, Object); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'), Map = getNative(root, 'Map'), Promise = getNative(root, 'Promise'), Set = getNative(root, 'Set'), WeakMap = getNative(root, 'WeakMap'), nativeCreate = getNative(Object, 'create'); /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || (object.byteOffset != other.byteOffset)) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (typeof value == 'number' || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; /** * Performs a deep comparison between two values to determine if they are * equivalent. * * **Note:** This method supports comparing arrays, array buffers, booleans, * date objects, error objects, maps, numbers, `Object` objects, regexes, * sets, strings, symbols, and typed arrays. `Object` objects are compared * by their own, not inherited, enumerable properties. Functions and DOM * nodes are compared by strict equality, i.e. `===`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true * * object === other; * // => false */ function isEqual(value, other) { return baseIsEqual(value, other); } /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = isEqual; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27), __webpack_require__(64)(module))) /***/ }), /* 341 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "changeLanguage", function() { return changeLanguage; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneInstance", function() { return cloneInstance; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createInstance", function() { return createInstance; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dir", function() { return dir; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exists", function() { return exists; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFixedT", function() { return getFixedT; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "init", function() { return init; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadLanguages", function() { return loadLanguages; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadNamespaces", function() { return loadNamespaces; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadResources", function() { return loadResources; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "off", function() { return off; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "on", function() { return on; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDefaultNamespace", function() { return setDefaultNamespace; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return t; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "use", function() { return use; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__i18next_js__ = __webpack_require__(2148); /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var changeLanguage = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].changeLanguage.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var cloneInstance = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].cloneInstance.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var createInstance = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].createInstance.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var dir = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].dir.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var exists = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].exists.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var getFixedT = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].getFixedT.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var init = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].init.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var loadLanguages = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].loadLanguages.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var loadNamespaces = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].loadNamespaces.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var loadResources = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].loadResources.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var off = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].off.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var on = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].on.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var setDefaultNamespace = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].setDefaultNamespace.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var t = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].t.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); var use = __WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */].use.bind(__WEBPACK_IMPORTED_MODULE_0__i18next_js__["a" /* default */]); /***/ }), /* 342 */ /***/ (function(module, exports) { function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } function _typeof(obj) { if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { module.exports = _typeof = function _typeof(obj) { return _typeof2(obj); }; } else { module.exports = _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); }; } return _typeof(obj); } module.exports = _typeof; /***/ }), /* 343 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["c"] = defer; /* harmony export (immutable) */ __webpack_exports__["f"] = makeString; /* harmony export (immutable) */ __webpack_exports__["a"] = copy; /* harmony export (immutable) */ __webpack_exports__["i"] = setPath; /* harmony export (immutable) */ __webpack_exports__["g"] = pushPath; /* harmony export (immutable) */ __webpack_exports__["e"] = getPath; /* harmony export (immutable) */ __webpack_exports__["b"] = deepExtend; /* harmony export (immutable) */ __webpack_exports__["h"] = regexEscape; /* harmony export (immutable) */ __webpack_exports__["d"] = escape; // http://lea.verou.me/2016/12/resolve-promises-externally-with-this-one-weird-trick/ function defer() { var res; var rej; var promise = new Promise(function (resolve, reject) { res = resolve; rej = reject; }); promise.resolve = res; promise.reject = rej; return promise; } function makeString(object) { if (object == null) return ''; /* eslint prefer-template: 0 */ return '' + object; } function copy(a, s, t) { a.forEach(function (m) { if (s[m]) t[m] = s[m]; }); } function getLastOfPath(object, path, Empty) { function cleanKey(key) { return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key; } function canNotTraverseDeeper() { return !object || typeof object === 'string'; } var stack = typeof path !== 'string' ? [].concat(path) : path.split('.'); while (stack.length > 1) { if (canNotTraverseDeeper()) return {}; var key = cleanKey(stack.shift()); if (!object[key] && Empty) object[key] = new Empty(); object = object[key]; } if (canNotTraverseDeeper()) return {}; return { obj: object, k: cleanKey(stack.shift()) }; } function setPath(object, path, newValue) { var _getLastOfPath = getLastOfPath(object, path, Object), obj = _getLastOfPath.obj, k = _getLastOfPath.k; obj[k] = newValue; } function pushPath(object, path, newValue, concat) { var _getLastOfPath2 = getLastOfPath(object, path, Object), obj = _getLastOfPath2.obj, k = _getLastOfPath2.k; obj[k] = obj[k] || []; if (concat) obj[k] = obj[k].concat(newValue); if (!concat) obj[k].push(newValue); } function getPath(object, path) { var _getLastOfPath3 = getLastOfPath(object, path), obj = _getLastOfPath3.obj, k = _getLastOfPath3.k; if (!obj) return undefined; return obj[k]; } function deepExtend(target, source, overwrite) { /* eslint no-restricted-syntax: 0 */ for (var prop in source) { if (prop in target) { // If we reached a leaf string in target or source then replace with source or skip depending on the 'overwrite' switch if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) { if (overwrite) target[prop] = source[prop]; } else { deepExtend(target[prop], source[prop], overwrite); } } else { target[prop] = source[prop]; } } return target; } function regexEscape(str) { /* eslint no-useless-escape: 0 */ return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); } /* eslint-disable */ var _entityMap = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''', '/': '/' }; /* eslint-enable */ function escape(data) { if (typeof data === 'string') { return data.replace(/[&<>"'\/]/g, function (s) { return _entityMap[s]; }); } return data; } /***/ }), /* 344 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(1063); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /* 345 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /* 346 */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /* 347 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = createChainableTypeChecker; /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ // Mostly taken from ReactPropTypes. function createChainableTypeChecker(validate) { function checkType(isRequired, props, propName, componentName, location, propFullName) { var componentNameSafe = componentName || '<>'; var propFullNameSafe = propFullName || propName; if (props[propName] == null) { if (isRequired) { return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.')); } return null; } for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) { args[_key - 6] = arguments[_key]; } return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args)); } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; } module.exports = exports['default']; /***/ }), /* 348 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values__ = __webpack_require__(88); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__ = __webpack_require__(76); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__SafeAnchor__ = __webpack_require__(124); var propTypes = { active: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, disabled: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, block: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, componentClass: __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default.a, href: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, /** * Defines HTML button type attribute * @defaultValue 'button' */ type: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['button', 'reset', 'submit']) }; var defaultProps = { active: false, block: false, disabled: false }; var Button = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Button, _React$Component); function Button() { return _React$Component.apply(this, arguments) || this; } var _proto = Button.prototype; _proto.renderAnchor = function renderAnchor(elementProps, className) { return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__SafeAnchor__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, elementProps.disabled && 'disabled') })); }; _proto.renderButton = function renderButton(_ref, className) { var componentClass = _ref.componentClass, elementProps = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref, ["componentClass"]); var Component = componentClass || 'button'; return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { type: elementProps.type || 'button', className: className })); }; _proto.render = function render() { var _extends2; var _this$props = this.props, active = _this$props.active, block = _this$props.block, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["active", "block", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["getClassSet"])(bsProps), (_extends2 = { active: active }, _extends2[Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(bsProps, 'block')] = block, _extends2)); var fullClassName = __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, classes); if (elementProps.href) { return this.renderAnchor(elementProps, fullClassName); } return this.renderButton(elementProps, fullClassName); }; return Button; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); Button.propTypes = propTypes; Button.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["bsClass"])('btn', Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["bsSizes"])([__WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["c" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["c" /* Size */].SMALL, __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["c" /* Size */].XSMALL], Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["bsStyles"])(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values___default()(__WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["d" /* State */]).concat([__WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["e" /* Style */].DEFAULT, __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["e" /* Style */].PRIMARY, __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["e" /* Style */].LINK]), __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["e" /* Style */].DEFAULT, Button)))); /***/ }), /* 349 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== 'production') { var ReactIs = __webpack_require__(47); // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(2220)(ReactIs.isElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(2222)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 350 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /* 351 */ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(1114), baseAssignValue = __webpack_require__(1115); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /* 352 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(1117), baseKeys = __webpack_require__(1118), isArrayLike = __webpack_require__(353); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /* 353 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(1111), isLength = __webpack_require__(677); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /* 354 */ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(674); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }), /* 355 */ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(463); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /* 356 */ /***/ (function(module, exports, __webpack_require__) { var _Object$getOwnPropertyDescriptor = __webpack_require__(2380); var _Object$defineProperty = __webpack_require__(2383); var _typeof = __webpack_require__(2386); var _WeakMap = __webpack_require__(2399); function _getRequireWildcardCache() { if (typeof _WeakMap !== "function") return null; var cache = new _WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } module.exports = _interopRequireWildcard; /***/ }), /* 357 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(2)); var _react = _interopRequireDefault(__webpack_require__(0)); var _ActionButton = _interopRequireDefault(__webpack_require__(358)); var _ActionFile = _interopRequireDefault(__webpack_require__(1144)); var _ActionSplitDropdown = _interopRequireDefault(__webpack_require__(1145)); var _ActionDropdown = _interopRequireDefault(__webpack_require__(231)); var _ActionIconToggle = _interopRequireDefault(__webpack_require__(465)); var _Inject = _interopRequireDefault(__webpack_require__(58)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } var DISPLAY_MODE_FILE = 'file'; var DISPLAY_MODE_DROPDOWN = 'dropdown'; var DISPLAY_MODE_SPLIT_DROPDOWN = 'splitDropdown'; var DISPLAY_MODE_ICON_TOGGLE = 'iconToggle'; /** * @typedef {(Object|Function)} Component */ /** * Internal: should not be used outside * This function decide which component should be used to display the action * based on a displayMode. * Component can be override by the renderers * @param {ActionProps} - props should contains displayMode and renderers * @return {Component} the component to be used */ function getActionComponent(_ref) { var displayMode = _ref.displayMode, getComponent = _ref.getComponent; var Renderers = _Inject["default"].getAll(getComponent, { ActionFile: _ActionFile["default"], ActionDropdown: _ActionDropdown["default"], ActionSplitDropdown: _ActionSplitDropdown["default"], ActionIconToggle: _ActionIconToggle["default"], ActionButton: _ActionButton["default"] }); /* eslint-disable no-use-before-define */ switch (displayMode) { case DISPLAY_MODE_FILE: return Renderers.ActionFile; case DISPLAY_MODE_DROPDOWN: return Renderers.ActionDropdown; case DISPLAY_MODE_SPLIT_DROPDOWN: return Renderers.ActionSplitDropdown; case DISPLAY_MODE_ICON_TOGGLE: return Renderers.ActionIconToggle; default: return _Inject["default"].get(getComponent, displayMode, Renderers.ActionButton); } /* eslint-enable no-use-before-define */ } /** * This component is a component selector which to discover which kind of * action you want to display to the user. * The choice is fully based on the props displayMode * You can override the component using props renderer * @param {ActionProps} */ function Action(_ref2) { var displayMode = _ref2.displayMode, getComponent = _ref2.getComponent, props = _objectWithoutProperties(_ref2, ["displayMode", "getComponent"]); var ActionComponent = getActionComponent(_objectSpread({ displayMode: displayMode, getComponent: getComponent }, props)); return /*#__PURE__*/_react["default"].createElement(ActionComponent, props); } Action.DISPLAY_MODE_FILE = DISPLAY_MODE_FILE; Action.DISPLAY_MODE_DROPDOWN = DISPLAY_MODE_DROPDOWN; Action.DISPLAY_MODE_SPLIT_DROPDOWN = DISPLAY_MODE_SPLIT_DROPDOWN; Action.DISPLAY_MODE_ICON_TOGGLE = DISPLAY_MODE_ICON_TOGGLE; Action.displayName = 'Action'; Action.propTypes = { displayMode: _propTypes["default"].string, getComponent: _propTypes["default"].func }; var _default = Action; exports["default"] = _default; //# sourceMappingURL=Action.component.js.map /***/ }), /* 358 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ActionButton = _interopRequireDefault(__webpack_require__(2418)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _ActionButton["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 359 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ActionBar = _interopRequireDefault(__webpack_require__(2444)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _ActionBar["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 360 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = _extends; function _extends() { _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; }; return _extends.apply(this, arguments); } /***/ }), /* 361 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = assignRef; /** * Assigns a value for a given ref, no matter of the ref format * @param {RefObject} ref - a callback function or ref object * @param value - a new value * * @see https://github.com/theKashey/use-callback-ref#assignref * @example * const refObject = useRef(); * const refFn = (ref) => {....} * * assignRef(refObject, "refValue"); * assignRef(refFn, "refValue"); */ function assignRef(ref, value) { if (typeof ref === 'function') { ref(value); } else if (ref) { ref.current = value; } return ref; } /***/ }), /* 362 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); function areInputsEqual(newInputs, lastInputs) { if (newInputs.length !== lastInputs.length) { return false; } for (var i = 0; i < newInputs.length; i++) { if (newInputs[i] !== lastInputs[i]) { return false; } } return true; } function memoizeOne(resultFn, isEqual) { if (isEqual === void 0) { isEqual = areInputsEqual; } var lastThis; var lastArgs = []; var lastResult; var calledOnce = false; function memoized() { var newArgs = []; for (var _i = 0; _i < arguments.length; _i++) { newArgs[_i] = arguments[_i]; } if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) { return lastResult; } lastResult = resultFn.apply(this, newArgs); calledOnce = true; lastThis = this; lastArgs = newArgs; return lastResult; } return memoized; } /* harmony default export */ __webpack_exports__["default"] = (memoizeOne); /***/ }), /* 363 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Checkbox = _interopRequireDefault(__webpack_require__(2518)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Checkbox["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 364 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Typeahead = _interopRequireDefault(__webpack_require__(2605)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Typeahead["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 365 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Popper__ = __webpack_require__(2619); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Manager__ = __webpack_require__(711); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Reference__ = __webpack_require__(2636); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Popper", function() { return __WEBPACK_IMPORTED_MODULE_0__Popper__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "placements", function() { return __WEBPACK_IMPORTED_MODULE_0__Popper__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Manager", function() { return __WEBPACK_IMPORTED_MODULE_1__Manager__["c"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Reference", function() { return __WEBPACK_IMPORTED_MODULE_2__Reference__["a"]; }); // Public components // Public types /***/ }), /* 366 */ /***/ (function(module, exports) { module.exports = true; /***/ }), /* 367 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /* 368 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $at = __webpack_require__(2692)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(1199)(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); /***/ }), /* 369 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(1201); var enumBugKeys = __webpack_require__(727); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /* 370 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /* 371 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cancelAnimationTimeout; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return requestAnimationTimeout; }); /* unused harmony export bpfrpt_proptype_AnimationTimeoutId */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_promise__ = __webpack_require__(2728); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_promise__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__animationFrame__ = __webpack_require__(2740); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); var bpfrpt_proptype_AnimationTimeoutId = process.env.NODE_ENV === 'production' ? null : { id: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number.isRequired }; var cancelAnimationTimeout = function cancelAnimationTimeout(frame) { return Object(__WEBPACK_IMPORTED_MODULE_1__animationFrame__["a" /* caf */])(frame.id); }; /** * Recursively calls requestAnimationFrame until a specified delay has been met or exceeded. * When the delay time has been reached the function you're timing out will be called. * * Credit: Joe Lambert (https://gist.github.com/joelambert/1002116#file-requesttimeout-js) */ var requestAnimationTimeout = function requestAnimationTimeout(callback, delay) { var start = void 0; // wait for end of processing current event handler, because event handler may be long __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_promise___default.a.resolve().then(function () { start = Date.now(); }); var timeout = function timeout() { if (Date.now() - start >= delay) { callback.call(); } else { frame.id = Object(__WEBPACK_IMPORTED_MODULE_1__animationFrame__["b" /* raf */])(timeout); } }; var frame = { id: Object(__WEBPACK_IMPORTED_MODULE_1__animationFrame__["b" /* raf */])(timeout) }; return frame; }; /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 372 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export bpfrpt_proptype_CellDataGetterParams */ /* unused harmony export bpfrpt_proptype_CellRendererParams */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return bpfrpt_proptype_HeaderRowRendererParams; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bpfrpt_proptype_HeaderRendererParams; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return bpfrpt_proptype_RowRendererParams; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); var bpfrpt_proptype_CellDataGetterParams = process.env.NODE_ENV === 'production' ? null : { columnData: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any, dataKey: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, rowData: function rowData(props, propName, componentName) { if (!Object.prototype.hasOwnProperty.call(props, propName)) { throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value."); } } }; var bpfrpt_proptype_CellRendererParams = process.env.NODE_ENV === 'production' ? null : { cellData: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any, columnData: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any, dataKey: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, rowData: function rowData(props, propName, componentName) { if (!Object.prototype.hasOwnProperty.call(props, propName)) { throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value."); } }, rowIndex: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired }; var bpfrpt_proptype_HeaderRowRendererParams = process.env.NODE_ENV === 'production' ? null : { className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, columns: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(function (props, propName, componentName) { if (!Object.prototype.hasOwnProperty.call(props, propName)) { throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value."); } }).isRequired, style: function style(props, propName, componentName) { if (!Object.prototype.hasOwnProperty.call(props, propName)) { throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value."); } } }; var bpfrpt_proptype_HeaderRendererParams = process.env.NODE_ENV === 'production' ? null : { columnData: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any, dataKey: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, disableSort: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool, label: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any, sortBy: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, sortDirection: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string }; var bpfrpt_proptype_RowRendererParams = process.env.NODE_ENV === 'production' ? null : { className: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired, columns: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(function (props, propName, componentName) { if (!Object.prototype.hasOwnProperty.call(props, propName)) { throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value."); } }).isRequired, index: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired, isScrolling: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired, onRowClick: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func, onRowDoubleClick: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func, onRowMouseOver: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func, onRowMouseOut: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func, rowData: function rowData(props, propName, componentName) { if (!Object.prototype.hasOwnProperty.call(props, propName)) { throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value."); } }, style: function style(props, propName, componentName) { if (!Object.prototype.hasOwnProperty.call(props, propName)) { throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value."); } } }; /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 373 */ /***/ (function(module, exports, __webpack_require__) { var getISOYear = __webpack_require__(239) var startOfISOWeek = __webpack_require__(238) /** * @category ISO Week-Numbering Year Helpers * @summary Return the start of an ISO week-numbering year for the given date. * * @description * Return the start of an ISO week-numbering year, * which always starts 3 days before the year's first Thursday. * The result will be in the local timezone. * * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date * * @param {Date|String|Number} date - the original date * @returns {Date} the start of an ISO year * * @example * // The start of an ISO week-numbering year for 2 July 2005: * var result = startOfISOYear(new Date(2005, 6, 2)) * //=> Mon Jan 03 2005 00:00:00 */ function startOfISOYear (dirtyDate) { var year = getISOYear(dirtyDate) var fourthOfJanuary = new Date(0) fourthOfJanuary.setFullYear(year, 0, 4) fourthOfJanuary.setHours(0, 0, 0, 0) var date = startOfISOWeek(fourthOfJanuary) return date } module.exports = startOfISOYear /***/ }), /* 374 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Day Helpers * @summary Get the day of the month of the given date. * * @description * Get the day of the month of the given date. * * @param {Date|String|Number} date - the given date * @returns {Number} the day of month * * @example * // Which day of the month is 29 February 2012? * var result = getDate(new Date(2012, 1, 29)) * //=> 29 */ function getDate (dirtyDate) { var date = parse(dirtyDate) var dayOfMonth = date.getDate() return dayOfMonth } module.exports = getDate /***/ }), /* 375 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Month Helpers * @summary Get the month of the given date. * * @description * Get the month of the given date. * * @param {Date|String|Number} date - the given date * @returns {Number} the month * * @example * // Which month is 29 February 2012? * var result = getMonth(new Date(2012, 1, 29)) * //=> 1 */ function getMonth (dirtyDate) { var date = parse(dirtyDate) var month = date.getMonth() return month } module.exports = getMonth /***/ }), /* 376 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.buildDistanceInWordsLocale = buildDistanceInWordsLocale; exports["default"] = getLocale; var _translate = __webpack_require__(15); var _formatters = _interopRequireDefault(__webpack_require__(2826)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function buildDistanceInWordsLocale(t) { function localize(token, count) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var distanceInWordsLocale = { lessThanXSeconds: t('DATE_FNS_LESS_THAN_SECOND', { defaultValue: 'less than {{count}} second', count: count }), xSeconds: t('DATE_FNS_SECOND', { defaultValue: '{{count}} second', count: count }), halfAMinute: t('DATE_FNS_HALF_A_MINUTE', { defaultValue: 'half a minute' }), lessThanXMinutes: t('DATE_FNS_LESS_THAN_MINUTE', { defaultValue: 'less than {{count}} minute', count: count }), xMinutes: t('DATE_FNS_ABOUT_MINUTE', { defaultValue: '{{count}} minute', count: count }), aboutXHours: t('DATE_FNS_ABOUT_HOUR', { defaultValue: 'about {{count}} hour', count: count }), xHours: t('DATE_FNS_HOUR', { defaultValue: '{{count}} hour', count: count }), xDays: t('DATE_FNS_DAY', { defaultValue: '{{count}} day', count: count }), aboutXMonths: t('DATE_FNS_ABOUT_MONTH', { defaultValue: 'about {{count}} month', count: count }), xMonths: t('DATE_FNS_MONTH', { defaultValue: '{{count}} month', count: count }), aboutXYears: t('DATE_FNS_ABOUT_YEAR', { defaultValue: 'about {{count}} year', count: count }), xYears: t('DATE_FNS_YEAR', { defaultValue: '{{count}} year', count: count }), overXYears: t('DATE_FNS_OVER_YEAR', { defaultValue: 'over {{count}} year', count: count }), almostXYears: t('DATE_FNS_ALMOST_YEAR', { defaultValue: 'almost {{count}} year', count: count }) }; var result = distanceInWordsLocale[token]; if (!options.addSuffix) { return result; } if (options.comparison > 0) { return t('DATE_FNS_IN', { defaultValue: 'in {{value}}', value: result }); } return t('DATE_FNS_AGO', { defaultValue: '{{value}} ago', value: result }); } return { localize: localize }; } var language; var locale; function getLocale(t) { var currentlanguage = (0, _translate.getCurrentLanguage)(); if (language !== currentlanguage) { locale = { distanceInWords: buildDistanceInWordsLocale(t), format: (0, _formatters["default"])(t) }; language = (0, _translate.getCurrentLanguage)(); } return locale; } //# sourceMappingURL=locale.js.map /***/ }), /* 377 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { exports.__esModule = true; exports.noop = undefined; 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; }; exports.bottom = bottom; exports.cloneLayout = cloneLayout; exports.cloneLayoutItem = cloneLayoutItem; exports.childrenEqual = childrenEqual; exports.collides = collides; exports.compact = compact; exports.compactItem = compactItem; exports.correctBounds = correctBounds; exports.getLayoutItem = getLayoutItem; exports.getFirstCollision = getFirstCollision; exports.getAllCollisions = getAllCollisions; exports.getStatics = getStatics; exports.moveElement = moveElement; exports.moveElementAwayFromCollision = moveElementAwayFromCollision; exports.perc = perc; exports.setTransform = setTransform; exports.setTopLeft = setTopLeft; exports.sortLayoutItems = sortLayoutItems; exports.sortLayoutItemsByRowCol = sortLayoutItemsByRowCol; exports.sortLayoutItemsByColRow = sortLayoutItemsByColRow; exports.synchronizeLayoutWithChildren = synchronizeLayoutWithChildren; exports.validateLayout = validateLayout; exports.autoBindHandlers = autoBindHandlers; var _lodash = __webpack_require__(340); var _lodash2 = _interopRequireDefault(_lodash); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // All callbacks are of the signature (layout, oldItem, newItem, placeholder, e). var isProduction = process.env.NODE_ENV === "production"; var DEBUG = false; /** * Return the bottom coordinate of the layout. * * @param {Array} layout Layout array. * @return {Number} Bottom coordinate. */ function bottom(layout) { var max = 0, bottomY = void 0; for (var _i = 0, len = layout.length; _i < len; _i++) { bottomY = layout[_i].y + layout[_i].h; if (bottomY > max) max = bottomY; } return max; } function cloneLayout(layout) { var newLayout = Array(layout.length); for (var _i2 = 0, len = layout.length; _i2 < len; _i2++) { newLayout[_i2] = cloneLayoutItem(layout[_i2]); } return newLayout; } // Fast path to cloning, since this is monomorphic function cloneLayoutItem(layoutItem) { return { w: layoutItem.w, h: layoutItem.h, x: layoutItem.x, y: layoutItem.y, i: layoutItem.i, minW: layoutItem.minW, maxW: layoutItem.maxW, minH: layoutItem.minH, maxH: layoutItem.maxH, moved: Boolean(layoutItem.moved), static: Boolean(layoutItem.static), // These can be null isDraggable: layoutItem.isDraggable, isResizable: layoutItem.isResizable }; } /** * Comparing React `children` is a bit difficult. This is a good way to compare them. * This will catch differences in keys, order, and length. */ function childrenEqual(a, b) { return (0, _lodash2.default)(_react2.default.Children.map(a, function (c) { return c.key; }), _react2.default.Children.map(b, function (c) { return c.key; })); } /** * Given two layoutitems, check if they collide. */ function collides(l1, l2) { if (l1 === l2) return false; // same element if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2 if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2 if (l1.y + l1.h <= l2.y) return false; // l1 is above l2 if (l1.y >= l2.y + l2.h) return false; // l1 is below l2 return true; // boxes overlap } /** * Given a layout, compact it. This involves going down each y coordinate and removing gaps * between items. * * @param {Array} layout Layout. * @param {Boolean} verticalCompact Whether or not to compact the layout * vertically. * @return {Array} Compacted Layout. */ function compact(layout, compactType, cols) { // Statics go in the compareWith array right away so items flow around them. var compareWith = getStatics(layout); // We go through the items by row and column. var sorted = sortLayoutItems(layout, compactType); // Holding for new items. var out = Array(layout.length); for (var _i3 = 0, len = sorted.length; _i3 < len; _i3++) { var l = cloneLayoutItem(sorted[_i3]); // Don't move static elements if (!l.static) { l = compactItem(compareWith, l, compactType, cols, sorted); // Add to comparison array. We only collide with items before this one. // Statics are already in this array. compareWith.push(l); } // Add to output array to make sure they still come out in the right order. out[layout.indexOf(sorted[_i3])] = l; // Clear moved flag, if it exists. l.moved = false; } return out; } var heightWidth = { x: "w", y: "h" }; /** * Before moving item down, it will check if the movement will cause collisions and move those items down before. */ function resolveCompactionCollision(layout, item, moveToCoord, axis) { var sizeProp = heightWidth[axis]; item[axis] += 1; var itemIndex = layout.indexOf(item); // Go through each item we collide with. for (var _i4 = itemIndex + 1; _i4 < layout.length; _i4++) { var otherItem = layout[_i4]; // Ignore static items if (otherItem.static) continue; // Optimization: we can break early if we know we're past this el // We can do this b/c it's a sorted layout if (otherItem.y > item.y + item.h) break; if (collides(item, otherItem)) { resolveCompactionCollision(layout, otherItem, moveToCoord + item[sizeProp], axis); } } item[axis] = moveToCoord; } /** * Compact an item in the layout. */ function compactItem(compareWith, l, compactType, cols, fullLayout) { var compactV = compactType === "vertical"; var compactH = compactType === "horizontal"; if (compactV) { // Bottom 'y' possible is the bottom of the layout. // This allows you to do nice stuff like specify {y: Infinity} // This is here because the layout must be sorted in order to get the correct bottom `y`. l.y = Math.min(bottom(compareWith), l.y); // Move the element up as far as it can go without colliding. while (l.y > 0 && !getFirstCollision(compareWith, l)) { l.y--; } } else if (compactH) { l.y = Math.min(bottom(compareWith), l.y); // Move the element left as far as it can go without colliding. while (l.x > 0 && !getFirstCollision(compareWith, l)) { l.x--; } } // Move it down, and keep moving it down if it's colliding. var collides = void 0; while (collides = getFirstCollision(compareWith, l)) { if (compactH) { resolveCompactionCollision(fullLayout, l, collides.x + collides.w, "x"); } else { resolveCompactionCollision(fullLayout, l, collides.y + collides.h, "y"); } // Since we can't grow without bounds horizontally, if we've overflown, let's move it down and try again. if (compactH && l.x + l.w > cols) { l.x = cols - l.w; l.y++; } } return l; } /** * Given a layout, make sure all elements fit within its bounds. * * @param {Array} layout Layout array. * @param {Number} bounds Number of columns. */ function correctBounds(layout, bounds) { var collidesWith = getStatics(layout); for (var _i5 = 0, len = layout.length; _i5 < len; _i5++) { var l = layout[_i5]; // Overflows right if (l.x + l.w > bounds.cols) l.x = bounds.cols - l.w; // Overflows left if (l.x < 0) { l.x = 0; l.w = bounds.cols; } if (!l.static) collidesWith.push(l);else { // If this is static and collides with other statics, we must move it down. // We have to do something nicer than just letting them overlap. while (getFirstCollision(collidesWith, l)) { l.y++; } } } return layout; } /** * Get a layout item by ID. Used so we can override later on if necessary. * * @param {Array} layout Layout array. * @param {String} id ID * @return {LayoutItem} Item at ID. */ function getLayoutItem(layout, id) { for (var _i6 = 0, len = layout.length; _i6 < len; _i6++) { if (layout[_i6].i === id) return layout[_i6]; } } /** * Returns the first item this layout collides with. * It doesn't appear to matter which order we approach this from, although * perhaps that is the wrong thing to do. * * @param {Object} layoutItem Layout item. * @return {Object|undefined} A colliding layout item, or undefined. */ function getFirstCollision(layout, layoutItem) { for (var _i7 = 0, len = layout.length; _i7 < len; _i7++) { if (collides(layout[_i7], layoutItem)) return layout[_i7]; } } function getAllCollisions(layout, layoutItem) { return layout.filter(function (l) { return collides(l, layoutItem); }); } /** * Get all static elements. * @param {Array} layout Array of layout objects. * @return {Array} Array of static layout items.. */ function getStatics(layout) { return layout.filter(function (l) { return l.static; }); } /** * Move an element. Responsible for doing cascading movements of other elements. * * @param {Array} layout Full layout to modify. * @param {LayoutItem} l element to move. * @param {Number} [x] X position in grid units. * @param {Number} [y] Y position in grid units. */ function moveElement(layout, l, x, y, isUserAction, preventCollision, compactType, cols) { if (l.static) return layout; // Short-circuit if nothing to do. if (l.y === y && l.x === x) return layout; log("Moving element " + l.i + " to [" + String(x) + "," + String(y) + "] from [" + l.x + "," + l.y + "]"); var oldX = l.x; var oldY = l.y; // This is quite a bit faster than extending the object if (typeof x === 'number') l.x = x; if (typeof y === 'number') l.y = y; l.moved = true; // If this collides with anything, move it. // When doing this comparison, we have to sort the items we compare with // to ensure, in the case of multiple collisions, that we're getting the // nearest collision. var sorted = sortLayoutItems(layout, compactType); var movingUp = compactType === "vertical" && typeof y === 'number' ? oldY >= y : compactType === "horizontal" && typeof x === 'number' ? oldX >= x : false; if (movingUp) sorted = sorted.reverse(); var collisions = getAllCollisions(sorted, l); // There was a collision; abort if (preventCollision && collisions.length) { log("Collision prevented on " + l.i + ", reverting."); l.x = oldX; l.y = oldY; l.moved = false; return layout; } // Move each item that collides away from this element. for (var _i8 = 0, len = collisions.length; _i8 < len; _i8++) { var collision = collisions[_i8]; log("Resolving collision between " + l.i + " at [" + l.x + "," + l.y + "] and " + collision.i + " at [" + collision.x + "," + collision.y + "]"); // Short circuit so we can't infinite loop if (collision.moved) continue; // Don't move static items - we have to move *this* element away if (collision.static) { layout = moveElementAwayFromCollision(layout, collision, l, isUserAction, compactType, cols); } else { layout = moveElementAwayFromCollision(layout, l, collision, isUserAction, compactType, cols); } } return layout; } /** * This is where the magic needs to happen - given a collision, move an element away from the collision. * We attempt to move it up if there's room, otherwise it goes below. * * @param {Array} layout Full layout to modify. * @param {LayoutItem} collidesWith Layout item we're colliding with. * @param {LayoutItem} itemToMove Layout item we're moving. */ function moveElementAwayFromCollision(layout, collidesWith, itemToMove, isUserAction, compactType, cols) { var compactH = compactType === "horizontal"; var compactV = compactType === "vertical"; var preventCollision = false; // we're already colliding // If there is enough space above the collision to put this element, move it there. // We only do this on the main collision as this can get funky in cascades and cause // unwanted swapping behavior. if (isUserAction) { // Reset isUserAction flag because we're not in the main collision anymore. isUserAction = false; // Make a mock item so we don't modify the item here, only modify in moveElement. var fakeItem = { x: compactH ? Math.max(collidesWith.x - itemToMove.w, 0) : itemToMove.x, y: compactV ? Math.max(collidesWith.y - itemToMove.h, 0) : itemToMove.y, w: itemToMove.w, h: itemToMove.h, i: "-1" }; // No collision? If so, we can go up there; otherwise, we'll end up moving down as normal if (!getFirstCollision(layout, fakeItem)) { log("Doing reverse collision on " + itemToMove.i + " up to [" + fakeItem.x + "," + fakeItem.y + "]."); return moveElement(layout, itemToMove, compactH ? fakeItem.x : undefined, compactV ? fakeItem.y : undefined, isUserAction, preventCollision, compactType, cols); } } return moveElement(layout, itemToMove, compactH ? itemToMove.x + 1 : undefined, compactV ? itemToMove.y + 1 : undefined, isUserAction, preventCollision, compactType, cols); } /** * Helper to convert a number to a percentage string. * * @param {Number} num Any number * @return {String} That number as a percentage. */ function perc(num) { return num * 100 + "%"; } function setTransform(_ref) { var top = _ref.top, left = _ref.left, width = _ref.width, height = _ref.height; // Replace unitless items with px var translate = "translate(" + left + "px," + top + "px)"; return { transform: translate, WebkitTransform: translate, MozTransform: translate, msTransform: translate, OTransform: translate, width: width + "px", height: height + "px", position: "absolute" }; } function setTopLeft(_ref2) { var top = _ref2.top, left = _ref2.left, width = _ref2.width, height = _ref2.height; return { top: top + "px", left: left + "px", width: width + "px", height: height + "px", position: "absolute" }; } /** * Get layout items sorted from top left to right and down. * * @return {Array} Array of layout objects. * @return {Array} Layout, sorted static items first. */ function sortLayoutItems(layout, compactType) { if (compactType === "horizontal") return sortLayoutItemsByColRow(layout);else return sortLayoutItemsByRowCol(layout); } function sortLayoutItemsByRowCol(layout) { return [].concat(layout).sort(function (a, b) { if (a.y > b.y || a.y === b.y && a.x > b.x) { return 1; } else if (a.y === b.y && a.x === b.x) { // Without this, we can get different sort results in IE vs. Chrome/FF return 0; } return -1; }); } function sortLayoutItemsByColRow(layout) { return [].concat(layout).sort(function (a, b) { if (a.x > b.x || a.x === b.x && a.y > b.y) { return 1; } return -1; }); } /** * Generate a layout using the initialLayout and children as a template. * Missing entries will be added, extraneous ones will be truncated. * * @param {Array} initialLayout Layout passed in through props. * @param {String} breakpoint Current responsive breakpoint. * @param {?String} compact Compaction option. * @return {Array} Working layout. */ function synchronizeLayoutWithChildren(initialLayout, children, cols, compactType) { initialLayout = initialLayout || []; // Generate one layout item per child. var layout = []; _react2.default.Children.forEach(children, function (child, i) { // Don't overwrite if it already exists. var exists = getLayoutItem(initialLayout, String(child.key)); if (exists) { layout[i] = cloneLayoutItem(exists); } else { if (!isProduction && child.props._grid) { console.warn("`_grid` properties on children have been deprecated as of React 15.2. " + // eslint-disable-line "Please use `data-grid` or add your properties directly to the `layout`."); } var g = child.props["data-grid"] || child.props._grid; // Hey, this item has a data-grid property, use it. if (g) { if (!isProduction) { validateLayout([g], "ReactGridLayout.children"); } layout[i] = cloneLayoutItem(_extends({}, g, { i: child.key })); } else { // Nothing provided: ensure this is added to the bottom layout[i] = cloneLayoutItem({ w: 1, h: 1, x: 0, y: bottom(layout), i: String(child.key) }); } } }); // Correct the layout. layout = correctBounds(layout, { cols: cols }); layout = compact(layout, compactType, cols); return layout; } /** * Validate a layout. Throws errors. * * @param {Array} layout Array of layout items. * @param {String} [contextName] Context name for errors. * @throw {Error} Validation error. */ function validateLayout(layout) { var contextName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Layout"; var subProps = ["x", "y", "w", "h"]; if (!Array.isArray(layout)) throw new Error(contextName + " must be an array!"); for (var _i9 = 0, len = layout.length; _i9 < len; _i9++) { var item = layout[_i9]; for (var j = 0; j < subProps.length; j++) { if (typeof item[subProps[j]] !== "number") { throw new Error("ReactGridLayout: " + contextName + "[" + _i9 + "]." + subProps[j] + " must be a number!"); } } if (item.i && typeof item.i !== "string") { throw new Error("ReactGridLayout: " + contextName + "[" + _i9 + "].i must be a string!"); } if (item.static !== undefined && typeof item.static !== "boolean") { throw new Error("ReactGridLayout: " + contextName + "[" + _i9 + "].static must be a boolean!"); } } } // Flow can't really figure this out, so we just use Object function autoBindHandlers(el, fns) { fns.forEach(function (key) { return el[key] = el[key].bind(el); }); } function log() { var _console; if (!DEBUG) return; // eslint-disable-next-line no-console (_console = console).log.apply(_console, arguments); } var noop = exports.noop = function noop() {}; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 378 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _RichLayout = _interopRequireDefault(__webpack_require__(3161)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _RichLayout["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 379 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Common Helpers * @summary Compare the two dates and return -1, 0 or 1. * * @description * Compare the two dates and return 1 if the first date is after the second, * -1 if the first date is before the second or 0 if dates are equal. * * @param {Date|String|Number} dateLeft - the first date to compare * @param {Date|String|Number} dateRight - the second date to compare * @returns {Number} the result of the comparison * * @example * // Compare 11 February 1987 and 10 July 1989: * var result = compareAsc( * new Date(1987, 1, 11), * new Date(1989, 6, 10) * ) * //=> -1 * * @example * // Sort the array of dates: * var result = [ * new Date(1995, 6, 2), * new Date(1987, 1, 11), * new Date(1989, 6, 10) * ].sort(compareAsc) * //=> [ * // Wed Feb 11 1987 00:00:00, * // Mon Jul 10 1989 00:00:00, * // Sun Jul 02 1995 00:00:00 * // ] */ function compareAsc (dirtyDateLeft, dirtyDateRight) { var dateLeft = parse(dirtyDateLeft) var timeLeft = dateLeft.getTime() var dateRight = parse(dirtyDateRight) var timeRight = dateRight.getTime() if (timeLeft < timeRight) { return -1 } else if (timeLeft > timeRight) { return 1 } else { return 0 } } module.exports = compareAsc /***/ }), /* 380 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__path_js__ = __webpack_require__(3408); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__path_js__["a"]; }); /***/ }), /* 381 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return abs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return atan2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return cos; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return max; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return min; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return sin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return sqrt; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return epsilon; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return pi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return halfPi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return tau; }); /* harmony export (immutable) */ __webpack_exports__["b"] = acos; /* harmony export (immutable) */ __webpack_exports__["c"] = asin; var abs = Math.abs; var atan2 = Math.atan2; var cos = Math.cos; var max = Math.max; var min = Math.min; var sin = Math.sin; var sqrt = Math.sqrt; var epsilon = 1e-12; var pi = Math.PI; var halfPi = pi / 2; var tau = 2 * pi; function acos(x) { return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); } function asin(x) { return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x); } /***/ }), /* 382 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony default export */ __webpack_exports__["a"] = (function(series, order) { if (!((n = series.length) > 1)) return; for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) { s0 = s1, s1 = series[order[i]]; for (j = 0; j < m; ++j) { s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1]; } } }); /***/ }), /* 383 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony default export */ __webpack_exports__["a"] = (function(series) { var n = series.length, o = new Array(n); while (--n >= 0) o[n] = n; return o; }); /***/ }), /* 384 */ /***/ (function(module, exports) { var core = module.exports = { version: '2.6.11' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /* 385 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__ = __webpack_require__(22); function _extends() { _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; }; return _extends.apply(this, arguments); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /** * @fileOverview Surface */ var propTypes = { width: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired, height: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired, viewBox: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({ x: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, y: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, width: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, height: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number }), className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, style: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node), __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node]) }; function Surface(props) { var children = props.children, width = props.width, height = props.height, viewBox = props.viewBox, className = props.className, style = props.style, others = _objectWithoutProperties(props, ["children", "width", "height", "viewBox", "className", "style"]); var svgView = viewBox || { width: width, height: height, x: 0, y: 0 }; var layerClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('recharts-surface', className); var attrs = Object(__WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__["l" /* getPresentationAttributes */])(others); return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("svg", _extends({}, attrs, { className: layerClass, width: width, height: height, style: style, viewBox: "".concat(svgView.x, " ").concat(svgView.y, " ").concat(svgView.width, " ").concat(svgView.height), version: "1.1" }), children); } Surface.propTypes = propTypes; /* harmony default export */ __webpack_exports__["a"] = (Surface); /***/ }), /* 386 */ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(304); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /* 387 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony default export */ __webpack_exports__["a"] = (function(x) { return x === null ? NaN : +x; }); /***/ }), /* 388 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__container_Layer__ = __webpack_require__(60); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__ = __webpack_require__(22); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Render a group of error bar */ var ErrorBar = /*#__PURE__*/ function (_Component) { _inherits(ErrorBar, _Component); function ErrorBar() { _classCallCheck(this, ErrorBar); return _possibleConstructorReturn(this, _getPrototypeOf(ErrorBar).apply(this, arguments)); } _createClass(ErrorBar, [{ key: "renderErrorBars", value: function renderErrorBars() { var _this$props = this.props, offset = _this$props.offset, layout = _this$props.layout, width = _this$props.width, dataKey = _this$props.dataKey, data = _this$props.data, dataPointFormatter = _this$props.dataPointFormatter, xAxis = _this$props.xAxis, yAxis = _this$props.yAxis, others = _objectWithoutProperties(_this$props, ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"]); var props = Object(__WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__["l" /* getPresentationAttributes */])(others); return data.map(function (entry, i) { var _dataPointFormatter = dataPointFormatter(entry, dataKey), x = _dataPointFormatter.x, y = _dataPointFormatter.y, value = _dataPointFormatter.value, errorVal = _dataPointFormatter.errorVal; if (!errorVal) { return null; } var xMid, yMid, xMin, yMin, xMax, yMax, scale, coordsTop, coordsMid, coordsBot, lowBound, highBound; if (Array.isArray(errorVal)) { var _errorVal = _slicedToArray(errorVal, 2); lowBound = _errorVal[0]; highBound = _errorVal[1]; } else { lowBound = highBound = errorVal; } if (layout === 'vertical') { scale = xAxis.scale; xMid = value; yMid = y + offset; xMin = scale(xMid - lowBound); yMin = yMid + width; xMax = scale(xMid + highBound); yMax = yMid - width; coordsTop = { x1: xMax, y1: yMin, x2: xMax, y2: yMax }; coordsMid = { x1: xMin, y1: yMid, x2: xMax, y2: yMid }; coordsBot = { x1: xMin, y1: yMin, x2: xMin, y2: yMax }; } else if (layout === 'horizontal') { scale = yAxis.scale; xMid = x + offset; yMid = value; xMin = xMid - width; xMax = xMid + width; yMin = scale(yMid - lowBound); yMax = scale(yMid + highBound); coordsTop = { x1: xMin, y1: yMax, x2: xMax, y2: yMax }; coordsMid = { x1: xMid, y1: yMin, x2: xMid, y2: yMax }; coordsBot = { x1: xMin, y1: yMin, x2: xMax, y2: yMin }; } return (// eslint-disable-next-line react/no-array-index-key __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__container_Layer__["a" /* default */], _extends({ className: "recharts-errorBar", key: "bar-".concat(i) }, props), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("line", coordsTop), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("line", coordsMid), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("line", coordsBot)) ); }); } }, { key: "render", value: function render() { return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__container_Layer__["a" /* default */], { className: "recharts-errorBars" }, this.renderErrorBars()); } }]); return ErrorBar; }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); ErrorBar.propTypes = { dataKey: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func]).isRequired, data: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array, xAxis: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, yAxis: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, layout: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, dataPointFormatter: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, stroke: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, strokeWidth: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, width: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, offset: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number }; ErrorBar.defaultProps = { stroke: 'black', strokeWidth: 1.5, width: 5, offset: 0, layout: 'horizontal' }; /* harmony default export */ __webpack_exports__["a"] = (ErrorBar); /***/ }), /* 389 */ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(1490), baseAssignValue = __webpack_require__(854); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /* 390 */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 391 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(390); module.exports = function (it) { if (!isObject(it)) { throw TypeError(String(it) + ' is not an object'); } return it; }; /***/ }), /* 392 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(531); var min = Math.min; // `ToLength` abstract operation // https://tc39.github.io/ecma262/#sec-tolength module.exports = function (argument) { return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; /***/ }), /* 393 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(152); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /* 394 */ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 395 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values__ = __webpack_require__(88); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__ = __webpack_require__(79); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__SafeAnchor__ = __webpack_require__(132); var propTypes = { active: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, disabled: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, block: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, componentClass: __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default.a, href: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, /** * Defines HTML button type attribute * @defaultValue 'button' */ type: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['button', 'reset', 'submit']) }; var defaultProps = { active: false, block: false, disabled: false }; var Button = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Button, _React$Component); function Button() { return _React$Component.apply(this, arguments) || this; } var _proto = Button.prototype; _proto.renderAnchor = function renderAnchor(elementProps, className) { return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__SafeAnchor__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, elementProps.disabled && 'disabled') })); }; _proto.renderButton = function renderButton(_ref, className) { var componentClass = _ref.componentClass, elementProps = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref, ["componentClass"]); var Component = componentClass || 'button'; return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { type: elementProps.type || 'button', className: className })); }; _proto.render = function render() { var _extends2; var _this$props = this.props, active = _this$props.active, block = _this$props.block, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["active", "block", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["getClassSet"])(bsProps), (_extends2 = { active: active }, _extends2[Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(bsProps, 'block')] = block, _extends2)); var fullClassName = __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, classes); if (elementProps.href) { return this.renderAnchor(elementProps, fullClassName); } return this.renderButton(elementProps, fullClassName); }; return Button; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); Button.propTypes = propTypes; Button.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["bsClass"])('btn', Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["bsSizes"])([__WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["c" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["c" /* Size */].SMALL, __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["c" /* Size */].XSMALL], Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["bsStyles"])(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values___default()(__WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["d" /* State */]).concat([__WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["e" /* Style */].DEFAULT, __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["e" /* Style */].PRIMARY, __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["e" /* Style */].LINK]), __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["e" /* Style */].DEFAULT, Button)))); /***/ }), /* 396 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = callTrigger; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * Trigger call management. It will * - execute all triggers corresponding to the provided events names. * - manage loading state through callback * @param event The user event * @param eventNames The trigger events to execute * @param triggersDefinitions List of definition for each supported event * @param onTrigger Trigger execution function * @param onLoading Callback to manage loading state * @param onResponse Callback in case of trigger success * @param onError Callback in case of * @returns {Promise} The process promise */ function callTrigger(event, _ref) { var _ref$eventNames = _ref.eventNames, eventNames = _ref$eventNames === void 0 ? [] : _ref$eventNames, _ref$triggersDefiniti = _ref.triggersDefinitions, triggersDefinitions = _ref$triggersDefiniti === void 0 ? [] : _ref$triggersDefiniti, onTrigger = _ref.onTrigger, onLoading = _ref.onLoading, onResponse = _ref.onResponse, _ref$onError = _ref.onError, onError = _ref$onError === void 0 ? function () {} : _ref$onError; var triggers = triggersDefinitions.filter(function (t) { return eventNames.indexOf(t.onEvent) > -1; }); if (!triggers || !triggers.length) { return Promise.resolve(); } onLoading(true); return Promise.all(triggers.map(function (trig) { return onTrigger(event, trig); })).then(function (data) { var newState = data.reduce(function (state, nextData) { return _objectSpread(_objectSpread({}, state), nextData); }, {}); onResponse(newState); onLoading(false); }, function (error) { onError(error); onLoading(false); }); } //# sourceMappingURL=index.js.map /***/ }), /* 397 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getError = getError; exports.removeError = removeError; exports.addError = addError; var _omit = _interopRequireDefault(__webpack_require__(547)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getError(errors, schema) { return errors[schema.key]; } function removeError(errors, schema) { return (0, _omit["default"])(errors, schema.key.toString()); } function addError(errors, schema, valueError) { return _objectSpread(_objectSpread({}, errors), {}, _defineProperty({}, schema.key, valueError)); } //# sourceMappingURL=errors.js.map /***/ }), /* 398 */ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(1606), baseAssignValue = __webpack_require__(1607); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /* 399 */ /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /* 400 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(1654), baseKeysIn = __webpack_require__(4260), isArrayLike = __webpack_require__(558); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; /***/ }), /* 401 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(109); var toLength = __webpack_require__(50); var toAbsoluteIndex = __webpack_require__(213); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }), /* 402 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /* 403 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(119); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; /***/ }), /* 404 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(120); var defined = __webpack_require__(134); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)); var i = toInteger(pos); var l = s.length; var a, b; if (i < 0 || i >= l) return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }), /* 405 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.8 IsRegExp(argument) var isObject = __webpack_require__(35); var cof = __webpack_require__(119); var MATCH = __webpack_require__(49)('match'); module.exports = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; /***/ }), /* 406 */ /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(49)('iterator'); var SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function () { SAFE_CLOSING = true; }; // eslint-disable-next-line no-throw-literal Array.from(riter, function () { throw 2; }); } catch (e) { /* empty */ } module.exports = function (exec, skipClosing) { if (!skipClosing && !SAFE_CLOSING) return false; var safe = false; try { var arr = [7]; var iter = arr[ITERATOR](); iter.next = function () { return { done: safe = true }; }; arr[ITERATOR] = function () { return iter; }; exec(arr); } catch (e) { /* empty */ } return safe; }; /***/ }), /* 407 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var classof = __webpack_require__(260); var builtinExec = RegExp.prototype.exec; // `RegExpExec` abstract operation // https://tc39.github.io/ecma262/#sec-regexpexec module.exports = function (R, S) { var exec = R.exec; if (typeof exec === 'function') { var result = exec.call(R, S); if (typeof result !== 'object') { throw new TypeError('RegExp exec method returned something other than an Object or null'); } return result; } if (classof(R) !== 'RegExp') { throw new TypeError('RegExp#exec called on incompatible receiver'); } return builtinExec.call(R, S); }; /***/ }), /* 408 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(947); var redefine = __webpack_require__(98); var hide = __webpack_require__(97); var fails = __webpack_require__(33); var defined = __webpack_require__(134); var wks = __webpack_require__(49); var regexpExec = __webpack_require__(581); var SPECIES = wks('species'); var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { // #replace needs built-in support for named groups. // #match works fine because it just return the exec results, even if it has // a "grops" property. var re = /./; re.exec = function () { var result = []; result.groups = { a: '7' }; return result; }; return ''.replace(re, '$') !== '7'; }); var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec var re = /(?:)/; var originalExec = re.exec; re.exec = function () { return originalExec.apply(this, arguments); }; var result = 'ab'.split(re); return result.length === 2 && result[0] === 'a' && result[1] === 'b'; })(); module.exports = function (KEY, length, exec) { var SYMBOL = wks(KEY); var DELEGATES_TO_SYMBOL = !fails(function () { // String methods call symbol-named RegEp methods var O = {}; O[SYMBOL] = function () { return 7; }; return ''[KEY](O) != 7; }); var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { // Symbol-named RegExp methods call .exec var execCalled = false; var re = /a/; re.exec = function () { execCalled = true; return null; }; if (KEY === 'split') { // RegExp[@@split] doesn't call the regex's exec method, but first creates // a new one. We need to return the patched regex when creating the new one. re.constructor = {}; re.constructor[SPECIES] = function () { return re; }; } re[SYMBOL](''); return !execCalled; }) : undefined; if ( !DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) ) { var nativeRegExpMethod = /./[SYMBOL]; var fns = exec( defined, SYMBOL, ''[KEY], function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { if (regexp.exec === regexpExec) { if (DELEGATES_TO_SYMBOL && !forceStringMethod) { // The native String method already delegates to @@method (this // polyfilled function), leasing to infinite recursion. // We avoid it by directly calling the native @@method method. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; } return { done: true, value: nativeMethod.call(str, regexp, arg2) }; } return { done: false }; } ); var strfn = fns[0]; var rxfn = fns[1]; redefine(String.prototype, KEY, strfn); hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) ? function (string, arg) { return rxfn.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) : function (string) { return rxfn.call(string, this); } ); } }; /***/ }), /* 409 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(28); var navigator = global.navigator; module.exports = navigator && navigator.userAgent || ''; /***/ }), /* 410 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var global = __webpack_require__(28); var $export = __webpack_require__(8); var redefine = __webpack_require__(98); var redefineAll = __webpack_require__(219); var meta = __webpack_require__(177); var forOf = __webpack_require__(218); var anInstance = __webpack_require__(217); var isObject = __webpack_require__(35); var fails = __webpack_require__(33); var $iterDetect = __webpack_require__(406); var setToStringTag = __webpack_require__(259); var inheritIfRequired = __webpack_require__(567); module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { var Base = global[NAME]; var C = Base; var ADDER = IS_MAP ? 'set' : 'add'; var proto = C && C.prototype; var O = {}; var fixMethod = function (KEY) { var fn = proto[KEY]; redefine(proto, KEY, KEY == 'delete' ? function (a) { return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'has' ? function has(a) { return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'get' ? function get(a) { return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } ); }; if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { new C().entries().next(); }))) { // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); meta.NEED = true; } else { var instance = new C(); // early implementations not supports chaining var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); // most early implementations doesn't supports iterables, most modern - not close it correctly var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new // for early implementations -0 and +0 not the same var BUGGY_ZERO = !IS_WEAK && fails(function () { // V8 ~ Chromium 42- fails only with 5+ elements var $instance = new C(); var index = 5; while (index--) $instance[ADDER](index, index); return !$instance.has(-0); }); if (!ACCEPT_ITERABLES) { C = wrapper(function (target, iterable) { anInstance(target, C, NAME); var that = inheritIfRequired(new Base(), target, C); if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); return that; }); C.prototype = proto; proto.constructor = C; } if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); // weak collections should not contains .clear method if (IS_WEAK && proto.clear) delete proto.clear; } setToStringTag(C, NAME); O[NAME] = C; $export($export.G + $export.W + $export.F * (C != Base), O); if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); return C; }; /***/ }), /* 411 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(28); var hide = __webpack_require__(97); var uid = __webpack_require__(211); var TYPED = uid('typed_array'); var VIEW = uid('view'); var ABV = !!(global.ArrayBuffer && global.DataView); var CONSTR = ABV; var i = 0; var l = 9; var Typed; var TypedArrayConstructors = ( 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' ).split(','); while (i < l) { if (Typed = global[TypedArrayConstructors[i++]]) { hide(Typed.prototype, TYPED, true); hide(Typed.prototype, VIEW, true); } else CONSTR = false; } module.exports = { ABV: ABV, CONSTR: CONSTR, TYPED: TYPED, VIEW: VIEW }; /***/ }), /* 412 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // Forced replacement prototype accessors methods module.exports = __webpack_require__(176) || !__webpack_require__(33)(function () { var K = Math.random(); // In FF throws only define methods // eslint-disable-next-line no-undef, no-useless-call __defineSetter__.call(null, K, function () { /* empty */ }); delete __webpack_require__(28)[K]; }); /***/ }), /* 413 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // https://tc39.github.io/proposal-setmap-offrom/ var $export = __webpack_require__(8); module.exports = function (COLLECTION) { $export($export.S, COLLECTION, { of: function of() { var length = arguments.length; var A = new Array(length); while (length--) A[length] = arguments[length]; return new this(A); } }); }; /***/ }), /* 414 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // https://tc39.github.io/proposal-setmap-offrom/ var $export = __webpack_require__(8); var aFunction = __webpack_require__(80); var ctx = __webpack_require__(118); var forOf = __webpack_require__(218); module.exports = function (COLLECTION) { $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { var mapFn = arguments[1]; var mapping, A, n, cb; aFunction(this); mapping = mapFn !== undefined; if (mapping) aFunction(mapFn); if (source == undefined) return new this(); A = []; if (mapping) { n = 0; cb = ctx(mapFn, arguments[2], 2); forOf(source, false, function (nextItem) { A.push(cb(nextItem, n++)); }); } else { forOf(source, false, A.push, A); } return new this(A); } }); }; /***/ }), /* 415 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(416), isObject = __webpack_require__(112); /** * Creates a function that produces an instance of `Ctor` regardless of * whether it was invoked as part of a `new` expression or by `call` or `apply`. * * @private * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { case 0: return new Ctor; case 1: return new Ctor(args[0]); case 2: return new Ctor(args[0], args[1]); case 3: return new Ctor(args[0], args[1], args[2]); case 4: return new Ctor(args[0], args[1], args[2], args[3]); case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } var thisBinding = baseCreate(Ctor.prototype), result = Ctor.apply(thisBinding, args); // Mimic the constructor's `return` behavior. // See https://es5.github.io/#x13.2.2 for more details. return isObject(result) ? result : thisBinding; }; } module.exports = createCtor; /***/ }), /* 416 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(112); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = baseCreate; /***/ }), /* 417 */ /***/ (function(module, exports) { /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyArray; /***/ }), /* 418 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(264), isObjectLike = __webpack_require__(137); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /* 419 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(266), toKey = __webpack_require__(267); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /* 420 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(222); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /* 421 */ /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(1927), listCacheDelete = __webpack_require__(1928), listCacheGet = __webpack_require__(1929), listCacheHas = __webpack_require__(1930), listCacheSet = __webpack_require__(1931); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /* 422 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(332); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /* 423 */ /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(1933); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /* 424 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = http; exports.DEFAULT_HTTP_HEADERS = void 0; var _constants = __webpack_require__(425); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } var DEFAULT_HTTP_HEADERS = { Accept: 'application/json', 'Content-Type': 'application/json' }; exports.DEFAULT_HTTP_HEADERS = DEFAULT_HTTP_HEADERS; function onError(error) { return { type: _constants.ACTION_TYPE_HTTP_ERRORS, error: error }; } function onRequest(url, config) { return { type: _constants.ACTION_TYPE_HTTP_REQUEST, url: url, config: config }; } function onJSError(error, action) { console.error(error); // eslint-disable-line no-console return { type: _constants.ACTION_TYPE_HTTP_REDUCER_ERROR, error: error, action: action }; } function onResponse(response) { return { type: _constants.ACTION_TYPE_HTTP_RESPONSE, data: response }; } function onActionResponse(action, response, headers) { if (typeof action.onResponse === 'function') { return action.onResponse(response, headers); } return { type: action.onResponse, response: response, headers: headers }; } function onActionError(action, error) { if (typeof action.onError === 'function') { return action.onError(error); } return { type: action.onError, error: error }; } function http(config) { var method = config.method, url = config.url, data = config.data, rest = _objectWithoutProperties(config, ["method", "url", "data"]); return _objectSpread({ type: _constants.HTTP_METHODS[method], body: data, url: url }, rest); } http.get = function get(url, config) { return http(_objectSpread({ method: _constants.HTTP_METHODS.GET, url: url }, config)); }; http.post = function post(url, data, config) { return http(_objectSpread({ method: _constants.HTTP_METHODS.POST, body: data, url: url }, config)); }; http["delete"] = function httpDelete(url, config) { return http(_objectSpread({ method: _constants.HTTP_METHODS.DELETE, url: url }, config)); }; http.patch = function patch(url, data, config) { return http(_objectSpread({ method: _constants.HTTP_METHODS.PATCH, body: data, url: url }, config)); }; http.put = function put(url, data, config) { return http(_objectSpread({ method: _constants.HTTP_METHODS.PUT, url: url, body: data }, config)); }; http.head = function head(url, config) { return http(_objectSpread({ method: _constants.HTTP_METHODS.HEAD, url: url }, config)); }; http.onError = onError; http.onActionError = onActionError; http.onJSError = onJSError; http.onRequest = onRequest; http.onResponse = onResponse; http.onActionResponse = onActionResponse; //# sourceMappingURL=http.js.map /***/ }), /* 425 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.testHTTPCode = exports.isHTTPStatus = exports.HTTP_STATUS = exports.HTTP_METHODS = exports.CONNECT = exports.TRACE = exports.DELETE = exports.PUT = exports.POST = exports.PATCH = exports.HEAD = exports.GET = exports.OPTIONS = exports.ACTION_TYPE_HTTP_REDUCER_ERROR = exports.ACTION_TYPE_HTTP_ERRORS = exports.ACTION_TYPE_HTTP_RESPONSE = exports.ACTION_TYPE_HTTP_REQUEST = void 0; var _find = _interopRequireDefault(__webpack_require__(1939)); var _inRange = _interopRequireDefault(__webpack_require__(1976)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var ACTION_TYPE_HTTP_REQUEST = '@@HTTP/REQUEST'; exports.ACTION_TYPE_HTTP_REQUEST = ACTION_TYPE_HTTP_REQUEST; var ACTION_TYPE_HTTP_RESPONSE = '@@HTTP/RESPONSE'; exports.ACTION_TYPE_HTTP_RESPONSE = ACTION_TYPE_HTTP_RESPONSE; var ACTION_TYPE_HTTP_ERRORS = '@@HTTP/ERRORS'; exports.ACTION_TYPE_HTTP_ERRORS = ACTION_TYPE_HTTP_ERRORS; var ACTION_TYPE_HTTP_REDUCER_ERROR = 'HTTP_REDUCE_ERROR'; // equal for performance reason exports.ACTION_TYPE_HTTP_REDUCER_ERROR = ACTION_TYPE_HTTP_REDUCER_ERROR; var OPTIONS = 'OPTIONS'; exports.OPTIONS = OPTIONS; var GET = 'GET'; exports.GET = GET; var HEAD = 'HEAD'; exports.HEAD = HEAD; var PATCH = 'PATCH'; exports.PATCH = PATCH; var POST = 'POST'; exports.POST = POST; var PUT = 'PUT'; exports.PUT = PUT; var DELETE = 'DELETE'; exports.DELETE = DELETE; var TRACE = 'TRACE'; exports.TRACE = TRACE; var CONNECT = 'CONNECT'; exports.CONNECT = CONNECT; var HTTP_METHODS = { OPTIONS: OPTIONS, GET: GET, HEAD: HEAD, PATCH: PATCH, POST: POST, PUT: PUT, DELETE: DELETE, TRACE: TRACE, CONNECT: CONNECT }; exports.HTTP_METHODS = HTTP_METHODS; var HTTP_STATUS = { ACCEPTED: 202, BAD_GATEWAY: 502, BAD_REQUEST: 400, CONFLICT: 409, CONTINUE: 100, CREATED: 201, EXPECTATION_FAILED: 417, FAILED_DEPENDENCY: 424, FORBIDDEN: 403, GATEWAY_TIMEOUT: 504, GONE: 410, HTTP_VERSION_NOT_SUPPORTED: 505, IM_A_TEAPOT: 418, INSUFFICIENT_SPACE_ON_RESOURCE: 419, INSUFFICIENT_STORAGE: 507, INTERNAL_SERVER_ERROR: 500, LENGTH_REQUIRED: 411, LOCKED: 423, METHOD_FAILURE: 420, METHOD_NOT_ALLOWED: 405, MOVED_PERMANENTLY: 301, MOVED_TEMPORARILY: 302, MULTI_STATUS: 207, MULTIPLE_CHOICES: 300, NETWORK_AUTHENTICATION_REQUIRED: 511, NO_CONTENT: 204, NON_AUTHORITATIVE_INFORMATION: 203, NOT_ACCEPTABLE: 406, NOT_FOUND: 404, NOT_IMPLEMENTED: 501, NOT_MODIFIED: 304, OK: 200, PARTIAL_CONTENT: 206, PAYMENT_REQUIRED: 402, PERMANENT_REDIRECT: 308, PRECONDITION_FAILED: 412, PRECONDITION_REQUIRED: 428, PROCESSING: 102, PROXY_AUTHENTICATION_REQUIRED: 407, REQUEST_HEADER_FIELDS_TOO_LARGE: 431, REQUEST_TIMEOUT: 408, REQUEST_TOO_LONG: 413, REQUEST_URI_TOO_LONG: 414, REQUESTED_RANGE_NOT_SATISFIABLE: 416, RESET_CONTENT: 205, SEE_OTHER: 303, SERVICE_UNAVAILABLE: 503, SWITCHING_PROTOCOLS: 101, TEMPORARY_REDIRECT: 307, TOO_MANY_REQUESTS: 429, UNAUTHORIZED: 401, UNPROCESSABLE_ENTITY: 422, UNSUPPORTED_MEDIA_TYPE: 415, USE_PROXY: 305, IM_USED: 226, UNAVAILABLE_FOR_LEGAL_REASONS: 451 }; /** * match the status code with the HTTP_STATUS collection * @param {number} code */ exports.HTTP_STATUS = HTTP_STATUS; var isHTTPStatus = function isHTTPStatus(code) { return (0, _find["default"])(HTTP_STATUS, function (value) { return value === code; }); }; /** * suite of test to see if status code match in the following categories of status * informational * success * redirection * client error * server error */ exports.isHTTPStatus = isHTTPStatus; var testHTTPCode = { isInformational: function isInformational(code) { return !!(0, _inRange["default"])(isHTTPStatus(code), 99, 200); }, isSuccess: function isSuccess(code) { return !!(0, _inRange["default"])(isHTTPStatus(code), 199, 300); }, isRedirection: function isRedirection(code) { return !!(0, _inRange["default"])(isHTTPStatus(code), 299, 400); }, isClientError: function isClientError(code) { return !!(0, _inRange["default"])(isHTTPStatus(code), 399, 500); }, isServerError: function isServerError(code) { return !!(0, _inRange["default"])(isHTTPStatus(code), 499, 600); } }; exports.testHTTPCode = testHTTPCode; //# sourceMappingURL=constants.js.map /***/ }), /* 426 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(421), stackClear = __webpack_require__(1943), stackDelete = __webpack_require__(1944), stackGet = __webpack_require__(1945), stackHas = __webpack_require__(1946), stackSet = __webpack_require__(1947); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /* 427 */ /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(1960), isObjectLike = __webpack_require__(137); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /* 428 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(86), stubFalse = __webpack_require__(1961); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(64)(module))) /***/ }), /* 429 */ /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(1965), Map = __webpack_require__(597), Promise = __webpack_require__(1966), Set = __webpack_require__(1967), WeakMap = __webpack_require__(966), baseGetTag = __webpack_require__(264), toSource = __webpack_require__(968); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /* 430 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export BUFFER_OVERFLOW */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return buffers; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(113); var BUFFER_OVERFLOW = "Channel's Buffer overflow!"; var ON_OVERFLOW_THROW = 1; var ON_OVERFLOW_DROP = 2; var ON_OVERFLOW_SLIDE = 3; var ON_OVERFLOW_EXPAND = 4; var zeroBuffer = { isEmpty: __WEBPACK_IMPORTED_MODULE_0__utils__["r" /* kTrue */], put: __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */], take: __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */] }; function ringBuffer() { var limit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10; var overflowAction = arguments[1]; var arr = new Array(limit); var length = 0; var pushIndex = 0; var popIndex = 0; var push = function push(it) { arr[pushIndex] = it; pushIndex = (pushIndex + 1) % limit; length++; }; var take = function take() { if (length != 0) { var it = arr[popIndex]; arr[popIndex] = null; length--; popIndex = (popIndex + 1) % limit; return it; } }; var flush = function flush() { var items = []; while (length) { items.push(take()); } return items; }; return { isEmpty: function isEmpty() { return length == 0; }, put: function put(it) { if (length < limit) { push(it); } else { var doubledLimit = void 0; switch (overflowAction) { case ON_OVERFLOW_THROW: throw new Error(BUFFER_OVERFLOW); case ON_OVERFLOW_SLIDE: arr[pushIndex] = it; pushIndex = (pushIndex + 1) % limit; popIndex = pushIndex; break; case ON_OVERFLOW_EXPAND: doubledLimit = 2 * limit; arr = flush(); length = arr.length; pushIndex = arr.length; popIndex = 0; arr.length = doubledLimit; limit = doubledLimit; push(it); break; default: // DROP } } }, take: take, flush: flush }; } var buffers = { none: function none() { return zeroBuffer; }, fixed: function fixed(limit) { return ringBuffer(limit, ON_OVERFLOW_THROW); }, dropping: function dropping(limit) { return ringBuffer(limit, ON_OVERFLOW_DROP); }, sliding: function sliding(limit) { return ringBuffer(limit, ON_OVERFLOW_SLIDE); }, expanding: function expanding(initialSize) { return ringBuffer(initialSize, ON_OVERFLOW_EXPAND); } }; /***/ }), /* 431 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _get = _interopRequireDefault(__webpack_require__(101)); var _browser = __webpack_require__(2053); var _assert = __webpack_require__(631); var _constant = _interopRequireDefault(__webpack_require__(74)); var _actions = _interopRequireDefault(__webpack_require__(221)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /* eslint-disable no-param-reassign */ /** * the ref will contains a reference to * store * actions * reportURL * error * errors */ var ref = { errors: [], actions: [], store: { getState: function getState() { return {}; } } }; function serialize(error) { var std = { name: error.name, message: error.message, fileName: error.fileName, lineNumber: error.lineNumber, columnNumber: error.columnNumber, stack: error.stack }; // support dynamic properties Object.keys(error).reduce(function (acc, key) { acc[key] = error[key]; return acc; }, std); return std; } /** * getReportInfo serialize the error and enrich it * so as the dev will have as much information as possible */ function getReportInfo(error) { return { time: new Date().toISOString(), browser: navigator.userAgent, location: location.href, error: serialize(error), actions: ref.actions }; } /** * @return {Boolean} true if we can do report to backend using reportURL configuration */ function hasReportURL() { return !!ref.serverURL; } /** * @return {Boolean} true if we can do report to Sentry */ function hasReportFeature() { return !!ref.SENTRY_DSN || hasReportURL(); } /** * report function create a serilized error and dispatch action. * @param {Error} error instance of Error */ function report(error) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (ref.SENTRY_DSN) { if (options.tags) { (0, _browser.withScope)(function (scope) { options.tags.forEach(function (tag) { return scope.setTag(tag.key, tag.value); }); (0, _browser.captureException)(error); }); } else { (0, _browser.captureException)(error); } } else { var info = { error: serialize(error), context: JSON.stringify(getReportInfo(error)), reported: false, reason: 'Draft' }; ref.error = info; ref.errors.push(info); if (!ref.serverURL) { ref.store.dispatch(_objectSpread({ type: _constant["default"].ERROR }, info)); } else { ref.store.dispatch(_actions["default"].http.post(ref.serverURL, info.context, { onError: function onError(err) { info.reported = false; info.reason = serialize(err); return _objectSpread({ type: _constant["default"].ERROR }, info); }, onResponse: function onResponse(response) { info.reported = true; info.response = response; return _objectSpread({ type: _constant["default"].ERROR_REPORTED }, info); } })); } } } function onJSError(event) { var error = event.error; if (!error) { return; } // remove duplicate in dev mode // SEE: https://github.com/facebook/react/issues/10474 if (process.env.NODE_ENV !== 'production') { if (error.ALREADY_THROWN) { return; } error.ALREADY_THROWN = true; } report(error); } /** * init Sentry lib * @return {[type]} [description] */ function setupSentry() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; if (process.env.NODE_ENV !== 'production') { delete ref.SENTRY_DSN; } if (!ref.SENTRY_DSN) { return; } window.removeEventListener('error', onJSError); try { (0, _browser.init)(_objectSpread({ dsn: ref.SENTRY_DSN }, options)); } catch (error) { // eslint-disable-next-line no-console console.error(error); delete ref.SENTRY_DSN; window.addEventListener('error', onJSError); } } /** * bootstrap configure onError * @param {Object} options to configure * @param {Object} store redux */ function bootstrap(options, store) { window.addEventListener('error', onJSError); (0, _assert.assertTypeOf)(options, 'onError', 'object'); ref.SENTRY_DSN = undefined; ref.actions = []; ref.errors = []; ref.store = store; var opt = options.onError || {}; ref.serverURL = opt.reportURL; if (opt.SENTRY_DSN) { ref.SENTRY_DSN = opt.SENTRY_DSN; setupSentry(opt.sentry); if (ref.SENTRY_DSN && opt.onSentryScope) { (0, _browser.configureScope)(function (scope) { opt.onSentryScope(scope); }); } } } /** * return reference to the array of errors */ function getErrors() { return ref.errors; } function setupFromSettings(settings) { var dsn = (0, _get["default"])(settings, 'env.SENTRY_DSN'); if (!ref.SENTRY_DSN && ref.SENTRY_DSN !== dsn) { ref.SENTRY_DSN = dsn; setupSentry(); } } /** * onError redux middleware. * it store last 20 actions * it catch settings fetch OK to try to setup Sentry * it try catch every sub actions effect to report error */ function middleware() { return function (next) { return function (action) { if (!ref.SENTRY_DSN) { if (ref.actions.length >= 20) { ref.actions.shift(); } ref.actions.push((0, _get["default"])(action, 'type', 'UNKNOWN')); } if (action.type === _constant["default"].REQUEST_OK) { setupFromSettings(action.settings); } try { return next(action); } catch (error) { report(error, { tags: [{ key: 'redux-action-type', value: (0, _get["default"])(action, 'type', 'UNKNOWN') }] }); // eslint-disable-next-line no-console console.error(error); return undefined; } }; }; } function createObjectURL(error) { var data = getReportInfo(error); var strData = JSON.stringify(data); var MIME_TYPE = 'application/json'; // For IE11, you can use the Blob class to construct a File object. // This seems to be the most portable solution. var blob = new Blob([strData], { type: MIME_TYPE }); blob.name = 'report.json'; return window.URL.createObjectURL(blob); } function revokeObjectURL(url) { window.URL.revokeObjectURL(url); } var _default = { bootstrap: bootstrap, hasReportURL: hasReportURL, hasReportFeature: hasReportFeature, getReportInfo: getReportInfo, report: report, getErrors: getErrors, middleware: middleware, createObjectURL: createObjectURL, revokeObjectURL: revokeObjectURL }; exports["default"] = _default; //# sourceMappingURL=onError.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 432 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _invariant = _interopRequireDefault(__webpack_require__(51)); var _actionCreator = _interopRequireDefault(__webpack_require__(179)); var _expression = _interopRequireDefault(__webpack_require__(339)); var _sagas = _interopRequireDefault(__webpack_require__(632)); var _registry = _interopRequireDefault(__webpack_require__(180)); var _constant = _interopRequireDefault(__webpack_require__(74)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * All stuff related to the routing in CMF * @module react-cmf/lib/component * @see module:react-cmf/lib/component */ /** * return a component from the registry * @param {string} id the component id you want * @param {object} context optional context to get the registry * @return {function} the react component */ function get(id, context) { var component = _registry["default"].getFromRegistry("".concat(_constant["default"].REGISTRY_COMPONENT_PREFIX, ":").concat(id), context); if (!component) { throw new Error("component not found in the registry: ".concat(id)); } return component; } /** * register a component to let CMF be able to Inject it. * @param {string} id the component id you want to register * @param {any} component the component you want to register * @param {object} context optional context to get the registry */ function register(id, component, context) { if (!component) { (0, _invariant["default"])(process.env.NODE_ENV === 'production', 'You cannot register undefined as a component for id "%s"', id); return; } _registry["default"].addToRegistry("".concat(_constant["default"].REGISTRY_COMPONENT_PREFIX, ":").concat(id), component, context); if (component.actions) { _actionCreator["default"].registerMany(component.actions, context); } if (component.expressions) { _expression["default"].registerMany(component.expressions, context); } if (component.sagas) { _sagas["default"].registerMany(component.sagas, context); } } var registerMany = _registry["default"].getRegisterMany(register); function has(id, context) { return _registry["default"].getFromRegistry("".concat(_constant["default"].REGISTRY_COMPONENT_PREFIX, ":").concat(id), context) !== undefined; } var _default = { get: get, has: has, register: register, registerMany: registerMany }; exports["default"] = _default; //# sourceMappingURL=component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 433 */ /***/ (function(module, exports) { function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } module.exports = _defineProperty; /***/ }), /* 434 */ /***/ (function(module, exports, __webpack_require__) { var _typeof = __webpack_require__(342); var assertThisInitialized = __webpack_require__(183); function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return assertThisInitialized(self); } module.exports = _possibleConstructorReturn; /***/ }), /* 435 */ /***/ (function(module, exports) { function _getPrototypeOf(o) { module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } module.exports = _getPrototypeOf; /***/ }), /* 436 */ /***/ (function(module, exports, __webpack_require__) { var setPrototypeOf = __webpack_require__(2149); function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) setPrototypeOf(subClass, superClass); } module.exports = _inherits; /***/ }), /* 437 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck__ = __webpack_require__(138); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass__ = __webpack_require__(139); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass__); var EventEmitter = /*#__PURE__*/ function () { function EventEmitter() { __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck___default()(this, EventEmitter); this.observers = {}; } __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass___default()(EventEmitter, [{ key: "on", value: function on(events, listener) { var _this = this; events.split(' ').forEach(function (event) { _this.observers[event] = _this.observers[event] || []; _this.observers[event].push(listener); }); return this; } }, { key: "off", value: function off(event, listener) { var _this2 = this; if (!this.observers[event]) { return; } this.observers[event].forEach(function () { if (!listener) { delete _this2.observers[event]; } else { var index = _this2.observers[event].indexOf(listener); if (index > -1) { _this2.observers[event].splice(index, 1); } } }); } }, { key: "emit", value: function emit(event) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } if (this.observers[event]) { var cloned = [].concat(this.observers[event]); cloned.forEach(function (observer) { observer.apply(void 0, args); }); } if (this.observers['*']) { var _cloned = [].concat(this.observers['*']); _cloned.forEach(function (observer) { observer.apply(observer, [event].concat(args)); }); } } }]); return EventEmitter; }(); /* harmony default export */ __webpack_exports__["a"] = (EventEmitter); /***/ }), /* 438 */ /***/ (function(module, exports, __webpack_require__) { var arrayWithHoles = __webpack_require__(2160); var iterableToArrayLimit = __webpack_require__(2161); var nonIterableRest = __webpack_require__(2162); function _slicedToArray(arr, i) { return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest(); } module.exports = _slicedToArray; /***/ }), /* 439 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["d"] = warn; /* harmony export (immutable) */ __webpack_exports__["e"] = warnOnce; /* harmony export (immutable) */ __webpack_exports__["c"] = loadNamespaces; /* harmony export (immutable) */ __webpack_exports__["b"] = hasLoadedNamespace; /* harmony export (immutable) */ __webpack_exports__["a"] = getDisplayName; function warn() { if (console && console.warn) { var _console; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (typeof args[0] === 'string') args[0] = "react-i18next:: ".concat(args[0]); (_console = console).warn.apply(_console, args); } } var alreadyWarned = {}; function warnOnce() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } if (typeof args[0] === 'string' && alreadyWarned[args[0]]) return; if (typeof args[0] === 'string') alreadyWarned[args[0]] = new Date(); warn.apply(void 0, args); } // not needed right now // // export function deprecated(...args) { // if (process && process.env && (!process.env.NODE_ENV || process.env.NODE_ENV === 'development')) { // if (typeof args[0] === 'string') args[0] = `deprecation warning -> ${args[0]}`; // warnOnce(...args); // } // } function loadNamespaces(i18n, ns, cb) { i18n.loadNamespaces(ns, function () { // delay ready if not yet initialized i18n instance if (i18n.isInitialized) { cb(); } else { var initialized = function initialized() { // due to emitter removing issue in i18next we need to delay remove setTimeout(function () { i18n.off('initialized', initialized); }, 0); cb(); }; i18n.on('initialized', initialized); } }); } function hasLoadedNamespace(ns, i18n) { if (!i18n.languages || !i18n.languages.length) { warnOnce('i18n.languages were undefined or empty', i18n.languages); return true; } var lng = i18n.languages[0]; var fallbackLng = i18n.options ? i18n.options.fallbackLng : false; var lastLng = i18n.languages[i18n.languages.length - 1]; // we're in cimode so this shall pass if (lng.toLowerCase() === 'cimode') return true; var loadNotPending = function loadNotPending(l, n) { var loadState = i18n.services.backendConnector.state["".concat(l, "|").concat(n)]; return loadState === -1 || loadState === 2; }; // loaded -> SUCCESS if (i18n.hasResourceBundle(lng, ns)) return true; // were not loading at all -> SEMI SUCCESS if (!i18n.services.backendConnector.backend) return true; // failed loading ns - but at least fallback is not pending -> SEMI SUCCESS if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true; return false; } function getDisplayName(Component) { return Component.displayName || Component.name || (typeof Component === 'string' && Component.length > 0 ? Component : 'Unknown'); } /***/ }), /* 440 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2181); /***/ }), /* 441 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /* 442 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(641); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /* 443 */ /***/ (function(module, exports) { module.exports = true; /***/ }), /* 444 */ /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /* 445 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_activeElement__ = __webpack_require__(656); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_activeElement___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_dom_helpers_activeElement__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_dom_helpers_query_contains__ = __webpack_require__(161); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_dom_helpers_query_contains___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_dom_helpers_query_contains__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_keycode__ = __webpack_require__(34); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_keycode___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_keycode__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react_dom__ = __webpack_require__(18); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_react_dom__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_prop_types_extra_lib_all__ = __webpack_require__(159); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_prop_types_extra_lib_all___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_prop_types_extra_lib_all__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_prop_types_extra_lib_isRequiredForA11y__ = __webpack_require__(162); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_prop_types_extra_lib_isRequiredForA11y___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_prop_types_extra_lib_isRequiredForA11y__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_uncontrollable__ = __webpack_require__(75); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_uncontrollable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_uncontrollable__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_warning__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__ButtonGroup__ = __webpack_require__(650); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__DropdownMenu__ = __webpack_require__(2223); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__DropdownToggle__ = __webpack_require__(1089); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__utils_bootstrapUtils__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__ = __webpack_require__(68); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__utils_PropTypes__ = __webpack_require__(1074); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__utils_ValidComponentChildren__ = __webpack_require__(87); var TOGGLE_ROLE = __WEBPACK_IMPORTED_MODULE_18__DropdownToggle__["a" /* default */].defaultProps.bsRole; var MENU_ROLE = __WEBPACK_IMPORTED_MODULE_17__DropdownMenu__["a" /* default */].defaultProps.bsRole; var propTypes = { /** * The menu will open above the dropdown button, instead of below it. */ dropup: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool, /** * An html id attribute, necessary for assistive technologies, such as screen readers. * @type {string|number} * @required */ id: __WEBPACK_IMPORTED_MODULE_13_prop_types_extra_lib_isRequiredForA11y___default()(__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.number])), componentClass: __WEBPACK_IMPORTED_MODULE_12_prop_types_extra_lib_elementType___default.a, /** * The children of a Dropdown may be a `` or a ``. * @type {node} */ children: __WEBPACK_IMPORTED_MODULE_11_prop_types_extra_lib_all___default()(Object(__WEBPACK_IMPORTED_MODULE_21__utils_PropTypes__["c" /* requiredRoles */])(TOGGLE_ROLE, MENU_ROLE), Object(__WEBPACK_IMPORTED_MODULE_21__utils_PropTypes__["a" /* exclusiveRoles */])(MENU_ROLE)), /** * Whether or not component is disabled. */ disabled: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool, /** * Align the menu to the right side of the Dropdown toggle */ pullRight: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool, /** * Whether or not the Dropdown is visible. * * @controllable onToggle */ open: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool, defaultOpen: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool, /** * A callback fired when the Dropdown wishes to change visibility. Called with the requested * `open` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`. * * ```js * function(Boolean isOpen, Object event, { String source }) {} * ``` * @controllable open */ onToggle: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func, /** * A callback fired when a menu item is selected. * * ```js * (eventKey: any, event: Object) => any * ``` */ onSelect: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func, /** * If `'menuitem'`, causes the dropdown to behave like a menu item rather than * a menu button. */ role: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string, /** * Which event when fired outside the component will cause it to be closed * * *Note: For custom dropdown components, you will have to pass the * `rootCloseEvent` to `` in your custom dropdown menu * component ([similarly to how it is implemented in ``](https://github.com/react-bootstrap/react-bootstrap/blob/v0.31.5/src/DropdownMenu.js#L115-L119)).* */ rootCloseEvent: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.oneOf(['click', 'mousedown']), /** * @private */ onMouseEnter: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func, /** * @private */ onMouseLeave: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func }; var defaultProps = { componentClass: __WEBPACK_IMPORTED_MODULE_16__ButtonGroup__["a" /* default */] }; var Dropdown = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Dropdown, _React$Component); function Dropdown(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; _this.handleClick = _this.handleClick.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleKeyDown = _this.handleKeyDown.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleClose = _this.handleClose.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this._focusInDropdown = false; _this.lastOpenEventType = null; return _this; } var _proto = Dropdown.prototype; _proto.componentDidMount = function componentDidMount() { this.focusNextOnOpen(); }; _proto.componentWillUpdate = function componentWillUpdate(nextProps) { if (!nextProps.open && this.props.open) { this._focusInDropdown = __WEBPACK_IMPORTED_MODULE_6_dom_helpers_query_contains___default()(__WEBPACK_IMPORTED_MODULE_10_react_dom___default.a.findDOMNode(this.menu), __WEBPACK_IMPORTED_MODULE_5_dom_helpers_activeElement___default()(document)); } }; _proto.componentDidUpdate = function componentDidUpdate(prevProps) { var open = this.props.open; var prevOpen = prevProps.open; if (open && !prevOpen) { this.focusNextOnOpen(); } if (!open && prevOpen) { // if focus hasn't already moved from the menu let's return it // to the toggle if (this._focusInDropdown) { this._focusInDropdown = false; this.focus(); } } }; _proto.focus = function focus() { var toggle = __WEBPACK_IMPORTED_MODULE_10_react_dom___default.a.findDOMNode(this.toggle); if (toggle && toggle.focus) { toggle.focus(); } }; _proto.focusNextOnOpen = function focusNextOnOpen() { var menu = this.menu; if (!menu || !menu.focusNext) { return; } if (this.lastOpenEventType === 'keydown' || this.props.role === 'menuitem') { menu.focusNext(); } }; _proto.handleClick = function handleClick(event) { if (this.props.disabled) { return; } this.toggleOpen(event, { source: 'click' }); }; _proto.handleClose = function handleClose(event, eventDetails) { if (!this.props.open) { return; } this.toggleOpen(event, eventDetails); }; _proto.handleKeyDown = function handleKeyDown(event) { if (this.props.disabled) { return; } switch (event.keyCode) { case __WEBPACK_IMPORTED_MODULE_7_keycode___default.a.codes.down: if (!this.props.open) { this.toggleOpen(event, { source: 'keydown' }); } else if (this.menu.focusNext) { this.menu.focusNext(); } event.preventDefault(); break; case __WEBPACK_IMPORTED_MODULE_7_keycode___default.a.codes.esc: case __WEBPACK_IMPORTED_MODULE_7_keycode___default.a.codes.tab: this.handleClose(event, { source: 'keydown' }); break; default: } }; _proto.toggleOpen = function toggleOpen(event, eventDetails) { var open = !this.props.open; if (open) { this.lastOpenEventType = eventDetails.source; } if (this.props.onToggle) { this.props.onToggle(open, event, eventDetails); } }; _proto.renderMenu = function renderMenu(child, _ref) { var _this2 = this; var id = _ref.id, onSelect = _ref.onSelect, rootCloseEvent = _ref.rootCloseEvent, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref, ["id", "onSelect", "rootCloseEvent"]); var ref = function ref(c) { _this2.menu = c; }; if (typeof child.ref === 'string') { process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_15_warning___default()(false, 'String refs are not supported on `` components. ' + 'To apply a ref to the component use the callback signature:\n\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : void 0; } else { ref = Object(__WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__["a" /* default */])(child.ref, ref); } return Object(__WEBPACK_IMPORTED_MODULE_8_react__["cloneElement"])(child, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { ref: ref, labelledBy: id, bsClass: Object(__WEBPACK_IMPORTED_MODULE_19__utils_bootstrapUtils__["prefix"])(props, 'menu'), onClose: Object(__WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__["a" /* default */])(child.props.onClose, this.handleClose), onSelect: Object(__WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__["a" /* default */])(child.props.onSelect, onSelect, function (key, event) { return _this2.handleClose(event, { source: 'select' }); }), rootCloseEvent: rootCloseEvent })); }; _proto.renderToggle = function renderToggle(child, props) { var _this3 = this; var ref = function ref(c) { _this3.toggle = c; }; if (typeof child.ref === 'string') { process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_15_warning___default()(false, 'String refs are not supported on `` components. ' + 'To apply a ref to the component use the callback signature:\n\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : void 0; } else { ref = Object(__WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__["a" /* default */])(child.ref, ref); } return Object(__WEBPACK_IMPORTED_MODULE_8_react__["cloneElement"])(child, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { ref: ref, bsClass: Object(__WEBPACK_IMPORTED_MODULE_19__utils_bootstrapUtils__["prefix"])(props, 'toggle'), onClick: Object(__WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__["a" /* default */])(child.props.onClick, this.handleClick), onKeyDown: Object(__WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__["a" /* default */])(child.props.onKeyDown, this.handleKeyDown) })); }; _proto.render = function render() { var _classes, _this4 = this; var _this$props = this.props, Component = _this$props.componentClass, id = _this$props.id, dropup = _this$props.dropup, disabled = _this$props.disabled, pullRight = _this$props.pullRight, open = _this$props.open, onSelect = _this$props.onSelect, role = _this$props.role, bsClass = _this$props.bsClass, className = _this$props.className, rootCloseEvent = _this$props.rootCloseEvent, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "id", "dropup", "disabled", "pullRight", "open", "onSelect", "role", "bsClass", "className", "rootCloseEvent", "children"]); delete props.onToggle; var classes = (_classes = {}, _classes[bsClass] = true, _classes.open = open, _classes.disabled = disabled, _classes); if (dropup) { classes[bsClass] = false; classes.dropup = true; } // This intentionally forwards bsSize and bsStyle (if set) to the // underlying component, to allow it to render size and style variants. return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, classes) }), __WEBPACK_IMPORTED_MODULE_22__utils_ValidComponentChildren__["a" /* default */].map(children, function (child) { switch (child.props.bsRole) { case TOGGLE_ROLE: return _this4.renderToggle(child, { id: id, disabled: disabled, open: open, role: role, bsClass: bsClass }); case MENU_ROLE: return _this4.renderMenu(child, { id: id, open: open, pullRight: pullRight, bsClass: bsClass, onSelect: onSelect, rootCloseEvent: rootCloseEvent }); default: return child; } })); }; return Dropdown; }(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component); Dropdown.propTypes = propTypes; Dropdown.defaultProps = defaultProps; Object(__WEBPACK_IMPORTED_MODULE_19__utils_bootstrapUtils__["bsClass"])('dropdown', Dropdown); var UncontrolledDropdown = __WEBPACK_IMPORTED_MODULE_14_uncontrollable___default()(Dropdown, { open: 'onToggle' }); UncontrolledDropdown.Toggle = __WEBPACK_IMPORTED_MODULE_18__DropdownToggle__["a" /* default */]; UncontrolledDropdown.Menu = __WEBPACK_IMPORTED_MODULE_17__DropdownMenu__["a" /* default */]; /* harmony default export */ __webpack_exports__["a"] = (UncontrolledDropdown); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 446 */ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(158).f; var has = __webpack_require__(186); var TAG = __webpack_require__(125)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /* 447 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = splitComponentProps; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries__ = __webpack_require__(226); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries__); function splitComponentProps(props, Component) { var componentPropTypes = Component.propTypes; var parentProps = {}; var childProps = {}; __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries___default()(props).forEach(function (_ref) { var propName = _ref[0], propValue = _ref[1]; if (componentPropTypes[propName]) { parentProps[propName] = propValue; } else { childProps[propName] = propValue; } }); return [parentProps, childProps]; } /***/ }), /* 448 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_transition_group_Transition__ = __webpack_require__(160); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_transition_group_Transition___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_transition_group_Transition__); var _fadeStyles; var propTypes = { /** * Show the component; triggers the fade in or fade out animation */ in: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Wait until the first "enter" transition to mount the component (add it to the DOM) */ mountOnEnter: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Unmount the component (remove it from the DOM) when it is faded out */ unmountOnExit: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Run the fade in animation when the component mounts, if it is initially * shown */ appear: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Duration of the fade animation in milliseconds, to ensure that finishing * callbacks are fired even if the original browser transition end events are * canceled */ timeout: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Callback fired before the component fades in */ onEnter: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, /** * Callback fired after the component starts to fade in */ onEntering: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, /** * Callback fired after the has component faded in */ onEntered: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, /** * Callback fired before the component fades out */ onExit: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, /** * Callback fired after the component starts to fade out */ onExiting: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, /** * Callback fired after the component has faded out */ onExited: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func }; var defaultProps = { in: false, timeout: 300, mountOnEnter: false, unmountOnExit: false, appear: false }; var fadeStyles = (_fadeStyles = {}, _fadeStyles[__WEBPACK_IMPORTED_MODULE_6_react_transition_group_Transition__["ENTERING"]] = 'in', _fadeStyles[__WEBPACK_IMPORTED_MODULE_6_react_transition_group_Transition__["ENTERED"]] = 'in', _fadeStyles); var Fade = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Fade, _React$Component); function Fade() { return _React$Component.apply(this, arguments) || this; } var _proto = Fade.prototype; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["className", "children"]); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react_transition_group_Transition___default.a, props, function (status, innerProps) { return __WEBPACK_IMPORTED_MODULE_4_react___default.a.cloneElement(children, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, innerProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('fade', className, children.props.className, fadeStyles[status]) })); }); }; return Fade; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Fade.propTypes = propTypes; Fade.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Fade); /***/ }), /* 449 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__MediaBody__ = __webpack_require__(2246); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__MediaHeading__ = __webpack_require__(2247); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__MediaLeft__ = __webpack_require__(2248); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__MediaList__ = __webpack_require__(2249); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__MediaListItem__ = __webpack_require__(2250); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__MediaRight__ = __webpack_require__(2251); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__ = __webpack_require__(12); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'div' }; var Media = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Media, _React$Component); function Media() { return _React$Component.apply(this, arguments) || this; } var _proto = Media.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return Media; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Media.propTypes = propTypes; Media.defaultProps = defaultProps; Media.Heading = __WEBPACK_IMPORTED_MODULE_7__MediaHeading__["a" /* default */]; Media.Body = __WEBPACK_IMPORTED_MODULE_6__MediaBody__["a" /* default */]; Media.Left = __WEBPACK_IMPORTED_MODULE_8__MediaLeft__["a" /* default */]; Media.Right = __WEBPACK_IMPORTED_MODULE_11__MediaRight__["a" /* default */]; Media.List = __WEBPACK_IMPORTED_MODULE_9__MediaList__["a" /* default */]; Media.ListItem = __WEBPACK_IMPORTED_MODULE_10__MediaListItem__["a" /* default */]; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__["bsClass"])('media', Media)); /***/ }), /* 450 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _createChainableTypeChecker = __webpack_require__(347); var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue); if (_react2.default.isValidElement(propValue)) { return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.'); } if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) { return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.'); } return null; } exports.default = (0, _createChainableTypeChecker2.default)(validate); module.exports = exports['default']; /***/ }), /* 451 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = isOverflowing; var _isWindow = __webpack_require__(452); var _isWindow2 = _interopRequireDefault(_isWindow); var _ownerDocument = __webpack_require__(188); var _ownerDocument2 = _interopRequireDefault(_ownerDocument); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function isBody(node) { return node && node.tagName.toLowerCase() === 'body'; } function bodyIsOverflowing(node) { var doc = (0, _ownerDocument2.default)(node); var win = (0, _isWindow2.default)(doc); var fullWidth = win.innerWidth; // Support: ie8, no innerWidth if (!fullWidth) { var documentElementRect = doc.documentElement.getBoundingClientRect(); fullWidth = documentElementRect.right - Math.abs(documentElementRect.left); } return doc.body.clientWidth < fullWidth; } function isOverflowing(container) { var win = (0, _isWindow2.default)(container); return win || isBody(container) ? bodyIsOverflowing(container) : container.scrollHeight > container.clientHeight; } module.exports = exports['default']; /***/ }), /* 452 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = getWindow; function getWindow(node) { return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false; } module.exports = exports["default"]; /***/ }), /* 453 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = getContainer; var _reactDom = __webpack_require__(18); var _reactDom2 = _interopRequireDefault(_reactDom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function getContainer(container, defaultContainer) { container = typeof container === 'function' ? container() : container; return _reactDom2.default.findDOMNode(container) || defaultContainer; } module.exports = exports['default']; /***/ }), /* 454 */ /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(2305), listCacheDelete = __webpack_require__(2306), listCacheGet = __webpack_require__(2307), listCacheHas = __webpack_require__(2308), listCacheSet = __webpack_require__(2309); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /* 455 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(456); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /* 456 */ /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /* 457 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(228); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /* 458 */ /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(2329); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /* 459 */ /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(2336), isObjectLike = __webpack_require__(144); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /* 460 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(126), stubFalse = __webpack_require__(2337); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(64)(module))) /***/ }), /* 461 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /* 462 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(103), isKey = __webpack_require__(686), stringToPath = __webpack_require__(2361), toString = __webpack_require__(2363); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /* 463 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(280), isObjectLike = __webpack_require__(144); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /* 464 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(444)('meta'); var isObject = __webpack_require__(140); var has = __webpack_require__(186); var setDesc = __webpack_require__(158).f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var FREEZE = !__webpack_require__(185)(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function (it, create) { if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }), /* 465 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ActionIconToggle = _interopRequireDefault(__webpack_require__(2442)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _ActionIconToggle["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 466 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** Used as references for various `Number` constants. */ var NAN = 0 / 0; /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max, nativeMin = Math.min; /** * Gets the timestamp of the number of milliseconds that have elapsed since * the Unix epoch (1 January 1970 00:00:00 UTC). * * @static * @memberOf _ * @since 2.4.0 * @category Date * @returns {number} Returns the timestamp. * @example * * _.defer(function(stamp) { * console.log(_.now() - stamp); * }, _.now()); * // => Logs the number of milliseconds it took for the deferred invocation. */ var now = function() { return root.Date.now(); }; /** * Creates a debounced function that delays invoking `func` until after `wait` * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. * Provide `options` to indicate whether `func` should be invoked on the * leading and/or trailing edge of the `wait` timeout. The `func` is invoked * with the last arguments provided to the debounced function. Subsequent * calls to the debounced function return the result of the last `func` * invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is * invoked on the trailing edge of the timeout only if the debounced function * is invoked more than once during the `wait` timeout. * * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to debounce. * @param {number} [wait=0] The number of milliseconds to delay. * @param {Object} [options={}] The options object. * @param {boolean} [options.leading=false] * Specify invoking on the leading edge of the timeout. * @param {number} [options.maxWait] * The maximum time `func` is allowed to be delayed before it's invoked. * @param {boolean} [options.trailing=true] * Specify invoking on the trailing edge of the timeout. * @returns {Function} Returns the new debounced function. * @example * * // Avoid costly calculations while the window size is in flux. * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); * * // Invoke `sendMail` when clicked, debouncing subsequent calls. * jQuery(element).on('click', _.debounce(sendMail, 300, { * 'leading': true, * 'trailing': false * })); * * // Ensure `batchLog` is invoked once after 1 second of debounced calls. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); * var source = new EventSource('/stream'); * jQuery(source).on('message', debounced); * * // Cancel the trailing debounced invocation. * jQuery(window).on('popstate', debounced.cancel); */ function debounce(func, wait, options) { var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } wait = toNumber(wait) || 0; if (isObject(options)) { leading = !!options.leading; maxing = 'maxWait' in options; maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; trailing = 'trailing' in options ? !!options.trailing : trailing; } function invokeFunc(time) { var args = lastArgs, thisArg = lastThis; lastArgs = lastThis = undefined; lastInvokeTime = time; result = func.apply(thisArg, args); return result; } function leadingEdge(time) { // Reset any `maxWait` timer. lastInvokeTime = time; // Start the timer for the trailing edge. timerId = setTimeout(timerExpired, wait); // Invoke the leading edge. return leading ? invokeFunc(time) : result; } function remainingWait(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, result = wait - timeSinceLastCall; return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; } function shouldInvoke(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at the // trailing edge, the system time has gone backwards and we're treating // it as the trailing edge, or we've hit the `maxWait` limit. return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } function timerExpired() { var time = now(); if (shouldInvoke(time)) { return trailingEdge(time); } // Restart the timer. timerId = setTimeout(timerExpired, remainingWait(time)); } function trailingEdge(time) { timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been // debounced at least once. if (trailing && lastArgs) { return invokeFunc(time); } lastArgs = lastThis = undefined; return result; } function cancel() { if (timerId !== undefined) { clearTimeout(timerId); } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = undefined; } function flush() { return timerId === undefined ? result : trailingEdge(now()); } function debounced() { var time = now(), isInvoking = shouldInvoke(time); lastArgs = arguments; lastThis = this; lastCallTime = time; if (isInvoking) { if (timerId === undefined) { return leadingEdge(lastCallTime); } if (maxing) { // Handle invocations in a tight loop. timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } } if (timerId === undefined) { timerId = setTimeout(timerExpired, wait); } return result; } debounced.cancel = cancel; debounced.flush = flush; return debounced; } /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return !!value && (type == 'object' || type == 'function'); } /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return !!value && typeof value == 'object'; } /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && objectToString.call(value) == symbolTag); } /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = value.replace(reTrim, ''); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } module.exports = debounce; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27))) /***/ }), /* 467 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = deferAction; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return inlineProp; }); function deferAction(action) { // Hidding setImmediate from Webpack to avoid inserting polyfill var _window = window, setImmediate = _window.setImmediate; if (typeof setImmediate !== 'undefined') { setImmediate(action); } else { setTimeout(action, 1); } } var inlineProp = function inlineProp(name, value) { var obj = {}; obj[name] = value; return obj; }; /***/ }), /* 468 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (_ref) { var context = _ref.context, _ref$label = _ref.label, label = _ref$label === undefined ? 'context-to-element' : _ref$label, resolveDocument = _ref.resolveDocument, defaultToDocument = _ref.defaultToDocument; var element = (0, _nodeArray2.default)(context)[0]; if (resolveDocument && element && element.nodeType === Node.DOCUMENT_NODE) { element = element.documentElement; } if (!element && defaultToDocument) { return document.documentElement; } if (!element) { throw new TypeError(label + ' requires valid options.context'); } if (element.nodeType !== Node.ELEMENT_NODE && element.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) { throw new TypeError(label + ' requires options.context to be an Element'); } return element; }; var _nodeArray = __webpack_require__(2548); var _nodeArray2 = _interopRequireDefault(_nodeArray); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } module.exports = exports['default']; //# sourceMappingURL=context-to-element.js.map /***/ }), /* 469 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function () { var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, engage = _ref2.engage, disengage = _ref2.disengage; var data = { engage: engage || noop, disengage: disengage || noop, instances: 0, _result: null }; return initialize.bind(data); }; /* The Singleton Decorator is intended to allow modules to initialize a ("singleton") component as if it was the only one using it. Every module gets to initialize and destruct the component by itself. Via simple reference counting the component keeps track of how many modules have initialized it, so it destructs only when the last module is gone. This decorator hides the component's singleton nature from the application in order to offer a homogenous API. engage() can return an object (result) with methods to expose to the consumer, upon initialization result.disengage is added and returned to the consumer. */ function destruct() { var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, force = _ref.force; if (force) { this.instances = 0; } else { this.instances--; } if (!this.instances) { this.disengage(); this._result = null; } } function initialize() { if (this.instances) { this.instances++; return this._result; } this.instances++; this._result = this.engage() || {}; this._result.disengage = destruct.bind(this); return this._result; } function noop() {} module.exports = exports["default"]; //# sourceMappingURL=decorate-service.js.map /***/ }), /* 470 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tc-records-viewer":"RecordsViewer__tc-records-viewer___2fP_V","tc-records-viewer-tree":"RecordsViewer__tc-records-viewer-tree___2zZje","tc-records-viewer-tree-border":"RecordsViewer__tc-records-viewer-tree-border___1XiBI","tc-records-viewer-skeleton":"RecordsViewer__tc-records-viewer-skeleton___1ozN0","tc-records-viewer-branch":"RecordsViewer__tc-records-viewer-branch___rJ5lC","tc-records-viewer-leaf":"RecordsViewer__tc-records-viewer-leaf___1HgCq","tc-records-viewer-leaf-highlighted":"RecordsViewer__tc-records-viewer-leaf-highlighted___2VNT3","tc-records-viewer-leaf-quality":"RecordsViewer__tc-records-viewer-leaf-quality___qb8OK","tc-records-viewer-branch-highlighted":"RecordsViewer__tc-records-viewer-branch-highlighted___2ivQA","tc-records-viewer-branch-content":"RecordsViewer__tc-records-viewer-branch-content___gsmdo","tc-records-viewer-branch-icon":"RecordsViewer__tc-records-viewer-branch-icon___3Qrh0","tc-records-viewer-branch-quality":"RecordsViewer__tc-records-viewer-branch-quality___1KF0C","tc-leaf-overflow-icon":"RecordsViewer__tc-leaf-overflow-icon___3GpXH","tc-leaf-overflow-icon-chevron":"RecordsViewer__tc-leaf-overflow-icon-chevron___1OuJk","tc-leaf-overflow-icon-chevron-filled":"RecordsViewer__tc-leaf-overflow-icon-chevron-filled___1IV_P"}; /***/ }), /* 471 */ /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /* 472 */ /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /* 473 */ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(164).f; var has = __webpack_require__(235); var TAG = __webpack_require__(91)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /* 474 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(2697); var global = __webpack_require__(90); var hide = __webpack_require__(236); var Iterators = __webpack_require__(288); var TO_STRING_TAG = __webpack_require__(91)('toStringTag'); var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + 'TextTrackList,TouchList').split(','); for (var i = 0; i < DOMIterables.length; i++) { var NAME = DOMIterables[i]; var Collection = global[NAME]; var proto = Collection && Collection.prototype; if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }), /* 475 */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /* 476 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export bpfrpt_proptype_RowRendererParams */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bpfrpt_proptype_RowRenderer; }); /* unused harmony export bpfrpt_proptype_RenderedRows */ /* unused harmony export bpfrpt_proptype_Scroll */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); var bpfrpt_proptype_RowRendererParams = process.env.NODE_ENV === 'production' ? null : { index: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired, isScrolling: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool.isRequired, isVisible: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool.isRequired, key: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired, parent: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired, style: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired }; var bpfrpt_proptype_RowRenderer = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func; var bpfrpt_proptype_RenderedRows = process.env.NODE_ENV === 'production' ? null : { overscanStartIndex: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired, overscanStopIndex: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired, startIndex: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired, stopIndex: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired }; var bpfrpt_proptype_Scroll = process.env.NODE_ENV === 'production' ? null : { clientHeight: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired, scrollHeight: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired, scrollTop: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired }; /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 477 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; var SortDirection = { /** * Sort items in ascending order. * This means arranging from the lowest value to the highest (e.g. a-z, 0-9). */ ASC: 'ASC', /** * Sort items in descending order. * This means arranging from the highest value to the lowest (e.g. z-a, 9-0). */ DESC: 'DESC' }; /* harmony default export */ __webpack_exports__["a"] = (SortDirection); /***/ }), /* 478 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "DateTime", { enumerable: true, get: function get() { return _DateTime["default"]; } }); Object.defineProperty(exports, "InputDateTimePicker", { enumerable: true, get: function get() { return _InputDateTimePicker["default"]; } }); Object.defineProperty(exports, "InputDatePicker", { enumerable: true, get: function get() { return _InputDatePicker["default"]; } }); Object.defineProperty(exports, "InputDateRangePicker", { enumerable: true, get: function get() { return _InputDateRangePicker["default"]; } }); Object.defineProperty(exports, "InputTimePicker", { enumerable: true, get: function get() { return _InputTimePicker["default"]; } }); exports["default"] = void 0; var _DateTime = _interopRequireDefault(__webpack_require__(1233)); var _InputDateTimePicker = _interopRequireDefault(__webpack_require__(2808)); var _InputDatePicker = _interopRequireDefault(__webpack_require__(1243)); var _InputDateRangePicker = _interopRequireDefault(__webpack_require__(2898)); var _InputTimePicker = _interopRequireDefault(__webpack_require__(1255)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _InputDateTimePicker["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 479 */ /***/ (function(module, exports, __webpack_require__) { var startOfDay = __webpack_require__(166) var MILLISECONDS_IN_MINUTE = 60000 var MILLISECONDS_IN_DAY = 86400000 /** * @category Day Helpers * @summary Get the number of calendar days between the given dates. * * @description * Get the number of calendar days between the given dates. * * @param {Date|String|Number} dateLeft - the later date * @param {Date|String|Number} dateRight - the earlier date * @returns {Number} the number of calendar days * * @example * // How many calendar days are between * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00? * var result = differenceInCalendarDays( * new Date(2012, 6, 2, 0, 0), * new Date(2011, 6, 2, 23, 0) * ) * //=> 366 */ function differenceInCalendarDays (dirtyDateLeft, dirtyDateRight) { var startOfDayLeft = startOfDay(dirtyDateLeft) var startOfDayRight = startOfDay(dirtyDateRight) var timestampLeft = startOfDayLeft.getTime() - startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE var timestampRight = startOfDayRight.getTime() - startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE // Round the number of days to the nearest integer // because the number of milliseconds in a day is not constant // (e.g. it's different in the day of the daylight saving time clock shift) return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY) } module.exports = differenceInCalendarDays /***/ }), /* 480 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = getErrorMessage; var _i18next = __webpack_require__(341); // eslint-disable-next line import/no-named-as-default-member function getErrorMessage(key) { switch (key) { case 'INVALID_HOUR_EMPTY': return (0, _i18next.t)('INVALID_HOUR_EMPTY', { defaultValue: 'Hour is required' }); case 'INVALID_HOUR_NUMBER': return (0, _i18next.t)('INVALID_HOUR_NUMBER', { defaultValue: 'Hour must be between 00 and 23' }); case 'INVALID_MINUTES_EMPTY': return (0, _i18next.t)('INVALID_MINUTES_EMPTY', { defaultValue: 'Minutes are required' }); case 'INVALID_MINUTES_NUMBER': return (0, _i18next.t)('INVALID_MINUTES_NUMBER', { defaultValue: 'Minutes value must be between 00 and 59' }); case 'INVALID_SECONDS_EMPTY': return (0, _i18next.t)('INVALID_SECONDS_EMPTY', { defaultValue: 'Seconds are required' }); case 'INVALID_SECONDS_NUMBER': return (0, _i18next.t)('INVALID_SECONDS_NUMBER', { defaultValue: 'Seconds value must be between 00 and 59' }); case 'INVALID_DATE_FORMAT': return (0, _i18next.t)('INVALID_DATE_FORMAT', { defaultValue: 'Date format is invalid' }); case 'INVALID_DATE_EMPTY': return (0, _i18next.t)('INVALID_DATE_EMPTY', { defaultValue: 'Date is required' }); case 'INVALID_MONTH_NUMBER': return (0, _i18next.t)('INVALID_MONTH_NUMBER', { defaultValue: 'Month must be between 01 and 12' }); case 'INVALID_DAY_NUMBER': return (0, _i18next.t)('INVALID_DAY_NUMBER', { defaultValue: 'Day is invalid' }); case 'INVALID_DAY_OF_MONTH': return (0, _i18next.t)('INVALID_DAY_OF_MONTH', { defaultValue: "Day value doesn't match an existing day in the month" }); case 'INVALID_TIME_EMPTY': return (0, _i18next.t)('INVALID_TIME_EMPTY', { defaultValue: 'Time is required' }); case 'TIME_FORMAT_INVALID': return (0, _i18next.t)('TIME_FORMAT_INVALID', { defaultValue: 'Time is invalid' }); case 'DATETIME_INVALID_FORMAT': return (0, _i18next.t)('DATETIME_INVALID_FORMAT', { defaultValue: 'Datetime is invalid' }); case 'INVALID_RANGE_START_AFTER_END': return (0, _i18next.t)('INVALID_RANGE_START_AFTER_END', { defaultValue: 'Start date should comes before end date' }); default: return ''; } } //# sourceMappingURL=error-messages.js.map /***/ }), /* 481 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.buildDayNames = buildDayNames; exports.buildWeeks = buildWeeks; exports.buildMonths = buildMonths; exports.buildYears = buildYears; exports.getPickerLocale = void 0; var _add_days = _interopRequireDefault(__webpack_require__(241)); var _chunk = _interopRequireDefault(__webpack_require__(1247)); var _add_months = _interopRequireDefault(__webpack_require__(292)); var _format = _interopRequireDefault(__webpack_require__(147)); var _get_year = _interopRequireDefault(__webpack_require__(240)); var _set_day = _interopRequireDefault(__webpack_require__(757)); var _start_of_week = _interopRequireDefault(__webpack_require__(290)); var _memoize = _interopRequireDefault(__webpack_require__(354)); var _locale = _interopRequireDefault(__webpack_require__(376)); var _translate = _interopRequireDefault(__webpack_require__(15)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function buildDateFnsLocale(t) { return { locale: (0, _locale["default"])(t || (0, _translate["default"])()) }; } var getPickerLocale = (0, _memoize["default"])(buildDateFnsLocale); /** * Generate days of week, starting from the provided index */ exports.getPickerLocale = getPickerLocale; function buildDayNames() { var firstDayOfweek = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var t = arguments.length > 1 ? arguments[1] : undefined; var pickerLocale = getPickerLocale(t); return new Array(7).fill(0).map(function (_, i) { return (i + firstDayOfweek) % 7; }).map(function (dayOfWeek) { return (0, _set_day["default"])(new Date(0), dayOfWeek); }).map(function (headerDate) { return { abbr: (0, _format["default"])(headerDate, 'd', pickerLocale), full: (0, _format["default"])(headerDate, 'dddd', pickerLocale) }; }); } /** * Generate the set of weeks for a specific month */ function buildWeeks(year, monthIndex) { var firstDayOfWeek = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; var firstDateOfMonth = new Date(year, monthIndex); var firstDateOfCalendar = (0, _start_of_week["default"])(firstDateOfMonth, { weekStartsOn: firstDayOfWeek }); var dates = new Array(7 * 6).fill(0).map(function (_, i) { return (0, _add_days["default"])(firstDateOfCalendar, i); }); return (0, _chunk["default"])(dates, 7); } /** * Generate th sets of months, each set has the size of provided "chunkSize" */ function buildMonths(chunkSize, t) { var pickerLocale = getPickerLocale(t); var months = new Array(12).fill(0).map(function (_, i) { return i; }).map(function (index) { return { index: index, name: (0, _format["default"])((0, _add_months["default"])(new Date(0), index), 'MMMM', pickerLocale) }; }); return (0, _chunk["default"])(months, chunkSize); } /** * Generate a years window, centered on the current year by default, or the provided one */ function buildYears(middle) { var window = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3; var middleYear = middle === undefined ? (0, _get_year["default"])(new Date()) : middle; var start = middleYear - window; var end = middleYear + window; var years = []; for (var i = start; i <= end; i += 1) { years.push(i); } return years; } //# sourceMappingURL=generator.js.map /***/ }), /* 482 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.buildDayNames = buildDayNames; exports.buildWeeks = buildWeeks; exports.buildMonths = buildMonths; exports.buildYears = buildYears; exports.getPickerLocale = void 0; var _add_days = _interopRequireDefault(__webpack_require__(241)); var _chunk = _interopRequireDefault(__webpack_require__(1247)); var _add_months = _interopRequireDefault(__webpack_require__(292)); var _format = _interopRequireDefault(__webpack_require__(147)); var _get_year = _interopRequireDefault(__webpack_require__(240)); var _set_day = _interopRequireDefault(__webpack_require__(757)); var _start_of_week = _interopRequireDefault(__webpack_require__(290)); var _memoize = _interopRequireDefault(__webpack_require__(354)); var _locale = _interopRequireDefault(__webpack_require__(376)); var _translate = _interopRequireDefault(__webpack_require__(15)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function buildDateFnsLocale(t) { return { locale: (0, _locale["default"])(t || (0, _translate["default"])()) }; } var getPickerLocale = (0, _memoize["default"])(buildDateFnsLocale); /** * Generate days of week, starting from the provided index */ exports.getPickerLocale = getPickerLocale; function buildDayNames() { var firstDayOfweek = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; var t = arguments.length > 1 ? arguments[1] : undefined; var pickerLocale = getPickerLocale(t); return new Array(7).fill(0).map(function (_, i) { return (i + firstDayOfweek) % 7; }).map(function (dayOfWeek) { return (0, _set_day["default"])(new Date(0), dayOfWeek); }).map(function (headerDate) { return { abbr: (0, _format["default"])(headerDate, 'd', pickerLocale), full: (0, _format["default"])(headerDate, 'dddd', pickerLocale) }; }); } /** * Generate the set of weeks for a specific month */ function buildWeeks(year, monthIndex) { var firstDayOfWeek = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; var firstDateOfMonth = new Date(year, monthIndex); var firstDateOfCalendar = (0, _start_of_week["default"])(firstDateOfMonth, { weekStartsOn: firstDayOfWeek }); var dates = new Array(7 * 6).fill(0).map(function (_, i) { return (0, _add_days["default"])(firstDateOfCalendar, i); }); return (0, _chunk["default"])(dates, 7); } /** * Generate th sets of months, each set has the size of provided "chunkSize" */ function buildMonths(chunkSize, t) { var pickerLocale = getPickerLocale(t); var months = new Array(12).fill(0).map(function (_, i) { return i; }).map(function (index) { return { index: index, name: (0, _format["default"])((0, _add_months["default"])(new Date(0), index), 'MMMM', pickerLocale) }; }); return (0, _chunk["default"])(months, chunkSize); } /** * Generate a years window, centered on the current year by default, or the provided one */ function buildYears(middle) { var window = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3; var middleYear = middle === undefined ? (0, _get_year["default"])(new Date()) : middle; var start = middleYear - window; var end = middleYear + window; var years = []; for (var i = start; i <= end; i += 1) { years.push(i); } return years; } //# sourceMappingURL=generator.js.map /***/ }), /* 483 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DateRangeContext = void 0; var _react = _interopRequireDefault(__webpack_require__(0)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /* eslint-disable import/prefer-default-export */ var DateRangeContext = /*#__PURE__*/_react["default"].createContext(); exports.DateRangeContext = DateRangeContext; //# sourceMappingURL=Context.js.map /***/ }), /* 484 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.END_DRAG = exports.DROP = exports.HOVER = exports.PUBLISH_DRAG_SOURCE = exports.BEGIN_DRAG = undefined; 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; }; exports.beginDrag = beginDrag; exports.publishDragSource = publishDragSource; exports.hover = hover; exports.drop = drop; exports.endDrag = endDrag; var _invariant = __webpack_require__(51); var _invariant2 = _interopRequireDefault(_invariant); var _isArray = __webpack_require__(39); var _isArray2 = _interopRequireDefault(_isArray); var _isObject = __webpack_require__(93); var _isObject2 = _interopRequireDefault(_isObject); var _matchesType = __webpack_require__(1263); var _matchesType2 = _interopRequireDefault(_matchesType); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var BEGIN_DRAG = exports.BEGIN_DRAG = 'dnd-core/BEGIN_DRAG'; var PUBLISH_DRAG_SOURCE = exports.PUBLISH_DRAG_SOURCE = 'dnd-core/PUBLISH_DRAG_SOURCE'; var HOVER = exports.HOVER = 'dnd-core/HOVER'; var DROP = exports.DROP = 'dnd-core/DROP'; var END_DRAG = exports.END_DRAG = 'dnd-core/END_DRAG'; function beginDrag(sourceIds) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { publishSource: true, clientOffset: null }; var publishSource = options.publishSource, clientOffset = options.clientOffset, getSourceClientOffset = options.getSourceClientOffset; (0, _invariant2.default)((0, _isArray2.default)(sourceIds), 'Expected sourceIds to be an array.'); var monitor = this.getMonitor(); var registry = this.getRegistry(); (0, _invariant2.default)(!monitor.isDragging(), 'Cannot call beginDrag while dragging.'); for (var i = 0; i < sourceIds.length; i++) { (0, _invariant2.default)(registry.getSource(sourceIds[i]), 'Expected sourceIds to be registered.'); } var sourceId = null; for (var _i = sourceIds.length - 1; _i >= 0; _i--) { if (monitor.canDragSource(sourceIds[_i])) { sourceId = sourceIds[_i]; break; } } if (sourceId === null) { return; } var sourceClientOffset = null; if (clientOffset) { (0, _invariant2.default)(typeof getSourceClientOffset === 'function', 'When clientOffset is provided, getSourceClientOffset must be a function.'); sourceClientOffset = getSourceClientOffset(sourceId); } var source = registry.getSource(sourceId); var item = source.beginDrag(monitor, sourceId); (0, _invariant2.default)((0, _isObject2.default)(item), 'Item must be an object.'); registry.pinSource(sourceId); var itemType = registry.getSourceType(sourceId); return { type: BEGIN_DRAG, itemType: itemType, item: item, sourceId: sourceId, clientOffset: clientOffset, sourceClientOffset: sourceClientOffset, isSourcePublic: publishSource }; } function publishDragSource() { var monitor = this.getMonitor(); if (!monitor.isDragging()) { return; } return { type: PUBLISH_DRAG_SOURCE }; } function hover(targetIdsArg) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref$clientOffset = _ref.clientOffset, clientOffset = _ref$clientOffset === undefined ? null : _ref$clientOffset; (0, _invariant2.default)((0, _isArray2.default)(targetIdsArg), 'Expected targetIds to be an array.'); var targetIds = targetIdsArg.slice(0); var monitor = this.getMonitor(); var registry = this.getRegistry(); (0, _invariant2.default)(monitor.isDragging(), 'Cannot call hover while not dragging.'); (0, _invariant2.default)(!monitor.didDrop(), 'Cannot call hover after drop.'); // First check invariants. for (var i = 0; i < targetIds.length; i++) { var targetId = targetIds[i]; (0, _invariant2.default)(targetIds.lastIndexOf(targetId) === i, 'Expected targetIds to be unique in the passed array.'); var target = registry.getTarget(targetId); (0, _invariant2.default)(target, 'Expected targetIds to be registered.'); } var draggedItemType = monitor.getItemType(); // Remove those targetIds that don't match the targetType. This // fixes shallow isOver which would only be non-shallow because of // non-matching targets. for (var _i2 = targetIds.length - 1; _i2 >= 0; _i2--) { var _targetId = targetIds[_i2]; var targetType = registry.getTargetType(_targetId); if (!(0, _matchesType2.default)(targetType, draggedItemType)) { targetIds.splice(_i2, 1); } } // Finally call hover on all matching targets. for (var _i3 = 0; _i3 < targetIds.length; _i3++) { var _targetId2 = targetIds[_i3]; var _target = registry.getTarget(_targetId2); _target.hover(monitor, _targetId2); } return { type: HOVER, targetIds: targetIds, clientOffset: clientOffset }; } function drop() { var _this = this; var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var monitor = this.getMonitor(); var registry = this.getRegistry(); (0, _invariant2.default)(monitor.isDragging(), 'Cannot call drop while not dragging.'); (0, _invariant2.default)(!monitor.didDrop(), 'Cannot call drop twice during one drag operation.'); var targetIds = monitor.getTargetIds().filter(monitor.canDropOnTarget, monitor); targetIds.reverse(); targetIds.forEach(function (targetId, index) { var target = registry.getTarget(targetId); var dropResult = target.drop(monitor, targetId); (0, _invariant2.default)(typeof dropResult === 'undefined' || (0, _isObject2.default)(dropResult), 'Drop result must either be an object or undefined.'); if (typeof dropResult === 'undefined') { dropResult = index === 0 ? {} : monitor.getDropResult(); } _this.store.dispatch({ type: DROP, dropResult: _extends({}, options, dropResult) }); }); } function endDrag() { var monitor = this.getMonitor(); var registry = this.getRegistry(); (0, _invariant2.default)(monitor.isDragging(), 'Cannot call endDrag while not dragging.'); var sourceId = monitor.getSourceId(); var source = registry.getSource(sourceId, true); source.endDrag(monitor, sourceId); registry.unpinSource(); return { type: END_DRAG }; } /***/ }), /* 485 */ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(766), setCacheAdd = __webpack_require__(2941), setCacheHas = __webpack_require__(2942); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache; /***/ }), /* 486 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(242); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /* 487 */ /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(2931), listCacheDelete = __webpack_require__(2932), listCacheGet = __webpack_require__(2933), listCacheHas = __webpack_require__(2934), listCacheSet = __webpack_require__(2935); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /* 488 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(489); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /* 489 */ /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /* 490 */ /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(2937); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /* 491 */ /***/ (function(module, exports) { /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } module.exports = cacheHas; /***/ }), /* 492 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(296), overRest = __webpack_require__(1267), setToString = __webpack_require__(1268); /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { return setToString(overRest(func, start, identity), func + ''); } module.exports = baseRest; /***/ }), /* 493 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addSource = addSource; exports.addTarget = addTarget; exports.removeSource = removeSource; exports.removeTarget = removeTarget; var ADD_SOURCE = exports.ADD_SOURCE = 'dnd-core/ADD_SOURCE'; var ADD_TARGET = exports.ADD_TARGET = 'dnd-core/ADD_TARGET'; var REMOVE_SOURCE = exports.REMOVE_SOURCE = 'dnd-core/REMOVE_SOURCE'; var REMOVE_TARGET = exports.REMOVE_TARGET = 'dnd-core/REMOVE_TARGET'; function addSource(sourceId) { return { type: ADD_SOURCE, sourceId: sourceId }; } function addTarget(targetId) { return { type: ADD_TARGET, targetId: targetId }; } function removeSource(sourceId) { return { type: REMOVE_SOURCE, sourceId: sourceId }; } function removeTarget(targetId) { return { type: REMOVE_TARGET, targetId: targetId }; } /***/ }), /* 494 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(773), isFlattenable = __webpack_require__(2953); /** * The base implementation of `_.flatten` with support for restricting flattening. * * @private * @param {Array} array The array to flatten. * @param {number} depth The maximum recursion depth. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. * @param {Array} [result=[]] The initial result value. * @returns {Array} Returns the new flattened array. */ function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; predicate || (predicate = isFlattenable); result || (result = []); while (++index < length) { var value = array[index]; if (depth > 0 && predicate(value)) { if (depth > 1) { // Recursively flatten arrays (susceptible to call stack limits). baseFlatten(value, depth - 1, predicate, isStrict, result); } else { arrayPush(result, value); } } else if (!isStrict) { result[result.length] = value; } } return result; } module.exports = baseFlatten; /***/ }), /* 495 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports.default = checkDecoratorArguments; function checkDecoratorArguments(functionName, signature) { if (process.env.NODE_ENV !== 'production') { for (var i = 0; i < (arguments.length <= 2 ? 0 : arguments.length - 2); i += 1) { var arg = arguments.length <= i + 2 ? undefined : arguments[i + 2]; if (arg && arg.prototype && arg.prototype.render) { // eslint-disable-next-line no-console console.error('You seem to be applying the arguments in the wrong order. ' + ('It should be ' + functionName + '(' + signature + ')(Component), not the other way around. ') + 'Read more: http://react-dnd.github.io/react-dnd/docs-troubleshooting.html#you-seem-to-be-applying-the-arguments-in-the-wrong-order'); return; } } } } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 496 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.findInArray = findInArray; exports.isFunction = isFunction; exports.isNum = isNum; exports.int = int; exports.dontSetMe = dontSetMe; // @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc function findInArray(array /*: Array | TouchList*/ , callback /*: Function*/ ) /*: any*/ { for (var i = 0, length = array.length; i < length; i++) { if (callback.apply(callback, [array[i], i, array])) return array[i]; } } function isFunction(func /*: any*/ ) /*: boolean %checks*/ { return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]'; } function isNum(num /*: any*/ ) /*: boolean %checks*/ { return typeof num === 'number' && !isNaN(num); } function int(a /*: string*/ ) /*: number*/ { return parseInt(a, 10); } function dontSetMe(props /*: Object*/ , propName /*: string*/ , componentName /*: string*/ ) { if (props[propName]) { return new Error("Invalid prop ".concat(propName, " passed to ").concat(componentName, " - do not set this, set it on the child.")); } } /***/ }), /* 497 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ColumnChooserProvider = exports.columnChooserContext = exports.useColumnChooserContext = void 0; var _react = __webpack_require__(0); var columnChooserContext = /*#__PURE__*/(0, _react.createContext)(); exports.columnChooserContext = columnChooserContext; var useColumnChooserContext = function useColumnChooserContext() { var context = (0, _react.useContext)(columnChooserContext); if (!context) { throw new Error('[columnChooserContext]: you are using some column chooser components outside the column chooser context'); } return context; }; exports.useColumnChooserContext = useColumnChooserContext; var ColumnChooserProvider = columnChooserContext.Provider; exports.ColumnChooserProvider = ColumnChooserProvider; //# sourceMappingURL=columnChooser.context.js.map /***/ }), /* 498 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Millisecond Helpers * @summary Get the number of milliseconds between the given dates. * * @description * Get the number of milliseconds between the given dates. * * @param {Date|String|Number} dateLeft - the later date * @param {Date|String|Number} dateRight - the earlier date * @returns {Number} the number of milliseconds * * @example * // How many milliseconds are between * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700? * var result = differenceInMilliseconds( * new Date(2014, 6, 2, 12, 30, 21, 700), * new Date(2014, 6, 2, 12, 30, 20, 600) * ) * //=> 1100 */ function differenceInMilliseconds (dirtyDateLeft, dirtyDateRight) { var dateLeft = parse(dirtyDateLeft) var dateRight = parse(dirtyDateRight) return dateLeft.getTime() - dateRight.getTime() } module.exports = differenceInMilliseconds /***/ }), /* 499 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ListView = _interopRequireDefault(__webpack_require__(3360)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _ListView["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 500 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_arc__ = __webpack_require__(3407); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return __WEBPACK_IMPORTED_MODULE_0__src_arc__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_area__ = __webpack_require__(1382); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "area", function() { return __WEBPACK_IMPORTED_MODULE_1__src_area__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_line__ = __webpack_require__(813); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "line", function() { return __WEBPACK_IMPORTED_MODULE_2__src_line__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_pie__ = __webpack_require__(3409); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return __WEBPACK_IMPORTED_MODULE_3__src_pie__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__src_areaRadial__ = __webpack_require__(3412); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return __WEBPACK_IMPORTED_MODULE_4__src_areaRadial__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return __WEBPACK_IMPORTED_MODULE_4__src_areaRadial__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__src_lineRadial__ = __webpack_require__(1384); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return __WEBPACK_IMPORTED_MODULE_5__src_lineRadial__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return __WEBPACK_IMPORTED_MODULE_5__src_lineRadial__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__src_pointRadial__ = __webpack_require__(1385); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return __WEBPACK_IMPORTED_MODULE_6__src_pointRadial__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__src_link_index__ = __webpack_require__(3413); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return __WEBPACK_IMPORTED_MODULE_7__src_link_index__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return __WEBPACK_IMPORTED_MODULE_7__src_link_index__["c"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return __WEBPACK_IMPORTED_MODULE_7__src_link_index__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__src_symbol__ = __webpack_require__(3414); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return __WEBPACK_IMPORTED_MODULE_8__src_symbol__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return __WEBPACK_IMPORTED_MODULE_8__src_symbol__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__src_symbol_circle__ = __webpack_require__(1387); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return __WEBPACK_IMPORTED_MODULE_9__src_symbol_circle__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__src_symbol_cross__ = __webpack_require__(1388); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return __WEBPACK_IMPORTED_MODULE_10__src_symbol_cross__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__src_symbol_diamond__ = __webpack_require__(1389); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return __WEBPACK_IMPORTED_MODULE_11__src_symbol_diamond__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__src_symbol_square__ = __webpack_require__(1391); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return __WEBPACK_IMPORTED_MODULE_12__src_symbol_square__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__src_symbol_star__ = __webpack_require__(1390); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return __WEBPACK_IMPORTED_MODULE_13__src_symbol_star__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__src_symbol_triangle__ = __webpack_require__(1392); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return __WEBPACK_IMPORTED_MODULE_14__src_symbol_triangle__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__src_symbol_wye__ = __webpack_require__(1393); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return __WEBPACK_IMPORTED_MODULE_15__src_symbol_wye__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__src_curve_basisClosed__ = __webpack_require__(3415); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return __WEBPACK_IMPORTED_MODULE_16__src_curve_basisClosed__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__src_curve_basisOpen__ = __webpack_require__(3416); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return __WEBPACK_IMPORTED_MODULE_17__src_curve_basisOpen__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__src_curve_basis__ = __webpack_require__(503); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return __WEBPACK_IMPORTED_MODULE_18__src_curve_basis__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__src_curve_bundle__ = __webpack_require__(3417); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return __WEBPACK_IMPORTED_MODULE_19__src_curve_bundle__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__src_curve_cardinalClosed__ = __webpack_require__(1394); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return __WEBPACK_IMPORTED_MODULE_20__src_curve_cardinalClosed__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__src_curve_cardinalOpen__ = __webpack_require__(1395); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return __WEBPACK_IMPORTED_MODULE_21__src_curve_cardinalOpen__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__src_curve_cardinal__ = __webpack_require__(504); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return __WEBPACK_IMPORTED_MODULE_22__src_curve_cardinal__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__src_curve_catmullRomClosed__ = __webpack_require__(3418); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return __WEBPACK_IMPORTED_MODULE_23__src_curve_catmullRomClosed__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__src_curve_catmullRomOpen__ = __webpack_require__(3419); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return __WEBPACK_IMPORTED_MODULE_24__src_curve_catmullRomOpen__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__src_curve_catmullRom__ = __webpack_require__(815); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return __WEBPACK_IMPORTED_MODULE_25__src_curve_catmullRom__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__src_curve_linearClosed__ = __webpack_require__(3420); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return __WEBPACK_IMPORTED_MODULE_26__src_curve_linearClosed__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__src_curve_linear__ = __webpack_require__(501); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return __WEBPACK_IMPORTED_MODULE_27__src_curve_linear__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__src_curve_monotone__ = __webpack_require__(3421); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return __WEBPACK_IMPORTED_MODULE_28__src_curve_monotone__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return __WEBPACK_IMPORTED_MODULE_28__src_curve_monotone__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__src_curve_natural__ = __webpack_require__(3422); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return __WEBPACK_IMPORTED_MODULE_29__src_curve_natural__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__src_curve_step__ = __webpack_require__(3423); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return __WEBPACK_IMPORTED_MODULE_30__src_curve_step__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return __WEBPACK_IMPORTED_MODULE_30__src_curve_step__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return __WEBPACK_IMPORTED_MODULE_30__src_curve_step__["c"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__src_stack__ = __webpack_require__(3424); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return __WEBPACK_IMPORTED_MODULE_31__src_stack__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__src_offset_expand__ = __webpack_require__(3425); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return __WEBPACK_IMPORTED_MODULE_32__src_offset_expand__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__src_offset_diverging__ = __webpack_require__(3426); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return __WEBPACK_IMPORTED_MODULE_33__src_offset_diverging__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__src_offset_none__ = __webpack_require__(382); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return __WEBPACK_IMPORTED_MODULE_34__src_offset_none__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__src_offset_silhouette__ = __webpack_require__(3427); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return __WEBPACK_IMPORTED_MODULE_35__src_offset_silhouette__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__src_offset_wiggle__ = __webpack_require__(3428); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return __WEBPACK_IMPORTED_MODULE_36__src_offset_wiggle__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__src_order_ascending__ = __webpack_require__(816); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return __WEBPACK_IMPORTED_MODULE_37__src_order_ascending__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__src_order_descending__ = __webpack_require__(3429); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return __WEBPACK_IMPORTED_MODULE_38__src_order_descending__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__src_order_insideOut__ = __webpack_require__(3430); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return __WEBPACK_IMPORTED_MODULE_39__src_order_insideOut__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__src_order_none__ = __webpack_require__(383); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return __WEBPACK_IMPORTED_MODULE_40__src_order_none__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__src_order_reverse__ = __webpack_require__(3431); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return __WEBPACK_IMPORTED_MODULE_41__src_order_reverse__["a"]; }); // Note: radialArea is deprecated! // Note: radialLine is deprecated! /***/ }), /* 501 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; function Linear(context) { this._context = context; } Linear.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._point = 0; }, lineEnd: function() { if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; // proceed default: this._context.lineTo(x, y); break; } } }; /* harmony default export */ __webpack_exports__["a"] = (function(context) { return new Linear(context); }); /***/ }), /* 502 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony default export */ __webpack_exports__["a"] = (function() {}); /***/ }), /* 503 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["c"] = point; /* harmony export (immutable) */ __webpack_exports__["a"] = Basis; function point(that, x, y) { that._context.bezierCurveTo( (2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6 ); } function Basis(context) { this._context = context; } Basis.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._y0 = this._y1 = NaN; this._point = 0; }, lineEnd: function() { switch (this._point) { case 3: point(this, this._x1, this._y1); // proceed case 2: this._context.lineTo(this._x1, this._y1); break; } if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; break; case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed default: point(this, x, y); break; } this._x0 = this._x1, this._x1 = x; this._y0 = this._y1, this._y1 = y; } }; /* harmony default export */ __webpack_exports__["b"] = (function(context) { return new Basis(context); }); /***/ }), /* 504 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["c"] = point; /* harmony export (immutable) */ __webpack_exports__["a"] = Cardinal; function point(that, x, y) { that._context.bezierCurveTo( that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2 ); } function Cardinal(context, tension) { this._context = context; this._k = (1 - tension) / 6; } Cardinal.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; this._point = 0; }, lineEnd: function() { switch (this._point) { case 2: this._context.lineTo(this._x2, this._y2); break; case 3: point(this, this._x1, this._y1); break; } if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; this._x1 = x, this._y1 = y; break; case 2: this._point = 3; // proceed default: point(this, x, y); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["b"] = ((function custom(tension) { function cardinal(context) { return new Cardinal(context, tension); } cardinal.tension = function(tension) { return custom(+tension); }; return cardinal; })(0)); /***/ }), /* 505 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(302); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /* 506 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /* 507 */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /* 508 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(200), isArray = __webpack_require__(39), isObjectLike = __webpack_require__(129); /** `Object#toString` result references. */ var stringTag = '[object String]'; /** * Checks if `value` is classified as a `String` primitive or object. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); * // => true * * _.isString(1); * // => false */ function isString(value) { return typeof value == 'string' || (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } module.exports = isString; /***/ }), /* 509 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(39), isKey = __webpack_require__(829), stringToPath = __webpack_require__(3490), toString = __webpack_require__(3493); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /* 510 */ /***/ (function(module, exports, __webpack_require__) { var isNumber = __webpack_require__(511); /** * Checks if `value` is `NaN`. * * **Note:** This method is based on * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for * `undefined` and other non-number values. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. * @example * * _.isNaN(NaN); * // => true * * _.isNaN(new Number(NaN)); * // => true * * isNaN(undefined); * // => true * * _.isNaN(undefined); * // => false */ function isNaN(value) { // An `NaN` primitive is the only value that is not equal to itself. // Perform the `toStringTag` check first to avoid errors with some // ActiveX objects in IE. return isNumber(value) && value != +value; } module.exports = isNaN; /***/ }), /* 511 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(200), isObjectLike = __webpack_require__(129); /** `Object#toString` result references. */ var numberTag = '[object Number]'; /** * Checks if `value` is classified as a `Number` primitive or object. * * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are * classified as numbers, use the `_.isFinite` method. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); * // => true * * _.isNumber(Number.MIN_VALUE); * // => true * * _.isNumber(Infinity); * // => true * * _.isNumber('3'); * // => false */ function isNumber(value) { return typeof value == 'number' || (isObjectLike(value) && baseGetTag(value) == numberTag); } module.exports = isNumber; /***/ }), /* 512 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = shallowEqual; function shallowEqual(a, b) { /* eslint-disable no-restricted-syntax */ for (var key in a) { if ({}.hasOwnProperty.call(a, key) && (!{}.hasOwnProperty.call(b, key) || a[key] !== b[key])) { return false; } } for (var _key in b) { if ({}.hasOwnProperty.call(b, _key) && !{}.hasOwnProperty.call(a, _key)) { return false; } } return true; } /***/ }), /* 513 */ /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(3511), Map = __webpack_require__(767), Promise = __webpack_require__(3512), Set = __webpack_require__(1272), WeakMap = __webpack_require__(3513), baseGetTag = __webpack_require__(200), toSource = __webpack_require__(1265); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /* 514 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isNil__ = __webpack_require__(106); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isNil__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_uniqBy__ = __webpack_require__(1411); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_uniqBy___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_uniqBy__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_smooth__ = __webpack_require__(115); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__DefaultTooltipContent__ = __webpack_require__(3540); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__util_DataUtils__ = __webpack_require__(42); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Tooltip */ var CLS_PREFIX = 'recharts-tooltip-wrapper'; var EPS = 1; var defaultUniqBy = function defaultUniqBy(entry) { return entry.dataKey; }; var getUniqPaylod = function getUniqPaylod(option, payload) { if (option === true) { return __WEBPACK_IMPORTED_MODULE_2_lodash_uniqBy___default()(payload, defaultUniqBy); } if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(option)) { return __WEBPACK_IMPORTED_MODULE_2_lodash_uniqBy___default()(payload, option); } return payload; }; var propTypes = { allowEscapeViewBox: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ x: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a["boolean"], y: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a["boolean"] }), content: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.element, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func]), viewBox: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ x: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, y: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, width: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, height: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number }), active: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, separator: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, formatter: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, offset: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, itemStyle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object, labelStyle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object, wrapperStyle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object, contentStyle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object, cursor: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.element, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object]), coordinate: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ x: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, y: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number }), position: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ x: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, y: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number }), label: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any, payload: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ name: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any, value: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.array]), unit: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any, type: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_8__util_ReactUtils__["e" /* TOOLTIP_TYPES */]) })), paylodUniqBy: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool]), isAnimationActive: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, animationDuration: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, animationEasing: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear']), itemSorter: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, filterNull: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, useTranslate3d: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool }; var defaultProps = { active: false, allowEscapeViewBox: { x: false, y: false }, offset: 10, viewBox: { x1: 0, x2: 0, y1: 0, y2: 0 }, coordinate: { x: 0, y: 0 }, cursorStyle: {}, separator: ' : ', wrapperStyle: {}, contentStyle: {}, itemStyle: {}, labelStyle: {}, cursor: true, isAnimationActive: !Object(__WEBPACK_IMPORTED_MODULE_8__util_ReactUtils__["o" /* isSsr */])(), animationEasing: 'ease', animationDuration: 400, filterNull: true, useTranslate3d: false }; var renderContent = function renderContent(content, props) { if (__WEBPACK_IMPORTED_MODULE_3_react___default.a.isValidElement(content)) { return __WEBPACK_IMPORTED_MODULE_3_react___default.a.cloneElement(content, props); } if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(content)) { return content(props); } return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__DefaultTooltipContent__["a" /* default */], props); }; var Tooltip = /*#__PURE__*/ function (_PureComponent) { _inherits(Tooltip, _PureComponent); function Tooltip() { var _getPrototypeOf2; var _this; _classCallCheck(this, Tooltip); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Tooltip)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { boxWidth: -1, boxHeight: -1 }; _this.getTranslate = function (_ref) { var key = _ref.key, tooltipDimension = _ref.tooltipDimension, viewBoxDimension = _ref.viewBoxDimension; var _this$props = _this.props, allowEscapeViewBox = _this$props.allowEscapeViewBox, coordinate = _this$props.coordinate, offset = _this$props.offset, position = _this$props.position, viewBox = _this$props.viewBox; if (position && Object(__WEBPACK_IMPORTED_MODULE_9__util_DataUtils__["h" /* isNumber */])(position[key])) { return position[key]; } var restricted = coordinate[key] - tooltipDimension - offset; var unrestricted = coordinate[key] + offset; if (allowEscapeViewBox[key]) { return unrestricted; } var tooltipBoundary = coordinate[key] + tooltipDimension + offset; var viewBoxBoundary = viewBox[key] + viewBoxDimension; if (tooltipBoundary > viewBoxBoundary) { return Math.max(restricted, viewBox[key]); } return Math.max(unrestricted, viewBox[key]); }; return _this; } _createClass(Tooltip, [{ key: "componentDidMount", value: function componentDidMount() { this.updateBBox(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.updateBBox(); } }, { key: "updateBBox", value: function updateBBox() { var _this$state = this.state, boxWidth = _this$state.boxWidth, boxHeight = _this$state.boxHeight; if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) { var box = this.wrapperNode.getBoundingClientRect(); if (Math.abs(box.width - boxWidth) > EPS || Math.abs(box.height - boxHeight) > EPS) { this.setState({ boxWidth: box.width, boxHeight: box.height }); } } else if (boxWidth !== -1 || boxHeight !== -1) { this.setState({ boxWidth: -1, boxHeight: -1 }); } } }, { key: "render", value: function render() { var _classNames, _this2 = this; var _this$props2 = this.props, payload = _this$props2.payload, isAnimationActive = _this$props2.isAnimationActive, animationDuration = _this$props2.animationDuration, animationEasing = _this$props2.animationEasing, filterNull = _this$props2.filterNull, paylodUniqBy = _this$props2.paylodUniqBy; var finalPayload = getUniqPaylod(paylodUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) { return !__WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(entry.value); }) : payload); var hasPayload = finalPayload && finalPayload.length; var _this$props3 = this.props, content = _this$props3.content, viewBox = _this$props3.viewBox, coordinate = _this$props3.coordinate, position = _this$props3.position, active = _this$props3.active, wrapperStyle = _this$props3.wrapperStyle; var outerStyle = _objectSpread({ pointerEvents: 'none', visibility: active && hasPayload ? 'visible' : 'hidden', position: 'absolute', top: 0 }, wrapperStyle); var translateX, translateY; if (position && Object(__WEBPACK_IMPORTED_MODULE_9__util_DataUtils__["h" /* isNumber */])(position.x) && Object(__WEBPACK_IMPORTED_MODULE_9__util_DataUtils__["h" /* isNumber */])(position.y)) { translateX = position.x; translateY = position.y; } else { var _this$state2 = this.state, boxWidth = _this$state2.boxWidth, boxHeight = _this$state2.boxHeight; if (boxWidth > 0 && boxHeight > 0 && coordinate) { translateX = this.getTranslate({ key: 'x', tooltipDimension: boxWidth, viewBoxDimension: viewBox.width }); translateY = this.getTranslate({ key: 'y', tooltipDimension: boxHeight, viewBoxDimension: viewBox.height }); } else { outerStyle.visibility = 'hidden'; } } outerStyle = _objectSpread({}, Object(__WEBPACK_IMPORTED_MODULE_5_react_smooth__["b" /* translateStyle */])({ transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)") }), {}, outerStyle); if (isAnimationActive && active) { outerStyle = _objectSpread({}, Object(__WEBPACK_IMPORTED_MODULE_5_react_smooth__["b" /* translateStyle */])({ transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing) }), {}, outerStyle); } var cls = __WEBPACK_IMPORTED_MODULE_6_classnames___default()(CLS_PREFIX, (_classNames = {}, _defineProperty(_classNames, "".concat(CLS_PREFIX, "-right"), Object(__WEBPACK_IMPORTED_MODULE_9__util_DataUtils__["h" /* isNumber */])(translateX) && coordinate && Object(__WEBPACK_IMPORTED_MODULE_9__util_DataUtils__["h" /* isNumber */])(coordinate.x) && translateX >= coordinate.x), _defineProperty(_classNames, "".concat(CLS_PREFIX, "-left"), Object(__WEBPACK_IMPORTED_MODULE_9__util_DataUtils__["h" /* isNumber */])(translateX) && coordinate && Object(__WEBPACK_IMPORTED_MODULE_9__util_DataUtils__["h" /* isNumber */])(coordinate.x) && translateX < coordinate.x), _defineProperty(_classNames, "".concat(CLS_PREFIX, "-bottom"), Object(__WEBPACK_IMPORTED_MODULE_9__util_DataUtils__["h" /* isNumber */])(translateY) && coordinate && Object(__WEBPACK_IMPORTED_MODULE_9__util_DataUtils__["h" /* isNumber */])(coordinate.y) && translateY >= coordinate.y), _defineProperty(_classNames, "".concat(CLS_PREFIX, "-top"), Object(__WEBPACK_IMPORTED_MODULE_9__util_DataUtils__["h" /* isNumber */])(translateY) && coordinate && Object(__WEBPACK_IMPORTED_MODULE_9__util_DataUtils__["h" /* isNumber */])(coordinate.y) && translateY < coordinate.y), _classNames)); return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("div", { className: cls, style: outerStyle, ref: function ref(node) { _this2.wrapperNode = node; } }, renderContent(content, _objectSpread({}, this.props, { payload: finalPayload }))); } }]); return Tooltip; }(__WEBPACK_IMPORTED_MODULE_3_react__["PureComponent"]); Tooltip.displayName = 'Tooltip'; Tooltip.propTypes = propTypes; Tooltip.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Tooltip); /***/ }), /* 515 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getIntersectionKeys; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return identity; }); /* unused harmony export getDashCase */ /* unused harmony export generatePrefixStyle */ /* unused harmony export log */ /* unused harmony export debug */ /* unused harmony export debugf */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return mapObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return translateStyle; }); /* unused harmony export compose */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getTransitionVal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return warn; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_intersection__ = __webpack_require__(1274); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_intersection___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_intersection__); function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /* eslint no-console: 0 */ var PREFIX_LIST = ['Webkit', 'Moz', 'O', 'ms']; var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-']; var IN_COMPATIBLE_PROPERTY = ['transform', 'transformOrigin', 'transition']; var getIntersectionKeys = function getIntersectionKeys(preObj, nextObj) { return __WEBPACK_IMPORTED_MODULE_0_lodash_intersection___default()(Object.keys(preObj), Object.keys(nextObj)); }; var identity = function identity(param) { return param; }; /* * @description: convert camel case to dash case * string => string */ var getDashCase = function getDashCase(name) { return name.replace(/([A-Z])/g, function (v) { return "-".concat(v.toLowerCase()); }); }; /* * @description: add compatible style prefix * (string, string) => object */ var generatePrefixStyle = function generatePrefixStyle(name, value) { if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) { return _defineProperty({}, name, value); } var isTransition = name === 'transition'; var camelName = name.replace(/(\w)/, function (v) { return v.toUpperCase(); }); var styleVal = value; return PREFIX_LIST.reduce(function (result, property, i) { if (isTransition) { styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1")); } return _objectSpread({}, result, _defineProperty({}, property + camelName, styleVal)); }, {}); }; var log = function log() { var _console; (_console = console).log.apply(_console, arguments); }; /* * @description: log the value of a varible * string => any => any */ var debug = function debug(name) { return function (item) { log(name, item); return item; }; }; /* * @description: log name, args, return value of a function * function => function */ var debugf = function debugf(tag, f) { return function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var res = f.apply(void 0, args); var name = tag || f.name || 'anonymous function'; var argNames = "(".concat(args.map(JSON.stringify).join(', '), ")"); log("".concat(name, ": ").concat(argNames, " => ").concat(JSON.stringify(res))); return res; }; }; /* * @description: map object on every element in this object. * (function, object) => object */ var mapObject = function mapObject(fn, obj) { return Object.keys(obj).reduce(function (res, key) { return _objectSpread({}, res, _defineProperty({}, key, fn(key, obj[key]))); }, {}); }; /* * @description: add compatible prefix to style * object => object */ var translateStyle = function translateStyle(style) { return Object.keys(style).reduce(function (res, key) { return _objectSpread({}, res, generatePrefixStyle(key, res[key])); }, style); }; var compose = function compose() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } if (!args.length) { return identity; } var fns = args.reverse(); // first function can receive multiply arguments var firstFn = fns[0]; var tailsFn = fns.slice(1); return function () { return tailsFn.reduce(function (res, fn) { return fn(res); }, firstFn.apply(void 0, arguments)); }; }; var getTransitionVal = function getTransitionVal(props, duration, easing) { return props.map(function (prop) { return "".concat(getDashCase(prop), " ").concat(duration, "ms ").concat(easing); }).join(','); }; var isDev = process.env.NODE_ENV !== 'production'; var warn = function warn(condition, format, a, b, c, d, e, f) { if (isDev && typeof console !== 'undefined' && console.warn) { if (format === undefined) { console.warn('LogUtils requires an error message argument'); } if (!condition) { if (format === undefined) { console.warn('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; console.warn(format.replace(/%s/g, function () { return args[argIndex++]; })); } } } }; /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 516 */ /***/ (function(module, exports, __webpack_require__) { var baseForOwn = __webpack_require__(1425), createBaseEach = __webpack_require__(3534); /** * The base implementation of `_.forEach` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array|Object} Returns `collection`. */ var baseEach = createBaseEach(baseForOwn); module.exports = baseEach; /***/ }), /* 517 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(489), isArrayLike = __webpack_require__(244), isIndex = __webpack_require__(835), isObject = __webpack_require__(93); /** * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, * else `false`. */ function isIterateeCall(value, index, object) { if (!isObject(object)) { return false; } var type = typeof index; if (type == 'number' ? (isArrayLike(object) && isIndex(index, object.length)) : (type == 'string' && index in object) ) { return eq(object[index], value); } return false; } module.exports = isIterateeCall; /***/ }), /* 518 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export getStyleString */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStringSize; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getOffset; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return calculateChartCoordinate; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ReactUtils__ = __webpack_require__(22); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } var stringCache = { widthCache: {}, cacheCount: 0 }; var MAX_CACHE_NUM = 2000; var SPAN_STYLE = { position: 'absolute', top: '-20000px', left: 0, padding: 0, margin: 0, border: 'none', whiteSpace: 'pre' }; var STYLE_LIST = ['minWidth', 'maxWidth', 'width', 'minHeight', 'maxHeight', 'height', 'top', 'left', 'fontSize', 'lineHeight', 'padding', 'margin', 'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom']; var MEASUREMENT_SPAN_ID = 'recharts_measurement_span'; function autoCompleteStyle(name, value) { if (STYLE_LIST.indexOf(name) >= 0 && value === +value) { return "".concat(value, "px"); } return value; } function camelToMiddleLine(text) { var strs = text.split(''); var formatStrs = strs.reduce(function (result, entry) { if (entry === entry.toUpperCase()) { return [].concat(_toConsumableArray(result), ['-', entry.toLowerCase()]); } return [].concat(_toConsumableArray(result), [entry]); }, []); return formatStrs.join(''); } var getStyleString = function getStyleString(style) { return Object.keys(style).reduce(function (result, s) { return "".concat(result).concat(camelToMiddleLine(s), ":").concat(autoCompleteStyle(s, style[s]), ";"); }, ''); }; var getStringSize = function getStringSize(text) { var style = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (text === undefined || text === null || Object(__WEBPACK_IMPORTED_MODULE_0__ReactUtils__["o" /* isSsr */])()) { return { width: 0, height: 0 }; } var str = "".concat(text); var styleString = getStyleString(style); var cacheKey = "".concat(str, "-").concat(styleString); if (stringCache.widthCache[cacheKey]) { return stringCache.widthCache[cacheKey]; } try { var measurementSpan = document.getElementById(MEASUREMENT_SPAN_ID); if (!measurementSpan) { measurementSpan = document.createElement('span'); measurementSpan.setAttribute('id', MEASUREMENT_SPAN_ID); document.body.appendChild(measurementSpan); } // Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP) // https://en.wikipedia.org/wiki/Content_Security_Policy var measurementSpanStyle = _objectSpread({}, SPAN_STYLE, {}, style); Object.keys(measurementSpanStyle).map(function (styleKey) { measurementSpan.style[styleKey] = measurementSpanStyle[styleKey]; return styleKey; }); measurementSpan.textContent = str; var rect = measurementSpan.getBoundingClientRect(); var result = { width: rect.width, height: rect.height }; stringCache.widthCache[cacheKey] = result; if (++stringCache.cacheCount > MAX_CACHE_NUM) { stringCache.cacheCount = 0; stringCache.widthCache = {}; } return result; } catch (e) { return { width: 0, height: 0 }; } }; var getOffset = function getOffset(el) { var html = el.ownerDocument.documentElement; var box = { top: 0, left: 0 }; // If we don't have gBCR, just use 0,0 rather than error // BlackBerry 5, iOS 3 (original iPhone) if (typeof el.getBoundingClientRect !== 'undefined') { box = el.getBoundingClientRect(); } return { top: box.top + window.pageYOffset - html.clientTop, left: box.left + window.pageXOffset - html.clientLeft }; }; /** * Calculate coordinate of cursor in chart * @param {Object} event Event object * @param {Object} offset The offset of main part in the svg element * @return {Object} {chartX, chartY} */ var calculateChartCoordinate = function calculateChartCoordinate(event, offset) { return { chartX: Math.round(event.pageX - offset.left), chartY: Math.round(event.pageY - offset.top) }; }; /***/ }), /* 519 */ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(304); /** * The base implementation of methods like `_.max` and `_.min` which accepts a * `comparator` to determine the extremum value. * * @private * @param {Array} array The array to iterate over. * @param {Function} iteratee The iteratee invoked per iteration. * @param {Function} comparator The comparator used to compare values. * @returns {*} Returns the extremum value. */ function baseExtremum(array, iteratee, comparator) { var index = -1, length = array.length; while (++index < length) { var value = array[index], current = iteratee(value); if (current != null && (computed === undefined ? (current === current && !isSymbol(current)) : comparator(current, computed) )) { var computed = current, result = value; } } return result; } module.exports = baseExtremum; /***/ }), /* 520 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony default export */ __webpack_exports__["a"] = (function(a, b) { return a = +a, b = +b, function(t) { return a * (1 - t) + b * t; }; }); /***/ }), /* 521 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__formatDecimal_js__ = __webpack_require__(522); /* harmony default export */ __webpack_exports__["a"] = (function(x) { return x = Object(__WEBPACK_IMPORTED_MODULE_0__formatDecimal_js__["b" /* formatDecimalParts */])(Math.abs(x)), x ? x[1] : NaN; }); /***/ }), /* 522 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = formatDecimalParts; /* harmony default export */ __webpack_exports__["a"] = (function(x) { return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10); }); // Computes the decimal coefficient and exponent of the specified number x with // significant digits p, where x is positive and p is in [1, 21] or undefined. // For example, formatDecimalParts(1.23) returns ["123", 0]. function formatDecimalParts(x, p) { if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity var i, coefficient = x.slice(0, i); // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). return [ coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1) ]; } /***/ }), /* 523 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_PolarUtils__ = __webpack_require__(130); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_DataUtils__ = __webpack_require__(42); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Sector */ var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) { var sign = Object(__WEBPACK_IMPORTED_MODULE_5__util_DataUtils__["j" /* mathSign */])(endAngle - startAngle); var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999); return sign * deltaAngle; }; var getTangentCircle = function getTangentCircle(_ref) { var cx = _ref.cx, cy = _ref.cy, radius = _ref.radius, angle = _ref.angle, sign = _ref.sign, isExternal = _ref.isExternal, cornerRadius = _ref.cornerRadius, cornerIsExternal = _ref.cornerIsExternal; var centerRadius = cornerRadius * (isExternal ? 1 : -1) + radius; var theta = Math.asin(cornerRadius / centerRadius) / __WEBPACK_IMPORTED_MODULE_4__util_PolarUtils__["a" /* RADIAN */]; var centerAngle = cornerIsExternal ? angle : angle + sign * theta; var center = Object(__WEBPACK_IMPORTED_MODULE_4__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, centerRadius, centerAngle); // The coordinate of point which is tangent to the circle var circleTangency = Object(__WEBPACK_IMPORTED_MODULE_4__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, radius, centerAngle); // The coordinate of point which is tangent to the radius line var lineTangencyAngle = cornerIsExternal ? angle - sign * theta : angle; var lineTangency = Object(__WEBPACK_IMPORTED_MODULE_4__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, centerRadius * Math.cos(theta * __WEBPACK_IMPORTED_MODULE_4__util_PolarUtils__["a" /* RADIAN */]), lineTangencyAngle); return { center: center, circleTangency: circleTangency, lineTangency: lineTangency, theta: theta }; }; var getSectorPath = function getSectorPath(_ref2) { var cx = _ref2.cx, cy = _ref2.cy, innerRadius = _ref2.innerRadius, outerRadius = _ref2.outerRadius, startAngle = _ref2.startAngle, endAngle = _ref2.endAngle; var angle = getDeltaAngle(startAngle, endAngle); // When the angle of sector equals to 360, star point and end point coincide var tempEndAngle = startAngle + angle; var outerStartPoint = Object(__WEBPACK_IMPORTED_MODULE_4__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, outerRadius, startAngle); var outerEndPoint = Object(__WEBPACK_IMPORTED_MODULE_4__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, outerRadius, tempEndAngle); var path = "M ".concat(outerStartPoint.x, ",").concat(outerStartPoint.y, "\n A ").concat(outerRadius, ",").concat(outerRadius, ",0,\n ").concat(+(Math.abs(angle) > 180), ",").concat(+(startAngle > tempEndAngle), ",\n ").concat(outerEndPoint.x, ",").concat(outerEndPoint.y, "\n "); if (innerRadius > 0) { var innerStartPoint = Object(__WEBPACK_IMPORTED_MODULE_4__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, innerRadius, startAngle); var innerEndPoint = Object(__WEBPACK_IMPORTED_MODULE_4__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, innerRadius, tempEndAngle); path += "L ".concat(innerEndPoint.x, ",").concat(innerEndPoint.y, "\n A ").concat(innerRadius, ",").concat(innerRadius, ",0,\n ").concat(+(Math.abs(angle) > 180), ",").concat(+(startAngle <= tempEndAngle), ",\n ").concat(innerStartPoint.x, ",").concat(innerStartPoint.y, " Z"); } else { path += "L ".concat(cx, ",").concat(cy, " Z"); } return path; }; var getSectorWithCorner = function getSectorWithCorner(_ref3) { var cx = _ref3.cx, cy = _ref3.cy, innerRadius = _ref3.innerRadius, outerRadius = _ref3.outerRadius, cornerRadius = _ref3.cornerRadius, forceCornerRadius = _ref3.forceCornerRadius, cornerIsExternal = _ref3.cornerIsExternal, startAngle = _ref3.startAngle, endAngle = _ref3.endAngle; var sign = Object(__WEBPACK_IMPORTED_MODULE_5__util_DataUtils__["j" /* mathSign */])(endAngle - startAngle); var _getTangentCircle = getTangentCircle({ cx: cx, cy: cy, radius: outerRadius, angle: startAngle, sign: sign, cornerRadius: cornerRadius, cornerIsExternal: cornerIsExternal }), soct = _getTangentCircle.circleTangency, solt = _getTangentCircle.lineTangency, sot = _getTangentCircle.theta; var _getTangentCircle2 = getTangentCircle({ cx: cx, cy: cy, radius: outerRadius, angle: endAngle, sign: -sign, cornerRadius: cornerRadius, cornerIsExternal: cornerIsExternal }), eoct = _getTangentCircle2.circleTangency, eolt = _getTangentCircle2.lineTangency, eot = _getTangentCircle2.theta; var outerArcAngle = Math.abs(startAngle - endAngle) - sot - eot; if (outerArcAngle < 0) { if (forceCornerRadius) { return "M ".concat(solt.x, ",").concat(solt.y, "\n a").concat(cornerRadius, ",").concat(cornerRadius, ",0,0,1,").concat(cornerRadius * 2, ",0\n a").concat(cornerRadius, ",").concat(cornerRadius, ",0,0,1,").concat(-cornerRadius * 2, ",0\n "); } return getSectorPath({ cx: cx, cy: cy, innerRadius: innerRadius, outerRadius: outerRadius, startAngle: startAngle, endAngle: endAngle }); } var path = "M ".concat(solt.x, ",").concat(solt.y, "\n A").concat(cornerRadius, ",").concat(cornerRadius, ",0,0,").concat(+(sign < 0), ",").concat(soct.x, ",").concat(soct.y, "\n A").concat(outerRadius, ",").concat(outerRadius, ",0,").concat(+(outerArcAngle > 180), ",").concat(+(sign < 0), ",").concat(eoct.x, ",").concat(eoct.y, "\n A").concat(cornerRadius, ",").concat(cornerRadius, ",0,0,").concat(+(sign < 0), ",").concat(eolt.x, ",").concat(eolt.y, "\n "); if (innerRadius > 0) { var _getTangentCircle3 = getTangentCircle({ cx: cx, cy: cy, radius: innerRadius, angle: startAngle, sign: sign, isExternal: true, cornerRadius: cornerRadius, cornerIsExternal: cornerIsExternal }), sict = _getTangentCircle3.circleTangency, silt = _getTangentCircle3.lineTangency, sit = _getTangentCircle3.theta; var _getTangentCircle4 = getTangentCircle({ cx: cx, cy: cy, radius: innerRadius, angle: endAngle, sign: -sign, isExternal: true, cornerRadius: cornerRadius, cornerIsExternal: cornerIsExternal }), eict = _getTangentCircle4.circleTangency, eilt = _getTangentCircle4.lineTangency, eit = _getTangentCircle4.theta; var innerArcAngle = Math.abs(startAngle - endAngle) - sit - eit; if (innerArcAngle < 0) { return "".concat(path, "L").concat(cx, ",").concat(cy, "Z"); } path += "L".concat(eilt.x, ",").concat(eilt.y, "\n A").concat(cornerRadius, ",").concat(cornerRadius, ",0,0,").concat(+(sign < 0), ",").concat(eict.x, ",").concat(eict.y, "\n A").concat(innerRadius, ",").concat(innerRadius, ",0,").concat(+(innerArcAngle > 180), ",").concat(+(sign > 0), ",").concat(sict.x, ",").concat(sict.y, "\n A").concat(cornerRadius, ",").concat(cornerRadius, ",0,0,").concat(+(sign < 0), ",").concat(silt.x, ",").concat(silt.y, "Z"); } else { path += "L".concat(cx, ",").concat(cy, "Z"); } return path; }; var Sector = /*#__PURE__*/ function (_PureComponent) { _inherits(Sector, _PureComponent); function Sector() { _classCallCheck(this, Sector); return _possibleConstructorReturn(this, _getPrototypeOf(Sector).apply(this, arguments)); } _createClass(Sector, [{ key: "render", value: function render() { var _this$props = this.props, cx = _this$props.cx, cy = _this$props.cy, innerRadius = _this$props.innerRadius, outerRadius = _this$props.outerRadius, cornerRadius = _this$props.cornerRadius, forceCornerRadius = _this$props.forceCornerRadius, cornerIsExternal = _this$props.cornerIsExternal, startAngle = _this$props.startAngle, endAngle = _this$props.endAngle, className = _this$props.className; if (outerRadius < innerRadius || startAngle === endAngle) { return null; } var layerClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('recharts-sector', className); var deltaRadius = outerRadius - innerRadius; var cr = Object(__WEBPACK_IMPORTED_MODULE_5__util_DataUtils__["d" /* getPercentValue */])(cornerRadius, deltaRadius, 0, true); var path; if (cr > 0 && Math.abs(startAngle - endAngle) < 360) { path = getSectorWithCorner({ cx: cx, cy: cy, innerRadius: innerRadius, outerRadius: outerRadius, cornerRadius: Math.min(cr, deltaRadius / 2), forceCornerRadius: forceCornerRadius, cornerIsExternal: cornerIsExternal, startAngle: startAngle, endAngle: endAngle }); } else { path = getSectorPath({ cx: cx, cy: cy, innerRadius: innerRadius, outerRadius: outerRadius, startAngle: startAngle, endAngle: endAngle }); } return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props), Object(__WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__["f" /* filterEventAttributes */])(this.props), { className: layerClass, d: path })); } }]); return Sector; }(__WEBPACK_IMPORTED_MODULE_0_react__["PureComponent"]); Sector.displayName = 'Sector'; Sector.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], { className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, cx: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, cy: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, innerRadius: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, outerRadius: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, startAngle: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, endAngle: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, cornerRadius: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]), forceCornerRadius: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, cornerIsExternal: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool }); Sector.defaultProps = { cx: 0, cy: 0, innerRadius: 0, outerRadius: 0, startAngle: 0, endAngle: 0, cornerRadius: 0, forceCornerRadius: false, cornerIsExternal: false }; /* harmony default export */ __webpack_exports__["a"] = (Sector); /***/ }), /* 524 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__ = __webpack_require__(22); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Polygon */ var getPolygonPoints = function getPolygonPoints(points) { return points.reduce(function (result, entry) { if (entry.x === +entry.x && entry.y === +entry.y) { result.push([entry.x, entry.y]); } return result; }, []).join(' '); }; var Polygon = /*#__PURE__*/ function (_PureComponent) { _inherits(Polygon, _PureComponent); function Polygon() { _classCallCheck(this, Polygon); return _possibleConstructorReturn(this, _getPrototypeOf(Polygon).apply(this, arguments)); } _createClass(Polygon, [{ key: "render", value: function render() { var _this$props = this.props, points = _this$props.points, className = _this$props.className; if (!points || !points.length) { return null; } var layerClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('recharts-polygon', className); return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("polygon", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props), Object(__WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__["f" /* filterEventAttributes */])(this.props), { className: layerClass, points: getPolygonPoints(points) })); } }]); return Polygon; }(__WEBPACK_IMPORTED_MODULE_0_react__["PureComponent"]); Polygon.displayName = 'Polygon'; Polygon.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], { className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, points: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({ x: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, y: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number })) }); /* harmony default export */ __webpack_exports__["a"] = (Polygon); /***/ }), /* 525 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_minBy__ = __webpack_require__(3641); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_minBy___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_minBy__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_maxBy__ = __webpack_require__(1477); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_maxBy___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_maxBy__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__component_Text__ = __webpack_require__(250); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__component_Label__ = __webpack_require__(205); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__container_Layer__ = __webpack_require__(60); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__ = __webpack_require__(130); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview The axis of polar coordinate system */ var PolarRadiusAxis = /*#__PURE__*/ function (_PureComponent) { _inherits(PolarRadiusAxis, _PureComponent); function PolarRadiusAxis() { _classCallCheck(this, PolarRadiusAxis); return _possibleConstructorReturn(this, _getPrototypeOf(PolarRadiusAxis).apply(this, arguments)); } _createClass(PolarRadiusAxis, [{ key: "getTickValueCoord", /** * Calculate the coordinate of tick * @param {Number} coordinate The radius of tick * @return {Object} (x, y) */ value: function getTickValueCoord(_ref) { var coordinate = _ref.coordinate; var _this$props = this.props, angle = _this$props.angle, cx = _this$props.cx, cy = _this$props.cy; return Object(__WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, coordinate, angle); } }, { key: "getTickTextAnchor", value: function getTickTextAnchor() { var orientation = this.props.orientation; var textAnchor; switch (orientation) { case 'left': textAnchor = 'end'; break; case 'right': textAnchor = 'start'; break; default: textAnchor = 'middle'; break; } return textAnchor; } }, { key: "getViewBox", value: function getViewBox() { var _this$props2 = this.props, cx = _this$props2.cx, cy = _this$props2.cy, angle = _this$props2.angle, ticks = _this$props2.ticks; var maxRadiusTick = __WEBPACK_IMPORTED_MODULE_2_lodash_maxBy___default()(ticks, function (entry) { return entry.coordinate || 0; }); var minRadiusTick = __WEBPACK_IMPORTED_MODULE_1_lodash_minBy___default()(ticks, function (entry) { return entry.coordinate || 0; }); return { cx: cx, cy: cy, startAngle: angle, endAngle: angle, innerRadius: minRadiusTick.coordinate || 0, outerRadius: maxRadiusTick.coordinate || 0 }; } }, { key: "renderAxisLine", value: function renderAxisLine() { var _this$props3 = this.props, cx = _this$props3.cx, cy = _this$props3.cy, angle = _this$props3.angle, ticks = _this$props3.ticks, axisLine = _this$props3.axisLine, others = _objectWithoutProperties(_this$props3, ["cx", "cy", "angle", "ticks", "axisLine"]); var extent = ticks.reduce(function (result, entry) { return [Math.min(result[0], entry.coordinate), Math.max(result[1], entry.coordinate)]; }, [Infinity, -Infinity]); var point0 = Object(__WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, extent[0], angle); var point1 = Object(__WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, extent[1], angle); var props = _objectSpread({}, Object(__WEBPACK_IMPORTED_MODULE_8__util_ReactUtils__["l" /* getPresentationAttributes */])(others), { fill: 'none' }, Object(__WEBPACK_IMPORTED_MODULE_8__util_ReactUtils__["l" /* getPresentationAttributes */])(axisLine), { x1: point0.x, y1: point0.y, x2: point1.x, y2: point1.y }); return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("line", _extends({ className: "recharts-polar-radius-axis-line" }, props)); } }, { key: "renderTicks", value: function renderTicks() { var _this = this; var _this$props4 = this.props, ticks = _this$props4.ticks, tick = _this$props4.tick, angle = _this$props4.angle, tickFormatter = _this$props4.tickFormatter, stroke = _this$props4.stroke, others = _objectWithoutProperties(_this$props4, ["ticks", "tick", "angle", "tickFormatter", "stroke"]); var textAnchor = this.getTickTextAnchor(); var axisProps = Object(__WEBPACK_IMPORTED_MODULE_8__util_ReactUtils__["l" /* getPresentationAttributes */])(others); var customTickProps = Object(__WEBPACK_IMPORTED_MODULE_8__util_ReactUtils__["l" /* getPresentationAttributes */])(tick); var items = ticks.map(function (entry, i) { var coord = _this.getTickValueCoord(entry); var tickProps = _objectSpread({ textAnchor: textAnchor, transform: "rotate(".concat(90 - angle, ", ").concat(coord.x, ", ").concat(coord.y, ")") }, axisProps, { stroke: 'none', fill: stroke }, customTickProps, { index: i }, coord, { payload: entry }); return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__container_Layer__["a" /* default */], _extends({ className: "recharts-polar-radius-axis-tick", key: "tick-".concat(i) // eslint-disable-line react/no-array-index-key }, Object(__WEBPACK_IMPORTED_MODULE_8__util_ReactUtils__["g" /* filterEventsOfChild */])(_this.props, entry, i)), _this.constructor.renderTickItem(tick, tickProps, tickFormatter ? tickFormatter(entry.value) : entry.value)); }); return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__container_Layer__["a" /* default */], { className: "recharts-polar-radius-axis-ticks" }, items); } }, { key: "render", value: function render() { var _this$props5 = this.props, ticks = _this$props5.ticks, axisLine = _this$props5.axisLine, tick = _this$props5.tick; if (!ticks || !ticks.length) { return null; } return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__container_Layer__["a" /* default */], { className: "recharts-polar-radius-axis" }, axisLine && this.renderAxisLine(), tick && this.renderTicks(), __WEBPACK_IMPORTED_MODULE_6__component_Label__["a" /* default */].renderCallByParent(this.props, this.getViewBox())); } }], [{ key: "renderTickItem", value: function renderTickItem(option, props, value) { var tickItem; if (__WEBPACK_IMPORTED_MODULE_3_react___default.a.isValidElement(option)) { tickItem = __WEBPACK_IMPORTED_MODULE_3_react___default.a.cloneElement(option, props); } else if (__WEBPACK_IMPORTED_MODULE_0_lodash_isFunction___default()(option)) { tickItem = option(props); } else { tickItem = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__component_Text__["a" /* default */], _extends({}, props, { className: "recharts-polar-radius-axis-tick-value" }), value); } return tickItem; } }]); return PolarRadiusAxis; }(__WEBPACK_IMPORTED_MODULE_3_react__["PureComponent"]); PolarRadiusAxis.displayName = 'PolarRadiusAxis'; PolarRadiusAxis.axisType = 'radiusAxis'; PolarRadiusAxis.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_8__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], {}, __WEBPACK_IMPORTED_MODULE_8__util_ReactUtils__["a" /* EVENT_ATTRIBUTES */], { type: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['number', 'category']), cx: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, cy: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, hide: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, radiusAxisId: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number]), angle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, tickCount: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, ticks: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ value: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any, coordinate: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number })), orientation: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['left', 'right', 'middle']), axisLine: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object]), tick: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.element, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func]), stroke: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, tickFormatter: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, domain: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['auto', 'dataMin', 'dataMax'])])), scale: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['auto', 'linear', 'pow', 'sqrt', 'log', 'identity', 'time', 'band', 'point', 'ordinal', 'quantile', 'quantize', 'utc', 'sequential', 'threshold']), __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func]), allowDataOverflow: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, allowDuplicatedCategory: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool }); PolarRadiusAxis.defaultProps = { type: 'number', radiusAxisId: 0, cx: 0, cy: 0, angle: 0, orientation: 'right', stroke: '#ccc', axisLine: true, tick: true, tickCount: 5, domain: [0, 'auto'], allowDataOverflow: false, scale: 'auto', allowDuplicatedCategory: true }; /* harmony default export */ __webpack_exports__["a"] = (PolarRadiusAxis); /***/ }), /* 526 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__container_Layer__ = __webpack_require__(60); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__shape_Dot__ = __webpack_require__(253); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__shape_Polygon__ = __webpack_require__(524); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__component_Text__ = __webpack_require__(250); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__util_PolarUtils__ = __webpack_require__(130); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Axis of radial direction */ var RADIAN = Math.PI / 180; var eps = 1e-5; var PolarAngleAxis = /*#__PURE__*/ function (_PureComponent) { _inherits(PolarAngleAxis, _PureComponent); function PolarAngleAxis() { _classCallCheck(this, PolarAngleAxis); return _possibleConstructorReturn(this, _getPrototypeOf(PolarAngleAxis).apply(this, arguments)); } _createClass(PolarAngleAxis, [{ key: "getTickLineCoord", /** * Calculate the coordinate of line endpoint * @param {Object} data The Data if ticks * @return {Object} (x0, y0): The start point of text, * (x1, y1): The end point close to text, * (x2, y2): The end point close to axis */ value: function getTickLineCoord(data) { var _this$props = this.props, cx = _this$props.cx, cy = _this$props.cy, radius = _this$props.radius, orientation = _this$props.orientation, tickLine = _this$props.tickLine; var tickLineSize = tickLine && tickLine.size || 8; var p1 = Object(__WEBPACK_IMPORTED_MODULE_8__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, radius, data.coordinate); var p2 = Object(__WEBPACK_IMPORTED_MODULE_8__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, radius + (orientation === 'inner' ? -1 : 1) * tickLineSize, data.coordinate); return { x1: p1.x, y1: p1.y, x2: p2.x, y2: p2.y }; } /** * Get the text-anchor of each tick * @param {Object} data Data of ticks * @return {String} text-anchor */ }, { key: "getTickTextAnchor", value: function getTickTextAnchor(data) { var orientation = this.props.orientation; var cos = Math.cos(-data.coordinate * RADIAN); var textAnchor; if (cos > eps) { textAnchor = orientation === 'outer' ? 'start' : 'end'; } else if (cos < -eps) { textAnchor = orientation === 'outer' ? 'end' : 'start'; } else { textAnchor = 'middle'; } return textAnchor; } }, { key: "renderAxisLine", value: function renderAxisLine() { var _this$props2 = this.props, cx = _this$props2.cx, cy = _this$props2.cy, radius = _this$props2.radius, axisLine = _this$props2.axisLine, axisLineType = _this$props2.axisLineType; var props = _objectSpread({}, Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props), { fill: 'none' }, Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["l" /* getPresentationAttributes */])(axisLine)); if (axisLineType === 'circle') { return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__shape_Dot__["a" /* default */], _extends({ className: "recharts-polar-angle-axis-line" }, props, { cx: cx, cy: cy, r: radius })); } var ticks = this.props.ticks; var points = ticks.map(function (entry) { return Object(__WEBPACK_IMPORTED_MODULE_8__util_PolarUtils__["e" /* polarToCartesian */])(cx, cy, radius, entry.coordinate); }); return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__shape_Polygon__["a" /* default */], _extends({ className: "recharts-polar-angle-axis-line" }, props, { points: points })); } }, { key: "renderTicks", value: function renderTicks() { var _this = this; var _this$props3 = this.props, ticks = _this$props3.ticks, tick = _this$props3.tick, tickLine = _this$props3.tickLine, tickFormatter = _this$props3.tickFormatter, stroke = _this$props3.stroke; var axisProps = Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props); var customTickProps = Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["l" /* getPresentationAttributes */])(tick); var tickLineProps = _objectSpread({}, axisProps, { fill: 'none' }, Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["l" /* getPresentationAttributes */])(tickLine)); var items = ticks.map(function (entry, i) { var lineCoord = _this.getTickLineCoord(entry); var textAnchor = _this.getTickTextAnchor(entry); var tickProps = _objectSpread({ textAnchor: textAnchor }, axisProps, { stroke: 'none', fill: stroke }, customTickProps, { index: i, payload: entry, x: lineCoord.x2, y: lineCoord.y2 }); return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__container_Layer__["a" /* default */], _extends({ className: "recharts-polar-angle-axis-tick", key: "tick-".concat(i) // eslint-disable-line react/no-array-index-key }, Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["g" /* filterEventsOfChild */])(_this.props, entry, i)), tickLine && __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("line", _extends({ className: "recharts-polar-angle-axis-tick-line" }, tickLineProps, lineCoord)), tick && _this.constructor.renderTickItem(tick, tickProps, tickFormatter ? tickFormatter(entry.value) : entry.value)); }); return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__container_Layer__["a" /* default */], { className: "recharts-polar-angle-axis-ticks" }, items); } }, { key: "render", value: function render() { var _this$props4 = this.props, ticks = _this$props4.ticks, radius = _this$props4.radius, axisLine = _this$props4.axisLine; if (radius <= 0 || !ticks || !ticks.length) { return null; } return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__container_Layer__["a" /* default */], { className: "recharts-polar-angle-axis" }, axisLine && this.renderAxisLine(), this.renderTicks()); } }], [{ key: "renderTickItem", value: function renderTickItem(option, props, value) { var tickItem; if (__WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(option)) { tickItem = __WEBPACK_IMPORTED_MODULE_1_react___default.a.cloneElement(option, props); } else if (__WEBPACK_IMPORTED_MODULE_0_lodash_isFunction___default()(option)) { tickItem = option(props); } else { tickItem = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__component_Text__["a" /* default */], _extends({}, props, { className: "recharts-polar-angle-axis-tick-value" }), value); } return tickItem; } }]); return PolarAngleAxis; }(__WEBPACK_IMPORTED_MODULE_1_react__["PureComponent"]); PolarAngleAxis.displayName = 'PolarAngleAxis'; PolarAngleAxis.axisType = 'angleAxis'; PolarAngleAxis.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], {}, __WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["a" /* EVENT_ATTRIBUTES */], { type: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf(['number', 'category']), angleAxisId: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number]), dataKey: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func]), cx: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number, cy: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number, radius: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string]), hide: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool, scale: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["d" /* SCALE_TYPES */]), __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func]), axisLine: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object]), axisLineType: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf(['polygon', 'circle']), tickLine: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object]), tick: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.element]), ticks: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.shape({ value: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.any, coordinate: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number })), stroke: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string, orientation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf(['inner', 'outer']), tickFormatter: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func, allowDuplicatedCategory: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool }); PolarAngleAxis.defaultProps = { type: 'category', angleAxisId: 0, scale: 'auto', cx: 0, cy: 0, domain: [0, 'auto'], orientation: 'outer', axisLine: true, tickLine: true, tick: true, hide: false, allowDuplicatedCategory: true }; /* harmony default export */ __webpack_exports__["a"] = (PolarAngleAxis); /***/ }), /* 527 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ifOverflowMatches; }); var ifOverflowMatches = function ifOverflowMatches(props, value) { var alwaysShow = props.alwaysShow; var ifOverflow = props.ifOverflow; if (alwaysShow) { ifOverflow = 'extendDomain'; } return ifOverflow === value; }; /***/ }), /* 528 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Z Axis */ var ZAxis = /*#__PURE__*/ function (_PureComponent) { _inherits(ZAxis, _PureComponent); function ZAxis() { _classCallCheck(this, ZAxis); return _possibleConstructorReturn(this, _getPrototypeOf(ZAxis).apply(this, arguments)); } _createClass(ZAxis, [{ key: "render", value: function render() { return null; } }]); return ZAxis; }(__WEBPACK_IMPORTED_MODULE_0_react__["PureComponent"]); ZAxis.displayName = 'ZAxis'; ZAxis.propTypes = { type: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['number', 'category']), // The name of data displayed in the axis name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number]), // The unit of data displayed in the axis unit: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number]), // The unique id of z-axis zAxisId: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number]), // The key of data displayed in the axis dataKey: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func]), // The range of axis range: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number), scale: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['auto', 'linear', 'pow', 'sqrt', 'log', 'identity', 'time', 'band', 'point', 'ordinal', 'quantile', 'quantize', 'utc', 'sequential', 'threshold']), __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func]) }; ZAxis.defaultProps = { zAxisId: 0, range: [64, 64], scale: 'auto', type: 'number' }; /* harmony default export */ __webpack_exports__["a"] = (ZAxis); /***/ }), /* 529 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "SORT_OPTIONS", { enumerable: true, get: function get() { return _SortOptions.TYPES; } }); Object.defineProperty(exports, "ORDERS", { enumerable: true, get: function get() { return _SortOptions.ORDERS; } }); Object.defineProperty(exports, "STATE_FILTERS", { enumerable: true, get: function get() { return _StateFilter.TYPES; } }); exports["default"] = void 0; var _Toolbar = _interopRequireDefault(__webpack_require__(3706)); var _SortOptions = __webpack_require__(1498); var _StateFilter = __webpack_require__(1499); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Toolbar["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 530 */ /***/ (function(module, exports, __webpack_require__) { var fails = __webpack_require__(131); var classof = __webpack_require__(861); var split = ''.split; // fallback for non-array-like ES3 and non-enumerable old V8 strings module.exports = fails(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins return !Object('z').propertyIsEnumerable(0); }) ? function (it) { return classof(it) == 'String' ? split.call(it, '') : Object(it); } : Object; /***/ }), /* 531 */ /***/ (function(module, exports) { var ceil = Math.ceil; var floor = Math.floor; // `ToInteger` abstract operation // https://tc39.github.io/ecma262/#sec-tointeger module.exports = function (argument) { return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); }; /***/ }), /* 532 */ /***/ (function(module, exports, __webpack_require__) { var requireObjectCoercible = __webpack_require__(316); // `ToObject` abstract operation // https://tc39.github.io/ecma262/#sec-toobject module.exports = function (argument) { return Object(requireObjectCoercible(argument)); }; /***/ }), /* 533 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = addEventListenerWrap; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_add_dom_event_listener__ = __webpack_require__(3778); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_add_dom_event_listener___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_add_dom_event_listener__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(18); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__); function addEventListenerWrap(target, eventType, cb, option) { /* eslint camelcase: 2 */ var callback = __WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.unstable_batchedUpdates ? function run(e) { __WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.unstable_batchedUpdates(cb, e); } : cb; return __WEBPACK_IMPORTED_MODULE_0_add_dom_event_listener___default()(target, eventType, callback, option); } /***/ }), /* 534 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== 'production') { var ReactIs = __webpack_require__(47); // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(3856)(ReactIs.isElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(3858)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 535 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function UnsupportedField(_ref) { var schema = _ref.schema, idSchema = _ref.idSchema, reason = _ref.reason; return _react2.default.createElement( "div", { className: "unsupported-field" }, _react2.default.createElement( "p", null, "Unsupported field schema", idSchema && idSchema.$id && _react2.default.createElement( "span", null, " for", " field ", _react2.default.createElement( "code", null, idSchema.$id ) ), reason && _react2.default.createElement( "em", null, ": ", reason ), "." ), schema && _react2.default.createElement( "pre", null, JSON.stringify(schema, null, 2) ) ); } if (process.env.NODE_ENV !== "production") { UnsupportedField.propTypes = { schema: _propTypes2.default.object.isRequired, idSchema: _propTypes2.default.object, reason: _propTypes2.default.string }; } exports.default = UnsupportedField; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 536 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = _interopRequireWildcard(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _utils = __webpack_require__(66); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function DefaultObjectFieldTemplate(props) { var TitleField = props.TitleField, DescriptionField = props.DescriptionField; return /*#__PURE__*/_react["default"].createElement("fieldset", null, (props.uiSchema['ui:title'] || props.title) && /*#__PURE__*/_react["default"].createElement(TitleField, { id: "".concat(props.idSchema.$id, "__title"), title: props.title || props.uiSchema['ui:title'], required: props.required, formContext: props.formContext }), props.description && /*#__PURE__*/_react["default"].createElement(DescriptionField, { id: "".concat(props.idSchema.$id, "__description"), description: props.description, formContext: props.formContext }), props.properties.map(function (prop) { return prop.content; })); } if (process.env.NODE_ENV !== 'production') { DefaultObjectFieldTemplate.propTypes = { TitleField: _propTypes["default"].func.isRequired, DescriptionField: _propTypes["default"].func.isRequired, description: _propTypes["default"].string, formContext: _propTypes["default"].object, idSchema: _propTypes["default"].shape({ $id: _propTypes["default"].string }).isRequired, properties: _propTypes["default"].arrayOf(_propTypes["default"].object).isRequired, required: _propTypes["default"].bool, title: _propTypes["default"].string, uiSchema: _propTypes["default"].object.isRequired }; } var ObjectField = /*#__PURE__*/function (_Component) { _inherits(ObjectField, _Component); var _super = _createSuper(ObjectField); function ObjectField() { var _this; _classCallCheck(this, ObjectField); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _super.call.apply(_super, [this].concat(args)); _defineProperty(_assertThisInitialized(_this), "onPropertyChange", function (id, name) { return function (value, options) { var newFormData = _objectSpread(_objectSpread({}, _this.props.formData), {}, _defineProperty({}, name, value)); if (_this.props.registry.formContext.handleSchemaChange) { _this.props.registry.formContext.handleSchemaChange(newFormData, id, name, value, options); } _this.props.onChange(newFormData, options); }; }); return _this; } _createClass(ObjectField, [{ key: "isRequired", value: function isRequired(name) { var schema = this.props.schema; return Array.isArray(schema.required) && schema.required.indexOf(name) !== -1; } }, { key: "render", value: function render() { var _this2 = this; var _this$props = this.props, uiSchema = _this$props.uiSchema, formData = _this$props.formData, errorSchema = _this$props.errorSchema, idSchema = _this$props.idSchema, name = _this$props.name, required = _this$props.required, disabled = _this$props.disabled, readonly = _this$props.readonly, onBlur = _this$props.onBlur, onChange = _this$props.onChange, onFocus = _this$props.onFocus, registry = _this$props.registry; var definitions = registry.definitions, fields = registry.fields, formContext = registry.formContext, widgets = registry.widgets; var SchemaField = fields.SchemaField, TitleField = fields.TitleField, DescriptionField = fields.DescriptionField; var schema = (0, _utils.retrieveSchema)(this.props.schema, definitions); var _getUiOptions = (0, _utils.getUiOptions)(uiSchema), widget = _getUiOptions.widget, options = _objectWithoutProperties(_getUiOptions, ["widget"]); if (typeof widget === 'string') { if (widget === 'hidden') { return null; } var Widget = (0, _utils.getWidget)(schema, widget, widgets); var onChangeHandler = function onChangeHandler(value) { onChange(value, options); }; return /*#__PURE__*/_react["default"].createElement(Widget, { id: idSchema && idSchema.$id, onChange: onChangeHandler, schema: schema, formData: formData, uiSchema: uiSchema, registry: this.props.registry, definitions: definitions }); } var title = schema.title === undefined ? name : schema.title; var description = uiSchema['ui:description'] || schema.description; var orderedProperties; try { var properties = Object.keys(schema.properties); orderedProperties = (0, _utils.orderProperties)(properties, uiSchema['ui:order']); } catch (err) { return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", { className: "config-error", style: { color: 'red' } }, "Invalid ", name || 'root', " object field configuration:", /*#__PURE__*/_react["default"].createElement("em", null, err.message), "."), /*#__PURE__*/_react["default"].createElement("pre", null, JSON.stringify(schema))); } var Template = registry.ObjectFieldTemplate || DefaultObjectFieldTemplate; var templateProps = { title: uiSchema['ui:title'] || title, description: description, TitleField: TitleField, DescriptionField: DescriptionField, properties: orderedProperties.map(function (propName) { return { content: /*#__PURE__*/_react["default"].createElement(SchemaField, { key: propName, name: propName, required: _this2.isRequired(propName), schema: schema.properties[propName], uiSchema: uiSchema[propName], errorSchema: errorSchema[propName], idSchema: idSchema[propName], formData: formData[propName], onChange: _this2.onPropertyChange(schema.id, propName), onBlur: onBlur, onFocus: onFocus, registry: registry, disabled: disabled, readonly: readonly }), propName: propName, readonly: readonly, disabled: disabled, required: required }; }), required: required, idSchema: idSchema, uiSchema: uiSchema, schema: schema, formData: formData, formContext: formContext }; return /*#__PURE__*/_react["default"].createElement(Template, templateProps); } }]); return ObjectField; }(_react.Component); _defineProperty(ObjectField, "defaultProps", { uiSchema: {}, formData: {}, errorSchema: {}, idSchema: {}, registry: (0, _utils.getDefaultRegistry)(), required: false, disabled: false, readonly: false }); if (process.env.NODE_ENV !== 'production') { ObjectField.propTypes = { schema: _propTypes["default"].object.isRequired, uiSchema: _propTypes["default"].object, errorSchema: _propTypes["default"].object, idSchema: _propTypes["default"].object, onChange: _propTypes["default"].func.isRequired, formData: _propTypes["default"].object, onBlur: _propTypes["default"].func, onFocus: _propTypes["default"].func, required: _propTypes["default"].bool, disabled: _propTypes["default"].bool, name: _propTypes["default"].string, readonly: _propTypes["default"].bool, registry: _propTypes["default"].shape({ widgets: _propTypes["default"].objectOf(_propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].object])).isRequired, fields: _propTypes["default"].objectOf(_propTypes["default"].func).isRequired, definitions: _propTypes["default"].object.isRequired, formContext: _propTypes["default"].object.isRequired }) }; } var _default = ObjectField; exports["default"] = _default; //# sourceMappingURL=ObjectField.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 537 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { var _interopRequireDefault = __webpack_require__(21); exports.__esModule = true; exports.prefix = prefix; exports.getClassSet = getClassSet; exports.splitBsProps = splitBsProps; exports.splitBsPropsAndOmit = splitBsPropsAndOmit; exports.addStyle = addStyle; exports._curry = exports.bsSizes = exports.bsStyles = exports.bsClass = void 0; var _entries = _interopRequireDefault(__webpack_require__(226)); var _extends2 = _interopRequireDefault(__webpack_require__(24)); var _invariant = _interopRequireDefault(__webpack_require__(874)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _StyleConfig = __webpack_require__(1560); // TODO: The publicly exposed parts of this should be in lib/BootstrapUtils. function curry(fn) { return function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var last = args[args.length - 1]; if (typeof last === 'function') { return fn.apply(void 0, args); } return function (Component) { return fn.apply(void 0, args.concat([Component])); }; }; } function prefix(props, variant) { var bsClass = (props.bsClass || '').trim(); !(bsClass != null) ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, 'A `bsClass` prop is required for this component') : invariant(false) : void 0; return bsClass + (variant ? "-" + variant : ''); } var bsClass = curry(function (defaultClass, Component) { var propTypes = Component.propTypes || (Component.propTypes = {}); var defaultProps = Component.defaultProps || (Component.defaultProps = {}); propTypes.bsClass = _propTypes.default.string; defaultProps.bsClass = defaultClass; return Component; }); exports.bsClass = bsClass; var bsStyles = curry(function (styles, defaultStyle, Component) { if (typeof defaultStyle !== 'string') { Component = defaultStyle; defaultStyle = undefined; } var existing = Component.STYLES || []; var propTypes = Component.propTypes || {}; styles.forEach(function (style) { if (existing.indexOf(style) === -1) { existing.push(style); } }); var propType = _propTypes.default.oneOf(existing); // expose the values on the propType function for documentation Component.STYLES = existing; propType._values = existing; Component.propTypes = (0, _extends2.default)({}, propTypes, { bsStyle: propType }); if (defaultStyle !== undefined) { var defaultProps = Component.defaultProps || (Component.defaultProps = {}); defaultProps.bsStyle = defaultStyle; } return Component; }); exports.bsStyles = bsStyles; var bsSizes = curry(function (sizes, defaultSize, Component) { if (typeof defaultSize !== 'string') { Component = defaultSize; defaultSize = undefined; } var existing = Component.SIZES || []; var propTypes = Component.propTypes || {}; sizes.forEach(function (size) { if (existing.indexOf(size) === -1) { existing.push(size); } }); var values = []; existing.forEach(function (size) { var mappedSize = _StyleConfig.SIZE_MAP[size]; if (mappedSize && mappedSize !== size) { values.push(mappedSize); } values.push(size); }); var propType = _propTypes.default.oneOf(values); propType._values = values; // expose the values on the propType function for documentation Component.SIZES = existing; Component.propTypes = (0, _extends2.default)({}, propTypes, { bsSize: propType }); if (defaultSize !== undefined) { if (!Component.defaultProps) { Component.defaultProps = {}; } Component.defaultProps.bsSize = defaultSize; } return Component; }); exports.bsSizes = bsSizes; function getClassSet(props) { var _classes; var classes = (_classes = {}, _classes[prefix(props)] = true, _classes); if (props.bsSize) { var bsSize = _StyleConfig.SIZE_MAP[props.bsSize] || props.bsSize; classes[prefix(props, bsSize)] = true; } if (props.bsStyle) { classes[prefix(props, props.bsStyle)] = true; } return classes; } function getBsProps(props) { return { bsClass: props.bsClass, bsSize: props.bsSize, bsStyle: props.bsStyle, bsRole: props.bsRole }; } function isBsProp(propName) { return propName === 'bsClass' || propName === 'bsSize' || propName === 'bsStyle' || propName === 'bsRole'; } function splitBsProps(props) { var elementProps = {}; (0, _entries.default)(props).forEach(function (_ref) { var propName = _ref[0], propValue = _ref[1]; if (!isBsProp(propName)) { elementProps[propName] = propValue; } }); return [getBsProps(props), elementProps]; } function splitBsPropsAndOmit(props, omittedPropNames) { var isOmittedProp = {}; omittedPropNames.forEach(function (propName) { isOmittedProp[propName] = true; }); var elementProps = {}; (0, _entries.default)(props).forEach(function (_ref2) { var propName = _ref2[0], propValue = _ref2[1]; if (!isBsProp(propName) && !isOmittedProp[propName]) { elementProps[propName] = propValue; } }); return [getBsProps(props), elementProps]; } /** * Add a style variant to a Component. Mutates the propTypes of the component * in order to validate the new variant. */ function addStyle(Component) { for (var _len2 = arguments.length, styleVariant = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { styleVariant[_key2 - 1] = arguments[_key2]; } bsStyles(styleVariant, Component); } var _curry = curry; exports._curry = _curry; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 538 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(173), isKey = __webpack_require__(3899), stringToPath = __webpack_require__(3902), toString = __webpack_require__(3926); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /* 539 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(257); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /* 540 */ /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(3916), listCacheDelete = __webpack_require__(3917), listCacheGet = __webpack_require__(3918), listCacheHas = __webpack_require__(3919), listCacheSet = __webpack_require__(3920); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /* 541 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(1566); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /* 542 */ /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(3922); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /* 543 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_activeElement__ = __webpack_require__(656); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_activeElement___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_dom_helpers_activeElement__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_dom_helpers_query_contains__ = __webpack_require__(161); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_dom_helpers_query_contains___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_dom_helpers_query_contains__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_keycode__ = __webpack_require__(34); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_keycode___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_keycode__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react_dom__ = __webpack_require__(18); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_react_dom__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_prop_types_extra_lib_all__ = __webpack_require__(159); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_prop_types_extra_lib_all___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_prop_types_extra_lib_all__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_prop_types_extra_lib_isRequiredForA11y__ = __webpack_require__(162); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_prop_types_extra_lib_isRequiredForA11y___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_prop_types_extra_lib_isRequiredForA11y__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_uncontrollable__ = __webpack_require__(75); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_uncontrollable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_uncontrollable__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_warning__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__ButtonGroup__ = __webpack_require__(879); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__DropdownMenu__ = __webpack_require__(3950); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__DropdownToggle__ = __webpack_require__(1579); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__ = __webpack_require__(69); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__utils_PropTypes__ = __webpack_require__(1575); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__utils_ValidComponentChildren__ = __webpack_require__(95); var TOGGLE_ROLE = __WEBPACK_IMPORTED_MODULE_18__DropdownToggle__["a" /* default */].defaultProps.bsRole; var MENU_ROLE = __WEBPACK_IMPORTED_MODULE_17__DropdownMenu__["a" /* default */].defaultProps.bsRole; var propTypes = { /** * The menu will open above the dropdown button, instead of below it. */ dropup: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool, /** * An html id attribute, necessary for assistive technologies, such as screen readers. * @type {string|number} * @required */ id: __WEBPACK_IMPORTED_MODULE_13_prop_types_extra_lib_isRequiredForA11y___default()(__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.number])), componentClass: __WEBPACK_IMPORTED_MODULE_12_prop_types_extra_lib_elementType___default.a, /** * The children of a Dropdown may be a `` or a ``. * @type {node} */ children: __WEBPACK_IMPORTED_MODULE_11_prop_types_extra_lib_all___default()(Object(__WEBPACK_IMPORTED_MODULE_21__utils_PropTypes__["c" /* requiredRoles */])(TOGGLE_ROLE, MENU_ROLE), Object(__WEBPACK_IMPORTED_MODULE_21__utils_PropTypes__["a" /* exclusiveRoles */])(MENU_ROLE)), /** * Whether or not component is disabled. */ disabled: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool, /** * Align the menu to the right side of the Dropdown toggle */ pullRight: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool, /** * Whether or not the Dropdown is visible. * * @controllable onToggle */ open: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool, defaultOpen: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool, /** * A callback fired when the Dropdown wishes to change visibility. Called with the requested * `open` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`. * * ```js * function(Boolean isOpen, Object event, { String source }) {} * ``` * @controllable open */ onToggle: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func, /** * A callback fired when a menu item is selected. * * ```js * (eventKey: any, event: Object) => any * ``` */ onSelect: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func, /** * If `'menuitem'`, causes the dropdown to behave like a menu item rather than * a menu button. */ role: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string, /** * Which event when fired outside the component will cause it to be closed * * *Note: For custom dropdown components, you will have to pass the * `rootCloseEvent` to `` in your custom dropdown menu * component ([similarly to how it is implemented in ``](https://github.com/react-bootstrap/react-bootstrap/blob/v0.31.5/src/DropdownMenu.js#L115-L119)).* */ rootCloseEvent: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.oneOf(['click', 'mousedown']), /** * @private */ onMouseEnter: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func, /** * @private */ onMouseLeave: __WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func }; var defaultProps = { componentClass: __WEBPACK_IMPORTED_MODULE_16__ButtonGroup__["a" /* default */] }; var Dropdown = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Dropdown, _React$Component); function Dropdown(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; _this.handleClick = _this.handleClick.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleKeyDown = _this.handleKeyDown.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleClose = _this.handleClose.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this._focusInDropdown = false; _this.lastOpenEventType = null; return _this; } var _proto = Dropdown.prototype; _proto.componentDidMount = function componentDidMount() { this.focusNextOnOpen(); }; _proto.componentWillUpdate = function componentWillUpdate(nextProps) { if (!nextProps.open && this.props.open) { this._focusInDropdown = __WEBPACK_IMPORTED_MODULE_6_dom_helpers_query_contains___default()(__WEBPACK_IMPORTED_MODULE_10_react_dom___default.a.findDOMNode(this.menu), __WEBPACK_IMPORTED_MODULE_5_dom_helpers_activeElement___default()(document)); } }; _proto.componentDidUpdate = function componentDidUpdate(prevProps) { var open = this.props.open; var prevOpen = prevProps.open; if (open && !prevOpen) { this.focusNextOnOpen(); } if (!open && prevOpen) { // if focus hasn't already moved from the menu let's return it // to the toggle if (this._focusInDropdown) { this._focusInDropdown = false; this.focus(); } } }; _proto.focus = function focus() { var toggle = __WEBPACK_IMPORTED_MODULE_10_react_dom___default.a.findDOMNode(this.toggle); if (toggle && toggle.focus) { toggle.focus(); } }; _proto.focusNextOnOpen = function focusNextOnOpen() { var menu = this.menu; if (!menu || !menu.focusNext) { return; } if (this.lastOpenEventType === 'keydown' || this.props.role === 'menuitem') { menu.focusNext(); } }; _proto.handleClick = function handleClick(event) { if (this.props.disabled) { return; } this.toggleOpen(event, { source: 'click' }); }; _proto.handleClose = function handleClose(event, eventDetails) { if (!this.props.open) { return; } this.toggleOpen(event, eventDetails); }; _proto.handleKeyDown = function handleKeyDown(event) { if (this.props.disabled) { return; } switch (event.keyCode) { case __WEBPACK_IMPORTED_MODULE_7_keycode___default.a.codes.down: if (!this.props.open) { this.toggleOpen(event, { source: 'keydown' }); } else if (this.menu.focusNext) { this.menu.focusNext(); } event.preventDefault(); break; case __WEBPACK_IMPORTED_MODULE_7_keycode___default.a.codes.esc: case __WEBPACK_IMPORTED_MODULE_7_keycode___default.a.codes.tab: this.handleClose(event, { source: 'keydown' }); break; default: } }; _proto.toggleOpen = function toggleOpen(event, eventDetails) { var open = !this.props.open; if (open) { this.lastOpenEventType = eventDetails.source; } if (this.props.onToggle) { this.props.onToggle(open, event, eventDetails); } }; _proto.renderMenu = function renderMenu(child, _ref) { var _this2 = this; var id = _ref.id, onSelect = _ref.onSelect, rootCloseEvent = _ref.rootCloseEvent, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref, ["id", "onSelect", "rootCloseEvent"]); var ref = function ref(c) { _this2.menu = c; }; if (typeof child.ref === 'string') { process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_15_warning___default()(false, 'String refs are not supported on `` components. ' + 'To apply a ref to the component use the callback signature:\n\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : void 0; } else { ref = Object(__WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__["a" /* default */])(child.ref, ref); } return Object(__WEBPACK_IMPORTED_MODULE_8_react__["cloneElement"])(child, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { ref: ref, labelledBy: id, bsClass: Object(__WEBPACK_IMPORTED_MODULE_19__utils_bootstrapUtils__["prefix"])(props, 'menu'), onClose: Object(__WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__["a" /* default */])(child.props.onClose, this.handleClose), onSelect: Object(__WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__["a" /* default */])(child.props.onSelect, onSelect, function (key, event) { return _this2.handleClose(event, { source: 'select' }); }), rootCloseEvent: rootCloseEvent })); }; _proto.renderToggle = function renderToggle(child, props) { var _this3 = this; var ref = function ref(c) { _this3.toggle = c; }; if (typeof child.ref === 'string') { process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_15_warning___default()(false, 'String refs are not supported on `` components. ' + 'To apply a ref to the component use the callback signature:\n\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : void 0; } else { ref = Object(__WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__["a" /* default */])(child.ref, ref); } return Object(__WEBPACK_IMPORTED_MODULE_8_react__["cloneElement"])(child, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { ref: ref, bsClass: Object(__WEBPACK_IMPORTED_MODULE_19__utils_bootstrapUtils__["prefix"])(props, 'toggle'), onClick: Object(__WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__["a" /* default */])(child.props.onClick, this.handleClick), onKeyDown: Object(__WEBPACK_IMPORTED_MODULE_20__utils_createChainedFunction__["a" /* default */])(child.props.onKeyDown, this.handleKeyDown) })); }; _proto.render = function render() { var _classes, _this4 = this; var _this$props = this.props, Component = _this$props.componentClass, id = _this$props.id, dropup = _this$props.dropup, disabled = _this$props.disabled, pullRight = _this$props.pullRight, open = _this$props.open, onSelect = _this$props.onSelect, role = _this$props.role, bsClass = _this$props.bsClass, className = _this$props.className, rootCloseEvent = _this$props.rootCloseEvent, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "id", "dropup", "disabled", "pullRight", "open", "onSelect", "role", "bsClass", "className", "rootCloseEvent", "children"]); delete props.onToggle; var classes = (_classes = {}, _classes[bsClass] = true, _classes.open = open, _classes.disabled = disabled, _classes); if (dropup) { classes[bsClass] = false; classes.dropup = true; } // This intentionally forwards bsSize and bsStyle (if set) to the // underlying component, to allow it to render size and style variants. return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, classes) }), __WEBPACK_IMPORTED_MODULE_22__utils_ValidComponentChildren__["a" /* default */].map(children, function (child) { switch (child.props.bsRole) { case TOGGLE_ROLE: return _this4.renderToggle(child, { id: id, disabled: disabled, open: open, role: role, bsClass: bsClass }); case MENU_ROLE: return _this4.renderMenu(child, { id: id, open: open, pullRight: pullRight, bsClass: bsClass, onSelect: onSelect, rootCloseEvent: rootCloseEvent }); default: return child; } })); }; return Dropdown; }(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component); Dropdown.propTypes = propTypes; Dropdown.defaultProps = defaultProps; Object(__WEBPACK_IMPORTED_MODULE_19__utils_bootstrapUtils__["bsClass"])('dropdown', Dropdown); var UncontrolledDropdown = __WEBPACK_IMPORTED_MODULE_14_uncontrollable___default()(Dropdown, { open: 'onToggle' }); UncontrolledDropdown.Toggle = __WEBPACK_IMPORTED_MODULE_18__DropdownToggle__["a" /* default */]; UncontrolledDropdown.Menu = __WEBPACK_IMPORTED_MODULE_17__DropdownMenu__["a" /* default */]; /* harmony default export */ __webpack_exports__["a"] = (UncontrolledDropdown); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 544 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = splitComponentProps; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries__ = __webpack_require__(226); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries__); function splitComponentProps(props, Component) { var componentPropTypes = Component.propTypes; var parentProps = {}; var childProps = {}; __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_entries___default()(props).forEach(function (_ref) { var propName = _ref[0], propValue = _ref[1]; if (componentPropTypes[propName]) { parentProps[propName] = propValue; } else { childProps[propName] = propValue; } }); return [parentProps, childProps]; } /***/ }), /* 545 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_transition_group_Transition__ = __webpack_require__(160); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_transition_group_Transition___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_transition_group_Transition__); var _fadeStyles; var propTypes = { /** * Show the component; triggers the fade in or fade out animation */ in: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Wait until the first "enter" transition to mount the component (add it to the DOM) */ mountOnEnter: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Unmount the component (remove it from the DOM) when it is faded out */ unmountOnExit: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Run the fade in animation when the component mounts, if it is initially * shown */ appear: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Duration of the fade animation in milliseconds, to ensure that finishing * callbacks are fired even if the original browser transition end events are * canceled */ timeout: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Callback fired before the component fades in */ onEnter: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, /** * Callback fired after the component starts to fade in */ onEntering: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, /** * Callback fired after the has component faded in */ onEntered: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, /** * Callback fired before the component fades out */ onExit: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, /** * Callback fired after the component starts to fade out */ onExiting: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, /** * Callback fired after the component has faded out */ onExited: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func }; var defaultProps = { in: false, timeout: 300, mountOnEnter: false, unmountOnExit: false, appear: false }; var fadeStyles = (_fadeStyles = {}, _fadeStyles[__WEBPACK_IMPORTED_MODULE_6_react_transition_group_Transition__["ENTERING"]] = 'in', _fadeStyles[__WEBPACK_IMPORTED_MODULE_6_react_transition_group_Transition__["ENTERED"]] = 'in', _fadeStyles); var Fade = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Fade, _React$Component); function Fade() { return _React$Component.apply(this, arguments) || this; } var _proto = Fade.prototype; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["className", "children"]); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react_transition_group_Transition___default.a, props, function (status, innerProps) { return __WEBPACK_IMPORTED_MODULE_4_react___default.a.cloneElement(children, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, innerProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('fade', className, children.props.className, fadeStyles[status]) })); }); }; return Fade; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Fade.propTypes = propTypes; Fade.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Fade); /***/ }), /* 546 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__MediaBody__ = __webpack_require__(3965); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__MediaHeading__ = __webpack_require__(3966); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__MediaLeft__ = __webpack_require__(3967); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__MediaList__ = __webpack_require__(3968); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__MediaListItem__ = __webpack_require__(3969); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__MediaRight__ = __webpack_require__(3970); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'div' }; var Media = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Media, _React$Component); function Media() { return _React$Component.apply(this, arguments) || this; } var _proto = Media.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return Media; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Media.propTypes = propTypes; Media.defaultProps = defaultProps; Media.Heading = __WEBPACK_IMPORTED_MODULE_7__MediaHeading__["a" /* default */]; Media.Body = __WEBPACK_IMPORTED_MODULE_6__MediaBody__["a" /* default */]; Media.Left = __WEBPACK_IMPORTED_MODULE_8__MediaLeft__["a" /* default */]; Media.Right = __WEBPACK_IMPORTED_MODULE_11__MediaRight__["a" /* default */]; Media.List = __WEBPACK_IMPORTED_MODULE_9__MediaList__["a" /* default */]; Media.ListItem = __WEBPACK_IMPORTED_MODULE_10__MediaListItem__["a" /* default */]; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__["bsClass"])('media', Media)); /***/ }), /* 547 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(1567), baseClone = __webpack_require__(4031), baseUnset = __webpack_require__(4071), castPath = __webpack_require__(538), copyObject = __webpack_require__(398), customOmitClone = __webpack_require__(4074), flatRest = __webpack_require__(4076), getAllKeysIn = __webpack_require__(1617); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** * The opposite of `_.pick`; this method creates an object composed of the * own and inherited enumerable property paths of `object` that are not omitted. * * **Note:** This method is considerably slower than `_.pick`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to omit. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ var omit = flatRest(function(object, paths) { var result = {}; if (object == null) { return result; } var isDeep = false; paths = arrayMap(paths, function(path) { path = castPath(path, object); isDeep || (isDeep = path.length > 1); return path; }); copyObject(object, getAllKeysIn(object), result); if (isDeep) { result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); } var length = paths.length; while (length--) { baseUnset(result, paths[length]); } return result; }); module.exports = omit; /***/ }), /* 548 */ /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(4041), isObjectLike = __webpack_require__(256); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /* 549 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /* 550 */ /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(4054), Map = __webpack_require__(876), Promise = __webpack_require__(4055), Set = __webpack_require__(4056), WeakMap = __webpack_require__(4057), baseGetTag = __webpack_require__(318), toSource = __webpack_require__(1565); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /* 551 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.adaptAdditionalRules = adaptAdditionalRules; exports.validateValue = validateValue; exports.validateArray = validateArray; exports.validateSimple = validateSimple; exports.validateSingle = validateSingle; exports.validateAll = validateAll; exports.isValid = isValid; exports.filterArrayErrorsKeys = filterArrayErrorsKeys; exports.shiftArrayErrorsKeys = shiftArrayErrorsKeys; var _omit = _interopRequireDefault(__webpack_require__(547)); var _jsonSchemaFormCore = __webpack_require__(902); var _properties = __webpack_require__(96); var _condition = _interopRequireDefault(__webpack_require__(904)); var _array = __webpack_require__(888); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _extends() { _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; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * Adapt merged schema from jsfc with additional rules * @param mergedSchema The jsfc merged schema * @returns The adapted merged schema */ function adaptAdditionalRules(mergedSchema) { // skip enum validation if explicitly not restricted var schema = mergedSchema.schema; if (mergedSchema.restricted === false) { if (schema.type === 'array' && schema.items && schema.items["enum"]) { return _objectSpread(_objectSpread({}, mergedSchema), {}, { schema: _objectSpread(_objectSpread({}, schema), {}, { items: _objectSpread(_objectSpread({}, schema.items), {}, { "enum": undefined }) }) }); } else if (schema["enum"]) { return _objectSpread(_objectSpread({}, mergedSchema), {}, { schema: _objectSpread(_objectSpread({}, schema), {}, { "enum": undefined }) }); } } return mergedSchema; } /** * Validate a value. * @param schema The merged schema * @param value The value * @param properties The values * @param customValidationFn A custom validation function * that is applied on schema.customValidation = true * @returns {object} The validation result. */ function validateValue(schema, value, properties, customValidationFn) { var validationSchema = adaptAdditionalRules(schema); var staticResult = (0, _jsonSchemaFormCore.validate)(validationSchema, value); if (staticResult.valid && schema.customValidation && customValidationFn) { return customValidationFn(schema, value, properties); } return staticResult.valid ? null : staticResult.error.message; } /** * Validate an array. * @param mergedSchema The array schema * @param value The value * @param properties All the values * @param customValidationFn A custom validation function * that is applied on schema.customValidation = true * @param deepValidation Validate the array values if set to true * @returns {object} The validation result. */ function validateArray(mergedSchema, value, properties, customValidationFn, deepValidation) { var results = {}; var key = mergedSchema.key; // validate array definition, not its sub-items here var schemaWithoutItems = _objectSpread(_objectSpread({}, mergedSchema), {}, { schema: _objectSpread(_objectSpread({}, mergedSchema.schema), {}, { items: [] }) }); results[key] = validateValue(schemaWithoutItems, value, properties, customValidationFn); // validate each value of the array if (deepValidation && value) { for (var valueIndex = 0; valueIndex < value.length; valueIndex += 1) { // adapt items schema with value index var indexedItems = (0, _array.getArrayElementItems)(mergedSchema, valueIndex); // eslint-disable-next-line no-use-before-define var subResults = validateAll(indexedItems, properties, customValidationFn); _extends(results, subResults); } } return results; } /** * Validate a simple value. * @param mergedSchema The schema to validate * @param value The value * @param properties All the values * @param customValidationFn A custom validation function * that is applied on schema.customValidation = true * @param deepValidation Validate subItems if true * @returns {object} The validation result. */ function validateSimple(mergedSchema, value, properties, customValidationFn, deepValidation) { var results = {}; var key = mergedSchema.key, items = mergedSchema.items; // do not break in case we do not have the key // we need to keep deepValidation if (key) { results[key] = validateValue(mergedSchema, value, properties, customValidationFn); } if (deepValidation && items) { // eslint-disable-next-line no-use-before-define var subResults = validateAll(items, properties, customValidationFn); _extends(results, subResults); } return results; } /** * Execute the right validation depending on the schema type. * @param mergedSchema The merged schema * @param value The value * @param properties All the values * @param customValidationFn A custom validation function * that is applied on schema.customValidation = true * @param deepValidation Validate subItems if true * @returns {Object} The validation result by field. */ function validateSingle(mergedSchema, value, properties, customValidationFn, deepValidation) { if (mergedSchema.type === 'array') { return validateArray(mergedSchema, value, properties, customValidationFn, deepValidation); } return validateSimple(mergedSchema, value, properties, customValidationFn, deepValidation); } /** * Validate all values in the schema. * @param mergedSchema The merged schema array * @param properties The values * @param customValidationFn A custom validation function * that is applied on schema.customValidation = true * @returns {object} The validation result by field. */ function validateAll(mergedSchema, properties, customValidationFn) { var results = {}; mergedSchema.filter(function (schema) { return (0, _condition["default"])(schema.condition, properties, schema.key); }).forEach(function (schema) { var value = (0, _properties.getValue)(properties, schema); // deep validation var subResults = validateSingle(schema, value, properties, customValidationFn, true); _extends(results, subResults); }); return results; } /** * Check if a schema value is valid. * It is invalid if : * - the schema is an invalid field (errors[key] is falsy) * - the schema has items (ex: fieldset, tabs, ...), and at least one of them is invalid * @param schema The schema * @param errors The errors * @returns {boolean} true if it is invalid, false otherwise. */ function isValid(schema, errors) { var key = schema.key, items = schema.items; if (key && errors[key]) { return false; } if (items) { return items.every(function (itemSchema) { return isValid(itemSchema, errors); }); } return true; } /** * Filter the errors on array which items indexes are between a range * This returns only the errors keys. * @param errors The errors map * @param arrayKey The array key * @param minIndex The min item index (INCLUDED) * @param maxIndex The max item index (EXCLUDED) */ function filterArrayErrorsKeys(errors, arrayKey, minIndex, maxIndex) { var minArrayIndexKey = Number.isInteger(minIndex) && arrayKey.concat(minIndex).toString(); var maxArrayIndexKey = Number.isInteger(maxIndex) && arrayKey.concat(maxIndex).toString(); return Object.keys(errors).filter(function (errorKey) { return errorKey.startsWith(arrayKey) && ( // is on target array !minArrayIndexKey || errorKey >= minArrayIndexKey) && ( // is after min !maxArrayIndexKey || errorKey < maxArrayIndexKey); } // is before max ); } /** * Given an error map: * Remove errors on array items if shouldRemoveIndex(index) is true * Shift the index of array items, where new index is getNextIndex(index) * @param oldErrors The errorMap * @param arrayKey The array key * @param minIndex The first index to manipulate * @param maxIndex The last (EXCLUDED) index to manipulate * @param shouldRemoveIndex Predicate to determine if this item errors should be removed * @param getNextIndex New index provider */ function shiftArrayErrorsKeys(oldErrors, _ref) { var arrayKey = _ref.arrayKey, minIndex = _ref.minIndex, maxIndex = _ref.maxIndex, shouldRemoveIndex = _ref.shouldRemoveIndex, getNextIndex = _ref.getNextIndex; // extract the errors included between the range var arrayErrorsToShiftOrRemove = filterArrayErrorsKeys(oldErrors, arrayKey, minIndex, maxIndex); // get all errors except those to remove or shift var errors = (0, _omit["default"])(oldErrors, arrayErrorsToShiftOrRemove); var indexPositionInKey = arrayKey.length; arrayErrorsToShiftOrRemove.map(function (errorKey) { return errorKey.split(','); }) // filter the index we want to remove (shouldRemoveIndex) .filter(function (errorKey) { if (!shouldRemoveIndex) { return true; } var itemIndex = Number(errorKey[indexPositionInKey]); return !shouldRemoveIndex(itemIndex); }) // shift the item index (getNextIndex) .map(function (oldErrorKey) { var oldIndex = Number(oldErrorKey[indexPositionInKey]); var newErrorKey = oldErrorKey.slice(0); newErrorKey[indexPositionInKey] = getNextIndex(oldIndex); return [oldErrorKey, newErrorKey]; }) // populate the final error map .forEach(function (_ref2) { var _ref3 = _slicedToArray(_ref2, 2), oldErrorKey = _ref3[0], newErrorKey = _ref3[1]; errors[newErrorKey] = oldErrors[oldErrorKey]; }); return errors; } //# sourceMappingURL=validation.js.map /***/ }), /* 552 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _objectpath = __webpack_require__(4088); Object.defineProperty(exports, 'parse', { enumerable: true, get: function get() { return _objectpath.parse; } }); Object.defineProperty(exports, 'stringify', { enumerable: true, get: function get() { return _objectpath.stringify; } }); Object.defineProperty(exports, 'normalize', { enumerable: true, get: function get() { return _objectpath.normalize; } }); exports.name = name; /** * I am a name formatter function for processing keys into names for classes or Id. * * @param {Array} key I am the key array of a processed schema key * @param {string} separator I am the separator between the key items and optional form name * @param {string} formName I am an optional form name * @param {boolean} omitNumbers I determine if numeric values should be included in the output or withheld * * @return {string} I am the formatted key */ function name(key, separator) { var formName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; var omitNumbers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; if (key) { var fieldKey = key.slice(); var fieldSeparator = separator || '-'; if (omitNumbers) { fieldKey = fieldKey.filter(function (currentKey) { return typeof currentKey !== 'number'; }); } return (formName.length !== 0 ? formName + fieldSeparator : '') + fieldKey.join(fieldSeparator); } return ''; } /***/ }), /* 553 */ /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(4223), listCacheDelete = __webpack_require__(4224), listCacheGet = __webpack_require__(4225), listCacheHas = __webpack_require__(4226), listCacheSet = __webpack_require__(4227); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /* 554 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(399); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /* 555 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(258); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /* 556 */ /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(4247); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /* 557 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(154), stubFalse = __webpack_require__(4255); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(64)(module))) /***/ }), /* 558 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(912), isLength = __webpack_require__(1656); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /* 559 */ /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(4265), Map = __webpack_require__(911), Promise = __webpack_require__(4266), Set = __webpack_require__(4267), WeakMap = __webpack_require__(4268), baseGetTag = __webpack_require__(321), toSource = __webpack_require__(1651); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /* 560 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(35); var document = __webpack_require__(28).document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; /***/ }), /* 561 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(28); var core = __webpack_require__(117); var LIBRARY = __webpack_require__(176); var wksExt = __webpack_require__(929); var defineProperty = __webpack_require__(62).f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; /***/ }), /* 562 */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(324)('keys'); var uid = __webpack_require__(211); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /* 563 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 564 */ /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__(28).document; module.exports = document && document.documentElement; /***/ }), /* 565 */ /***/ (function(module, exports, __webpack_require__) { // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = __webpack_require__(35); var anObject = __webpack_require__(20); var check = function (O, proto) { anObject(O); if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function (test, buggy, set) { try { set = __webpack_require__(118)(Function.call, __webpack_require__(110).f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { buggy = true; } return function setPrototypeOf(O, proto) { check(O, proto); if (buggy) O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; /***/ }), /* 566 */ /***/ (function(module, exports) { module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; /***/ }), /* 567 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(35); var setPrototypeOf = __webpack_require__(565).set; module.exports = function (that, target, C) { var S = target.constructor; var P; if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { setPrototypeOf(that, P); } return that; }; /***/ }), /* 568 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var toInteger = __webpack_require__(120); var defined = __webpack_require__(134); module.exports = function repeat(count) { var str = String(defined(this)); var res = ''; var n = toInteger(count); if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; return res; }; /***/ }), /* 569 */ /***/ (function(module, exports) { // 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x) { // eslint-disable-next-line no-self-compare return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; /***/ }), /* 570 */ /***/ (function(module, exports) { // 20.2.2.14 Math.expm1(x) var $expm1 = Math.expm1; module.exports = (!$expm1 // Old FF bug || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 // Tor Browser bug || $expm1(-2e-17) != -2e-17 ) ? function expm1(x) { return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; } : $expm1; /***/ }), /* 571 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(176); var $export = __webpack_require__(8); var redefine = __webpack_require__(98); var hide = __webpack_require__(97); var Iterators = __webpack_require__(262); var $iterCreate = __webpack_require__(572); var setToStringTag = __webpack_require__(259); var getPrototypeOf = __webpack_require__(111); var ITERATOR = __webpack_require__(49)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }), /* 572 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var create = __webpack_require__(214); var descriptor = __webpack_require__(210); var setToStringTag = __webpack_require__(259); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(97)(IteratorPrototype, __webpack_require__(49)('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }), /* 573 */ /***/ (function(module, exports, __webpack_require__) { // helper for String#{startsWith, endsWith, includes} var isRegExp = __webpack_require__(405); var defined = __webpack_require__(134); module.exports = function (that, searchString, NAME) { if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); return String(defined(that)); }; /***/ }), /* 574 */ /***/ (function(module, exports, __webpack_require__) { var MATCH = __webpack_require__(49)('match'); module.exports = function (KEY) { var re = /./; try { '/./'[KEY](re); } catch (e) { try { re[MATCH] = false; return !'/./'[KEY](re); } catch (f) { /* empty */ } } return true; }; /***/ }), /* 575 */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(262); var ITERATOR = __webpack_require__(49)('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }), /* 576 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $defineProperty = __webpack_require__(62); var createDesc = __webpack_require__(210); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }), /* 577 */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(260); var ITERATOR = __webpack_require__(49)('iterator'); var Iterators = __webpack_require__(262); module.exports = __webpack_require__(117).getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /* 578 */ /***/ (function(module, exports, __webpack_require__) { // 9.4.2.3 ArraySpeciesCreate(originalArray, length) var speciesConstructor = __webpack_require__(1773); module.exports = function (original, length) { return new (speciesConstructor(original))(length); }; /***/ }), /* 579 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) var toObject = __webpack_require__(63); var toAbsoluteIndex = __webpack_require__(213); var toLength = __webpack_require__(50); module.exports = function fill(value /* , start = 0, end = @length */) { var O = toObject(this); var length = toLength(O.length); var aLen = arguments.length; var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); var end = aLen > 2 ? arguments[2] : undefined; var endPos = end === undefined ? length : toAbsoluteIndex(end, length); while (endPos > index) O[index++] = value; return O; }; /***/ }), /* 580 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var addToUnscopables = __webpack_require__(178); var step = __webpack_require__(946); var Iterators = __webpack_require__(262); var toIObject = __webpack_require__(109); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = __webpack_require__(571)(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function () { var O = this._t; var kind = this._k; var index = this._i++; if (!O || index >= O.length) { this._t = undefined; return step(1); } if (kind == 'keys') return step(0, index); if (kind == 'values') return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }), /* 581 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var regexpFlags = __webpack_require__(327); var nativeExec = RegExp.prototype.exec; // This always refers to the native implementation, because the // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, // which loads this file before patching the method. var nativeReplace = String.prototype.replace; var patchedExec = nativeExec; var LAST_INDEX = 'lastIndex'; var UPDATES_LAST_INDEX_WRONG = (function () { var re1 = /a/, re2 = /b*/g; nativeExec.call(re1, 'a'); nativeExec.call(re2, 'a'); return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; })(); // nonparticipating capturing group, copied from es5-shim's String#split patch. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; if (PATCH) { patchedExec = function exec(str) { var re = this; var lastIndex, reCopy, match, i; if (NPCG_INCLUDED) { reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); } if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; match = nativeExec.call(re, str); if (UPDATES_LAST_INDEX_WRONG && match) { re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; } if (NPCG_INCLUDED && match && match.length > 1) { // Fix browsers whose `exec` methods don't consistently return `undefined` // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ // eslint-disable-next-line no-loop-func nativeReplace.call(match[0], reCopy, function () { for (i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } return match; }; } module.exports = patchedExec; /***/ }), /* 582 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var at = __webpack_require__(404)(true); // `AdvanceStringIndex` abstract operation // https://tc39.github.io/ecma262/#sec-advancestringindex module.exports = function (S, index, unicode) { return index + (unicode ? at(S, index).length : 1); }; /***/ }), /* 583 */ /***/ (function(module, exports, __webpack_require__) { var ctx = __webpack_require__(118); var invoke = __webpack_require__(936); var html = __webpack_require__(564); var cel = __webpack_require__(560); var global = __webpack_require__(28); var process = global.process; var setTask = global.setImmediate; var clearTask = global.clearImmediate; var MessageChannel = global.MessageChannel; var Dispatch = global.Dispatch; var counter = 0; var queue = {}; var ONREADYSTATECHANGE = 'onreadystatechange'; var defer, channel, port; var run = function () { var id = +this; // eslint-disable-next-line no-prototype-builtins if (queue.hasOwnProperty(id)) { var fn = queue[id]; delete queue[id]; fn(); } }; var listener = function (event) { run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if (!setTask || !clearTask) { setTask = function setImmediate(fn) { var args = []; var i = 1; while (arguments.length > i) args.push(arguments[i++]); queue[++counter] = function () { // eslint-disable-next-line no-new-func invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function clearImmediate(id) { delete queue[id]; }; // Node.js 0.8- if (__webpack_require__(119)(process) == 'process') { defer = function (id) { process.nextTick(ctx(run, id, 1)); }; // Sphere (JS game engine) Dispatch API } else if (Dispatch && Dispatch.now) { defer = function (id) { Dispatch.now(ctx(run, id, 1)); }; // Browsers with MessageChannel, includes WebWorkers } else if (MessageChannel) { channel = new MessageChannel(); port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { defer = function (id) { global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- } else if (ONREADYSTATECHANGE in cel('script')) { defer = function (id) { html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function (id) { setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask }; /***/ }), /* 584 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(28); var macrotask = __webpack_require__(583).set; var Observer = global.MutationObserver || global.WebKitMutationObserver; var process = global.process; var Promise = global.Promise; var isNode = __webpack_require__(119)(process) == 'process'; module.exports = function () { var head, last, notify; var flush = function () { var parent, fn; if (isNode && (parent = process.domain)) parent.exit(); while (head) { fn = head.fn; head = head.next; try { fn(); } catch (e) { if (head) notify(); else last = undefined; throw e; } } last = undefined; if (parent) parent.enter(); }; // Node.js if (isNode) { notify = function () { process.nextTick(flush); }; // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 } else if (Observer && !(global.navigator && global.navigator.standalone)) { var toggle = true; var node = document.createTextNode(''); new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new notify = function () { node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if (Promise && Promise.resolve) { // Promise.resolve without an argument throws an error in LG WebOS 2 var promise = Promise.resolve(undefined); notify = function () { promise.then(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { notify = function () { // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } return function (fn) { var task = { fn: fn, next: undefined }; if (last) last.next = task; if (!head) { head = task; notify(); } last = task; }; }; /***/ }), /* 585 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 25.4.1.5 NewPromiseCapability(C) var aFunction = __webpack_require__(80); function PromiseCapability(C) { var resolve, reject; this.promise = new C(function ($$resolve, $$reject) { if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aFunction(resolve); this.reject = aFunction(reject); } module.exports.f = function (C) { return new PromiseCapability(C); }; /***/ }), /* 586 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var global = __webpack_require__(28); var DESCRIPTORS = __webpack_require__(53); var LIBRARY = __webpack_require__(176); var $typed = __webpack_require__(411); var hide = __webpack_require__(97); var redefineAll = __webpack_require__(219); var fails = __webpack_require__(33); var anInstance = __webpack_require__(217); var toInteger = __webpack_require__(120); var toLength = __webpack_require__(50); var toIndex = __webpack_require__(956); var gOPN = __webpack_require__(215).f; var dP = __webpack_require__(62).f; var arrayFill = __webpack_require__(579); var setToStringTag = __webpack_require__(259); var ARRAY_BUFFER = 'ArrayBuffer'; var DATA_VIEW = 'DataView'; var PROTOTYPE = 'prototype'; var WRONG_LENGTH = 'Wrong length!'; var WRONG_INDEX = 'Wrong index!'; var $ArrayBuffer = global[ARRAY_BUFFER]; var $DataView = global[DATA_VIEW]; var Math = global.Math; var RangeError = global.RangeError; // eslint-disable-next-line no-shadow-restricted-names var Infinity = global.Infinity; var BaseBuffer = $ArrayBuffer; var abs = Math.abs; var pow = Math.pow; var floor = Math.floor; var log = Math.log; var LN2 = Math.LN2; var BUFFER = 'buffer'; var BYTE_LENGTH = 'byteLength'; var BYTE_OFFSET = 'byteOffset'; var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; // IEEE754 conversions based on https://github.com/feross/ieee754 function packIEEE754(value, mLen, nBytes) { var buffer = new Array(nBytes); var eLen = nBytes * 8 - mLen - 1; var eMax = (1 << eLen) - 1; var eBias = eMax >> 1; var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; var i = 0; var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; var e, m, c; value = abs(value); // eslint-disable-next-line no-self-compare if (value != value || value === Infinity) { // eslint-disable-next-line no-self-compare m = value != value ? 1 : 0; e = eMax; } else { e = floor(log(value) / LN2); if (value * (c = pow(2, -e)) < 1) { e--; c *= 2; } if (e + eBias >= 1) { value += rt / c; } else { value += rt * pow(2, 1 - eBias); } if (value * c >= 2) { e++; c /= 2; } if (e + eBias >= eMax) { m = 0; e = eMax; } else if (e + eBias >= 1) { m = (value * c - 1) * pow(2, mLen); e = e + eBias; } else { m = value * pow(2, eBias - 1) * pow(2, mLen); e = 0; } } for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); e = e << mLen | m; eLen += mLen; for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); buffer[--i] |= s * 128; return buffer; } function unpackIEEE754(buffer, mLen, nBytes) { var eLen = nBytes * 8 - mLen - 1; var eMax = (1 << eLen) - 1; var eBias = eMax >> 1; var nBits = eLen - 7; var i = nBytes - 1; var s = buffer[i--]; var e = s & 127; var m; s >>= 7; for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); m = e & (1 << -nBits) - 1; e >>= -nBits; nBits += mLen; for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); if (e === 0) { e = 1 - eBias; } else if (e === eMax) { return m ? NaN : s ? -Infinity : Infinity; } else { m = m + pow(2, mLen); e = e - eBias; } return (s ? -1 : 1) * m * pow(2, e - mLen); } function unpackI32(bytes) { return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; } function packI8(it) { return [it & 0xff]; } function packI16(it) { return [it & 0xff, it >> 8 & 0xff]; } function packI32(it) { return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; } function packF64(it) { return packIEEE754(it, 52, 8); } function packF32(it) { return packIEEE754(it, 23, 4); } function addGetter(C, key, internal) { dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); } function get(view, bytes, index, isLittleEndian) { var numIndex = +index; var intIndex = toIndex(numIndex); if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b; var start = intIndex + view[$OFFSET]; var pack = store.slice(start, start + bytes); return isLittleEndian ? pack : pack.reverse(); } function set(view, bytes, index, conversion, value, isLittleEndian) { var numIndex = +index; var intIndex = toIndex(numIndex); if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b; var start = intIndex + view[$OFFSET]; var pack = conversion(+value); for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; } if (!$typed.ABV) { $ArrayBuffer = function ArrayBuffer(length) { anInstance(this, $ArrayBuffer, ARRAY_BUFFER); var byteLength = toIndex(length); this._b = arrayFill.call(new Array(byteLength), 0); this[$LENGTH] = byteLength; }; $DataView = function DataView(buffer, byteOffset, byteLength) { anInstance(this, $DataView, DATA_VIEW); anInstance(buffer, $ArrayBuffer, DATA_VIEW); var bufferLength = buffer[$LENGTH]; var offset = toInteger(byteOffset); if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); this[$BUFFER] = buffer; this[$OFFSET] = offset; this[$LENGTH] = byteLength; }; if (DESCRIPTORS) { addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); addGetter($DataView, BUFFER, '_b'); addGetter($DataView, BYTE_LENGTH, '_l'); addGetter($DataView, BYTE_OFFSET, '_o'); } redefineAll($DataView[PROTOTYPE], { getInt8: function getInt8(byteOffset) { return get(this, 1, byteOffset)[0] << 24 >> 24; }, getUint8: function getUint8(byteOffset) { return get(this, 1, byteOffset)[0]; }, getInt16: function getInt16(byteOffset /* , littleEndian */) { var bytes = get(this, 2, byteOffset, arguments[1]); return (bytes[1] << 8 | bytes[0]) << 16 >> 16; }, getUint16: function getUint16(byteOffset /* , littleEndian */) { var bytes = get(this, 2, byteOffset, arguments[1]); return bytes[1] << 8 | bytes[0]; }, getInt32: function getInt32(byteOffset /* , littleEndian */) { return unpackI32(get(this, 4, byteOffset, arguments[1])); }, getUint32: function getUint32(byteOffset /* , littleEndian */) { return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; }, getFloat32: function getFloat32(byteOffset /* , littleEndian */) { return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); }, getFloat64: function getFloat64(byteOffset /* , littleEndian */) { return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); }, setInt8: function setInt8(byteOffset, value) { set(this, 1, byteOffset, packI8, value); }, setUint8: function setUint8(byteOffset, value) { set(this, 1, byteOffset, packI8, value); }, setInt16: function setInt16(byteOffset, value /* , littleEndian */) { set(this, 2, byteOffset, packI16, value, arguments[2]); }, setUint16: function setUint16(byteOffset, value /* , littleEndian */) { set(this, 2, byteOffset, packI16, value, arguments[2]); }, setInt32: function setInt32(byteOffset, value /* , littleEndian */) { set(this, 4, byteOffset, packI32, value, arguments[2]); }, setUint32: function setUint32(byteOffset, value /* , littleEndian */) { set(this, 4, byteOffset, packI32, value, arguments[2]); }, setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { set(this, 4, byteOffset, packF32, value, arguments[2]); }, setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { set(this, 8, byteOffset, packF64, value, arguments[2]); } }); } else { if (!fails(function () { $ArrayBuffer(1); }) || !fails(function () { new $ArrayBuffer(-1); // eslint-disable-line no-new }) || fails(function () { new $ArrayBuffer(); // eslint-disable-line no-new new $ArrayBuffer(1.5); // eslint-disable-line no-new new $ArrayBuffer(NaN); // eslint-disable-line no-new return $ArrayBuffer.name != ARRAY_BUFFER; })) { $ArrayBuffer = function ArrayBuffer(length) { anInstance(this, $ArrayBuffer); return new BaseBuffer(toIndex(length)); }; var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); } if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; } // iOS Safari 7.x bug var view = new $DataView(new $ArrayBuffer(2)); var $setInt8 = $DataView[PROTOTYPE].setInt8; view.setInt8(0, 2147483648); view.setInt8(1, 2147483649); if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { setInt8: function setInt8(byteOffset, value) { $setInt8.call(this, byteOffset, value << 24 >> 24); }, setUint8: function setUint8(byteOffset, value) { $setInt8.call(this, byteOffset, value << 24 >> 24); } }, true); } setToStringTag($ArrayBuffer, ARRAY_BUFFER); setToStringTag($DataView, DATA_VIEW); hide($DataView[PROTOTYPE], $typed.VIEW, true); exports[ARRAY_BUFFER] = $ArrayBuffer; exports[DATA_VIEW] = $DataView; /***/ }), /* 587 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(264), isObject = __webpack_require__(112); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /* 588 */ /***/ (function(module, exports) { /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } module.exports = apply; /***/ }), /* 589 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(416), baseLodash = __webpack_require__(590); /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295; /** * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. * * @private * @constructor * @param {*} value The value to wrap. */ function LazyWrapper(value) { this.__wrapped__ = value; this.__actions__ = []; this.__dir__ = 1; this.__filtered__ = false; this.__iteratees__ = []; this.__takeCount__ = MAX_ARRAY_LENGTH; this.__views__ = []; } // Ensure `LazyWrapper` is an instance of `baseLodash`. LazyWrapper.prototype = baseCreate(baseLodash.prototype); LazyWrapper.prototype.constructor = LazyWrapper; module.exports = LazyWrapper; /***/ }), /* 590 */ /***/ (function(module, exports) { /** * The function whose prototype chain sequence wrappers inherit from. * * @private */ function baseLodash() { // No operation performed. } module.exports = baseLodash; /***/ }), /* 591 */ /***/ (function(module, exports, __webpack_require__) { var metaMap = __webpack_require__(965), noop = __webpack_require__(1900); /** * Gets metadata for `func`. * * @private * @param {Function} func The function to query. * @returns {*} Returns the metadata for `func`. */ var getData = !metaMap ? noop : function(func) { return metaMap.get(func); }; module.exports = getData; /***/ }), /* 592 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(416), baseLodash = __webpack_require__(590); /** * The base constructor for creating `lodash` wrapper objects. * * @private * @param {*} value The value to wrap. * @param {boolean} [chainAll] Enable explicit method chain sequences. */ function LodashWrapper(value, chainAll) { this.__wrapped__ = value; this.__actions__ = []; this.__chain__ = !!chainAll; this.__index__ = 0; this.__values__ = undefined; } LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; module.exports = LodashWrapper; /***/ }), /* 593 */ /***/ (function(module, exports, __webpack_require__) { var baseSetToString = __webpack_require__(1906), shortOut = __webpack_require__(976); /** * Sets the `toString` method of `func` to return `string`. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var setToString = shortOut(baseSetToString); module.exports = setToString; /***/ }), /* 594 */ /***/ (function(module, exports) { /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; /** * Replaces all `placeholder` elements in `array` with an internal placeholder * and returns an array of their indexes. * * @private * @param {Array} array The array to modify. * @param {*} placeholder The placeholder to replace. * @returns {Array} Returns the new array of placeholder indexes. */ function replaceHolders(array, placeholder) { var index = -1, length = array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value === placeholder || value === PLACEHOLDER) { array[index] = PLACEHOLDER; result[resIndex++] = index; } } return result; } module.exports = replaceHolders; /***/ }), /* 595 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(100), isSymbol = __webpack_require__(418); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /* 596 */ /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__(1920), mapCacheDelete = __webpack_require__(1932), mapCacheGet = __webpack_require__(1934), mapCacheHas = __webpack_require__(1935), mapCacheSet = __webpack_require__(1936); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /* 597 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(222), root = __webpack_require__(86); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /* 598 */ /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /* 599 */ /***/ (function(module, exports, __webpack_require__) { var baseMatches = __webpack_require__(1941), baseMatchesProperty = __webpack_require__(1969), identity = __webpack_require__(330), isArray = __webpack_require__(100), property = __webpack_require__(1972); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }), /* 600 */ /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /* 601 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(1958), stubArray = __webpack_require__(991); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /* 602 */ /***/ (function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__(1962), baseUnary = __webpack_require__(604), nodeUtil = __webpack_require__(605); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /* 603 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /* 604 */ /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /* 605 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(967); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(64)(module))) /***/ }), /* 606 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /* 607 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(608), eq = __webpack_require__(332); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /* 608 */ /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__(978); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /* 609 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(993); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /* 610 */ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(990), getSymbolsIn = __webpack_require__(998), keysIn = __webpack_require__(269); /** * Creates an array of own and inherited enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeysIn(object) { return baseGetAllKeys(object, keysIn, getSymbolsIn); } module.exports = getAllKeysIn; /***/ }), /* 611 */ /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(988); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /* 612 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return qEnd; }); /* harmony export (immutable) */ __webpack_exports__["c"] = safeName; /* harmony export (immutable) */ __webpack_exports__["a"] = fsmIterator; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(113); var done = { done: true, value: undefined }; var qEnd = {}; function safeName(patternOrChannel) { if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].channel(patternOrChannel)) { return 'channel'; } else if (Array.isArray(patternOrChannel)) { return String(patternOrChannel.map(function (entry) { return String(entry); })); } else { return String(patternOrChannel); } } function fsmIterator(fsm, q0) { var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'iterator'; var updateState = void 0, qNext = q0; function next(arg, error) { if (qNext === qEnd) { return done; } if (error) { qNext = qEnd; throw error; } else { updateState && updateState(arg); var _fsm$qNext = fsm[qNext](), q = _fsm$qNext[0], output = _fsm$qNext[1], _updateState = _fsm$qNext[2]; qNext = q; updateState = _updateState; return qNext === qEnd ? done : output; } } return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["t" /* makeIterator */])(next, function (error) { return next(null, error); }, name, true); } /***/ }), /* 613 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(2020); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(2025); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(2027); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject(value) { if (!Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) != objectTag) { return false; } var proto = Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } /* harmony default export */ __webpack_exports__["a"] = (isPlainObject); /***/ }), /* 614 */ /***/ (function(module, exports) { module.exports = function(originalModule) { if(!originalModule.webpackPolyfill) { var module = Object.create(originalModule); // module.parent = undefined by default if(!module.children) module.children = []; Object.defineProperty(module, "loaded", { enumerable: true, get: function() { return module.l; } }); Object.defineProperty(module, "id", { enumerable: true, get: function() { return module.i; } }); Object.defineProperty(module, "exports", { enumerable: true, }); module.webpackPolyfill = 1; } return module; }; /***/ }), /* 615 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ function makeEmptyFunction(arg) { return function () { return arg; }; } /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ var emptyFunction = function emptyFunction() {}; emptyFunction.thatReturns = makeEmptyFunction; emptyFunction.thatReturnsFalse = makeEmptyFunction(false); emptyFunction.thatReturnsTrue = makeEmptyFunction(true); emptyFunction.thatReturnsNull = makeEmptyFunction(null); emptyFunction.thatReturnsThis = function () { return this; }; emptyFunction.thatReturnsArgument = function (arg) { return arg; }; module.exports = emptyFunction; /***/ }), /* 616 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var validateFormat = function validateFormat(format) {}; if (process.env.NODE_ENV !== 'production') { validateFormat = function validateFormat(format) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } }; } function invariant(condition, format, a, b, c, d, e, f) { validateFormat(format); if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 617 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 618 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 619 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = warning; /** * Prints a warning in the console if it exists. * * @param {String} message The warning message. * @returns {void} */ function warning(message) { /* eslint-disable no-console */ if (typeof console !== 'undefined' && typeof console.error === 'function') { console.error(message); } /* eslint-enable no-console */ try { // This error was thrown as a convenience so that if you enable // "break on all exceptions" in your console, // it would pause the execution at this line. throw new Error(message); /* eslint-disable no-empty */ } catch (e) {} /* eslint-enable no-empty */ } /***/ }), /* 620 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generateDefaultViewId = generateDefaultViewId; exports.nonMemoized = nonMemoized; exports["default"] = exports.WaitForSettings = exports.mapStateToViewProps = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(11)); var _react = _interopRequireDefault(__webpack_require__(0)); var _reactRedux = __webpack_require__(335); var _memoize = _interopRequireDefault(__webpack_require__(985)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * Internal. All stuff related to the settings handling in CMF. * @module react-cmf/lib/settings */ /** * if viewId is undefined, try to generate a meaningfull one * else return given viewId * @param {string} viewId * @param {strign} componentName * @param {string} componentId */ function generateDefaultViewId(viewId, componentName, componentId) { if (!viewId) { if (componentName && componentId) { return "".concat(componentName, "#").concat(componentId); } else if (componentName) { return componentName; } } return viewId; } /** * Extract component name without HOC * @param {String} viewId Connect(CMF(Container(MyComponent))) * @return {String} MyComponent */ function withoutHOC(componentName) { return componentName.match(/.*\((.*?)\)/)[1]; } /** * try to retrieve view settings for a cmfconnected component * @param {Object} state the application state * @param {*} ownProps props given to the cmfConnected component * @param {*} componentName name of the cmfConnect component * @param {*} componentId componentId, can be undefined */ function nonMemoized(state, ownProps, componentName, componentId) { var viewProps; var viewId = ownProps.view; viewId = generateDefaultViewId(viewId, componentName, componentId); if (viewId && state.cmf.settings.props[viewId]) { viewProps = state.cmf.settings.props[viewId] || {}; } else if (componentName && componentName.includes('(')) { viewId = generateDefaultViewId(null, withoutHOC(componentName), componentId); if (viewId && state.cmf.settings.props[viewId]) { viewProps = state.cmf.settings.props[viewId] || {}; } } return viewProps; } /** * return props for a given view with reference and override support * this function is memoized and the map key is computed using * `${ownProps.view}-${componentName}-${componentId}` * * @example // state.cmf.settings should look like this "views":{ "homepage": { "sidemenu": { "_ref": "SidePanel#default" }, "listview": { "_ref": "List#default", "collectionId": "streams" } } }, "ref": { "SidePanel#default": { "actions": ["menu:1", "menu:2", ...] } } //in that case you will have the following props for the homepage view { sidemenu: { "actions": ["menu:1", "menu:2", ...] }, listview: { ... } } * * @param {Object} state redux state * @param {Object} ownProps the props passed to the component. may have a view attribute * @return {Object} React props for the component injected from the settings */ var mapStateToViewProps = (0, _memoize["default"])(nonMemoized, function (state, ownProps, componentName, componentId) { return "".concat(ownProps.view, "-").concat(componentName, "-").concat(componentId, "-").concat(state.cmf.settings.initialized); }); exports.mapStateToViewProps = mapStateToViewProps; function PureWaitForSettings(props) { if (!props.initialized) { return /*#__PURE__*/_react["default"].createElement(props.loading, null); } return props.children; } PureWaitForSettings.propTypes = { initialized: _propTypes["default"].bool, children: _propTypes["default"].node }; PureWaitForSettings.defaultProps = { loading: function loading() { return 'loading'; } }; var WaitForSettings = (0, _reactRedux.connect)(function (state) { return { initialized: state.cmf.settings.initialized }; })(PureWaitForSettings); exports.WaitForSettings = WaitForSettings; var _default = { mapStateToViewProps: mapStateToViewProps }; exports["default"] = _default; //# sourceMappingURL=settings.js.map /***/ }), /* 621 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SentryError; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(45); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__polyfill__ = __webpack_require__(2061); /** An error emitted by Sentry SDKs and related utilities. */ var SentryError = /** @class */ (function (_super) { Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__extends"])(SentryError, _super); function SentryError(message) { var _newTarget = this.constructor; var _this = _super.call(this, message) || this; _this.message = message; _this.name = _newTarget.prototype.constructor.name; Object(__WEBPACK_IMPORTED_MODULE_1__polyfill__["a" /* setPrototypeOf */])(_this, _newTarget.prototype); return _this; } return SentryError; }(Error)); //# sourceMappingURL=error.js.map /***/ }), /* 622 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return logger; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__misc__ = __webpack_require__(337); /* eslint-disable @typescript-eslint/no-explicit-any */ // TODO: Implement different loggers for different environments var global = Object(__WEBPACK_IMPORTED_MODULE_0__misc__["e" /* getGlobalObject */])(); /** Prefix for logging strings */ var PREFIX = 'Sentry Logger '; /** JSDoc */ var Logger = /** @class */ (function () { /** JSDoc */ function Logger() { this._enabled = false; } /** JSDoc */ Logger.prototype.disable = function () { this._enabled = false; }; /** JSDoc */ Logger.prototype.enable = function () { this._enabled = true; }; /** JSDoc */ Logger.prototype.log = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (!this._enabled) { return; } Object(__WEBPACK_IMPORTED_MODULE_0__misc__["c" /* consoleSandbox */])(function () { global.console.log(PREFIX + "[Log]: " + args.join(' ')); }); }; /** JSDoc */ Logger.prototype.warn = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (!this._enabled) { return; } Object(__WEBPACK_IMPORTED_MODULE_0__misc__["c" /* consoleSandbox */])(function () { global.console.warn(PREFIX + "[Warn]: " + args.join(' ')); }); }; /** JSDoc */ Logger.prototype.error = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (!this._enabled) { return; } Object(__WEBPACK_IMPORTED_MODULE_0__misc__["c" /* consoleSandbox */])(function () { global.console.error(PREFIX + "[Error]: " + args.join(' ')); }); }; return Logger; }()); // Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used global.__SENTRY__ = global.__SENTRY__ || {}; var logger = global.__SENTRY__.logger || (global.__SENTRY__.logger = new Logger()); //# sourceMappingURL=logger.js.map /***/ }), /* 623 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process, module) {/* harmony export (immutable) */ __webpack_exports__["b"] = isNodeEnv; /* harmony export (immutable) */ __webpack_exports__["a"] = dynamicRequire; /* unused harmony export extractNodeRequestData */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is__ = __webpack_require__(223); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__object__ = __webpack_require__(624); /** * Checks whether we're in the Node.js or Browser environment * * @returns Answer to given question */ function isNodeEnv() { return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'; } /** * Requires a module which is protected against bundler minification. * * @param request The module path to resolve */ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types function dynamicRequire(mod, request) { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access return mod.require(request); } /** Default request keys that'll be used to extract data from the request */ var DEFAULT_REQUEST_KEYS = ['cookies', 'data', 'headers', 'method', 'query_string', 'url']; /** * Normalizes data from the request object, accounting for framework differences. * * @param req The request object from which to extract data * @param keys An optional array of keys to include in the normalized data. Defaults to DEFAULT_REQUEST_KEYS if not * provided. * @returns An object containing normalized request data */ function extractNodeRequestData(req, keys) { if (keys === void 0) { keys = DEFAULT_REQUEST_KEYS; } // make sure we can safely use dynamicRequire below if (!isNodeEnv()) { throw new Error("Can't get node request data outside of a node environment"); } var requestData = {}; // headers: // node, express: req.headers // koa: req.header var headers = (req.headers || req.header || {}); // method: // node, express, koa: req.method var method = req.method; // host: // express: req.hostname in > 4 and req.host in < 4 // koa: req.host // node: req.headers.host var host = req.hostname || req.host || headers.host || ''; // protocol: // node: // express, koa: req.protocol var protocol = req.protocol === 'https' || req.secure || (req.socket || {}).encrypted ? 'https' : 'http'; // url (including path and query string): // node, express: req.originalUrl // koa: req.url var originalUrl = (req.originalUrl || req.url); // absolute url var absoluteUrl = protocol + "://" + host + originalUrl; keys.forEach(function (key) { switch (key) { case 'headers': requestData.headers = headers; break; case 'method': requestData.method = method; break; case 'url': requestData.url = absoluteUrl; break; case 'cookies': // cookies: // node, express, koa: req.headers.cookie // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access requestData.cookies = dynamicRequire(module, 'cookie').parse(headers.cookie || ''); break; case 'query_string': // query string: // node: req.url (raw) // express, koa: req.query // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access requestData.query_string = dynamicRequire(module, 'url').parse(originalUrl || '', false).query; break; case 'data': if (method === 'GET' || method === 'HEAD') { break; } // body data: // node, express, koa: req.body if (req.body !== undefined) { requestData.data = Object(__WEBPACK_IMPORTED_MODULE_0__is__["k" /* isString */])(req.body) ? req.body : JSON.stringify(Object(__WEBPACK_IMPORTED_MODULE_1__object__["c" /* normalize */])(req.body)); } break; default: if ({}.hasOwnProperty.call(req, key)) { requestData[key] = req[key]; } } }); return requestData; } //# sourceMappingURL=node.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3), __webpack_require__(614)(module))) /***/ }), /* 624 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (immutable) */ __webpack_exports__["b"] = fill; /* harmony export (immutable) */ __webpack_exports__["e"] = urlEncode; /* harmony export (immutable) */ __webpack_exports__["d"] = normalizeToSize; /* unused harmony export walk */ /* harmony export (immutable) */ __webpack_exports__["c"] = normalize; /* harmony export (immutable) */ __webpack_exports__["a"] = extractExceptionKeysForMessage; /* unused harmony export dropUndefinedKeys */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(45); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__browser__ = __webpack_require__(1025); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is__ = __webpack_require__(223); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__memo__ = __webpack_require__(1026); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stacktrace__ = __webpack_require__(625); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__string__ = __webpack_require__(626); /** * Wrap a given object method with a higher-order function * * @param source An object that contains a method to be wrapped. * @param name A name of method to be wrapped. * @param replacement A function that should be used to wrap a given method. * @returns void */ function fill(source, name, replacement) { if (!(name in source)) { return; } var original = source[name]; var wrapped = replacement(original); // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work // otherwise it'll throw "TypeError: Object.defineProperties called on non-object" if (typeof wrapped === 'function') { try { wrapped.prototype = wrapped.prototype || {}; Object.defineProperties(wrapped, { __sentry_original__: { enumerable: false, value: original, }, }); } catch (_Oo) { // This can throw if multiple fill happens on a global object like XMLHttpRequest // Fixes https://github.com/getsentry/sentry-javascript/issues/2043 } } source[name] = wrapped; } /** * Encodes given object into url-friendly format * * @param object An object that contains serializable values * @returns string Encoded */ function urlEncode(object) { return Object.keys(object) .map(function (key) { return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]); }) .join('&'); } /** * Transforms any object into an object literal with all it's attributes * attached to it. * * @param value Initial source that we have to transform in order to be usable by the serializer */ function getWalkSource(value) { if (Object(__WEBPACK_IMPORTED_MODULE_2__is__["d" /* isError */])(value)) { var error = value; var err = { message: error.message, name: error.name, stack: error.stack, }; for (var i in error) { if (Object.prototype.hasOwnProperty.call(error, i)) { err[i] = error[i]; } } return err; } if (Object(__WEBPACK_IMPORTED_MODULE_2__is__["f" /* isEvent */])(value)) { var event_1 = value; var source = {}; source.type = event_1.type; // Accessing event.target can throw (see getsentry/raven-js#838, #768) try { source.target = Object(__WEBPACK_IMPORTED_MODULE_2__is__["c" /* isElement */])(event_1.target) ? Object(__WEBPACK_IMPORTED_MODULE_1__browser__["a" /* htmlTreeAsString */])(event_1.target) : Object.prototype.toString.call(event_1.target); } catch (_oO) { source.target = ''; } try { source.currentTarget = Object(__WEBPACK_IMPORTED_MODULE_2__is__["c" /* isElement */])(event_1.currentTarget) ? Object(__WEBPACK_IMPORTED_MODULE_1__browser__["a" /* htmlTreeAsString */])(event_1.currentTarget) : Object.prototype.toString.call(event_1.currentTarget); } catch (_oO) { source.currentTarget = ''; } if (typeof CustomEvent !== 'undefined' && Object(__WEBPACK_IMPORTED_MODULE_2__is__["g" /* isInstanceOf */])(value, CustomEvent)) { source.detail = event_1.detail; } for (var i in event_1) { if (Object.prototype.hasOwnProperty.call(event_1, i)) { source[i] = event_1; } } return source; } return value; } /** Calculates bytes size of input string */ function utf8Length(value) { // eslint-disable-next-line no-bitwise return ~-encodeURI(value).split(/%..|./).length; } /** Calculates bytes size of input object */ function jsonSize(value) { return utf8Length(JSON.stringify(value)); } /** JSDoc */ function normalizeToSize(object, // Default Node.js REPL depth depth, // 100kB, as 200kB is max payload size, so half sounds reasonable maxSize) { if (depth === void 0) { depth = 3; } if (maxSize === void 0) { maxSize = 100 * 1024; } var serialized = normalize(object, depth); if (jsonSize(serialized) > maxSize) { return normalizeToSize(object, depth - 1, maxSize); } return serialized; } /** Transforms any input value into a string form, either primitive value or a type of the input */ function serializeValue(value) { var type = Object.prototype.toString.call(value); // Node.js REPL notation if (typeof value === 'string') { return value; } if (type === '[object Object]') { return '[Object]'; } if (type === '[object Array]') { return '[Array]'; } var normalized = normalizeValue(value); return Object(__WEBPACK_IMPORTED_MODULE_2__is__["i" /* isPrimitive */])(normalized) ? normalized : type; } /** * normalizeValue() * * Takes unserializable input and make it serializable friendly * * - translates undefined/NaN values to "[undefined]"/"[NaN]" respectively, * - serializes Error objects * - filter global objects */ function normalizeValue(value, key) { if (key === 'domain' && value && typeof value === 'object' && value._events) { return '[Domain]'; } if (key === 'domainEmitter') { return '[DomainEmitter]'; } if (typeof global !== 'undefined' && value === global) { return '[Global]'; } if (typeof window !== 'undefined' && value === window) { return '[Window]'; } if (typeof document !== 'undefined' && value === document) { return '[Document]'; } // React's SyntheticEvent thingy if (Object(__WEBPACK_IMPORTED_MODULE_2__is__["l" /* isSyntheticEvent */])(value)) { return '[SyntheticEvent]'; } if (typeof value === 'number' && value !== value) { return '[NaN]'; } if (value === void 0) { return '[undefined]'; } if (typeof value === 'function') { return "[Function: " + Object(__WEBPACK_IMPORTED_MODULE_4__stacktrace__["a" /* getFunctionName */])(value) + "]"; } return value; } /** * Walks an object to perform a normalization on it * * @param key of object that's walked in current iteration * @param value object to be walked * @param depth Optional number indicating how deep should walking be performed * @param memo Optional Memo class handling decycling */ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types function walk(key, value, depth, memo) { if (depth === void 0) { depth = +Infinity; } if (memo === void 0) { memo = new __WEBPACK_IMPORTED_MODULE_3__memo__["a" /* Memo */](); } // If we reach the maximum depth, serialize whatever has left if (depth === 0) { return serializeValue(value); } /* eslint-disable @typescript-eslint/no-unsafe-member-access */ // If value implements `toJSON` method, call it and return early if (value !== null && value !== undefined && typeof value.toJSON === 'function') { return value.toJSON(); } /* eslint-enable @typescript-eslint/no-unsafe-member-access */ // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further var normalized = normalizeValue(value, key); if (Object(__WEBPACK_IMPORTED_MODULE_2__is__["i" /* isPrimitive */])(normalized)) { return normalized; } // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself var source = getWalkSource(value); // Create an accumulator that will act as a parent for all future itterations of that branch var acc = Array.isArray(value) ? [] : {}; // If we already walked that branch, bail out, as it's circular reference if (memo.memoize(value)) { return '[Circular ~]'; } // Walk all keys of the source for (var innerKey in source) { // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration. if (!Object.prototype.hasOwnProperty.call(source, innerKey)) { continue; } // Recursively walk through all the child nodes acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo); } // Once walked through all the branches, remove the parent from memo storage memo.unmemoize(value); // Return accumulated values return acc; } /** * normalize() * * - Creates a copy to prevent original input mutation * - Skip non-enumerablers * - Calls `toJSON` if implemented * - Removes circular references * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format * - Translates known global objects/Classes to a string representations * - Takes care of Error objects serialization * - Optionally limit depth of final output */ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types function normalize(input, depth) { try { return JSON.parse(JSON.stringify(input, function (key, value) { return walk(key, value, depth); })); } catch (_oO) { return '**non-serializable**'; } } /** * Given any captured exception, extract its keys and create a sorted * and truncated list that will be used inside the event message. * eg. `Non-error exception captured with keys: foo, bar, baz` */ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types function extractExceptionKeysForMessage(exception, maxLength) { if (maxLength === void 0) { maxLength = 40; } var keys = Object.keys(getWalkSource(exception)); keys.sort(); if (!keys.length) { return '[object has no keys]'; } if (keys[0].length >= maxLength) { return Object(__WEBPACK_IMPORTED_MODULE_5__string__["d" /* truncate */])(keys[0], maxLength); } for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) { var serialized = keys.slice(0, includedKeys).join(', '); if (serialized.length > maxLength) { continue; } if (includedKeys === keys.length) { return serialized; } return Object(__WEBPACK_IMPORTED_MODULE_5__string__["d" /* truncate */])(serialized, maxLength); } return ''; } /** * Given any object, return the new object with removed keys that value was `undefined`. * Works recursively on objects and arrays. */ function dropUndefinedKeys(val) { var e_1, _a; if (Object(__WEBPACK_IMPORTED_MODULE_2__is__["h" /* isPlainObject */])(val)) { var obj = val; var rv = {}; try { for (var _b = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__values"])(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) { var key = _c.value; if (typeof obj[key] !== 'undefined') { rv[key] = dropUndefinedKeys(obj[key]); } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } return rv; } if (Array.isArray(val)) { return val.map(dropUndefinedKeys); } return val; } //# sourceMappingURL=object.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(27))) /***/ }), /* 625 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = getFunctionName; var defaultFunctionName = ''; /** * Safely extract function name from itself */ function getFunctionName(fn) { try { if (!fn || typeof fn !== 'function') { return defaultFunctionName; } return fn.name || defaultFunctionName; } catch (e) { // Just accessing custom props in some Selenium environments // can cause a "Permission denied" exception (see raven-js#495). return defaultFunctionName; } } //# sourceMappingURL=stacktrace.js.map /***/ }), /* 626 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["d"] = truncate; /* harmony export (immutable) */ __webpack_exports__["c"] = snipLine; /* harmony export (immutable) */ __webpack_exports__["b"] = safeJoin; /* harmony export (immutable) */ __webpack_exports__["a"] = isMatchingPattern; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is__ = __webpack_require__(223); /** * Truncates given string to the maximum characters count * * @param str An object that contains serializable values * @param max Maximum number of characters in truncated string * @returns string Encoded */ function truncate(str, max) { if (max === void 0) { max = 0; } if (typeof str !== 'string' || max === 0) { return str; } return str.length <= max ? str : str.substr(0, max) + "..."; } /** * This is basically just `trim_line` from * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67 * * @param str An object that contains serializable values * @param max Maximum number of characters in truncated string * @returns string Encoded */ function snipLine(line, colno) { var newLine = line; var ll = newLine.length; if (ll <= 150) { return newLine; } if (colno > ll) { // eslint-disable-next-line no-param-reassign colno = ll; } var start = Math.max(colno - 60, 0); if (start < 5) { start = 0; } var end = Math.min(start + 140, ll); if (end > ll - 5) { end = ll; } if (end === ll) { start = Math.max(end - 140, 0); } newLine = newLine.slice(start, end); if (start > 0) { newLine = "'{snip} " + newLine; } if (end < ll) { newLine += ' {snip}'; } return newLine; } /** * Join values in array * @param input array of values to be joined together * @param delimiter string to be placed in-between values * @returns Joined values */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function safeJoin(input, delimiter) { if (!Array.isArray(input)) { return ''; } var output = []; // eslint-disable-next-line @typescript-eslint/prefer-for-of for (var i = 0; i < input.length; i++) { var value = input[i]; try { output.push(String(value)); } catch (e) { output.push('[value cannot be serialized]'); } } return output.join(delimiter); } /** * Checks if the value matches a regex or includes the string * @param value The string value to be checked against * @param pattern Either a regex or a string that must be contained in value */ function isMatchingPattern(value, pattern) { if (!Object(__WEBPACK_IMPORTED_MODULE_0__is__["k" /* isString */])(value)) { return false; } if (Object(__WEBPACK_IMPORTED_MODULE_0__is__["j" /* isRegExp */])(pattern)) { return pattern.test(value); } if (typeof pattern === 'string') { return value.indexOf(pattern) !== -1; } return false; } //# sourceMappingURL=string.js.map /***/ }), /* 627 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = eventFromException; /* harmony export (immutable) */ __webpack_exports__["b"] = eventFromMessage; /* harmony export (immutable) */ __webpack_exports__["c"] = eventFromUnknownInput; /* unused harmony export eventFromString */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sentry_types__ = __webpack_require__(182); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sentry_utils__ = __webpack_require__(52); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__parsers__ = __webpack_require__(1031); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__tracekit__ = __webpack_require__(628); /** * Builds and Event from a Exception * @hidden */ function eventFromException(options, exception, hint) { var syntheticException = (hint && hint.syntheticException) || undefined; var event = eventFromUnknownInput(exception, syntheticException, { attachStacktrace: options.attachStacktrace, }); Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["e" /* addExceptionMechanism */])(event, { handled: true, type: 'generic', }); event.level = __WEBPACK_IMPORTED_MODULE_0__sentry_types__["a" /* Severity */].Error; if (hint && hint.event_id) { event.event_id = hint.event_id; } return __WEBPACK_IMPORTED_MODULE_1__sentry_utils__["d" /* SyncPromise */].resolve(event); } /** * Builds and Event from a Message * @hidden */ function eventFromMessage(options, message, level, hint) { if (level === void 0) { level = __WEBPACK_IMPORTED_MODULE_0__sentry_types__["a" /* Severity */].Info; } var syntheticException = (hint && hint.syntheticException) || undefined; var event = eventFromString(message, syntheticException, { attachStacktrace: options.attachStacktrace, }); event.level = level; if (hint && hint.event_id) { event.event_id = hint.event_id; } return __WEBPACK_IMPORTED_MODULE_1__sentry_utils__["d" /* SyncPromise */].resolve(event); } /** * @hidden */ function eventFromUnknownInput(exception, syntheticException, options) { if (options === void 0) { options = {}; } var event; if (Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["t" /* isErrorEvent */])(exception) && exception.error) { // If it is an ErrorEvent with `error` property, extract it to get actual Error var errorEvent = exception; // eslint-disable-next-line no-param-reassign exception = errorEvent.error; event = Object(__WEBPACK_IMPORTED_MODULE_2__parsers__["b" /* eventFromStacktrace */])(Object(__WEBPACK_IMPORTED_MODULE_3__tracekit__["a" /* computeStackTrace */])(exception)); return event; } if (Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["q" /* isDOMError */])(exception) || Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["r" /* isDOMException */])(exception)) { // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers) // then we just extract the name and message, as they don't provide anything else // https://developer.mozilla.org/en-US/docs/Web/API/DOMError // https://developer.mozilla.org/en-US/docs/Web/API/DOMException var domException = exception; var name_1 = domException.name || (Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["q" /* isDOMError */])(domException) ? 'DOMError' : 'DOMException'); var message = domException.message ? name_1 + ": " + domException.message : name_1; event = eventFromString(message, syntheticException, options); Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["f" /* addExceptionTypeValue */])(event, message); return event; } if (Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["s" /* isError */])(exception)) { // we have a real Error object, do nothing event = Object(__WEBPACK_IMPORTED_MODULE_2__parsers__["b" /* eventFromStacktrace */])(Object(__WEBPACK_IMPORTED_MODULE_3__tracekit__["a" /* computeStackTrace */])(exception)); return event; } if (Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["y" /* isPlainObject */])(exception) || Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["u" /* isEvent */])(exception)) { // If it is plain Object or Event, serialize it manually and extract options // This will allow us to group events based on top-level keys // which is much better than creating new group when any key/value change var objectException = exception; event = Object(__WEBPACK_IMPORTED_MODULE_2__parsers__["a" /* eventFromPlainObject */])(objectException, syntheticException, options.rejection); Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["e" /* addExceptionMechanism */])(event, { synthetic: true, }); return event; } // If none of previous checks were valid, then it means that it's not: // - an instance of DOMError // - an instance of DOMException // - an instance of Event // - an instance of Error // - a valid ErrorEvent (one with an error property) // - a plain Object // // So bail out and capture it as a simple message: event = eventFromString(exception, syntheticException, options); Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["f" /* addExceptionTypeValue */])(event, "" + exception, undefined); Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["e" /* addExceptionMechanism */])(event, { synthetic: true, }); return event; } /** * @hidden */ function eventFromString(input, syntheticException, options) { if (options === void 0) { options = {}; } var event = { message: input, }; if (options.attachStacktrace && syntheticException) { var stacktrace = Object(__WEBPACK_IMPORTED_MODULE_3__tracekit__["a" /* computeStackTrace */])(syntheticException); var frames_1 = Object(__WEBPACK_IMPORTED_MODULE_2__parsers__["d" /* prepareFramesForEvent */])(stacktrace.stack); event.stacktrace = { frames: frames_1, }; } return event; } //# sourceMappingURL=eventbuilder.js.map /***/ }), /* 628 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = computeStackTrace; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(45); /** * This was originally forked from https://github.com/occ/TraceKit, but has since been * largely modified and is now maintained as part of Sentry JS SDK. */ // global reference to slice var UNKNOWN_FUNCTION = '?'; // Chromium based browsers: Chrome, Brave, new Opera, new Edge var chrome = /^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; // gecko regex: `(?:bundle|\d+\.js)`: `bundle` is for react native, `\d+\.js` also but specifically for ram bundles because it // generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js // We need this specific case for now because we want no other regex to match. var gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i; var winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; var geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; var chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/; // Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108 var reactMinifiedRegexp = /Minified React error #\d+;/i; /** JSDoc */ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types function computeStackTrace(ex) { var stack = null; var popSize = 0; if (ex) { if (typeof ex.framesToPop === 'number') { popSize = ex.framesToPop; } else if (reactMinifiedRegexp.test(ex.message)) { popSize = 1; } } try { // This must be tried first because Opera 10 *destroys* // its stacktrace property if you try to access the stack // property first!! stack = computeStackTraceFromStacktraceProp(ex); if (stack) { return popFrames(stack, popSize); } } catch (e) { // no-empty } try { stack = computeStackTraceFromStackProp(ex); if (stack) { return popFrames(stack, popSize); } } catch (e) { // no-empty } return { message: extractMessage(ex), name: ex && ex.name, stack: [], failed: true, }; } /** JSDoc */ // eslint-disable-next-line @typescript-eslint/no-explicit-any, complexity function computeStackTraceFromStackProp(ex) { if (!ex || !ex.stack) { return null; } var stack = []; var lines = ex.stack.split('\n'); var isEval; var submatch; var parts; var element; for (var i = 0; i < lines.length; ++i) { if ((parts = chrome.exec(lines[i]))) { var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line if (isEval && (submatch = chromeEval.exec(parts[2]))) { // throw out eval line/column and use top-most line/column number parts[2] = submatch[1]; // url parts[3] = submatch[2]; // line parts[4] = submatch[3]; // column } element = { // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at ` // prefix here seems like the quickest solution for now. url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2], func: parts[1] || UNKNOWN_FUNCTION, args: isNative ? [parts[2]] : [], line: parts[3] ? +parts[3] : null, column: parts[4] ? +parts[4] : null, }; } else if ((parts = winjs.exec(lines[i]))) { element = { url: parts[2], func: parts[1] || UNKNOWN_FUNCTION, args: [], line: +parts[3], column: parts[4] ? +parts[4] : null, }; } else if ((parts = gecko.exec(lines[i]))) { isEval = parts[3] && parts[3].indexOf(' > eval') > -1; if (isEval && (submatch = geckoEval.exec(parts[3]))) { // throw out eval line/column and use top-most line number parts[1] = parts[1] || "eval"; parts[3] = submatch[1]; parts[4] = submatch[2]; parts[5] = ''; // no column when eval } else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) { // FireFox uses this awesome columnNumber property for its top frame // Also note, Firefox's column number is 0-based and everything else expects 1-based, // so adding 1 // NOTE: this hack doesn't work if top-most frame is eval stack[0].column = ex.columnNumber + 1; } element = { url: parts[3], func: parts[1] || UNKNOWN_FUNCTION, args: parts[2] ? parts[2].split(',') : [], line: parts[4] ? +parts[4] : null, column: parts[5] ? +parts[5] : null, }; } else { continue; } if (!element.func && element.line) { element.func = UNKNOWN_FUNCTION; } stack.push(element); } if (!stack.length) { return null; } return { message: extractMessage(ex), name: ex.name, stack: stack, }; } /** JSDoc */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function computeStackTraceFromStacktraceProp(ex) { if (!ex || !ex.stacktrace) { return null; } // Access and store the stacktrace property before doing ANYTHING // else to it because Opera is not very good at providing it // reliably in other circumstances. var stacktrace = ex.stacktrace; var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i; var opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i; var lines = stacktrace.split('\n'); var stack = []; var parts; for (var line = 0; line < lines.length; line += 2) { var element = null; if ((parts = opera10Regex.exec(lines[line]))) { element = { url: parts[2], func: parts[3], args: [], line: +parts[1], column: null, }; } else if ((parts = opera11Regex.exec(lines[line]))) { element = { url: parts[6], func: parts[3] || parts[4], args: parts[5] ? parts[5].split(',') : [], line: +parts[1], column: +parts[2], }; } if (element) { if (!element.func && element.line) { element.func = UNKNOWN_FUNCTION; } stack.push(element); } } if (!stack.length) { return null; } return { message: extractMessage(ex), name: ex.name, stack: stack, }; } /** Remove N number of frames from the stack */ function popFrames(stacktrace, popSize) { try { return Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, stacktrace), { stack: stacktrace.stack.slice(popSize) }); } catch (e) { return stacktrace; } } /** * There are cases where stacktrace.message is an Event object * https://github.com/getsentry/sentry-javascript/issues/1949 * In this specific case we try to extract stacktrace.message.error.message */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function extractMessage(ex) { var message = ex && ex.message; if (!message) { return 'No error message'; } if (message.error && typeof message.error.message === 'string') { return message.error.message; } return message; } //# sourceMappingURL=tracekit.js.map /***/ }), /* 629 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BaseTransport; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sentry_core__ = __webpack_require__(102); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sentry_utils__ = __webpack_require__(52); /** Base Transport class implementation */ var BaseTransport = /** @class */ (function () { function BaseTransport(options) { this.options = options; /** A simple buffer holding all requests. */ this._buffer = new __WEBPACK_IMPORTED_MODULE_1__sentry_utils__["b" /* PromiseBuffer */](30); this._api = new __WEBPACK_IMPORTED_MODULE_0__sentry_core__["a" /* API */](this.options.dsn); // eslint-disable-next-line deprecation/deprecation this.url = this._api.getStoreEndpointWithUrlEncodedAuth(); } /** * @inheritDoc */ BaseTransport.prototype.sendEvent = function (_) { throw new __WEBPACK_IMPORTED_MODULE_1__sentry_utils__["c" /* SentryError */]('Transport Class has to implement `sendEvent` method'); }; /** * @inheritDoc */ BaseTransport.prototype.close = function (timeout) { return this._buffer.drain(timeout); }; return BaseTransport; }()); //# sourceMappingURL=base.js.map /***/ }), /* 630 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__globalhandlers__ = __webpack_require__(2079); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "GlobalHandlers", function() { return __WEBPACK_IMPORTED_MODULE_0__globalhandlers__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__trycatch__ = __webpack_require__(2080); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TryCatch", function() { return __WEBPACK_IMPORTED_MODULE_1__trycatch__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__breadcrumbs__ = __webpack_require__(2081); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Breadcrumbs", function() { return __WEBPACK_IMPORTED_MODULE_2__breadcrumbs__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__linkederrors__ = __webpack_require__(2082); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "LinkedErrors", function() { return __WEBPACK_IMPORTED_MODULE_3__linkederrors__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__useragent__ = __webpack_require__(2083); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "UserAgent", function() { return __WEBPACK_IMPORTED_MODULE_4__useragent__["a"]; }); //# sourceMappingURL=index.js.map /***/ }), /* 631 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.assertValueTypeOf = assertValueTypeOf; exports.assertTypeOf = assertTypeOf; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function assertValueTypeOf(value, type) { var toThrow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; if (value === undefined) { return true; } if (type === 'Array' && Array.isArray(value)) { return true; } var isTypeCorrect; if (Array.isArray(type)) { isTypeCorrect = type.some(function (currentType) { return assertValueTypeOf(value, currentType, false); }); } else { // eslint-disable-next-line valid-typeof isTypeCorrect = _typeof(value) === type && !Array.isArray(value); } if (toThrow && isTypeCorrect === false) { throw new Error("".concat(value, " must be a ").concat(type, " but got ").concat(_typeof(value))); } return isTypeCorrect; } function assertTypeOf(options, attr, type) { var isTypeCorrect = assertValueTypeOf(options[attr], type, false); if (isTypeCorrect === false) { throw new Error("".concat(attr, " must be a ").concat(type, " but got ").concat(_typeof(options[attr]))); } return isTypeCorrect; } //# sourceMappingURL=assert.js.map /***/ }), /* 632 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _http = _interopRequireDefault(__webpack_require__(2088)); var _putActionCreator = _interopRequireDefault(__webpack_require__(2097)); var collection = _interopRequireWildcard(__webpack_require__(2098)); var component = _interopRequireWildcard(__webpack_require__(2100)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = { // shortcut get: component.get, register: component.register, registerMany: component.registerMany, collection: collection, component: component, http: _http["default"], putActionCreator: _putActionCreator["default"] }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 633 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCookie = getCookie; exports.mergeCSRFToken = mergeCSRFToken; var _merge = _interopRequireDefault(__webpack_require__(1035)); var _flow = _interopRequireDefault(__webpack_require__(1038)); var _curry = _interopRequireDefault(__webpack_require__(329)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * @typedef {Object} HTTPConfig * @property {string} body * @property {string} credentials * @property {Headers} headers * @property {string} method - See ./constants.js for a list of suitable method * @property {onError | string} onError * @property {onResponse | string} onResponse * @property {string} onSend - a redux action type */ /** * regexp to extract key value elements from a cookie * be carefull when touching this regexp shape could break * regexp matching on test unexpectedly */ var cookieElementRegexp = new RegExp(/(.*)=(.*)/); /** * retrieve the cookie from the document */ function getCookie() { if (document.cookie) { return document.cookie; } return ''; } /** * parse the content of the cookie to key value map * @param {string} cookie * @returns {Map.} */ function parseCookie(cookie) { var cookieValue = cookie.split(';').reduce(function (map, line) { var match = cookieElementRegexp.exec(line.trim()); if (match && match[1] && match[2]) { return map.set(match[1], match[2]); } return map; }, new Map()); return cookieValue; } /** * retrieve the csrf token from the cookie content * @param {Object.CSRFTokenCookieKey} CSRFTokenCookieKey - default `csrfToken` * @param {Map.} cookieValues */ var findCSRFToken = (0, _curry["default"])(function (_ref, cookieValues) { var _ref$CSRFTokenCookieK = _ref.CSRFTokenCookieKey, CSRFTokenCookieKey = _ref$CSRFTokenCookieK === void 0 ? 'csrfToken' : _ref$CSRFTokenCookieK; if (cookieValues instanceof Map) { return cookieValues.get(CSRFTokenCookieKey); } return undefined; }); /** * effectively merge the csrf token into the http configuration * @param {Object.CSRFTokenHeaderKey} CSRFTokenCookieKey - default `X-CSRF-Token` * @param {Object} config * @param {string} csrfToken * @return {function} */ var mergeCSRFTokenConfig = (0, _curry["default"])(function (_ref2, httpConfig, csrfToken) { var _ref2$CSRFTokenHeader = _ref2.CSRFTokenHeaderKey, CSRFTokenHeaderKey = _ref2$CSRFTokenHeader === void 0 ? 'X-CSRF-Token' : _ref2$CSRFTokenHeader; if (csrfToken) { return (0, _merge["default"])({}, httpConfig, { headers: _defineProperty({}, CSRFTokenHeaderKey, csrfToken) }); } return httpConfig; }); /** * if a CSRF token is found in csrfToken cookie, merge it in the headers * under key X-CSRF-Token * @param {Object.security} security * @param {HTTPConfig} config * @return {HTTPConfig} */ function mergeCSRFToken(_ref3) { var _ref3$security = _ref3.security, security = _ref3$security === void 0 ? {} : _ref3$security; return function (httpConfig) { return (0, _flow["default"])([getCookie, parseCookie, findCSRFToken(security), mergeCSRFTokenConfig(security, httpConfig)])(); }; } //# sourceMappingURL=csrfHandling.js.map /***/ }), /* 634 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } /* eslint-disable no-console */ /* eslint-disable no-underscore-dangle */ var interceptors = []; /** * @private * this function remove all interceptors. Should be used only in tests. */ function _clear() { interceptors.length = 0; } /** * @private * isInterceptor do some check on the interceptor: - * - must be an Object * - must have either 'request' or 'response' attribute * - interceptor.request must be a function * - interceptor.response must be a function * - interceptor.requestError must be a function * - interceptor.responseError must be a function * @param {object} interceptor to check * @return {boolean} true if interceptor is compliant with requirements */ function isInterceptor(interceptor) { if (!interceptor) { return false; } if (_typeof(interceptor) !== 'object') { return false; } if (!interceptor.request && !interceptor.response && !interceptor.requestError && !interceptor.responseError) { return false; } if (interceptor.request && typeof interceptor.request !== 'function') { return false; } if (interceptor.response && typeof interceptor.response !== 'function') { return false; } if (interceptor.requestError && typeof interceptor.requestError !== 'function') { return false; } if (interceptor.responseError && typeof interceptor.responseError !== 'function') { return false; } return true; } /** * interceptors.push let you add an interceptor * An interceptor is an object with the following keys: request, response. * Both are simple functions which take the config, response and returns enriched value * @param {Object} interceptor object to configure the interception */ function push(interceptor) { if (isInterceptor(interceptor)) { interceptors.push(interceptor); } else { console.error('CMF.interceptors.push not a valid interceptor', interceptor); } } /** * @private * onData is the common caller to interceptors * @param {string} event one of ['request', 'response'] * @param {Object} */ function onData(array, data) { // const copy = interceptors.slice(0); return array.reduce(function (acc, current) { var result = acc; if (current.on) { try { result = acc.then(function (prev) { return current.on(prev); }); } catch (error) { result = Promise.reject(error); } } if (current.onError) { try { result = result["catch"](function (error) { return current.onError(error); }); } catch (error) { result = Promise.reject(error); } } return Promise.resolve(result); }, Promise.resolve(data)); } /** * onRequest consume all interceptors to enrich the config argument * @param {Object} config http config object * @return {Promise} config object */ function onRequest(config) { var array = interceptors.filter(function (i) { return i.request || i.requestError; }).map(function (i) { return { on: i.request, onError: i.requestError }; }); return onData(array, config); } /** * onResponse consume all interceptors to enrich the response object * @param {Object} response http response object * @return {Promise} response object */ function onResponse(response) { var array = interceptors.filter(function (i) { return i.response || i.responseError; }).map(function (i) { return { on: i.response, onError: i.responseError }; }).reverse(); return onData(array, response); } var _default = { push: push, onRequest: onRequest, onResponse: onResponse, _clear: _clear }; exports["default"] = _default; //# sourceMappingURL=httpInterceptors.js.map /***/ }), /* 635 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.split = undefined; var _ace = __webpack_require__(2132); var _ace2 = _interopRequireDefault(_ace); var _split = __webpack_require__(2134); var _split2 = _interopRequireDefault(_split); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.split = _split2.default; exports.default = _ace2.default; /***/ }), /* 636 */ /***/ (function(module, exports, __webpack_require__) { var objectWithoutPropertiesLoose = __webpack_require__(1060); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } module.exports = _objectWithoutProperties; /***/ }), /* 637 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = useTranslation; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_slicedToArray__ = __webpack_require__(438); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_slicedToArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_slicedToArray__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_objectSpread__ = __webpack_require__(122); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_objectSpread___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_objectSpread__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__context__ = __webpack_require__(274); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__(439); function useTranslation(ns) { var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; // assert we have the needed i18nInstance var i18nFromProps = props.i18n; var _ref = Object(__WEBPACK_IMPORTED_MODULE_3__context__["e" /* getHasUsedI18nextProvider */])() ? Object(__WEBPACK_IMPORTED_MODULE_2_react__["useContext"])(__WEBPACK_IMPORTED_MODULE_3__context__["a" /* I18nContext */]) || {} : {}, i18nFromContext = _ref.i18n, defaultNSFromContext = _ref.defaultNS; var i18n = i18nFromProps || i18nFromContext || Object(__WEBPACK_IMPORTED_MODULE_3__context__["f" /* getI18n */])(); if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new __WEBPACK_IMPORTED_MODULE_3__context__["b" /* ReportNamespaces */](); if (!i18n) { Object(__WEBPACK_IMPORTED_MODULE_4__utils__["e" /* warnOnce */])('You will need pass in an i18next instance by using initReactI18next'); var retNotReady = [function (k) { return k; }, {}, true]; retNotReady.t = function (k) { return k; }; retNotReady.i18n = {}; retNotReady.ready = true; return retNotReady; } var i18nOptions = __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_objectSpread___default()({}, Object(__WEBPACK_IMPORTED_MODULE_3__context__["d" /* getDefaults */])(), i18n.options.react); var _props$useSuspense = props.useSuspense, useSuspense = _props$useSuspense === void 0 ? i18nOptions.useSuspense : _props$useSuspense; // prepare having a namespace var namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS; namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation']; // report namespaces as used if (i18n.reportNamespaces.addUsedNamespaces) i18n.reportNamespaces.addUsedNamespaces(namespaces); // are we ready? yes if all namespaces in first language are loaded already (either with data or empty object on failed load) var ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(function (n) { return Object(__WEBPACK_IMPORTED_MODULE_4__utils__["b" /* hasLoadedNamespace */])(n, i18n); }); // binding t function to namespace (acts also as rerender trigger) function getT() { return { t: i18n.getFixedT(null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0]) }; } var _useState = Object(__WEBPACK_IMPORTED_MODULE_2_react__["useState"])(getT()), _useState2 = __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_slicedToArray___default()(_useState, 2), t = _useState2[0], setT = _useState2[1]; // seems we can't have functions as value -> wrap it in obj Object(__WEBPACK_IMPORTED_MODULE_2_react__["useEffect"])(function () { var isMounted = true; var bindI18n = i18nOptions.bindI18n, bindI18nStore = i18nOptions.bindI18nStore; // if not ready and not using suspense load the namespaces // in side effect and do not call resetT if unmounted if (!ready && !useSuspense) { Object(__WEBPACK_IMPORTED_MODULE_4__utils__["c" /* loadNamespaces */])(i18n, namespaces, function () { if (isMounted) setT(getT()); }); } function boundReset() { if (isMounted) setT(getT()); } // bind events to trigger change, like languageChanged if (bindI18n && i18n) i18n.on(bindI18n, boundReset); if (bindI18nStore && i18n) i18n.store.on(bindI18nStore, boundReset); // unbinding on unmount return function () { isMounted = false; if (bindI18n && i18n) bindI18n.split(' ').forEach(function (e) { return i18n.off(e, boundReset); }); if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(function (e) { return i18n.store.off(e, boundReset); }); }; }, [namespaces.join()]); // re-run effect whenever list of namespaces changes var ret = [t.t, i18n, ready]; ret.t = t.t; ret.i18n = i18n; ret.ready = ready; // return hook stuff if ready if (ready) return ret; // not yet loaded namespaces -> load them -> and return if useSuspense option set false if (!ready && !useSuspense) return ret; // not yet loaded namespaces -> load them -> and trigger suspense throw new Promise(function (resolve) { Object(__WEBPACK_IMPORTED_MODULE_4__utils__["c" /* loadNamespaces */])(i18n, namespaces, function () { setT(getT()); resolve(); }); }); } /***/ }), /* 638 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(140); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /* 639 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(640); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /* 640 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /* 641 */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /* 642 */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(643)('keys'); var uid = __webpack_require__(444); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /* 643 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(72); var global = __webpack_require__(123); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: __webpack_require__(443) ? 'pure' : 'global', copyright: '© 2019 Denis Pushkarev (zloirock.ru)' }); /***/ }), /* 644 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 645 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /* 646 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(225); var dPs = __webpack_require__(2187); var enumBugKeys = __webpack_require__(644); var IE_PROTO = __webpack_require__(642)('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(1065)('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __webpack_require__(2188).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /* 647 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 648 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var invariant = function(condition, format, a, b, c, d, e, f) { if (process.env.NODE_ENV !== 'production') { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error( 'Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.' ); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error( format.replace(/%s/g, function() { return args[argIndex++]; }) ); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 649 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); var propTypes = { label: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired, onClick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func }; var defaultProps = { label: 'Close' }; var CloseButton = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(CloseButton, _React$Component); function CloseButton() { return _React$Component.apply(this, arguments) || this; } var _proto = CloseButton.prototype; _proto.render = function render() { var _this$props = this.props, label = _this$props.label, onClick = _this$props.onClick; return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("button", { type: "button", className: "close", onClick: onClick }, __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span", { "aria-hidden": "true" }, "\xD7"), __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span", { className: "sr-only" }, label)); }; return CloseButton; }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component); CloseButton.propTypes = propTypes; CloseButton.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (CloseButton); /***/ }), /* 650 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_all__ = __webpack_require__(159); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_all___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_all__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Button__ = __webpack_require__(348); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(12); var propTypes = { vertical: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, justified: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Display block buttons; only useful when used with the "vertical" prop. * @type {bool} */ block: __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_all___default()(__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, function (_ref) { var block = _ref.block, vertical = _ref.vertical; return block && !vertical ? new Error('`block` requires `vertical` to be set to have any effect') : null; }) }; var defaultProps = { block: false, justified: false, vertical: false }; var ButtonGroup = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ButtonGroup, _React$Component); function ButtonGroup() { return _React$Component.apply(this, arguments) || this; } var _proto = ButtonGroup.prototype; _proto.render = function render() { var _extends2; var _this$props = this.props, block = _this$props.block, justified = _this$props.justified, vertical = _this$props.vertical, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["block", "justified", "vertical", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["getClassSet"])(bsProps), (_extends2 = {}, _extends2[Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(bsProps)] = !vertical, _extends2[Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(bsProps, 'vertical')] = vertical, _extends2[Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(bsProps, 'justified')] = justified, _extends2[Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(__WEBPACK_IMPORTED_MODULE_7__Button__["a" /* default */].defaultProps, 'block')] = block, _extends2)); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return ButtonGroup; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); ButtonGroup.propTypes = propTypes; ButtonGroup.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["bsClass"])('btn-group', ButtonGroup)); /***/ }), /* 651 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(57); exports.__esModule = true; exports.default = exports.animationEnd = exports.animationDelay = exports.animationTiming = exports.animationDuration = exports.animationName = exports.transitionEnd = exports.transitionDuration = exports.transitionDelay = exports.transitionTiming = exports.transitionProperty = exports.transform = void 0; var _inDOM = _interopRequireDefault(__webpack_require__(142)); var transform = 'transform'; exports.transform = transform; var prefix, transitionEnd, animationEnd; exports.animationEnd = animationEnd; exports.transitionEnd = transitionEnd; var transitionProperty, transitionDuration, transitionTiming, transitionDelay; exports.transitionDelay = transitionDelay; exports.transitionTiming = transitionTiming; exports.transitionDuration = transitionDuration; exports.transitionProperty = transitionProperty; var animationName, animationDuration, animationTiming, animationDelay; exports.animationDelay = animationDelay; exports.animationTiming = animationTiming; exports.animationDuration = animationDuration; exports.animationName = animationName; if (_inDOM.default) { var _getTransitionPropert = getTransitionProperties(); prefix = _getTransitionPropert.prefix; exports.transitionEnd = transitionEnd = _getTransitionPropert.transitionEnd; exports.animationEnd = animationEnd = _getTransitionPropert.animationEnd; exports.transform = transform = prefix + "-" + transform; exports.transitionProperty = transitionProperty = prefix + "-transition-property"; exports.transitionDuration = transitionDuration = prefix + "-transition-duration"; exports.transitionDelay = transitionDelay = prefix + "-transition-delay"; exports.transitionTiming = transitionTiming = prefix + "-transition-timing-function"; exports.animationName = animationName = prefix + "-animation-name"; exports.animationDuration = animationDuration = prefix + "-animation-duration"; exports.animationTiming = animationTiming = prefix + "-animation-delay"; exports.animationDelay = animationDelay = prefix + "-animation-timing-function"; } var _default = { transform: transform, end: transitionEnd, property: transitionProperty, timing: transitionTiming, delay: transitionDelay, duration: transitionDuration }; exports.default = _default; function getTransitionProperties() { var style = document.createElement('div').style; var vendorMap = { O: function O(e) { return "o" + e.toLowerCase(); }, Moz: function Moz(e) { return e.toLowerCase(); }, Webkit: function Webkit(e) { return "webkit" + e; }, ms: function ms(e) { return "MS" + e; } }; var vendors = Object.keys(vendorMap); var transitionEnd, animationEnd; var prefix = ''; for (var i = 0; i < vendors.length; i++) { var vendor = vendors[i]; if (vendor + "TransitionProperty" in style) { prefix = "-" + vendor.toLowerCase(); transitionEnd = vendorMap[vendor]('TransitionEnd'); animationEnd = vendorMap[vendor]('AnimationEnd'); break; } } if (!transitionEnd && 'transitionProperty' in style) transitionEnd = 'transitionend'; if (!animationEnd && 'animationName' in style) animationEnd = 'animationend'; style = null; return { animationEnd: animationEnd, transitionEnd: transitionEnd, prefix: prefix }; } /***/ }), /* 652 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(12); var propTypes = { /** * An icon name without "glyphicon-" prefix. See e.g. http://getbootstrap.com/components/#glyphicons */ glyph: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string.isRequired }; var Glyphicon = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Glyphicon, _React$Component); function Glyphicon() { return _React$Component.apply(this, arguments) || this; } var _proto = Glyphicon.prototype; _proto.render = function render() { var _extends2; var _this$props = this.props, glyph = _this$props.glyph, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["glyph", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps), (_extends2 = {}, _extends2[Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps, glyph)] = true, _extends2)); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return Glyphicon; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Glyphicon.propTypes = propTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('glyphicon', Glyphicon)); /***/ }), /* 653 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_parse_int__ = __webpack_require__(654); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_parse_int___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_parse_int__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_style__ = __webpack_require__(227); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_style___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_dom_helpers_style__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition__ = __webpack_require__(160); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_capitalize__ = __webpack_require__(1079); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__ = __webpack_require__(68); var _collapseStyles; var MARGINS = { height: ['marginTop', 'marginBottom'], width: ['marginLeft', 'marginRight'] }; // reading a dimension prop will cause the browser to recalculate, // which will let our animations work function triggerBrowserReflow(node) { node.offsetHeight; // eslint-disable-line no-unused-expressions } function getDimensionValue(dimension, elem) { var value = elem["offset" + Object(__WEBPACK_IMPORTED_MODULE_9__utils_capitalize__["a" /* default */])(dimension)]; var margins = MARGINS[dimension]; return value + __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_parse_int___default()(__WEBPACK_IMPORTED_MODULE_5_dom_helpers_style___default()(elem, margins[0]), 10) + __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_parse_int___default()(__WEBPACK_IMPORTED_MODULE_5_dom_helpers_style___default()(elem, margins[1]), 10); } var collapseStyles = (_collapseStyles = {}, _collapseStyles[__WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition__["EXITED"]] = 'collapse', _collapseStyles[__WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition__["EXITING"]] = 'collapsing', _collapseStyles[__WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition__["ENTERING"]] = 'collapsing', _collapseStyles[__WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition__["ENTERED"]] = 'collapse in', _collapseStyles); var propTypes = { /** * Show the component; triggers the expand or collapse animation */ in: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, /** * Wait until the first "enter" transition to mount the component (add it to the DOM) */ mountOnEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, /** * Unmount the component (remove it from the DOM) when it is collapsed */ unmountOnExit: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, /** * Run the expand animation when the component mounts, if it is initially * shown */ appear: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, /** * Duration of the collapse animation in milliseconds, to ensure that * finishing callbacks are fired even if the original browser transition end * events are canceled */ timeout: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, /** * Callback fired before the component expands */ onEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * Callback fired after the component starts to expand */ onEntering: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * Callback fired after the component has expanded */ onEntered: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * Callback fired before the component collapses */ onExit: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * Callback fired after the component starts to collapse */ onExiting: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * Callback fired after the component has collapsed */ onExited: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * The dimension used when collapsing, or a function that returns the * dimension * * _Note: Bootstrap only partially supports 'width'! * You will need to supply your own CSS animation for the `.width` CSS class._ */ dimension: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['height', 'width']), __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]), /** * Function that returns the height or width of the animating DOM node * * Allows for providing some custom logic for how much the Collapse component * should animate in its specified dimension. Called with the current * dimension prop value and the DOM node. */ getDimensionValue: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * ARIA role of collapsible element */ role: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string }; var defaultProps = { in: false, timeout: 300, mountOnEnter: false, unmountOnExit: false, appear: false, dimension: 'height', getDimensionValue: getDimensionValue }; var Collapse = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Collapse, _React$Component); function Collapse() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; _this.handleEnter = function (elem) { elem.style[_this.getDimension()] = '0'; }; _this.handleEntering = function (elem) { var dimension = _this.getDimension(); elem.style[dimension] = _this._getScrollDimensionValue(elem, dimension); }; _this.handleEntered = function (elem) { elem.style[_this.getDimension()] = null; }; _this.handleExit = function (elem) { var dimension = _this.getDimension(); elem.style[dimension] = _this.props.getDimensionValue(dimension, elem) + "px"; triggerBrowserReflow(elem); }; _this.handleExiting = function (elem) { elem.style[_this.getDimension()] = '0'; }; return _this; } var _proto = Collapse.prototype; _proto.getDimension = function getDimension() { return typeof this.props.dimension === 'function' ? this.props.dimension() : this.props.dimension; }; // for testing _proto._getScrollDimensionValue = function _getScrollDimensionValue(elem, dimension) { return elem["scroll" + Object(__WEBPACK_IMPORTED_MODULE_9__utils_capitalize__["a" /* default */])(dimension)] + "px"; }; /* -- Expanding -- */ _proto.render = function render() { var _this2 = this; var _this$props = this.props, onEnter = _this$props.onEnter, onEntering = _this$props.onEntering, onEntered = _this$props.onEntered, onExit = _this$props.onExit, onExiting = _this$props.onExiting, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["onEnter", "onEntering", "onEntered", "onExit", "onExiting", "className", "children"]); delete props.dimension; delete props.getDimensionValue; var handleEnter = Object(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__["a" /* default */])(this.handleEnter, onEnter); var handleEntering = Object(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__["a" /* default */])(this.handleEntering, onEntering); var handleEntered = Object(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__["a" /* default */])(this.handleEntered, onEntered); var handleExit = Object(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__["a" /* default */])(this.handleExit, onExit); var handleExiting = Object(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__["a" /* default */])(this.handleExiting, onExiting); return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition___default.a, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { "aria-expanded": props.role ? props.in : null, onEnter: handleEnter, onEntering: handleEntering, onEntered: handleEntered, onExit: handleExit, onExiting: handleExiting }), function (state, innerProps) { return __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(children, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, innerProps, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, children.props.className, collapseStyles[state], _this2.getDimension() === 'width' && 'width') })); }); }; return Collapse; }(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component); Collapse.propTypes = propTypes; Collapse.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Collapse); /***/ }), /* 654 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2216); /***/ }), /* 655 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 656 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(57); exports.__esModule = true; exports.default = activeElement; var _ownerDocument = _interopRequireDefault(__webpack_require__(188)); function activeElement(doc) { if (doc === void 0) { doc = (0, _ownerDocument.default)(); } try { return doc.activeElement; } catch (e) { /* ie throws if no active element */ } } module.exports = exports["default"]; /***/ }), /* 657 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(184); /***/ }), /* 658 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _contains = __webpack_require__(161); var _contains2 = _interopRequireDefault(_contains); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(18); var _reactDom2 = _interopRequireDefault(_reactDom); var _addEventListener = __webpack_require__(1088); var _addEventListener2 = _interopRequireDefault(_addEventListener); var _ownerDocument = __webpack_require__(277); var _ownerDocument2 = _interopRequireDefault(_ownerDocument); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var escapeKeyCode = 27; function isLeftClickEvent(event) { return event.button === 0; } function isModifiedEvent(event) { return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); } /** * The `` component registers your callback on the document * when rendered. Powers the `` component. This is used achieve modal * style behavior where your callback is triggered when the user tries to * interact with the rest of the document or hits the `esc` key. */ var RootCloseWrapper = function (_React$Component) { _inherits(RootCloseWrapper, _React$Component); function RootCloseWrapper(props, context) { _classCallCheck(this, RootCloseWrapper); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); _this.addEventListeners = function () { var event = _this.props.event; var doc = (0, _ownerDocument2.default)(_this); // Use capture for this listener so it fires before React's listener, to // avoid false positives in the contains() check below if the target DOM // element is removed in the React mouse callback. _this.documentMouseCaptureListener = (0, _addEventListener2.default)(doc, event, _this.handleMouseCapture, true); _this.documentMouseListener = (0, _addEventListener2.default)(doc, event, _this.handleMouse); _this.documentKeyupListener = (0, _addEventListener2.default)(doc, 'keyup', _this.handleKeyUp); }; _this.removeEventListeners = function () { if (_this.documentMouseCaptureListener) { _this.documentMouseCaptureListener.remove(); } if (_this.documentMouseListener) { _this.documentMouseListener.remove(); } if (_this.documentKeyupListener) { _this.documentKeyupListener.remove(); } }; _this.handleMouseCapture = function (e) { _this.preventMouseRootClose = isModifiedEvent(e) || !isLeftClickEvent(e) || (0, _contains2.default)(_reactDom2.default.findDOMNode(_this), e.target); }; _this.handleMouse = function (e) { if (!_this.preventMouseRootClose && _this.props.onRootClose) { _this.props.onRootClose(e); } }; _this.handleKeyUp = function (e) { if (e.keyCode === escapeKeyCode && _this.props.onRootClose) { _this.props.onRootClose(e); } }; _this.preventMouseRootClose = false; return _this; } RootCloseWrapper.prototype.componentDidMount = function componentDidMount() { if (!this.props.disabled) { this.addEventListeners(); } }; RootCloseWrapper.prototype.componentDidUpdate = function componentDidUpdate(prevProps) { if (!this.props.disabled && prevProps.disabled) { this.addEventListeners(); } else if (this.props.disabled && !prevProps.disabled) { this.removeEventListeners(); } }; RootCloseWrapper.prototype.componentWillUnmount = function componentWillUnmount() { if (!this.props.disabled) { this.removeEventListeners(); } }; RootCloseWrapper.prototype.render = function render() { return this.props.children; }; return RootCloseWrapper; }(_react2.default.Component); RootCloseWrapper.displayName = 'RootCloseWrapper'; RootCloseWrapper.propTypes = { /** * Callback fired after click or mousedown. Also triggers when user hits `esc`. */ onRootClose: _propTypes2.default.func, /** * Children to render. */ children: _propTypes2.default.element, /** * Disable the the RootCloseWrapper, preventing it from triggering `onRootClose`. */ disabled: _propTypes2.default.bool, /** * Choose which document mouse event to bind to. */ event: _propTypes2.default.oneOf(['click', 'mousedown']) }; RootCloseWrapper.defaultProps = { event: 'click' }; exports.default = RootCloseWrapper; module.exports = exports['default']; /***/ }), /* 659 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(57); exports.__esModule = true; exports.default = void 0; var _inDOM = _interopRequireDefault(__webpack_require__(142)); var on = function on() {}; if (_inDOM.default) { on = function () { if (document.addEventListener) return function (node, eventName, handler, capture) { return node.addEventListener(eventName, handler, capture || false); };else if (document.attachEvent) return function (node, eventName, handler) { return node.attachEvent('on' + eventName, function (e) { e = e || window.event; e.target = e.target || e.srcElement; e.currentTarget = node; handler.call(node, e); }); }; }(); } var _default = on; exports.default = _default; module.exports = exports["default"]; /***/ }), /* 660 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(57); exports.__esModule = true; exports.default = void 0; var _inDOM = _interopRequireDefault(__webpack_require__(142)); var off = function off() {}; if (_inDOM.default) { off = function () { if (document.addEventListener) return function (node, eventName, handler, capture) { return node.removeEventListener(eventName, handler, capture || false); };else if (document.attachEvent) return function (node, eventName, handler) { return node.detachEvent('on' + eventName, handler); }; }(); } var _default = off; exports.default = _default; module.exports = exports["default"]; /***/ }), /* 661 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(57); exports.__esModule = true; exports.default = void 0; var _on = _interopRequireDefault(__webpack_require__(659)); exports.on = _on.default; var _off = _interopRequireDefault(__webpack_require__(660)); exports.off = _off.default; var _filter = _interopRequireDefault(__webpack_require__(2254)); exports.filter = _filter.default; var _listen = _interopRequireDefault(__webpack_require__(2256)); exports.listen = _listen.default; var _default = { on: _on.default, off: _off.default, filter: _filter.default, listen: _listen.default }; exports.default = _default; /***/ }), /* 662 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; 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; }; var _activeElement = __webpack_require__(656); var _activeElement2 = _interopRequireDefault(_activeElement); var _contains = __webpack_require__(161); var _contains2 = _interopRequireDefault(_contains); var _inDOM = __webpack_require__(142); var _inDOM2 = _interopRequireDefault(_inDOM); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _componentOrElement = __webpack_require__(450); var _componentOrElement2 = _interopRequireDefault(_componentOrElement); var _deprecated = __webpack_require__(2257); var _deprecated2 = _interopRequireDefault(_deprecated); var _elementType = __webpack_require__(16); var _elementType2 = _interopRequireDefault(_elementType); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(18); var _reactDom2 = _interopRequireDefault(_reactDom); var _warning = __webpack_require__(29); var _warning2 = _interopRequireDefault(_warning); var _ModalManager = __webpack_require__(2258); var _ModalManager2 = _interopRequireDefault(_ModalManager); var _Portal = __webpack_require__(1093); var _Portal2 = _interopRequireDefault(_Portal); var _RefHolder = __webpack_require__(2262); var _RefHolder2 = _interopRequireDefault(_RefHolder); var _addEventListener = __webpack_require__(1088); var _addEventListener2 = _interopRequireDefault(_addEventListener); var _addFocusListener = __webpack_require__(2263); var _addFocusListener2 = _interopRequireDefault(_addFocusListener); var _getContainer = __webpack_require__(453); var _getContainer2 = _interopRequireDefault(_getContainer); var _ownerDocument = __webpack_require__(277); var _ownerDocument2 = _interopRequireDefault(_ownerDocument); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable react/prop-types */ var modalManager = new _ModalManager2.default(); /** * Love them or hate them, `` provides a solid foundation for creating dialogs, lightboxes, or whatever else. * The Modal component renders its `children` node in front of a backdrop component. * * The Modal offers a few helpful features over using just a `` component and some styles: * * - Manages dialog stacking when one-at-a-time just isn't enough. * - Creates a backdrop, for disabling interaction below the modal. * - It properly manages focus; moving to the modal content, and keeping it there until the modal is closed. * - It disables scrolling of the page content while open. * - Adds the appropriate ARIA roles are automatically. * - Easily pluggable animations via a `` component. * * Note that, in the same way the backdrop element prevents users from clicking or interacting * with the page content underneath the Modal, Screen readers also need to be signaled to not to * interact with page content while the Modal is open. To do this, we use a common technique of applying * the `aria-hidden='true'` attribute to the non-Modal elements in the Modal `container`. This means that for * a Modal to be truly modal, it should have a `container` that is _outside_ your app's * React hierarchy (such as the default: document.body). */ var Modal = function (_React$Component) { _inherits(Modal, _React$Component); function Modal() { var _temp, _this, _ret; _classCallCheck(this, Modal); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _initialiseProps.call(_this), _temp), _possibleConstructorReturn(_this, _ret); } Modal.prototype.omitProps = function omitProps(props, propTypes) { var keys = Object.keys(props); var newProps = {}; keys.map(function (prop) { if (!Object.prototype.hasOwnProperty.call(propTypes, prop)) { newProps[prop] = props[prop]; } }); return newProps; }; Modal.prototype.render = function render() { var _props = this.props, show = _props.show, container = _props.container, children = _props.children, Transition = _props.transition, backdrop = _props.backdrop, className = _props.className, style = _props.style, onExit = _props.onExit, onExiting = _props.onExiting, onEnter = _props.onEnter, onEntering = _props.onEntering, onEntered = _props.onEntered; var dialog = _react2.default.Children.only(children); var filteredProps = this.omitProps(this.props, Modal.propTypes); var mountModal = show || Transition && !this.state.exited; if (!mountModal) { return null; } var _dialog$props = dialog.props, role = _dialog$props.role, tabIndex = _dialog$props.tabIndex; if (role === undefined || tabIndex === undefined) { dialog = (0, _react.cloneElement)(dialog, { role: role === undefined ? 'document' : role, tabIndex: tabIndex == null ? '-1' : tabIndex }); } if (Transition) { dialog = _react2.default.createElement( Transition, { appear: true, unmountOnExit: true, 'in': show, onExit: onExit, onExiting: onExiting, onExited: this.handleHidden, onEnter: onEnter, onEntering: onEntering, onEntered: onEntered }, dialog ); } return _react2.default.createElement( _Portal2.default, { ref: this.setMountNode, container: container, onRendered: this.onPortalRendered }, _react2.default.createElement( 'div', _extends({ ref: this.setModalNodeRef, role: role || 'dialog' }, filteredProps, { style: style, className: className }), backdrop && this.renderBackdrop(), _react2.default.createElement( _RefHolder2.default, { ref: this.setDialogRef }, dialog ) ) ); }; Modal.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (nextProps.show) { this.setState({ exited: false }); } else if (!nextProps.transition) { // Otherwise let handleHidden take care of marking exited. this.setState({ exited: true }); } }; Modal.prototype.componentWillUpdate = function componentWillUpdate(nextProps) { if (!this.props.show && nextProps.show) { this.checkForFocus(); } }; Modal.prototype.componentDidMount = function componentDidMount() { this._isMounted = true; if (this.props.show) { this.onShow(); } }; Modal.prototype.componentDidUpdate = function componentDidUpdate(prevProps) { var transition = this.props.transition; if (prevProps.show && !this.props.show && !transition) { // Otherwise handleHidden will call this. this.onHide(); } else if (!prevProps.show && this.props.show) { this.onShow(); } }; Modal.prototype.componentWillUnmount = function componentWillUnmount() { var _props2 = this.props, show = _props2.show, transition = _props2.transition; this._isMounted = false; if (show || transition && !this.state.exited) { this.onHide(); } }; Modal.prototype.autoFocus = function autoFocus() { if (!this.props.autoFocus) { return; } var dialogElement = this.getDialogElement(); var currentActiveElement = (0, _activeElement2.default)((0, _ownerDocument2.default)(this)); if (dialogElement && !(0, _contains2.default)(dialogElement, currentActiveElement)) { this.lastFocus = currentActiveElement; if (!dialogElement.hasAttribute('tabIndex')) { (0, _warning2.default)(false, 'The modal content node does not accept focus. For the benefit of ' + 'assistive technologies, the tabIndex of the node is being set ' + 'to "-1".'); dialogElement.setAttribute('tabIndex', -1); } dialogElement.focus(); } }; Modal.prototype.restoreLastFocus = function restoreLastFocus() { // Support: <=IE11 doesn't support `focus()` on svg elements (RB: #917) if (this.lastFocus && this.lastFocus.focus) { this.lastFocus.focus(); this.lastFocus = null; } }; Modal.prototype.getDialogElement = function getDialogElement() { return _reactDom2.default.findDOMNode(this.dialog); }; Modal.prototype.isTopModal = function isTopModal() { return this.props.manager.isTopModal(this); }; return Modal; }(_react2.default.Component); Modal.propTypes = _extends({}, _Portal2.default.propTypes, { /** * Set the visibility of the Modal */ show: _propTypes2.default.bool, /** * A Node, Component instance, or function that returns either. The Modal is appended to it's container element. * * For the sake of assistive technologies, the container should usually be the document body, so that the rest of the * page content can be placed behind a virtual backdrop as well as a visual one. */ container: _propTypes2.default.oneOfType([_componentOrElement2.default, _propTypes2.default.func]), /** * A callback fired when the Modal is opening. */ onShow: _propTypes2.default.func, /** * A callback fired when either the backdrop is clicked, or the escape key is pressed. * * The `onHide` callback only signals intent from the Modal, * you must actually set the `show` prop to `false` for the Modal to close. */ onHide: _propTypes2.default.func, /** * Include a backdrop component. */ backdrop: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.oneOf(['static'])]), /** * A function that returns a backdrop component. Useful for custom * backdrop rendering. * * ```js * renderBackdrop={props => } * ``` */ renderBackdrop: _propTypes2.default.func, /** * A callback fired when the escape key, if specified in `keyboard`, is pressed. */ onEscapeKeyDown: _propTypes2.default.func, /** * Support for this function will be deprecated. Please use `onEscapeKeyDown` instead * A callback fired when the escape key, if specified in `keyboard`, is pressed. * @deprecated */ onEscapeKeyUp: (0, _deprecated2.default)(_propTypes2.default.func, 'Please use onEscapeKeyDown instead for consistency'), /** * A callback fired when the backdrop, if specified, is clicked. */ onBackdropClick: _propTypes2.default.func, /** * A style object for the backdrop component. */ backdropStyle: _propTypes2.default.object, /** * A css class or classes for the backdrop component. */ backdropClassName: _propTypes2.default.string, /** * A css class or set of classes applied to the modal container when the modal is open, * and removed when it is closed. */ containerClassName: _propTypes2.default.string, /** * Close the modal when escape key is pressed */ keyboard: _propTypes2.default.bool, /** * A `[email protected]` `` component used * to control animations for the dialog component. */ transition: _elementType2.default, /** * A `[email protected]` `` component used * to control animations for the backdrop components. */ backdropTransition: _elementType2.default, /** * When `true` The modal will automatically shift focus to itself when it opens, and * replace it to the last focused element when it closes. This also * works correctly with any Modal children that have the `autoFocus` prop. * * Generally this should never be set to `false` as it makes the Modal less * accessible to assistive technologies, like screen readers. */ autoFocus: _propTypes2.default.bool, /** * When `true` The modal will prevent focus from leaving the Modal while open. * * Generally this should never be set to `false` as it makes the Modal less * accessible to assistive technologies, like screen readers. */ enforceFocus: _propTypes2.default.bool, /** * When `true` The modal will restore focus to previously focused element once * modal is hidden */ restoreFocus: _propTypes2.default.bool, /** * Callback fired before the Modal transitions in */ onEnter: _propTypes2.default.func, /** * Callback fired as the Modal begins to transition in */ onEntering: _propTypes2.default.func, /** * Callback fired after the Modal finishes transitioning in */ onEntered: _propTypes2.default.func, /** * Callback fired right before the Modal transitions out */ onExit: _propTypes2.default.func, /** * Callback fired as the Modal begins to transition out */ onExiting: _propTypes2.default.func, /** * Callback fired after the Modal finishes transitioning out */ onExited: _propTypes2.default.func, /** * A ModalManager instance used to track and manage the state of open * Modals. Useful when customizing how modals interact within a container */ manager: _propTypes2.default.object.isRequired }); Modal.defaultProps = { show: false, backdrop: true, keyboard: true, autoFocus: true, enforceFocus: true, restoreFocus: true, onHide: function onHide() {}, manager: modalManager, renderBackdrop: function renderBackdrop(props) { return _react2.default.createElement('div', props); } }; var _initialiseProps = function _initialiseProps() { var _this2 = this; this.state = { exited: !this.props.show }; this.renderBackdrop = function () { var _props3 = _this2.props, backdropStyle = _props3.backdropStyle, backdropClassName = _props3.backdropClassName, renderBackdrop = _props3.renderBackdrop, Transition = _props3.backdropTransition; var backdropRef = function backdropRef(ref) { return _this2.backdrop = ref; }; var backdrop = renderBackdrop({ ref: backdropRef, style: backdropStyle, className: backdropClassName, onClick: _this2.handleBackdropClick }); if (Transition) { backdrop = _react2.default.createElement( Transition, { appear: true, 'in': _this2.props.show }, backdrop ); } return backdrop; }; this.onPortalRendered = function () { _this2.autoFocus(); if (_this2.props.onShow) { _this2.props.onShow(); } }; this.onShow = function () { var doc = (0, _ownerDocument2.default)(_this2); var container = (0, _getContainer2.default)(_this2.props.container, doc.body); _this2.props.manager.add(_this2, container, _this2.props.containerClassName); _this2._onDocumentKeydownListener = (0, _addEventListener2.default)(doc, 'keydown', _this2.handleDocumentKeyDown); _this2._onDocumentKeyupListener = (0, _addEventListener2.default)(doc, 'keyup', _this2.handleDocumentKeyUp); _this2._onFocusinListener = (0, _addFocusListener2.default)(_this2.enforceFocus); }; this.onHide = function () { _this2.props.manager.remove(_this2); _this2._onDocumentKeydownListener.remove(); _this2._onDocumentKeyupListener.remove(); _this2._onFocusinListener.remove(); if (_this2.props.restoreFocus) { _this2.restoreLastFocus(); } }; this.setMountNode = function (ref) { _this2.mountNode = ref ? ref.getMountNode() : ref; }; this.setModalNodeRef = function (ref) { _this2.modalNode = ref; }; this.setDialogRef = function (ref) { _this2.dialog = ref; }; this.handleHidden = function () { _this2.setState({ exited: true }); _this2.onHide(); if (_this2.props.onExited) { var _props4; (_props4 = _this2.props).onExited.apply(_props4, arguments); } }; this.handleBackdropClick = function (e) { if (e.target !== e.currentTarget) { return; } if (_this2.props.onBackdropClick) { _this2.props.onBackdropClick(e); } if (_this2.props.backdrop === true) { _this2.props.onHide(); } }; this.handleDocumentKeyDown = function (e) { if (_this2.props.keyboard && e.keyCode === 27 && _this2.isTopModal()) { if (_this2.props.onEscapeKeyDown) { _this2.props.onEscapeKeyDown(e); } _this2.props.onHide(); } }; this.handleDocumentKeyUp = function (e) { if (_this2.props.keyboard && e.keyCode === 27 && _this2.isTopModal()) { if (_this2.props.onEscapeKeyUp) { _this2.props.onEscapeKeyUp(e); } } }; this.checkForFocus = function () { if (_inDOM2.default) { _this2.lastFocus = (0, _activeElement2.default)(); } }; this.enforceFocus = function () { if (!_this2.props.enforceFocus || !_this2._isMounted || !_this2.isTopModal()) { return; } var dialogElement = _this2.getDialogElement(); var currentActiveElement = (0, _activeElement2.default)((0, _ownerDocument2.default)(_this2)); if (dialogElement && !(0, _contains2.default)(dialogElement, currentActiveElement)) { dialogElement.focus(); } }; }; Modal.Manager = _ModalManager2.default; exports.default = Modal; module.exports = exports['default']; /***/ }), /* 663 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(57); exports.__esModule = true; exports.default = addClass; var _hasClass = _interopRequireDefault(__webpack_require__(1092)); function addClass(element, className) { if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className); } module.exports = exports["default"]; /***/ }), /* 664 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function replaceClassName(origClass, classToRemove) { return origClass.replace(new RegExp('(^|\\s)' + classToRemove + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, ''); } module.exports = function removeClass(element, className) { if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className)); }; /***/ }), /* 665 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; 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; }; var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _elementType = __webpack_require__(16); var _elementType2 = _interopRequireDefault(_elementType); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _Portal = __webpack_require__(1093); var _Portal2 = _interopRequireDefault(_Portal); var _Position = __webpack_require__(2269); var _Position2 = _interopRequireDefault(_Position); var _RootCloseWrapper = __webpack_require__(658); var _RootCloseWrapper2 = _interopRequireDefault(_RootCloseWrapper); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * Built on top of `` and ``, the overlay component is great for custom tooltip overlays. */ var Overlay = function (_React$Component) { _inherits(Overlay, _React$Component); function Overlay(props, context) { _classCallCheck(this, Overlay); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); _this.handleHidden = function () { _this.setState({ exited: true }); if (_this.props.onExited) { var _this$props; (_this$props = _this.props).onExited.apply(_this$props, arguments); } }; _this.state = { exited: !props.show }; _this.onHiddenListener = _this.handleHidden.bind(_this); return _this; } Overlay.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (nextProps.show) { this.setState({ exited: false }); } else if (!nextProps.transition) { // Otherwise let handleHidden take care of marking exited. this.setState({ exited: true }); } }; Overlay.prototype.render = function render() { var _props = this.props, container = _props.container, containerPadding = _props.containerPadding, target = _props.target, placement = _props.placement, shouldUpdatePosition = _props.shouldUpdatePosition, rootClose = _props.rootClose, children = _props.children, Transition = _props.transition, props = _objectWithoutProperties(_props, ['container', 'containerPadding', 'target', 'placement', 'shouldUpdatePosition', 'rootClose', 'children', 'transition']); // Don't un-render the overlay while it's transitioning out. var mountOverlay = props.show || Transition && !this.state.exited; if (!mountOverlay) { // Don't bother showing anything if we don't have to. return null; } var child = children; // Position is be inner-most because it adds inline styles into the child, // which the other wrappers don't forward correctly. child = _react2.default.createElement( _Position2.default, { container: container, containerPadding: containerPadding, target: target, placement: placement, shouldUpdatePosition: shouldUpdatePosition }, child ); if (Transition) { var onExit = props.onExit, onExiting = props.onExiting, onEnter = props.onEnter, onEntering = props.onEntering, onEntered = props.onEntered; // This animates the child node by injecting props, so it must precede // anything that adds a wrapping div. child = _react2.default.createElement( Transition, { 'in': props.show, appear: true, onExit: onExit, onExiting: onExiting, onExited: this.onHiddenListener, onEnter: onEnter, onEntering: onEntering, onEntered: onEntered }, child ); } // This goes after everything else because it adds a wrapping div. if (rootClose) { child = _react2.default.createElement( _RootCloseWrapper2.default, { onRootClose: props.onHide }, child ); } return _react2.default.createElement( _Portal2.default, { container: container }, child ); }; return Overlay; }(_react2.default.Component); Overlay.propTypes = _extends({}, _Portal2.default.propTypes, _Position2.default.propTypes, { /** * Set the visibility of the Overlay */ show: _propTypes2.default.bool, /** * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay */ rootClose: _propTypes2.default.bool, /** * A Callback fired by the Overlay when it wishes to be hidden. * * __required__ when `rootClose` is `true`. * * @type func */ onHide: function onHide(props) { var propType = _propTypes2.default.func; if (props.rootClose) { propType = propType.isRequired; } for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return propType.apply(undefined, [props].concat(args)); }, /** * A `[email protected]` `` component * used to animate the overlay as it changes visibility. */ transition: _elementType2.default, /** * Callback fired before the Overlay transitions in */ onEnter: _propTypes2.default.func, /** * Callback fired as the Overlay begins to transition in */ onEntering: _propTypes2.default.func, /** * Callback fired after the Overlay finishes transitioning in */ onEntered: _propTypes2.default.func, /** * Callback fired right before the Overlay transitions out */ onExit: _propTypes2.default.func, /** * Callback fired as the Overlay begins to transition out */ onExiting: _propTypes2.default.func, /** * Callback fired after the Overlay finishes transitioning out */ onExited: _propTypes2.default.func }); exports.default = Overlay; module.exports = exports['default']; /***/ }), /* 666 */ /***/ (function(module, exports) { function _extends() { module.exports = _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; }; return _extends.apply(this, arguments); } module.exports = _extends; /***/ }), /* 667 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2275); /***/ }), /* 668 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(640); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; /***/ }), /* 669 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_uncontrollable__ = __webpack_require__(75); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_uncontrollable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_uncontrollable__); var TAB = 'tab'; var PANE = 'pane'; var idPropType = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number]); var propTypes = { /** * HTML id attribute, required if no `generateChildId` prop * is specified. */ id: function id(props) { var error = null; if (!props.generateChildId) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } error = idPropType.apply(void 0, [props].concat(args)); if (!error && !props.id) { error = new Error('In order to properly initialize Tabs in a way that is accessible ' + 'to assistive technologies (such as screen readers) an `id` or a ' + '`generateChildId` prop to TabContainer is required'); } } return error; }, /** * A function that takes an `eventKey` and `type` and returns a unique id for * child tab ``s and ``s. The function _must_ be a pure * function, meaning it should always return the _same_ id for the same set * of inputs. The default value requires that an `id` to be set for the * ``. * * The `type` argument will either be `"tab"` or `"pane"`. * * @defaultValue (eventKey, type) => `${this.props.id}-${type}-${key}` */ generateChildId: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, /** * A callback fired when a tab is selected. * * @controllable activeKey */ onSelect: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, /** * The `eventKey` of the currently active tab. * * @controllable onSelect */ activeKey: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.any }; var childContextTypes = { $bs_tabContainer: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({ activeKey: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.any, onSelect: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func.isRequired, getTabId: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func.isRequired, getPaneId: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func.isRequired }) }; var TabContainer = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(TabContainer, _React$Component); function TabContainer() { return _React$Component.apply(this, arguments) || this; } var _proto = TabContainer.prototype; _proto.getChildContext = function getChildContext() { var _this$props = this.props, activeKey = _this$props.activeKey, onSelect = _this$props.onSelect, generateChildId = _this$props.generateChildId, id = _this$props.id; var getId = generateChildId || function (key, type) { return id ? id + "-" + type + "-" + key : null; }; return { $bs_tabContainer: { activeKey: activeKey, onSelect: onSelect, getTabId: function getTabId(key) { return getId(key, TAB); }, getPaneId: function getPaneId(key) { return getId(key, PANE); } } }; }; _proto.render = function render() { var _this$props2 = this.props, children = _this$props2.children, props = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props2, ["children"]); delete props.generateChildId; delete props.onSelect; delete props.activeKey; return __WEBPACK_IMPORTED_MODULE_2_react___default.a.cloneElement(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children), props); }; return TabContainer; }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component); TabContainer.propTypes = propTypes; TabContainer.childContextTypes = childContextTypes; /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_4_uncontrollable___default()(TabContainer, { activeKey: 'onSelect' })); /***/ }), /* 670 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(12); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default.a, /** * Sets a default animation strategy for all children ``s. Use * `false` to disable, `true` to enable the default `` animation or * a react-transition-group v2 `` component. */ animation: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default.a]), /** * Wait until the first "enter" transition to mount tabs (add them to the DOM) */ mountOnEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * Unmount tabs (remove it from the DOM) when they are no longer visible */ unmountOnExit: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool }; var defaultProps = { componentClass: 'div', animation: true, mountOnEnter: false, unmountOnExit: false }; var contextTypes = { $bs_tabContainer: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({ activeKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any }) }; var childContextTypes = { $bs_tabContent: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({ bsClass: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, animation: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default.a]), activeKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any, mountOnEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, unmountOnExit: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, onPaneEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired, onPaneExited: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired, exiting: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool.isRequired }) }; var TabContent = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(TabContent, _React$Component); function TabContent(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; _this.handlePaneEnter = _this.handlePaneEnter.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handlePaneExited = _this.handlePaneExited.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); // Active entries in state will be `null` unless `animation` is set. Need // to track active child in case keys swap and the active child changes // but the active key does not. _this.state = { activeKey: null, activeChild: null }; return _this; } var _proto = TabContent.prototype; _proto.getChildContext = function getChildContext() { var _this$props = this.props, bsClass = _this$props.bsClass, animation = _this$props.animation, mountOnEnter = _this$props.mountOnEnter, unmountOnExit = _this$props.unmountOnExit; var stateActiveKey = this.state.activeKey; var containerActiveKey = this.getContainerActiveKey(); var activeKey = stateActiveKey != null ? stateActiveKey : containerActiveKey; var exiting = stateActiveKey != null && stateActiveKey !== containerActiveKey; return { $bs_tabContent: { bsClass: bsClass, animation: animation, activeKey: activeKey, mountOnEnter: mountOnEnter, unmountOnExit: unmountOnExit, onPaneEnter: this.handlePaneEnter, onPaneExited: this.handlePaneExited, exiting: exiting } }; }; _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (!nextProps.animation && this.state.activeChild) { this.setState({ activeKey: null, activeChild: null }); } }; _proto.componentWillUnmount = function componentWillUnmount() { this.isUnmounted = true; }; _proto.getContainerActiveKey = function getContainerActiveKey() { var tabContainer = this.context.$bs_tabContainer; return tabContainer && tabContainer.activeKey; }; _proto.handlePaneEnter = function handlePaneEnter(child, childKey) { if (!this.props.animation) { return false; } // It's possible that this child should be transitioning out. if (childKey !== this.getContainerActiveKey()) { return false; } this.setState({ activeKey: childKey, activeChild: child }); return true; }; _proto.handlePaneExited = function handlePaneExited(child) { // This might happen as everything is unmounting. if (this.isUnmounted) { return; } this.setState(function (_ref) { var activeChild = _ref.activeChild; if (activeChild !== child) { return null; } return { activeKey: null, activeChild: null }; }); }; _proto.render = function render() { var _this$props2 = this.props, Component = _this$props2.componentClass, className = _this$props2.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props2, ["componentClass", "className"]); var _splitBsPropsAndOmit = Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["splitBsPropsAndOmit"])(props, ['animation', 'mountOnEnter', 'unmountOnExit']), bsProps = _splitBsPropsAndOmit[0], elementProps = _splitBsPropsAndOmit[1]; return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(bsProps, 'content')) })); }; return TabContent; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); TabContent.propTypes = propTypes; TabContent.defaultProps = defaultProps; TabContent.contextTypes = contextTypes; TabContent.childContextTypes = childContextTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["bsClass"])('tab', TabContent)); /***/ }), /* 671 */ /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /* 672 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(454), stackClear = __webpack_require__(2310), stackDelete = __webpack_require__(2311), stackGet = __webpack_require__(2312), stackHas = __webpack_require__(2313), stackSet = __webpack_require__(2314); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /* 673 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(228), root = __webpack_require__(126); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /* 674 */ /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__(2321), mapCacheDelete = __webpack_require__(2328), mapCacheGet = __webpack_require__(2330), mapCacheHas = __webpack_require__(2331), mapCacheSet = __webpack_require__(2332); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /* 675 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /* 676 */ /***/ (function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__(2338), baseUnary = __webpack_require__(678), nodeUtil = __webpack_require__(679); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /* 677 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /* 678 */ /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /* 679 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(1112); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(64)(module))) /***/ }), /* 680 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(1117), baseKeysIn = __webpack_require__(2341), isArrayLike = __webpack_require__(353); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; /***/ }), /* 681 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(2345), stubArray = __webpack_require__(1121); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /* 682 */ /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /* 683 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(1119); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /* 684 */ /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(1128); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /* 685 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(143); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = baseCreate; /***/ }), /* 686 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(103), isSymbol = __webpack_require__(463); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /* 687 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(462), toKey = __webpack_require__(355); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /* 688 */ /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /* 689 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Dialog = _interopRequireDefault(__webpack_require__(2378)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Dialog["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 690 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(21); var _interopRequireWildcard = __webpack_require__(356); exports.__esModule = true; exports.default = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(24)); var _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(30)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(23)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(2)); var _Transition = _interopRequireWildcard(__webpack_require__(160)); var _fadeStyles; var propTypes = { /** * Show the component; triggers the fade in or fade out animation */ in: _propTypes.default.bool, /** * Wait until the first "enter" transition to mount the component (add it to the DOM) */ mountOnEnter: _propTypes.default.bool, /** * Unmount the component (remove it from the DOM) when it is faded out */ unmountOnExit: _propTypes.default.bool, /** * Run the fade in animation when the component mounts, if it is initially * shown */ appear: _propTypes.default.bool, /** * Duration of the fade animation in milliseconds, to ensure that finishing * callbacks are fired even if the original browser transition end events are * canceled */ timeout: _propTypes.default.number, /** * Callback fired before the component fades in */ onEnter: _propTypes.default.func, /** * Callback fired after the component starts to fade in */ onEntering: _propTypes.default.func, /** * Callback fired after the has component faded in */ onEntered: _propTypes.default.func, /** * Callback fired before the component fades out */ onExit: _propTypes.default.func, /** * Callback fired after the component starts to fade out */ onExiting: _propTypes.default.func, /** * Callback fired after the component has faded out */ onExited: _propTypes.default.func }; var defaultProps = { in: false, timeout: 300, mountOnEnter: false, unmountOnExit: false, appear: false }; var fadeStyles = (_fadeStyles = {}, _fadeStyles[_Transition.ENTERING] = 'in', _fadeStyles[_Transition.ENTERED] = 'in', _fadeStyles); var Fade = /*#__PURE__*/ function (_React$Component) { (0, _inheritsLoose2.default)(Fade, _React$Component); function Fade() { return _React$Component.apply(this, arguments) || this; } var _proto = Fade.prototype; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, children = _this$props.children, props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, ["className", "children"]); return _react.default.createElement(_Transition.default, props, function (status, innerProps) { return _react.default.cloneElement(children, (0, _extends2.default)({}, innerProps, { className: (0, _classnames.default)('fade', className, children.props.className, fadeStyles[status]) })); }); }; return Fade; }(_react.default.Component); Fade.propTypes = propTypes; Fade.defaultProps = defaultProps; var _default = Fade; exports.default = _default; module.exports = exports["default"]; /***/ }), /* 691 */ /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__(125); /***/ }), /* 692 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(123); var core = __webpack_require__(72); var LIBRARY = __webpack_require__(443); var wksExt = __webpack_require__(691); var defineProperty = __webpack_require__(158).f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; /***/ }), /* 693 */ /***/ (function(module, exports, __webpack_require__) { // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var ctx = __webpack_require__(344); var IObject = __webpack_require__(639); var toObject = __webpack_require__(276); var toLength = __webpack_require__(442); var asc = __webpack_require__(2402); module.exports = function (TYPE, $create) { var IS_MAP = TYPE == 1; var IS_FILTER = TYPE == 2; var IS_SOME = TYPE == 3; var IS_EVERY = TYPE == 4; var IS_FIND_INDEX = TYPE == 6; var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; var create = $create || asc; return function ($this, callbackfn, that) { var O = toObject($this); var self = IObject(O); var f = ctx(callbackfn, that, 3); var length = toLength(self.length); var index = 0; var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; var val, res; for (;length > index; index++) if (NO_HOLES || index in self) { val = self[index]; res = f(val, index, O); if (TYPE) { if (IS_MAP) result[index] = res; // map else if (res) switch (TYPE) { case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if (IS_EVERY) return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; /***/ }), /* 694 */ /***/ (function(module, exports, __webpack_require__) { var ctx = __webpack_require__(344); var call = __webpack_require__(1085); var isArrayIter = __webpack_require__(1086); var anObject = __webpack_require__(225); var toLength = __webpack_require__(442); var getIterFn = __webpack_require__(1087); var BREAK = {}; var RETURN = {}; var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); var f = ctx(fn, that, entries ? 2 : 1); var index = 0; var length, step, iterator, result; if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if (result === BREAK || result === RETURN) return result; } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { result = call(iterator, f, step.value, entries); if (result === BREAK || result === RETURN) return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN; /***/ }), /* 695 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(140); module.exports = function (it, TYPE) { if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); return it; }; /***/ }), /* 696 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(2)); var _react = _interopRequireDefault(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _reactI18next = __webpack_require__(10); var _constants = _interopRequireWildcard(__webpack_require__(14)); var _CircularProgress = _interopRequireDefault(__webpack_require__(2424)); var _translate = _interopRequireDefault(__webpack_require__(15)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var RADIUS = 20; var DIAMETER = 50; var CENTER_POSITION = 25; var CIRCUMFERENCE = Math.PI * (RADIUS * 2); function getCircleStyle(percent) { if (percent) { return { strokeDasharray: CIRCUMFERENCE, strokeDashoffset: (100 - percent) / 100 * CIRCUMFERENCE }; } return { strokeDasharray: CIRCUMFERENCE / 10, strokeDashoffset: 0 }; } /** * @param {object} props react props * @example */ function CircularProgress(_ref) { var _classNames; var size = _ref.size, light = _ref.light, percent = _ref.percent, className = _ref.className, t = _ref.t; var classes = (0, _classnames["default"])('tc-circular-progress', className, _CircularProgress["default"].loader, (_classNames = {}, _defineProperty(_classNames, _CircularProgress["default"].loaderlight, light), _defineProperty(_classNames, _CircularProgress["default"].animate, !percent), _defineProperty(_classNames, _CircularProgress["default"].fixed, percent), _defineProperty(_classNames, _CircularProgress["default"].small, size === _constants.CIRCULAR_PROGRESS_SIZE.small), _defineProperty(_classNames, _CircularProgress["default"]["default"], size === _constants.CIRCULAR_PROGRESS_SIZE["default"]), _defineProperty(_classNames, _CircularProgress["default"].large, size === _constants.CIRCULAR_PROGRESS_SIZE.large), _classNames)); var percentLabel = percent && t('CIRCULAR_PROGRESS_LOADING_PERCENT', { defaultValue: '{{percent}}%', percent: percent }); return /*#__PURE__*/_react["default"].createElement("svg", { focusable: "false", className: classes, viewBox: "0 0 ".concat(DIAMETER, " ").concat(DIAMETER), "aria-busy": "true", "aria-label": t('CIRCULAR_PROGRESS_LOADING', { defaultValue: 'Loading {{percent}}', percent: percentLabel }) }, /*#__PURE__*/_react["default"].createElement("circle", { className: _CircularProgress["default"].path, r: RADIUS, cx: CENTER_POSITION, cy: CENTER_POSITION, fill: "none", style: getCircleStyle(percent) })); } CircularProgress.displayName = 'CircularProgress'; CircularProgress.propTypes = { className: _propTypes["default"].string, size: _propTypes["default"].oneOf(Object.keys(_constants.CIRCULAR_PROGRESS_SIZE).map(function (key) { return _constants.CIRCULAR_PROGRESS_SIZE[key]; })), light: _propTypes["default"].bool, percent: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string]), t: _propTypes["default"].func }; CircularProgress.defaultProps = { size: _constants.CIRCULAR_PROGRESS_SIZE["default"], t: (0, _translate["default"])() }; var _default = (0, _reactI18next.withTranslation)(_constants["default"])(CircularProgress); exports["default"] = _default; //# sourceMappingURL=CircularProgress.component.js.map /***/ }), /* 697 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(2)); var _react = _interopRequireDefault(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _Icon = _interopRequireDefault(__webpack_require__(2425)); var _IconsProvider = _interopRequireDefault(__webpack_require__(698)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } var FA_TRANSFORMS = { spin: 'fa-spin', 'rotate-90': 'fa-rotate-90', 'rotate-180': 'fa-rotate-180', 'rotate-270': 'fa-rotate-270', 'flip-horizontal': 'fa-flip-horizontal', 'flip-vertical': 'fa-flip-vertical' }; var SVG_TRANSFORMS = { spin: _Icon["default"].spin, 'rotate-45': _Icon["default"]['rotate-45'], 'rotate-90': _Icon["default"]['rotate-90'], 'rotate-135': _Icon["default"]['rotate-135'], 'rotate-180': _Icon["default"]['rotate-180'], 'rotate-225': _Icon["default"]['rotate-225'], 'rotate-270': _Icon["default"]['rotate-270'], 'rotate-315': _Icon["default"]['rotate-315'], 'flip-horizontal': _Icon["default"]['flip-horizontal'], 'flip-vertical': _Icon["default"]['flip-vertical'] }; var TRANSFORMS = Object.keys(SVG_TRANSFORMS); /** * SVG implementation is inspired by * http://svgicons.sparkk.fr/ * @param {object} props react props * @example */ function Icon(_ref) { var className = _ref.className, name = _ref.name, title = _ref.title, transform = _ref.transform, onClick = _ref.onClick, props = _objectWithoutProperties(_ref, ["className", "name", "title", "transform", "onClick"]); var accessibility = { focusable: 'false', // IE11 'aria-hidden': 'true', title: title || null }; if (name.startsWith('src-')) { var classNames = (0, _classnames["default"])(_Icon["default"]['tc-icon'], 'tc-icon', className); return /*#__PURE__*/_react["default"].createElement("img", _extends({ className: classNames, src: name.substring(4), alt: "", "aria-hidden": true }, props)); } if (name.startsWith('fa-')) { var classes = (0, _classnames["default"])('fa', name, className, transform && FA_TRANSFORMS[transform]); return /*#__PURE__*/_react["default"].createElement("i", _extends({ className: classes }, accessibility, props)); } if (name.startsWith('fa fa-') || name.startsWith('icon-')) { var _classes = (0, _classnames["default"])(name, className, transform && FA_TRANSFORMS[transform]); return /*#__PURE__*/_react["default"].createElement("i", _extends({ className: _classes }, accessibility, props)); } if (!name) { return /*#__PURE__*/_react["default"].createElement("div", { className: "alert alert-danger" }, "Icon: no name provided"); } var classname = (0, _classnames["default"])(_Icon["default"]['tc-svg-icon'], 'tc-svg-icon', className, SVG_TRANSFORMS[transform]); var iconElement = /*#__PURE__*/_react["default"].createElement("svg", _extends({ name: name, className: classname }, accessibility, props), /*#__PURE__*/_react["default"].createElement("use", { xlinkHref: _IconsProvider["default"].getIconHREF(name) })); if (!onClick) { return iconElement; } return ( /*#__PURE__*/ // eslint doesn't recognizes the xlinkHref mention // eslint-disable-next-line jsx-a11y/no-static-element-interactions _react["default"].createElement("button", { onClick: onClick, className: (0, _classnames["default"])('tc-svg-anchor', _Icon["default"].link) }, iconElement) ); } Icon.displayName = 'Icon'; Icon.propTypes = { className: _propTypes["default"].string, name: _propTypes["default"].string.isRequired, title: _propTypes["default"].string, transform: _propTypes["default"].oneOf(TRANSFORMS), onClick: _propTypes["default"].func }; var _default = Icon; exports["default"] = _default; //# sourceMappingURL=Icon.component.js.map /***/ }), /* 698 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _IconsProvider = _interopRequireDefault(__webpack_require__(2426)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _IconsProvider["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 699 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = getPropsFrom; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var NATIVE_PROPS = ['autoFocus', 'className', 'form', 'id', 'name', 'rel', 'role', 'tabIndex', 'target', 'title']; var NATIVE_PROPS_GROUPS = ['aria-', 'data-']; function extractComponentProps(Component, props) { if (!Component) { return {}; } var extractedProps = {}; Object.keys(Component.propTypes || {}).forEach(function (propName) { if (props[propName] !== undefined) { extractedProps[propName] = props[propName]; } }); return extractedProps; } function extractNativeProps(props) { var extractedProps = {}; Object.keys(props).forEach(function (propName) { if (NATIVE_PROPS.some(function (nativeProp) { return propName === nativeProp; }) || NATIVE_PROPS_GROUPS.some(function (nativeProp) { return propName.startsWith(nativeProp); })) { extractedProps[propName] = props[propName]; } }); return extractedProps; } function getPropsFrom(Component, props) { if (!Component) { return {}; } return _objectSpread(_objectSpread({}, extractNativeProps(props)), extractComponentProps(Component, props)); } //# sourceMappingURL=getPropsFrom.js.map /***/ }), /* 700 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "overlayPropTypes", { enumerable: true, get: function get() { return _OverlayTrigger.overlayPropTypes; } }); exports["default"] = void 0; var _OverlayTrigger = _interopRequireWildcard(__webpack_require__(2430)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } var _default = _OverlayTrigger["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 701 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 702 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = useCallbackRef; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /** * creates a MutableRef with ref change callback * @param initialValue - initial ref value * @param {Function} callback - a callback to run when value changes * * @example * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue); * ref.current = 1; * // prints 0 -> 1 * * @see https://reactjs.org/docs/hooks-reference.html#useref * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref * @returns {MutableRefObject} */ function useCallbackRef(initialValue, callback) { var ref = Object(__WEBPACK_IMPORTED_MODULE_0_react__["useState"])(function () { return ({ // value value: initialValue, // last callback callback: callback, // "memoized" public interface facade: { get current() { return ref.value; }, set current(value) { var last = ref.value; if (last !== value) { ref.value = value; ref.callback(value, last); } } } }); })[0]; // update callback ref.callback = callback; return ref.facade; } /***/ }), /* 703 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = createCallbackRef; /** * creates a Ref object with on change callback * @param callback * @returns {RefObject} * * @see {@link useCallbackRef} * @see https://reactjs.org/docs/refs-and-the-dom.html#creating-refs */ function createCallbackRef(callback) { var current = null; return { get current() { return current; }, set current(value) { var last = current; if (last !== value) { current = value; callback(value, last); } } }; } /***/ }), /* 704 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return mediumFocus; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mediumBlur; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return mediumEffect; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return mediumSidecar; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_use_sidecar__ = __webpack_require__(2476); var mediumFocus = Object(__WEBPACK_IMPORTED_MODULE_0_use_sidecar__["a" /* createMedium */])({}, function (_ref) { var target = _ref.target, currentTarget = _ref.currentTarget; return { target: target, currentTarget: currentTarget }; }); var mediumBlur = Object(__WEBPACK_IMPORTED_MODULE_0_use_sidecar__["a" /* createMedium */])(); var mediumEffect = Object(__WEBPACK_IMPORTED_MODULE_0_use_sidecar__["a" /* createMedium */])(); var mediumSidecar = Object(__WEBPACK_IMPORTED_MODULE_0_use_sidecar__["b" /* createSidecarMedium */])({ async: true }); /***/ }), /* 705 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__(190); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array__ = __webpack_require__(232); 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; }; var filterNested = function filterNested(nodes) { var l = nodes.length; for (var i = 0; i < l; i += 1) { var _loop = function _loop(j) { if (i !== j) { if (nodes[i].contains(nodes[j])) { return { v: filterNested(nodes.filter(function (x) { return x !== nodes[j]; })) }; } } }; for (var j = 0; j < l; j += 1) { var _ret = _loop(j); if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; } } return nodes; }; var getTopParent = function getTopParent(node) { return node.parentNode ? getTopParent(node.parentNode) : node; }; var getAllAffectedNodes = function getAllAffectedNodes(node) { var nodes = Object(__WEBPACK_IMPORTED_MODULE_1__array__["b" /* asArray */])(node); return nodes.filter(Boolean).reduce(function (acc, currentNode) { var group = currentNode.getAttribute(__WEBPACK_IMPORTED_MODULE_0__constants__["d" /* FOCUS_GROUP */]); acc.push.apply(acc, group ? filterNested(Object(__WEBPACK_IMPORTED_MODULE_1__array__["c" /* toArray */])(getTopParent(currentNode).querySelectorAll('[' + __WEBPACK_IMPORTED_MODULE_0__constants__["d" /* FOCUS_GROUP */] + '="' + group + '"]:not([' + __WEBPACK_IMPORTED_MODULE_0__constants__["c" /* FOCUS_DISABLED */] + '="disabled"])'))) : [currentNode]); return acc; }, []); }; /* harmony default export */ __webpack_exports__["a"] = (getAllAffectedNodes); /***/ }), /* 706 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 707 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "LOADING_STEP_STATUSES", { enumerable: true, get: function get() { return _Stepper.LOADING_STEP_STATUSES; } }); Object.defineProperty(exports, "isStepsLoading", { enumerable: true, get: function get() { return _Stepper.isStepsLoading; } }); Object.defineProperty(exports, "isAllSuccessful", { enumerable: true, get: function get() { return _Stepper.isAllSuccessful; } }); Object.defineProperty(exports, "isErrorInSteps", { enumerable: true, get: function get() { return _Stepper.isErrorInSteps; } }); exports["default"] = void 0; var _Stepper = _interopRequireWildcard(__webpack_require__(2519)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } var _default = _Stepper["default"]; // TODO 6.0: remove those exports, they are attached to component exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 708 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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; }; exports.default = compareObjects; function compareObjects(objA, objB) { var keys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; if (objA === objB) { return false; } var aKeys = Object.keys(objA); var bKeys = Object.keys(objB); if (aKeys.length !== bKeys.length) { return true; } var keysMap = {}; var i = void 0, len = void 0; for (i = 0, len = keys.length; i < len; i++) { keysMap[keys[i]] = true; } for (i = 0, len = aKeys.length; i < len; i++) { var key = aKeys[i]; var aValue = objA[key]; var bValue = objB[key]; if (aValue === bValue) { continue; } if (!keysMap[key] || aValue === null || bValue === null || (typeof aValue === 'undefined' ? 'undefined' : _typeof(aValue)) !== 'object' || (typeof bValue === 'undefined' ? 'undefined' : _typeof(bValue)) !== 'object') { return true; } var aValueKeys = Object.keys(aValue); var bValueKeys = Object.keys(bValue); if (aValueKeys.length !== bValueKeys.length) { return true; } for (var n = 0, length = aValueKeys.length; n < length; n++) { var aValueKey = aValueKeys[n]; if (aValue[aValueKey] !== bValue[aValueKey]) { return true; } } } return false; } /***/ }), /* 709 */ /***/ (function(module, exports) { function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } module.exports = _inheritsLoose; /***/ }), /* 710 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var keys = __webpack_require__(1181); var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; var toStr = Object.prototype.toString; var concat = Array.prototype.concat; var origDefineProperty = Object.defineProperty; var isFunction = function (fn) { return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; }; var arePropertyDescriptorsSupported = function () { var obj = {}; try { origDefineProperty(obj, 'x', { enumerable: false, value: obj }); // eslint-disable-next-line no-unused-vars, no-restricted-syntax for (var _ in obj) { // jscs:ignore disallowUnusedVariables return false; } return obj.x === obj; } catch (e) { /* this is IE 8. */ return false; } }; var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); var defineProperty = function (object, name, value, predicate) { if (name in object && (!isFunction(predicate) || !predicate())) { return; } if (supportsDescriptors) { origDefineProperty(object, name, { configurable: true, enumerable: false, value: value, writable: true }); } else { object[name] = value; } }; var defineProperties = function (object, map) { var predicates = arguments.length > 2 ? arguments[2] : {}; var props = keys(map); if (hasSymbols) { props = concat.call(props, Object.getOwnPropertySymbols(map)); } for (var i = 0; i < props.length; i += 1) { defineProperty(object, props[i], map[props[i]], predicates[props[i]]); } }; defineProperties.supportsDescriptors = !!supportsDescriptors; module.exports = defineProperties; /***/ }), /* 711 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ManagerReferenceNodeContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ManagerReferenceNodeSetterContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return Manager; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_assertThisInitialized__ = __webpack_require__(183); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_assertThisInitialized___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_assertThisInitialized__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_inheritsLoose__ = __webpack_require__(709); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_inheritsLoose___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_inheritsLoose__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_defineProperty__ = __webpack_require__(433); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_defineProperty__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_create_react_context__ = __webpack_require__(2632); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_create_react_context___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_create_react_context__); var ManagerReferenceNodeContext = __WEBPACK_IMPORTED_MODULE_4_create_react_context___default()(); var ManagerReferenceNodeSetterContext = __WEBPACK_IMPORTED_MODULE_4_create_react_context___default()(); var Manager = /*#__PURE__*/ function (_React$Component) { __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_inheritsLoose___default()(Manager, _React$Component); function Manager() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_assertThisInitialized___default()(_this), "referenceNode", void 0); __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_assertThisInitialized___default()(_this), "setReferenceNode", function (newReferenceNode) { if (newReferenceNode && _this.referenceNode !== newReferenceNode) { _this.referenceNode = newReferenceNode; _this.forceUpdate(); } }); return _this; } var _proto = Manager.prototype; _proto.componentWillUnmount = function componentWillUnmount() { this.referenceNode = null; }; _proto.render = function render() { return __WEBPACK_IMPORTED_MODULE_3_react__["createElement"](ManagerReferenceNodeContext.Provider, { value: this.referenceNode }, __WEBPACK_IMPORTED_MODULE_3_react__["createElement"](ManagerReferenceNodeSetterContext.Provider, { value: this.setReferenceNode }, this.props.children)); }; return Manager; }(__WEBPACK_IMPORTED_MODULE_3_react__["Component"]); /***/ }), /* 712 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Emphasis = _interopRequireDefault(__webpack_require__(1186)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Emphasis["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 713 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "SimpleTextKeyValue", { enumerable: true, get: function get() { return _SimpleTextKeyValue["default"]; } }); var _SimpleTextKeyValue = _interopRequireDefault(__webpack_require__(2649)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } //# sourceMappingURL=index.js.map /***/ }), /* 714 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tc-model":"ModelViewer__tc-model___1TvB-","tc-model-leaf":"ModelViewer__tc-model-leaf___1SMRa","tc-model-branch":"ModelViewer__tc-model-branch___rLC2g","tc-model-leaf-padding-left":"ModelViewer__tc-model-leaf-padding-left___3wHvg","tc-model-branch-padding-left":"ModelViewer__tc-model-branch-padding-left___1bsjd","tc-model-leaf-button":"ModelViewer__tc-model-leaf-button___1LDdU","tc-model-branch-button":"ModelViewer__tc-model-branch-button___1VPBx","tc-model-leaf-button-highlighted":"ModelViewer__tc-model-leaf-button-highlighted___QVwk9","tc-model-branch-button-highlighted":"ModelViewer__tc-model-branch-button-highlighted___1j0uw","tc-model-branch-content":"ModelViewer__tc-model-branch-content___3JvZn","tc-model-leaf-options":"ModelViewer__tc-model-leaf-options___111Fs","tc-model-leaf-options-burger":"ModelViewer__tc-model-leaf-options-burger___1zP6V","tc-model-leaf-options-tooltip":"ModelViewer__tc-model-leaf-options-tooltip___2r4Kc","tc-model-leaf-options-quality-circles":"ModelViewer__tc-model-leaf-options-quality-circles___u7p3V","tc-model-leaf-options-quality-circles-blink":"ModelViewer__tc-model-leaf-options-quality-circles-blink___LFXn6","object-blink":"ModelViewer__object-blink___17XjK","skeleton-blink":"ModelViewer__skeleton-blink___2T71W"}; /***/ }), /* 715 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "Tree", { enumerable: true, get: function get() { return _Tree["default"]; } }); Object.defineProperty(exports, "TreeNode", { enumerable: true, get: function get() { return _TreeNode["default"]; } }); Object.defineProperty(exports, "TreeNodeList", { enumerable: true, get: function get() { return _TreeNodeList["default"]; } }); var _Tree = _interopRequireDefault(__webpack_require__(1193)); var _TreeNode = _interopRequireDefault(__webpack_require__(716)); var _TreeNodeList = _interopRequireDefault(__webpack_require__(1194)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } //# sourceMappingURL=index.js.map /***/ }), /* 716 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _TreeNode = _interopRequireDefault(__webpack_require__(2668)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _TreeNode["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 717 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /* 718 */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(719)('keys'); var uid = __webpack_require__(471); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /* 719 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(65); var global = __webpack_require__(90); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: __webpack_require__(366) ? 'pure' : 'global', copyright: '© 2019 Denis Pushkarev (zloirock.ru)' }); /***/ }), /* 720 */ /***/ (function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(127); var core = __webpack_require__(65); var fails = __webpack_require__(287); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; /***/ }), /* 721 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(195); var document = __webpack_require__(90).document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; /***/ }), /* 722 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(195); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /* 723 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _iterator = __webpack_require__(2690); var _iterator2 = _interopRequireDefault(_iterator); var _symbol = __webpack_require__(2700); var _symbol2 = _interopRequireDefault(_symbol); var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { return typeof obj === "undefined" ? "undefined" : _typeof(obj); } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); }; /***/ }), /* 724 */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /* 725 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(146); var dPs = __webpack_require__(2694); var enumBugKeys = __webpack_require__(727); var IE_PROTO = __webpack_require__(718)('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(721)('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __webpack_require__(1203).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /* 726 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(724); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /* 727 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 728 */ /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__(91); /***/ }), /* 729 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(90); var core = __webpack_require__(65); var LIBRARY = __webpack_require__(366); var wksExt = __webpack_require__(728); var defineProperty = __webpack_require__(164).f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; /***/ }), /* 730 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /* 731 */ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(475); var createDesc = __webpack_require__(367); var toIObject = __webpack_require__(237); var toPrimitive = __webpack_require__(722); var has = __webpack_require__(235); var IE8_DOM_DEFINE = __webpack_require__(1197); var gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(165) ? gOPD : function getOwnPropertyDescriptor(O, P) { O = toIObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { return gOPD(O, P); } catch (e) { /* empty */ } if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }), /* 732 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(197); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(26); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(36); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CellSizeAndPositionManager__ = __webpack_require__(2720); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__maxElementSize_js__ = __webpack_require__(2724); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__types__ = __webpack_require__(31); /** * Browsers have scroll offset limitations (eg Chrome stops scrolling at ~33.5M pixels where as Edge tops out at ~1.5M pixels). * After a certain position, the browser won't allow the user to scroll further (even via JavaScript scroll offset adjustments). * This util picks a lower ceiling for max size and artificially adjusts positions within to make it transparent for users. */ /** * Extends CellSizeAndPositionManager and adds scaling behavior for lists that are too large to fit within a browser's native limits. */ var ScalingCellSizeAndPositionManager = function () { function ScalingCellSizeAndPositionManager(_ref) { var _ref$maxScrollSize = _ref.maxScrollSize, maxScrollSize = _ref$maxScrollSize === undefined ? Object(__WEBPACK_IMPORTED_MODULE_4__maxElementSize_js__["a" /* getMaxElementSize */])() : _ref$maxScrollSize, params = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_ref, ['maxScrollSize']); __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, ScalingCellSizeAndPositionManager); // Favor composition over inheritance to simplify IE10 support this._cellSizeAndPositionManager = new __WEBPACK_IMPORTED_MODULE_3__CellSizeAndPositionManager__["a" /* default */](params); this._maxScrollSize = maxScrollSize; } __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default()(ScalingCellSizeAndPositionManager, [{ key: 'areOffsetsAdjusted', value: function areOffsetsAdjusted() { return this._cellSizeAndPositionManager.getTotalSize() > this._maxScrollSize; } }, { key: 'configure', value: function configure(params) { this._cellSizeAndPositionManager.configure(params); } }, { key: 'getCellCount', value: function getCellCount() { return this._cellSizeAndPositionManager.getCellCount(); } }, { key: 'getEstimatedCellSize', value: function getEstimatedCellSize() { return this._cellSizeAndPositionManager.getEstimatedCellSize(); } }, { key: 'getLastMeasuredIndex', value: function getLastMeasuredIndex() { return this._cellSizeAndPositionManager.getLastMeasuredIndex(); } /** * Number of pixels a cell at the given position (offset) should be shifted in order to fit within the scaled container. * The offset passed to this function is scaled (safe) as well. */ }, { key: 'getOffsetAdjustment', value: function getOffsetAdjustment(_ref2) { var containerSize = _ref2.containerSize, offset = _ref2.offset; var totalSize = this._cellSizeAndPositionManager.getTotalSize(); var safeTotalSize = this.getTotalSize(); var offsetPercentage = this._getOffsetPercentage({ containerSize: containerSize, offset: offset, totalSize: safeTotalSize }); return Math.round(offsetPercentage * (safeTotalSize - totalSize)); } }, { key: 'getSizeAndPositionOfCell', value: function getSizeAndPositionOfCell(index) { return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index); } }, { key: 'getSizeAndPositionOfLastMeasuredCell', value: function getSizeAndPositionOfLastMeasuredCell() { return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell(); } /** See CellSizeAndPositionManager#getTotalSize */ }, { key: 'getTotalSize', value: function getTotalSize() { return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize()); } /** See CellSizeAndPositionManager#getUpdatedOffsetForIndex */ }, { key: 'getUpdatedOffsetForIndex', value: function getUpdatedOffsetForIndex(_ref3) { var _ref3$align = _ref3.align, align = _ref3$align === undefined ? 'auto' : _ref3$align, containerSize = _ref3.containerSize, currentOffset = _ref3.currentOffset, targetIndex = _ref3.targetIndex; currentOffset = this._safeOffsetToOffset({ containerSize: containerSize, offset: currentOffset }); var offset = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({ align: align, containerSize: containerSize, currentOffset: currentOffset, targetIndex: targetIndex }); return this._offsetToSafeOffset({ containerSize: containerSize, offset: offset }); } /** See CellSizeAndPositionManager#getVisibleCellRange */ }, { key: 'getVisibleCellRange', value: function getVisibleCellRange(_ref4) { var containerSize = _ref4.containerSize, offset = _ref4.offset; offset = this._safeOffsetToOffset({ containerSize: containerSize, offset: offset }); return this._cellSizeAndPositionManager.getVisibleCellRange({ containerSize: containerSize, offset: offset }); } }, { key: 'resetCell', value: function resetCell(index) { this._cellSizeAndPositionManager.resetCell(index); } }, { key: '_getOffsetPercentage', value: function _getOffsetPercentage(_ref5) { var containerSize = _ref5.containerSize, offset = _ref5.offset, totalSize = _ref5.totalSize; return totalSize <= containerSize ? 0 : offset / (totalSize - containerSize); } }, { key: '_offsetToSafeOffset', value: function _offsetToSafeOffset(_ref6) { var containerSize = _ref6.containerSize, offset = _ref6.offset; var totalSize = this._cellSizeAndPositionManager.getTotalSize(); var safeTotalSize = this.getTotalSize(); if (totalSize === safeTotalSize) { return offset; } else { var offsetPercentage = this._getOffsetPercentage({ containerSize: containerSize, offset: offset, totalSize: totalSize }); return Math.round(offsetPercentage * (safeTotalSize - containerSize)); } } }, { key: '_safeOffsetToOffset', value: function _safeOffsetToOffset(_ref7) { var containerSize = _ref7.containerSize, offset = _ref7.offset; var totalSize = this._cellSizeAndPositionManager.getTotalSize(); var safeTotalSize = this.getTotalSize(); if (totalSize === safeTotalSize) { return offset; } else { var offsetPercentage = this._getOffsetPercentage({ containerSize: containerSize, offset: offset, totalSize: safeTotalSize }); return Math.round(offsetPercentage * (totalSize - containerSize)); } } }]); return ScalingCellSizeAndPositionManager; }(); /* harmony default export */ __webpack_exports__["a"] = (ScalingCellSizeAndPositionManager); /***/ }), /* 733 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 734 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = createCallbackMemoizer; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys__ = __webpack_require__(735); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys__); /** * Helper utility that updates the specified callback whenever any of the specified indices have changed. */ function createCallbackMemoizer() { var requireAllKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; var cachedIndices = {}; return function (_ref) { var callback = _ref.callback, indices = _ref.indices; var keys = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys___default()(indices); var allInitialized = !requireAllKeys || keys.every(function (key) { var value = indices[key]; return Array.isArray(value) ? value.length > 0 : value >= 0; }); var indexChanged = keys.length !== __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys___default()(cachedIndices).length || keys.some(function (key) { var cachedValue = cachedIndices[key]; var value = indices[key]; return Array.isArray(value) ? cachedValue.join(',') !== value.join(',') : cachedValue !== value; }); cachedIndices = indices; if (allInitialized && indexChanged) { callback(indices); } }; } /***/ }), /* 735 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(2725), __esModule: true }; /***/ }), /* 736 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(370); var TAG = __webpack_require__(91)('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /* 737 */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(736); var ITERATOR = __webpack_require__(91)('iterator'); var Iterators = __webpack_require__(288); module.exports = __webpack_require__(65).getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /* 738 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 25.4.1.5 NewPromiseCapability(C) var aFunction = __webpack_require__(472); function PromiseCapability(C) { var resolve, reject; this.promise = new C(function ($$resolve, $$reject) { if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aFunction(resolve); this.reject = aFunction(reject); } module.exports.f = function (C) { return new PromiseCapability(C); }; /***/ }), /* 739 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export DEFAULT_SCROLLING_RESET_TIME_INTERVAL */ /* unused harmony export bpfrpt_proptype_CellMeasurerCache */ /* unused harmony export bpfrpt_proptype_Positioner */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(56); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(198); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_get_prototype_of__ = __webpack_require__(78); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_get_prototype_of___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_get_prototype_of__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(26); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass__ = __webpack_require__(36); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(37); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_lifecycles_compat__ = __webpack_require__(196); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PositionCache__ = __webpack_require__(2761); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_requestAnimationTimeout__ = __webpack_require__(371); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_prop_types__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_prop_types__); var emptyObject = {}; /** * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress. * This improves performance and makes scrolling smoother. */ var DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150; /** * This component efficiently displays arbitrarily positioned cells using windowing techniques. * Cell position is determined by an injected `cellPositioner` property. * Windowing is vertical; this component does not support horizontal scrolling. * * Rendering occurs in two phases: * 1) First pass uses estimated cell sizes (provided by the cache) to determine how many cells to measure in a batch. * Batch size is chosen using a fast, naive layout algorithm that stacks images in order until the viewport has been filled. * After measurement is complete (componentDidMount or componentDidUpdate) this component evaluates positioned cells * in order to determine if another measurement pass is required (eg if actual cell sizes were less than estimated sizes). * All measurements are permanently cached (keyed by `keyMapper`) for performance purposes. * 2) Second pass uses the external `cellPositioner` to layout cells. * At this time the positioner has access to cached size measurements for all cells. * The positions it returns are cached by Masonry for fast access later. * Phase one is repeated if the user scrolls beyond the current layout's bounds. * If the layout is invalidated due to eg a resize, cached positions can be cleared using `recomputeCellPositions()`. * * Animation constraints: * Simple animations are supported (eg translate/slide into place on initial reveal). * More complex animations are not (eg flying from one position to another on resize). * * Layout constraints: * This component supports multi-column layout. * The height of each item may vary. * The width of each item must not exceed the width of the column it is "in". * The left position of all items within a column must align. * (Items may not span multiple columns.) */ var Masonry = function (_React$PureComponent) { __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits___default()(Masonry, _React$PureComponent); function Masonry() { var _ref; var _temp, _this, _ret; __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, Masonry); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = Masonry.__proto__ || __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_get_prototype_of___default()(Masonry)).call.apply(_ref, [this].concat(args))), _this), _this.state = { isScrolling: false, scrollTop: 0 }, _this._invalidateOnUpdateStartIndex = null, _this._invalidateOnUpdateStopIndex = null, _this._positionCache = new __WEBPACK_IMPORTED_MODULE_10__PositionCache__["a" /* default */](), _this._startIndex = null, _this._startIndexMemoized = null, _this._stopIndex = null, _this._stopIndexMemoized = null, _this._debounceResetIsScrollingCallback = function () { _this.setState({ isScrolling: false }); }, _this._setScrollingContainerRef = function (ref) { _this._scrollingContainer = ref; }, _this._onScroll = function (event) { var height = _this.props.height; var eventScrollTop = event.target.scrollTop; // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events, // Gradually converging on a scrollTop that is within the bounds of the new, smaller height. // This causes a series of rapid renders that is slow for long lists. // We can avoid that by doing some simple bounds checking to ensure that scroll offsets never exceed their bounds. var scrollTop = Math.min(Math.max(0, _this._getEstimatedTotalHeight() - height), eventScrollTop); // On iOS, we can arrive at negative offsets by swiping past the start or end. // Avoid re-rendering in this case as it can cause problems; see #532 for more. if (eventScrollTop !== scrollTop) { return; } // Prevent pointer events from interrupting a smooth scroll _this._debounceResetIsScrolling(); // Certain devices (like Apple touchpad) rapid-fire duplicate events. // Don't force a re-render if this is the case. // The mouse may move faster then the animation frame does. // Use requestAnimationFrame to avoid over-updating. if (_this.state.scrollTop !== scrollTop) { _this.setState({ isScrolling: true, scrollTop: scrollTop }); } }, _temp), __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret); } __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass___default()(Masonry, [{ key: 'clearCellPositions', value: function clearCellPositions() { this._positionCache = new __WEBPACK_IMPORTED_MODULE_10__PositionCache__["a" /* default */](); this.forceUpdate(); } // HACK This method signature was intended for Grid }, { key: 'invalidateCellSizeAfterRender', value: function invalidateCellSizeAfterRender(_ref2) { var index = _ref2.rowIndex; if (this._invalidateOnUpdateStartIndex === null) { this._invalidateOnUpdateStartIndex = index; this._invalidateOnUpdateStopIndex = index; } else { this._invalidateOnUpdateStartIndex = Math.min(this._invalidateOnUpdateStartIndex, index); this._invalidateOnUpdateStopIndex = Math.max(this._invalidateOnUpdateStopIndex, index); } } }, { key: 'recomputeCellPositions', value: function recomputeCellPositions() { var stopIndex = this._positionCache.count - 1; this._positionCache = new __WEBPACK_IMPORTED_MODULE_10__PositionCache__["a" /* default */](); this._populatePositionCache(0, stopIndex); this.forceUpdate(); } }, { key: 'componentDidMount', value: function componentDidMount() { this._checkInvalidateOnUpdate(); this._invokeOnScrollCallback(); this._invokeOnCellsRenderedCallback(); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps, prevState) { this._checkInvalidateOnUpdate(); this._invokeOnScrollCallback(); this._invokeOnCellsRenderedCallback(); if (this.props.scrollTop !== prevProps.scrollTop) { this._debounceResetIsScrolling(); } } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this._debounceResetIsScrollingId) { Object(__WEBPACK_IMPORTED_MODULE_11__utils_requestAnimationTimeout__["a" /* cancelAnimationTimeout */])(this._debounceResetIsScrollingId); } } }, { key: 'render', value: function render() { var _this2 = this; var _props = this.props, autoHeight = _props.autoHeight, cellCount = _props.cellCount, cellMeasurerCache = _props.cellMeasurerCache, cellRenderer = _props.cellRenderer, className = _props.className, height = _props.height, id = _props.id, keyMapper = _props.keyMapper, overscanByPixels = _props.overscanByPixels, role = _props.role, style = _props.style, tabIndex = _props.tabIndex, width = _props.width, rowDirection = _props.rowDirection; var _state = this.state, isScrolling = _state.isScrolling, scrollTop = _state.scrollTop; var children = []; var estimateTotalHeight = this._getEstimatedTotalHeight(); var shortestColumnSize = this._positionCache.shortestColumnSize; var measuredCellCount = this._positionCache.count; var startIndex = 0; var stopIndex = void 0; this._positionCache.range(Math.max(0, scrollTop - overscanByPixels), height + overscanByPixels * 2, function (index, left, top) { var _style; if (typeof stopIndex === 'undefined') { startIndex = index; stopIndex = index; } else { startIndex = Math.min(startIndex, index); stopIndex = Math.max(stopIndex, index); } children.push(cellRenderer({ index: index, isScrolling: isScrolling, key: keyMapper(index), parent: _this2, style: (_style = { height: cellMeasurerCache.getHeight(index) }, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_style, rowDirection === 'ltr' ? 'left' : 'right', left), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_style, 'position', 'absolute'), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_style, 'top', top), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_style, 'width', cellMeasurerCache.getWidth(index)), _style) })); }); // We need to measure additional cells for this layout if (shortestColumnSize < scrollTop + height + overscanByPixels && measuredCellCount < cellCount) { var batchSize = Math.min(cellCount - measuredCellCount, Math.ceil((scrollTop + height + overscanByPixels - shortestColumnSize) / cellMeasurerCache.defaultHeight * width / cellMeasurerCache.defaultWidth)); for (var _index = measuredCellCount; _index < measuredCellCount + batchSize; _index++) { stopIndex = _index; children.push(cellRenderer({ index: _index, isScrolling: isScrolling, key: keyMapper(_index), parent: this, style: { width: cellMeasurerCache.getWidth(_index) } })); } } this._startIndex = startIndex; this._stopIndex = stopIndex; return __WEBPACK_IMPORTED_MODULE_8_react__["createElement"]( 'div', { ref: this._setScrollingContainerRef, 'aria-label': this.props['aria-label'], className: __WEBPACK_IMPORTED_MODULE_7_classnames___default()('ReactVirtualized__Masonry', className), id: id, onScroll: this._onScroll, role: role, style: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ boxSizing: 'border-box', direction: 'ltr', height: autoHeight ? 'auto' : height, overflowX: 'hidden', overflowY: estimateTotalHeight < height ? 'hidden' : 'auto', position: 'relative', width: width, WebkitOverflowScrolling: 'touch', willChange: 'transform' }, style), tabIndex: tabIndex }, __WEBPACK_IMPORTED_MODULE_8_react__["createElement"]( 'div', { className: 'ReactVirtualized__Masonry__innerScrollContainer', style: { width: '100%', height: estimateTotalHeight, maxWidth: '100%', maxHeight: estimateTotalHeight, overflow: 'hidden', pointerEvents: isScrolling ? 'none' : '', position: 'relative' } }, children ) ); } }, { key: '_checkInvalidateOnUpdate', value: function _checkInvalidateOnUpdate() { if (typeof this._invalidateOnUpdateStartIndex === 'number') { var _startIndex = this._invalidateOnUpdateStartIndex; var _stopIndex = this._invalidateOnUpdateStopIndex; this._invalidateOnUpdateStartIndex = null; this._invalidateOnUpdateStopIndex = null; // Query external layout logic for position of newly-measured cells this._populatePositionCache(_startIndex, _stopIndex); this.forceUpdate(); } } }, { key: '_debounceResetIsScrolling', value: function _debounceResetIsScrolling() { var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval; if (this._debounceResetIsScrollingId) { Object(__WEBPACK_IMPORTED_MODULE_11__utils_requestAnimationTimeout__["a" /* cancelAnimationTimeout */])(this._debounceResetIsScrollingId); } this._debounceResetIsScrollingId = Object(__WEBPACK_IMPORTED_MODULE_11__utils_requestAnimationTimeout__["b" /* requestAnimationTimeout */])(this._debounceResetIsScrollingCallback, scrollingResetTimeInterval); } }, { key: '_getEstimatedTotalHeight', value: function _getEstimatedTotalHeight() { var _props2 = this.props, cellCount = _props2.cellCount, cellMeasurerCache = _props2.cellMeasurerCache, width = _props2.width; var estimatedColumnCount = Math.max(1, Math.floor(width / cellMeasurerCache.defaultWidth)); return this._positionCache.estimateTotalHeight(cellCount, estimatedColumnCount, cellMeasurerCache.defaultHeight); } }, { key: '_invokeOnScrollCallback', value: function _invokeOnScrollCallback() { var _props3 = this.props, height = _props3.height, onScroll = _props3.onScroll; var scrollTop = this.state.scrollTop; if (this._onScrollMemoized !== scrollTop) { onScroll({ clientHeight: height, scrollHeight: this._getEstimatedTotalHeight(), scrollTop: scrollTop }); this._onScrollMemoized = scrollTop; } } }, { key: '_invokeOnCellsRenderedCallback', value: function _invokeOnCellsRenderedCallback() { if (this._startIndexMemoized !== this._startIndex || this._stopIndexMemoized !== this._stopIndex) { var _onCellsRendered = this.props.onCellsRendered; _onCellsRendered({ startIndex: this._startIndex, stopIndex: this._stopIndex }); this._startIndexMemoized = this._startIndex; this._stopIndexMemoized = this._stopIndex; } } }, { key: '_populatePositionCache', value: function _populatePositionCache(startIndex, stopIndex) { var _props4 = this.props, cellMeasurerCache = _props4.cellMeasurerCache, cellPositioner = _props4.cellPositioner; for (var _index2 = startIndex; _index2 <= stopIndex; _index2++) { var _cellPositioner = cellPositioner(_index2), _left = _cellPositioner.left, _top = _cellPositioner.top; this._positionCache.setPosition(_index2, _left, _top, cellMeasurerCache.getHeight(_index2)); } } }], [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(nextProps, prevState) { if (nextProps.scrollTop !== undefined && prevState.scrollTop !== nextProps.scrollTop) { return { isScrolling: true, scrollTop: nextProps.scrollTop }; } return null; } }]); return Masonry; }(__WEBPACK_IMPORTED_MODULE_8_react__["PureComponent"]); Masonry.defaultProps = { autoHeight: false, keyMapper: identity, onCellsRendered: noop, onScroll: noop, overscanByPixels: 20, role: 'grid', scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL, style: emptyObject, tabIndex: 0, rowDirection: 'ltr' }; Masonry.propTypes = process.env.NODE_ENV === 'production' ? null : { autoHeight: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.bool.isRequired, cellCount: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.number.isRequired, cellMeasurerCache: function cellMeasurerCache() { return (typeof CellMeasurerCache === 'function' ? __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.instanceOf(CellMeasurerCache).isRequired : __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.any.isRequired).apply(this, arguments); }, cellPositioner: function cellPositioner() { return (typeof Positioner === 'function' ? __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.instanceOf(Positioner).isRequired : __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.any.isRequired).apply(this, arguments); }, cellRenderer: function cellRenderer() { return (typeof CellRenderer === 'function' ? __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.instanceOf(CellRenderer).isRequired : __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.any.isRequired).apply(this, arguments); }, className: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.string, height: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.number.isRequired, id: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.string, keyMapper: function keyMapper() { return (typeof KeyMapper === 'function' ? __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.instanceOf(KeyMapper).isRequired : __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.any.isRequired).apply(this, arguments); }, onCellsRendered: function onCellsRendered() { return (typeof OnCellsRenderedCallback === 'function' ? __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.instanceOf(OnCellsRenderedCallback) : __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.any).apply(this, arguments); }, onScroll: function onScroll() { return (typeof OnScrollCallback === 'function' ? __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.instanceOf(OnScrollCallback) : __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.any).apply(this, arguments); }, overscanByPixels: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.number.isRequired, role: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.string.isRequired, scrollingResetTimeInterval: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.number.isRequired, style: function style(props, propName, componentName) { if (!Object.prototype.hasOwnProperty.call(props, propName)) { throw new Error('Prop `' + propName + '` has type \'any\' or \'mixed\', but was not provided to `' + componentName + '`. Pass undefined or any other value.'); } }, tabIndex: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.number.isRequired, width: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.number.isRequired, rowDirection: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.string.isRequired }; function identity(value) { return value; } function noop() {} var bpfrpt_proptype_CellMeasurerCache = process.env.NODE_ENV === 'production' ? null : { defaultHeight: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.number.isRequired, defaultWidth: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.number.isRequired, getHeight: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.func.isRequired, getWidth: __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.func.isRequired }; Object(__WEBPACK_IMPORTED_MODULE_9_react_lifecycles_compat__["polyfill"])(Masonry); /* harmony default export */ __webpack_exports__["a"] = (Masonry); var bpfrpt_proptype_Positioner = process.env.NODE_ENV === 'production' ? null : __WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.func; /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 740 */ /***/ (function(module, exports) { /** * @category Common Helpers * @summary Is the given argument an instance of Date? * * @description * Is the given argument an instance of Date? * * @param {*} argument - the argument to check * @returns {Boolean} the given argument is an instance of Date * * @example * // Is 'mayonnaise' a Date? * var result = isDate('mayonnaise') * //=> false */ function isDate (argument) { return argument instanceof Date } module.exports = isDate /***/ }), /* 741 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) var startOfISOWeek = __webpack_require__(238) var startOfISOYear = __webpack_require__(373) var MILLISECONDS_IN_WEEK = 604800000 /** * @category ISO Week Helpers * @summary Get the ISO week of the given date. * * @description * Get the ISO week of the given date. * * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date * * @param {Date|String|Number} date - the given date * @returns {Number} the ISO week * * @example * // Which week of the ISO-week numbering year is 2 January 2005? * var result = getISOWeek(new Date(2005, 0, 2)) * //=> 53 */ function getISOWeek (dirtyDate) { var date = parse(dirtyDate) var diff = startOfISOWeek(date).getTime() - startOfISOYear(date).getTime() // Round the number of days to the nearest integer // because the number of milliseconds in a week is not constant // (e.g. it's different in the week of the daylight saving time clock shift) return Math.round(diff / MILLISECONDS_IN_WEEK) + 1 } module.exports = getISOWeek /***/ }), /* 742 */ /***/ (function(module, exports, __webpack_require__) { var buildDistanceInWordsLocale = __webpack_require__(2789) var buildFormatLocale = __webpack_require__(2790) /** * @category Locales * @summary English locale. */ module.exports = { distanceInWords: buildDistanceInWordsLocale(), format: buildFormatLocale() } /***/ }), /* 743 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Second Helpers * @summary Set the seconds to the given date. * * @description * Set the seconds to the given date. * * @param {Date|String|Number} date - the date to be changed * @param {Number} seconds - the seconds of the new date * @returns {Date} the new date with the seconds setted * * @example * // Set 45 seconds to 1 September 2014 11:30:40: * var result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45) * //=> Mon Sep 01 2014 11:30:45 */ function setSeconds (dirtyDate, seconds) { var date = parse(dirtyDate) date.setSeconds(seconds) return date } module.exports = setSeconds /***/ }), /* 744 */ /***/ (function(module, exports, __webpack_require__) { var startOfWeek = __webpack_require__(2801) /** * @category ISO Week Helpers * @summary Return the start of an ISO week for the given date. * * @description * Return the start of an ISO week for the given date. * The result will be in the local timezone. * * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date * * @param {Date|String|Number} date - the original date * @returns {Date} the start of an ISO week * * @example * // The start of an ISO week for 2 September 2014 11:55:00: * var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) * //=> Mon Sep 01 2014 00:00:00 */ function startOfISOWeek (dirtyDate) { return startOfWeek(dirtyDate, {weekStartsOn: 1}) } module.exports = startOfISOWeek /***/ }), /* 745 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DatePickerException = DatePickerException; exports.checkSupportedDateFormat = checkSupportedDateFormat; exports.convertDateToTimezone = convertDateToTimezone; exports.extractDate = extractDate; exports.extractDateOnly = extractDateOnly; exports.extractFromDate = extractFromDate; exports.extractPartsFromTextInput = extractPartsFromTextInput; exports.extractPartsFromDate = extractPartsFromDate; exports.checkSupportedTimezone = checkSupportedTimezone; var _timezoneSupport = __webpack_require__(1241); var _format = _interopRequireDefault(__webpack_require__(147)); var _get_date = _interopRequireDefault(__webpack_require__(374)); var _last_day_of_month = _interopRequireDefault(__webpack_require__(746)); var _set_date = _interopRequireDefault(__webpack_require__(747)); var _dateFnsTimezone = __webpack_require__(1239); var _datetimeExtraction = __webpack_require__(1235); var _errorMessages = _interopRequireDefault(__webpack_require__(480)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var INTERNAL_INVALID_DATE = new Date('INTERNAL_INVALID_DATE'); function DatePickerException(code, message) { this.message = (0, _errorMessages["default"])(message); this.code = code; } /** * Build date regexep from date format. * It returns the YYYY, MM, DD parts order too. * @param dateFormat {string} * @returns {{partsOrder: array, regexp: RegExp}} */ function getDateRegexp(dateFormat) { var partsOrder = dateFormat.split(/[^A-Za-z]/); var dateFormatAsRegexp = dateFormat.replace(/[A-Za-z]{4}/g, '([0-9]{4})').replace(/[A-Za-z]{2}/g, '([0-9]{2})'); return { partsOrder: partsOrder, regexp: new RegExp("^\\s*".concat(dateFormatAsRegexp, "\\s*$")) }; } /** * Check if a date is a valid date. */ function isDateValid(date, options) { if (!options.required && date === undefined) { return true; } return date instanceof Date && !isNaN(date.getTime()); } /** * Convert date to string with provided format * @param {Date} date * @param {Object} options */ function dateToStr(date, _ref) { var dateFormat = _ref.dateFormat; return (0, _format["default"])(date, dateFormat); } function convertDateToTimezone(date, _ref2) { var useUTC = _ref2.useUTC, timezone = _ref2.timezone; if (useUTC) { return (0, _datetimeExtraction.convertToUTC)(date); } if (timezone) { return (0, _dateFnsTimezone.convertToLocalTime)(date, { timeZone: timezone }); } return date; } /** * Convert string in dateFormat to date */ function strToDate(strToParse, dateFormat) { var dateErrors = []; var _getDateRegexp = getDateRegexp(dateFormat), partsOrder = _getDateRegexp.partsOrder, regexp = _getDateRegexp.regexp; var dateMatches = strToParse.match(regexp); if (!dateMatches) { dateErrors.push(new DatePickerException('INVALID_DATE_FORMAT', 'INVALID_DATE_FORMAT')); throw dateErrors; } var yearIndex = partsOrder.indexOf('YYYY'); var monthIndex = partsOrder.indexOf('MM'); var dayIndex = partsOrder.indexOf('DD'); var monthString = dateMatches[monthIndex + 1]; var month = parseInt(monthString, 10); if (month === 0 || month > 12) { dateErrors.push(new DatePickerException('INVALID_MONTH', 'INVALID_MONTH_NUMBER')); } var dayString = dateMatches[dayIndex + 1]; var day = parseInt(dayString, 10); if (day === 0) { dateErrors.push(new DatePickerException('INVALID_DAY_NUMBER', 'INVALID_DAY_NUMBER')); } var yearString = dateMatches[yearIndex + 1]; var year = parseInt(yearString, 10); var monthDate = new Date(year, month - 1); var lastDateOfMonth = (0, _last_day_of_month["default"])(monthDate); if (day > (0, _get_date["default"])(lastDateOfMonth)) { dateErrors.push(new DatePickerException('INVALID_DAY_OF_MONTH', 'INVALID_DAY_OF_MONTH')); } if (dateErrors.length > 0) { throw dateErrors; } return (0, _set_date["default"])(monthDate, day); } /** * Check that the date format is a composition of YYYY, MM, DD. * If not, it throws an error. * @param dateFormat {string} */ function checkSupportedDateFormat(dateFormat) { var partsOrder = dateFormat.split(/[^A-Za-z]/); if (partsOrder.indexOf('YYYY') === -1 || partsOrder.indexOf('MM') === -1 || partsOrder.indexOf('DD') === -1) { throw new Error("DATE FORMAT ".concat(dateFormat, " - NOT SUPPORTED. Please provide a composition of YYYY, MM, DD")); } } function checkSupportedTimezone(timezone) { var timzones = (0, _timezoneSupport.listTimeZones)(); if (!timzones.includes(timezone)) { throw new Error("Timezone: ".concat(timezone, " - NOT SUPPORTED")); } } /** * Extract date and apply the current timezone, from datetime * Ex : * 2014-03-25 23:00:00 (UTC) --> 2014-03-25 OO:OO:OO (current TZ) * 2014-03-25 23:00:00 (current TZ) --> 2014-03-25 OO:OO:OO (current TZ) * @param date {Date} The date to extract * @param useUTC {boolean} Indicates if date is in UTC */ function extractDateOnly(date, _ref3) { var useUTC = _ref3.useUTC, timezone = _ref3.timezone; if (useUTC) { return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()); } else if (timezone) { var converted = (0, _dateFnsTimezone.convertToTimeZone)(date, { timeZone: timezone }); return new Date(converted.getFullYear(), converted.getMonth(), converted.getDate()); } return new Date(date.getFullYear(), date.getMonth(), date.getDate()); } /** * Extract parts (date, textInput) from a Date * @param date {Date} * @param options {Object} * @returns * {{ * date: Date, * textInput: string * }} */ function extractPartsFromDate(date, options) { if (!isDateValid(date, options)) { return { localDate: undefined, date: undefined, textInput: '', errors: [], errorMessage: null }; } var localDate = extractDateOnly(date, options); return { localDate: localDate, date: date, textInput: dateToStr(localDate, options), errors: [], errorMessage: null }; } /** * Extract parts (date, textInput) from a string * @param textInput {string} * @param options {Object} * @returns * {{ * date: Date, * textInput: string * }} */ function extractPartsFromTextInput(textInput, options) { if (textInput === '') { return { localDate: undefined, textInput: textInput, errors: [] }; } var localDate; var date; var errors = []; try { localDate = strToDate(textInput, options.dateFormat); date = convertDateToTimezone(localDate, options); } catch (error) { date = INTERNAL_INVALID_DATE; errors = errors.concat(error); } return { localDate: localDate, date: date, textInput: textInput, errors: errors, errorMessage: errors[0] ? errors[0].message : null }; } function extractDate(value, options) { var typeOfValue = _typeof(value); if (typeOfValue === 'number') { return extractPartsFromDate(new Date(value), options); } else if (typeOfValue === 'string') { return extractPartsFromTextInput(value, options); } else if (value instanceof Date) { return extractPartsFromDate(value, options); } return { date: undefined, textInput: '', errors: [] }; } function extractFromDate(date, options) { return { localDate: date, date: convertDateToTimezone(date, options), textInput: (0, _format["default"])(date, options.dateFormat), errors: [], errorMessage: null }; } //# sourceMappingURL=date-extraction.js.map /***/ }), /* 746 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Month Helpers * @summary Return the last day of a month for the given date. * * @description * Return the last day of a month for the given date. * The result will be in the local timezone. * * @param {Date|String|Number} date - the original date * @returns {Date} the last day of a month * * @example * // The last day of a month for 2 September 2014 11:55:00: * var result = lastDayOfMonth(new Date(2014, 8, 2, 11, 55, 0)) * //=> Tue Sep 30 2014 00:00:00 */ function lastDayOfMonth (dirtyDate) { var date = parse(dirtyDate) var month = date.getMonth() date.setFullYear(date.getFullYear(), month + 1, 0) date.setHours(0, 0, 0, 0) return date } module.exports = lastDayOfMonth /***/ }), /* 747 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Day Helpers * @summary Set the day of the month to the given date. * * @description * Set the day of the month to the given date. * * @param {Date|String|Number} date - the date to be changed * @param {Number} dayOfMonth - the day of the month of the new date * @returns {Date} the new date with the day of the month setted * * @example * // Set the 30th day of the month to 1 September 2014: * var result = setDate(new Date(2014, 8, 1), 30) * //=> Tue Sep 30 2014 00:00:00 */ function setDate (dirtyDate, dayOfMonth) { var date = parse(dirtyDate) date.setDate(dayOfMonth) return date } module.exports = setDate /***/ }), /* 748 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = extractTime; exports.checkHours = checkHours; exports.checkMinutes = checkMinutes; exports.checkSeconds = checkSeconds; exports.checkTime = checkTime; exports.getTimeFormat = getTimeFormat; exports.pad = pad; exports.strToTime = strToTime; exports.timeToStr = timeToStr; var _errorMessages = _interopRequireDefault(__webpack_require__(480)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var timePartRegex = new RegExp(/^(.*):(.*)$/); var timeWithSecondsPartRegex = new RegExp(/^(.*):(.*):(.*)$/); function TimePickerException(code, message) { this.message = (0, _errorMessages["default"])(message); this.code = code; } function pad(num, size) { var s = String(num); while (s.length < (size || 2)) { s = "0".concat(s); } return s; } /** * Check if hours are correct */ function checkHours(hours) { var hoursNum = Number(hours); if (hours === '') { return new TimePickerException('INVALID_HOUR', 'INVALID_HOUR_EMPTY'); } else if (hours.length !== 2 || isNaN(hoursNum) || hoursNum < 0 || hoursNum > 23) { return new TimePickerException('INVALID_HOUR', 'INVALID_HOUR_NUMBER'); } return null; } /** * Check if checkMinutes are correct */ function checkMinutes(minutes) { var minsNum = Number(minutes); if (minutes === '') { return new TimePickerException('INVALID_MINUTES', 'INVALID_MINUTES_EMPTY'); } else if (minutes.length !== 2 || isNaN(minsNum) || minsNum < 0 || minsNum > 59) { return new TimePickerException('INVALID_MINUTES', 'INVALID_MINUTES_NUMBER'); } return null; } /** * Check if seconds are correct. * This function throws the errors */ function checkSeconds(seconds) { var secondsNum = Number(seconds); if (seconds === '') { return new TimePickerException('INVALID_SECONDS', 'INVALID_SECONDS_EMPTY'); } else if (seconds.length !== 2 || isNaN(secondsNum) || secondsNum < 0 || secondsNum > 59) { return new TimePickerException('INVALID_SECONDS', 'INVALID_SECONDS_NUMBER'); } return null; } /** * Check if time is correct */ function checkTime(time) { if (!time) { throw new TimePickerException('INVALID_TIME_EMPTY', 'INVALID_TIME_EMPTY'); } var hours = time.hours, minutes = time.minutes, seconds = time.seconds; var hoursError = checkHours(hours); if (hoursError) { throw hoursError; } var minutesError = checkMinutes(minutes); if (minutesError) { throw minutesError; } var secondsError = checkSeconds(seconds); if (secondsError) { throw secondsError; } } /** * Convert string in 'HH:mm' format into the corresponding number of minutes * @param strToParse {string} * @param useSeconds {boolean} * @returns {{ hours: string, minutes: string }} */ function strToTime(strToParse, useSeconds) { var timeRegex = useSeconds ? timeWithSecondsPartRegex : timePartRegex; var timeMatches = strToParse.match(timeRegex); if (!timeMatches) { throw new TimePickerException('TIME_FORMAT_INVALID', 'TIME_FORMAT_INVALID'); } var hours = timeMatches[1]; var minutes = timeMatches[2]; var seconds = useSeconds ? timeMatches[3] : '00'; return { hours: hours, minutes: minutes, seconds: seconds }; } /** * Convert time object to string * @param {object} time {{hours: string|number, minutes: string|number, seconds: string|number}} * @param {boolean} useSeconds */ function timeToStr(time, useSeconds) { if (!time) return ''; var hours = pad(time.hours); var minutes = pad(time.minutes); var seconds = pad(time.seconds); return "".concat(hours, ":").concat(minutes).concat(useSeconds ? ":".concat(seconds) : ''); } /** * get time format base on useSeconds * @param {string} useSeconds */ function getTimeFormat(useSeconds) { return useSeconds ? 'HH:mm:ss' : 'HH:mm'; } function extractTime(selectedTime, useSeconds) { var errors = []; var time; if (!selectedTime) { return { time: null, textInput: '', errors: [], errorMessage: null }; } try { time = typeof selectedTime === 'string' ? strToTime(selectedTime, useSeconds) : selectedTime; checkTime(time); } catch (error) { errors.push(error); } return { time: time, textInput: typeof selectedTime === 'string' ? selectedTime : timeToStr(time, useSeconds), errors: errors, errorMessage: errors[0] ? errors[0].message : null }; } //# sourceMappingURL=time-extraction.js.map /***/ }), /* 749 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DateContext = void 0; var _react = _interopRequireDefault(__webpack_require__(0)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /* eslint-disable import/prefer-default-export */ var DateContext = /*#__PURE__*/_react["default"].createContext(); exports.DateContext = DateContext; //# sourceMappingURL=Context.js.map /***/ }), /* 750 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _InputSizer = _interopRequireDefault(__webpack_require__(2816)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _InputSizer["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 751 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Common Helpers * @summary Is the first date before the second one? * * @description * Is the first date before the second one? * * @param {Date|String|Number} date - the date that should be before the other one to return true * @param {Date|String|Number} dateToCompare - the date to compare with * @returns {Boolean} the first date is before the second date * * @example * // Is 10 July 1989 before 11 February 1987? * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11)) * //=> false */ function isBefore (dirtyDate, dirtyDateToCompare) { var date = parse(dirtyDate) var dateToCompare = parse(dirtyDateToCompare) return date.getTime() < dateToCompare.getTime() } module.exports = isBefore /***/ }), /* 752 */ /***/ (function(module, exports, __webpack_require__) { var startOfDay = __webpack_require__(166) /** * @category Day Helpers * @summary Are the given dates in the same day? * * @description * Are the given dates in the same day? * * @param {Date|String|Number} dateLeft - the first date to check * @param {Date|String|Number} dateRight - the second date to check * @returns {Boolean} the dates are in the same day * * @example * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day? * var result = isSameDay( * new Date(2014, 8, 4, 6, 0), * new Date(2014, 8, 4, 18, 0) * ) * //=> true */ function isSameDay (dirtyDateLeft, dirtyDateRight) { var dateLeftStartOfDay = startOfDay(dirtyDateLeft) var dateRightStartOfDay = startOfDay(dirtyDateRight) return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime() } module.exports = isSameDay /***/ }), /* 753 */ /***/ (function(module, exports, __webpack_require__) { var startOfDay = __webpack_require__(166) /** * @category Day Helpers * @summary Is the given date today? * * @description * Is the given date today? * * @param {Date|String|Number} date - the date to check * @returns {Boolean} the date is today * * @example * // If today is 6 October 2014, is 6 October 14:00:00 today? * var result = isToday(new Date(2014, 9, 6, 14, 0)) * //=> true */ function isToday (dirtyDate) { return startOfDay(dirtyDate).getTime() === startOfDay(new Date()).getTime() } module.exports = isToday /***/ }), /* 754 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Month Helpers * @summary Get the number of days in a month of the given date. * * @description * Get the number of days in a month of the given date. * * @param {Date|String|Number} date - the given date * @returns {Number} the number of days in a month * * @example * // How many days are in February 2000? * var result = getDaysInMonth(new Date(2000, 1)) * //=> 29 */ function getDaysInMonth (dirtyDate) { var date = parse(dirtyDate) var year = date.getFullYear() var monthIndex = date.getMonth() var lastDayOfMonth = new Date(0) lastDayOfMonth.setFullYear(year, monthIndex + 1, 0) lastDayOfMonth.setHours(0, 0, 0, 0) return lastDayOfMonth.getDate() } module.exports = getDaysInMonth /***/ }), /* 755 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Month Helpers * @summary Return the start of a month for the given date. * * @description * Return the start of a month for the given date. * The result will be in the local timezone. * * @param {Date|String|Number} date - the original date * @returns {Date} the start of a month * * @example * // The start of a month for 2 September 2014 11:55:00: * var result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0)) * //=> Mon Sep 01 2014 00:00:00 */ function startOfMonth (dirtyDate) { var date = parse(dirtyDate) date.setDate(1) date.setHours(0, 0, 0, 0) return date } module.exports = startOfMonth /***/ }), /* 756 */ /***/ (function(module, exports, __webpack_require__) { var toFinite = __webpack_require__(1249); /** * Converts `value` to an integer. * * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted integer. * @example * * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); * // => 0 * * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { var result = toFinite(value), remainder = result % 1; return result === result ? (remainder ? result - remainder : result) : 0; } module.exports = toInteger; /***/ }), /* 757 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) var addDays = __webpack_require__(241) /** * @category Weekday Helpers * @summary Set the day of the week to the given date. * * @description * Set the day of the week to the given date. * * @param {Date|String|Number} date - the date to be changed * @param {Number} day - the day of the week of the new date * @param {Object} [options] - the object with options * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) * @returns {Date} the new date with the day of the week setted * * @example * // Set Sunday to 1 September 2014: * var result = setDay(new Date(2014, 8, 1), 0) * //=> Sun Aug 31 2014 00:00:00 * * @example * // If week starts with Monday, set Sunday to 1 September 2014: * var result = setDay(new Date(2014, 8, 1), 0, {weekStartsOn: 1}) * //=> Sun Sep 07 2014 00:00:00 */ function setDay (dirtyDate, day, options) { var weekStartsOn = options ? (options.weekStartsOn || 0) : 0 var date = parse(dirtyDate) var currentDay = date.getDay() var remainder = day % 7 var dayIndex = (remainder + 7) % 7 var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay return addDays(date, diff) } module.exports = setDay /***/ }), /* 758 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Year Helpers * @summary Set the year to the given date. * * @description * Set the year to the given date. * * @param {Date|String|Number} date - the date to be changed * @param {Number} year - the year of the new date * @returns {Date} the new date with the year setted * * @example * // Set year 2013 to 1 September 2014: * var result = setYear(new Date(2014, 8, 1), 2013) * //=> Sun Sep 01 2013 00:00:00 */ function setYear (dirtyDate, year) { var date = parse(dirtyDate) date.setFullYear(year) return date } module.exports = setYear /***/ }), /* 759 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = useInputPickerHandlers; var _react = __webpack_require__(0); var _keycode = _interopRequireDefault(__webpack_require__(34)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function useInputPickerHandlers(_ref) { var handleBlur = _ref.handleBlur, handleChange = _ref.handleChange, handleKeyDown = _ref.handleKeyDown; var _useState = (0, _react.useState)(false), _useState2 = _slicedToArray(_useState, 2), showPicker = _useState2[0], setPickerVisibility = _useState2[1]; var _useState3 = (0, _react.useState)(false), _useState4 = _slicedToArray(_useState3, 2), picked = _useState4[0], setPicked = _useState4[1]; function openPicker() { setPickerVisibility(true); } function closePicker() { setPickerVisibility(false); } function onBlur(event) { setPicked(false); closePicker(); if (handleBlur) { handleBlur(event); } } function onChange(event, payload, inputRef) { if (handleChange) { handleChange(event, payload); } if (['PICKER', 'END_PICKER'].includes(payload.origin)) { inputRef.focus(); setPicked(true); closePicker(); } } function onClick() { openPicker(); } function onFocus() { if (!picked) { openPicker(); } } function onKeyDown(event, inputRef) { switch (event.keyCode) { case _keycode["default"].codes.esc: inputRef.focus(); closePicker(); break; case _keycode["default"].codes.down: if (event.target !== inputRef) { return; } if (showPicker) { if (handleKeyDown) { handleKeyDown(); } } else { openPicker(); } break; default: break; } } function getPopperPlacement(input) { if (input) { var inputDimensions = input.getBoundingClientRect(); if (inputDimensions.left > window.innerWidth / 2) { return 'bottom-end'; } } return 'bottom-start'; } return { showPicker: showPicker, picked: picked, onBlur: onBlur, onChange: onChange, onClick: onClick, onFocus: onFocus, onKeyDown: onKeyDown, getPopperPlacement: getPopperPlacement }; } //# sourceMappingURL=useInputPickerHandlers.js.map /***/ }), /* 760 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TimeContext = void 0; var _react = _interopRequireDefault(__webpack_require__(0)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /* eslint-disable import/prefer-default-export */ var TimeContext = /*#__PURE__*/_react["default"].createContext(); exports.TimeContext = TimeContext; //# sourceMappingURL=Context.js.map /***/ }), /* 761 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = withListGesture; var _react = _interopRequireDefault(__webpack_require__(0)); var _keycode = _interopRequireDefault(__webpack_require__(34)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _extends() { _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; }; return _extends.apply(this, arguments); } function focusOn(event, element) { if (element) { element.focus(); } } function getAllItems(ref) { return ref.closest('[role="list"]').querySelectorAll('[role="listitem"]'); } function getNextItem(ref, loop) { var nextElement; var currentFound; var hasNext; var nodes = getAllItems(ref); var iterator = nodes.values(); if (loop && ref === nodes.item(nodes.length - 1)) { return nodes.item(0); } do { var _iterator$next = iterator.next(), value = _iterator$next.value, done = _iterator$next.done; if (currentFound) { nextElement = value; hasNext = false; } else { currentFound = value === ref; hasNext = !done; } } while (hasNext); return nextElement; } function getPreviousItem(ref, loop) { var previousElement; var hasNext; var nodes = getAllItems(ref); var iterator = nodes.values(); if (loop && ref === nodes.item(0)) { return nodes.item(nodes.length - 1); } do { var _iterator$next2 = iterator.next(), value = _iterator$next2.value, done = _iterator$next2.done; var currentFound = value === ref; if (currentFound) { hasNext = false; } else { previousElement = value; hasNext = !done; } } while (hasNext); return previousElement; } function _onKeyDown(event, ref, loop) { switch (event.keyCode) { case _keycode["default"].codes.down: event.stopPropagation(); event.preventDefault(); focusOn(event, getNextItem(ref, loop)); break; case _keycode["default"].codes.up: event.stopPropagation(); event.preventDefault(); focusOn(event, getPreviousItem(ref, loop)); break; default: break; } } function withListGesture(WrappedComponent) { var loop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; function ListGesture(props) { return /*#__PURE__*/_react["default"].createElement(WrappedComponent, _extends({}, props, { onKeyDown: function onKeyDown() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _onKeyDown.apply(void 0, args.concat([loop])); } })); } ListGesture.displayName = "ListGesture(".concat(WrappedComponent.displayName, ")"); return ListGesture; } //# sourceMappingURL=withListGesture.js.map /***/ }), /* 762 */ /***/ (function(module, exports, __webpack_require__) { var startOfSecond = __webpack_require__(763) /** * @category Second Helpers * @summary Are the given dates in the same second? * * @description * Are the given dates in the same second? * * @param {Date|String|Number} dateLeft - the first date to check * @param {Date|String|Number} dateRight - the second date to check * @returns {Boolean} the dates are in the same second * * @example * // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500 * // in the same second? * var result = isSameSecond( * new Date(2014, 8, 4, 6, 30, 15), * new Date(2014, 8, 4, 6, 30, 15, 500) * ) * //=> true */ function isSameSecond (dirtyDateLeft, dirtyDateRight) { var dateLeftStartOfSecond = startOfSecond(dirtyDateLeft) var dateRightStartOfSecond = startOfSecond(dirtyDateRight) return dateLeftStartOfSecond.getTime() === dateRightStartOfSecond.getTime() } module.exports = isSameSecond /***/ }), /* 763 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Second Helpers * @summary Return the start of a second for the given date. * * @description * Return the start of a second for the given date. * The result will be in the local timezone. * * @param {Date|String|Number} date - the original date * @returns {Date} the start of a second * * @example * // The start of a second for 1 December 2014 22:15:45.400: * var result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400)) * //=> Mon Dec 01 2014 22:15:45.000 */ function startOfSecond (dirtyDate) { var date = parse(dirtyDate) date.setMilliseconds(0) return date } module.exports = startOfSecond /***/ }), /* 764 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FIELD_SECONDS = exports.FIELD_MINUTES = exports.FIELD_HOURS = exports.SECONDS_ERRORS = exports.MINUTES_ERRORS = exports.HOUR_ERRORS = exports.INPUT_ERRORS = void 0; var INPUT_ERRORS = ['INVALID_DATE_FORMAT', 'INVALID_MONTH', 'INVALID_DAY_NUMBER', 'INVALID_DAY_OF_MONTH', 'DATETIME_INVALID_FORMAT', 'TIME_FORMAT_INVALID']; exports.INPUT_ERRORS = INPUT_ERRORS; var HOUR_ERRORS = ['INVALID_HOUR']; exports.HOUR_ERRORS = HOUR_ERRORS; var MINUTES_ERRORS = ['INVALID_MINUTES']; exports.MINUTES_ERRORS = MINUTES_ERRORS; var SECONDS_ERRORS = ['INVALID_SECONDS']; exports.SECONDS_ERRORS = SECONDS_ERRORS; var FIELD_HOURS = 'HOURS'; exports.FIELD_HOURS = FIELD_HOURS; var FIELD_MINUTES = 'MINUTES'; exports.FIELD_MINUTES = FIELD_MINUTES; var FIELD_SECONDS = 'SECONDS'; exports.FIELD_SECONDS = FIELD_SECONDS; //# sourceMappingURL=constants.js.map /***/ }), /* 765 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(1261); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /* 766 */ /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__(2920), mapCacheDelete = __webpack_require__(2936), mapCacheGet = __webpack_require__(2938), mapCacheHas = __webpack_require__(2939), mapCacheSet = __webpack_require__(2940); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /* 767 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(242), root = __webpack_require__(128); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /* 768 */ /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(2943); /** * A specialized version of `_.includes` for arrays without support for * specifying an index to search from. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; /***/ }), /* 769 */ /***/ (function(module, exports) { /** * This function is like `arrayIncludes` except that it accepts a comparator. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { return true; } } return false; } module.exports = arrayIncludesWith; /***/ }), /* 770 */ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(244), isObjectLike = __webpack_require__(129); /** * This method is like `_.isArrayLike` except that it also checks if `value` * is an object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array-like object, * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); * // => true * * _.isArrayLikeObject(document.body.children); * // => true * * _.isArrayLikeObject('abc'); * // => false * * _.isArrayLikeObject(_.noop); * // => false */ function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } module.exports = isArrayLikeObject; /***/ }), /* 771 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /* 772 */ /***/ (function(module, exports) { /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } module.exports = arrayFilter; /***/ }), /* 773 */ /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /* 774 */ /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(2954), isObjectLike = __webpack_require__(129); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /* 775 */ /***/ (function(module, exports) { /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } module.exports = setToArray; /***/ }), /* 776 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = shallowEqual; function shallowEqual(objA, objB) { if (objA === objB) { return true; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } // Test for A's keys different from B. var hasOwn = Object.prototype.hasOwnProperty; for (var i = 0; i < keysA.length; i += 1) { if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { return false; } var valA = objA[keysA[i]]; var valB = objB[keysA[i]]; if (valA !== valB) { return false; } } return true; } /***/ }), /* 777 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports['default'] = isDisposable; function isDisposable(obj) { return Boolean(obj && typeof obj.dispose === 'function'); } module.exports = exports['default']; /***/ }), /* 778 */ /***/ (function(module, exports, __webpack_require__) { var createFlow = __webpack_require__(2984); /** * Creates a function that returns the result of invoking the given functions * with the `this` binding of the created function, where each successive * invocation is supplied the return value of the previous. * * @static * @memberOf _ * @since 3.0.0 * @category Util * @param {...(Function|Function[])} [funcs] The functions to invoke. * @returns {Function} Returns the new composite function. * @see _.flowRight * @example * * function square(n) { * return n * n; * } * * var addSquare = _.flow([_.add, square]); * addSquare(1, 2); * // => 9 */ var flow = createFlow(); module.exports = flow; /***/ }), /* 779 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(685), baseLodash = __webpack_require__(780); /** * The base constructor for creating `lodash` wrapper objects. * * @private * @param {*} value The value to wrap. * @param {boolean} [chainAll] Enable explicit method chain sequences. */ function LodashWrapper(value, chainAll) { this.__wrapped__ = value; this.__actions__ = []; this.__chain__ = !!chainAll; this.__index__ = 0; this.__values__ = undefined; } LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; module.exports = LodashWrapper; /***/ }), /* 780 */ /***/ (function(module, exports) { /** * The function whose prototype chain sequence wrappers inherit from. * * @private */ function baseLodash() { // No operation performed. } module.exports = baseLodash; /***/ }), /* 781 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(685), baseLodash = __webpack_require__(780); /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295; /** * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. * * @private * @constructor * @param {*} value The value to wrap. */ function LazyWrapper(value) { this.__wrapped__ = value; this.__actions__ = []; this.__dir__ = 1; this.__filtered__ = false; this.__iteratees__ = []; this.__takeCount__ = MAX_ARRAY_LENGTH; this.__views__ = []; } // Ensure `LazyWrapper` is an instance of `baseLodash`. LazyWrapper.prototype = baseCreate(baseLodash.prototype); LazyWrapper.prototype.constructor = LazyWrapper; module.exports = LazyWrapper; /***/ }), /* 782 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = combine; function combine() { var composables = []; for (var _i = 0; _i < arguments.length; _i++) { composables[_i] = arguments[_i]; } var callbacks = []; composables.forEach(function (composable) { if (Array.isArray(composable)) { callbacks.push.apply(callbacks, composable); } else { callbacks.push(composable); } }); return callbacks; } /* harmony default export */ __webpack_exports__["b"] = (combine); //# sourceMappingURL=combine.js.map /***/ }), /* 783 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export getKeysAndSymbols */ var keys = Object.keys, getOwnPropertySymbols = Object.getOwnPropertySymbols; var getKeysAndSymbols = function (obj) { var result = keys(obj); if (getOwnPropertySymbols !== undefined) { result = result.concat(getOwnPropertySymbols(obj)); } return result; }; /* harmony default export */ __webpack_exports__["a"] = (getKeysAndSymbols); //# sourceMappingURL=getKeysAndSymbols.js.map /***/ }), /* 784 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export setStatic */ function setStatic(key, value) { return { staticCallback: function (componentClass) { componentClass[key] = value; }, }; } /* harmony default export */ __webpack_exports__["a"] = (setStatic); //# sourceMappingURL=setStatic.js.map /***/ }), /* 785 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export omit */ var __assign = (this && this.__assign) || Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; function omit(obj) { var keys = []; for (var _i = 1; _i < arguments.length; _i++) { keys[_i - 1] = arguments[_i]; } var result = __assign({}, obj); for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (obj.hasOwnProperty(key)) { delete result[key]; } } return result; } ; /* harmony default export */ __webpack_exports__["a"] = (omit); //# sourceMappingURL=omit.js.map /***/ }), /* 786 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_fbjs_lib_shallowEqual__ = __webpack_require__(3015); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_fbjs_lib_shallowEqual___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_fbjs_lib_shallowEqual__); /* unused harmony reexport shallowEqual */ /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_fbjs_lib_shallowEqual__); //# sourceMappingURL=shallowEqual.js.map /***/ }), /* 787 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export shouldUpdate */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__lifecycle__ = __webpack_require__(246); function shouldUpdate(callback) { return Object(__WEBPACK_IMPORTED_MODULE_0__lifecycle__["a" /* createComparingLifecycle */])("shouldComponentUpdateCallback", callback); } /* harmony default export */ __webpack_exports__["a"] = (shouldUpdate); //# sourceMappingURL=shouldUpdate.js.map /***/ }), /* 788 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _EditableText = _interopRequireDefault(__webpack_require__(3058)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _EditableText["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 789 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Enumeration = _interopRequireDefault(__webpack_require__(3061)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Enumeration["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 790 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(2)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = { currentEdit: _propTypes["default"].shape({ validate: _propTypes["default"].shape({ disabled: _propTypes["default"].bool }), abort: _propTypes["default"].shape({ disabled: _propTypes["default"].bool }) }) }; exports["default"] = _default; //# sourceMappingURL=ItemEdit.propTypes.js.map /***/ }), /* 791 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tc-enumeration-header":"Header__tc-enumeration-header___2mOoW","tc-enumeration-header-error":"Header__tc-enumeration-header-error___1O8rH"}; /***/ }), /* 792 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 793 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports.matchesSelector = matchesSelector; exports.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo; exports.addEvent = addEvent; exports.removeEvent = removeEvent; exports.outerHeight = outerHeight; exports.outerWidth = outerWidth; exports.innerHeight = innerHeight; exports.innerWidth = innerWidth; exports.offsetXYFromParent = offsetXYFromParent; exports.createCSSTransform = createCSSTransform; exports.createSVGTransform = createSVGTransform; exports.getTranslation = getTranslation; exports.getTouch = getTouch; exports.getTouchIdentifier = getTouchIdentifier; exports.addUserSelectStyles = addUserSelectStyles; exports.removeUserSelectStyles = removeUserSelectStyles; exports.addClassName = addClassName; exports.removeClassName = removeClassName; var _shims = __webpack_require__(496); var _getPrefix = _interopRequireWildcard(__webpack_require__(3084)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var matchesSelectorFunc = ''; function matchesSelector(el /*: Node*/ , selector /*: string*/ ) /*: boolean*/ { if (!matchesSelectorFunc) { matchesSelectorFunc = (0, _shims.findInArray)(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) { // $FlowIgnore: Doesn't think elements are indexable return (0, _shims.isFunction)(el[method]); }); } // Might not be found entirely (not an Element?) - in that case, bail // $FlowIgnore: Doesn't think elements are indexable if (!(0, _shims.isFunction)(el[matchesSelectorFunc])) return false; // $FlowIgnore: Doesn't think elements are indexable return el[matchesSelectorFunc](selector); } // Works up the tree to the draggable itself attempting to match selector. function matchesSelectorAndParentsTo(el /*: Node*/ , selector /*: string*/ , baseNode /*: Node*/ ) /*: boolean*/ { var node = el; do { if (matchesSelector(node, selector)) return true; if (node === baseNode) return false; node = node.parentNode; } while (node); return false; } function addEvent(el /*: ?Node*/ , event /*: string*/ , handler /*: Function*/ , inputOptions /*: Object*/ ) /*: void*/ { if (!el) return; var options = _objectSpread({ capture: true }, inputOptions); if (el.addEventListener) { el.addEventListener(event, handler, options); } else if (el.attachEvent) { el.attachEvent('on' + event, handler); } else { // $FlowIgnore: Doesn't think elements are indexable el['on' + event] = handler; } } function removeEvent(el /*: ?Node*/ , event /*: string*/ , handler /*: Function*/ , inputOptions /*: Object*/ ) /*: void*/ { if (!el) return; var options = _objectSpread({ capture: true }, inputOptions); if (el.removeEventListener) { el.removeEventListener(event, handler, options); } else if (el.detachEvent) { el.detachEvent('on' + event, handler); } else { // $FlowIgnore: Doesn't think elements are indexable el['on' + event] = null; } } function outerHeight(node /*: HTMLElement*/ ) /*: number*/ { // This is deliberately excluding margin for our calculations, since we are using // offsetTop which is including margin. See getBoundPosition var height = node.clientHeight; var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); height += (0, _shims.int)(computedStyle.borderTopWidth); height += (0, _shims.int)(computedStyle.borderBottomWidth); return height; } function outerWidth(node /*: HTMLElement*/ ) /*: number*/ { // This is deliberately excluding margin for our calculations, since we are using // offsetLeft which is including margin. See getBoundPosition var width = node.clientWidth; var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); width += (0, _shims.int)(computedStyle.borderLeftWidth); width += (0, _shims.int)(computedStyle.borderRightWidth); return width; } function innerHeight(node /*: HTMLElement*/ ) /*: number*/ { var height = node.clientHeight; var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); height -= (0, _shims.int)(computedStyle.paddingTop); height -= (0, _shims.int)(computedStyle.paddingBottom); return height; } function innerWidth(node /*: HTMLElement*/ ) /*: number*/ { var width = node.clientWidth; var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); width -= (0, _shims.int)(computedStyle.paddingLeft); width -= (0, _shims.int)(computedStyle.paddingRight); return width; } // Get from offsetParent function offsetXYFromParent(evt /*: {clientX: number, clientY: number}*/ , offsetParent /*: HTMLElement*/ , scale /*: number*/ ) /*: ControlPosition*/ { var isBody = offsetParent === offsetParent.ownerDocument.body; var offsetParentRect = isBody ? { left: 0, top: 0 } : offsetParent.getBoundingClientRect(); var x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale; var y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale; return { x: x, y: y }; } function createCSSTransform(controlPos /*: ControlPosition*/ , positionOffset /*: PositionOffsetControlPosition*/ ) /*: Object*/ { var translation = getTranslation(controlPos, positionOffset, 'px'); return _defineProperty({}, (0, _getPrefix.browserPrefixToKey)('transform', _getPrefix.default), translation); } function createSVGTransform(controlPos /*: ControlPosition*/ , positionOffset /*: PositionOffsetControlPosition*/ ) /*: string*/ { var translation = getTranslation(controlPos, positionOffset, ''); return translation; } function getTranslation(_ref2, positionOffset /*: PositionOffsetControlPosition*/ , unitSuffix /*: string*/ ) /*: string*/ { var x = _ref2.x, y = _ref2.y; var translation = "translate(".concat(x).concat(unitSuffix, ",").concat(y).concat(unitSuffix, ")"); if (positionOffset) { var defaultX = "".concat(typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix); var defaultY = "".concat(typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix); translation = "translate(".concat(defaultX, ", ").concat(defaultY, ")") + translation; } return translation; } function getTouch(e /*: MouseTouchEvent*/ , identifier /*: number*/ ) /*: ?{clientX: number, clientY: number}*/ { return e.targetTouches && (0, _shims.findInArray)(e.targetTouches, function (t) { return identifier === t.identifier; }) || e.changedTouches && (0, _shims.findInArray)(e.changedTouches, function (t) { return identifier === t.identifier; }); } function getTouchIdentifier(e /*: MouseTouchEvent*/ ) /*: ?number*/ { if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier; if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier; } // User-select Hacks: // // Useful for preventing blue highlights all over everything when dragging. // Note we're passing `document` b/c we could be iframed function addUserSelectStyles(doc /*: ?Document*/ ) { if (!doc) return; var styleEl = doc.getElementById('react-draggable-style-el'); if (!styleEl) { styleEl = doc.createElement('style'); styleEl.type = 'text/css'; styleEl.id = 'react-draggable-style-el'; styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n'; styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\n'; doc.getElementsByTagName('head')[0].appendChild(styleEl); } if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection'); } function removeUserSelectStyles(doc /*: ?Document*/ ) { if (!doc) return; try { if (doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection'); // $FlowIgnore: IE if (doc.selection) { // $FlowIgnore: IE doc.selection.empty(); } else { // Remove selection caused by scroll, unless it's a focused input // (we use doc.defaultView in case we're in an iframe) var selection = (doc.defaultView || window).getSelection(); if (selection && selection.type !== 'Caret') { selection.removeAllRanges(); } } } catch (e) {// probably IE } } function addClassName(el /*: HTMLElement*/ , className /*: string*/ ) { if (el.classList) { el.classList.add(className); } else { if (!el.className.match(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)")))) { el.className += " ".concat(className); } } } function removeClassName(el /*: HTMLElement*/ , className /*: string*/ ) { if (el.classList) { el.classList.remove(className); } else { el.className = el.className.replace(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)"), 'g'), ''); } } /***/ }), /* 794 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Tile = _interopRequireDefault(__webpack_require__(1306)); var _TileBody = _interopRequireDefault(__webpack_require__(1309)); var _TileHeader = _interopRequireDefault(__webpack_require__(3090)); var _TileFooter = _interopRequireDefault(__webpack_require__(3092)); var _SkeletonTile = _interopRequireDefault(__webpack_require__(1310)); var _context = __webpack_require__(1308); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = { Body: _TileBody["default"], Header: _TileHeader["default"], Footer: _TileFooter["default"], Container: _Tile["default"], Skeleton: _SkeletonTile["default"], useTileContext: _context.useTileContext, context: _context.TileContext }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 795 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _WithDrawer = _interopRequireDefault(__webpack_require__(3118)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _WithDrawer["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 796 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ColumnChooserRow = _interopRequireDefault(__webpack_require__(3152)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _ColumnChooserRow["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 797 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Loader = _interopRequireDefault(__webpack_require__(3179)); var _CircularProgress = _interopRequireDefault(__webpack_require__(189)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } _Loader["default"].SIZE = _CircularProgress["default"].SIZE; var _default = _Loader["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 798 */ /***/ (function(module, exports, __webpack_require__) { var baseKeys = __webpack_require__(1118), getTag = __webpack_require__(282), isArguments = __webpack_require__(459), isArray = __webpack_require__(103), isArrayLike = __webpack_require__(353), isBuffer = __webpack_require__(460), isPrototype = __webpack_require__(461), isTypedArray = __webpack_require__(676); /** `Object#toString` result references. */ var mapTag = '[object Map]', setTag = '[object Set]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if `value` is an empty object, collection, map, or set. * * Objects are considered empty if they have no own enumerable string keyed * properties. * * Array-like values such as `arguments` objects, arrays, buffers, strings, or * jQuery-like collections are considered empty if they have a `length` of `0`. * Similarly, maps and sets are considered empty if they have a `size` of `0`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is empty, else `false`. * @example * * _.isEmpty(null); * // => true * * _.isEmpty(true); * // => true * * _.isEmpty(1); * // => true * * _.isEmpty([1, 2, 3]); * // => false * * _.isEmpty({ 'a': 1 }); * // => false */ function isEmpty(value) { if (value == null) { return true; } if (isArrayLike(value) && (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || isBuffer(value) || isTypedArray(value) || isArguments(value))) { return !value.length; } var tag = getTag(value); if (tag == mapTag || tag == setTag) { return !value.size; } if (isPrototype(value)) { return !baseKeys(value).length; } for (var key in value) { if (hasOwnProperty.call(value, key)) { return false; } } return true; } module.exports = isEmpty; /***/ }), /* 799 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "TitleColumn", { enumerable: true, get: function get() { return _TitleColumn["default"]; } }); Object.defineProperty(exports, "cellType", { enumerable: true, get: function get() { return _TitleColumn.cellType; } }); exports["default"] = void 0; __webpack_require__(1170); var _TitleColumn = _interopRequireWildcard(__webpack_require__(3184)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } var _default = _TitleColumn.titleColumnConfiguration; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 800 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "CheckboxColumn", { enumerable: true, get: function get() { return _CheckboxColumn["default"]; } }); Object.defineProperty(exports, "cellType", { enumerable: true, get: function get() { return _CheckboxColumn.cellType; } }); exports["default"] = void 0; var _CheckboxColumn = _interopRequireWildcard(__webpack_require__(3196)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } var _default = _CheckboxColumn.checkboxColumnConfiguration; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 801 */ /***/ (function(module, exports, __webpack_require__) { var addDays = __webpack_require__(241) /** * @category Week Helpers * @summary Add the specified number of weeks to the given date. * * @description * Add the specified number of week to the given date. * * @param {Date|String|Number} date - the date to be changed * @param {Number} amount - the amount of weeks to be added * @returns {Date} the new date with the weeks added * * @example * // Add 4 weeks to 1 September 2014: * var result = addWeeks(new Date(2014, 8, 1), 4) * //=> Mon Sep 29 2014 00:00:00 */ function addWeeks (dirtyDate, amount) { var days = amount * 7 return addDays(dirtyDate, days) } module.exports = addWeeks /***/ }), /* 802 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Common Helpers * @summary Compare the two dates reverse chronologically and return -1, 0 or 1. * * @description * Compare the two dates and return -1 if the first date is after the second, * 1 if the first date is before the second or 0 if dates are equal. * * @param {Date|String|Number} dateLeft - the first date to compare * @param {Date|String|Number} dateRight - the second date to compare * @returns {Number} the result of the comparison * * @example * // Compare 11 February 1987 and 10 July 1989 reverse chronologically: * var result = compareDesc( * new Date(1987, 1, 11), * new Date(1989, 6, 10) * ) * //=> 1 * * @example * // Sort the array of dates in reverse chronological order: * var result = [ * new Date(1995, 6, 2), * new Date(1987, 1, 11), * new Date(1989, 6, 10) * ].sort(compareDesc) * //=> [ * // Sun Jul 02 1995 00:00:00, * // Mon Jul 10 1989 00:00:00, * // Wed Feb 11 1987 00:00:00 * // ] */ function compareDesc (dirtyDateLeft, dirtyDateRight) { var dateLeft = parse(dirtyDateLeft) var timeLeft = dateLeft.getTime() var dateRight = parse(dirtyDateRight) var timeRight = dateRight.getTime() if (timeLeft > timeRight) { return -1 } else if (timeLeft < timeRight) { return 1 } else { return 0 } } module.exports = compareDesc /***/ }), /* 803 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) var differenceInCalendarMonths = __webpack_require__(1337) var compareAsc = __webpack_require__(379) /** * @category Month Helpers * @summary Get the number of full months between the given dates. * * @description * Get the number of full months between the given dates. * * @param {Date|String|Number} dateLeft - the later date * @param {Date|String|Number} dateRight - the earlier date * @returns {Number} the number of full months * * @example * // How many full months are between 31 January 2014 and 1 September 2014? * var result = differenceInMonths( * new Date(2014, 8, 1), * new Date(2014, 0, 31) * ) * //=> 7 */ function differenceInMonths (dirtyDateLeft, dirtyDateRight) { var dateLeft = parse(dirtyDateLeft) var dateRight = parse(dirtyDateRight) var sign = compareAsc(dateLeft, dateRight) var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight)) dateLeft.setMonth(dateLeft.getMonth() - sign * difference) // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full // If so, result must be decreased by 1 in absolute value var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign return sign * (difference - isLastMonthNotFull) } module.exports = differenceInMonths /***/ }), /* 804 */ /***/ (function(module, exports, __webpack_require__) { var differenceInMilliseconds = __webpack_require__(498) /** * @category Second Helpers * @summary Get the number of seconds between the given dates. * * @description * Get the number of seconds between the given dates. * * @param {Date|String|Number} dateLeft - the later date * @param {Date|String|Number} dateRight - the earlier date * @returns {Number} the number of seconds * * @example * // How many seconds are between * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000? * var result = differenceInSeconds( * new Date(2014, 6, 2, 12, 30, 20, 0), * new Date(2014, 6, 2, 12, 30, 7, 999) * ) * //=> 12 */ function differenceInSeconds (dirtyDateLeft, dirtyDateRight) { var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / 1000 return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } module.exports = differenceInSeconds /***/ }), /* 805 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(9) /** * @category Day Helpers * @summary Return the end of a day for the given date. * * @description * Return the end of a day for the given date. * The result will be in the local timezone. * * @param {Date|String|Number} date - the original date * @returns {Date} the end of a day * * @example * // The end of a day for 2 September 2014 11:55:00: * var result = endOfDay(new Date(2014, 8, 2, 11, 55, 0)) * //=> Tue Sep 02 2014 23:59:59.999 */ function endOfDay (dirtyDate) { var date = parse(dirtyDate) date.setHours(23, 59, 59, 999) return date } module.exports = endOfDay /***/ }), /* 806 */ /***/ (function(module, exports, __webpack_require__) { var startOfWeek = __webpack_require__(290) /** * @category Week Helpers * @summary Are the given dates in the same week? * * @description * Are the given dates in the same week? * * @param {Date|String|Number} dateLeft - the first date to check * @param {Date|String|Number} dateRight - the second date to check * @param {Object} [options] - the object with options * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) * @returns {Boolean} the dates are in the same week * * @example * // Are 31 August 2014 and 4 September 2014 in the same week? * var result = isSameWeek( * new Date(2014, 7, 31), * new Date(2014, 8, 4) * ) * //=> true * * @example * // If week starts with Monday, * // are 31 August 2014 and 4 September 2014 in the same week? * var result = isSameWeek( * new Date(2014, 7, 31), * new Date(2014, 8, 4), * {weekStartsOn: 1} * ) * //=> false */ function isSameWeek (dirtyDateLeft, dirtyDateRight, options) { var dateLeftStartOfWeek = startOfWeek(dirtyDateLeft, options) var dateRightStartOfWeek = startOfWeek(dirtyDateRight, options) return dateLeftStartOfWeek.getTime() === dateRightStartOfWeek.getTime() } module.exports = isSameWeek /***/ }), /* 807 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _RowSelection = _interopRequireDefault(__webpack_require__(3303)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _RowSelection["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 808 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tc-list-table":"ListTable__tc-list-table___maYBY","row":"ListTable__row___1niBO","cell":"ListTable__cell___23A6Q","header":"ListTable__header___1F83K","grid":"ListTable__grid___jATdy"}; /***/ }), /* 809 */ /***/ (function(module, exports) { /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { return index; } } return -1; } module.exports = baseFindIndex; /***/ }), /* 810 */ /***/ (function(module, exports) { /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } module.exports = setToArray; /***/ }), /* 811 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _JSONLike["default"]; } }); var _JSONLike = _interopRequireDefault(__webpack_require__(3399)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } //# sourceMappingURL=index.js.map /***/ }), /* 812 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAngle = getAngle; exports.getEmptyPartCircle = getEmptyPartCircle; exports.distributePercentages = distributePercentages; exports.setMinimumPercentage = setMinimumPercentage; exports.getPercentageToIndex = getPercentageToIndex; exports.getLabel = getLabel; exports.getCircle = getCircle; exports.getDisplaySize = getDisplaySize; exports.PieChartIconComponent = PieChartIconComponent; exports["default"] = exports.pieChartIconPropTypes = exports.PIECHART_SIZES = exports.PIECHART_CONSTANTS = void 0; var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(2)); var _d3Shape = __webpack_require__(500); var _reactI18next = __webpack_require__(10); var _omit = _interopRequireDefault(__webpack_require__(67)); var _constants = _interopRequireDefault(__webpack_require__(14)); var _translate = _interopRequireDefault(__webpack_require__(15)); var _Skeleton = _interopRequireDefault(__webpack_require__(77)); var _PieChart = _interopRequireDefault(__webpack_require__(1396)); var _theme = __webpack_require__(25); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var theme = (0, _theme.getTheme)(_PieChart["default"]); var PIECHART_CONSTANTS = { MIN_SIZE: 20, MAX_SIZE: 100, MAX_PERCENT: 100, BASE_INNER_RADIUS: 6, BASE_OUTER_RADIUS: 9, BASE_PAD_ANGLE: 0.2, INNER_RADIUS_PER_PIXEL: 0.4, OUTER_RADIUS_PER_PIXEL: 0.45, PAD_ANGLE_PER_PIXEL: 0.0013 }; exports.PIECHART_CONSTANTS = PIECHART_CONSTANTS; var PIECHART_SIZES = { SMALL: 'small', MEDIUM: 'medium', LARGE: 'large', XLARGE: 'xlarge', XXLARGE: 'xxlarge' }; exports.PIECHART_SIZES = PIECHART_SIZES; var displaySizes = { small: 20, medium: 35, large: 50, xlarge: 80, xxlarge: 100 }; // we need just one instance of this, it's just a generator var arcGen = (0, _d3Shape.arc)(); /** * This function return the angle for a given percentage * @param {number} percentage the percentage to calculate the angle */ function getAngle(percentage) { return percentage * 2 / 100 * Math.PI; } /** * This function return the showed value on the chart * @param {array} model the pie chart model * @param {index} index current index showed */ function getShowedValue(model, index) { if (!model) { return {}; } return model[index]; } /** * This function is just a sort * @param {object} a an element with a percentageShown to compare * @param {object} b an other element with a percentageShown to compare */ function sortElements(a, b) { return b.percentageShown - a.percentageShown; } /** * this function generates chart's empty part * @param {array} values the values shown in the graph * @param {object} size the current size * @param {function} arcGen the arc generator * @param {number} minimumPercentage the minimum percentage to be shown */ function getEmptyPartCircle(values, size, minimumPercentage) { var allPercentages = values.reduce(function (acc, value) { return acc + value.percentageShown; }, 0); if (allPercentages >= PIECHART_CONSTANTS.MAX_PERCENT - minimumPercentage) { return null; } var arcGenerated = arcGen({ innerRadius: size.innerRadius, outerRadius: size.outerRadius, padAngle: size.padAngle, startAngle: getAngle(allPercentages), endAngle: Math.PI * 2 }); return /*#__PURE__*/_react["default"].createElement("path", { className: theme('tc-pie-chart-color-alto'), d: arcGenerated, transform: "translate(".concat(size.svgSize / 2, ",").concat(size.svgSize / 2, ")") }); } /** * It increase values below minPercentage & decrease values above if some are increased * setMinimumPercentage([{percentage: 50}, {percentage: 2}], 5) would result on * [{percentage: 50, percentageShown: 47}, {percentage: 2, percentageShown: 5}] * @param {*} values the set of values * @param {*} minimumPercentage the minimum value we have to show * @param {*} amountToSubtract the amount to decrease */ function distributePercentages(values, minimumPercentage, amountToSubtract) { /** * This function decrease the percentage shown & the amount to subtract by 1 * @param {object} element the current element */ function decreaseElement(element) { if (amountToSubtract > 0) { // eslint-disable-next-line no-param-reassign element.percentageShown -= 1; // eslint-disable-next-line no-param-reassign amountToSubtract -= 1; } } while (amountToSubtract > 0) { var elementsToDecrease = values.filter(function (value) { return value.percentageShown > minimumPercentage; }).sort(sortElements); if (elementsToDecrease.length > 0) { elementsToDecrease.forEach(decreaseElement); } else { // eslint-disable-next-line no-param-reassign amountToSubtract = 0; } } return values; } /** * This function sets minimum percentage show with the minimum percentage shown * @param {array} values the set of values * @param {number} minimumPercentage the minimum value we have to show */ function setMinimumPercentage(model, minimumPercentage) { if (!model) { return []; } var amountToSubtract = 0; var valuesMins = model.map(function (value) { if (value.percentage && value.percentage < minimumPercentage) { amountToSubtract += minimumPercentage - value.percentage; return _objectSpread(_objectSpread({}, value), {}, { percentageShown: minimumPercentage }); } return _objectSpread(_objectSpread({}, value), {}, { percentageShown: value.percentage }); }); return distributePercentages(valuesMins, minimumPercentage, amountToSubtract); } /** * This function return the sum of the percentages below the given index * @param {array} values the values to get when we have to start * @param {number} index the current index */ function getPercentageToIndex(values, index) { return values.reduce(function (acc, value, i) { if (i < index) { return acc + value.percentageShown; } return acc; }, 0); } /** * This function return the percentage label rounded or with some prefix * @param {number} percentage percentage to show as label */ function getPercentageAndPrefix(percentage) { if (percentage > 0 && percentage < 1) { return { prefix: '< ', percentage: 1 }; } else if (percentage > 99 && percentage < 100) { return { prefix: '> ', percentage: 99 }; } return { prefix: '', percentage: Math.round(percentage) }; } /** * This function return the label or nothing if the label is npt passed or hidden * @param {boolean} hideLabel tell if the label has to be hidden or not * @param {number} labelValue the label value ( percentage ) * @param {function} t translate function */ function getLabel(hideLabel, labelValue, t) { if (!hideLabel && labelValue.percentage != null) { var _getPercentageAndPref = getPercentageAndPrefix(labelValue.percentage), percentage = _getPercentageAndPref.percentage, prefix = _getPercentageAndPref.prefix; var labelPercentage = t('PIE_CHART_PERCENTAGE', { defaultValue: '{{percentage}}%', percentage: percentage }); return "".concat(prefix).concat(labelPercentage); } return ''; } /** * This function generate a part of circle for a value * @param {object} value the value to generate * @param {number} index the current index * @param {array} values the values to get when we have to start * @param {object} size the current graph size */ function getCircle(value, index, values, size) { var percentagesDone = getPercentageToIndex(values, index); var arcGenerated = arcGen({ innerRadius: size.innerRadius, outerRadius: size.outerRadius, padAngle: size.padAngle, startAngle: getAngle(percentagesDone), endAngle: getAngle(percentagesDone + value.percentageShown) }); return /*#__PURE__*/_react["default"].createElement("path", { key: index, d: arcGenerated, className: theme("tc-pie-chart-color-".concat(value.color)), transform: "translate(".concat(size.svgSize / 2, ",").concat(size.svgSize / 2, ")") }); } /** * This function return useful stuff to build the graph of the loader * @param {number} size the size in px of the graph * @param {string} display the chosen display if given */ function getDisplaySize(size, display) { var currentSize = size; if (!currentSize && display) { currentSize = displaySizes[display]; } var pixelNumber = currentSize - PIECHART_CONSTANTS.MIN_SIZE; return { svgSize: currentSize, innerRadius: parseInt(PIECHART_CONSTANTS.BASE_INNER_RADIUS + PIECHART_CONSTANTS.INNER_RADIUS_PER_PIXEL * pixelNumber, 10), outerRadius: parseInt(PIECHART_CONSTANTS.BASE_OUTER_RADIUS + PIECHART_CONSTANTS.OUTER_RADIUS_PER_PIXEL * pixelNumber, 10), padAngle: PIECHART_CONSTANTS.BASE_PAD_ANGLE - PIECHART_CONSTANTS.PAD_ANGLE_PER_PIXEL * pixelNumber }; } function PieChartIconComponent(_ref) { var display = _ref.display, hideLabel = _ref.hideLabel, labelIndex = _ref.labelIndex, loading = _ref.loading, minimumPercentage = _ref.minimumPercentage, model = _ref.model, size = _ref.size, t = _ref.t, rest = _objectWithoutProperties(_ref, ["display", "hideLabel", "labelIndex", "loading", "minimumPercentage", "model", "size", "t"]); var sizeObject = getDisplaySize(size, display); if (loading) { return /*#__PURE__*/_react["default"].createElement("span", { className: theme('tc-pie-chart-loading'), "aria-busy": "true", "aria-label": t('PIE_CHART_LOADING', { defaultValue: 'Loading chart' }) }, /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], { type: _Skeleton["default"].TYPES.circle, width: sizeObject.svgSize, height: sizeObject.svgSize, className: theme('tc-pie-chart-loading-circle') }), !hideLabel && /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], { type: _Skeleton["default"].TYPES.text, size: _Skeleton["default"].SIZES.small })); } var labelValue = getShowedValue(model, labelIndex); var preparedValues = setMinimumPercentage(model, minimumPercentage); // Here we are omitting the props from i18n, // to keep only the event listener from the TooltipTrigger. var omitI18N = (0, _omit["default"])(rest, ['i18n', 'tReady']); return /*#__PURE__*/_react["default"].createElement("span", { className: theme('tc-pie-chart-icon') }, /*#__PURE__*/_react["default"].createElement("svg", _extends({ width: sizeObject.svgSize, height: sizeObject.svgSize, className: theme('tc-pie-chart-icon-graph'), style: { width: sizeObject.svgSize, height: sizeObject.svgSize } }, omitI18N), preparedValues.map(function (value, index) { return getCircle(value, index, preparedValues, sizeObject); }), getEmptyPartCircle(preparedValues, sizeObject, minimumPercentage)), /*#__PURE__*/_react["default"].createElement("div", { className: theme("tc-pie-chart-color-".concat(labelValue.color)) }, getLabel(hideLabel, labelValue, t))); } var pieChartIconPropTypes = { display: _propTypes["default"].oneOf(['small', 'medium', 'large', 'xlarge', 'xxlarge']), hideLabel: _propTypes["default"].bool, labelIndex: _propTypes["default"].number, loading: _propTypes["default"].bool, minimumPercentage: _propTypes["default"].number, model: _propTypes["default"].arrayOf(_propTypes["default"].shape({ color: _propTypes["default"].oneOf(['rio-grande', 'chestnut-rose', 'lightning-yellow', 'dove-gray', 'silver-chalice', 'jaffa']), percentage: _propTypes["default"].number.isRequired }).isRequired), size: _propTypes["default"].string }; exports.pieChartIconPropTypes = pieChartIconPropTypes; PieChartIconComponent.propTypes = _objectSpread(_objectSpread({}, pieChartIconPropTypes), {}, { t: _propTypes["default"].func }); PieChartIconComponent.defaultProps = { labelIndex: 0, minimumPercentage: 5, display: 'small', t: (0, _translate["default"])() }; PieChartIconComponent.displayName = 'PieChartIcon'; var _default = (0, _reactI18next.withTranslation)(_constants["default"])(PieChartIconComponent); exports["default"] = _default; //# sourceMappingURL=PieChartIcon.component.js.map /***/ }), /* 813 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_path__ = __webpack_require__(380); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constant__ = __webpack_require__(249); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__curve_linear__ = __webpack_require__(501); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__point__ = __webpack_require__(814); /* harmony default export */ __webpack_exports__["a"] = (function() { var x = __WEBPACK_IMPORTED_MODULE_3__point__["a" /* x */], y = __WEBPACK_IMPORTED_MODULE_3__point__["b" /* y */], defined = Object(__WEBPACK_IMPORTED_MODULE_1__constant__["a" /* default */])(true), context = null, curve = __WEBPACK_IMPORTED_MODULE_2__curve_linear__["a" /* default */], output = null; function line(data) { var i, n = data.length, d, defined0 = false, buffer; if (context == null) output = curve(buffer = Object(__WEBPACK_IMPORTED_MODULE_0_d3_path__["a" /* path */])()); for (i = 0; i <= n; ++i) { if (!(i < n && defined(d = data[i], i, data)) === defined0) { if (defined0 = !defined0) output.lineStart(); else output.lineEnd(); } if (defined0) output.point(+x(d, i, data), +y(d, i, data)); } if (buffer) return output = null, buffer + "" || null; } line.x = function(_) { return arguments.length ? (x = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__["a" /* default */])(+_), line) : x; }; line.y = function(_) { return arguments.length ? (y = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__["a" /* default */])(+_), line) : y; }; line.defined = function(_) { return arguments.length ? (defined = typeof _ === "function" ? _ : Object(__WEBPACK_IMPORTED_MODULE_1__constant__["a" /* default */])(!!_), line) : defined; }; line.curve = function(_) { return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve; }; line.context = function(_) { return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context; }; return line; }); /***/ }), /* 814 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = x; /* harmony export (immutable) */ __webpack_exports__["b"] = y; function x(p) { return p[0]; } function y(p) { return p[1]; } /***/ }), /* 815 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = point; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math__ = __webpack_require__(381); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cardinal__ = __webpack_require__(504); function point(that, x, y) { var x1 = that._x1, y1 = that._y1, x2 = that._x2, y2 = that._y2; if (that._l01_a > __WEBPACK_IMPORTED_MODULE_0__math__["f" /* epsilon */]) { var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, n = 3 * that._l01_a * (that._l01_a + that._l12_a); x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; } if (that._l23_a > __WEBPACK_IMPORTED_MODULE_0__math__["f" /* epsilon */]) { var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, m = 3 * that._l23_a * (that._l23_a + that._l12_a); x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m; y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m; } that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2); } function CatmullRom(context, alpha) { this._context = context; this._alpha = alpha; } CatmullRom.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; }, lineEnd: function() { switch (this._point) { case 2: this._context.lineTo(this._x2, this._y2); break; case 3: this.point(this._x2, this._y2); break; } if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; if (this._point) { var x23 = this._x2 - x, y23 = this._y2 - y; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); } switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; break; case 2: this._point = 3; // proceed default: point(this, x, y); break; } this._l01_a = this._l12_a, this._l12_a = this._l23_a; this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["a"] = ((function custom(alpha) { function catmullRom(context) { return alpha ? new CatmullRom(context, alpha) : new __WEBPACK_IMPORTED_MODULE_1__cardinal__["a" /* Cardinal */](context, 0); } catmullRom.alpha = function(alpha) { return custom(+alpha); }; return catmullRom; })(0.5)); /***/ }), /* 816 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = sum; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__none__ = __webpack_require__(383); /* harmony default export */ __webpack_exports__["a"] = (function(series) { var sums = series.map(sum); return Object(__WEBPACK_IMPORTED_MODULE_0__none__["a" /* default */])(series).sort(function(a, b) { return sums[a] - sums[b]; }); }); function sum(series) { var s = 0, i = -1, n = series.length, v; while (++i < n) if (v = +series[i][1]) s += v; return s; } /***/ }), /* 817 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(505); var IE8_DOM_DEFINE = __webpack_require__(1398); var toPrimitive = __webpack_require__(818); var dP = Object.defineProperty; exports.f = __webpack_require__(303) ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /* 818 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(302); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /* 819 */ /***/ (function(module, exports) { // 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x) { // eslint-disable-next-line no-self-compare return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; /***/ }), /* 820 */ /***/ (function(module, exports) { // 20.2.2.14 Math.expm1(x) var $expm1 = Math.expm1; module.exports = (!$expm1 // Old FF bug || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 // Tor Browser bug || $expm1(-2e-17) != -2e-17 ) ? function expm1(x) { return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; } : $expm1; /***/ }), /* 821 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /* 822 */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(3464); var defined = __webpack_require__(823); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /* 823 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /* 824 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 825 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(41); var defined = __webpack_require__(823); var fails = __webpack_require__(202); var spaces = __webpack_require__(826); var space = '[' + spaces + ']'; var non = '\u200b\u0085'; var ltrim = RegExp('^' + space + space + '*'); var rtrim = RegExp(space + space + '*$'); var exporter = function (KEY, exec, ALIAS) { var exp = {}; var FORCE = fails(function () { return !!spaces[KEY]() || non[KEY]() != non; }); var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; if (ALIAS) exp[ALIAS] = fn; $export($export.P + $export.F * FORCE, 'String', exp); }; // 1 -> String#trimLeft // 2 -> String#trimRight // 3 -> String#trim var trim = exporter.trim = function (string, TYPE) { string = String(defined(string)); if (TYPE & 1) string = string.replace(ltrim, ''); if (TYPE & 2) string = string.replace(rtrim, ''); return string; }; module.exports = exporter; /***/ }), /* 826 */ /***/ (function(module, exports) { module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; /***/ }), /* 827 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 828 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(509), toKey = __webpack_require__(386); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /* 829 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(39), isSymbol = __webpack_require__(304); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /* 830 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_uniqBy__ = __webpack_require__(1411); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_uniqBy___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_uniqBy__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__DefaultLegendContent__ = __webpack_require__(3522); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_DataUtils__ = __webpack_require__(42); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__ = __webpack_require__(22); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Legend */ var defaultUniqBy = function defaultUniqBy(entry) { return entry.value; }; var getUniqPaylod = function getUniqPaylod(option, payload) { if (option === true) { return __WEBPACK_IMPORTED_MODULE_1_lodash_uniqBy___default()(payload, defaultUniqBy); } if (__WEBPACK_IMPORTED_MODULE_0_lodash_isFunction___default()(option)) { return __WEBPACK_IMPORTED_MODULE_1_lodash_uniqBy___default()(payload, option); } return payload; }; var renderContent = function renderContent(content, props) { if (__WEBPACK_IMPORTED_MODULE_2_react___default.a.isValidElement(content)) { return __WEBPACK_IMPORTED_MODULE_2_react___default.a.cloneElement(content, props); } if (__WEBPACK_IMPORTED_MODULE_0_lodash_isFunction___default()(content)) { return content(props); } return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__DefaultLegendContent__["a" /* default */], props); }; var EPS = 1; var ICON_TYPES = __WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__["b" /* LEGEND_TYPES */].filter(function (type) { return type !== 'none'; }); var Legend = /*#__PURE__*/ function (_PureComponent) { _inherits(Legend, _PureComponent); function Legend() { var _getPrototypeOf2; var _this; _classCallCheck(this, Legend); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Legend)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { boxWidth: -1, boxHeight: -1 }; return _this; } _createClass(Legend, [{ key: "componentDidMount", value: function componentDidMount() { this.updateBBox(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.updateBBox(); } }, { key: "getBBox", value: function getBBox() { var _this$state = this.state, boxWidth = _this$state.boxWidth, boxHeight = _this$state.boxHeight; if (boxWidth >= 0 && boxHeight >= 0) { return { width: boxWidth, height: boxHeight }; } return null; } }, { key: "getDefaultPosition", value: function getDefaultPosition(style) { var _this$props = this.props, layout = _this$props.layout, align = _this$props.align, verticalAlign = _this$props.verticalAlign, margin = _this$props.margin, chartWidth = _this$props.chartWidth, chartHeight = _this$props.chartHeight; var hPos, vPos; if (!style || (style.left === undefined || style.left === null) && (style.right === undefined || style.right === null)) { if (align === 'center' && layout === 'vertical') { var box = this.getBBox() || { width: 0 }; hPos = { left: ((chartWidth || 0) - box.width) / 2 }; } else { hPos = align === 'right' ? { right: margin && margin.right || 0 } : { left: margin && margin.left || 0 }; } } if (!style || (style.top === undefined || style.top === null) && (style.bottom === undefined || style.bottom === null)) { if (verticalAlign === 'middle') { var _box = this.getBBox() || { height: 0 }; vPos = { top: ((chartHeight || 0) - _box.height) / 2 }; } else { vPos = verticalAlign === 'bottom' ? { bottom: margin && margin.bottom || 0 } : { top: margin && margin.top || 0 }; } } return _objectSpread({}, hPos, {}, vPos); } }, { key: "updateBBox", value: function updateBBox() { var _this$state2 = this.state, boxWidth = _this$state2.boxWidth, boxHeight = _this$state2.boxHeight; var onBBoxUpdate = this.props.onBBoxUpdate; if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) { var box = this.wrapperNode.getBoundingClientRect(); if (Math.abs(box.width - boxWidth) > EPS || Math.abs(box.height - boxHeight) > EPS) { this.setState({ boxWidth: box.width, boxHeight: box.height }, function () { if (onBBoxUpdate) { onBBoxUpdate(box); } }); } } else if (boxWidth !== -1 || boxHeight !== -1) { this.setState({ boxWidth: -1, boxHeight: -1 }, function () { if (onBBoxUpdate) { onBBoxUpdate(null); } }); } } }, { key: "render", value: function render() { var _this2 = this; var _this$props2 = this.props, content = _this$props2.content, width = _this$props2.width, height = _this$props2.height, wrapperStyle = _this$props2.wrapperStyle, paylodUniqBy = _this$props2.paylodUniqBy, payload = _this$props2.payload; var outerStyle = _objectSpread({ position: 'absolute', width: width || 'auto', height: height || 'auto' }, this.getDefaultPosition(wrapperStyle), {}, wrapperStyle); return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div", { className: "recharts-legend-wrapper", style: outerStyle, ref: function ref(node) { _this2.wrapperNode = node; } }, renderContent(content, _objectSpread({}, this.props, { payload: getUniqPaylod(paylodUniqBy, payload) }))); } }], [{ key: "getWithHeight", value: function getWithHeight(item, chartWidth) { var layout = item.props.layout; if (layout === 'vertical' && Object(__WEBPACK_IMPORTED_MODULE_5__util_DataUtils__["h" /* isNumber */])(item.props.height)) { return { height: item.props.height }; } if (layout === 'horizontal') { return { width: item.props.width || chartWidth }; } return null; } }]); return Legend; }(__WEBPACK_IMPORTED_MODULE_2_react__["PureComponent"]); Legend.displayName = 'Legend'; Legend.propTypes = { content: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.element, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func]), wrapperStyle: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object, chartWidth: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number, chartHeight: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number, width: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number, height: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number, iconSize: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number, iconType: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(ICON_TYPES), layout: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(['horizontal', 'vertical']), align: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(['center', 'left', 'right']), verticalAlign: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(['top', 'bottom', 'middle']), margin: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({ top: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number, left: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number, bottom: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number, right: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number }), payload: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({ value: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.any, id: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.any, type: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__["b" /* LEGEND_TYPES */]) })), paylodUniqBy: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool]), formatter: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, onMouseEnter: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, onMouseLeave: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, onClick: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, onBBoxUpdate: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func }; Legend.defaultProps = { iconSize: 14, layout: 'horizontal', align: 'center', verticalAlign: 'bottom' }; /* harmony default export */ __webpack_exports__["a"] = (Legend); /***/ }), /* 831 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(487), stackClear = __webpack_require__(3497), stackDelete = __webpack_require__(3498), stackGet = __webpack_require__(3499), stackHas = __webpack_require__(3500), stackSet = __webpack_require__(3501); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /* 832 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(3502), isObjectLike = __webpack_require__(129); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }), /* 833 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(772), stubArray = __webpack_require__(1417); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /* 834 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(128), stubFalse = __webpack_require__(3507); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(64)(module))) /***/ }), /* 835 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /* 836 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(1260); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(64)(module))) /***/ }), /* 837 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /* 838 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_d3_shape__ = __webpack_require__(500); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__ = __webpack_require__(22); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Curve */ var SYMBOL_FACTORIES = { symbolCircle: __WEBPACK_IMPORTED_MODULE_2_d3_shape__["symbolCircle"], symbolCross: __WEBPACK_IMPORTED_MODULE_2_d3_shape__["symbolCross"], symbolDiamond: __WEBPACK_IMPORTED_MODULE_2_d3_shape__["symbolDiamond"], symbolSquare: __WEBPACK_IMPORTED_MODULE_2_d3_shape__["symbolSquare"], symbolStar: __WEBPACK_IMPORTED_MODULE_2_d3_shape__["symbolStar"], symbolTriangle: __WEBPACK_IMPORTED_MODULE_2_d3_shape__["symbolTriangle"], symbolWye: __WEBPACK_IMPORTED_MODULE_2_d3_shape__["symbolWye"] }; var RADIAN = Math.PI / 180; var getSymbolFactory = function getSymbolFactory(type) { var name = "symbol".concat(type.slice(0, 1).toUpperCase()).concat(type.slice(1)); return SYMBOL_FACTORIES[name] || __WEBPACK_IMPORTED_MODULE_2_d3_shape__["symbolCircle"]; }; var calculateAreaSize = function calculateAreaSize(size, sizeType, type) { if (sizeType === 'area') { return size; } switch (type) { case 'cross': return 5 * size * size / 9; case 'diamond': return 0.5 * size * size / Math.sqrt(3); case 'square': return size * size; case 'star': { var angle = 18 * RADIAN; return 1.25 * size * size * (Math.tan(angle) - Math.tan(angle * 2) * Math.pow(Math.tan(angle), 2)); } case 'triangle': return Math.sqrt(3) * size * size / 4; case 'wye': return (21 - 10 * Math.sqrt(3)) * size * size / 8; default: return Math.PI * size * size / 4; } }; var Symbols = /*#__PURE__*/ function (_PureComponent) { _inherits(Symbols, _PureComponent); function Symbols() { _classCallCheck(this, Symbols); return _possibleConstructorReturn(this, _getPrototypeOf(Symbols).apply(this, arguments)); } _createClass(Symbols, [{ key: "getPath", /** * Calculate the path of curve * @return {String} path */ value: function getPath() { var _this$props = this.props, size = _this$props.size, sizeType = _this$props.sizeType, type = _this$props.type; var symbolFactory = getSymbolFactory(type); var symbol = Object(__WEBPACK_IMPORTED_MODULE_2_d3_shape__["symbol"])().type(symbolFactory).size(calculateAreaSize(size, sizeType, type)); return symbol(); } }, { key: "render", value: function render() { var _this$props2 = this.props, className = _this$props2.className, cx = _this$props2.cx, cy = _this$props2.cy, size = _this$props2.size; if (cx === +cx && cy === +cy && size === +size) { return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props), Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["f" /* filterEventAttributes */])(this.props), { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()('recharts-symbols', className), transform: "translate(".concat(cx, ", ").concat(cy, ")"), d: this.getPath() })); } return null; } }]); return Symbols; }(__WEBPACK_IMPORTED_MODULE_0_react__["PureComponent"]); Symbols.displayName = 'Symbols'; Symbols.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], { className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, type: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']), cx: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, cy: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, size: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, sizeType: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(['area', 'diameter']) }); Symbols.defaultProps = { type: 'circle', size: 64, sizeType: 'area' }; /* harmony default export */ __webpack_exports__["a"] = (Symbols); /***/ }), /* 839 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 840 */ /***/ (function(module, exports, __webpack_require__) { var baseFlatten = __webpack_require__(494), baseOrderBy = __webpack_require__(3541), baseRest = __webpack_require__(492), isIterateeCall = __webpack_require__(517); /** * Creates an array of elements, sorted in ascending order by the results of * running each element in a collection thru each iteratee. This method * performs a stable sort, that is, it preserves the original sort order of * equal elements. The iteratees are invoked with one argument: (value). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {...(Function|Function[])} [iteratees=[_.identity]] * The iteratees to sort by. * @returns {Array} Returns the new sorted array. * @example * * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 36 }, * { 'user': 'fred', 'age': 40 }, * { 'user': 'barney', 'age': 34 } * ]; * * _.sortBy(users, [function(o) { return o.user; }]); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] * * _.sortBy(users, ['user', 'age']); * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] */ var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { return []; } var length = iteratees.length; if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { iteratees = []; } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { iteratees = [iteratees[0]]; } return baseOrderBy(collection, baseFlatten(iteratees, 1), []); }); module.exports = sortBy; /***/ }), /* 841 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 842 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__number__ = __webpack_require__(387); /* harmony default export */ __webpack_exports__["a"] = (function(values, p, valueof) { if (valueof == null) valueof = __WEBPACK_IMPORTED_MODULE_0__number__["a" /* default */]; if (!(n = values.length)) return; if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values); if (p >= 1) return +valueof(values[n - 1], n - 1, values); var n, i = (n - 1) * p, i0 = Math.floor(i), value0 = +valueof(values[i0], i0, values), value1 = +valueof(values[i0 + 1], i0 + 1, values); return value0 + (value1 - value0) * (i - i0); }); /***/ }), /* 843 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return prefix; }); var prefix = "$"; function Map() {} Map.prototype = map.prototype = { constructor: Map, has: function(key) { return (prefix + key) in this; }, get: function(key) { return this[prefix + key]; }, set: function(key, value) { this[prefix + key] = value; return this; }, remove: function(key) { var property = prefix + key; return property in this && delete this[property]; }, clear: function() { for (var property in this) if (property[0] === prefix) delete this[property]; }, keys: function() { var keys = []; for (var property in this) if (property[0] === prefix) keys.push(property.slice(1)); return keys; }, values: function() { var values = []; for (var property in this) if (property[0] === prefix) values.push(this[property]); return values; }, entries: function() { var entries = []; for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]}); return entries; }, size: function() { var size = 0; for (var property in this) if (property[0] === prefix) ++size; return size; }, empty: function() { for (var property in this) if (property[0] === prefix) return false; return true; }, each: function(f) { for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this); } }; function map(object, f) { var map = new Map; // Copy constructor. if (object instanceof Map) object.each(function(value, key) { map.set(key, value); }); // Index array by numeric index or specified key function. else if (Array.isArray(object)) { var i = -1, n = object.length, o; if (f == null) while (++i < n) map.set(i, object[i]); else while (++i < n) map.set(f(o = object[i], i, object), o); } // Convert object to map. else if (object) for (var key in object) map.set(key, object[key]); return map; } /* harmony default export */ __webpack_exports__["a"] = (map); /***/ }), /* 844 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_color__ = __webpack_require__(309); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__rgb_js__ = __webpack_require__(1456); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__array_js__ = __webpack_require__(1459); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__date_js__ = __webpack_require__(1460); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__number_js__ = __webpack_require__(520); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__object_js__ = __webpack_require__(1461); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__string_js__ = __webpack_require__(1462); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__constant_js__ = __webpack_require__(1458); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__numberArray_js__ = __webpack_require__(848); /* harmony default export */ __webpack_exports__["a"] = (function(a, b) { var t = typeof b, c; return b == null || t === "boolean" ? Object(__WEBPACK_IMPORTED_MODULE_7__constant_js__["a" /* default */])(b) : (t === "number" ? __WEBPACK_IMPORTED_MODULE_4__number_js__["a" /* default */] : t === "string" ? ((c = Object(__WEBPACK_IMPORTED_MODULE_0_d3_color__["a" /* color */])(b)) ? (b = c, __WEBPACK_IMPORTED_MODULE_1__rgb_js__["a" /* default */]) : __WEBPACK_IMPORTED_MODULE_6__string_js__["a" /* default */]) : b instanceof __WEBPACK_IMPORTED_MODULE_0_d3_color__["a" /* color */] ? __WEBPACK_IMPORTED_MODULE_1__rgb_js__["a" /* default */] : b instanceof Date ? __WEBPACK_IMPORTED_MODULE_3__date_js__["a" /* default */] : Object(__WEBPACK_IMPORTED_MODULE_8__numberArray_js__["b" /* isNumberArray */])(b) ? __WEBPACK_IMPORTED_MODULE_8__numberArray_js__["a" /* default */] : Array.isArray(b) ? __WEBPACK_IMPORTED_MODULE_2__array_js__["a" /* genericArray */] : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? __WEBPACK_IMPORTED_MODULE_5__object_js__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_4__number_js__["a" /* default */])(a, b); }); /***/ }), /* 845 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = Color; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return darker; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return brighter; }); /* harmony export (immutable) */ __webpack_exports__["e"] = color; /* harmony export (immutable) */ __webpack_exports__["h"] = rgbConvert; /* harmony export (immutable) */ __webpack_exports__["g"] = rgb; /* harmony export (immutable) */ __webpack_exports__["b"] = Rgb; /* unused harmony export hslConvert */ /* harmony export (immutable) */ __webpack_exports__["f"] = hsl; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__define_js__ = __webpack_require__(846); function Color() {} var darker = 0.7; var brighter = 1 / darker; var reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); var named = { aliceblue: 0xf0f8ff, antiquewhite: 0xfaebd7, aqua: 0x00ffff, aquamarine: 0x7fffd4, azure: 0xf0ffff, beige: 0xf5f5dc, bisque: 0xffe4c4, black: 0x000000, blanchedalmond: 0xffebcd, blue: 0x0000ff, blueviolet: 0x8a2be2, brown: 0xa52a2a, burlywood: 0xdeb887, cadetblue: 0x5f9ea0, chartreuse: 0x7fff00, chocolate: 0xd2691e, coral: 0xff7f50, cornflowerblue: 0x6495ed, cornsilk: 0xfff8dc, crimson: 0xdc143c, cyan: 0x00ffff, darkblue: 0x00008b, darkcyan: 0x008b8b, darkgoldenrod: 0xb8860b, darkgray: 0xa9a9a9, darkgreen: 0x006400, darkgrey: 0xa9a9a9, darkkhaki: 0xbdb76b, darkmagenta: 0x8b008b, darkolivegreen: 0x556b2f, darkorange: 0xff8c00, darkorchid: 0x9932cc, darkred: 0x8b0000, darksalmon: 0xe9967a, darkseagreen: 0x8fbc8f, darkslateblue: 0x483d8b, darkslategray: 0x2f4f4f, darkslategrey: 0x2f4f4f, darkturquoise: 0x00ced1, darkviolet: 0x9400d3, deeppink: 0xff1493, deepskyblue: 0x00bfff, dimgray: 0x696969, dimgrey: 0x696969, dodgerblue: 0x1e90ff, firebrick: 0xb22222, floralwhite: 0xfffaf0, forestgreen: 0x228b22, fuchsia: 0xff00ff, gainsboro: 0xdcdcdc, ghostwhite: 0xf8f8ff, gold: 0xffd700, goldenrod: 0xdaa520, gray: 0x808080, green: 0x008000, greenyellow: 0xadff2f, grey: 0x808080, honeydew: 0xf0fff0, hotpink: 0xff69b4, indianred: 0xcd5c5c, indigo: 0x4b0082, ivory: 0xfffff0, khaki: 0xf0e68c, lavender: 0xe6e6fa, lavenderblush: 0xfff0f5, lawngreen: 0x7cfc00, lemonchiffon: 0xfffacd, lightblue: 0xadd8e6, lightcoral: 0xf08080, lightcyan: 0xe0ffff, lightgoldenrodyellow: 0xfafad2, lightgray: 0xd3d3d3, lightgreen: 0x90ee90, lightgrey: 0xd3d3d3, lightpink: 0xffb6c1, lightsalmon: 0xffa07a, lightseagreen: 0x20b2aa, lightskyblue: 0x87cefa, lightslategray: 0x778899, lightslategrey: 0x778899, lightsteelblue: 0xb0c4de, lightyellow: 0xffffe0, lime: 0x00ff00, limegreen: 0x32cd32, linen: 0xfaf0e6, magenta: 0xff00ff, maroon: 0x800000, mediumaquamarine: 0x66cdaa, mediumblue: 0x0000cd, mediumorchid: 0xba55d3, mediumpurple: 0x9370db, mediumseagreen: 0x3cb371, mediumslateblue: 0x7b68ee, mediumspringgreen: 0x00fa9a, mediumturquoise: 0x48d1cc, mediumvioletred: 0xc71585, midnightblue: 0x191970, mintcream: 0xf5fffa, mistyrose: 0xffe4e1, moccasin: 0xffe4b5, navajowhite: 0xffdead, navy: 0x000080, oldlace: 0xfdf5e6, olive: 0x808000, olivedrab: 0x6b8e23, orange: 0xffa500, orangered: 0xff4500, orchid: 0xda70d6, palegoldenrod: 0xeee8aa, palegreen: 0x98fb98, paleturquoise: 0xafeeee, palevioletred: 0xdb7093, papayawhip: 0xffefd5, peachpuff: 0xffdab9, peru: 0xcd853f, pink: 0xffc0cb, plum: 0xdda0dd, powderblue: 0xb0e0e6, purple: 0x800080, rebeccapurple: 0x663399, red: 0xff0000, rosybrown: 0xbc8f8f, royalblue: 0x4169e1, saddlebrown: 0x8b4513, salmon: 0xfa8072, sandybrown: 0xf4a460, seagreen: 0x2e8b57, seashell: 0xfff5ee, sienna: 0xa0522d, silver: 0xc0c0c0, skyblue: 0x87ceeb, slateblue: 0x6a5acd, slategray: 0x708090, slategrey: 0x708090, snow: 0xfffafa, springgreen: 0x00ff7f, steelblue: 0x4682b4, tan: 0xd2b48c, teal: 0x008080, thistle: 0xd8bfd8, tomato: 0xff6347, turquoise: 0x40e0d0, violet: 0xee82ee, wheat: 0xf5deb3, white: 0xffffff, whitesmoke: 0xf5f5f5, yellow: 0xffff00, yellowgreen: 0x9acd32 }; Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["a" /* default */])(Color, color, { copy: function(channels) { return Object.assign(new this.constructor, this, channels); }, displayable: function() { return this.rgb().displayable(); }, hex: color_formatHex, // Deprecated! Use color.formatHex. formatHex: color_formatHex, formatHsl: color_formatHsl, formatRgb: color_formatRgb, toString: color_formatRgb }); function color_formatHex() { return this.rgb().formatHex(); } function color_formatHsl() { return hslConvert(this).formatHsl(); } function color_formatRgb() { return this.rgb().formatRgb(); } function color(format) { var m, l; format = (format + "").trim().toLowerCase(); return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 : null) // invalid hex : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null; } function rgbn(n) { return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); } function rgba(r, g, b, a) { if (a <= 0) r = g = b = NaN; return new Rgb(r, g, b, a); } function rgbConvert(o) { if (!(o instanceof Color)) o = color(o); if (!o) return new Rgb; o = o.rgb(); return new Rgb(o.r, o.g, o.b, o.opacity); } function rgb(r, g, b, opacity) { return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); } function Rgb(r, g, b, opacity) { this.r = +r; this.g = +g; this.b = +b; this.opacity = +opacity; } Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["a" /* default */])(Rgb, rgb, Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["b" /* extend */])(Color, { brighter: function(k) { k = k == null ? brighter : Math.pow(brighter, k); return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); }, darker: function(k) { k = k == null ? darker : Math.pow(darker, k); return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); }, rgb: function() { return this; }, displayable: function() { return (-0.5 <= this.r && this.r < 255.5) && (-0.5 <= this.g && this.g < 255.5) && (-0.5 <= this.b && this.b < 255.5) && (0 <= this.opacity && this.opacity <= 1); }, hex: rgb_formatHex, // Deprecated! Use color.formatHex. formatHex: rgb_formatHex, formatRgb: rgb_formatRgb, toString: rgb_formatRgb })); function rgb_formatHex() { return "#" + hex(this.r) + hex(this.g) + hex(this.b); } function rgb_formatRgb() { var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")"); } function hex(value) { value = Math.max(0, Math.min(255, Math.round(value) || 0)); return (value < 16 ? "0" : "") + value.toString(16); } function hsla(h, s, l, a) { if (a <= 0) h = s = l = NaN; else if (l <= 0 || l >= 1) h = s = NaN; else if (s <= 0) h = NaN; return new Hsl(h, s, l, a); } function hslConvert(o) { if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); if (!(o instanceof Color)) o = color(o); if (!o) return new Hsl; if (o instanceof Hsl) return o; o = o.rgb(); var r = o.r / 255, g = o.g / 255, b = o.b / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), h = NaN, s = max - min, l = (max + min) / 2; if (s) { if (r === max) h = (g - b) / s + (g < b) * 6; else if (g === max) h = (b - r) / s + 2; else h = (r - g) / s + 4; s /= l < 0.5 ? max + min : 2 - max - min; h *= 60; } else { s = l > 0 && l < 1 ? 0 : h; } return new Hsl(h, s, l, o.opacity); } function hsl(h, s, l, opacity) { return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); } function Hsl(h, s, l, opacity) { this.h = +h; this.s = +s; this.l = +l; this.opacity = +opacity; } Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["a" /* default */])(Hsl, hsl, Object(__WEBPACK_IMPORTED_MODULE_0__define_js__["b" /* extend */])(Color, { brighter: function(k) { k = k == null ? brighter : Math.pow(brighter, k); return new Hsl(this.h, this.s, this.l * k, this.opacity); }, darker: function(k) { k = k == null ? darker : Math.pow(darker, k); return new Hsl(this.h, this.s, this.l * k, this.opacity); }, rgb: function() { var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2; return new Rgb( hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity ); }, displayable: function() { return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && (0 <= this.l && this.l <= 1) && (0 <= this.opacity && this.opacity <= 1); }, formatHsl: function() { var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")"); } })); /* From FvD 13.37, CSS Color Module Level 3 */ function hsl2rgb(h, m1, m2) { return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255; } /***/ }), /* 846 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = extend; /* harmony default export */ __webpack_exports__["a"] = (function(constructor, factory, prototype) { constructor.prototype = factory.prototype = prototype; prototype.constructor = constructor; }); function extend(parent, definition) { var prototype = Object.create(parent.prototype); for (var key in definition) prototype[key] = definition[key]; return prototype; } /***/ }), /* 847 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = basis; function basis(t1, v0, v1, v2, v3) { var t2 = t1 * t1, t3 = t2 * t1; return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6; } /* harmony default export */ __webpack_exports__["b"] = (function(values) { var n = values.length - 1; return function(t) { var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), v1 = values[i], v2 = values[i + 1], v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; return basis((t - i / n) * n, v0, v1, v2, v3); }; }); /***/ }), /* 848 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = isNumberArray; /* harmony default export */ __webpack_exports__["a"] = (function(a, b) { if (!b) b = []; var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i; return function(t) { for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; return c; }; }); function isNumberArray(x) { return ArrayBuffer.isView(x) && !(x instanceof DataView); } /***/ }), /* 849 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = loggish; /* harmony export (immutable) */ __webpack_exports__["a"] = log; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(151); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_d3_format__ = __webpack_require__(1465); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nice__ = __webpack_require__(1469); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__continuous__ = __webpack_require__(206); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__init__ = __webpack_require__(94); function transformLog(x) { return Math.log(x); } function transformExp(x) { return Math.exp(x); } function transformLogn(x) { return -Math.log(-x); } function transformExpn(x) { return -Math.exp(-x); } function pow10(x) { return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x; } function powp(base) { return base === 10 ? pow10 : base === Math.E ? Math.exp : function(x) { return Math.pow(base, x); }; } function logp(base) { return base === Math.E ? Math.log : base === 10 && Math.log10 || base === 2 && Math.log2 || (base = Math.log(base), function(x) { return Math.log(x) / base; }); } function reflect(f) { return function(x) { return -f(-x); }; } function loggish(transform) { var scale = transform(transformLog, transformExp), domain = scale.domain, base = 10, logs, pows; function rescale() { logs = logp(base), pows = powp(base); if (domain()[0] < 0) { logs = reflect(logs), pows = reflect(pows); transform(transformLogn, transformExpn); } else { transform(transformLog, transformExp); } return scale; } scale.base = function(_) { return arguments.length ? (base = +_, rescale()) : base; }; scale.domain = function(_) { return arguments.length ? (domain(_), rescale()) : domain(); }; scale.ticks = function(count) { var d = domain(), u = d[0], v = d[d.length - 1], r; if (r = v < u) i = u, u = v, v = i; var i = logs(u), j = logs(v), p, k, t, n = count == null ? 10 : +count, z = []; if (!(base % 1) && j - i < n) { i = Math.round(i) - 1, j = Math.round(j) + 1; if (u > 0) for (; i < j; ++i) { for (k = 1, p = pows(i); k < base; ++k) { t = p * k; if (t < u) continue; if (t > v) break; z.push(t); } } else for (; i < j; ++i) { for (k = base - 1, p = pows(i); k >= 1; --k) { t = p * k; if (t < u) continue; if (t > v) break; z.push(t); } } } else { z = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__["h" /* ticks */])(i, j, Math.min(j - i, n)).map(pows); } return r ? z.reverse() : z; }; scale.tickFormat = function(count, specifier) { if (specifier == null) specifier = base === 10 ? ".0e" : ","; if (typeof specifier !== "function") specifier = Object(__WEBPACK_IMPORTED_MODULE_1_d3_format__["a" /* format */])(specifier); if (count === Infinity) return specifier; if (count == null) count = 10; var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate? return function(d) { var i = d / pows(Math.round(logs(d))); if (i * base < base - 0.5) i *= base; return i <= k ? specifier(d) : ""; }; }; scale.nice = function() { return domain(Object(__WEBPACK_IMPORTED_MODULE_2__nice__["a" /* default */])(domain(), { floor: function(x) { return pows(Math.floor(logs(x))); }, ceil: function(x) { return pows(Math.ceil(logs(x))); } })); }; return scale; } function log() { var scale = loggish(Object(__WEBPACK_IMPORTED_MODULE_3__continuous__["d" /* transformer */])()).domain([1, 10]); scale.copy = function() { return Object(__WEBPACK_IMPORTED_MODULE_3__continuous__["a" /* copy */])(scale, log()).base(scale.base()); }; __WEBPACK_IMPORTED_MODULE_4__init__["b" /* initRange */].apply(scale, arguments); return scale; } /***/ }), /* 850 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = symlogish; /* harmony export (immutable) */ __webpack_exports__["a"] = symlog; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__linear__ = __webpack_require__(252); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__continuous__ = __webpack_require__(206); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__init__ = __webpack_require__(94); function transformSymlog(c) { return function(x) { return Math.sign(x) * Math.log1p(Math.abs(x / c)); }; } function transformSymexp(c) { return function(x) { return Math.sign(x) * Math.expm1(Math.abs(x)) * c; }; } function symlogish(transform) { var c = 1, scale = transform(transformSymlog(c), transformSymexp(c)); scale.constant = function(_) { return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c; }; return Object(__WEBPACK_IMPORTED_MODULE_0__linear__["b" /* linearish */])(scale); } function symlog() { var scale = symlogish(Object(__WEBPACK_IMPORTED_MODULE_1__continuous__["d" /* transformer */])()); scale.copy = function() { return Object(__WEBPACK_IMPORTED_MODULE_1__continuous__["a" /* copy */])(scale, symlog()).constant(scale.constant()); }; return __WEBPACK_IMPORTED_MODULE_2__init__["b" /* initRange */].apply(scale, arguments); } /***/ }), /* 851 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = powish; /* harmony export (immutable) */ __webpack_exports__["a"] = pow; /* harmony export (immutable) */ __webpack_exports__["c"] = sqrt; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__linear__ = __webpack_require__(252); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__continuous__ = __webpack_require__(206); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__init__ = __webpack_require__(94); function transformPow(exponent) { return function(x) { return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent); }; } function transformSqrt(x) { return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x); } function transformSquare(x) { return x < 0 ? -x * x : x * x; } function powish(transform) { var scale = transform(__WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */], __WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */]), exponent = 1; function rescale() { return exponent === 1 ? transform(__WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */], __WEBPACK_IMPORTED_MODULE_1__continuous__["c" /* identity */]) : exponent === 0.5 ? transform(transformSqrt, transformSquare) : transform(transformPow(exponent), transformPow(1 / exponent)); } scale.exponent = function(_) { return arguments.length ? (exponent = +_, rescale()) : exponent; }; return Object(__WEBPACK_IMPORTED_MODULE_0__linear__["b" /* linearish */])(scale); } function pow() { var scale = powish(Object(__WEBPACK_IMPORTED_MODULE_1__continuous__["d" /* transformer */])()); scale.copy = function() { return Object(__WEBPACK_IMPORTED_MODULE_1__continuous__["a" /* copy */])(scale, pow()).exponent(scale.exponent()); }; __WEBPACK_IMPORTED_MODULE_2__init__["b" /* initRange */].apply(scale, arguments); return scale; } function sqrt() { return pow.apply(null, arguments).exponent(0.5); } /***/ }), /* 852 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__interval_js__ = __webpack_require__(85); /* unused harmony reexport timeInterval */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__millisecond_js__ = __webpack_require__(3621); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_1__millisecond_js__["a"]; }); /* unused harmony reexport timeMilliseconds */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_1__millisecond_js__["a"]; }); /* unused harmony reexport utcMilliseconds */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__second_js__ = __webpack_require__(3622); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_2__second_js__["a"]; }); /* unused harmony reexport timeSeconds */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_2__second_js__["a"]; }); /* unused harmony reexport utcSeconds */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__minute_js__ = __webpack_require__(3623); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_3__minute_js__["a"]; }); /* unused harmony reexport timeMinutes */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__hour_js__ = __webpack_require__(3624); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_4__hour_js__["a"]; }); /* unused harmony reexport timeHours */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__day_js__ = __webpack_require__(3625); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_5__day_js__["a"]; }); /* unused harmony reexport timeDays */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__week_js__ = __webpack_require__(3626); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["b"]; }); /* unused harmony reexport timeWeeks */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["b"]; }); /* unused harmony reexport timeSundays */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["a"]; }); /* unused harmony reexport timeMondays */ /* unused harmony reexport timeTuesday */ /* unused harmony reexport timeTuesdays */ /* unused harmony reexport timeWednesday */ /* unused harmony reexport timeWednesdays */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_6__week_js__["c"]; }); /* unused harmony reexport timeThursdays */ /* unused harmony reexport timeFriday */ /* unused harmony reexport timeFridays */ /* unused harmony reexport timeSaturday */ /* unused harmony reexport timeSaturdays */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__month_js__ = __webpack_require__(3627); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_7__month_js__["a"]; }); /* unused harmony reexport timeMonths */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__year_js__ = __webpack_require__(3628); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_8__year_js__["a"]; }); /* unused harmony reexport timeYears */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utcMinute_js__ = __webpack_require__(3629); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_9__utcMinute_js__["a"]; }); /* unused harmony reexport utcMinutes */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utcHour_js__ = __webpack_require__(3630); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_10__utcHour_js__["a"]; }); /* unused harmony reexport utcHours */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utcDay_js__ = __webpack_require__(3631); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_11__utcDay_js__["a"]; }); /* unused harmony reexport utcDays */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__ = __webpack_require__(3632); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["b"]; }); /* unused harmony reexport utcWeeks */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["b"]; }); /* unused harmony reexport utcSundays */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["a"]; }); /* unused harmony reexport utcMondays */ /* unused harmony reexport utcTuesday */ /* unused harmony reexport utcTuesdays */ /* unused harmony reexport utcWednesday */ /* unused harmony reexport utcWednesdays */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_12__utcWeek_js__["c"]; }); /* unused harmony reexport utcThursdays */ /* unused harmony reexport utcFriday */ /* unused harmony reexport utcFridays */ /* unused harmony reexport utcSaturday */ /* unused harmony reexport utcSaturdays */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utcMonth_js__ = __webpack_require__(3633); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_13__utcMonth_js__["a"]; }); /* unused harmony reexport utcMonths */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__utcYear_js__ = __webpack_require__(3634); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_14__utcYear_js__["a"]; }); /* unused harmony reexport utcYears */ /***/ }), /* 853 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return timeFormat; }); /* unused harmony export timeParse */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return utcFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return utcParse; }); /* unused harmony export default */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__locale_js__ = __webpack_require__(1472); var locale; var timeFormat; var timeParse; var utcFormat; var utcParse; defaultLocale({ dateTime: "%x, %X", date: "%-m/%-d/%Y", time: "%-I:%M:%S %p", periods: ["AM", "PM"], days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] }); function defaultLocale(definition) { locale = Object(__WEBPACK_IMPORTED_MODULE_0__locale_js__["a" /* default */])(definition); timeFormat = locale.format; timeParse = locale.parse; utcFormat = locale.utcFormat; utcParse = locale.utcParse; return locale; } /***/ }), /* 854 */ /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__(1269); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /* 855 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isEqual__ = __webpack_require__(150); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isEqual___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isEqual__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(106); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_smooth__ = __webpack_require__(115); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__shape_Curve__ = __webpack_require__(311); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__shape_Dot__ = __webpack_require__(253); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__container_Layer__ = __webpack_require__(60); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__component_LabelList__ = __webpack_require__(171); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__ErrorBar__ = __webpack_require__(388); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__util_DataUtils__ = __webpack_require__(42); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__util_ChartUtils__ = __webpack_require__(84); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Line */ var Line = /*#__PURE__*/ function (_PureComponent) { _inherits(Line, _PureComponent); function Line() { var _getPrototypeOf2; var _this; _classCallCheck(this, Line); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Line)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { isAnimationFinished: true, totalLength: 0 }; _this.id = Object(__WEBPACK_IMPORTED_MODULE_12__util_DataUtils__["k" /* uniqueId */])('recharts-line-'); _this.cachePrevData = function (points) { _this.setState({ prevPoints: points }); }; _this.pathRef = function (node) { _this.mainCurve = node; }; _this.handleAnimationEnd = function () { _this.setState({ isAnimationFinished: true }); _this.props.onAnimationEnd(); }; _this.handleAnimationStart = function () { _this.setState({ isAnimationFinished: false }); _this.props.onAnimationStart(); }; return _this; } _createClass(Line, [{ key: "componentDidMount", /* eslint-disable react/no-did-mount-set-state */ value: function componentDidMount() { if (!this.props.isAnimationActive) { return; } var totalLength = this.getTotalLength(); this.setState({ totalLength: totalLength }); } // eslint-disable-next-line camelcase }, { key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { var _this$props = this.props, animationId = _this$props.animationId, points = _this$props.points; if (nextProps.animationId !== animationId) { this.cachePrevData(points); } } }, { key: "getTotalLength", value: function getTotalLength() { var curveDom = this.mainCurve; try { return curveDom && curveDom.getTotalLength && curveDom.getTotalLength() || 0; } catch (err) { return 0; } } }, { key: "getStrokeDasharray", value: function getStrokeDasharray(length, totalLength, lines) { var lineLength = lines.reduce(function (pre, next) { return pre + next; }); var count = parseInt(length / lineLength, 10); var remainLength = length % lineLength; var restLength = totalLength - length; var remainLines = []; for (var i = 0, sum = 0;; sum += lines[i], ++i) { if (sum + lines[i] > remainLength) { remainLines = [].concat(_toConsumableArray(lines.slice(0, i)), [remainLength - sum]); break; } } var emptyLines = remainLines.length % 2 === 0 ? [0, restLength] : [restLength]; return [].concat(_toConsumableArray(this.constructor.repeat(lines, count)), _toConsumableArray(remainLines), emptyLines).map(function (line) { return "".concat(line, "px"); }).join(', '); } }, { key: "renderErrorBar", value: function renderErrorBar() { if (this.props.isAnimationActive && !this.state.isAnimationFinished) { return null; } var _this$props2 = this.props, points = _this$props2.points, xAxis = _this$props2.xAxis, yAxis = _this$props2.yAxis, layout = _this$props2.layout, children = _this$props2.children; var errorBarItems = Object(__WEBPACK_IMPORTED_MODULE_13__util_ReactUtils__["i" /* findAllByType */])(children, __WEBPACK_IMPORTED_MODULE_11__ErrorBar__["a" /* default */]); if (!errorBarItems) { return null; } function dataPointFormatter(dataPoint, dataKey) { return { x: dataPoint.x, y: dataPoint.y, value: dataPoint.value, errorVal: Object(__WEBPACK_IMPORTED_MODULE_14__util_ChartUtils__["v" /* getValueByDataKey */])(dataPoint.payload, dataKey) }; } return errorBarItems.map(function (item, i) { return __WEBPACK_IMPORTED_MODULE_3_react___default.a.cloneElement(item, { key: i, // eslint-disable-line react/no-array-index-key data: points, xAxis: xAxis, yAxis: yAxis, layout: layout, dataPointFormatter: dataPointFormatter }); }); } }, { key: "renderDots", value: function renderDots(needClip, clipPathId) { var _this2 = this; var isAnimationActive = this.props.isAnimationActive; if (isAnimationActive && !this.state.isAnimationFinished) { return null; } var _this$props3 = this.props, dot = _this$props3.dot, points = _this$props3.points, dataKey = _this$props3.dataKey; var lineProps = Object(__WEBPACK_IMPORTED_MODULE_13__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props); var customDotProps = Object(__WEBPACK_IMPORTED_MODULE_13__util_ReactUtils__["l" /* getPresentationAttributes */])(dot); var dotEvents = Object(__WEBPACK_IMPORTED_MODULE_13__util_ReactUtils__["f" /* filterEventAttributes */])(dot); var dots = points.map(function (entry, i) { var dotProps = _objectSpread({ key: "dot-".concat(i), r: 3 }, lineProps, {}, customDotProps, {}, dotEvents, { value: entry.value, dataKey: dataKey, cx: entry.x, cy: entry.y, index: i, payload: entry.payload }); return _this2.constructor.renderDotItem(dot, dotProps); }); var dotsProps = { clipPath: needClip ? "url(#clipPath-".concat(clipPathId, ")") : null }; return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__container_Layer__["a" /* default */], _extends({ className: "recharts-line-dots", key: "dots" }, dotsProps), dots); } }, { key: "renderCurveStatically", value: function renderCurveStatically(points, needClip, clipPathId, props) { var _this$props4 = this.props, type = _this$props4.type, layout = _this$props4.layout, connectNulls = _this$props4.connectNulls; var curveProps = _objectSpread({}, Object(__WEBPACK_IMPORTED_MODULE_13__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props), {}, Object(__WEBPACK_IMPORTED_MODULE_13__util_ReactUtils__["f" /* filterEventAttributes */])(this.props), { fill: 'none', className: 'recharts-line-curve', clipPath: needClip ? "url(#clipPath-".concat(clipPathId, ")") : null, points: points }, props, { type: type, layout: layout, connectNulls: connectNulls }); return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__shape_Curve__["a" /* default */], _extends({}, curveProps, { pathRef: this.pathRef })); } }, { key: "renderCurveWithAnimation", value: function renderCurveWithAnimation(needClip, clipPathId) { var _this3 = this; var _this$props5 = this.props, points = _this$props5.points, strokeDasharray = _this$props5.strokeDasharray, isAnimationActive = _this$props5.isAnimationActive, animationBegin = _this$props5.animationBegin, animationDuration = _this$props5.animationDuration, animationEasing = _this$props5.animationEasing, animationId = _this$props5.animationId, width = _this$props5.width, height = _this$props5.height; var _this$state = this.state, prevPoints = _this$state.prevPoints, totalLength = _this$state.totalLength; return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_react_smooth__["a" /* default */], { begin: animationBegin, duration: animationDuration, isActive: isAnimationActive, easing: animationEasing, from: { t: 0 }, to: { t: 1 }, key: "line-".concat(animationId), onAnimationEnd: this.handleAnimationEnd, onAnimationStart: this.handleAnimationStart }, function (_ref) { var t = _ref.t; if (prevPoints) { var prevPointsDiffFactor = prevPoints.length / points.length; var stepData = points.map(function (entry, index) { var prevPointIndex = Math.floor(index * prevPointsDiffFactor); if (prevPoints[prevPointIndex]) { var prev = prevPoints[prevPointIndex]; var interpolatorX = Object(__WEBPACK_IMPORTED_MODULE_12__util_DataUtils__["f" /* interpolateNumber */])(prev.x, entry.x); var interpolatorY = Object(__WEBPACK_IMPORTED_MODULE_12__util_DataUtils__["f" /* interpolateNumber */])(prev.y, entry.y); return _objectSpread({}, entry, { x: interpolatorX(t), y: interpolatorY(t) }); } // magic number of faking previous x and y location if (_this3.animateNewValues) { var _interpolatorX = Object(__WEBPACK_IMPORTED_MODULE_12__util_DataUtils__["f" /* interpolateNumber */])(width * 2, entry.x); var _interpolatorY = Object(__WEBPACK_IMPORTED_MODULE_12__util_DataUtils__["f" /* interpolateNumber */])(height / 2, entry.y); return _objectSpread({}, entry, { x: _interpolatorX(t), y: _interpolatorY(t) }); } return _objectSpread({}, entry, { x: entry.x, y: entry.y }); }); return _this3.renderCurveStatically(stepData, needClip, clipPathId); } var interpolator = Object(__WEBPACK_IMPORTED_MODULE_12__util_DataUtils__["f" /* interpolateNumber */])(0, totalLength); var curLength = interpolator(t); var currentStrokeDasharray; if (strokeDasharray) { var lines = strokeDasharray.split(/[,\s]+/gim).map(function (num) { return parseFloat(num); }); currentStrokeDasharray = _this3.getStrokeDasharray(curLength, totalLength, lines); } else { currentStrokeDasharray = "".concat(curLength, "px ").concat(totalLength - curLength, "px"); } return _this3.renderCurveStatically(points, needClip, clipPathId, { strokeDasharray: currentStrokeDasharray }); }); } }, { key: "renderCurve", value: function renderCurve(needClip, clipPathId) { var _this$props6 = this.props, points = _this$props6.points, isAnimationActive = _this$props6.isAnimationActive; var _this$state2 = this.state, prevPoints = _this$state2.prevPoints, totalLength = _this$state2.totalLength; if (isAnimationActive && points && points.length && (!prevPoints && totalLength > 0 || !__WEBPACK_IMPORTED_MODULE_0_lodash_isEqual___default()(prevPoints, points))) { return this.renderCurveWithAnimation(needClip, clipPathId); } return this.renderCurveStatically(points, needClip, clipPathId); } }, { key: "render", value: function render() { var _this$props7 = this.props, hide = _this$props7.hide, dot = _this$props7.dot, points = _this$props7.points, className = _this$props7.className, xAxis = _this$props7.xAxis, yAxis = _this$props7.yAxis, top = _this$props7.top, left = _this$props7.left, width = _this$props7.width, height = _this$props7.height, isAnimationActive = _this$props7.isAnimationActive, id = _this$props7.id; if (hide || !points || !points.length) { return null; } var isAnimationFinished = this.state.isAnimationFinished; var hasSinglePoint = points.length === 1; var layerClass = __WEBPACK_IMPORTED_MODULE_6_classnames___default()('recharts-line', className); var needClip = xAxis && xAxis.allowDataOverflow || yAxis && yAxis.allowDataOverflow; var clipPathId = __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(id) ? this.id : id; return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__container_Layer__["a" /* default */], { className: layerClass }, needClip ? __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("defs", null, __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("clipPath", { id: "clipPath-".concat(clipPathId) }, __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("rect", { x: left, y: top, width: width, height: height }))) : null, !hasSinglePoint && this.renderCurve(needClip, clipPathId), this.renderErrorBar(), (hasSinglePoint || dot) && this.renderDots(needClip, clipPathId), (!isAnimationActive || isAnimationFinished) && __WEBPACK_IMPORTED_MODULE_10__component_LabelList__["a" /* default */].renderCallByParent(this.props, points)); } }], [{ key: "repeat", value: function repeat(lines, count) { var linesUnit = lines.length % 2 !== 0 ? [].concat(_toConsumableArray(lines), [0]) : lines; var result = []; for (var i = 0; i < count; ++i) { result = [].concat(_toConsumableArray(result), _toConsumableArray(linesUnit)); } return result; } }, { key: "renderDotItem", value: function renderDotItem(option, props) { var dotItem; if (__WEBPACK_IMPORTED_MODULE_3_react___default.a.isValidElement(option)) { dotItem = __WEBPACK_IMPORTED_MODULE_3_react___default.a.cloneElement(option, props); } else if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(option)) { dotItem = option(props); } else { var className = __WEBPACK_IMPORTED_MODULE_6_classnames___default()('recharts-line-dot', option ? option.className : ''); dotItem = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__shape_Dot__["a" /* default */], _extends({}, props, { className: className })); } return dotItem; } }]); return Line; }(__WEBPACK_IMPORTED_MODULE_3_react__["PureComponent"]); Line.displayName = 'Line'; Line.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_13__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], {}, __WEBPACK_IMPORTED_MODULE_13__util_ReactUtils__["a" /* EVENT_ATTRIBUTES */], { className: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, type: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['basis', 'basisClosed', 'basisOpen', 'linear', 'linearClosed', 'natural', 'monotoneX', 'monotoneY', 'monotone', 'step', 'stepBefore', 'stepAfter']), __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func]), unit: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number]), name: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number]), yAxisId: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number]), xAxisId: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number]), yAxis: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object, xAxis: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object, legendType: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_13__util_ReactUtils__["b" /* LEGEND_TYPES */]), tooltipType: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_13__util_ReactUtils__["e" /* TOOLTIP_TYPES */]), layout: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['horizontal', 'vertical']), connectNulls: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, hide: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, // whether have dot in line activeDot: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.element, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool]), dot: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.element, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool]), top: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, left: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, width: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, height: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, points: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ x: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, y: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, value: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.value })), onAnimationStart: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, onAnimationEnd: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, isAnimationActive: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, animateNewValues: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, animationBegin: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, animationDuration: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, animationEasing: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear']), animationId: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, id: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string }); Line.defaultProps = { xAxisId: 0, yAxisId: 0, connectNulls: false, activeDot: true, dot: true, legendType: 'line', stroke: '#3182bd', strokeWidth: 1, fill: '#fff', points: [], isAnimationActive: !Object(__WEBPACK_IMPORTED_MODULE_13__util_ReactUtils__["o" /* isSsr */])(), animateNewValues: true, animationBegin: 0, animationDuration: 1500, animationEasing: 'ease', hide: false, onAnimationStart: function onAnimationStart() {}, onAnimationEnd: function onAnimationEnd() {} }; Line.getComposedData = function (_ref2) { var props = _ref2.props, xAxis = _ref2.xAxis, yAxis = _ref2.yAxis, xAxisTicks = _ref2.xAxisTicks, yAxisTicks = _ref2.yAxisTicks, dataKey = _ref2.dataKey, bandSize = _ref2.bandSize, displayedData = _ref2.displayedData, offset = _ref2.offset; var layout = props.layout; var points = displayedData.map(function (entry, index) { var value = Object(__WEBPACK_IMPORTED_MODULE_14__util_ChartUtils__["v" /* getValueByDataKey */])(entry, dataKey); if (layout === 'horizontal') { return { x: Object(__WEBPACK_IMPORTED_MODULE_14__util_ChartUtils__["k" /* getCateCoordinateOfLine */])({ axis: xAxis, ticks: xAxisTicks, bandSize: bandSize, entry: entry, index: index }), y: __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(value) ? null : yAxis.scale(value), value: value, payload: entry }; } return { x: __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(value) ? null : xAxis.scale(value), y: Object(__WEBPACK_IMPORTED_MODULE_14__util_ChartUtils__["k" /* getCateCoordinateOfLine */])({ axis: yAxis, ticks: yAxisTicks, bandSize: bandSize, entry: entry, index: index }), value: value, payload: entry }; }); return _objectSpread({ points: points, layout: layout }, offset); }; /* harmony default export */ __webpack_exports__["a"] = (Line); /***/ }), /* 856 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isEqual__ = __webpack_require__(150); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isEqual___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isEqual__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isNaN__ = __webpack_require__(510); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isNaN___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isNaN__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_max__ = __webpack_require__(1435); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_max___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_max__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_get__ = __webpack_require__(203); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_lodash_get___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_get__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_isNil__ = __webpack_require__(106); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_lodash_isNil__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_isArray__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash_isArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash_isArray__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react_smooth__ = __webpack_require__(115); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__shape_Curve__ = __webpack_require__(311); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__shape_Dot__ = __webpack_require__(253); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__container_Layer__ = __webpack_require__(60); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__component_LabelList__ = __webpack_require__(171); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__util_DataUtils__ = __webpack_require__(42); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__util_ChartUtils__ = __webpack_require__(84); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Area */ var Area = /*#__PURE__*/ function (_PureComponent) { _inherits(Area, _PureComponent); function Area() { var _getPrototypeOf2; var _this; _classCallCheck(this, Area); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Area)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { isAnimationFinished: true }; _this.id = Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["k" /* uniqueId */])('recharts-area-'); _this.cachePrevData = function (points, baseLine) { _this.setState({ prevPoints: points, prevBaseLine: baseLine }); }; _this.handleAnimationEnd = function () { var onAnimationEnd = _this.props.onAnimationEnd; _this.setState({ isAnimationFinished: true }); if (__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(onAnimationEnd)) { onAnimationEnd(); } }; _this.handleAnimationStart = function () { var onAnimationStart = _this.props.onAnimationStart; _this.setState({ isAnimationFinished: false }); if (__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(onAnimationStart)) { onAnimationStart(); } }; return _this; } _createClass(Area, [{ key: "componentWillReceiveProps", // eslint-disable-next-line camelcase value: function componentWillReceiveProps(nextProps) { var _this$props = this.props, animationId = _this$props.animationId, points = _this$props.points, baseLine = _this$props.baseLine; if (nextProps.animationId !== animationId) { this.cachePrevData(points, baseLine); } } }, { key: "renderDots", value: function renderDots(needClip, clipPathId) { var _this2 = this; var isAnimationActive = this.props.isAnimationActive; var isAnimationFinished = this.state.isAnimationFinished; if (isAnimationActive && !isAnimationFinished) { return null; } var _this$props2 = this.props, dot = _this$props2.dot, points = _this$props2.points, dataKey = _this$props2.dataKey; var areaProps = Object(__WEBPACK_IMPORTED_MODULE_15__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props); var customDotProps = Object(__WEBPACK_IMPORTED_MODULE_15__util_ReactUtils__["l" /* getPresentationAttributes */])(dot); var dotEvents = Object(__WEBPACK_IMPORTED_MODULE_15__util_ReactUtils__["f" /* filterEventAttributes */])(dot); var dots = points.map(function (entry, i) { var dotProps = _objectSpread({ key: "dot-".concat(i), r: 3 }, areaProps, {}, customDotProps, {}, dotEvents, { dataKey: dataKey, cx: entry.x, cy: entry.y, index: i, value: entry.value, payload: entry.payload }); return _this2.constructor.renderDotItem(dot, dotProps); }); var dotsProps = { clipPath: needClip ? "url(#clipPath-".concat(clipPathId, ")") : null }; return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__container_Layer__["a" /* default */], _extends({ className: "recharts-area-dots" }, dotsProps), dots); } }, { key: "renderHorizontalRect", value: function renderHorizontalRect(alpha) { var _this$props3 = this.props, baseLine = _this$props3.baseLine, points = _this$props3.points, strokeWidth = _this$props3.strokeWidth; var startX = points[0].x; var endX = points[points.length - 1].x; var width = alpha * Math.abs(startX - endX); var maxY = __WEBPACK_IMPORTED_MODULE_2_lodash_max___default()(points.map(function (entry) { return entry.y || 0; })); if (Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["h" /* isNumber */])(baseLine)) { maxY = Math.max(baseLine, maxY); } else if (baseLine && __WEBPACK_IMPORTED_MODULE_6_lodash_isArray___default()(baseLine) && baseLine.length) { maxY = Math.max(__WEBPACK_IMPORTED_MODULE_2_lodash_max___default()(baseLine.map(function (entry) { return entry.y || 0; })), maxY); } if (Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["h" /* isNumber */])(maxY)) { return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("rect", { x: startX < endX ? startX : startX - width, y: 0, width: width, height: parseInt(maxY + (strokeWidth || 1), 10) }); } return null; } }, { key: "renderVerticalRect", value: function renderVerticalRect(alpha) { var _this$props4 = this.props, baseLine = _this$props4.baseLine, points = _this$props4.points, strokeWidth = _this$props4.strokeWidth; var startY = points[0].y; var endY = points[points.length - 1].y; var height = alpha * Math.abs(startY - endY); var maxX = __WEBPACK_IMPORTED_MODULE_2_lodash_max___default()(points.map(function (entry) { return entry.x || 0; })); if (Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["h" /* isNumber */])(baseLine)) { maxX = Math.max(baseLine, maxX); } else if (baseLine && __WEBPACK_IMPORTED_MODULE_6_lodash_isArray___default()(baseLine) && baseLine.length) { maxX = Math.max(__WEBPACK_IMPORTED_MODULE_2_lodash_max___default()(baseLine.map(function (entry) { return entry.x || 0; })), maxX); } if (Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["h" /* isNumber */])(maxX)) { return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("rect", { x: 0, y: startY < endY ? startY : startY - height, width: maxX + (strokeWidth || 1), height: parseInt(height, 10) }); } return null; } }, { key: "renderClipRect", value: function renderClipRect(alpha) { var layout = this.props.layout; if (layout === 'vertical') { return this.renderVerticalRect(alpha); } return this.renderHorizontalRect(alpha); } }, { key: "renderAreaStatically", value: function renderAreaStatically(points, baseLine, needClip, clipPathId) { var _this$props5 = this.props, layout = _this$props5.layout, type = _this$props5.type, stroke = _this$props5.stroke, connectNulls = _this$props5.connectNulls, isRange = _this$props5.isRange; return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__container_Layer__["a" /* default */], { clipPath: needClip ? "url(#clipPath-".concat(clipPathId, ")") : null }, __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__shape_Curve__["a" /* default */], _extends({}, this.props, { points: points, baseLine: baseLine, stroke: "none", className: "recharts-area-area" })), stroke !== 'none' && __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__shape_Curve__["a" /* default */], _extends({}, Object(__WEBPACK_IMPORTED_MODULE_15__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props), { className: "recharts-area-curve", layout: layout, type: type, connectNulls: connectNulls, fill: "none", points: points })), stroke !== 'none' && isRange && __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__shape_Curve__["a" /* default */], _extends({}, Object(__WEBPACK_IMPORTED_MODULE_15__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props), { className: "recharts-area-curve", layout: layout, type: type, connectNulls: connectNulls, fill: "none", points: baseLine }))); } }, { key: "renderAreaWithAnimation", value: function renderAreaWithAnimation(needClip, clipPathId) { var _this3 = this; var _this$props6 = this.props, points = _this$props6.points, baseLine = _this$props6.baseLine, isAnimationActive = _this$props6.isAnimationActive, animationBegin = _this$props6.animationBegin, animationDuration = _this$props6.animationDuration, animationEasing = _this$props6.animationEasing, animationId = _this$props6.animationId; var _this$state = this.state, prevPoints = _this$state.prevPoints, prevBaseLine = _this$state.prevBaseLine; // const clipPathId = _.isNil(id) ? this.id : id; return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_react_smooth__["a" /* default */], { begin: animationBegin, duration: animationDuration, isActive: isAnimationActive, easing: animationEasing, from: { t: 0 }, to: { t: 1 }, key: "area-".concat(animationId), onAnimationEnd: this.handleAnimationEnd, onAnimationStart: this.handleAnimationStart }, function (_ref) { var t = _ref.t; if (prevPoints) { var prevPointsDiffFactor = prevPoints.length / points.length; // update animtaion var stepPoints = points.map(function (entry, index) { var prevPointIndex = Math.floor(index * prevPointsDiffFactor); if (prevPoints[prevPointIndex]) { var prev = prevPoints[prevPointIndex]; var interpolatorX = Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["f" /* interpolateNumber */])(prev.x, entry.x); var interpolatorY = Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["f" /* interpolateNumber */])(prev.y, entry.y); return _objectSpread({}, entry, { x: interpolatorX(t), y: interpolatorY(t) }); } return entry; }); var stepBaseLine; if (Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["h" /* isNumber */])(baseLine)) { var interpolator = Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["f" /* interpolateNumber */])(prevBaseLine, baseLine); stepBaseLine = interpolator(t); } else if (__WEBPACK_IMPORTED_MODULE_5_lodash_isNil___default()(baseLine) || __WEBPACK_IMPORTED_MODULE_1_lodash_isNaN___default()(baseLine)) { var _interpolator = Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["f" /* interpolateNumber */])(prevBaseLine, 0); stepBaseLine = _interpolator(t); } else { stepBaseLine = baseLine.map(function (entry, index) { var prevPointIndex = Math.floor(index * prevPointsDiffFactor); if (prevBaseLine[prevPointIndex]) { var prev = prevBaseLine[prevPointIndex]; var interpolatorX = Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["f" /* interpolateNumber */])(prev.x, entry.x); var interpolatorY = Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["f" /* interpolateNumber */])(prev.y, entry.y); return _objectSpread({}, entry, { x: interpolatorX(t), y: interpolatorY(t) }); } return entry; }); } return _this3.renderAreaStatically(stepPoints, stepBaseLine, needClip, clipPathId); } return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__container_Layer__["a" /* default */], null, __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("defs", null, __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("clipPath", { id: "animationClipPath-".concat(clipPathId) }, _this3.renderClipRect(t))), __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__container_Layer__["a" /* default */], { clipPath: "url(#animationClipPath-".concat(clipPathId, ")") }, _this3.renderAreaStatically(points, baseLine, needClip, clipPathId))); }); } }, { key: "renderArea", value: function renderArea(needClip, clipPathId) { var _this$props7 = this.props, points = _this$props7.points, baseLine = _this$props7.baseLine, isAnimationActive = _this$props7.isAnimationActive; var _this$state2 = this.state, prevPoints = _this$state2.prevPoints, prevBaseLine = _this$state2.prevBaseLine, totalLength = _this$state2.totalLength; if (isAnimationActive && points && points.length && (!prevPoints && totalLength > 0 || !__WEBPACK_IMPORTED_MODULE_0_lodash_isEqual___default()(prevPoints, points) || !__WEBPACK_IMPORTED_MODULE_0_lodash_isEqual___default()(prevBaseLine, baseLine))) { return this.renderAreaWithAnimation(needClip, clipPathId); } return this.renderAreaStatically(points, baseLine, needClip, clipPathId); } }, { key: "render", value: function render() { var _this$props8 = this.props, hide = _this$props8.hide, dot = _this$props8.dot, points = _this$props8.points, className = _this$props8.className, top = _this$props8.top, left = _this$props8.left, xAxis = _this$props8.xAxis, yAxis = _this$props8.yAxis, width = _this$props8.width, height = _this$props8.height, isAnimationActive = _this$props8.isAnimationActive, id = _this$props8.id; if (hide || !points || !points.length) { return null; } var isAnimationFinished = this.state.isAnimationFinished; var hasSinglePoint = points.length === 1; var layerClass = __WEBPACK_IMPORTED_MODULE_9_classnames___default()('recharts-area', className); var needClip = xAxis && xAxis.allowDataOverflow || yAxis && yAxis.allowDataOverflow; var clipPathId = __WEBPACK_IMPORTED_MODULE_5_lodash_isNil___default()(id) ? this.id : id; return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__container_Layer__["a" /* default */], { className: layerClass }, needClip ? __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("defs", null, __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("clipPath", { id: "clipPath-".concat(clipPathId) }, __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("rect", { x: left, y: top, width: width, height: parseInt(height, 10) }))) : null, !hasSinglePoint ? this.renderArea(needClip, clipPathId) : null, (dot || hasSinglePoint) && this.renderDots(needClip, clipPathId), (!isAnimationActive || isAnimationFinished) && __WEBPACK_IMPORTED_MODULE_14__component_LabelList__["a" /* default */].renderCallByParent(this.props, points)); } }]); return Area; }(__WEBPACK_IMPORTED_MODULE_7_react__["PureComponent"]); Area.displayName = 'Area'; Area.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_15__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], {}, __WEBPACK_IMPORTED_MODULE_15__util_ReactUtils__["a" /* EVENT_ATTRIBUTES */], { className: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string, dataKey: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func]).isRequired, type: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOf(['basis', 'basisClosed', 'basisOpen', 'linear', 'linearClosed', 'natural', 'monotoneX', 'monotoneY', 'monotone', 'step', 'stepBefore', 'stepAfter']), __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func]), unit: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number]), name: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number]), yAxisId: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number]), xAxisId: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number]), yAxis: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object, xAxis: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object, stackId: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string]), legendType: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_15__util_ReactUtils__["b" /* LEGEND_TYPES */]), tooltipType: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_15__util_ReactUtils__["e" /* TOOLTIP_TYPES */]), connectNulls: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, activeDot: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.element, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool]), // dot configuration dot: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.element, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool]), label: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.element, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool]), hide: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, // have curve configuration layout: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOf(['horizontal', 'vertical']), baseLine: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.array]), isRange: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, points: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.shape({ x: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, y: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, value: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.array]) })), onAnimationStart: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, onAnimationEnd: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, animationId: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, isAnimationActive: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, animationBegin: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, animationDuration: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, animationEasing: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear']), id: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string }); Area.defaultProps = { stroke: '#3182bd', fill: '#3182bd', fillOpacity: 0.6, xAxisId: 0, yAxisId: 0, legendType: 'line', connectNulls: false, // points of area points: [], dot: false, activeDot: true, hide: false, isAnimationActive: !Object(__WEBPACK_IMPORTED_MODULE_15__util_ReactUtils__["o" /* isSsr */])(), animationBegin: 0, animationDuration: 1500, animationEasing: 'ease' }; Area.getBaseValue = function (props, xAxis, yAxis) { var layout = props.layout, baseValue = props.baseValue; if (Object(__WEBPACK_IMPORTED_MODULE_16__util_DataUtils__["h" /* isNumber */])(baseValue)) { return baseValue; } var numericAxis = layout === 'horizontal' ? yAxis : xAxis; var domain = numericAxis.scale.domain(); if (numericAxis.type === 'number') { var max = Math.max(domain[0], domain[1]); var min = Math.min(domain[0], domain[1]); if (baseValue === 'dataMin') { return min; } if (baseValue === 'dataMax') { return max; } return max < 0 ? max : Math.max(Math.min(domain[0], domain[1]), 0); } if (baseValue === 'dataMin') { return domain[0]; } if (baseValue === 'dataMax') { return domain[1]; } return domain[0]; }; Area.getComposedData = function (_ref2) { var props = _ref2.props, xAxis = _ref2.xAxis, yAxis = _ref2.yAxis, xAxisTicks = _ref2.xAxisTicks, yAxisTicks = _ref2.yAxisTicks, bandSize = _ref2.bandSize, dataKey = _ref2.dataKey, stackedData = _ref2.stackedData, dataStartIndex = _ref2.dataStartIndex, displayedData = _ref2.displayedData, offset = _ref2.offset; var layout = props.layout; var hasStack = stackedData && stackedData.length; var baseValue = Area.getBaseValue(props, xAxis, yAxis); var isRange = false; var points = displayedData.map(function (entry, index) { var value; if (hasStack) { value = stackedData[dataStartIndex + index]; } else { value = Object(__WEBPACK_IMPORTED_MODULE_17__util_ChartUtils__["v" /* getValueByDataKey */])(entry, dataKey); if (!__WEBPACK_IMPORTED_MODULE_6_lodash_isArray___default()(value)) { value = [baseValue, value]; } else { isRange = true; } } if (layout === 'horizontal') { return { x: Object(__WEBPACK_IMPORTED_MODULE_17__util_ChartUtils__["k" /* getCateCoordinateOfLine */])({ axis: xAxis, ticks: xAxisTicks, bandSize: bandSize, entry: entry, index: index }), y: __WEBPACK_IMPORTED_MODULE_5_lodash_isNil___default()(value[1]) ? null : yAxis.scale(value[1]), value: value, payload: entry }; } return { x: __WEBPACK_IMPORTED_MODULE_5_lodash_isNil___default()(value[1]) ? null : xAxis.scale(value[1]), y: Object(__WEBPACK_IMPORTED_MODULE_17__util_ChartUtils__["k" /* getCateCoordinateOfLine */])({ axis: yAxis, ticks: yAxisTicks, bandSize: bandSize, entry: entry, index: index }), value: value, payload: entry }; }); var baseLine; if (hasStack || isRange) { baseLine = points.map(function (entry) { if (layout === 'horizontal') { return { x: entry.x, y: !__WEBPACK_IMPORTED_MODULE_5_lodash_isNil___default()(__WEBPACK_IMPORTED_MODULE_4_lodash_get___default()(entry, 'value[0]')) ? yAxis.scale(__WEBPACK_IMPORTED_MODULE_4_lodash_get___default()(entry, 'value[0]')) : null }; } return { x: !__WEBPACK_IMPORTED_MODULE_5_lodash_isNil___default()(__WEBPACK_IMPORTED_MODULE_4_lodash_get___default()(entry, 'value[0]')) ? xAxis.scale(__WEBPACK_IMPORTED_MODULE_4_lodash_get___default()(entry, 'value[0]')) : null, y: entry.y }; }); } else if (layout === 'horizontal') { baseLine = yAxis.scale(baseValue); } else { baseLine = xAxis.scale(baseValue); } return _objectSpread({ points: points, baseLine: baseLine, layout: layout, isRange: isRange }, offset); }; Area.renderDotItem = function (option, props) { var dotItem; if (__WEBPACK_IMPORTED_MODULE_7_react___default.a.isValidElement(option)) { dotItem = __WEBPACK_IMPORTED_MODULE_7_react___default.a.cloneElement(option, props); } else if (__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(option)) { dotItem = option(props); } else { dotItem = __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__shape_Dot__["a" /* default */], _extends({}, props, { className: "recharts-area-dot" })); } return dotItem; }; /* harmony default export */ __webpack_exports__["a"] = (Area); /***/ }), /* 857 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isNil__ = __webpack_require__(106); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isNil__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isEqual__ = __webpack_require__(150); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isEqual___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isEqual__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isArray__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_isArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isArray__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_smooth__ = __webpack_require__(115); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__shape_Rectangle__ = __webpack_require__(312); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__container_Layer__ = __webpack_require__(60); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ErrorBar__ = __webpack_require__(388); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__component_Cell__ = __webpack_require__(307); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__component_LabelList__ = __webpack_require__(171); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__util_DataUtils__ = __webpack_require__(42); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__util_ChartUtils__ = __webpack_require__(84); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _extends() { _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; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Render a group of bar */ var Bar = /*#__PURE__*/ function (_PureComponent) { _inherits(Bar, _PureComponent); function Bar() { var _getPrototypeOf2; var _this; _classCallCheck(this, Bar); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Bar)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { isAnimationFinished: false }; _this.id = Object(__WEBPACK_IMPORTED_MODULE_13__util_DataUtils__["k" /* uniqueId */])('recharts-bar-'); _this.cachePrevData = function (data) { _this.setState({ prevData: data }); }; _this.handleAnimationEnd = function () { _this.setState({ isAnimationFinished: true }); _this.props.onAnimationEnd(); }; _this.handleAnimationStart = function () { _this.setState({ isAnimationFinished: false }); _this.props.onAnimationStart(); }; return _this; } _createClass(Bar, [{ key: "componentWillReceiveProps", // eslint-disable-next-line camelcase value: function componentWillReceiveProps(nextProps) { var _this$props = this.props, animationId = _this$props.animationId, data = _this$props.data; if (nextProps.animationId !== animationId) { this.cachePrevData(data); } } }, { key: "renderRectanglesStatically", value: function renderRectanglesStatically(data) { var _this2 = this; var shape = this.props.shape; var baseProps = Object(__WEBPACK_IMPORTED_MODULE_14__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props); return data && data.map(function (entry, i) { var props = _objectSpread({}, baseProps, {}, entry, { index: i }); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__container_Layer__["a" /* default */], _extends({ className: "recharts-bar-rectangle" }, Object(__WEBPACK_IMPORTED_MODULE_14__util_ReactUtils__["g" /* filterEventsOfChild */])(_this2.props, entry, i), { key: "rectangle-".concat(i) // eslint-disable-line react/no-array-index-key }), _this2.constructor.renderRectangle(shape, props)); }); } }, { key: "renderRectanglesWithAnimation", value: function renderRectanglesWithAnimation() { var _this3 = this; var _this$props2 = this.props, data = _this$props2.data, layout = _this$props2.layout, isAnimationActive = _this$props2.isAnimationActive, animationBegin = _this$props2.animationBegin, animationDuration = _this$props2.animationDuration, animationEasing = _this$props2.animationEasing, animationId = _this$props2.animationId; var prevData = this.state.prevData; return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_react_smooth__["a" /* default */], { begin: animationBegin, duration: animationDuration, isActive: isAnimationActive, easing: animationEasing, from: { t: 0 }, to: { t: 1 }, key: "bar-".concat(animationId), onAnimationEnd: this.handleAnimationEnd, onAnimationStart: this.handleAnimationStart }, function (_ref) { var t = _ref.t; var stepData = data.map(function (entry, index) { var prev = prevData && prevData[index]; if (prev) { var interpolatorX = Object(__WEBPACK_IMPORTED_MODULE_13__util_DataUtils__["f" /* interpolateNumber */])(prev.x, entry.x); var interpolatorY = Object(__WEBPACK_IMPORTED_MODULE_13__util_DataUtils__["f" /* interpolateNumber */])(prev.y, entry.y); var interpolatorWidth = Object(__WEBPACK_IMPORTED_MODULE_13__util_DataUtils__["f" /* interpolateNumber */])(prev.width, entry.width); var interpolatorHeight = Object(__WEBPACK_IMPORTED_MODULE_13__util_DataUtils__["f" /* interpolateNumber */])(prev.height, entry.height); return _objectSpread({}, entry, { x: interpolatorX(t), y: interpolatorY(t), width: interpolatorWidth(t), height: interpolatorHeight(t) }); } if (layout === 'horizontal') { var _interpolatorHeight = Object(__WEBPACK_IMPORTED_MODULE_13__util_DataUtils__["f" /* interpolateNumber */])(0, entry.height); var h = _interpolatorHeight(t); return _objectSpread({}, entry, { y: entry.y + entry.height - h, height: h }); } var interpolator = Object(__WEBPACK_IMPORTED_MODULE_13__util_DataUtils__["f" /* interpolateNumber */])(0, entry.width); var w = interpolator(t); return _objectSpread({}, entry, { width: w }); }); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__container_Layer__["a" /* default */], null, _this3.renderRectanglesStatically(stepData)); }); } }, { key: "renderRectangles", value: function renderRectangles() { var _this$props3 = this.props, data = _this$props3.data, isAnimationActive = _this$props3.isAnimationActive; var prevData = this.state.prevData; if (isAnimationActive && data && data.length && (!prevData || !__WEBPACK_IMPORTED_MODULE_1_lodash_isEqual___default()(prevData, data))) { return this.renderRectanglesWithAnimation(); } return this.renderRectanglesStatically(data); } }, { key: "renderBackground", value: function renderBackground() { var _this4 = this; var data = this.props.data; var backgroundProps = Object(__WEBPACK_IMPORTED_MODULE_14__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props.background); return data.map(function (entry, i) { // eslint-disable-next-line no-unused-vars var value = entry.value, background = entry.background, rest = _objectWithoutProperties(entry, ["value", "background"]); if (!background) { return null; } var props = _objectSpread({}, rest, { fill: '#eee' }, background, {}, backgroundProps, {}, Object(__WEBPACK_IMPORTED_MODULE_14__util_ReactUtils__["g" /* filterEventsOfChild */])(_this4.props, entry, i), { index: i, key: "background-bar-".concat(i), className: 'recharts-bar-background-rectangle' }); return _this4.constructor.renderRectangle(_this4.props.background, props); }); } }, { key: "renderErrorBar", value: function renderErrorBar() { if (this.props.isAnimationActive && !this.state.isAnimationFinished) { return null; } var _this$props4 = this.props, data = _this$props4.data, xAxis = _this$props4.xAxis, yAxis = _this$props4.yAxis, layout = _this$props4.layout, children = _this$props4.children; var errorBarItems = Object(__WEBPACK_IMPORTED_MODULE_14__util_ReactUtils__["i" /* findAllByType */])(children, __WEBPACK_IMPORTED_MODULE_10__ErrorBar__["a" /* default */]); if (!errorBarItems) { return null; } var offset = layout === 'vertical' ? data[0].height / 2 : data[0].width / 2; function dataPointFormatter(dataPoint, dataKey) { return { x: dataPoint.x, y: dataPoint.y, value: dataPoint.value, errorVal: Object(__WEBPACK_IMPORTED_MODULE_15__util_ChartUtils__["v" /* getValueByDataKey */])(dataPoint, dataKey) }; } return errorBarItems.map(function (item, i) { return __WEBPACK_IMPORTED_MODULE_4_react___default.a.cloneElement(item, { key: "error-bar-".concat(i), // eslint-disable-line react/no-array-index-key data: data, xAxis: xAxis, yAxis: yAxis, layout: layout, offset: offset, dataPointFormatter: dataPointFormatter }); }); } }, { key: "render", value: function render() { var _this$props5 = this.props, hide = _this$props5.hide, data = _this$props5.data, className = _this$props5.className, xAxis = _this$props5.xAxis, yAxis = _this$props5.yAxis, left = _this$props5.left, top = _this$props5.top, width = _this$props5.width, height = _this$props5.height, isAnimationActive = _this$props5.isAnimationActive, background = _this$props5.background, id = _this$props5.id; if (hide || !data || !data.length) { return null; } var isAnimationFinished = this.state.isAnimationFinished; var layerClass = __WEBPACK_IMPORTED_MODULE_6_classnames___default()('recharts-bar', className); var needClip = xAxis && xAxis.allowDataOverflow || yAxis && yAxis.allowDataOverflow; var clipPathId = __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(id) ? this.id : id; return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__container_Layer__["a" /* default */], { className: layerClass }, needClip ? __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("defs", null, __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("clipPath", { id: "clipPath-".concat(clipPathId) }, __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("rect", { x: left, y: top, width: width, height: height }))) : null, __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__container_Layer__["a" /* default */], { className: "recharts-bar-rectangles", clipPath: needClip ? "url(#clipPath-".concat(clipPathId, ")") : null }, background ? this.renderBackground() : null, this.renderRectangles()), this.renderErrorBar(), (!isAnimationActive || isAnimationFinished) && __WEBPACK_IMPORTED_MODULE_12__component_LabelList__["a" /* default */].renderCallByParent(this.props, data)); } }], [{ key: "renderRectangle", value: function renderRectangle(option, props) { var rectangle; if (__WEBPACK_IMPORTED_MODULE_4_react___default.a.isValidElement(option)) { rectangle = __WEBPACK_IMPORTED_MODULE_4_react___default.a.cloneElement(option, props); } else if (__WEBPACK_IMPORTED_MODULE_2_lodash_isFunction___default()(option)) { rectangle = option(props); } else { rectangle = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__shape_Rectangle__["a" /* default */], props); } return rectangle; } }]); return Bar; }(__WEBPACK_IMPORTED_MODULE_4_react__["PureComponent"]); Bar.displayName = 'Bar'; Bar.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_14__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], {}, __WEBPACK_IMPORTED_MODULE_14__util_ReactUtils__["a" /* EVENT_ATTRIBUTES */], { className: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, layout: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOf(['vertical', 'horizontal']), xAxisId: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string]), yAxisId: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string]), yAxis: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object, xAxis: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object, stackId: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string]), barSize: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, unit: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number]), name: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number]), dataKey: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func]).isRequired, legendType: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_14__util_ReactUtils__["b" /* LEGEND_TYPES */]), tooltipType: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_14__util_ReactUtils__["e" /* TOOLTIP_TYPES */]), minPointSize: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, maxBarSize: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, hide: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, shape: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.element]), data: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.shape({ x: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, y: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, width: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, height: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, radius: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.array]), value: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.array]) })), onAnimationStart: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, onAnimationEnd: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, animationId: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, isAnimationActive: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, animationBegin: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, animationDuration: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, animationEasing: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear']), id: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string }); Bar.defaultProps = { xAxisId: 0, yAxisId: 0, legendType: 'rect', minPointSize: 0, hide: false, // data of bar data: [], layout: 'vertical', isAnimationActive: !Object(__WEBPACK_IMPORTED_MODULE_14__util_ReactUtils__["o" /* isSsr */])(), animationBegin: 0, animationDuration: 400, animationEasing: 'ease', onAnimationStart: function onAnimationStart() {}, onAnimationEnd: function onAnimationEnd() {} }; Bar.getComposedData = function (_ref2) { var props = _ref2.props, item = _ref2.item, barPosition = _ref2.barPosition, bandSize = _ref2.bandSize, xAxis = _ref2.xAxis, yAxis = _ref2.yAxis, xAxisTicks = _ref2.xAxisTicks, yAxisTicks = _ref2.yAxisTicks, stackedData = _ref2.stackedData, dataStartIndex = _ref2.dataStartIndex, displayedData = _ref2.displayedData, offset = _ref2.offset; var pos = Object(__WEBPACK_IMPORTED_MODULE_15__util_ChartUtils__["e" /* findPositionOfBar */])(barPosition, item); if (!pos) { return []; } var layout = props.layout; var _item$props = item.props, dataKey = _item$props.dataKey, children = _item$props.children, minPointSize = _item$props.minPointSize; var numericAxis = layout === 'horizontal' ? yAxis : xAxis; var stackedDomain = stackedData ? numericAxis.scale.domain() : null; var baseValue = Object(__WEBPACK_IMPORTED_MODULE_15__util_ChartUtils__["i" /* getBaseValueOfBar */])({ props: props, numericAxis: numericAxis }); var cells = Object(__WEBPACK_IMPORTED_MODULE_14__util_ReactUtils__["i" /* findAllByType */])(children, __WEBPACK_IMPORTED_MODULE_11__component_Cell__["a" /* default */]); var rects = displayedData.map(function (entry, index) { var value, x, y, width, height, background; if (stackedData) { value = Object(__WEBPACK_IMPORTED_MODULE_15__util_ChartUtils__["B" /* truncateByDomain */])(stackedData[dataStartIndex + index], stackedDomain); } else { value = Object(__WEBPACK_IMPORTED_MODULE_15__util_ChartUtils__["v" /* getValueByDataKey */])(entry, dataKey); if (!__WEBPACK_IMPORTED_MODULE_3_lodash_isArray___default()(value)) { value = [baseValue, value]; } } if (layout === 'horizontal') { x = Object(__WEBPACK_IMPORTED_MODULE_15__util_ChartUtils__["j" /* getCateCoordinateOfBar */])({ axis: xAxis, ticks: xAxisTicks, bandSize: bandSize, offset: pos.offset, entry: entry, index: index }); y = yAxis.scale(value[1]); width = pos.size; height = yAxis.scale(value[0]) - yAxis.scale(value[1]); background = { x: x, y: yAxis.y, width: width, height: yAxis.height }; if (Math.abs(minPointSize) > 0 && Math.abs(height) < Math.abs(minPointSize)) { var delta = Object(__WEBPACK_IMPORTED_MODULE_13__util_DataUtils__["j" /* mathSign */])(height || minPointSize) * (Math.abs(minPointSize) - Math.abs(height)); y -= delta; height += delta; } } else { x = xAxis.scale(value[0]); y = Object(__WEBPACK_IMPORTED_MODULE_15__util_ChartUtils__["j" /* getCateCoordinateOfBar */])({ axis: yAxis, ticks: yAxisTicks, bandSize: bandSize, offset: pos.offset, entry: entry, index: index }); width = xAxis.scale(value[1]) - xAxis.scale(value[0]); height = pos.size; background = { x: xAxis.x, y: y, width: xAxis.width, height: height }; if (Math.abs(minPointSize) > 0 && Math.abs(width) < Math.abs(minPointSize)) { var _delta = Object(__WEBPACK_IMPORTED_MODULE_13__util_DataUtils__["j" /* mathSign */])(width || minPointSize) * (Math.abs(minPointSize) - Math.abs(width)); width += _delta; } } return _objectSpread({}, entry, { x: x, y: y, width: width, height: height, value: stackedData ? value : value[1], payload: entry, background: background }, cells && cells[index] && cells[index].props); }); return _objectSpread({ data: rects, layout: layout }, offset); }; /* harmony default export */ __webpack_exports__["a"] = (Bar); /***/ }), /* 858 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isEqual__ = __webpack_require__(150); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_isEqual___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isEqual__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(106); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_smooth__ = __webpack_require__(115); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__container_Layer__ = __webpack_require__(60); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__component_LabelList__ = __webpack_require__(171); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ZAxis__ = __webpack_require__(528); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__shape_Curve__ = __webpack_require__(311); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__shape_Symbols__ = __webpack_require__(838); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__ErrorBar__ = __webpack_require__(388); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__component_Cell__ = __webpack_require__(307); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__util_DataUtils__ = __webpack_require__(42); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__util_ChartUtils__ = __webpack_require__(84); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /** * @fileOverview Render a group of scatters */ var Scatter = /*#__PURE__*/ function (_PureComponent) { _inherits(Scatter, _PureComponent); function Scatter() { var _getPrototypeOf2; var _this; _classCallCheck(this, Scatter); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Scatter)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { isAnimationFinished: false }; _this.cachePrevPoints = function (points) { _this.setState({ prevPoints: points }); }; _this.handleAnimationEnd = function () { _this.setState({ isAnimationFinished: true }); }; _this.handleAnimationStart = function () { _this.setState({ isAnimationFinished: false }); }; _this.id = Object(__WEBPACK_IMPORTED_MODULE_15__util_DataUtils__["k" /* uniqueId */])('recharts-scatter-'); return _this; } _createClass(Scatter, [{ key: "componentWillReceiveProps", // eslint-disable-next-line camelcase value: function componentWillReceiveProps(nextProps) { var _this$props = this.props, animationId = _this$props.animationId, points = _this$props.points; if (nextProps.animationId !== animationId) { this.cachePrevPoints(points); } } }, { key: "renderSymbolsStatically", value: function renderSymbolsStatically(points) { var _this2 = this; var _this$props2 = this.props, shape = _this$props2.shape, activeShape = _this$props2.activeShape, activeIndex = _this$props2.activeIndex; var baseProps = Object(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props); return points.map(function (entry, i) { var props = _objectSpread({ key: "symbol-".concat(i) }, baseProps, {}, entry); return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__container_Layer__["a" /* default */], _extends({ className: "recharts-scatter-symbol" }, Object(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["g" /* filterEventsOfChild */])(_this2.props, entry, i), { key: "symbol-".concat(i) // eslint-disable-line react/no-array-index-key }), _this2.constructor.renderSymbolItem(activeIndex === i ? activeShape : shape, props)); }); } }, { key: "renderSymbolsWithAnimation", value: function renderSymbolsWithAnimation() { var _this3 = this; var _this$props3 = this.props, points = _this$props3.points, isAnimationActive = _this$props3.isAnimationActive, animationBegin = _this$props3.animationBegin, animationDuration = _this$props3.animationDuration, animationEasing = _this$props3.animationEasing, animationId = _this$props3.animationId; var prevPoints = this.state.prevPoints; return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_react_smooth__["a" /* default */], { begin: animationBegin, duration: animationDuration, isActive: isAnimationActive, easing: animationEasing, from: { t: 0 }, to: { t: 1 }, key: "pie-".concat(animationId), onAnimationEnd: this.handleAnimationEnd, onAnimationStart: this.handleAnimationStart }, function (_ref) { var t = _ref.t; var stepData = points.map(function (entry, index) { var prev = prevPoints && prevPoints[index]; if (prev) { var interpolatorCx = Object(__WEBPACK_IMPORTED_MODULE_15__util_DataUtils__["f" /* interpolateNumber */])(prev.cx, entry.cx); var interpolatorCy = Object(__WEBPACK_IMPORTED_MODULE_15__util_DataUtils__["f" /* interpolateNumber */])(prev.cy, entry.cy); var interpolatorSize = Object(__WEBPACK_IMPORTED_MODULE_15__util_DataUtils__["f" /* interpolateNumber */])(prev.size, entry.size); return _objectSpread({}, entry, { cx: interpolatorCx(t), cy: interpolatorCy(t), size: interpolatorSize(t) }); } var interpolator = Object(__WEBPACK_IMPORTED_MODULE_15__util_DataUtils__["f" /* interpolateNumber */])(0, entry.size); return _objectSpread({}, entry, { size: interpolator(t) }); }); return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__container_Layer__["a" /* default */], null, _this3.renderSymbolsStatically(stepData)); }); } }, { key: "renderSymbols", value: function renderSymbols() { var _this$props4 = this.props, points = _this$props4.points, isAnimationActive = _this$props4.isAnimationActive; var prevPoints = this.state.prevPoints; if (isAnimationActive && points && points.length && (!prevPoints || !__WEBPACK_IMPORTED_MODULE_0_lodash_isEqual___default()(prevPoints, points))) { return this.renderSymbolsWithAnimation(); } return this.renderSymbolsStatically(points); } }, { key: "renderErrorBar", value: function renderErrorBar() { var isAnimationActive = this.props.isAnimationActive; if (isAnimationActive && !this.state.isAnimationFinished) { return null; } var _this$props5 = this.props, points = _this$props5.points, xAxis = _this$props5.xAxis, yAxis = _this$props5.yAxis, children = _this$props5.children; var errorBarItems = Object(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["i" /* findAllByType */])(children, __WEBPACK_IMPORTED_MODULE_13__ErrorBar__["a" /* default */]); if (!errorBarItems) { return null; } function dataPointFormatterY(dataPoint, dataKey) { return { x: dataPoint.cx, y: dataPoint.cy, value: dataPoint.node.y, errorVal: Object(__WEBPACK_IMPORTED_MODULE_16__util_ChartUtils__["v" /* getValueByDataKey */])(dataPoint, dataKey) }; } function dataPointFormatterX(dataPoint, dataKey) { return { x: dataPoint.cx, y: dataPoint.cy, value: dataPoint.node.x, errorVal: Object(__WEBPACK_IMPORTED_MODULE_16__util_ChartUtils__["v" /* getValueByDataKey */])(dataPoint, dataKey) }; } return errorBarItems.map(function (item, i) { var direction = item.props.direction; return __WEBPACK_IMPORTED_MODULE_3_react___default.a.cloneElement(item, { key: i, // eslint-disable-line react/no-array-index-key data: points, xAxis: xAxis, yAxis: yAxis, layout: direction === 'x' ? 'vertical' : 'horizontal', dataPointFormatter: direction === 'x' ? dataPointFormatterX : dataPointFormatterY }); }); } }, { key: "renderLine", value: function renderLine() { var _this$props6 = this.props, points = _this$props6.points, line = _this$props6.line, lineType = _this$props6.lineType, lineJointType = _this$props6.lineJointType; var scatterProps = Object(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["l" /* getPresentationAttributes */])(this.props); var customLineProps = Object(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["l" /* getPresentationAttributes */])(line); var linePoints, lineItem; if (lineType === 'joint') { linePoints = points.map(function (entry) { return { x: entry.cx, y: entry.cy }; }); } else if (lineType === 'fitting') { var _getLinearRegression = Object(__WEBPACK_IMPORTED_MODULE_15__util_DataUtils__["c" /* getLinearRegression */])(points), xmin = _getLinearRegression.xmin, xmax = _getLinearRegression.xmax, a = _getLinearRegression.a, b = _getLinearRegression.b; var linearExp = function linearExp(x) { return a * x + b; }; linePoints = [{ x: xmin, y: linearExp(xmin) }, { x: xmax, y: linearExp(xmax) }]; } var lineProps = _objectSpread({}, scatterProps, { fill: 'none', stroke: scatterProps && scatterProps.fill }, customLineProps, { points: linePoints }); if (__WEBPACK_IMPORTED_MODULE_3_react___default.a.isValidElement(line)) { lineItem = __WEBPACK_IMPORTED_MODULE_3_react___default.a.cloneElement(line, lineProps); } else if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(line)) { lineItem = line(lineProps); } else { lineItem = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__shape_Curve__["a" /* default */], _extends({}, lineProps, { type: lineJointType })); } return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__container_Layer__["a" /* default */], { className: "recharts-scatter-line", key: "recharts-scatter-line" }, lineItem); } }, { key: "render", value: function render() { var _this$props7 = this.props, hide = _this$props7.hide, points = _this$props7.points, line = _this$props7.line, className = _this$props7.className, xAxis = _this$props7.xAxis, yAxis = _this$props7.yAxis, left = _this$props7.left, top = _this$props7.top, width = _this$props7.width, height = _this$props7.height, id = _this$props7.id; if (hide || !points || !points.length) { return null; } var _this$state = this.state, isAnimationActive = _this$state.isAnimationActive, isAnimationFinished = _this$state.isAnimationFinished; var layerClass = __WEBPACK_IMPORTED_MODULE_6_classnames___default()('recharts-scatter', className); var needClip = xAxis && xAxis.allowDataOverflow || yAxis && yAxis.allowDataOverflow; var clipPathId = __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(id) ? this.id : id; return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__container_Layer__["a" /* default */], { className: layerClass, clipPath: needClip ? "url(#clipPath-".concat(clipPathId, ")") : null }, needClip ? __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("defs", null, __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("clipPath", { id: "clipPath-".concat(clipPathId) }, __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("rect", { x: left, y: top, width: width, height: height }))) : null, line && this.renderLine(), this.renderErrorBar(), __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__container_Layer__["a" /* default */], { key: "recharts-scatter-symbols" }, this.renderSymbols()), (!isAnimationActive || isAnimationFinished) && __WEBPACK_IMPORTED_MODULE_8__component_LabelList__["a" /* default */].renderCallByParent(this.props, points)); } }], [{ key: "renderSymbolItem", value: function renderSymbolItem(option, props) { var symbol; if (__WEBPACK_IMPORTED_MODULE_3_react___default.a.isValidElement(option)) { symbol = __WEBPACK_IMPORTED_MODULE_3_react___default.a.cloneElement(option, props); } else if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(option)) { symbol = option(props); } else { symbol = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__shape_Symbols__["a" /* default */], _extends({}, props, { type: option })); } return symbol; } }]); return Scatter; }(__WEBPACK_IMPORTED_MODULE_3_react__["PureComponent"]); Scatter.displayName = 'Scatter'; Scatter.propTypes = _objectSpread({}, __WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["a" /* EVENT_ATTRIBUTES */], {}, __WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["c" /* PRESENTATION_ATTRIBUTES */], { xAxisId: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number]), yAxisId: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number]), zAxisId: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number]), line: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.element]), lineType: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['fitting', 'joint']), lineJointType: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['basis', 'basisClosed', 'basisOpen', 'linear', 'linearClosed', 'natural', 'monotoneX', 'monotoneY', 'monotone', 'step', 'stepBefore', 'stepAfter']), __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func]), legendType: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["b" /* LEGEND_TYPES */]), tooltipType: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["e" /* TOOLTIP_TYPES */]), className: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, name: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number]), activeIndex: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, activeShape: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.element]), shape: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']), __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.element, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func]), points: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ cx: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, cy: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, size: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, node: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ x: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string]), y: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string]), z: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string]) }), payload: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any })), hide: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, isAnimationActive: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, animationId: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, animationBegin: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, animationDuration: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, animationEasing: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear']) }); Scatter.defaultProps = { xAxisId: 0, yAxisId: 0, zAxisId: 0, legendType: 'circle', lineType: 'joint', lineJointType: 'linear', data: [], shape: 'circle', hide: false, isAnimationActive: !Object(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["o" /* isSsr */])(), animationBegin: 0, animationDuration: 400, animationEasing: 'linear' }; Scatter.getComposedData = function (_ref2) { var xAxis = _ref2.xAxis, yAxis = _ref2.yAxis, zAxis = _ref2.zAxis, item = _ref2.item, displayedData = _ref2.displayedData, onItemMouseLeave = _ref2.onItemMouseLeave, onItemMouseEnter = _ref2.onItemMouseEnter, offset = _ref2.offset, xAxisTicks = _ref2.xAxisTicks, yAxisTicks = _ref2.yAxisTicks; var tooltipType = item.props.tooltipType; var cells = Object(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__["i" /* findAllByType */])(item.props.children, __WEBPACK_IMPORTED_MODULE_14__component_Cell__["a" /* default */]); var xAxisDataKey = __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(xAxis.dataKey) ? item.props.dataKey : xAxis.dataKey; var yAxisDataKey = __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(yAxis.dataKey) ? item.props.dataKey : yAxis.dataKey; var zAxisDataKey = zAxis && zAxis.dataKey; var defaultRangeZ = zAxis ? zAxis.range : __WEBPACK_IMPORTED_MODULE_10__ZAxis__["a" /* default */].defaultProps.range; var defaultZ = defaultRangeZ && defaultRangeZ[0]; var xBandSize = xAxis.scale.bandwidth ? xAxis.scale.bandwidth() : 0; var yBandSize = yAxis.scale.bandwidth ? yAxis.scale.bandwidth() : 0; var points = displayedData.map(function (entry, index) { var x = entry[xAxisDataKey]; var y = entry[yAxisDataKey]; var z = !__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(zAxisDataKey) && entry[zAxisDataKey] || '-'; var tooltipPayload = [{ name: xAxis.name || xAxis.dataKey, unit: xAxis.unit || '', value: x, payload: entry, dataKey: xAxisDataKey, type: tooltipType }, { name: yAxis.name || yAxis.dataKey, unit: yAxis.unit || '', value: y, payload: entry, dataKey: yAxisDataKey, type: tooltipType }]; if (z !== '-') { tooltipPayload.push({ name: zAxis.name || zAxis.dataKey, unit: zAxis.unit || '', value: z, payload: entry, dataKey: zAxisDataKey, type: tooltipType }); } var cx = Object(__WEBPACK_IMPORTED_MODULE_16__util_ChartUtils__["k" /* getCateCoordinateOfLine */])({ axis: xAxis, ticks: xAxisTicks, bandSize: xBandSize, entry: entry, index: index, dataKey: xAxisDataKey }); var cy = Object(__WEBPACK_IMPORTED_MODULE_16__util_ChartUtils__["k" /* getCateCoordinateOfLine */])({ axis: yAxis, ticks: yAxisTicks, bandSize: yBandSize, entry: entry, index: index, dataKey: yAxisDataKey }); var size = z !== '-' ? zAxis.scale(z) : defaultZ; var radius = Math.sqrt(Math.max(size, 0) / Math.PI); return _objectSpread({}, entry, { cx: cx, cy: cy, x: cx - radius, y: cy - radius, xAxis: xAxis, yAxis: yAxis, zAxis: zAxis, width: 2 * radius, height: 2 * radius, size: size, node: { x: x, y: y, z: z }, tooltipPayload: tooltipPayload, tooltipPosition: { x: cx, y: cy }, payload: entry }, cells && cells[index] && cells[index].props); }); return _objectSpread({ onMouseLeave: onItemMouseLeave, onMouseEnter: onItemMouseEnter, points: points }, offset); }; /* harmony default export */ __webpack_exports__["a"] = (Scatter); /***/ }), /* 859 */ /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(1414); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /* 860 */ /***/ (function(module, exports, __webpack_require__) { // toObject with fallback for non-array-like ES3 strings var IndexedObject = __webpack_require__(530); var requireObjectCoercible = __webpack_require__(316); module.exports = function (it) { return IndexedObject(requireObjectCoercible(it)); }; /***/ }), /* 861 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /* 862 */ /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(254); var IE8_DOM_DEFINE = __webpack_require__(1507); var anObject = __webpack_require__(391); var toPrimitive = __webpack_require__(1506); var nativeDefineProperty = Object.defineProperty; // `Object.defineProperty` method // https://tc39.github.io/ecma262/#sec-object.defineproperty exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return nativeDefineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /* 863 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(107); var createNonEnumerableProperty = __webpack_require__(317); module.exports = function (key, value) { try { createNonEnumerableProperty(global, key, value); } catch (error) { global[key] = value; } return value; }; /***/ }), /* 864 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(107); var shared = __webpack_require__(1511); var has = __webpack_require__(255); var uid = __webpack_require__(1512); var NATIVE_SYMBOL = __webpack_require__(1520); var USE_SYMBOL_AS_UID = __webpack_require__(3748); var WellKnownSymbolsStore = shared('wks'); var Symbol = global.Symbol; var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid; module.exports = function (name) { if (!has(WellKnownSymbolsStore, name)) { if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name]; else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); } return WellKnownSymbolsStore[name]; }; /***/ }), /* 865 */ /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(254); var fails = __webpack_require__(131); var has = __webpack_require__(255); var defineProperty = Object.defineProperty; var cache = {}; var thrower = function (it) { throw it; }; module.exports = function (METHOD_NAME, options) { if (has(cache, METHOD_NAME)) return cache[METHOD_NAME]; if (!options) options = {}; var method = [][METHOD_NAME]; var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false; var argument0 = has(options, 0) ? options[0] : thrower; var argument1 = has(options, 1) ? options[1] : undefined; return cache[METHOD_NAME] = !!method && !fails(function () { if (ACCESSORS && !DESCRIPTORS) return true; var O = { length: -1 }; if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower }); else O[1] = 1; method.call(O, argument0, argument1); }); }; /***/ }), /* 866 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var regexpFlags = __webpack_require__(3762); var stickyHelpers = __webpack_require__(3763); var nativeExec = RegExp.prototype.exec; // This always refers to the native implementation, because the // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, // which loads this file before patching the method. var nativeReplace = String.prototype.replace; var patchedExec = nativeExec; var UPDATES_LAST_INDEX_WRONG = (function () { var re1 = /a/; var re2 = /b*/g; nativeExec.call(re1, 'a'); nativeExec.call(re2, 'a'); return re1.lastIndex !== 0 || re2.lastIndex !== 0; })(); var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET; // nonparticipating capturing group, copied from es5-shim's String#split patch. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y; if (PATCH) { patchedExec = function exec(str) { var re = this; var lastIndex, reCopy, match, i; var sticky = UNSUPPORTED_Y && re.sticky; var flags = regexpFlags.call(re); var source = re.source; var charsAdded = 0; var strCopy = str; if (sticky) { flags = flags.replace('y', ''); if (flags.indexOf('g') === -1) { flags += 'g'; } strCopy = String(str).slice(re.lastIndex); // Support anchored sticky behavior. if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) { source = '(?: ' + source + ')'; strCopy = ' ' + strCopy; charsAdded++; } // ^(? + rx + ) is needed, in combination with some str slicing, to // simulate the 'y' flag. reCopy = new RegExp('^(?:' + source + ')', flags); } if (NPCG_INCLUDED) { reCopy = new RegExp('^' + source + '$(?!\\s)', flags); } if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; match = nativeExec.call(sticky ? reCopy : re, strCopy); if (sticky) { if (match) { match.input = match.input.slice(charsAdded); match[0] = match[0].slice(charsAdded); match.index = re.lastIndex; re.lastIndex += match[0].length; } else re.lastIndex = 0; } else if (UPDATES_LAST_INDEX_WRONG && match) { re.lastIndex = re.global ? match.index + match[0].length : lastIndex; } if (NPCG_INCLUDED && match && match.length > 1) { // Fix browsers whose `exec` methods don't consistently return `undefined` // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ nativeReplace.call(match[0], reCopy, function () { for (i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } return match; }; } module.exports = patchedExec; /***/ }), /* 867 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(56); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(198); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(197); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(26); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass__ = __webpack_require__(36); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(37); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_rc_util_es_Dom_addEventListener__ = __webpack_require__(533); var Handle = function (_React$Component) { __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits___default()(Handle, _React$Component); function Handle() { var _ref; var _temp, _this, _ret; __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, Handle); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = Handle.__proto__ || Object.getPrototypeOf(Handle)).call.apply(_ref, [this].concat(args))), _this), _this.state = { clickFocused: false }, _this.setHandleRef = function (node) { _this.handle = node; }, _this.handleMouseUp = function () { if (document.activeElement === _this.handle) { _this.setClickFocus(true); } }, _this.handleBlur = function () { _this.setClickFocus(false); }, _this.handleKeyDown = function () { _this.setClickFocus(false); }, _temp), __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret); } __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass___default()(Handle, [{ key: 'componentDidMount', value: function componentDidMount() { // mouseup won't trigger if mouse moved out of handle, // so we listen on document here. this.onMouseUpListener = Object(__WEBPACK_IMPORTED_MODULE_10_rc_util_es_Dom_addEventListener__["a" /* default */])(document, 'mouseup', this.handleMouseUp); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { if (this.onMouseUpListener) { this.onMouseUpListener.remove(); } } }, { key: 'setClickFocus', value: function setClickFocus(focused) { this.setState({ clickFocused: focused }); } }, { key: 'clickFocus', value: function clickFocus() { this.setClickFocus(true); this.focus(); } }, { key: 'focus', value: function focus() { this.handle.focus(); } }, { key: 'blur', value: function blur() { this.handle.blur(); } }, { key: 'render', value: function render() { var _props = this.props, prefixCls = _props.prefixCls, vertical = _props.vertical, offset = _props.offset, style = _props.style, disabled = _props.disabled, min = _props.min, max = _props.max, value = _props.value, tabIndex = _props.tabIndex, restProps = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['prefixCls', 'vertical', 'offset', 'style', 'disabled', 'min', 'max', 'value', 'tabIndex']); var className = __WEBPACK_IMPORTED_MODULE_9_classnames___default()(this.props.className, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()({}, prefixCls + '-handle-click-focused', this.state.clickFocused)); var postionStyle = vertical ? { bottom: offset + '%' } : { left: offset + '%' }; var elStyle = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, style, postionStyle); return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement('div', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ ref: this.setHandleRef, tabIndex: disabled ? null : tabIndex || 0 }, restProps, { className: className, style: elStyle, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown // aria attribute , role: 'slider', 'aria-valuemin': min, 'aria-valuemax': max, 'aria-valuenow': value, 'aria-disabled': !!disabled })); } }]); return Handle; }(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component); /* harmony default export */ __webpack_exports__["a"] = (Handle); Handle.propTypes = { prefixCls: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string, className: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string, vertical: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, offset: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, style: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object, disabled: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, min: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, max: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, value: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number, tabIndex: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number }; /***/ }), /* 868 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["g"] = isEventFromHandle; /* harmony export (immutable) */ __webpack_exports__["i"] = isValueOutOfRange; /* harmony export (immutable) */ __webpack_exports__["h"] = isNotTouchEvent; /* unused harmony export getClosestPoint */ /* unused harmony export getPrecision */ /* harmony export (immutable) */ __webpack_exports__["e"] = getMousePosition; /* harmony export (immutable) */ __webpack_exports__["f"] = getTouchPosition; /* harmony export (immutable) */ __webpack_exports__["c"] = getHandleCenterPosition; /* harmony export (immutable) */ __webpack_exports__["a"] = ensureValueInRange; /* harmony export (immutable) */ __webpack_exports__["b"] = ensureValuePrecision; /* harmony export (immutable) */ __webpack_exports__["j"] = pauseEvent; /* harmony export (immutable) */ __webpack_exports__["d"] = getKeyboardValueMutator; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray__ = __webpack_require__(1530); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(18); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rc_util_es_KeyCode__ = __webpack_require__(3787); function isEventFromHandle(e, handles) { return Object.keys(handles).some(function (key) { return e.target === Object(__WEBPACK_IMPORTED_MODULE_1_react_dom__["findDOMNode"])(handles[key]); }); } function isValueOutOfRange(value, _ref) { var min = _ref.min, max = _ref.max; return value < min || value > max; } function isNotTouchEvent(e) { return e.touches.length > 1 || e.type.toLowerCase() === 'touchend' && e.touches.length > 0; } function getClosestPoint(val, _ref2) { var marks = _ref2.marks, step = _ref2.step, min = _ref2.min; var points = Object.keys(marks).map(parseFloat); if (step !== null) { var closestStep = Math.round((val - min) / step) * step + min; points.push(closestStep); } var diffs = points.map(function (point) { return Math.abs(val - point); }); return points[diffs.indexOf(Math.min.apply(Math, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(diffs)))]; } function getPrecision(step) { var stepString = step.toString(); var precision = 0; if (stepString.indexOf('.') >= 0) { precision = stepString.length - stepString.indexOf('.') - 1; } return precision; } function getMousePosition(vertical, e) { return vertical ? e.clientY : e.pageX; } function getTouchPosition(vertical, e) { return vertical ? e.touches[0].clientY : e.touches[0].pageX; } function getHandleCenterPosition(vertical, handle) { var coords = handle.getBoundingClientRect(); return vertical ? coords.top + coords.height * 0.5 : coords.left + coords.width * 0.5; } function ensureValueInRange(val, _ref3) { var max = _ref3.max, min = _ref3.min; if (val <= min) { return min; } if (val >= max) { return max; } return val; } function ensureValuePrecision(val, props) { var step = props.step; var closestPoint = getClosestPoint(val, props); return step === null ? closestPoint : parseFloat(closestPoint.toFixed(getPrecision(step))); } function pauseEvent(e) { e.stopPropagation(); e.preventDefault(); } function getKeyboardValueMutator(e) { switch (e.keyCode) { case __WEBPACK_IMPORTED_MODULE_2_rc_util_es_KeyCode__["a" /* default */].UP: case __WEBPACK_IMPORTED_MODULE_2_rc_util_es_KeyCode__["a" /* default */].RIGHT: return function (value, props) { return value + props.step; }; case __WEBPACK_IMPORTED_MODULE_2_rc_util_es_KeyCode__["a" /* default */].DOWN: case __WEBPACK_IMPORTED_MODULE_2_rc_util_es_KeyCode__["a" /* default */].LEFT: return function (value, props) { return value - props.step; }; case __WEBPACK_IMPORTED_MODULE_2_rc_util_es_KeyCode__["a" /* default */].END: return function (value, props) { return props.max; }; case __WEBPACK_IMPORTED_MODULE_2_rc_util_es_KeyCode__["a" /* default */].HOME: return function (value, props) { return props.min; }; case __WEBPACK_IMPORTED_MODULE_2_rc_util_es_KeyCode__["a" /* default */].PAGE_UP: return function (value, props) { return value + props.step * 2; }; case __WEBPACK_IMPORTED_MODULE_2_rc_util_es_KeyCode__["a" /* default */].PAGE_DOWN: return function (value, props) { return value - props.step * 2; }; default: return undefined; } } /***/ }), /* 869 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tc-table-filters-bar":"FiltersBar__tc-table-filters-bar___1Hd_7","tc-filter":"FiltersBar__tc-filter___NI7Kk"}; /***/ }), /* 870 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toJS = toJS; exports.resolveNameForTitleMap = resolveNameForTitleMap; exports["default"] = exports.TCompForm = exports.DEFAULT_STATE = void 0; var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(534)); var _reactCmf = _interopRequireWildcard(__webpack_require__(263)); var _reactForms = _interopRequireDefault(__webpack_require__(3859)); var _properties = __webpack_require__(96); var _omit = _interopRequireDefault(__webpack_require__(4222)); var _get = _interopRequireDefault(__webpack_require__(927)); var _immutable = __webpack_require__(81); var _memoizeOne = _interopRequireDefault(__webpack_require__(362)); var _kit = _interopRequireDefault(__webpack_require__(1674)); var _fields = _interopRequireDefault(__webpack_require__(4322)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } var TO_OMIT = ['definitionURL', 'uiSpecPath', 'submitURL', 'triggerULR', 'lang', 'customTriggers', 'dispatchOnChange'].concat(_toConsumableArray(_reactCmf.cmfConnect.INJECTED_PROPS)); var DEFAULT_STATE = new _immutable.Map({ dirty: false, initialState: new _immutable.Map() }); /** * Convert immutable object to js object */ exports.DEFAULT_STATE = DEFAULT_STATE; function toJS(immutableObject) { if (!immutableObject) { return null; } return immutableObject.toJS(); } /** * Insert titleMap name for corresponding value * Its key is prefixed by '$', this means that it's an internal property * @param schema The schema of the trigger input * @param properties All the form properties * @param value The input value */ function resolveNameForTitleMap(_ref) { var schema = _ref.schema, properties = _ref.properties, value = _ref.value; if (!schema.titleMap) { return; } // Here we add a field side by side with the value // to keep the title associated to the value var valueIsArray = Array.isArray(value); var uniformValue = valueIsArray ? value : [value]; var names = uniformValue.map(function (nextValue) { return schema.titleMap.find(function (titleMap) { return titleMap.value === nextValue; }); }).map(function (entry) { return entry && entry.name; }); var parentKey = schema.key.slice(); var key = parentKey.pop(); var nameKey = "$".concat(key, "_name"); var parentValue = (0, _properties.getValue)(properties, { key: parentKey }); if (names.some(function (name) { return name !== undefined; })) { parentValue[nameKey] = valueIsArray ? names : names[0]; } else { delete parentValue[nameKey]; } } var TCompForm = /*#__PURE__*/function (_React$Component) { _inherits(TCompForm, _React$Component); var _super = _createSuper(TCompForm); function TCompForm(props) { var _this; _classCallCheck(this, TCompForm); _this = _super.call(this, props); _this.state = {}; _this.onTrigger = _this.onTrigger.bind(_assertThisInitialized(_this)); _this.onChange = _this.onChange.bind(_assertThisInitialized(_this)); _this.onSubmit = _this.onSubmit.bind(_assertThisInitialized(_this)); _this.onReset = _this.onReset.bind(_assertThisInitialized(_this)); _this.getUISpec = _this.getUISpec.bind(_assertThisInitialized(_this)); _this.setupTrigger = _this.setupTrigger.bind(_assertThisInitialized(_this)); _this.setupTrigger(props); _this.getMemoizedJsonSchema = (0, _memoizeOne["default"])(toJS); _this.getMemoizedUiSchema = (0, _memoizeOne["default"])(toJS); _this.getMemoizedInitialState = (0, _memoizeOne["default"])(toJS); return _this; } _createClass(TCompForm, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { var nextProperties = nextProps.state.get('properties', (0, _immutable.Map)()); if (this.props.state.get('properties') !== nextProperties) { this.setState({ properties: nextProperties.toJS() }); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.triggerURL !== this.props.triggerURL || prevProps.customTriggers !== this.props.customTriggers) { this.setupTrigger(this.props); } if (this.props.definitionURL !== prevProps.definitionURL) { this.props.dispatch(_objectSpread(_objectSpread({ type: TCompForm.ON_DEFINITION_URL_CHANGED }, this.props), {}, { properties: this.state.properties })); } } }, { key: "onChange", value: function onChange(_, payload) { if (!this.props.state.get('dirty')) { this.props.setState({ dirty: true }); } resolveNameForTitleMap(payload); this.setState({ properties: payload.properties }); if (this.props.dispatchOnChange) { this.props.dispatch(_objectSpread({ type: TCompForm.ON_CHANGE, component: TCompForm.displayName, componentId: this.props.componentId }, payload)); } } }, { key: "onTrigger", value: function onTrigger(event, payload) { var _this2 = this; this.props.dispatch(_objectSpread({ type: TCompForm.ON_TRIGGER_BEGIN }, payload)); // Trigger definitions from tacokit can precise the fields that are impacted by the trigger. // Those fields are the jsonSchema path. // trigger = { options: [{ path: 'user.firstname' }, { path: 'user.lastname' }] } if (Array.isArray((0, _get["default"])(payload, 'trigger.options'))) { var updating = payload.trigger.options.map(function (op) { return op.path; }); this.setState({ updating: updating }); } return this.trigger(event, payload).then(function (data) { _this2.props.dispatch(_objectSpread({ type: TCompForm.ON_TRIGGER_END }, payload)); if (data.jsonSchema || data.uiSchema) { _this2.props.setState(data); } return data; })["finally"](function () { _this2.setState({ updating: [] }); }); } }, { key: "onSubmit", value: function onSubmit(_, properties) { this.props.dispatch({ type: TCompForm.ON_SUBMIT, component: TCompForm.displayName, componentId: this.props.componentId, properties: properties }); } }, { key: "onReset", value: function onReset() { var _this3 = this; this.props.setState(function (prev) { return prev.state.set('jsonSchema', _this3.props.state.getIn(['initialState', 'jsonSchema'])).set('uiSchema', _this3.props.state.getIn(['initialState', 'uiSchema'])).set('properties', _this3.props.state.getIn(['initialState', 'properties'])).set('dirty', false); }); this.setState({ properties: this.props.state.getIn(['initialState', 'properties']).toJS() }); } }, { key: "setupTrigger", value: function setupTrigger(props) { var config = _reactCmf["default"].sagas.http.getDefaultConfig() || {}; this.trigger = _kit["default"].createTriggers({ url: props.triggerURL, customRegistry: props.customTriggers, headers: config.headers, lang: props.lang, security: { CSRFTokenCookieKey: props.CSRFTokenCookieKey, CSRFTokenHeaderKey: props.CSRFTokenHeaderKey } }); } }, { key: "getUISpec", value: function getUISpec() { return { properties: this.state.properties, jsonSchema: this.getMemoizedJsonSchema(this.props.state.get('jsonSchema')), uiSchema: this.getMemoizedUiSchema(this.props.state.get('uiSchema')) }; } }, { key: "render", value: function render() { var uiSpecs = this.getUISpec(); if (!uiSpecs.jsonSchema) { var response = this.props.state.get('response'); if (response) { return /*#__PURE__*/_react["default"].createElement("p", { className: "danger" }, response.get('statusText')); } return /*#__PURE__*/_react["default"].createElement(_reactForms["default"], { loading: true, displayMode: this.props.displayMode }); } var props = _objectSpread(_objectSpread({}, (0, _omit["default"])(this.props, TO_OMIT)), {}, { data: uiSpecs, initialData: this.getMemoizedInitialState(this.props.state.get('initialState')), onTrigger: this.onTrigger, onChange: this.onChange, onSubmit: this.onSubmit, onReset: this.onReset, widgets: _objectSpread(_objectSpread({}, _fields["default"]), this.props.widgets), updating: this.state.updating }); return /*#__PURE__*/_react["default"].createElement(_reactForms["default"], props); } }]); return TCompForm; }(_react["default"].Component); exports.TCompForm = TCompForm; TCompForm.ON_CHANGE = 'TCOMP_FORM_CHANGE'; TCompForm.ON_SUBMIT = 'TCOMP_FORM_SUBMIT'; TCompForm.ON_SUBMIT_SUCCEED = 'TCOMP_FORM_SUBMIT_SUCCEED'; TCompForm.ON_SUBMIT_FAILED = 'TCOMP_FORM_SUBMIT_FAILED'; TCompForm.ON_TRIGGER_BEGIN = 'TCOMP_FORM_TRIGGER_BEGIN'; TCompForm.ON_TRIGGER_END = 'TCOMP_FORM_TRIGGER_END'; TCompForm.ON_DEFINITION_URL_CHANGED = 'TCOMP_FORM_DEFINITION_URL_CHANGE'; TCompForm.displayName = 'ComponentForm'; TCompForm.propTypes = _objectSpread(_objectSpread({}, _reactCmf.cmfConnect.propTypes), {}, { definitionURL: _propTypes["default"].string.isRequired, triggerURL: _propTypes["default"].string.isRequired, submitURL: _propTypes["default"].string, uiSpecPath: _propTypes["default"].string, lang: _propTypes["default"].string, customTriggers: _propTypes["default"].object, dispatchOnChange: _propTypes["default"].bool, CSRFTokenCookieKey: _propTypes["default"].string, CSRFTokenHeaderKey: _propTypes["default"].string }); var _default = (0, _reactCmf.cmfConnect)({ defaultState: DEFAULT_STATE, defaultProps: { saga: 'ComponentForm#default' }, omitCMFProps: true, withComponentRegistry: true, withDispatch: true, withDispatchActionCreator: true, withComponentId: true })(TCompForm); exports["default"] = _default; //# sourceMappingURL=ComponentForm.component.js.map /***/ }), /* 871 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 872 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 873 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _utils = __webpack_require__(66); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * This is a silly limitation in the DOM where option change event values are * always retrieved as strings. */ function processValue(_ref, value) { var type = _ref.type, items = _ref.items; if (value === "") { return undefined; } else if (type === "array" && items && ["number", "integer"].includes(items.type)) { return value.map(_utils.asNumber); } else if (type === "boolean") { return value === "true"; } else if (type === "number") { return (0, _utils.asNumber)(value); } return value; } function getValue(event, multiple) { if (multiple) { return [].slice.call(event.target.options).filter(function (o) { return o.selected; }).map(function (o) { return o.value; }); } else { return event.target.value; } } function SelectWidget(props) { var schema = props.schema, id = props.id, options = props.options, value = props.value, required = props.required, disabled = props.disabled, readonly = props.readonly, multiple = props.multiple, autofocus = props.autofocus, _onChange = props.onChange, onBlur = props.onBlur, onFocus = props.onFocus, placeholder = props.placeholder; var enumOptions = options.enumOptions; var emptyValue = multiple ? [] : ""; return _react2.default.createElement( "select", { id: id, multiple: multiple, className: "form-control", value: typeof value === "undefined" ? emptyValue : value, required: required, disabled: disabled || readonly, autoFocus: autofocus, onBlur: onBlur && function (event) { var newValue = getValue(event, multiple); onBlur(id, processValue(schema, newValue)); }, onFocus: onFocus && function (event) { var newValue = getValue(event, multiple); onFocus(id, processValue(schema, newValue)); }, onChange: function onChange(event) { var newValue = getValue(event, multiple); _onChange(processValue(schema, newValue)); } }, !multiple && !schema.default && _react2.default.createElement( "option", { value: "" }, placeholder ), enumOptions.map(function (_ref2, i) { var value = _ref2.value, label = _ref2.label; return _react2.default.createElement( "option", { key: i, value: value }, label ); }) ); } SelectWidget.defaultProps = { autofocus: false }; if (process.env.NODE_ENV !== "production") { SelectWidget.propTypes = { schema: _propTypes2.default.object.isRequired, id: _propTypes2.default.string.isRequired, options: _propTypes2.default.shape({ enumOptions: _propTypes2.default.array }).isRequired, value: _propTypes2.default.any, required: _propTypes2.default.bool, disabled: _propTypes2.default.bool, readonly: _propTypes2.default.bool, multiple: _propTypes2.default.bool, autofocus: _propTypes2.default.bool, onChange: _propTypes2.default.func, onBlur: _propTypes2.default.func, onFocus: _propTypes2.default.func }; } exports.default = SelectWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 874 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var invariant = function(condition, format, a, b, c, d, e, f) { if (process.env.NODE_ENV !== 'production') { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error( 'Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.' ); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error( format.replace(/%s/g, function() { return args[argIndex++]; }) ); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 875 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(318), isObjectLike = __webpack_require__(256); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /* 876 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(257), root = __webpack_require__(152); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /* 877 */ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(875); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /* 878 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); var propTypes = { label: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired, onClick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func }; var defaultProps = { label: 'Close' }; var CloseButton = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(CloseButton, _React$Component); function CloseButton() { return _React$Component.apply(this, arguments) || this; } var _proto = CloseButton.prototype; _proto.render = function render() { var _this$props = this.props, label = _this$props.label, onClick = _this$props.onClick; return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("button", { type: "button", className: "close", onClick: onClick }, __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span", { "aria-hidden": "true" }, "\xD7"), __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("span", { className: "sr-only" }, label)); }; return CloseButton; }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component); CloseButton.propTypes = propTypes; CloseButton.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (CloseButton); /***/ }), /* 879 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_all__ = __webpack_require__(159); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_all___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_all__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Button__ = __webpack_require__(395); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { vertical: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, justified: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Display block buttons; only useful when used with the "vertical" prop. * @type {bool} */ block: __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_all___default()(__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, function (_ref) { var block = _ref.block, vertical = _ref.vertical; return block && !vertical ? new Error('`block` requires `vertical` to be set to have any effect') : null; }) }; var defaultProps = { block: false, justified: false, vertical: false }; var ButtonGroup = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ButtonGroup, _React$Component); function ButtonGroup() { return _React$Component.apply(this, arguments) || this; } var _proto = ButtonGroup.prototype; _proto.render = function render() { var _extends2; var _this$props = this.props, block = _this$props.block, justified = _this$props.justified, vertical = _this$props.vertical, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["block", "justified", "vertical", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["getClassSet"])(bsProps), (_extends2 = {}, _extends2[Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(bsProps)] = !vertical, _extends2[Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(bsProps, 'vertical')] = vertical, _extends2[Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(bsProps, 'justified')] = justified, _extends2[Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(__WEBPACK_IMPORTED_MODULE_7__Button__["a" /* default */].defaultProps, 'block')] = block, _extends2)); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return ButtonGroup; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); ButtonGroup.propTypes = propTypes; ButtonGroup.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["bsClass"])('btn-group', ButtonGroup)); /***/ }), /* 880 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { /** * An icon name without "glyphicon-" prefix. See e.g. http://getbootstrap.com/components/#glyphicons */ glyph: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string.isRequired }; var Glyphicon = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Glyphicon, _React$Component); function Glyphicon() { return _React$Component.apply(this, arguments) || this; } var _proto = Glyphicon.prototype; _proto.render = function render() { var _extends2; var _this$props = this.props, glyph = _this$props.glyph, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["glyph", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps), (_extends2 = {}, _extends2[Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps, glyph)] = true, _extends2)); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return Glyphicon; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Glyphicon.propTypes = propTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('glyphicon', Glyphicon)); /***/ }), /* 881 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_parse_int__ = __webpack_require__(654); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_parse_int___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_parse_int__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_style__ = __webpack_require__(227); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_style___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_dom_helpers_style__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition__ = __webpack_require__(160); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_capitalize__ = __webpack_require__(1578); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__ = __webpack_require__(69); var _collapseStyles; var MARGINS = { height: ['marginTop', 'marginBottom'], width: ['marginLeft', 'marginRight'] }; // reading a dimension prop will cause the browser to recalculate, // which will let our animations work function triggerBrowserReflow(node) { node.offsetHeight; // eslint-disable-line no-unused-expressions } function getDimensionValue(dimension, elem) { var value = elem["offset" + Object(__WEBPACK_IMPORTED_MODULE_9__utils_capitalize__["a" /* default */])(dimension)]; var margins = MARGINS[dimension]; return value + __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_parse_int___default()(__WEBPACK_IMPORTED_MODULE_5_dom_helpers_style___default()(elem, margins[0]), 10) + __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_parse_int___default()(__WEBPACK_IMPORTED_MODULE_5_dom_helpers_style___default()(elem, margins[1]), 10); } var collapseStyles = (_collapseStyles = {}, _collapseStyles[__WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition__["EXITED"]] = 'collapse', _collapseStyles[__WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition__["EXITING"]] = 'collapsing', _collapseStyles[__WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition__["ENTERING"]] = 'collapsing', _collapseStyles[__WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition__["ENTERED"]] = 'collapse in', _collapseStyles); var propTypes = { /** * Show the component; triggers the expand or collapse animation */ in: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, /** * Wait until the first "enter" transition to mount the component (add it to the DOM) */ mountOnEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, /** * Unmount the component (remove it from the DOM) when it is collapsed */ unmountOnExit: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, /** * Run the expand animation when the component mounts, if it is initially * shown */ appear: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, /** * Duration of the collapse animation in milliseconds, to ensure that * finishing callbacks are fired even if the original browser transition end * events are canceled */ timeout: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, /** * Callback fired before the component expands */ onEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * Callback fired after the component starts to expand */ onEntering: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * Callback fired after the component has expanded */ onEntered: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * Callback fired before the component collapses */ onExit: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * Callback fired after the component starts to collapse */ onExiting: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * Callback fired after the component has collapsed */ onExited: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * The dimension used when collapsing, or a function that returns the * dimension * * _Note: Bootstrap only partially supports 'width'! * You will need to supply your own CSS animation for the `.width` CSS class._ */ dimension: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['height', 'width']), __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]), /** * Function that returns the height or width of the animating DOM node * * Allows for providing some custom logic for how much the Collapse component * should animate in its specified dimension. Called with the current * dimension prop value and the DOM node. */ getDimensionValue: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * ARIA role of collapsible element */ role: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string }; var defaultProps = { in: false, timeout: 300, mountOnEnter: false, unmountOnExit: false, appear: false, dimension: 'height', getDimensionValue: getDimensionValue }; var Collapse = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Collapse, _React$Component); function Collapse() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; _this.handleEnter = function (elem) { elem.style[_this.getDimension()] = '0'; }; _this.handleEntering = function (elem) { var dimension = _this.getDimension(); elem.style[dimension] = _this._getScrollDimensionValue(elem, dimension); }; _this.handleEntered = function (elem) { elem.style[_this.getDimension()] = null; }; _this.handleExit = function (elem) { var dimension = _this.getDimension(); elem.style[dimension] = _this.props.getDimensionValue(dimension, elem) + "px"; triggerBrowserReflow(elem); }; _this.handleExiting = function (elem) { elem.style[_this.getDimension()] = '0'; }; return _this; } var _proto = Collapse.prototype; _proto.getDimension = function getDimension() { return typeof this.props.dimension === 'function' ? this.props.dimension() : this.props.dimension; }; // for testing _proto._getScrollDimensionValue = function _getScrollDimensionValue(elem, dimension) { return elem["scroll" + Object(__WEBPACK_IMPORTED_MODULE_9__utils_capitalize__["a" /* default */])(dimension)] + "px"; }; /* -- Expanding -- */ _proto.render = function render() { var _this2 = this; var _this$props = this.props, onEnter = _this$props.onEnter, onEntering = _this$props.onEntering, onEntered = _this$props.onEntered, onExit = _this$props.onExit, onExiting = _this$props.onExiting, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["onEnter", "onEntering", "onEntered", "onExit", "onExiting", "className", "children"]); delete props.dimension; delete props.getDimensionValue; var handleEnter = Object(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__["a" /* default */])(this.handleEnter, onEnter); var handleEntering = Object(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__["a" /* default */])(this.handleEntering, onEntering); var handleEntered = Object(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__["a" /* default */])(this.handleEntered, onEntered); var handleExit = Object(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__["a" /* default */])(this.handleExit, onExit); var handleExiting = Object(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__["a" /* default */])(this.handleExiting, onExiting); return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_transition_group_Transition___default.a, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { "aria-expanded": props.role ? props.in : null, onEnter: handleEnter, onEntering: handleEntering, onEntered: handleEntered, onExit: handleExit, onExiting: handleExiting }), function (state, innerProps) { return __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(children, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, innerProps, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, children.props.className, collapseStyles[state], _this2.getDimension() === 'width' && 'width') })); }); }; return Collapse; }(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component); Collapse.propTypes = propTypes; Collapse.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Collapse); /***/ }), /* 882 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_uncontrollable__ = __webpack_require__(75); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_uncontrollable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_uncontrollable__); var TAB = 'tab'; var PANE = 'pane'; var idPropType = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number]); var propTypes = { /** * HTML id attribute, required if no `generateChildId` prop * is specified. */ id: function id(props) { var error = null; if (!props.generateChildId) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } error = idPropType.apply(void 0, [props].concat(args)); if (!error && !props.id) { error = new Error('In order to properly initialize Tabs in a way that is accessible ' + 'to assistive technologies (such as screen readers) an `id` or a ' + '`generateChildId` prop to TabContainer is required'); } } return error; }, /** * A function that takes an `eventKey` and `type` and returns a unique id for * child tab ``s and ``s. The function _must_ be a pure * function, meaning it should always return the _same_ id for the same set * of inputs. The default value requires that an `id` to be set for the * ``. * * The `type` argument will either be `"tab"` or `"pane"`. * * @defaultValue (eventKey, type) => `${this.props.id}-${type}-${key}` */ generateChildId: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, /** * A callback fired when a tab is selected. * * @controllable activeKey */ onSelect: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, /** * The `eventKey` of the currently active tab. * * @controllable onSelect */ activeKey: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.any }; var childContextTypes = { $bs_tabContainer: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({ activeKey: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.any, onSelect: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func.isRequired, getTabId: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func.isRequired, getPaneId: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func.isRequired }) }; var TabContainer = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(TabContainer, _React$Component); function TabContainer() { return _React$Component.apply(this, arguments) || this; } var _proto = TabContainer.prototype; _proto.getChildContext = function getChildContext() { var _this$props = this.props, activeKey = _this$props.activeKey, onSelect = _this$props.onSelect, generateChildId = _this$props.generateChildId, id = _this$props.id; var getId = generateChildId || function (key, type) { return id ? id + "-" + type + "-" + key : null; }; return { $bs_tabContainer: { activeKey: activeKey, onSelect: onSelect, getTabId: function getTabId(key) { return getId(key, TAB); }, getPaneId: function getPaneId(key) { return getId(key, PANE); } } }; }; _proto.render = function render() { var _this$props2 = this.props, children = _this$props2.children, props = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props2, ["children"]); delete props.generateChildId; delete props.onSelect; delete props.activeKey; return __WEBPACK_IMPORTED_MODULE_2_react___default.a.cloneElement(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children), props); }; return TabContainer; }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component); TabContainer.propTypes = propTypes; TabContainer.childContextTypes = childContextTypes; /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_4_uncontrollable___default()(TabContainer, { activeKey: 'onSelect' })); /***/ }), /* 883 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default.a, /** * Sets a default animation strategy for all children ``s. Use * `false` to disable, `true` to enable the default `` animation or * a react-transition-group v2 `` component. */ animation: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default.a]), /** * Wait until the first "enter" transition to mount tabs (add them to the DOM) */ mountOnEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * Unmount tabs (remove it from the DOM) when they are no longer visible */ unmountOnExit: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool }; var defaultProps = { componentClass: 'div', animation: true, mountOnEnter: false, unmountOnExit: false }; var contextTypes = { $bs_tabContainer: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({ activeKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any }) }; var childContextTypes = { $bs_tabContent: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({ bsClass: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, animation: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default.a]), activeKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any, mountOnEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, unmountOnExit: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, onPaneEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired, onPaneExited: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired, exiting: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool.isRequired }) }; var TabContent = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(TabContent, _React$Component); function TabContent(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; _this.handlePaneEnter = _this.handlePaneEnter.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handlePaneExited = _this.handlePaneExited.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); // Active entries in state will be `null` unless `animation` is set. Need // to track active child in case keys swap and the active child changes // but the active key does not. _this.state = { activeKey: null, activeChild: null }; return _this; } var _proto = TabContent.prototype; _proto.getChildContext = function getChildContext() { var _this$props = this.props, bsClass = _this$props.bsClass, animation = _this$props.animation, mountOnEnter = _this$props.mountOnEnter, unmountOnExit = _this$props.unmountOnExit; var stateActiveKey = this.state.activeKey; var containerActiveKey = this.getContainerActiveKey(); var activeKey = stateActiveKey != null ? stateActiveKey : containerActiveKey; var exiting = stateActiveKey != null && stateActiveKey !== containerActiveKey; return { $bs_tabContent: { bsClass: bsClass, animation: animation, activeKey: activeKey, mountOnEnter: mountOnEnter, unmountOnExit: unmountOnExit, onPaneEnter: this.handlePaneEnter, onPaneExited: this.handlePaneExited, exiting: exiting } }; }; _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (!nextProps.animation && this.state.activeChild) { this.setState({ activeKey: null, activeChild: null }); } }; _proto.componentWillUnmount = function componentWillUnmount() { this.isUnmounted = true; }; _proto.getContainerActiveKey = function getContainerActiveKey() { var tabContainer = this.context.$bs_tabContainer; return tabContainer && tabContainer.activeKey; }; _proto.handlePaneEnter = function handlePaneEnter(child, childKey) { if (!this.props.animation) { return false; } // It's possible that this child should be transitioning out. if (childKey !== this.getContainerActiveKey()) { return false; } this.setState({ activeKey: childKey, activeChild: child }); return true; }; _proto.handlePaneExited = function handlePaneExited(child) { // This might happen as everything is unmounting. if (this.isUnmounted) { return; } this.setState(function (_ref) { var activeChild = _ref.activeChild; if (activeChild !== child) { return null; } return { activeKey: null, activeChild: null }; }); }; _proto.render = function render() { var _this$props2 = this.props, Component = _this$props2.componentClass, className = _this$props2.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props2, ["componentClass", "className"]); var _splitBsPropsAndOmit = Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["splitBsPropsAndOmit"])(props, ['animation', 'mountOnEnter', 'unmountOnExit']), bsProps = _splitBsPropsAndOmit[0], elementProps = _splitBsPropsAndOmit[1]; return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(bsProps, 'content')) })); }; return TabContent; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); TabContent.propTypes = propTypes; TabContent.defaultProps = defaultProps; TabContent.contextTypes = contextTypes; TabContent.childContextTypes = childContextTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["bsClass"])('tab', TabContent)); /***/ }), /* 884 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var punycode = __webpack_require__(4012); var util = __webpack_require__(4013); exports.parse = urlParse; exports.resolve = urlResolve; exports.resolveObject = urlResolveObject; exports.format = urlFormat; exports.Url = Url; function Url() { this.protocol = null; this.slashes = null; this.auth = null; this.host = null; this.port = null; this.hostname = null; this.hash = null; this.search = null; this.query = null; this.pathname = null; this.path = null; this.href = null; } // Reference: RFC 3986, RFC 1808, RFC 2396 // define these here so at least they only have to be // compiled once on the first module load. var protocolPattern = /^([a-z0-9.+-]+:)/i, portPattern = /:[0-9]*$/, // Special case for a simple path URL simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, // RFC 2396: characters reserved for delimiting URLs. // We actually just auto-escape these. delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], // RFC 2396: characters not allowed for various reasons. unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), // Allowed by RFCs, but cause of XSS attacks. Always escape these. autoEscape = ['\''].concat(unwise), // Characters that are never ever allowed in a hostname. // Note that any invalid chars are also handled, but these // are the ones that are *expected* to be seen, so we fast-path // them. nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), hostEndingChars = ['/', '?', '#'], hostnameMaxLen = 255, hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, // protocols that can allow "unsafe" and "unwise" chars. unsafeProtocol = { 'javascript': true, 'javascript:': true }, // protocols that never have a hostname. hostlessProtocol = { 'javascript': true, 'javascript:': true }, // protocols that always contain a // bit. slashedProtocol = { 'http': true, 'https': true, 'ftp': true, 'gopher': true, 'file': true, 'http:': true, 'https:': true, 'ftp:': true, 'gopher:': true, 'file:': true }, querystring = __webpack_require__(4014); function urlParse(url, parseQueryString, slashesDenoteHost) { if (url && util.isObject(url) && url instanceof Url) return url; var u = new Url; u.parse(url, parseQueryString, slashesDenoteHost); return u; } Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { if (!util.isString(url)) { throw new TypeError("Parameter 'url' must be a string, not " + typeof url); } // Copy chrome, IE, opera backslash-handling behavior. // Back slashes before the query string get converted to forward slashes // See: https://code.google.com/p/chromium/issues/detail?id=25916 var queryIndex = url.indexOf('?'), splitter = (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', uSplit = url.split(splitter), slashRegex = /\\/g; uSplit[0] = uSplit[0].replace(slashRegex, '/'); url = uSplit.join(splitter); var rest = url; // trim before proceeding. // This is to support parse stuff like " http://foo.com \n" rest = rest.trim(); if (!slashesDenoteHost && url.split('#').length === 1) { // Try fast path regexp var simplePath = simplePathPattern.exec(rest); if (simplePath) { this.path = rest; this.href = rest; this.pathname = simplePath[1]; if (simplePath[2]) { this.search = simplePath[2]; if (parseQueryString) { this.query = querystring.parse(this.search.substr(1)); } else { this.query = this.search.substr(1); } } else if (parseQueryString) { this.search = ''; this.query = {}; } return this; } } var proto = protocolPattern.exec(rest); if (proto) { proto = proto[0]; var lowerProto = proto.toLowerCase(); this.protocol = lowerProto; rest = rest.substr(proto.length); } // figure out if it's got a host // user@server is *always* interpreted as a hostname, and url // resolution will treat //foo/bar as host=foo,path=bar because that's // how the browser resolves relative URLs. if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { var slashes = rest.substr(0, 2) === '//'; if (slashes && !(proto && hostlessProtocol[proto])) { rest = rest.substr(2); this.slashes = true; } } if (!hostlessProtocol[proto] && (slashes || (proto && !slashedProtocol[proto]))) { // there's a hostname. // the first instance of /, ?, ;, or # ends the host. // // If there is an @ in the hostname, then non-host chars *are* allowed // to the left of the last @ sign, unless some host-ending character // comes *before* the @-sign. // URLs are obnoxious. // // ex: // http://a@b@c/ => user:a@b host:c // http://a@b?@c => user:a host:c path:/?@c // v0.12 TODO(isaacs): This is not quite how Chrome does things. // Review our test case against browsers more comprehensively. // find the first instance of any hostEndingChars var hostEnd = -1; for (var i = 0; i < hostEndingChars.length; i++) { var hec = rest.indexOf(hostEndingChars[i]); if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec; } // at this point, either we have an explicit point where the // auth portion cannot go past, or the last @ char is the decider. var auth, atSign; if (hostEnd === -1) { // atSign can be anywhere. atSign = rest.lastIndexOf('@'); } else { // atSign must be in auth portion. // http://a@b/c@d => host:b auth:a path:/c@d atSign = rest.lastIndexOf('@', hostEnd); } // Now we have a portion which is definitely the auth. // Pull that off. if (atSign !== -1) { auth = rest.slice(0, atSign); rest = rest.slice(atSign + 1); this.auth = decodeURIComponent(auth); } // the host is the remaining to the left of the first non-host char hostEnd = -1; for (var i = 0; i < nonHostChars.length; i++) { var hec = rest.indexOf(nonHostChars[i]); if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec; } // if we still have not hit it, then the entire thing is a host. if (hostEnd === -1) hostEnd = rest.length; this.host = rest.slice(0, hostEnd); rest = rest.slice(hostEnd); // pull out port. this.parseHost(); // we've indicated that there is a hostname, // so even if it's empty, it has to be present. this.hostname = this.hostname || ''; // if hostname begins with [ and ends with ] // assume that it's an IPv6 address. var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']'; // validate a little. if (!ipv6Hostname) { var hostparts = this.hostname.split(/\./); for (var i = 0, l = hostparts.length; i < l; i++) { var part = hostparts[i]; if (!part) continue; if (!part.match(hostnamePartPattern)) { var newpart = ''; for (var j = 0, k = part.length; j < k; j++) { if (part.charCodeAt(j) > 127) { // we replace non-ASCII char with a temporary placeholder // we need this to make sure size of hostname is not // broken by replacing non-ASCII by nothing newpart += 'x'; } else { newpart += part[j]; } } // we test again with ASCII char only if (!newpart.match(hostnamePartPattern)) { var validParts = hostparts.slice(0, i); var notHost = hostparts.slice(i + 1); var bit = part.match(hostnamePartStart); if (bit) { validParts.push(bit[1]); notHost.unshift(bit[2]); } if (notHost.length) { rest = '/' + notHost.join('.') + rest; } this.hostname = validParts.join('.'); break; } } } } if (this.hostname.length > hostnameMaxLen) { this.hostname = ''; } else { // hostnames are always lower case. this.hostname = this.hostname.toLowerCase(); } if (!ipv6Hostname) { // IDNA Support: Returns a punycoded representation of "domain". // It only converts parts of the domain name that // have non-ASCII characters, i.e. it doesn't matter if // you call it with a domain that already is ASCII-only. this.hostname = punycode.toASCII(this.hostname); } var p = this.port ? ':' + this.port : ''; var h = this.hostname || ''; this.host = h + p; this.href += this.host; // strip [ and ] from the hostname // the host field still retains them, though if (ipv6Hostname) { this.hostname = this.hostname.substr(1, this.hostname.length - 2); if (rest[0] !== '/') { rest = '/' + rest; } } } // now rest is set to the post-host stuff. // chop off any delim chars. if (!unsafeProtocol[lowerProto]) { // First, make 100% sure that any "autoEscape" chars get // escaped, even if encodeURIComponent doesn't think they // need to be. for (var i = 0, l = autoEscape.length; i < l; i++) { var ae = autoEscape[i]; if (rest.indexOf(ae) === -1) continue; var esc = encodeURIComponent(ae); if (esc === ae) { esc = escape(ae); } rest = rest.split(ae).join(esc); } } // chop off from the tail first. var hash = rest.indexOf('#'); if (hash !== -1) { // got a fragment string. this.hash = rest.substr(hash); rest = rest.slice(0, hash); } var qm = rest.indexOf('?'); if (qm !== -1) { this.search = rest.substr(qm); this.query = rest.substr(qm + 1); if (parseQueryString) { this.query = querystring.parse(this.query); } rest = rest.slice(0, qm); } else if (parseQueryString) { // no query string, but parseQueryString still requested this.search = ''; this.query = {}; } if (rest) this.pathname = rest; if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { this.pathname = '/'; } //to support http.request if (this.pathname || this.search) { var p = this.pathname || ''; var s = this.search || ''; this.path = p + s; } // finally, reconstruct the href based on what has been validated. this.href = this.format(); return this; }; // format a parsed object into a url string function urlFormat(obj) { // ensure it's an object, and not a string url. // If it's an obj, this is a no-op. // this way, you can call url_format() on strings // to clean up potentially wonky urls. if (util.isString(obj)) obj = urlParse(obj); if (!(obj instanceof Url)) return Url.prototype.format.call(obj); return obj.format(); } Url.prototype.format = function() { var auth = this.auth || ''; if (auth) { auth = encodeURIComponent(auth); auth = auth.replace(/%3A/i, ':'); auth += '@'; } var protocol = this.protocol || '', pathname = this.pathname || '', hash = this.hash || '', host = false, query = ''; if (this.host) { host = auth + this.host; } else if (this.hostname) { host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']'); if (this.port) { host += ':' + this.port; } } if (this.query && util.isObject(this.query) && Object.keys(this.query).length) { query = querystring.stringify(this.query); } var search = this.search || (query && ('?' + query)) || ''; if (protocol && protocol.substr(-1) !== ':') protocol += ':'; // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. // unless they had them to begin with. if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) { host = '//' + (host || ''); if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; } else if (!host) { host = ''; } if (hash && hash.charAt(0) !== '#') hash = '#' + hash; if (search && search.charAt(0) !== '?') search = '?' + search; pathname = pathname.replace(/[?#]/g, function(match) { return encodeURIComponent(match); }); search = search.replace('#', '%23'); return protocol + host + pathname + search + hash; }; function urlResolve(source, relative) { return urlParse(source, false, true).resolve(relative); } Url.prototype.resolve = function(relative) { return this.resolveObject(urlParse(relative, false, true)).format(); }; function urlResolveObject(source, relative) { if (!source) return relative; return urlParse(source, false, true).resolveObject(relative); } Url.prototype.resolveObject = function(relative) { if (util.isString(relative)) { var rel = new Url(); rel.parse(relative, false, true); relative = rel; } var result = new Url(); var tkeys = Object.keys(this); for (var tk = 0; tk < tkeys.length; tk++) { var tkey = tkeys[tk]; result[tkey] = this[tkey]; } // hash is always overridden, no matter what. // even href="" will remove it. result.hash = relative.hash; // if the relative url is empty, then there's nothing left to do here. if (relative.href === '') { result.href = result.format(); return result; } // hrefs like //foo/bar always cut to the protocol. if (relative.slashes && !relative.protocol) { // take everything except the protocol from relative var rkeys = Object.keys(relative); for (var rk = 0; rk < rkeys.length; rk++) { var rkey = rkeys[rk]; if (rkey !== 'protocol') result[rkey] = relative[rkey]; } //urlParse appends trailing / to urls like http://www.example.com if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) { result.path = result.pathname = '/'; } result.href = result.format(); return result; } if (relative.protocol && relative.protocol !== result.protocol) { // if it's a known url protocol, then changing // the protocol does weird things // first, if it's not file:, then we MUST have a host, // and if there was a path // to begin with, then we MUST have a path. // if it is file:, then the host is dropped, // because that's known to be hostless. // anything else is assumed to be absolute. if (!slashedProtocol[relative.protocol]) { var keys = Object.keys(relative); for (var v = 0; v < keys.length; v++) { var k = keys[v]; result[k] = relative[k]; } result.href = result.format(); return result; } result.protocol = relative.protocol; if (!relative.host && !hostlessProtocol[relative.protocol]) { var relPath = (relative.pathname || '').split('/'); while (relPath.length && !(relative.host = relPath.shift())); if (!relative.host) relative.host = ''; if (!relative.hostname) relative.hostname = ''; if (relPath[0] !== '') relPath.unshift(''); if (relPath.length < 2) relPath.unshift(''); result.pathname = relPath.join('/'); } else { result.pathname = relative.pathname; } result.search = relative.search; result.query = relative.query; result.host = relative.host || ''; result.auth = relative.auth; result.hostname = relative.hostname || relative.host; result.port = relative.port; // to support http.request if (result.pathname || result.search) { var p = result.pathname || ''; var s = result.search || ''; result.path = p + s; } result.slashes = result.slashes || relative.slashes; result.href = result.format(); return result; } var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), isRelAbs = ( relative.host || relative.pathname && relative.pathname.charAt(0) === '/' ), mustEndAbs = (isRelAbs || isSourceAbs || (result.host && relative.pathname)), removeAllDots = mustEndAbs, srcPath = result.pathname && result.pathname.split('/') || [], relPath = relative.pathname && relative.pathname.split('/') || [], psychotic = result.protocol && !slashedProtocol[result.protocol]; // if the url is a non-slashed url, then relative // links like ../.. should be able // to crawl up to the hostname, as well. This is strange. // result.protocol has already been set by now. // Later on, put the first path part into the host field. if (psychotic) { result.hostname = ''; result.port = null; if (result.host) { if (srcPath[0] === '') srcPath[0] = result.host; else srcPath.unshift(result.host); } result.host = ''; if (relative.protocol) { relative.hostname = null; relative.port = null; if (relative.host) { if (relPath[0] === '') relPath[0] = relative.host; else relPath.unshift(relative.host); } relative.host = null; } mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); } if (isRelAbs) { // it's absolute. result.host = (relative.host || relative.host === '') ? relative.host : result.host; result.hostname = (relative.hostname || relative.hostname === '') ? relative.hostname : result.hostname; result.search = relative.search; result.query = relative.query; srcPath = relPath; // fall through to the dot-handling below. } else if (relPath.length) { // it's relative // throw away the existing file, and take the new path instead. if (!srcPath) srcPath = []; srcPath.pop(); srcPath = srcPath.concat(relPath); result.search = relative.search; result.query = relative.query; } else if (!util.isNullOrUndefined(relative.search)) { // just pull out the search. // like href='?foo'. // Put this after the other two cases because it simplifies the booleans if (psychotic) { result.hostname = result.host = srcPath.shift(); //occationaly the auth can get stuck only in host //this especially happens in cases like //url.resolveObject('mailto:local1@domain1', 'local2@domain2') var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; if (authInHost) { result.auth = authInHost.shift(); result.host = result.hostname = authInHost.shift(); } } result.search = relative.search; result.query = relative.query; //to support http.request if (!util.isNull(result.pathname) || !util.isNull(result.search)) { result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : ''); } result.href = result.format(); return result; } if (!srcPath.length) { // no path at all. easy. // we've already handled the other stuff above. result.pathname = null; //to support http.request if (result.search) { result.path = '/' + result.search; } else { result.path = null; } result.href = result.format(); return result; } // if a url ENDs in . or .., then it must get a trailing slash. // however, if it ends in anything else non-slashy, // then it must NOT get a trailing slash. var last = srcPath.slice(-1)[0]; var hasTrailingSlash = ( (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === ''); // strip single dots, resolve double dots to parent dir // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = srcPath.length; i >= 0; i--) { last = srcPath[i]; if (last === '.') { srcPath.splice(i, 1); } else if (last === '..') { srcPath.splice(i, 1); up++; } else if (up) { srcPath.splice(i, 1); up--; } } // if the path is allowed to go above the root, restore leading ..s if (!mustEndAbs && !removeAllDots) { for (; up--; up) { srcPath.unshift('..'); } } if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { srcPath.unshift(''); } if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { srcPath.push(''); } var isAbsolute = srcPath[0] === '' || (srcPath[0] && srcPath[0].charAt(0) === '/'); // put the host back if (psychotic) { result.hostname = result.host = isAbsolute ? '' : srcPath.length ? srcPath.shift() : ''; //occationaly the auth can get stuck only in host //this especially happens in cases like //url.resolveObject('mailto:local1@domain1', 'local2@domain2') var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; if (authInHost) { result.auth = authInHost.shift(); result.host = result.hostname = authInHost.shift(); } } mustEndAbs = mustEndAbs || (result.host && srcPath.length); if (mustEndAbs && !isAbsolute) { srcPath.unshift(''); } if (!srcPath.length) { result.pathname = null; result.path = null; } else { result.pathname = srcPath.join('/'); } //to support request.http if (!util.isNull(result.pathname) || !util.isNull(result.search)) { result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : ''); } result.auth = relative.auth || result.auth; result.slashes = result.slashes || relative.slashes; result.href = result.format(); return result; }; Url.prototype.parseHost = function() { var host = this.host; var port = portPattern.exec(host); if (port) { port = port[0]; if (port !== ':') { this.port = port.substr(1); } host = host.substr(0, host.length - port.length); } if (host) this.hostname = host; }; /***/ }), /* 885 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var urilib = __webpack_require__(884); var helpers = __webpack_require__(319); module.exports.SchemaScanResult = SchemaScanResult; function SchemaScanResult(found, ref){ this.id = found; this.ref = ref; } /** * Adds a schema with a certain urn to the Validator instance. * @param string uri * @param object schema * @return {Object} */ module.exports.scan = function scan(base, schema){ function scanSchema(baseuri, schema){ if(!schema || typeof schema!='object') return; // Mark all referenced schemas so we can tell later which schemas are referred to, but never defined if(schema.$ref){ var resolvedUri = urilib.resolve(baseuri, schema.$ref); ref[resolvedUri] = ref[resolvedUri] ? ref[resolvedUri]+1 : 0; return; } var ourBase = schema.id ? urilib.resolve(baseuri, schema.id) : baseuri; if (ourBase) { // If there's no fragment, append an empty one if(ourBase.indexOf('#')<0) ourBase += '#'; if(found[ourBase]){ if(!helpers.deepCompareStrict(found[ourBase], schema)){ throw new Error('Schema <'+ourBase+'> already exists with different definition'); } return found[ourBase]; } found[ourBase] = schema; // strip trailing fragment if(ourBase[ourBase.length-1]=='#'){ found[ourBase.substring(0, ourBase.length-1)] = schema; } } scanArray(ourBase+'/items', (Array.isArray(schema.items)?schema.items:[schema.items])); scanArray(ourBase+'/extends', (Array.isArray(schema.extends)?schema.extends:[schema.extends])); scanSchema(ourBase+'/additionalItems', schema.additionalItems); scanObject(ourBase+'/properties', schema.properties); scanSchema(ourBase+'/additionalProperties', schema.additionalProperties); scanObject(ourBase+'/definitions', schema.definitions); scanObject(ourBase+'/patternProperties', schema.patternProperties); scanObject(ourBase+'/dependencies', schema.dependencies); scanArray(ourBase+'/disallow', schema.disallow); scanArray(ourBase+'/allOf', schema.allOf); scanArray(ourBase+'/anyOf', schema.anyOf); scanArray(ourBase+'/oneOf', schema.oneOf); scanSchema(ourBase+'/not', schema.not); } function scanArray(baseuri, schemas){ if(!Array.isArray(schemas)) return; for(var i=0; i arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function arrayStartsWith(prefix, arrayToCheck) { return prefix.every(function (next, index) { return arrayToCheck[index] === next; }); } /** * Insert array element index in all nested schema key * * Example with array key ['my', 'array'] : * { * key: ['my', 'array', ''], * widget: 'fieldset', * items: [ * { * key: ['my', 'item', ''], * widget: 'CustomFieldset', * items: [ * { key: ['my', 'array', '', path] }, * { key: ['my', 'array', '', name] }, * { key: ['other'] }, * ] * } * ], * } * * Result * { * key: ['my', 'array', index], // inject index in current element key * widget: 'fieldset', * items: [ * { * key: ['my', 'array', index], // inject index in nster element child * widget: 'CustomFieldset', * items: [ * { key: ['my', 'array', index, path] }, // inject index in nested element child * { key: ['my', 'array', index, name] }, * { key: ['other'] }, // don't touch any element with a different key than the array * ] * } * ], * }, */ function adaptArrayItemKey(arraySchema, item, itemIndex) { var arrayKey = arraySchema.key; var itemKey = item.key; var itemChildren = item.items; var childSchemaItems = (0, _get["default"])(arraySchema, 'schema.items', undefined); var childTitleMap = (0, _get["default"])(arraySchema, 'titleMap', undefined); if (itemKey && !arrayStartsWith(arrayKey, itemKey)) { return item; } var schema = _objectSpread({}, item); if (childSchemaItems && !schema.schema) { schema.schema = childSchemaItems; } if (childTitleMap && !schema.titleMap) { schema.titleMap = childTitleMap; } if (itemKey) { var indexedKey = _toConsumableArray(itemKey); indexedKey[arrayKey.length] = itemIndex; schema.key = indexedKey; } if (arraySchema.readOnly) { schema.readOnly = true; } if (arraySchema.disabled) { schema.disabled = true; } if (itemChildren) { schema.items = itemChildren.map(function (child) { return adaptArrayItemKey(arraySchema, child, itemIndex); }); } return schema; } /** * Adapt array element items with the element index * Example: * Array schema * { * items: [ * { key: ['my', 'array', '', name], widget: 'text' }, * { key: ['my', 'array', '', path], widget: 'text' }, * ] * } * * Result * [ * { key: ['my', 'array', index, 'name'], widget: 'text' }, // insert nested index * { key: ['my', 'array', index, 'path'], widget: 'text' }, // insert nested index * ], * * @param arraySchema * @param elementIndex */ function getArrayElementItems(arraySchema, elementIndex) { return arraySchema.items.map(function (item) { return adaptArrayItemKey(arraySchema, item, elementIndex); }); } /** * Build schema for an array element, based on array schema * Example: * Array schema * { * key: ['my', 'array'], * items: [ * { key: ['my', 'array', '', name], widget: 'text' }, * { key: ['my', 'array', '', path], widget: 'text' }, * ] * } * Result * { * key: ['my', 'array', index], // insert index * items: [ * { key: ['my', 'array', index, 'name'], widget: 'text' }, // insert nested index * { key: ['my', 'array', index, 'path'], widget: 'text' }, // insert nested index * ], * widget: 'fieldset', // insert item widget * } * * @param arraySchema The array schema * @param elementIndex The index of the element in the array */ function getArrayElementSchema(arraySchema, elementIndex) { return { key: arraySchema.key.concat(elementIndex), items: getArrayElementItems(arraySchema, elementIndex), widget: arraySchema.itemWidget || 'fieldset', title: arraySchema.itemTitle }; } //# sourceMappingURL=array.js.map /***/ }), /* 889 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(1609), baseKeys = __webpack_require__(1612), isArrayLike = __webpack_require__(894); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /* 890 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(152), stubFalse = __webpack_require__(4042); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(64)(module))) /***/ }), /* 891 */ /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /* 892 */ /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /* 893 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(1562); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(64)(module))) /***/ }), /* 894 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(1564), isLength = __webpack_require__(891); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /* 895 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(1609), baseKeysIn = __webpack_require__(4046), isArrayLike = __webpack_require__(894); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; /***/ }), /* 896 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(4051), stubArray = __webpack_require__(1614); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /* 897 */ /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /* 898 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(1613); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /* 899 */ /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(4060); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /* 900 */ /***/ (function(module, exports) { /** * Gets the last element of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to query. * @returns {*} Returns the last element of `array`. * @example * * _.last([1, 2, 3]); * // => 3 */ function last(array) { var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } module.exports = last; /***/ }), /* 901 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extractFormProps = extractFormProps; exports.formPropTypes = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var formPropTypes = { /** Form element configuration: auto complete */ autoComplete: _propTypes["default"].string, /** Form element configuration: charsets */ acceptCharset: _propTypes["default"].string, /** * Form element configuration: submit action. * This will be prevented if you provide an onSubmit props */ action: _propTypes["default"].string, /** * Form custom classname */ className: _propTypes["default"].string, /** Form definition: encoding type */ encType: _propTypes["default"].string, /** Form definition: form id */ id: _propTypes["default"].string, /** * Form element configuration: submit method. * This will be prevented if you provide an onSubmit props */ method: _propTypes["default"].string, /** Form definition: reset callback */ onReset: _propTypes["default"].func, /** Form definition: submit callback. This will prevent default submit behavior */ onSubmit: _propTypes["default"].func, /** Form definition: prevent html 5 validations */ noHtml5Validate: _propTypes["default"].bool, /** * Form element configuration: submit target. * This will be prevented if you provide an onSubmit props */ target: _propTypes["default"].string }; exports.formPropTypes = formPropTypes; function extractFormProps(props) { var formProps = {}; Object.keys(formPropTypes).forEach(function (key) { formProps[key] = props[key]; }); return formProps; } //# sourceMappingURL=propTypes.js.map /***/ }), /* 902 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.canonicalTitleMap = exports.schemaDefaults = exports.sfPath = exports.validate = exports.traverseForm = exports.traverseSchema = exports.jsonref = exports.select = exports.merge = undefined; var _merge = __webpack_require__(4087); Object.defineProperty(exports, 'merge', { enumerable: true, get: function get() { return _merge.merge; } }); var _select = __webpack_require__(4090); Object.defineProperty(exports, 'select', { enumerable: true, get: function get() { return _select.select; } }); var _resolve = __webpack_require__(4091); Object.defineProperty(exports, 'jsonref', { enumerable: true, get: function get() { return _resolve.jsonref; } }); var _traverse = __webpack_require__(4093); Object.defineProperty(exports, 'traverseSchema', { enumerable: true, get: function get() { return _traverse.traverseSchema; } }); Object.defineProperty(exports, 'traverseForm', { enumerable: true, get: function get() { return _traverse.traverseForm; } }); var _validate = __webpack_require__(4094); Object.defineProperty(exports, 'validate', { enumerable: true, get: function get() { return _validate.validate; } }); var _schemaDefaults = __webpack_require__(1619); var schemaDefaultsImp = _interopRequireWildcard(_schemaDefaults); var _sfPath = __webpack_require__(552); var sfPathImp = _interopRequireWildcard(_sfPath); var _canonicalTitleMap = __webpack_require__(903); var _canonicalTitleMap2 = _interopRequireDefault(_canonicalTitleMap); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } var sfPath = exports.sfPath = sfPathImp; var schemaDefaults = exports.schemaDefaults = schemaDefaultsImp; var canonicalTitleMap = exports.canonicalTitleMap = _canonicalTitleMap2.default; /***/ }), /* 903 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (titleMap, originalEnum) { if (!Array.isArray(titleMap)) { var canonical = []; if (originalEnum) { originalEnum.forEach(function (value) { canonical.push({ name: titleMap[value], value: value }); }); } else { Object.keys(titleMap).forEach(function (value) { canonical.push({ name: titleMap[value], value: value }); }); } return canonical; } return titleMap; }; /***/ }), /* 904 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _jsonLogicJs = _interopRequireDefault(__webpack_require__(4095)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function lowercase(a) { return a.toLowerCase(); } function toNumber(a) { if (typeof a === 'number') { return a; } else if (typeof a === 'string') { return parseInt(a, 10); } throw new TypeError("".concat(a.toString(), " is not a number")); } _jsonLogicJs["default"].add_operation('lowercase', lowercase); _jsonLogicJs["default"].add_operation('toNumber', toNumber); /** * If in the path [] appears it will be populated * with current key indices value. */ function replaceArrayNotationByIndexes(path, key) { if (!path || !path.includes('[]')) { return path; } return path.split(/\.|\[/).map(function (part, index) { if (part === ']') { return key[index]; } return part; }).join('.'); } /** * For all "var" condition, populate generic indices ([]) from key indices. */ function resolveConditionVar(item, key) { if (!item || _typeof(item) !== 'object') { return item; } else if (item["var"]) { if (item["var"].includes('[]')) { return _objectSpread(_objectSpread({}, item), {}, { "var": replaceArrayNotationByIndexes(item["var"], key) }); } return item; } else if (Array.isArray(item)) { return item.map(function (it) { return resolveArrayNotation(it, key); }); } return resolveArrayNotation(item, key); } /** * Ensure generic indices ([]) are populated from the key. * It is a recursive implementation to support any kind of condition. */ function resolveArrayNotation(condition, key) { if (_typeof(condition) !== 'object') { return condition; } var acc = {}; Object.keys(condition).forEach(function (attribute) { var value = condition[attribute]; if (Array.isArray(value)) { acc[attribute] = value.map(function (it) { return resolveConditionVar(it, key); }); } else { acc[attribute] = resolveConditionVar(value, key); } return acc; }); return acc; } /** * * @example { * '===': [{ var: 'my.path.title' }, 'Hello world'], * } * * @param properties source of the value provider to evaluate conditions. * @param condition array of conditions to evaluate. * @param key the widget schema key. * @returns true if the conditions are met, false otherwise. */ function shouldRender(condition, properties, key) { if (condition === undefined) { return true; } var runtimeCondition = resolveArrayNotation(condition, key); return _jsonLogicJs["default"].apply(runtimeCondition, properties); } var _default = shouldRender; exports["default"] = _default; //# sourceMappingURL=condition.js.map /***/ }), /* 905 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Array = _interopRequireDefault(__webpack_require__(4101)); var _CollapsibleFieldset = _interopRequireDefault(__webpack_require__(4106)); var _Columns = _interopRequireDefault(__webpack_require__(4109)); var _Fieldset = _interopRequireWildcard(__webpack_require__(4112)); var _Tabs = _interopRequireDefault(__webpack_require__(4115)); var _Button = __webpack_require__(4118); var _CheckBox = __webpack_require__(4122); var _Code = _interopRequireWildcard(__webpack_require__(4127)); var _Datalist = _interopRequireWildcard(__webpack_require__(1629)); var _Date = __webpack_require__(4138); var _Enumeration = _interopRequireDefault(__webpack_require__(4142)); var _File = _interopRequireDefault(__webpack_require__(4146)); var _KeyValue = _interopRequireDefault(__webpack_require__(4150)); var _Comparator = _interopRequireWildcard(__webpack_require__(4153)); var _ListView = _interopRequireDefault(__webpack_require__(4158)); var _MultiSelectTag = _interopRequireWildcard(__webpack_require__(1634)); var _NestedListView = _interopRequireDefault(__webpack_require__(4165)); var _Radios = _interopRequireDefault(__webpack_require__(1635)); var _RadioOrSelect = _interopRequireDefault(__webpack_require__(4170)); var _ResourcePicker = _interopRequireDefault(__webpack_require__(4174)); var _Select = _interopRequireWildcard(__webpack_require__(1636)); var _Text = _interopRequireWildcard(__webpack_require__(1633)); var _TextArea = _interopRequireWildcard(__webpack_require__(1628)); var _Toggle = _interopRequireWildcard(__webpack_require__(4177)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var widgets = { // fieldsets array: _Array["default"], columns: _Columns["default"], collapsibleFieldset: (0, _CollapsibleFieldset["default"])(), fieldset: _Fieldset["default"], tabs: _Tabs["default"], // fields button: _Button.Button, checkbox: _CheckBox.CheckBox, file: _File["default"], number: _Text["default"], password: _Text["default"], radios: _Radios["default"], reset: _Button.Button, select: _Select["default"], submit: _Button.Button, text: _Text["default"], textarea: _TextArea["default"], // fieldsets: text mode fieldset_text: _Fieldset.FieldsetTextMode, // fields: text mode button_text: function button_text() { return null; }, buttons_text: function buttons_text() { return null; }, checkbox_text: _CheckBox.TextModeCheckBox, checkboxes_text: _Array["default"], code_text: _Code.CodeTextMode, comparator_text: _Comparator.TextModeComparator, datalist_text: _Datalist.DatalistTextMode, file_text: function file_text() { return null; }, multiSelectTag_text: _MultiSelectTag.MultiSelectTagTextMode, number_text: _Text.TextTextMode, password_text: _Text.TextTextMode, radios_text: _Text.TextTextMode, select_text: _Select.TextModeSelect, text_text: _Text.TextTextMode, textarea_text: _TextArea.TextAreaTextMode, toggle_text: _Toggle.ToggleTextMode, // widgets buttons: _Button.Buttons, checkboxes: _CheckBox.CheckBoxes, code: _Code["default"], datalist: _Datalist["default"], date: _Date.DateWidget, datetime: _Date.DateTimeWidget, enumeration: _Enumeration["default"], time: _Date.TimeWidget, keyValue: _KeyValue["default"], listView: _ListView["default"], multiSelectTag: _MultiSelectTag["default"], nestedListView: _NestedListView["default"], radioOrSelect: _RadioOrSelect["default"], resourcePicker: _ResourcePicker["default"], comparator: _Comparator["default"], toggle: _Toggle["default"] }; var _default = widgets; exports["default"] = _default; //# sourceMappingURL=widgets.js.map /***/ }), /* 906 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.isoDateTimeRegExp = void 0; var emailRegExp = /^[a-zA-Z][a-zA-Z0-9-.]+@[a-zA-Z-]+\.[a-zA-Z-]+$/; var urlHttpOrHttpsRegExp = /^(http(s)?:\/\/)([a-zA-Z0-9.\-_]+)(:[0-9]+)?(\/[a-zA-Z0-9/.\-_%]+)?$/; /* eslint-disable max-len */ // Format usable in regex101 : (?^http(s)?\:\/\/)(?[a-zA-Z0-9\.\-_]+\@)?(?[a-zA-Z0-9\.\-_]+)(?:[0-9]+)?(?\/[a-zA-Z0-9\/\.\-_%]+)(?\.git)?(?\/)?$ var urlGitProtocoltHttp = /(^http(s)?:\/\/)([a-zA-Z0-9.\-_]+@)?([a-zA-Z0-9.\-_]+)(:[0-9]+)?(\/[a-zA-Z0-9/.\-_%]+)(\.git)?(\/)?$/; // Format usable in regex101 : (?^ssh\:\/\/)(?[a-zA-Z0-9\.\-_]+\@)?(?[a-zA-Z0-9\.\-_]+)(?:[0-9]+)?(?\/[a-zA-Z0-9\/\.\-_~%]+)(?\.git)?(?\/)?$ var urlGitProtocolSsh = /(^ssh:\/\/)([a-zA-Z0-9.\-_]+@)?([a-zA-Z0-9.\-_]+)(:[0-9]+)?(\/[a-zA-Z0-9/.\-_~%]+)(\.git)?(\/)?$/; // Format usable in regex101 : (?^[a-zA-Z0-9\.\-_]+\@)(?[a-zA-Z0-9\.\-_]+)(:)(?[0-9]+)?(?[a-zA-Z0-9\.\-_~]+)(?\/[a-zA-Z0-9\/\.\-_~%]+)(?\.git)?(?\/)?$ var urlGitProtocolSshScpLike = /(^[a-zA-Z0-9.\-_]+@)([a-zA-Z0-9.\-_]+)(:)([0-9]+)?([a-zA-Z0-9.\-_~]+)(\/[a-zA-Z0-9/.\-_~%]+)(\.git)?(\/)?$/; // Format usable in regex101 : (?^git\:\/\/)(?[a-zA-Z0-9\.\-_]+)(?:[0-9]+)?(?\/[a-zA-Z0-9\/\.\-_~%]+)(?\.git)?(?\/)?$ var urlGitProtocolGit = /(^git:\/\/)([a-zA-Z0-9.\-_]+)(:[0-9]+)?(\/[a-zA-Z0-9/.\-_~%]+)(\.git)?(\/)?$/; /* eslint-disable max-len */ var _urlGit = new RegExp("".concat(urlGitProtocoltHttp.source, "|").concat(urlGitProtocolSsh.source, "|").concat(urlGitProtocolSshScpLike.source, "|").concat(urlGitProtocolGit.source)); // EcmaScript ISO 8601 Extended Format: https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15 // Only handle full string (date and time with full second fraction) and only UTC timezone var isoDateTimeRegExp = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/; exports.isoDateTimeRegExp = isoDateTimeRegExp; var leadingTralingSpaceRegExp = /^\s|\s$/; var stringWithoutSpaceRegExp = /^\S+$/; var MAX_TIMESTAMP = 8640000000000000; function isValidDate(rawString) { var date = new Date(rawString); return !isNaN(date.getTime()); } var customFormats = function customFormats(t) { return { email: function email(fieldData) { if (typeof fieldData === 'string' && !emailRegExp.test(fieldData)) { return t('FORMAT_EMAIL', { defaultValue: 'must be a valid email (e.g.: [email protected])' }); } return null; }, 'url-http-https': function urlHttpHttps(fieldData) { if (typeof fieldData === 'string' && !urlHttpOrHttpsRegExp.test(fieldData)) { return t('FORMAT_URL_HTTP_HTTPS', { defaultValue: 'must be a valid url (e.g.: http://my.domain.com or https://my.domain.com)' }); } return null; }, 'url-git': function urlGit(fieldData) { if (typeof fieldData === 'string' && !_urlGit.test(fieldData)) { return t('FORMAT_URL_GIT', { defaultValue: 'must be a valid HTTP URL (e.g.: http(s)://host[:port]/my-repo[.git]), SSH URL (e.g.: [ssh://][user@]host:[port/]my-repo[.git]) or GIT URL (e.g.: git://host[:port]/my-repo[.git])' }); } return null; }, 'no-leading-trailing-space': function noLeadingTrailingSpace(fieldData) { if (typeof fieldData === 'string' && leadingTralingSpaceRegExp.test(fieldData)) { return t('FORMAT_NO_LEADING_TRAILING_SPACE', { defaultValue: 'must be a string without leading or trailing space' }); } return null; }, 'string-without-space': function stringWithoutSpace(fieldData) { if (typeof fieldData === 'string' && !stringWithoutSpaceRegExp.test(fieldData)) { return t('FORMAT_STRING_WITHOUT_SPACE', { defaultValue: 'must be a string without space' }); } return null; }, timestamp: function timestamp(fieldData) { if (typeof fieldData === 'number' && Math.abs(fieldData) > MAX_TIMESTAMP) { return t('FORMAT_TIMESTAMP_OUT_OF_RANGE', { defaultValue: 'must be a valid timestamp' }); } return null; }, 'iso-datetime': function isoDatetime(fieldData) { if (typeof fieldData !== 'string') { return null; } var formatMatches = isoDateTimeRegExp.test(fieldData); if (formatMatches && isValidDate(fieldData)) { return null; } return t('FORMAT_ISO_DATETIME', { defaultValue: 'must be a valid ISO 8601 datetime (e.g.: 2018-01-01T00:00:00.000Z)' }); } }; }; var _default = customFormats; exports["default"] = _default; //# sourceMappingURL=customFormats.js.map /***/ }), /* 907 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var URI = __webpack_require__(4190) , equal = __webpack_require__(908) , util = __webpack_require__(320) , SchemaObject = __webpack_require__(1640) , traverse = __webpack_require__(4192); module.exports = resolve; resolve.normalizeId = normalizeId; resolve.fullPath = getFullPath; resolve.url = resolveUrl; resolve.ids = resolveIds; resolve.inlineRef = inlineRef; resolve.schema = resolveSchema; /** * [resolve and compile the references ($ref)] * @this Ajv * @param {Function} compile reference to schema compilation funciton (localCompile) * @param {Object} root object with information about the root schema for the current schema * @param {String} ref reference to resolve * @return {Object|Function} schema object (if the schema can be inlined) or validation function */ function resolve(compile, root, ref) { /* jshint validthis: true */ var refVal = this._refs[ref]; if (typeof refVal == 'string') { if (this._refs[refVal]) refVal = this._refs[refVal]; else return resolve.call(this, compile, root, refVal); } refVal = refVal || this._schemas[ref]; if (refVal instanceof SchemaObject) { return inlineRef(refVal.schema, this._opts.inlineRefs) ? refVal.schema : refVal.validate || this._compile(refVal); } var res = resolveSchema.call(this, root, ref); var schema, v, baseId; if (res) { schema = res.schema; root = res.root; baseId = res.baseId; } if (schema instanceof SchemaObject) { v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId); } else if (schema !== undefined) { v = inlineRef(schema, this._opts.inlineRefs) ? schema : compile.call(this, schema, root, undefined, baseId); } return v; } /** * Resolve schema, its root and baseId * @this Ajv * @param {Object} root root object with properties schema, refVal, refs * @param {String} ref reference to resolve * @return {Object} object with properties schema, root, baseId */ function resolveSchema(root, ref) { /* jshint validthis: true */ var p = URI.parse(ref) , refPath = _getFullPath(p) , baseId = getFullPath(this._getId(root.schema)); if (Object.keys(root.schema).length === 0 || refPath !== baseId) { var id = normalizeId(refPath); var refVal = this._refs[id]; if (typeof refVal == 'string') { return resolveRecursive.call(this, root, refVal, p); } else if (refVal instanceof SchemaObject) { if (!refVal.validate) this._compile(refVal); root = refVal; } else { refVal = this._schemas[id]; if (refVal instanceof SchemaObject) { if (!refVal.validate) this._compile(refVal); if (id == normalizeId(ref)) return { schema: refVal, root: root, baseId: baseId }; root = refVal; } else { return; } } if (!root.schema) return; baseId = getFullPath(this._getId(root.schema)); } return getJsonPointer.call(this, p, baseId, root.schema, root); } /* @this Ajv */ function resolveRecursive(root, ref, parsedRef) { /* jshint validthis: true */ var res = resolveSchema.call(this, root, ref); if (res) { var schema = res.schema; var baseId = res.baseId; root = res.root; var id = this._getId(schema); if (id) baseId = resolveUrl(baseId, id); return getJsonPointer.call(this, parsedRef, baseId, schema, root); } } var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']); /* @this Ajv */ function getJsonPointer(parsedRef, baseId, schema, root) { /* jshint validthis: true */ parsedRef.fragment = parsedRef.fragment || ''; if (parsedRef.fragment.slice(0,1) != '/') return; var parts = parsedRef.fragment.split('/'); for (var i = 1; i < parts.length; i++) { var part = parts[i]; if (part) { part = util.unescapeFragment(part); schema = schema[part]; if (schema === undefined) break; var id; if (!PREVENT_SCOPE_CHANGE[part]) { id = this._getId(schema); if (id) baseId = resolveUrl(baseId, id); if (schema.$ref) { var $ref = resolveUrl(baseId, schema.$ref); var res = resolveSchema.call(this, root, $ref); if (res) { schema = res.schema; root = res.root; baseId = res.baseId; } } } } } if (schema !== undefined && schema !== root.schema) return { schema: schema, root: root, baseId: baseId }; } var SIMPLE_INLINED = util.toHash([ 'type', 'format', 'pattern', 'maxLength', 'minLength', 'maxProperties', 'minProperties', 'maxItems', 'minItems', 'maximum', 'minimum', 'uniqueItems', 'multipleOf', 'required', 'enum' ]); function inlineRef(schema, limit) { if (limit === false) return false; if (limit === undefined || limit === true) return checkNoRef(schema); else if (limit) return countKeys(schema) <= limit; } function checkNoRef(schema) { var item; if (Array.isArray(schema)) { for (var i=0; i true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /* 913 */ /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__(4239), mapCacheDelete = __webpack_require__(4246), mapCacheGet = __webpack_require__(4248), mapCacheHas = __webpack_require__(4249), mapCacheSet = __webpack_require__(4250); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /* 914 */ /***/ (function(module, exports, __webpack_require__) { var defineProperty = __webpack_require__(1653); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /* 915 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(1654), baseKeys = __webpack_require__(4257), isArrayLike = __webpack_require__(558); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /* 916 */ /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(4254), isObjectLike = __webpack_require__(174); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /* 917 */ /***/ (function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__(4256), baseUnary = __webpack_require__(918), nodeUtil = __webpack_require__(919); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /* 918 */ /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /* 919 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(1650); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(64)(module))) /***/ }), /* 920 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /* 921 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(4263), stubArray = __webpack_require__(1660); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /* 922 */ /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /* 923 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(1657); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /* 924 */ /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(1665); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /* 925 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(175), isKey = __webpack_require__(4280), stringToPath = __webpack_require__(4281), toString = __webpack_require__(4284); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /* 926 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(321), isObjectLike = __webpack_require__(174); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /* 927 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(1668); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /* 928 */ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(53) && !__webpack_require__(33)(function () { return Object.defineProperty(__webpack_require__(560)('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 929 */ /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__(49); /***/ }), /* 930 */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(108); var toIObject = __webpack_require__(109); var arrayIndexOf = __webpack_require__(401)(false); var IE_PROTO = __webpack_require__(562)('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }), /* 931 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(62); var anObject = __webpack_require__(20); var getKeys = __webpack_require__(212); module.exports = __webpack_require__(53) ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; var i = 0; var P; while (length > i) dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }), /* 932 */ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(109); var gOPN = __webpack_require__(215).f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (it) { try { return gOPN(it); } catch (e) { return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it) { return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; /***/ }), /* 933 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 19.1.2.1 Object.assign(target, source, ...) var DESCRIPTORS = __webpack_require__(53); var getKeys = __webpack_require__(212); var gOPS = __webpack_require__(402); var pIE = __webpack_require__(326); var toObject = __webpack_require__(63); var IObject = __webpack_require__(325); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(33)(function () { var A = {}; var B = {}; // eslint-disable-next-line no-undef var S = Symbol(); var K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function (k) { B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars var T = toObject(target); var aLen = arguments.length; var index = 1; var getSymbols = gOPS.f; var isEnum = pIE.f; while (aLen > index) { var S = IObject(arguments[index++]); var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); var length = keys.length; var j = 0; var key; while (length > j) { key = keys[j++]; if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; } } return T; } : $assign; /***/ }), /* 934 */ /***/ (function(module, exports) { // 7.2.9 SameValue(x, y) module.exports = Object.is || function is(x, y) { // eslint-disable-next-line no-self-compare return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; /***/ }), /* 935 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var aFunction = __webpack_require__(80); var isObject = __webpack_require__(35); var invoke = __webpack_require__(936); var arraySlice = [].slice; var factories = {}; var construct = function (F, len, args) { if (!(len in factories)) { for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; // eslint-disable-next-line no-new-func factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); } return factories[len](F, args); }; module.exports = Function.bind || function bind(that /* , ...args */) { var fn = aFunction(this); var partArgs = arraySlice.call(arguments, 1); var bound = function (/* args... */) { var args = partArgs.concat(arraySlice.call(arguments)); return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); }; if (isObject(fn.prototype)) bound.prototype = fn.prototype; return bound; }; /***/ }), /* 936 */ /***/ (function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function (fn, args, that) { var un = that === undefined; switch (args.length) { case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); } return fn.apply(that, args); }; /***/ }), /* 937 */ /***/ (function(module, exports, __webpack_require__) { var $parseInt = __webpack_require__(28).parseInt; var $trim = __webpack_require__(261).trim; var ws = __webpack_require__(566); var hex = /^[-+]?0[xX]/; module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { var string = $trim(String(str), 3); return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); } : $parseInt; /***/ }), /* 938 */ /***/ (function(module, exports, __webpack_require__) { var $parseFloat = __webpack_require__(28).parseFloat; var $trim = __webpack_require__(261).trim; module.exports = 1 / $parseFloat(__webpack_require__(566) + '-0') !== -Infinity ? function parseFloat(str) { var string = $trim(String(str), 3); var result = $parseFloat(string); return result === 0 && string.charAt(0) == '-' ? -0 : result; } : $parseFloat; /***/ }), /* 939 */ /***/ (function(module, exports, __webpack_require__) { var cof = __webpack_require__(119); module.exports = function (it, msg) { if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); return +it; }; /***/ }), /* 940 */ /***/ (function(module, exports, __webpack_require__) { // 20.1.2.3 Number.isInteger(number) var isObject = __webpack_require__(35); var floor = Math.floor; module.exports = function isInteger(it) { return !isObject(it) && isFinite(it) && floor(it) === it; }; /***/ }), /* 941 */ /***/ (function(module, exports) { // 20.2.2.20 Math.log1p(x) module.exports = Math.log1p || function log1p(x) { return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); }; /***/ }), /* 942 */ /***/ (function(module, exports, __webpack_require__) { // 20.2.2.16 Math.fround(x) var sign = __webpack_require__(569); var pow = Math.pow; var EPSILON = pow(2, -52); var EPSILON32 = pow(2, -23); var MAX32 = pow(2, 127) * (2 - EPSILON32); var MIN32 = pow(2, -126); var roundTiesToEven = function (n) { return n + 1 / EPSILON - 1 / EPSILON; }; module.exports = Math.fround || function fround(x) { var $abs = Math.abs(x); var $sign = sign(x); var a, result; if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; a = (1 + EPSILON32 / EPSILON) * $abs; result = a - (a - $abs); // eslint-disable-next-line no-self-compare if (result > MAX32 || result != result) return $sign * Infinity; return $sign * result; }; /***/ }), /* 943 */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(20); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; /***/ }), /* 944 */ /***/ (function(module, exports, __webpack_require__) { var aFunction = __webpack_require__(80); var toObject = __webpack_require__(63); var IObject = __webpack_require__(325); var toLength = __webpack_require__(50); module.exports = function (that, callbackfn, aLen, memo, isRight) { aFunction(callbackfn); var O = toObject(that); var self = IObject(O); var length = toLength(O.length); var index = isRight ? length - 1 : 0; var i = isRight ? -1 : 1; if (aLen < 2) for (;;) { if (index in self) { memo = self[index]; index += i; break; } index += i; if (isRight ? index < 0 : length <= index) { throw TypeError('Reduce of empty array with no initial value'); } } for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { memo = callbackfn(memo, self[index], index, O); } return memo; }; /***/ }), /* 945 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) var toObject = __webpack_require__(63); var toAbsoluteIndex = __webpack_require__(213); var toLength = __webpack_require__(50); module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { var O = toObject(this); var len = toLength(O.length); var to = toAbsoluteIndex(target, len); var from = toAbsoluteIndex(start, len); var end = arguments.length > 2 ? arguments[2] : undefined; var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); var inc = 1; if (from < to && to < from + count) { inc = -1; from += count - 1; to += count - 1; } while (count-- > 0) { if (from in O) O[to] = O[from]; else delete O[to]; to += inc; from += inc; } return O; }; /***/ }), /* 946 */ /***/ (function(module, exports) { module.exports = function (done, value) { return { value: value, done: !!done }; }; /***/ }), /* 947 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var regexpExec = __webpack_require__(581); __webpack_require__(8)({ target: 'RegExp', proto: true, forced: regexpExec !== /./.exec }, { exec: regexpExec }); /***/ }), /* 948 */ /***/ (function(module, exports, __webpack_require__) { // 21.2.5.3 get RegExp.prototype.flags() if (__webpack_require__(53) && /./g.flags != 'g') __webpack_require__(62).f(RegExp.prototype, 'flags', { configurable: true, get: __webpack_require__(327) }); /***/ }), /* 949 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return { e: false, v: exec() }; } catch (e) { return { e: true, v: e }; } }; /***/ }), /* 950 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(20); var isObject = __webpack_require__(35); var newPromiseCapability = __webpack_require__(585); module.exports = function (C, x) { anObject(C); if (isObject(x) && x.constructor === C) return x; var promiseCapability = newPromiseCapability.f(C); var resolve = promiseCapability.resolve; resolve(x); return promiseCapability.promise; }; /***/ }), /* 951 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var strong = __webpack_require__(952); var validate = __webpack_require__(220); var MAP = 'Map'; // 23.1 Map Objects module.exports = __webpack_require__(410)(MAP, function (get) { return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.1.3.6 Map.prototype.get(key) get: function get(key) { var entry = strong.getEntry(validate(this, MAP), key); return entry && entry.v; }, // 23.1.3.9 Map.prototype.set(key, value) set: function set(key, value) { return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); } }, strong, true); /***/ }), /* 952 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var dP = __webpack_require__(62).f; var create = __webpack_require__(214); var redefineAll = __webpack_require__(219); var ctx = __webpack_require__(118); var anInstance = __webpack_require__(217); var forOf = __webpack_require__(218); var $iterDefine = __webpack_require__(571); var step = __webpack_require__(946); var setSpecies = __webpack_require__(216); var DESCRIPTORS = __webpack_require__(53); var fastKey = __webpack_require__(177).fastKey; var validate = __webpack_require__(220); var SIZE = DESCRIPTORS ? '_s' : 'size'; var getEntry = function (that, key) { // fast case var index = fastKey(key); var entry; if (index !== 'F') return that._i[index]; // frozen object case for (entry = that._f; entry; entry = entry.n) { if (entry.k == key) return entry; } }; module.exports = { getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { var C = wrapper(function (that, iterable) { anInstance(that, C, NAME, '_i'); that._t = NAME; // collection type that._i = create(null); // index that._f = undefined; // first entry that._l = undefined; // last entry that[SIZE] = 0; // size if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear() { for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { entry.r = true; if (entry.p) entry.p = entry.p.n = undefined; delete data[entry.i]; } that._f = that._l = undefined; that[SIZE] = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function (key) { var that = validate(this, NAME); var entry = getEntry(that, key); if (entry) { var next = entry.n; var prev = entry.p; delete that._i[entry.i]; entry.r = true; if (prev) prev.n = next; if (next) next.p = prev; if (that._f == entry) that._f = next; if (that._l == entry) that._l = prev; that[SIZE]--; } return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /* , that = undefined */) { validate(this, NAME); var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var entry; while (entry = entry ? entry.n : this._f) { f(entry.v, entry.k, this); // revert to the last existing entry while (entry && entry.r) entry = entry.p; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key) { return !!getEntry(validate(this, NAME), key); } }); if (DESCRIPTORS) dP(C.prototype, 'size', { get: function () { return validate(this, NAME)[SIZE]; } }); return C; }, def: function (that, key, value) { var entry = getEntry(that, key); var prev, index; // change existing entry if (entry) { entry.v = value; // create new entry } else { that._l = entry = { i: index = fastKey(key, true), // <- index k: key, // <- key v: value, // <- value p: prev = that._l, // <- previous entry n: undefined, // <- next entry r: false // <- removed }; if (!that._f) that._f = entry; if (prev) prev.n = entry; that[SIZE]++; // add to index if (index !== 'F') that._i[index] = entry; } return that; }, getEntry: getEntry, setStrong: function (C, NAME, IS_MAP) { // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 $iterDefine(C, NAME, function (iterated, kind) { this._t = validate(iterated, NAME); // target this._k = kind; // kind this._l = undefined; // previous }, function () { var that = this; var kind = that._k; var entry = that._l; // revert to the last existing entry while (entry && entry.r) entry = entry.p; // get next entry if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { // or finish the iteration that._t = undefined; return step(1); } // return step by kind if (kind == 'keys') return step(0, entry.k); if (kind == 'values') return step(0, entry.v); return step(0, [entry.k, entry.v]); }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2 setSpecies(NAME); } }; /***/ }), /* 953 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var strong = __webpack_require__(952); var validate = __webpack_require__(220); var SET = 'Set'; // 23.2 Set Objects module.exports = __webpack_require__(410)(SET, function (get) { return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.2.3.1 Set.prototype.add(value) add: function add(value) { return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); } }, strong); /***/ }), /* 954 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var global = __webpack_require__(28); var each = __webpack_require__(136)(0); var redefine = __webpack_require__(98); var meta = __webpack_require__(177); var assign = __webpack_require__(933); var weak = __webpack_require__(955); var isObject = __webpack_require__(35); var validate = __webpack_require__(220); var NATIVE_WEAK_MAP = __webpack_require__(220); var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; var WEAK_MAP = 'WeakMap'; var getWeak = meta.getWeak; var isExtensible = Object.isExtensible; var uncaughtFrozenStore = weak.ufstore; var InternalMap; var wrapper = function (get) { return function WeakMap() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }; var methods = { // 23.3.3.3 WeakMap.prototype.get(key) get: function get(key) { if (isObject(key)) { var data = getWeak(key); if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); return data ? data[this._i] : undefined; } }, // 23.3.3.5 WeakMap.prototype.set(key, value) set: function set(key, value) { return weak.def(validate(this, WEAK_MAP), key, value); } }; // 23.3 WeakMap Objects var $WeakMap = module.exports = __webpack_require__(410)(WEAK_MAP, wrapper, methods, weak, true, true); // IE11 WeakMap frozen keys fix if (NATIVE_WEAK_MAP && IS_IE11) { InternalMap = weak.getConstructor(wrapper, WEAK_MAP); assign(InternalMap.prototype, methods); meta.NEED = true; each(['delete', 'has', 'get', 'set'], function (key) { var proto = $WeakMap.prototype; var method = proto[key]; redefine(proto, key, function (a, b) { // store frozen objects on internal weakmap shim if (isObject(a) && !isExtensible(a)) { if (!this._f) this._f = new InternalMap(); var result = this._f[key](a, b); return key == 'set' ? this : result; // store all the rest on native weakmap } return method.call(this, a, b); }); }); } /***/ }), /* 955 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var redefineAll = __webpack_require__(219); var getWeak = __webpack_require__(177).getWeak; var anObject = __webpack_require__(20); var isObject = __webpack_require__(35); var anInstance = __webpack_require__(217); var forOf = __webpack_require__(218); var createArrayMethod = __webpack_require__(136); var $has = __webpack_require__(108); var validate = __webpack_require__(220); var arrayFind = createArrayMethod(5); var arrayFindIndex = createArrayMethod(6); var id = 0; // fallback for uncaught frozen keys var uncaughtFrozenStore = function (that) { return that._l || (that._l = new UncaughtFrozenStore()); }; var UncaughtFrozenStore = function () { this.a = []; }; var findUncaughtFrozen = function (store, key) { return arrayFind(store.a, function (it) { return it[0] === key; }); }; UncaughtFrozenStore.prototype = { get: function (key) { var entry = findUncaughtFrozen(this, key); if (entry) return entry[1]; }, has: function (key) { return !!findUncaughtFrozen(this, key); }, set: function (key, value) { var entry = findUncaughtFrozen(this, key); if (entry) entry[1] = value; else this.a.push([key, value]); }, 'delete': function (key) { var index = arrayFindIndex(this.a, function (it) { return it[0] === key; }); if (~index) this.a.splice(index, 1); return !!~index; } }; module.exports = { getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { var C = wrapper(function (that, iterable) { anInstance(that, C, NAME, '_i'); that._t = NAME; // collection type that._i = id++; // collection id that._l = undefined; // leak store for uncaught frozen objects if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.3.3.2 WeakMap.prototype.delete(key) // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function (key) { if (!isObject(key)) return false; var data = getWeak(key); if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); return data && $has(data, this._i) && delete data[this._i]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key) { if (!isObject(key)) return false; var data = getWeak(key); if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); return data && $has(data, this._i); } }); return C; }, def: function (that, key, value) { var data = getWeak(anObject(key), true); if (data === true) uncaughtFrozenStore(that).set(key, value); else data[that._i] = value; return that; }, ufstore: uncaughtFrozenStore }; /***/ }), /* 956 */ /***/ (function(module, exports, __webpack_require__) { // https://tc39.github.io/ecma262/#sec-toindex var toInteger = __webpack_require__(120); var toLength = __webpack_require__(50); module.exports = function (it) { if (it === undefined) return 0; var number = toInteger(it); var length = toLength(number); if (number !== length) throw RangeError('Wrong length!'); return length; }; /***/ }), /* 957 */ /***/ (function(module, exports, __webpack_require__) { // all object keys, includes non-enumerable and symbols var gOPN = __webpack_require__(215); var gOPS = __webpack_require__(402); var anObject = __webpack_require__(20); var Reflect = __webpack_require__(28).Reflect; module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { var keys = gOPN.f(anObject(it)); var getSymbols = gOPS.f; return getSymbols ? keys.concat(getSymbols(it)) : keys; }; /***/ }), /* 958 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray var isArray = __webpack_require__(403); var isObject = __webpack_require__(35); var toLength = __webpack_require__(50); var ctx = __webpack_require__(118); var IS_CONCAT_SPREADABLE = __webpack_require__(49)('isConcatSpreadable'); function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { var targetIndex = start; var sourceIndex = 0; var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; var element, spreadable; while (sourceIndex < sourceLen) { if (sourceIndex in source) { element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; spreadable = false; if (isObject(element)) { spreadable = element[IS_CONCAT_SPREADABLE]; spreadable = spreadable !== undefined ? !!spreadable : isArray(element); } if (spreadable && depth > 0) { targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; } else { if (targetIndex >= 0x1fffffffffffff) throw TypeError(); target[targetIndex] = element; } targetIndex++; } sourceIndex++; } return targetIndex; } module.exports = flattenIntoArray; /***/ }), /* 959 */ /***/ (function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-string-pad-start-end var toLength = __webpack_require__(50); var repeat = __webpack_require__(568); var defined = __webpack_require__(134); module.exports = function (that, maxLength, fillString, left) { var S = String(defined(that)); var stringLength = S.length; var fillStr = fillString === undefined ? ' ' : String(fillString); var intMaxLength = toLength(maxLength); if (intMaxLength <= stringLength || fillStr == '') return S; var fillLen = intMaxLength - stringLength; var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); return left ? stringFiller + S : S + stringFiller; }; /***/ }), /* 960 */ /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(53); var getKeys = __webpack_require__(212); var toIObject = __webpack_require__(109); var isEnum = __webpack_require__(326).f; module.exports = function (isEntries) { return function (it) { var O = toIObject(it); var keys = getKeys(O); var length = keys.length; var i = 0; var result = []; var key; while (length > i) { key = keys[i++]; if (!DESCRIPTORS || isEnum.call(O, key)) { result.push(isEntries ? [key, O[key]] : O[key]); } } return result; }; }; /***/ }), /* 961 */ /***/ (function(module, exports, __webpack_require__) { // https://github.com/DavidBruant/Map-Set.prototype.toJSON var classof = __webpack_require__(260); var from = __webpack_require__(962); module.exports = function (NAME) { return function toJSON() { if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); return from(this); }; }; /***/ }), /* 962 */ /***/ (function(module, exports, __webpack_require__) { var forOf = __webpack_require__(218); module.exports = function (iter, ITERATOR) { var result = []; forOf(iter, false, result.push, result, ITERATOR); return result; }; /***/ }), /* 963 */ /***/ (function(module, exports) { // https://rwaldron.github.io/proposal-math-extensions/ module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { if ( arguments.length === 0 // eslint-disable-next-line no-self-compare || x != x // eslint-disable-next-line no-self-compare || inLow != inLow // eslint-disable-next-line no-self-compare || inHigh != inHigh // eslint-disable-next-line no-self-compare || outLow != outLow // eslint-disable-next-line no-self-compare || outHigh != outHigh ) return NaN; if (x === Infinity || x === -Infinity) return x; return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; }; /***/ }), /* 964 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(330), metaMap = __webpack_require__(965); /** * The base implementation of `setData` without support for hot loop shorting. * * @private * @param {Function} func The function to associate metadata with. * @param {*} data The metadata. * @returns {Function} Returns `func`. */ var baseSetData = !metaMap ? identity : function(func, data) { metaMap.set(func, data); return func; }; module.exports = baseSetData; /***/ }), /* 965 */ /***/ (function(module, exports, __webpack_require__) { var WeakMap = __webpack_require__(966); /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; module.exports = metaMap; /***/ }), /* 966 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(222), root = __webpack_require__(86); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /* 967 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; module.exports = freeGlobal; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27))) /***/ }), /* 968 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }), /* 969 */ /***/ (function(module, exports, __webpack_require__) { var composeArgs = __webpack_require__(970), composeArgsRight = __webpack_require__(971), countHolders = __webpack_require__(1899), createCtor = __webpack_require__(415), createRecurry = __webpack_require__(972), getHolder = __webpack_require__(981), reorder = __webpack_require__(1913), replaceHolders = __webpack_require__(594), root = __webpack_require__(86); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_ARY_FLAG = 128, WRAP_FLIP_FLAG = 512; /** * Creates a function that wraps `func` to invoke it with optional `this` * binding of `thisArg`, partial application, and currying. * * @private * @param {Function|string} func The function or method name to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [partialsRight] The arguments to append to those provided * to the new function. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined : createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { args = composeArgs(args, partials, holders, isCurried); } if (partialsRight) { args = composeArgsRight(args, partialsRight, holdersRight, isCurried); } length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func; length = args.length; if (argPos) { args = reorder(args, argPos); } else if (isFlip && length > 1) { args.reverse(); } if (isAry && ary < length) { args.length = ary; } if (this && this !== root && this instanceof wrapper) { fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } return wrapper; } module.exports = createHybrid; /***/ }), /* 970 */ /***/ (function(module, exports) { /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Creates an array that is the composition of partially applied arguments, * placeholders, and provided arguments into a single array of arguments. * * @private * @param {Array} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. * @returns {Array} Returns the new array of composed arguments. */ function composeArgs(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(leftLength + rangeLength), isUncurried = !isCurried; while (++leftIndex < leftLength) { result[leftIndex] = partials[leftIndex]; } while (++argsIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[holders[argsIndex]] = args[argsIndex]; } } while (rangeLength--) { result[leftIndex++] = args[argsIndex++]; } return result; } module.exports = composeArgs; /***/ }), /* 971 */ /***/ (function(module, exports) { /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * This function is like `composeArgs` except that the arguments composition * is tailored for `_.partialRight`. * * @private * @param {Array} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. * @returns {Array} Returns the new array of composed arguments. */ function composeArgsRight(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(rangeLength + rightLength), isUncurried = !isCurried; while (++argsIndex < rangeLength) { result[argsIndex] = args[argsIndex]; } var offset = argsIndex; while (++rightIndex < rightLength) { result[offset + rightIndex] = partials[rightIndex]; } while (++holdersIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[offset + holders[holdersIndex]] = args[argsIndex++]; } } return result; } module.exports = composeArgsRight; /***/ }), /* 972 */ /***/ (function(module, exports, __webpack_require__) { var isLaziable = __webpack_require__(973), setData = __webpack_require__(975), setWrapToString = __webpack_require__(977); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64; /** * Creates a function that wraps `func` to continue currying. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder value. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, newPartialsRight = isCurry ? undefined : partials; bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); } var newData = [ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity ]; var result = wrapFunc.apply(undefined, newData); if (isLaziable(func)) { setData(result, newData); } result.placeholder = placeholder; return setWrapToString(result, func, bitmask); } module.exports = createRecurry; /***/ }), /* 973 */ /***/ (function(module, exports, __webpack_require__) { var LazyWrapper = __webpack_require__(589), getData = __webpack_require__(591), getFuncName = __webpack_require__(974), lodash = __webpack_require__(1902); /** * Checks if `func` has a lazy counterpart. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` has a lazy counterpart, * else `false`. */ function isLaziable(func) { var funcName = getFuncName(func), other = lodash[funcName]; if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { return false; } if (func === other) { return true; } var data = getData(other); return !!data && func === data[0]; } module.exports = isLaziable; /***/ }), /* 974 */ /***/ (function(module, exports, __webpack_require__) { var realNames = __webpack_require__(1901); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the name of `func`. * * @private * @param {Function} func The function to query. * @returns {string} Returns the function name. */ function getFuncName(func) { var result = (func.name + ''), array = realNames[result], length = hasOwnProperty.call(realNames, result) ? array.length : 0; while (length--) { var data = array[length], otherFunc = data.func; if (otherFunc == null || otherFunc == func) { return data.name; } } return result; } module.exports = getFuncName; /***/ }), /* 975 */ /***/ (function(module, exports, __webpack_require__) { var baseSetData = __webpack_require__(964), shortOut = __webpack_require__(976); /** * Sets metadata for `func`. * * **Note:** If this function becomes hot, i.e. is invoked a lot in a short * period of time, it will trip its breaker and transition to an identity * function to avoid garbage collection pauses in V8. See * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) * for more details. * * @private * @param {Function} func The function to associate metadata with. * @param {*} data The metadata. * @returns {Function} Returns `func`. */ var setData = shortOut(baseSetData); module.exports = setData; /***/ }), /* 976 */ /***/ (function(module, exports) { /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeNow = Date.now; /** * Creates a function that'll short out and invoke `identity` instead * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` * milliseconds. * * @private * @param {Function} func The function to restrict. * @returns {Function} Returns the new shortable function. */ function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined, arguments); }; } module.exports = shortOut; /***/ }), /* 977 */ /***/ (function(module, exports, __webpack_require__) { var getWrapDetails = __webpack_require__(1904), insertWrapDetails = __webpack_require__(1905), setToString = __webpack_require__(593), updateWrapDetails = __webpack_require__(1908); /** * Sets the `toString` method of `wrapper` to mimic the source of `reference` * with wrapper details in a comment at the top of the source body. * * @private * @param {Function} wrapper The function to modify. * @param {Function} reference The reference function. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Function} Returns `wrapper`. */ function setWrapToString(wrapper, reference, bitmask) { var source = (reference + ''); return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); } module.exports = setWrapToString; /***/ }), /* 978 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(222); var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineProperty; /***/ }), /* 979 */ /***/ (function(module, exports) { /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } module.exports = arrayEach; /***/ }), /* 980 */ /***/ (function(module, exports) { /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { return index; } } return -1; } module.exports = baseFindIndex; /***/ }), /* 981 */ /***/ (function(module, exports) { /** * Gets the argument placeholder value for `func`. * * @private * @param {Function} func The function to inspect. * @returns {*} Returns the placeholder value. */ function getHolder(func) { var object = func; return object.placeholder; } module.exports = getHolder; /***/ }), /* 982 */ /***/ (function(module, exports, __webpack_require__) { var toFinite = __webpack_require__(983); /** * Converts `value` to an integer. * * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted integer. * @example * * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); * // => 0 * * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { var result = toFinite(value), remainder = result % 1; return result === result ? (remainder ? result - remainder : result) : 0; } module.exports = toInteger; /***/ }), /* 983 */ /***/ (function(module, exports, __webpack_require__) { var toNumber = __webpack_require__(984); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_INTEGER = 1.7976931348623157e+308; /** * Converts `value` to a finite number. * * @static * @memberOf _ * @since 4.12.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted number. * @example * * _.toFinite(3.2); * // => 3.2 * * _.toFinite(Number.MIN_VALUE); * // => 5e-324 * * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * * _.toFinite('3.2'); * // => 3.2 */ function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber(value); if (value === INFINITY || value === -INFINITY) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } return value === value ? value : 0; } module.exports = toFinite; /***/ }), /* 984 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(112), isSymbol = __webpack_require__(418); /** Used as references for various `Number` constants. */ var NAN = 0 / 0; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = value.replace(reTrim, ''); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } module.exports = toNumber; /***/ }), /* 985 */ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(596); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }), /* 986 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(1948), isObjectLike = __webpack_require__(137); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }), /* 987 */ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(1949), arraySome = __webpack_require__(1952), cacheHas = __webpack_require__(1953); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Check that cyclic values are equal. var arrStacked = stack.get(array); var othStacked = stack.get(other); if (arrStacked && othStacked) { return arrStacked == other && othStacked == array; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } module.exports = equalArrays; /***/ }), /* 988 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(86); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /* 989 */ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(990), getSymbols = __webpack_require__(601), keys = __webpack_require__(333); /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } module.exports = getAllKeys; /***/ }), /* 990 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(600), isArray = __webpack_require__(100); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; /***/ }), /* 991 */ /***/ (function(module, exports) { /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } module.exports = stubArray; /***/ }), /* 992 */ /***/ (function(module, exports, __webpack_require__) { var baseTimes = __webpack_require__(1959), isArguments = __webpack_require__(427), isArray = __webpack_require__(100), isBuffer = __webpack_require__(428), isIndex = __webpack_require__(331), isTypedArray = __webpack_require__(602); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /* 993 */ /***/ (function(module, exports) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /* 994 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(112); /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` if suitable for strict * equality comparisons, else `false`. */ function isStrictComparable(value) { return value === value && !isObject(value); } module.exports = isStrictComparable; /***/ }), /* 995 */ /***/ (function(module, exports) { /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || (key in Object(object))); }; } module.exports = matchesStrictComparable; /***/ }), /* 996 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(266), isArguments = __webpack_require__(427), isArray = __webpack_require__(100), isIndex = __webpack_require__(331), isLength = __webpack_require__(603), toKey = __webpack_require__(267); /** * Checks if `path` exists on `object`. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { path = castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } module.exports = hasPath; /***/ }), /* 997 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(86); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = cloneBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(64)(module))) /***/ }), /* 998 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(600), getPrototype = __webpack_require__(609), getSymbols = __webpack_require__(601), stubArray = __webpack_require__(991); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own and inherited enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); object = getPrototype(object); } return result; }; module.exports = getSymbolsIn; /***/ }), /* 999 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(611); /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } module.exports = cloneTypedArray; /***/ }), /* 1000 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(416), getPrototype = __webpack_require__(609), isPrototype = __webpack_require__(606); /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototype(object)) : {}; } module.exports = initCloneObject; /***/ }), /* 1001 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(264), getPrototype = __webpack_require__(609), isObjectLike = __webpack_require__(137); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; /***/ }), /* 1002 */ /***/ (function(module, exports, __webpack_require__) { var flatten = __webpack_require__(2001), overRest = __webpack_require__(1003), setToString = __webpack_require__(593); /** * A specialized version of `baseRest` which flattens the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @returns {Function} Returns the new function. */ function flatRest(func) { return setToString(overRest(func, undefined, flatten), func + ''); } module.exports = flatRest; /***/ }), /* 1003 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(588); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * A specialized version of `baseRest` which transforms the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @param {Function} transform The rest array transform. * @returns {Function} Returns the new function. */ function overRest(func, start, transform) { start = nativeMax(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return apply(func, this, otherArgs); }; } module.exports = overRest; /***/ }), /* 1004 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { if (process.env.NODE_ENV === 'production') { module.exports = __webpack_require__(2006); } else { module.exports = __webpack_require__(2007); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 1005 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__internal_middleware__ = __webpack_require__(2014); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__internal_runSaga__ = __webpack_require__(1007); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "runSaga", function() { return __WEBPACK_IMPORTED_MODULE_1__internal_runSaga__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_channel__ = __webpack_require__(270); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "END", function() { return __WEBPACK_IMPORTED_MODULE_2__internal_channel__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "eventChannel", function() { return __WEBPACK_IMPORTED_MODULE_2__internal_channel__["d"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "channel", function() { return __WEBPACK_IMPORTED_MODULE_2__internal_channel__["b"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__internal_buffers__ = __webpack_require__(430); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "buffers", function() { return __WEBPACK_IMPORTED_MODULE_3__internal_buffers__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_sagaHelpers__ = __webpack_require__(1009); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeEvery", function() { return __WEBPACK_IMPORTED_MODULE_4__internal_sagaHelpers__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeLatest", function() { return __WEBPACK_IMPORTED_MODULE_4__internal_sagaHelpers__["c"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_4__internal_sagaHelpers__["e"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__internal_utils__ = __webpack_require__(113); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return __WEBPACK_IMPORTED_MODULE_5__internal_utils__["m"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "CANCEL", function() { return __WEBPACK_IMPORTED_MODULE_5__internal_utils__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__effects__ = __webpack_require__(157); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils__ = __webpack_require__(2018); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "effects", function() { return __WEBPACK_IMPORTED_MODULE_6__effects__; }); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "utils", function() { return __WEBPACK_IMPORTED_MODULE_7__utils__; }); /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__internal_middleware__["a" /* default */]); /***/ }), /* 1006 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = asap; /* harmony export (immutable) */ __webpack_exports__["c"] = suspend; /* harmony export (immutable) */ __webpack_exports__["b"] = flush; var queue = []; /** Variable to hold a counting semaphore - Incrementing adds a lock and puts the scheduler in a `suspended` state (if it's not already suspended) - Decrementing releases a lock. Zero locks puts the scheduler in a `released` state. This triggers flushing the queued tasks. **/ var semaphore = 0; /** Executes a task 'atomically'. Tasks scheduled during this execution will be queued and flushed after this task has finished (assuming the scheduler endup in a released state). **/ function exec(task) { try { suspend(); task(); } finally { release(); } } /** Executes or queues a task depending on the state of the scheduler (`suspended` or `released`) **/ function asap(task) { queue.push(task); if (!semaphore) { suspend(); flush(); } } /** Puts the scheduler in a `suspended` state. Scheduled tasks will be queued until the scheduler is released. **/ function suspend() { semaphore++; } /** Puts the scheduler in a `released` state. **/ function release() { semaphore--; } /** Releases the current lock. Executes all queued tasks if the scheduler is in the released state. **/ function flush() { release(); var task = void 0; while (!semaphore && (task = queue.shift()) !== undefined) { exec(task); } } /***/ }), /* 1007 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = runSaga; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(113); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__proc__ = __webpack_require__(1008); var RUN_SAGA_SIGNATURE = 'runSaga(storeInterface, saga, ...args)'; var NON_GENERATOR_ERR = RUN_SAGA_SIGNATURE + ': saga argument must be a Generator function!'; function runSaga(storeInterface, saga) { for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { args[_key - 2] = arguments[_key]; } var iterator = void 0; if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].iterator(storeInterface)) { if (process.env.NODE_ENV === 'development') { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["s" /* log */])('warn', 'runSaga(iterator, storeInterface) has been deprecated in favor of ' + RUN_SAGA_SIGNATURE); } iterator = storeInterface; storeInterface = saga; } else { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(saga, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func, NON_GENERATOR_ERR); iterator = saga.apply(undefined, args); Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(iterator, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].iterator, NON_GENERATOR_ERR); } var _storeInterface = storeInterface, subscribe = _storeInterface.subscribe, dispatch = _storeInterface.dispatch, getState = _storeInterface.getState, context = _storeInterface.context, sagaMonitor = _storeInterface.sagaMonitor, logger = _storeInterface.logger, onError = _storeInterface.onError; var effectId = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["y" /* uid */])(); if (sagaMonitor) { // monitors are expected to have a certain interface, let's fill-in any missing ones sagaMonitor.effectTriggered = sagaMonitor.effectTriggered || __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; sagaMonitor.effectResolved = sagaMonitor.effectResolved || __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; sagaMonitor.effectRejected = sagaMonitor.effectRejected || __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; sagaMonitor.effectCancelled = sagaMonitor.effectCancelled || __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; sagaMonitor.actionDispatched = sagaMonitor.actionDispatched || __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; sagaMonitor.effectTriggered({ effectId: effectId, root: true, parentEffectId: 0, effect: { root: true, saga: saga, args: args } }); } var task = Object(__WEBPACK_IMPORTED_MODULE_1__proc__["b" /* default */])(iterator, subscribe, Object(__WEBPACK_IMPORTED_MODULE_0__utils__["A" /* wrapSagaDispatch */])(dispatch), getState, context, { sagaMonitor: sagaMonitor, logger: logger, onError: onError }, effectId, saga.name); if (sagaMonitor) { sagaMonitor.effectResolved(effectId, task); } return task; } /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 1008 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export NOT_ITERATOR_ERROR */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CHANNEL_END; }); /* unused harmony export TASK_CANCEL */ /* harmony export (immutable) */ __webpack_exports__["b"] = proc; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(113); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scheduler__ = __webpack_require__(1006); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__io__ = __webpack_require__(271); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__channel__ = __webpack_require__(270); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__buffers__ = __webpack_require__(430); 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; }; 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; }; function _defineEnumerableProperties(obj, descs) { for (var key in descs) { var desc = descs[key]; desc.configurable = desc.enumerable = true; if ("value" in desc) desc.writable = true; Object.defineProperty(obj, key, desc); } return obj; } var NOT_ITERATOR_ERROR = 'proc first argument (Saga function result) must be an iterator'; var CHANNEL_END = { toString: function toString() { return '@@redux-saga/CHANNEL_END'; } }; var TASK_CANCEL = { toString: function toString() { return '@@redux-saga/TASK_CANCEL'; } }; var matchers = { wildcard: function wildcard() { return __WEBPACK_IMPORTED_MODULE_0__utils__["r" /* kTrue */]; }, default: function _default(pattern) { return (typeof pattern === 'undefined' ? 'undefined' : _typeof(pattern)) === 'symbol' ? function (input) { return input.type === pattern; } : function (input) { return input.type === String(pattern); }; }, array: function array(patterns) { return function (input) { return patterns.some(function (p) { return matcher(p)(input); }); }; }, predicate: function predicate(_predicate) { return function (input) { return _predicate(input); }; } }; function matcher(pattern) { // prettier-ignore return (pattern === '*' ? matchers.wildcard : __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].array(pattern) ? matchers.array : __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].stringableFunc(pattern) ? matchers.default : __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func(pattern) ? matchers.predicate : matchers.default)(pattern); } /** Used to track a parent task and its forks In the new fork model, forked tasks are attached by default to their parent We model this using the concept of Parent task && main Task main task is the main flow of the current Generator, the parent tasks is the aggregation of the main tasks + all its forked tasks. Thus the whole model represents an execution tree with multiple branches (vs the linear execution tree in sequential (non parallel) programming) A parent tasks has the following semantics - It completes if all its forks either complete or all cancelled - If it's cancelled, all forks are cancelled as well - It aborts if any uncaught error bubbles up from forks - If it completes, the return value is the one returned by the main task **/ function forkQueue(name, mainTask, cb) { var tasks = [], result = void 0, completed = false; addTask(mainTask); function abort(err) { cancelAll(); cb(err, true); } function addTask(task) { tasks.push(task); task.cont = function (res, isErr) { if (completed) { return; } Object(__WEBPACK_IMPORTED_MODULE_0__utils__["w" /* remove */])(tasks, task); task.cont = __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; if (isErr) { abort(res); } else { if (task === mainTask) { result = res; } if (!tasks.length) { completed = true; cb(result); } } }; // task.cont.cancel = task.cancel } function cancelAll() { if (completed) { return; } completed = true; tasks.forEach(function (t) { t.cont = __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; t.cancel(); }); tasks = []; } return { addTask: addTask, cancelAll: cancelAll, abort: abort, getTasks: function getTasks() { return tasks; }, taskNames: function taskNames() { return tasks.map(function (t) { return t.name; }); } }; } function createTaskIterator(_ref) { var context = _ref.context, fn = _ref.fn, args = _ref.args; if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].iterator(fn)) { return fn; } // catch synchronous failures; see #152 and #441 var result = void 0, error = void 0; try { result = fn.apply(context, args); } catch (err) { error = err; } // i.e. a generator function returns an iterator if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].iterator(result)) { return result; } // do not bubble up synchronous failures for detached forks // instead create a failed task. See #152 and #441 return error ? Object(__WEBPACK_IMPORTED_MODULE_0__utils__["t" /* makeIterator */])(function () { throw error; }) : Object(__WEBPACK_IMPORTED_MODULE_0__utils__["t" /* makeIterator */])(function () { var pc = void 0; var eff = { done: false, value: result }; var ret = function ret(value) { return { done: true, value: value }; }; return function (arg) { if (!pc) { pc = true; return eff; } else { return ret(arg); } }; }()); } var wrapHelper = function wrapHelper(helper) { return { fn: helper }; }; function proc(iterator) { var subscribe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () { return __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; }; var dispatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; var getState = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; var parentContext = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; var parentEffectId = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0; var name = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 'anonymous'; var cont = arguments[8]; Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(iterator, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].iterator, NOT_ITERATOR_ERROR); var effectsString = '[...effects]'; var runParallelEffect = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["n" /* deprecate */])(runAllEffect, Object(__WEBPACK_IMPORTED_MODULE_0__utils__["z" /* updateIncentive */])(effectsString, 'all(' + effectsString + ')')); var sagaMonitor = options.sagaMonitor, logger = options.logger, onError = options.onError; var log = logger || __WEBPACK_IMPORTED_MODULE_0__utils__["s" /* log */]; var stdChannel = Object(__WEBPACK_IMPORTED_MODULE_3__channel__["f" /* stdChannel */])(subscribe); var taskContext = Object.create(parentContext); /** Tracks the current effect cancellation Each time the generator progresses. calling runEffect will set a new value on it. It allows propagating cancellation to child effects **/ next.cancel = __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; /** Creates a new task descriptor for this generator, We'll also create a main task to track the main flow (besides other forked tasks) **/ var task = newTask(parentEffectId, name, iterator, cont); var mainTask = { name: name, cancel: cancelMain, isRunning: true }; var taskQueue = forkQueue(name, mainTask, end); /** cancellation of the main task. We'll simply resume the Generator with a Cancel **/ function cancelMain() { if (mainTask.isRunning && !mainTask.isCancelled) { mainTask.isCancelled = true; next(TASK_CANCEL); } } /** This may be called by a parent generator to trigger/propagate cancellation cancel all pending tasks (including the main task), then end the current task. Cancellation propagates down to the whole execution tree holded by this Parent task It's also propagated to all joiners of this task and their execution tree/joiners Cancellation is noop for terminated/Cancelled tasks tasks **/ function cancel() { /** We need to check both Running and Cancelled status Tasks can be Cancelled but still Running **/ if (iterator._isRunning && !iterator._isCancelled) { iterator._isCancelled = true; taskQueue.cancelAll(); /** Ending with a Never result will propagate the Cancellation to all joiners **/ end(TASK_CANCEL); } } /** attaches cancellation logic to this task's continuation this will permit cancellation to propagate down the call chain **/ cont && (cont.cancel = cancel); // tracks the running status iterator._isRunning = true; // kicks up the generator next(); // then return the task descriptor to the caller return task; /** This is the generator driver It's a recursive async/continuation function which calls itself until the generator terminates or throws **/ function next(arg, isErr) { // Preventive measure. If we end up here, then there is really something wrong if (!mainTask.isRunning) { throw new Error('Trying to resume an already finished generator'); } try { var result = void 0; if (isErr) { result = iterator.throw(arg); } else if (arg === TASK_CANCEL) { /** getting TASK_CANCEL automatically cancels the main task We can get this value here - By cancelling the parent task manually - By joining a Cancelled task **/ mainTask.isCancelled = true; /** Cancels the current effect; this will propagate the cancellation down to any called tasks **/ next.cancel(); /** If this Generator has a `return` method then invokes it This will jump to the finally block **/ result = __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL }; } else if (arg === CHANNEL_END) { // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels) result = __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func(iterator.return) ? iterator.return() : { done: true }; } else { result = iterator.next(arg); } if (!result.done) { runEffect(result.value, parentEffectId, '', next); } else { /** This Generator has ended, terminate the main task and notify the fork queue **/ mainTask.isMainRunning = false; mainTask.cont && mainTask.cont(result.value); } } catch (error) { if (mainTask.isCancelled) { log('error', 'uncaught at ' + name, error.message); } mainTask.isMainRunning = false; mainTask.cont(error, true); } } function end(result, isErr) { iterator._isRunning = false; stdChannel.close(); if (!isErr) { if (process.env.NODE_ENV === 'development' && result === TASK_CANCEL) { log('info', name + ' has been cancelled', ''); } iterator._result = result; iterator._deferredEnd && iterator._deferredEnd.resolve(result); } else { if (result instanceof Error) { result.sagaStack = 'at ' + name + ' \n ' + (result.sagaStack || result.stack); } if (!task.cont) { log('error', 'uncaught', result.sagaStack || result.stack); if (result instanceof Error && onError) { onError(result); } } iterator._error = result; iterator._isAborted = true; iterator._deferredEnd && iterator._deferredEnd.reject(result); } task.cont && task.cont(result, isErr); task.joiners.forEach(function (j) { return j.cb(result, isErr); }); task.joiners = null; } function runEffect(effect, parentEffectId) { var label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; var cb = arguments[3]; var effectId = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["y" /* uid */])(); sagaMonitor && sagaMonitor.effectTriggered({ effectId: effectId, parentEffectId: parentEffectId, label: label, effect: effect }); /** completion callback and cancel callback are mutually exclusive We can't cancel an already completed effect And We can't complete an already cancelled effectId **/ var effectSettled = void 0; // Completion callback passed to the appropriate effect runner function currCb(res, isErr) { if (effectSettled) { return; } effectSettled = true; cb.cancel = __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; // defensive measure if (sagaMonitor) { isErr ? sagaMonitor.effectRejected(effectId, res) : sagaMonitor.effectResolved(effectId, res); } cb(res, isErr); } // tracks down the current cancel currCb.cancel = __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; // setup cancellation logic on the parent cb cb.cancel = function () { // prevents cancelling an already completed effect if (effectSettled) { return; } effectSettled = true; /** propagates cancel downward catch uncaught cancellations errors; since we can no longer call the completion callback, log errors raised during cancellations into the console **/ try { currCb.cancel(); } catch (err) { log('error', 'uncaught at ' + name, err.message); } currCb.cancel = __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; // defensive measure sagaMonitor && sagaMonitor.effectCancelled(effectId); }; /** each effect runner must attach its own logic of cancellation to the provided callback it allows this generator to propagate cancellation downward. ATTENTION! effect runners must setup the cancel logic by setting cb.cancel = [cancelMethod] And the setup must occur before calling the callback This is a sort of inversion of control: called async functions are responsible for completing the flow by calling the provided continuation; while caller functions are responsible for aborting the current flow by calling the attached cancel function Library users can attach their own cancellation logic to promises by defining a promise[CANCEL] method in their returned promises ATTENTION! calling cancel must have no effect on an already completed or cancelled effect **/ var data = void 0; // prettier-ignore return ( // Non declarative effect __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].promise(effect) ? resolvePromise(effect, currCb) : __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].helper(effect) ? runForkEffect(wrapHelper(effect), effectId, currCb) : __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].iterator(effect) ? resolveIterator(effect, effectId, name, currCb) // declarative effects : __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].array(effect) ? runParallelEffect(effect, effectId, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].take(effect)) ? runTakeEffect(data, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].put(effect)) ? runPutEffect(data, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].all(effect)) ? runAllEffect(data, effectId, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].race(effect)) ? runRaceEffect(data, effectId, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].call(effect)) ? runCallEffect(data, effectId, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].cps(effect)) ? runCPSEffect(data, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].fork(effect)) ? runForkEffect(data, effectId, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].join(effect)) ? runJoinEffect(data, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].cancel(effect)) ? runCancelEffect(data, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].select(effect)) ? runSelectEffect(data, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].actionChannel(effect)) ? runChannelEffect(data, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].flush(effect)) ? runFlushEffect(data, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].cancelled(effect)) ? runCancelledEffect(data, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].getContext(effect)) ? runGetContextEffect(data, currCb) : (data = __WEBPACK_IMPORTED_MODULE_2__io__["d" /* asEffect */].setContext(effect)) ? runSetContextEffect(data, currCb) : /* anything else returned as is */currCb(effect) ); } function resolvePromise(promise, cb) { var cancelPromise = promise[__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* CANCEL */]]; if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func(cancelPromise)) { cb.cancel = cancelPromise; } else if (__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].func(promise.abort)) { cb.cancel = function () { return promise.abort(); }; // TODO: add support for the fetch API, whenever they get around to // adding cancel support } promise.then(cb, function (error) { return cb(error, true); }); } function resolveIterator(iterator, effectId, name, cb) { proc(iterator, subscribe, dispatch, getState, taskContext, options, effectId, name, cb); } function runTakeEffect(_ref2, cb) { var channel = _ref2.channel, pattern = _ref2.pattern, maybe = _ref2.maybe; channel = channel || stdChannel; var takeCb = function takeCb(inp) { return inp instanceof Error ? cb(inp, true) : Object(__WEBPACK_IMPORTED_MODULE_3__channel__["e" /* isEnd */])(inp) && !maybe ? cb(CHANNEL_END) : cb(inp); }; try { channel.take(takeCb, matcher(pattern)); } catch (err) { return cb(err, true); } cb.cancel = takeCb.cancel; } function runPutEffect(_ref3, cb) { var channel = _ref3.channel, action = _ref3.action, resolve = _ref3.resolve; /** Schedule the put in case another saga is holding a lock. The put will be executed atomically. ie nested puts will execute after this put has terminated. **/ Object(__WEBPACK_IMPORTED_MODULE_1__scheduler__["a" /* asap */])(function () { var result = void 0; try { result = (channel ? channel.put : dispatch)(action); } catch (error) { // If we have a channel or `put.resolve` was used then bubble up the error. if (channel || resolve) return cb(error, true); log('error', 'uncaught at ' + name, error.stack || error.message || error); } if (resolve && __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].promise(result)) { resolvePromise(result, cb); } else { return cb(result); } }); // Put effects are non cancellables } function runCallEffect(_ref4, effectId, cb) { var context = _ref4.context, fn = _ref4.fn, args = _ref4.args; var result = void 0; // catch synchronous failures; see #152 try { result = fn.apply(context, args); } catch (error) { return cb(error, true); } return __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].promise(result) ? resolvePromise(result, cb) : __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].iterator(result) ? resolveIterator(result, effectId, fn.name, cb) : cb(result); } function runCPSEffect(_ref5, cb) { var context = _ref5.context, fn = _ref5.fn, args = _ref5.args; // CPS (ie node style functions) can define their own cancellation logic // by setting cancel field on the cb // catch synchronous failures; see #152 try { var cpsCb = function cpsCb(err, res) { return __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].undef(err) ? cb(res) : cb(err, true); }; fn.apply(context, args.concat(cpsCb)); if (cpsCb.cancel) { cb.cancel = function () { return cpsCb.cancel(); }; } } catch (error) { return cb(error, true); } } function runForkEffect(_ref6, effectId, cb) { var context = _ref6.context, fn = _ref6.fn, args = _ref6.args, detached = _ref6.detached; var taskIterator = createTaskIterator({ context: context, fn: fn, args: args }); try { Object(__WEBPACK_IMPORTED_MODULE_1__scheduler__["c" /* suspend */])(); var _task = proc(taskIterator, subscribe, dispatch, getState, taskContext, options, effectId, fn.name, detached ? null : __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]); if (detached) { cb(_task); } else { if (taskIterator._isRunning) { taskQueue.addTask(_task); cb(_task); } else if (taskIterator._error) { taskQueue.abort(taskIterator._error); } else { cb(_task); } } } finally { Object(__WEBPACK_IMPORTED_MODULE_1__scheduler__["b" /* flush */])(); } // Fork effects are non cancellables } function runJoinEffect(t, cb) { if (t.isRunning()) { var joiner = { task: task, cb: cb }; cb.cancel = function () { return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["w" /* remove */])(t.joiners, joiner); }; t.joiners.push(joiner); } else { t.isAborted() ? cb(t.error(), true) : cb(t.result()); } } function runCancelEffect(taskToCancel, cb) { if (taskToCancel === __WEBPACK_IMPORTED_MODULE_0__utils__["d" /* SELF_CANCELLATION */]) { taskToCancel = task; } if (taskToCancel.isRunning()) { taskToCancel.cancel(); } cb(); // cancel effects are non cancellables } function runAllEffect(effects, effectId, cb) { var keys = Object.keys(effects); if (!keys.length) { return cb(__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].array(effects) ? [] : {}); } var completedCount = 0; var completed = void 0; var results = {}; var childCbs = {}; function checkEffectEnd() { if (completedCount === keys.length) { completed = true; cb(__WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].array(effects) ? __WEBPACK_IMPORTED_MODULE_0__utils__["f" /* array */].from(_extends({}, results, { length: keys.length })) : results); } } keys.forEach(function (key) { var chCbAtKey = function chCbAtKey(res, isErr) { if (completed) { return; } if (isErr || Object(__WEBPACK_IMPORTED_MODULE_3__channel__["e" /* isEnd */])(res) || res === CHANNEL_END || res === TASK_CANCEL) { cb.cancel(); cb(res, isErr); } else { results[key] = res; completedCount++; checkEffectEnd(); } }; chCbAtKey.cancel = __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; childCbs[key] = chCbAtKey; }); cb.cancel = function () { if (!completed) { completed = true; keys.forEach(function (key) { return childCbs[key].cancel(); }); } }; keys.forEach(function (key) { return runEffect(effects[key], effectId, key, childCbs[key]); }); } function runRaceEffect(effects, effectId, cb) { var completed = void 0; var keys = Object.keys(effects); var childCbs = {}; keys.forEach(function (key) { var chCbAtKey = function chCbAtKey(res, isErr) { if (completed) { return; } if (isErr) { // Race Auto cancellation cb.cancel(); cb(res, true); } else if (!Object(__WEBPACK_IMPORTED_MODULE_3__channel__["e" /* isEnd */])(res) && res !== CHANNEL_END && res !== TASK_CANCEL) { var _cb; cb.cancel(); completed = true; cb((_cb = {}, _cb[key] = res, _cb)); } }; chCbAtKey.cancel = __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; childCbs[key] = chCbAtKey; }); cb.cancel = function () { // prevents unnecessary cancellation if (!completed) { completed = true; keys.forEach(function (key) { return childCbs[key].cancel(); }); } }; keys.forEach(function (key) { if (completed) { return; } runEffect(effects[key], effectId, key, childCbs[key]); }); } function runSelectEffect(_ref7, cb) { var selector = _ref7.selector, args = _ref7.args; try { var state = selector.apply(undefined, [getState()].concat(args)); cb(state); } catch (error) { cb(error, true); } } function runChannelEffect(_ref8, cb) { var pattern = _ref8.pattern, buffer = _ref8.buffer; var match = matcher(pattern); match.pattern = pattern; cb(Object(__WEBPACK_IMPORTED_MODULE_3__channel__["d" /* eventChannel */])(subscribe, buffer || __WEBPACK_IMPORTED_MODULE_4__buffers__["a" /* buffers */].fixed(), match)); } function runCancelledEffect(data, cb) { cb(!!mainTask.isCancelled); } function runFlushEffect(channel, cb) { channel.flush(cb); } function runGetContextEffect(prop, cb) { cb(taskContext[prop]); } function runSetContextEffect(props, cb) { __WEBPACK_IMPORTED_MODULE_0__utils__["v" /* object */].assign(taskContext, props); cb(); } function newTask(id, name, iterator, cont) { var _done, _ref9, _mutatorMap; iterator._deferredEnd = null; return _ref9 = {}, _ref9[__WEBPACK_IMPORTED_MODULE_0__utils__["e" /* TASK */]] = true, _ref9.id = id, _ref9.name = name, _done = 'done', _mutatorMap = {}, _mutatorMap[_done] = _mutatorMap[_done] || {}, _mutatorMap[_done].get = function () { if (iterator._deferredEnd) { return iterator._deferredEnd.promise; } else { var def = Object(__WEBPACK_IMPORTED_MODULE_0__utils__["l" /* deferred */])(); iterator._deferredEnd = def; if (!iterator._isRunning) { iterator._error ? def.reject(iterator._error) : def.resolve(iterator._result); } return def.promise; } }, _ref9.cont = cont, _ref9.joiners = [], _ref9.cancel = cancel, _ref9.isRunning = function isRunning() { return iterator._isRunning; }, _ref9.isCancelled = function isCancelled() { return iterator._isCancelled; }, _ref9.isAborted = function isAborted() { return iterator._isAborted; }, _ref9.result = function result() { return iterator._result; }, _ref9.error = function error() { return iterator._error; }, _ref9.setContext = function setContext(props) { Object(__WEBPACK_IMPORTED_MODULE_0__utils__["h" /* check */])(props, __WEBPACK_IMPORTED_MODULE_0__utils__["q" /* is */].object, Object(__WEBPACK_IMPORTED_MODULE_0__utils__["k" /* createSetContextWarning */])('task', props)); __WEBPACK_IMPORTED_MODULE_0__utils__["v" /* object */].assign(taskContext, props); }, _defineEnumerableProperties(_ref9, _mutatorMap), _ref9; } } /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 1009 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return takeEvery; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return takeLatest; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return throttle; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__takeEvery__ = __webpack_require__(2015); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLatest__ = __webpack_require__(2016); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__throttle__ = __webpack_require__(2017); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(113); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__takeEvery__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_1__takeLatest__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_2__throttle__["a"]; }); var deprecationWarning = function deprecationWarning(helperName) { return 'import { ' + helperName + ' } from \'redux-saga\' has been deprecated in favor of import { ' + helperName + ' } from \'redux-saga/effects\'.\nThe latter will not work with yield*, as helper effects are wrapped automatically for you in fork effect.\nTherefore yield ' + helperName + ' will return task descriptor to your saga and execute next lines of code.'; }; var takeEvery = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_3__utils__["n" /* deprecate */])(__WEBPACK_IMPORTED_MODULE_0__takeEvery__["a" /* default */], /*#__PURE__*/deprecationWarning('takeEvery')); var takeLatest = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_3__utils__["n" /* deprecate */])(__WEBPACK_IMPORTED_MODULE_1__takeLatest__["a" /* default */], /*#__PURE__*/deprecationWarning('takeLatest')); var throttle = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_3__utils__["n" /* deprecate */])(__WEBPACK_IMPORTED_MODULE_2__throttle__["a" /* default */], /*#__PURE__*/deprecationWarning('throttle')); /***/ }), /* 1010 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionTypes; }); /* harmony export (immutable) */ __webpack_exports__["b"] = createStore; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(613); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(1012); /** * These are private action types reserved by Redux. * For any unknown actions, you must return the current state. * If the current state is undefined, you must return the initial state. * Do not reference these action types directly in your code. */ var ActionTypes = { INIT: '@@redux/INIT' /** * Creates a Redux store that holds the state tree. * The only way to change the data in the store is to call `dispatch()` on it. * * There should only be a single store in your app. To specify how different * parts of the state tree respond to actions, you may combine several reducers * into a single reducer function by using `combineReducers`. * * @param {Function} reducer A function that returns the next state tree, given * the current state tree and the action to handle. * * @param {any} [preloadedState] The initial state. You may optionally specify it * to hydrate the state from the server in universal apps, or to restore a * previously serialized user session. * If you use `combineReducers` to produce the root reducer function, this must be * an object with the same shape as `combineReducers` keys. * * @param {Function} [enhancer] The store enhancer. You may optionally specify it * to enhance the store with third-party capabilities such as middleware, * time travel, persistence, etc. The only store enhancer that ships with Redux * is `applyMiddleware()`. * * @returns {Store} A Redux store that lets you read the state, dispatch actions * and subscribe to changes. */ };function createStore(reducer, preloadedState, enhancer) { var _ref2; if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { enhancer = preloadedState; preloadedState = undefined; } if (typeof enhancer !== 'undefined') { if (typeof enhancer !== 'function') { throw new Error('Expected the enhancer to be a function.'); } return enhancer(createStore)(reducer, preloadedState); } if (typeof reducer !== 'function') { throw new Error('Expected the reducer to be a function.'); } var currentReducer = reducer; var currentState = preloadedState; var currentListeners = []; var nextListeners = currentListeners; var isDispatching = false; function ensureCanMutateNextListeners() { if (nextListeners === currentListeners) { nextListeners = currentListeners.slice(); } } /** * Reads the state tree managed by the store. * * @returns {any} The current state tree of your application. */ function getState() { return currentState; } /** * Adds a change listener. It will be called any time an action is dispatched, * and some part of the state tree may potentially have changed. You may then * call `getState()` to read the current state tree inside the callback. * * You may call `dispatch()` from a change listener, with the following * caveats: * * 1. The subscriptions are snapshotted just before every `dispatch()` call. * If you subscribe or unsubscribe while the listeners are being invoked, this * will not have any effect on the `dispatch()` that is currently in progress. * However, the next `dispatch()` call, whether nested or not, will use a more * recent snapshot of the subscription list. * * 2. The listener should not expect to see all state changes, as the state * might have been updated multiple times during a nested `dispatch()` before * the listener is called. It is, however, guaranteed that all subscribers * registered before the `dispatch()` started will be called with the latest * state by the time it exits. * * @param {Function} listener A callback to be invoked on every dispatch. * @returns {Function} A function to remove this change listener. */ function subscribe(listener) { if (typeof listener !== 'function') { throw new Error('Expected listener to be a function.'); } var isSubscribed = true; ensureCanMutateNextListeners(); nextListeners.push(listener); return function unsubscribe() { if (!isSubscribed) { return; } isSubscribed = false; ensureCanMutateNextListeners(); var index = nextListeners.indexOf(listener); nextListeners.splice(index, 1); }; } /** * Dispatches an action. It is the only way to trigger a state change. * * The `reducer` function, used to create the store, will be called with the * current state tree and the given `action`. Its return value will * be considered the **next** state of the tree, and the change listeners * will be notified. * * The base implementation only supports plain object actions. If you want to * dispatch a Promise, an Observable, a thunk, or something else, you need to * wrap your store creating function into the corresponding middleware. For * example, see the documentation for the `redux-thunk` package. Even the * middleware will eventually dispatch plain object actions using this method. * * @param {Object} action A plain object representing “what changed”. It is * a good idea to keep actions serializable so you can record and replay user * sessions, or use the time travelling `redux-devtools`. An action must have * a `type` property which may not be `undefined`. It is a good idea to use * string constants for action types. * * @returns {Object} For convenience, the same action object you dispatched. * * Note that, if you use a custom middleware, it may wrap `dispatch()` to * return something else (for example, a Promise you can await). */ function dispatch(action) { if (!Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */])(action)) { throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); } if (typeof action.type === 'undefined') { throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?'); } if (isDispatching) { throw new Error('Reducers may not dispatch actions.'); } try { isDispatching = true; currentState = currentReducer(currentState, action); } finally { isDispatching = false; } var listeners = currentListeners = nextListeners; for (var i = 0; i < listeners.length; i++) { var listener = listeners[i]; listener(); } return action; } /** * Replaces the reducer currently used by the store to calculate the state. * * You might need this if your app implements code splitting and you want to * load some of the reducers dynamically. You might also need this if you * implement a hot reloading mechanism for Redux. * * @param {Function} nextReducer The reducer for the store to use instead. * @returns {void} */ function replaceReducer(nextReducer) { if (typeof nextReducer !== 'function') { throw new Error('Expected the nextReducer to be a function.'); } currentReducer = nextReducer; dispatch({ type: ActionTypes.INIT }); } /** * Interoperability point for observable/reactive libraries. * @returns {observable} A minimal observable of state changes. * For more information, see the observable proposal: * https://github.com/tc39/proposal-observable */ function observable() { var _ref; var outerSubscribe = subscribe; return _ref = { /** * The minimal observable subscription method. * @param {Object} observer Any object that can be used as an observer. * The observer object should have a `next` method. * @returns {subscription} An object with an `unsubscribe` method that can * be used to unsubscribe the observable from the store, and prevent further * emission of values from the observable. */ subscribe: function subscribe(observer) { if (typeof observer !== 'object') { throw new TypeError('Expected the observer to be an object.'); } function observeState() { if (observer.next) { observer.next(getState()); } } observeState(); var unsubscribe = outerSubscribe(observeState); return { unsubscribe: unsubscribe }; } }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__["default"]] = function () { return this; }, _ref; } // When a store is created, an "INIT" action is dispatched so that every // reducer returns their initial state. This effectively populates // the initial state tree. dispatch({ type: ActionTypes.INIT }); return _ref2 = { dispatch: dispatch, subscribe: subscribe, getState: getState, replaceReducer: replaceReducer }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable__["default"]] = observable, _ref2; } /***/ }), /* 1011 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(2021); /** Built-in value references. */ var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; /* harmony default export */ __webpack_exports__["a"] = (Symbol); /***/ }), /* 1012 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ponyfill_js__ = __webpack_require__(2028); /* global window */ var root; if (typeof self !== 'undefined') { root = self; } else if (typeof window !== 'undefined') { root = window; } else if (typeof global !== 'undefined') { root = global; } else if (true) { root = module; } else { root = Function('return this')(); } var result = Object(__WEBPACK_IMPORTED_MODULE_0__ponyfill_js__["a" /* default */])(root); /* harmony default export */ __webpack_exports__["default"] = (result); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(27), __webpack_require__(614)(module))) /***/ }), /* 1013 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = warning; /** * Prints a warning in the console if it exists. * * @param {String} message The warning message. * @returns {void} */ function warning(message) { /* eslint-disable no-console */ if (typeof console !== 'undefined' && typeof console.error === 'function') { console.error(message); } /* eslint-enable no-console */ try { // This error was thrown as a convenience so that if you enable // "break on all exceptions" in your console, // it would pause the execution at this line. throw new Error(message); /* eslint-disable no-empty */ } catch (e) {} /* eslint-enable no-empty */ } /***/ }), /* 1014 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = compose; /** * Composes single-argument functions from right to left. The rightmost * function can take multiple arguments as it provides the signature for * the resulting composite function. * * @param {...Function} funcs The functions to compose. * @returns {Function} A function obtained by composing the argument functions * from right to left. For example, compose(f, g, h) is identical to doing * (...args) => f(g(h(...args))). */ function compose() { for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { funcs[_key] = arguments[_key]; } if (funcs.length === 0) { return function (arg) { return arg; }; } if (funcs.length === 1) { return funcs[0]; } return funcs.reduce(function (a, b) { return function () { return a(b.apply(undefined, arguments)); }; }); } /***/ }), /* 1015 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = App; var _propTypes = _interopRequireDefault(__webpack_require__(11)); var _react = _interopRequireDefault(__webpack_require__(0)); var _reactRedux = __webpack_require__(335); var _RegistryProvider = _interopRequireDefault(__webpack_require__(1022)); var _settings = __webpack_require__(620); var _ErrorBoundary = _interopRequireDefault(__webpack_require__(1023)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * Internal module, you should not use it directly * @module react-cmf/lib/App */ /** * The React component that render your app and provide CMF environment. * @param {object} props { store } * @return {object} ReactElement */ function App(props) { var content = props.children; if (props.withSettings) { content = /*#__PURE__*/_react["default"].createElement(_settings.WaitForSettings, { loading: props.loading }, content); } return /*#__PURE__*/_react["default"].createElement(_reactRedux.Provider, { store: props.store }, /*#__PURE__*/_react["default"].createElement(_RegistryProvider["default"], null, /*#__PURE__*/_react["default"].createElement(_ErrorBoundary["default"], { fullPage: true }, content))); } App.displayName = 'CMFApp'; App.propTypes = { store: _propTypes["default"].object.isRequired, children: _propTypes["default"].node, withSettings: _propTypes["default"].bool, loading: _propTypes["default"].func }; App.defaultProps = { loading: function loading() { return 'loading'; } }; //# sourceMappingURL=App.js.map /***/ }), /* 1016 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ var emptyFunction = __webpack_require__(615); /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = emptyFunction; if (process.env.NODE_ENV !== 'production') { var printWarning = function printWarning(format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; warning = function warning(condition, format) { if (format === undefined) { throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (format.indexOf('Failed Composite propType: ') === 0) { return; // Ignore CompositeComponent proptype check. } if (!condition) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } printWarning.apply(undefined, [format].concat(args)); } }; } module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 1017 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (process.env.NODE_ENV !== 'production') { var ReactIs = __webpack_require__(47); // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(2038)(ReactIs.isElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(2040)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 1018 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return subscriptionShape; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return storeShape; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(1017); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); var subscriptionShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ trySubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, tryUnsubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, notifyNestedSubs: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, isSubscribed: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired }); var storeShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({ subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, dispatch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired, getState: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired }); /***/ }), /* 1019 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = connectAdvanced; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_hoist_non_react_statics__ = __webpack_require__(336); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_hoist_non_react_statics__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(51); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_Subscription__ = __webpack_require__(2041); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_PropTypes__ = __webpack_require__(1018); 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; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var hotReloadingVersion = 0; var dummyState = {}; function noop() {} function makeSelectorStateful(sourceSelector, store) { // wrap the selector in an object that tracks its results between runs. var selector = { run: function runComponentSelector(props) { try { var nextProps = sourceSelector(store.getState(), props); if (nextProps !== selector.props || selector.error) { selector.shouldComponentUpdate = true; selector.props = nextProps; selector.error = null; } } catch (error) { selector.shouldComponentUpdate = true; selector.error = error; } } }; return selector; } function connectAdvanced( /* selectorFactory is a func that is responsible for returning the selector function used to compute new props from state, props, and dispatch. For example: export default connectAdvanced((dispatch, options) => (state, props) => ({ thing: state.things[props.thingId], saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), }))(YourComponent) Access to dispatch is provided to the factory so selectorFactories can bind actionCreators outside of their selector as an optimization. Options passed to connectAdvanced are passed to the selectorFactory, along with displayName and WrappedComponent, as the second argument. Note that selectorFactory is responsible for all caching/memoization of inbound and outbound props. Do not use connectAdvanced directly without memoizing results between calls to your selector, otherwise the Connect component will re-render on every state or props change. */ selectorFactory) { var _contextTypes, _childContextTypes; var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref$getDisplayName = _ref.getDisplayName, getDisplayName = _ref$getDisplayName === undefined ? function (name) { return 'ConnectAdvanced(' + name + ')'; } : _ref$getDisplayName, _ref$methodName = _ref.methodName, methodName = _ref$methodName === undefined ? 'connectAdvanced' : _ref$methodName, _ref$renderCountProp = _ref.renderCountProp, renderCountProp = _ref$renderCountProp === undefined ? undefined : _ref$renderCountProp, _ref$shouldHandleStat = _ref.shouldHandleStateChanges, shouldHandleStateChanges = _ref$shouldHandleStat === undefined ? true : _ref$shouldHandleStat, _ref$storeKey = _ref.storeKey, storeKey = _ref$storeKey === undefined ? 'store' : _ref$storeKey, _ref$withRef = _ref.withRef, withRef = _ref$withRef === undefined ? false : _ref$withRef, connectOptions = _objectWithoutProperties(_ref, ['getDisplayName', 'methodName', 'renderCountProp', 'shouldHandleStateChanges', 'storeKey', 'withRef']); var subscriptionKey = storeKey + 'Subscription'; var version = hotReloadingVersion++; var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = __WEBPACK_IMPORTED_MODULE_4__utils_PropTypes__["a" /* storeShape */], _contextTypes[subscriptionKey] = __WEBPACK_IMPORTED_MODULE_4__utils_PropTypes__["b" /* subscriptionShape */], _contextTypes); var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = __WEBPACK_IMPORTED_MODULE_4__utils_PropTypes__["b" /* subscriptionShape */], _childContextTypes); return function wrapWithConnect(WrappedComponent) { __WEBPACK_IMPORTED_MODULE_1_invariant___default()(typeof WrappedComponent == 'function', 'You must pass a component to the function returned by ' + (methodName + '. Instead received ' + JSON.stringify(WrappedComponent))); var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; var displayName = getDisplayName(wrappedComponentName); var selectorFactoryOptions = _extends({}, connectOptions, { getDisplayName: getDisplayName, methodName: methodName, renderCountProp: renderCountProp, shouldHandleStateChanges: shouldHandleStateChanges, storeKey: storeKey, withRef: withRef, displayName: displayName, wrappedComponentName: wrappedComponentName, WrappedComponent: WrappedComponent }); var Connect = function (_Component) { _inherits(Connect, _Component); function Connect(props, context) { _classCallCheck(this, Connect); var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); _this.version = version; _this.state = {}; _this.renderCount = 0; _this.store = props[storeKey] || context[storeKey]; _this.propsMode = Boolean(props[storeKey]); _this.setWrappedInstance = _this.setWrappedInstance.bind(_this); __WEBPACK_IMPORTED_MODULE_1_invariant___default()(_this.store, 'Could not find "' + storeKey + '" in either the context or props of ' + ('"' + displayName + '". Either wrap the root component in a , ') + ('or explicitly pass "' + storeKey + '" as a prop to "' + displayName + '".')); _this.initSelector(); _this.initSubscription(); return _this; } Connect.prototype.getChildContext = function getChildContext() { var _ref2; // If this component received store from props, its subscription should be transparent // to any descendants receiving store+subscription from context; it passes along // subscription passed to it. Otherwise, it shadows the parent subscription, which allows // Connect to control ordering of notifications to flow top-down. var subscription = this.propsMode ? null : this.subscription; return _ref2 = {}, _ref2[subscriptionKey] = subscription || this.context[subscriptionKey], _ref2; }; Connect.prototype.componentDidMount = function componentDidMount() { if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount. // Otherwise, unsubscription would never take place during SSR, causing a memory leak. // To handle the case where a child component may have triggered a state change by // dispatching an action in its componentWillMount, we have to re-run the select and maybe // re-render. this.subscription.trySubscribe(); this.selector.run(this.props); if (this.selector.shouldComponentUpdate) this.forceUpdate(); }; Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { this.selector.run(nextProps); }; Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() { return this.selector.shouldComponentUpdate; }; Connect.prototype.componentWillUnmount = function componentWillUnmount() { if (this.subscription) this.subscription.tryUnsubscribe(); this.subscription = null; this.notifyNestedSubs = noop; this.store = null; this.selector.run = noop; this.selector.shouldComponentUpdate = false; }; Connect.prototype.getWrappedInstance = function getWrappedInstance() { __WEBPACK_IMPORTED_MODULE_1_invariant___default()(withRef, 'To access the wrapped instance, you need to specify ' + ('{ withRef: true } in the options argument of the ' + methodName + '() call.')); return this.wrappedInstance; }; Connect.prototype.setWrappedInstance = function setWrappedInstance(ref) { this.wrappedInstance = ref; }; Connect.prototype.initSelector = function initSelector() { var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions); this.selector = makeSelectorStateful(sourceSelector, this.store); this.selector.run(this.props); }; Connect.prototype.initSubscription = function initSubscription() { if (!shouldHandleStateChanges) return; // parentSub's source should match where store came from: props vs. context. A component // connected to the store via props shouldn't use subscription from context, or vice versa. var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey]; this.subscription = new __WEBPACK_IMPORTED_MODULE_3__utils_Subscription__["a" /* default */](this.store, parentSub, this.onStateChange.bind(this)); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in // the middle of the notification loop, where `this.subscription` will then be null. An // extra null check every change can be avoided by copying the method onto `this` and then // replacing it with a no-op on unmount. This can probably be avoided if Subscription's // listeners logic is changed to not call listeners that have been unsubscribed in the // middle of the notification loop. this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription); }; Connect.prototype.onStateChange = function onStateChange() { this.selector.run(this.props); if (!this.selector.shouldComponentUpdate) { this.notifyNestedSubs(); } else { this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate; this.setState(dummyState); } }; Connect.prototype.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() { // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it // needs to notify nested subs. Once called, it unimplements itself until further state // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does // a boolean check every time avoids an extra method call most of the time, resulting // in some perf boost. this.componentDidUpdate = undefined; this.notifyNestedSubs(); }; Connect.prototype.isSubscribed = function isSubscribed() { return Boolean(this.subscription) && this.subscription.isSubscribed(); }; Connect.prototype.addExtraProps = function addExtraProps(props) { if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don't leak to the original selector. // this is especially important for 'ref' since that's a reference back to the component // instance. a singleton memoized selector would then be holding a reference to the // instance, preventing the instance from being garbage collected, and that would be bad var withExtras = _extends({}, props); if (withRef) withExtras.ref = this.setWrappedInstance; if (renderCountProp) withExtras[renderCountProp] = this.renderCount++; if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription; return withExtras; }; Connect.prototype.render = function render() { var selector = this.selector; selector.shouldComponentUpdate = false; if (selector.error) { throw selector.error; } else { return Object(__WEBPACK_IMPORTED_MODULE_2_react__["createElement"])(WrappedComponent, this.addExtraProps(selector.props)); } }; return Connect; }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); Connect.WrappedComponent = WrappedComponent; Connect.displayName = displayName; Connect.childContextTypes = childContextTypes; Connect.contextTypes = contextTypes; Connect.propTypes = contextTypes; if (process.env.NODE_ENV !== 'production') { Connect.prototype.componentWillUpdate = function componentWillUpdate() { var _this2 = this; // We are hot reloading! if (this.version !== version) { this.version = version; this.initSelector(); // If any connected descendants don't hot reload (and resubscribe in the process), their // listeners will be lost when we unsubscribe. Unfortunately, by copying over all // listeners, this does mean that the old versions of connected descendants will still be // notified of state changes; however, their onStateChange function is a no-op so this // isn't a huge deal. var oldListeners = []; if (this.subscription) { oldListeners = this.subscription.listeners.get(); this.subscription.tryUnsubscribe(); } this.initSubscription(); if (shouldHandleStateChanges) { this.subscription.trySubscribe(); oldListeners.forEach(function (listener) { return _this2.subscription.listeners.subscribe(listener); }); } } }; } return __WEBPACK_IMPORTED_MODULE_0_hoist_non_react_statics___default()(Connect, WrappedComponent); }; } /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 1020 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = wrapMapToPropsConstant; /* unused harmony export getDependsOnOwnProps */ /* harmony export (immutable) */ __webpack_exports__["b"] = wrapMapToPropsFunc; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = __webpack_require__(1021); function wrapMapToPropsConstant(getConstant) { return function initConstantSelector(dispatch, options) { var constant = getConstant(dispatch, options); function constantSelector() { return constant; } constantSelector.dependsOnOwnProps = false; return constantSelector; }; } // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args // to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine // whether mapToProps needs to be invoked when props have changed. // // A length of one signals that mapToProps does not depend on props from the parent component. // A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and // therefore not reporting its length accurately.. function getDependsOnOwnProps(mapToProps) { return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, // this function wraps mapToProps in a proxy function which does several things: // // * Detects whether the mapToProps function being called depends on props, which // is used by selectorFactory to decide if it should reinvoke on props changes. // // * On first call, handles mapToProps if returns another function, and treats that // new function as the true mapToProps for subsequent calls. // // * On first call, verifies the first result is a plain object, in order to warn // the developer that their mapToProps function is not returning a valid result. // function wrapMapToPropsFunc(mapToProps, methodName) { return function initProxySelector(dispatch, _ref) { var displayName = _ref.displayName; var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch); }; // allow detectFactoryAndVerify to get ownProps proxy.dependsOnOwnProps = true; proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { proxy.mapToProps = mapToProps; proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); var props = proxy(stateOrDispatch, ownProps); if (typeof props === 'function') { proxy.mapToProps = props; proxy.dependsOnOwnProps = getDependsOnOwnProps(props); props = proxy(stateOrDispatch, ownProps); } if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__["a" /* default */])(props, displayName, methodName); return props; }; return proxy; }; } /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 1021 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = verifyPlainObject; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(613); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(619); function verifyPlainObject(value, displayName, methodName) { if (!Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */])(value)) { Object(__WEBPACK_IMPORTED_MODULE_1__warning__["a" /* default */])(methodName + '() in ' + displayName + ' must return a plain object. Instead received ' + value + '.'); } } /***/ }), /* 1022 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(11)); var _react = _interopRequireWildcard(__webpack_require__(0)); var _registry = _interopRequireDefault(__webpack_require__(180)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /** * The provider is a JSX wrapper to inject the registry as a context var * You should never need to use this, it's an internal component */ var RegistryProvider = /*#__PURE__*/function (_React$Component) { _inherits(RegistryProvider, _React$Component); var _super = _createSuper(RegistryProvider); function RegistryProvider(props) { var _this; _classCallCheck(this, RegistryProvider); _this = _super.call(this, props); _this.registry = _registry["default"].getRegistry(); return _this; } /** * @return {object} child with registry as only key */ _createClass(RegistryProvider, [{ key: "getChildContext", value: function getChildContext() { return { registry: this.registry }; } /** * react rendering * @return {object} ReactElement */ }, { key: "render", value: function render() { return _react.Children.only(this.props.children); } }]); return RegistryProvider; }(_react["default"].Component); exports["default"] = RegistryProvider; RegistryProvider.propTypes = { children: _propTypes["default"].element.isRequired }; RegistryProvider.childContextTypes = { registry: _propTypes["default"].object }; //# sourceMappingURL=RegistryProvider.js.map /***/ }), /* 1023 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(11)); var _ErrorFeedBack = _interopRequireDefault(__webpack_require__(2049)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var ErrorBoundary = /*#__PURE__*/function (_React$Component) { _inherits(ErrorBoundary, _React$Component); var _super = _createSuper(ErrorBoundary); function ErrorBoundary(props) { var _this; _classCallCheck(this, ErrorBoundary); _this = _super.call(this, props); _this.state = { errors: [] }; return _this; } _createClass(ErrorBoundary, [{ key: "componentDidCatch", value: function componentDidCatch(error) { this.setState(function (state) { return { errors: state.errors.concat(error) }; }); } }, { key: "render", value: function render() { if (this.state.errors.length > 0) { return this.props.renderErrors({ errors: this.state.errors, fullPage: this.props.fullPage }); } return this.props.children; } }]); return ErrorBoundary; }(_react["default"].Component); exports["default"] = ErrorBoundary; ErrorBoundary.propTypes = { renderErrors: _propTypes["default"].func, fullPage: _propTypes["default"].bool, children: _propTypes["default"].node }; ErrorBoundary.defaultProps = { renderErrors: _ErrorFeedBack["default"] }; //# sourceMappingURL=ErrorBoundary.component.js.map /***/ }), /* 1024 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Scope; }); /* harmony export (immutable) */ __webpack_exports__["b"] = addGlobalEventProcessor; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(45); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sentry_utils__ = __webpack_require__(52); /** * Holds additional event information. {@link Scope.applyToEvent} will be * called by the client before an event will be sent. */ var Scope = /** @class */ (function () { function Scope() { /** Flag if notifiying is happening. */ this._notifyingListeners = false; /** Callback for client to receive scope changes. */ this._scopeListeners = []; /** Callback list that will be called after {@link applyToEvent}. */ this._eventProcessors = []; /** Array of breadcrumbs. */ this._breadcrumbs = []; /** User */ this._user = {}; /** Tags */ this._tags = {}; /** Extra */ this._extra = {}; /** Contexts */ this._contexts = {}; } /** * Inherit values from the parent scope. * @param scope to clone. */ Scope.clone = function (scope) { var newScope = new Scope(); if (scope) { newScope._breadcrumbs = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__spread"])(scope._breadcrumbs); newScope._tags = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, scope._tags); newScope._extra = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, scope._extra); newScope._contexts = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, scope._contexts); newScope._user = scope._user; newScope._level = scope._level; newScope._span = scope._span; newScope._transactionName = scope._transactionName; newScope._fingerprint = scope._fingerprint; newScope._eventProcessors = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__spread"])(scope._eventProcessors); } return newScope; }; /** * Add internal on change listener. Used for sub SDKs that need to store the scope. * @hidden */ Scope.prototype.addScopeListener = function (callback) { this._scopeListeners.push(callback); }; /** * @inheritDoc */ Scope.prototype.addEventProcessor = function (callback) { this._eventProcessors.push(callback); return this; }; /** * @inheritDoc */ Scope.prototype.setUser = function (user) { this._user = user || {}; this._notifyScopeListeners(); return this; }; /** * @inheritDoc */ Scope.prototype.setTags = function (tags) { this._tags = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._tags), tags); this._notifyScopeListeners(); return this; }; /** * @inheritDoc */ Scope.prototype.setTag = function (key, value) { var _a; this._tags = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._tags), (_a = {}, _a[key] = value, _a)); this._notifyScopeListeners(); return this; }; /** * @inheritDoc */ Scope.prototype.setExtras = function (extras) { this._extra = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._extra), extras); this._notifyScopeListeners(); return this; }; /** * @inheritDoc */ Scope.prototype.setExtra = function (key, extra) { var _a; this._extra = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._extra), (_a = {}, _a[key] = extra, _a)); this._notifyScopeListeners(); return this; }; /** * @inheritDoc */ Scope.prototype.setFingerprint = function (fingerprint) { this._fingerprint = fingerprint; this._notifyScopeListeners(); return this; }; /** * @inheritDoc */ Scope.prototype.setLevel = function (level) { this._level = level; this._notifyScopeListeners(); return this; }; /** * @inheritDoc */ Scope.prototype.setTransactionName = function (name) { this._transactionName = name; this._notifyScopeListeners(); return this; }; /** * Can be removed in major version. * @deprecated in favor of {@link this.setTransactionName} */ Scope.prototype.setTransaction = function (name) { return this.setTransactionName(name); }; /** * @inheritDoc */ Scope.prototype.setContext = function (key, context) { var _a; if (context === null) { // eslint-disable-next-line @typescript-eslint/no-dynamic-delete delete this._contexts[key]; } else { this._contexts = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._contexts), (_a = {}, _a[key] = context, _a)); } this._notifyScopeListeners(); return this; }; /** * @inheritDoc */ Scope.prototype.setSpan = function (span) { this._span = span; this._notifyScopeListeners(); return this; }; /** * @inheritDoc */ Scope.prototype.getSpan = function () { return this._span; }; /** * @inheritDoc */ Scope.prototype.getTransaction = function () { var _a, _b, _c, _d; // often, this span will be a transaction, but it's not guaranteed to be var span = this.getSpan(); // try it the new way first if ((_a = span) === null || _a === void 0 ? void 0 : _a.transaction) { return (_b = span) === null || _b === void 0 ? void 0 : _b.transaction; } // fallback to the old way (known bug: this only finds transactions with sampled = true) if ((_d = (_c = span) === null || _c === void 0 ? void 0 : _c.spanRecorder) === null || _d === void 0 ? void 0 : _d.spans[0]) { return span.spanRecorder.spans[0]; } // neither way found a transaction return undefined; }; /** * @inheritDoc */ Scope.prototype.update = function (captureContext) { if (!captureContext) { return this; } if (typeof captureContext === 'function') { var updatedScope = captureContext(this); return updatedScope instanceof Scope ? updatedScope : this; } if (captureContext instanceof Scope) { this._tags = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._tags), captureContext._tags); this._extra = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._extra), captureContext._extra); this._contexts = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._contexts), captureContext._contexts); if (captureContext._user) { this._user = captureContext._user; } if (captureContext._level) { this._level = captureContext._level; } if (captureContext._fingerprint) { this._fingerprint = captureContext._fingerprint; } } else if (Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["y" /* isPlainObject */])(captureContext)) { // eslint-disable-next-line no-param-reassign captureContext = captureContext; this._tags = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._tags), captureContext.tags); this._extra = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._extra), captureContext.extra); this._contexts = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._contexts), captureContext.contexts); if (captureContext.user) { this._user = captureContext.user; } if (captureContext.level) { this._level = captureContext.level; } if (captureContext.fingerprint) { this._fingerprint = captureContext.fingerprint; } } return this; }; /** * @inheritDoc */ Scope.prototype.clear = function () { this._breadcrumbs = []; this._tags = {}; this._extra = {}; this._user = {}; this._contexts = {}; this._level = undefined; this._transactionName = undefined; this._fingerprint = undefined; this._span = undefined; this._notifyScopeListeners(); return this; }; /** * @inheritDoc */ Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) { var mergedBreadcrumb = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({ timestamp: Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["i" /* dateTimestampInSeconds */])() }, breadcrumb); this._breadcrumbs = maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0 ? Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__spread"])(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxBreadcrumbs) : Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__spread"])(this._breadcrumbs, [mergedBreadcrumb]); this._notifyScopeListeners(); return this; }; /** * @inheritDoc */ Scope.prototype.clearBreadcrumbs = function () { this._breadcrumbs = []; this._notifyScopeListeners(); return this; }; /** * Applies the current context and fingerprint to the event. * Note that breadcrumbs will be added by the client. * Also if the event has already breadcrumbs on it, we do not merge them. * @param event Event * @param hint May contain additional informartion about the original exception. * @hidden */ Scope.prototype.applyToEvent = function (event, hint) { if (this._extra && Object.keys(this._extra).length) { event.extra = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._extra), event.extra); } if (this._tags && Object.keys(this._tags).length) { event.tags = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._tags), event.tags); } if (this._user && Object.keys(this._user).length) { event.user = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._user), event.user); } if (this._contexts && Object.keys(this._contexts).length) { event.contexts = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, this._contexts), event.contexts); } if (this._level) { event.level = this._level; } if (this._transactionName) { event.transaction = this._transactionName; } // We want to set the trace context for normal events only if there isn't already // a trace context on the event. There is a product feature in place where we link // errors with transaction and it relys on that. if (this._span) { event.contexts = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({ trace: this._span.getTraceContext() }, event.contexts); } this._applyFingerprint(event); event.breadcrumbs = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__spread"])((event.breadcrumbs || []), this._breadcrumbs); event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined; return this._notifyEventProcessors(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__spread"])(getGlobalEventProcessors(), this._eventProcessors), event, hint); }; /** * This will be called after {@link applyToEvent} is finished. */ Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) { var _this = this; if (index === void 0) { index = 0; } return new __WEBPACK_IMPORTED_MODULE_1__sentry_utils__["d" /* SyncPromise */](function (resolve, reject) { var processor = processors[index]; if (event === null || typeof processor !== 'function') { resolve(event); } else { var result = processor(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, event), hint); if (Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["B" /* isThenable */])(result)) { result .then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); }) .then(null, reject); } else { _this._notifyEventProcessors(processors, result, hint, index + 1) .then(resolve) .then(null, reject); } } }); }; /** * This will be called on every set call. */ Scope.prototype._notifyScopeListeners = function () { var _this = this; if (!this._notifyingListeners) { this._notifyingListeners = true; setTimeout(function () { _this._scopeListeners.forEach(function (callback) { callback(_this); }); _this._notifyingListeners = false; }); } }; /** * Applies fingerprint from the scope to the event if there's one, * uses message if there's one instead or get rid of empty fingerprint */ Scope.prototype._applyFingerprint = function (event) { // Make sure it's an array first and we actually have something in place event.fingerprint = event.fingerprint ? Array.isArray(event.fingerprint) ? event.fingerprint : [event.fingerprint] : []; // If we have something on the scope, then merge it with event if (this._fingerprint) { event.fingerprint = event.fingerprint.concat(this._fingerprint); } // If we have no data at all, remove empty array default if (event.fingerprint && !event.fingerprint.length) { delete event.fingerprint; } }; return Scope; }()); /** * Retruns the global event processors. */ function getGlobalEventProcessors() { var global = Object(__WEBPACK_IMPORTED_MODULE_1__sentry_utils__["n" /* getGlobalObject */])(); global.__SENTRY__ = global.__SENTRY__ || {}; global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || []; return global.__SENTRY__.globalEventProcessors; } /** * Add a EventProcessor to be kept globally. * @param callback EventProcessor to add */ function addGlobalEventProcessor(callback) { getGlobalEventProcessors().push(callback); } //# sourceMappingURL=scope.js.map /***/ }), /* 1025 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = htmlTreeAsString; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is__ = __webpack_require__(223); /** * Given a child DOM element, returns a query-selector statement describing that * and its ancestors * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz] * @returns generated DOM path */ function htmlTreeAsString(elem) { // try/catch both: // - accessing event.target (see getsentry/raven-js#838, #768) // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly // - can throw an exception in some circumstances. try { var currentElem = elem; var MAX_TRAVERSE_HEIGHT = 5; var MAX_OUTPUT_LEN = 80; var out = []; var height = 0; var len = 0; var separator = ' > '; var sepLength = separator.length; var nextStr = void 0; // eslint-disable-next-line no-plusplus while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) { nextStr = _htmlElementAsString(currentElem); // bail out if // - nextStr is the 'html' element // - the length of the string that would be created exceeds MAX_OUTPUT_LEN // (ignore this limit if we are on the first iteration) if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) { break; } out.push(nextStr); len += nextStr.length; currentElem = currentElem.parentNode; } return out.reverse().join(separator); } catch (_oO) { return ''; } } /** * Returns a simple, query-selector representation of a DOM element * e.g. [HTMLElement] => input#foo.btn[name=baz] * @returns generated DOM path */ function _htmlElementAsString(el) { var elem = el; var out = []; var className; var classes; var key; var attr; var i; if (!elem || !elem.tagName) { return ''; } out.push(elem.tagName.toLowerCase()); if (elem.id) { out.push("#" + elem.id); } // eslint-disable-next-line prefer-const className = elem.className; if (className && Object(__WEBPACK_IMPORTED_MODULE_0__is__["k" /* isString */])(className)) { classes = className.split(/\s+/); for (i = 0; i < classes.length; i++) { out.push("." + classes[i]); } } var allowedAttrs = ['type', 'name', 'title', 'alt']; for (i = 0; i < allowedAttrs.length; i++) { key = allowedAttrs[i]; attr = elem.getAttribute(key); if (attr) { out.push("[" + key + "=\"" + attr + "\"]"); } } return out.join(''); } //# sourceMappingURL=browser.js.map /***/ }), /* 1026 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Memo; }); /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /** * Memo class used for decycle json objects. Uses WeakSet if available otherwise array. */ var Memo = /** @class */ (function () { function Memo() { this._hasWeakSet = typeof WeakSet === 'function'; this._inner = this._hasWeakSet ? new WeakSet() : []; } /** * Sets obj to remember. * @param obj Object to remember */ Memo.prototype.memoize = function (obj) { if (this._hasWeakSet) { if (this._inner.has(obj)) { return true; } this._inner.add(obj); return false; } // eslint-disable-next-line @typescript-eslint/prefer-for-of for (var i = 0; i < this._inner.length; i++) { var value = this._inner[i]; if (value === obj) { return true; } } this._inner.push(obj); return false; }; /** * Removes object from internal storage. * @param obj Object to forget */ Memo.prototype.unmemoize = function (obj) { if (this._hasWeakSet) { this._inner.delete(obj); } else { for (var i = 0; i < this._inner.length; i++) { if (this._inner[i] === obj) { this._inner.splice(i, 1); break; } } } }; return Memo; }()); //# sourceMappingURL=memo.js.map /***/ }), /* 1027 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export supportsErrorEvent */ /* unused harmony export supportsDOMError */ /* unused harmony export supportsDOMException */ /* harmony export (immutable) */ __webpack_exports__["a"] = supportsFetch; /* harmony export (immutable) */ __webpack_exports__["c"] = supportsNativeFetch; /* unused harmony export supportsReportingObserver */ /* harmony export (immutable) */ __webpack_exports__["d"] = supportsReferrerPolicy; /* harmony export (immutable) */ __webpack_exports__["b"] = supportsHistory; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__logger__ = __webpack_require__(622); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__misc__ = __webpack_require__(337); /** * Tells whether current environment supports ErrorEvent objects * {@link supportsErrorEvent}. * * @returns Answer to the given question. */ function supportsErrorEvent() { try { new ErrorEvent(''); return true; } catch (e) { return false; } } /** * Tells whether current environment supports DOMError objects * {@link supportsDOMError}. * * @returns Answer to the given question. */ function supportsDOMError() { try { // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError': // 1 argument required, but only 0 present. // @ts-ignore It really needs 1 argument, not 0. new DOMError(''); return true; } catch (e) { return false; } } /** * Tells whether current environment supports DOMException objects * {@link supportsDOMException}. * * @returns Answer to the given question. */ function supportsDOMException() { try { new DOMException(''); return true; } catch (e) { return false; } } /** * Tells whether current environment supports Fetch API * {@link supportsFetch}. * * @returns Answer to the given question. */ function supportsFetch() { if (!('fetch' in Object(__WEBPACK_IMPORTED_MODULE_1__misc__["e" /* getGlobalObject */])())) { return false; } try { new Headers(); new Request(''); new Response(); return true; } catch (e) { return false; } } /** * isNativeFetch checks if the given function is a native implementation of fetch() */ // eslint-disable-next-line @typescript-eslint/ban-types function isNativeFetch(func) { return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); } /** * Tells whether current environment supports Fetch API natively * {@link supportsNativeFetch}. * * @returns true if `window.fetch` is natively implemented, false otherwise */ function supportsNativeFetch() { if (!supportsFetch()) { return false; } var global = Object(__WEBPACK_IMPORTED_MODULE_1__misc__["e" /* getGlobalObject */])(); // Fast path to avoid DOM I/O // eslint-disable-next-line @typescript-eslint/unbound-method if (isNativeFetch(global.fetch)) { return true; } // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension) // so create a "pure" iframe to see if that has native fetch var result = false; var doc = global.document; // eslint-disable-next-line deprecation/deprecation if (doc && typeof doc.createElement === "function") { try { var sandbox = doc.createElement('iframe'); sandbox.hidden = true; doc.head.appendChild(sandbox); if (sandbox.contentWindow && sandbox.contentWindow.fetch) { // eslint-disable-next-line @typescript-eslint/unbound-method result = isNativeFetch(sandbox.contentWindow.fetch); } doc.head.removeChild(sandbox); } catch (err) { __WEBPACK_IMPORTED_MODULE_0__logger__["a" /* logger */].warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err); } } return result; } /** * Tells whether current environment supports ReportingObserver API * {@link supportsReportingObserver}. * * @returns Answer to the given question. */ function supportsReportingObserver() { return 'ReportingObserver' in Object(__WEBPACK_IMPORTED_MODULE_1__misc__["e" /* getGlobalObject */])(); } /** * Tells whether current environment supports Referrer Policy API * {@link supportsReferrerPolicy}. * * @returns Answer to the given question. */ function supportsReferrerPolicy() { // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default // https://caniuse.com/#feat=referrer-policy // It doesn't. And it throw exception instead of ignoring this parameter... // REF: https://github.com/getsentry/raven-js/issues/1233 if (!supportsFetch()) { return false; } try { new Request('_', { referrerPolicy: 'origin', }); return true; } catch (e) { return false; } } /** * Tells whether current environment supports History API * {@link supportsHistory}. * * @returns Answer to the given question. */ function supportsHistory() { // NOTE: in Chrome App environment, touching history.pushState, *even inside // a try/catch block*, will cause Chrome to output an error to console.error // borrowed from: https://github.com/angular/angular.js/pull/13945/files var global = Object(__WEBPACK_IMPORTED_MODULE_1__misc__["e" /* getGlobalObject */])(); /* eslint-disable @typescript-eslint/no-unsafe-member-access */ // eslint-disable-next-line @typescript-eslint/no-explicit-any var chrome = global.chrome; var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime; /* eslint-enable @typescript-eslint/no-unsafe-member-access */ var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState; return !isChromePackagedApp && hasHistoryApi; } //# sourceMappingURL=supports.js.map /***/ }), /* 1028 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SyncPromise; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is__ = __webpack_require__(223); /* eslint-disable @typescript-eslint/explicit-function-return-type */ /* eslint-disable @typescript-eslint/typedef */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/no-explicit-any */ /** SyncPromise internal states */ var States; (function (States) { /** Pending */ States["PENDING"] = "PENDING"; /** Resolved / OK */ States["RESOLVED"] = "RESOLVED"; /** Rejected / Error */ States["REJECTED"] = "REJECTED"; })(States || (States = {})); /** * Thenable class that behaves like a Promise and follows it's interface * but is not async internally */ var SyncPromise = /** @class */ (function () { function SyncPromise(executor) { var _this = this; this._state = States.PENDING; this._handlers = []; /** JSDoc */ this._resolve = function (value) { _this._setResult(States.RESOLVED, value); }; /** JSDoc */ this._reject = function (reason) { _this._setResult(States.REJECTED, reason); }; /** JSDoc */ this._setResult = function (state, value) { if (_this._state !== States.PENDING) { return; } if (Object(__WEBPACK_IMPORTED_MODULE_0__is__["m" /* isThenable */])(value)) { value.then(_this._resolve, _this._reject); return; } _this._state = state; _this._value = value; _this._executeHandlers(); }; // TODO: FIXME /** JSDoc */ this._attachHandler = function (handler) { _this._handlers = _this._handlers.concat(handler); _this._executeHandlers(); }; /** JSDoc */ this._executeHandlers = function () { if (_this._state === States.PENDING) { return; } var cachedHandlers = _this._handlers.slice(); _this._handlers = []; cachedHandlers.forEach(function (handler) { if (handler.done) { return; } if (_this._state === States.RESOLVED) { if (handler.onfulfilled) { // eslint-disable-next-line @typescript-eslint/no-floating-promises handler.onfulfilled(_this._value); } } if (_this._state === States.REJECTED) { if (handler.onrejected) { handler.onrejected(_this._value); } } handler.done = true; }); }; try { executor(this._resolve, this._reject); } catch (e) { this._reject(e); } } /** JSDoc */ SyncPromise.resolve = function (value) { return new SyncPromise(function (resolve) { resolve(value); }); }; /** JSDoc */ SyncPromise.reject = function (reason) { return new SyncPromise(function (_, reject) { reject(reason); }); }; /** JSDoc */ SyncPromise.all = function (collection) { return new SyncPromise(function (resolve, reject) { if (!Array.isArray(collection)) { reject(new TypeError("Promise.all requires an array as input.")); return; } if (collection.length === 0) { resolve([]); return; } var counter = collection.length; var resolvedCollection = []; collection.forEach(function (item, index) { SyncPromise.resolve(item) .then(function (value) { resolvedCollection[index] = value; counter -= 1; if (counter !== 0) { return; } resolve(resolvedCollection); }) .then(null, reject); }); }); }; /** JSDoc */ SyncPromise.prototype.then = function (onfulfilled, onrejected) { var _this = this; return new SyncPromise(function (resolve, reject) { _this._attachHandler({ done: false, onfulfilled: function (result) { if (!onfulfilled) { // TODO: ¯\_(ツ)_/¯ // TODO: FIXME resolve(result); return; } try { resolve(onfulfilled(result)); return; } catch (e) { reject(e); return; } }, onrejected: function (reason) { if (!onrejected) { reject(reason); return; } try { resolve(onrejected(reason)); return; } catch (e) { reject(e); return; } }, }); }); }; /** JSDoc */ SyncPromise.prototype.catch = function (onrejected) { return this.then(function (val) { return val; }, onrejected); }; /** JSDoc */ SyncPromise.prototype.finally = function (onfinally) { var _this = this; return new SyncPromise(function (resolve, reject) { var val; var isRejected; return _this.then(function (value) { isRejected = false; val = value; if (onfinally) { onfinally(); } }, function (reason) { isRejected = true; val = reason; if (onfinally) { onfinally(); } }).then(function () { if (isRejected) { reject(val); return; } resolve(val); }); }); }; /** JSDoc */ SyncPromise.prototype.toString = function () { return '[object SyncPromise]'; }; return SyncPromise; }()); //# sourceMappingURL=syncpromise.js.map /***/ }), /* 1029 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NoopTransport; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sentry_types__ = __webpack_require__(182); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sentry_utils__ = __webpack_require__(52); /** Noop transport */ var NoopTransport = /** @class */ (function () { function NoopTransport() { } /** * @inheritDoc */ NoopTransport.prototype.sendEvent = function (_) { return __WEBPACK_IMPORTED_MODULE_1__sentry_utils__["d" /* SyncPromise */].resolve({ reason: "NoopTransport: Event has been skipped because no Dsn is configured.", status: __WEBPACK_IMPORTED_MODULE_0__sentry_types__["b" /* Status */].Skipped, }); }; /** * @inheritDoc */ NoopTransport.prototype.close = function (_) { return __WEBPACK_IMPORTED_MODULE_1__sentry_utils__["d" /* SyncPromise */].resolve(true); }; return NoopTransport; }()); //# sourceMappingURL=noop.js.map /***/ }), /* 1030 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BrowserClient; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(45); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sentry_core__ = __webpack_require__(102); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__sentry_utils__ = __webpack_require__(52); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__backend__ = __webpack_require__(2076); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__helpers__ = __webpack_require__(338); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__integrations__ = __webpack_require__(630); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__version__ = __webpack_require__(1033); /** * The Sentry Browser SDK Client. * * @see BrowserOptions for documentation on configuration options. * @see SentryClient for usage documentation. */ var BrowserClient = /** @class */ (function (_super) { Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__extends"])(BrowserClient, _super); /** * Creates a new Browser SDK instance. * * @param options Configuration options for this SDK. */ function BrowserClient(options) { if (options === void 0) { options = {}; } return _super.call(this, __WEBPACK_IMPORTED_MODULE_3__backend__["a" /* BrowserBackend */], options) || this; } /** * Show a report dialog to the user to send feedback to a specific event. * * @param options Set individual options for the dialog */ BrowserClient.prototype.showReportDialog = function (options) { if (options === void 0) { options = {}; } // doesn't work without a document (React Native) var document = Object(__WEBPACK_IMPORTED_MODULE_2__sentry_utils__["n" /* getGlobalObject */])().document; if (!document) { return; } if (!this._isEnabled()) { __WEBPACK_IMPORTED_MODULE_2__sentry_utils__["C" /* logger */].error('Trying to call showReportDialog with Sentry Client disabled'); return; } Object(__WEBPACK_IMPORTED_MODULE_4__helpers__["a" /* injectReportDialog */])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, options), { dsn: options.dsn || this.getDsn() })); }; /** * @inheritDoc */ BrowserClient.prototype._prepareEvent = function (event, scope, hint) { event.platform = event.platform || 'javascript'; event.sdk = Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])(Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__assign"])({}, event.sdk), { name: __WEBPACK_IMPORTED_MODULE_6__version__["a" /* SDK_NAME */], packages: Object(__WEBPACK_IMPORTED_MODULE_0_tslib__["__spread"])(((event.sdk && event.sdk.packages) || []), [ { name: 'npm:@sentry/browser', version: __WEBPACK_IMPORTED_MODULE_6__version__["b" /* SDK_VERSION */], }, ]), version: __WEBPACK_IMPORTED_MODULE_6__version__["b" /* SDK_VERSION */] }); return _super.prototype._prepareEvent.call(this, event, scope, hint); }; /** * @inheritDoc */ BrowserClient.prototype._sendEvent = function (event) { var integration = this.getIntegration(__WEBPACK_IMPORTED_MODULE_5__integrations__["Breadcrumbs"]); if (integration) { integration.addSentryBreadcrumb(event); } _super.prototype._sendEvent.call(this, event); }; return BrowserClient; }(__WEBPACK_IMPORTED_MODULE_1__sentry_core__["c" /* BaseClient */])); //# sourceMappingURL=client.js.map /***/ }), /* 1031 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["c"] = exceptionFromStacktrace; /* harmony export (immutable) */ __webpack_exports__["a"] = eventFromPlainObject; /* harmony export (immutable) */ __webpack_exports__["b"] = eventFromStacktrace; /* harmony export (immutable) */ __webpack_exports__["d"] = prepareFramesForEvent; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sentry_utils__ = __webpack_require__(52); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__tracekit__ = __webpack_require__(628); var STACKTRACE_LIMIT = 50; /** * This function creates an exception from an TraceKitStackTrace * @param stacktrace TraceKitStackTrace that will be converted to an exception * @hidden */ function exceptionFromStacktrace(stacktrace) { var frames = prepareFramesForEvent(stacktrace.stack); var exception = { type: stacktrace.name, value: stacktrace.message, }; if (frames && frames.length) { exception.stacktrace = { frames: frames }; } if (exception.type === undefined && exception.value === '') { exception.value = 'Unrecoverable error caught'; } return exception; } /** * @hidden */ function eventFromPlainObject(exception, syntheticException, rejection) { var event = { exception: { values: [ { type: Object(__WEBPACK_IMPORTED_MODULE_0__sentry_utils__["u" /* isEvent */])(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error', value: "Non-Error " + (rejection ? 'promise rejection' : 'exception') + " captured with keys: " + Object(__WEBPACK_IMPORTED_MODULE_0__sentry_utils__["j" /* extractExceptionKeysForMessage */])(exception), }, ], }, extra: { __serialized__: Object(__WEBPACK_IMPORTED_MODULE_0__sentry_utils__["E" /* normalizeToSize */])(exception), }, }; if (syntheticException) { var stacktrace = Object(__WEBPACK_IMPORTED_MODULE_1__tracekit__["a" /* computeStackTrace */])(syntheticException); var frames_1 = prepareFramesForEvent(stacktrace.stack); event.stacktrace = { frames: frames_1, }; } return event; } /** * @hidden */ function eventFromStacktrace(stacktrace) { var exception = exceptionFromStacktrace(stacktrace); return { exception: { values: [exception], }, }; } /** * @hidden */ function prepareFramesForEvent(stack) { if (!stack || !stack.length) { return []; } var localStack = stack; var firstFrameFunction = localStack[0].func || ''; var lastFrameFunction = localStack[localStack.length - 1].func || ''; // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call) if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) { localStack = localStack.slice(1); } // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call) if (lastFrameFunction.indexOf('sentryWrapped') !== -1) { localStack = localStack.slice(0, -1); } // The frame where the crash happened, should be the last entry in the array return localStack .slice(0, STACKTRACE_LIMIT) .map(function (frame) { return ({ colno: frame.column === null ? undefined : frame.column, filename: frame.url || localStack[0].url, function: frame.func || '?', in_app: true, lineno: frame.line === null ? undefined : frame.line, }); }) .reverse(); } //# sourceMappingURL=parsers.js.map /***/ }), /* 1032 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__base__ = __webpack_require__(629); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BaseTransport", function() { return __WEBPACK_IMPORTED_MODULE_0__base__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__fetch__ = __webpack_require__(2077); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FetchTransport", function() { return __WEBPACK_IMPORTED_MODULE_1__fetch__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__xhr__ = __webpack_require__(2078); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "XHRTransport", function() { return __WEBPACK_IMPORTED_MODULE_2__xhr__["a"]; }); //# sourceMappingURL=index.js.map /***/ }), /* 1033 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SDK_NAME; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SDK_VERSION; }); var SDK_NAME = 'sentry.javascript.browser'; var SDK_VERSION = '5.25.0'; //# sourceMappingURL=version.js.map /***/ }), /* 1034 */ /***/ (function(module, exports, __webpack_require__) { var createBaseFor = __webpack_require__(2086); /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = createBaseFor(); module.exports = baseFor; /***/ }), /* 1035 */ /***/ (function(module, exports, __webpack_require__) { var baseMerge = __webpack_require__(2089), createAssigner = __webpack_require__(2093); /** * This method is like `_.assign` except that it recursively merges own and * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 0.5.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @example * * var object = { * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * * var other = { * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * * _.merge(object, other); * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); }); module.exports = merge; /***/ }), /* 1036 */ /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(608), eq = __webpack_require__(332); /** * This function is like `assignValue` except that it doesn't assign * `undefined` values. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignMergeValue; /***/ }), /* 1037 */ /***/ (function(module, exports) { /** * Gets the value at `key`, unless `key` is "__proto__" or "constructor". * * @private * @param {Object} object The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function safeGet(object, key) { if (key === 'constructor' && typeof object[key] === 'function') { return; } if (key == '__proto__') { return; } return object[key]; } module.exports = safeGet; /***/ }), /* 1038 */ /***/ (function(module, exports, __webpack_require__) { var createFlow = __webpack_require__(2096); /** * Creates a function that returns the result of invoking the given functions * with the `this` binding of the created function, where each successive * invocation is supplied the return value of the previous. * * @static * @memberOf _ * @since 3.0.0 * @category Util * @param {...(Function|Function[])} [funcs] The functions to invoke. * @returns {Function} Returns the new composite function. * @see _.flowRight * @example * * function square(n) { * return n * n; * } * * var addSquare = _.flow([_.add, square]); * addSquare(1, 2); * // => 9 */ var flow = createFlow(); module.exports = flow; /***/ }), /* 1039 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var collections = _interopRequireWildcard(__webpack_require__(2099)); var _toJS = _interopRequireDefault(__webpack_require__(1040)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } var _default = { collections: collections, toJS: _toJS["default"] }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 1040 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = getToJSMemoized; function toJS(data) { if (data) { if (typeof data.toJS === 'function') { return data.toJS(); } throw new Error('the selector return a data which is not an immutable'); } return undefined; } /** * toJS is an higher order selector. * It modify a given selector to return the value as a POJO * Note: your selector must use only one selector * @param {function} selector the selector * @returns the POJO associated to the given selector */ function getToJSMemoized(selector) { if (typeof selector !== 'function') { throw new Error('selector must be a function in cmf.selectors.toJS(selector)'); } var cache = {}; function memoize(func) { return function () { if (cache.key === (arguments.length <= 0 ? undefined : arguments[0])) { return cache.value; } cache.key = arguments.length <= 0 ? undefined : arguments[0]; cache.value = func.apply(void 0, arguments); return cache.value; }; } var toJSMemoized = memoize(toJS); return function (state) { return toJSMemoized(selector(state)); }; } //# sourceMappingURL=toJS.js.map /***/ }), /* 1041 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _redux = __webpack_require__(181); var _reduxBatchedActions = __webpack_require__(2101); var _reduxThunk = _interopRequireDefault(__webpack_require__(2102)); var _invariant = _interopRequireDefault(__webpack_require__(51)); var _reducers = _interopRequireDefault(__webpack_require__(1042)); var _http = _interopRequireDefault(__webpack_require__(1043)); var _cmf = _interopRequireDefault(__webpack_require__(1044)); var _onError = _interopRequireDefault(__webpack_require__(431)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } /** * @typedef {Object} Store */ var preReducers = []; var enhancers = []; var middlewares = [_reduxThunk["default"], _cmf["default"], _onError["default"].middleware]; if (window) { // eslint-disable-next-line no-underscore-dangle if (window.__REDUX_DEVTOOLS_EXTENSION__) { // eslint-disable-next-line no-underscore-dangle enhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__()); } else if (window.devToolsExtension) { enhancers.push(window.devToolsExtension()); } } var defaultHttpMiddlewareOverwrite = false; /** * setHttpMiddleware overwrites the default http middleware * httpMiddleware NEED to be executed before cmfMiddleware * * @param middleware a http middleware */ function setHttpMiddleware(middleware) { var cmfMiddlewareIndex = middlewares.indexOf(_cmf["default"]); middlewares.splice(cmfMiddlewareIndex - 1, 0, middleware); defaultHttpMiddlewareOverwrite = true; } function addPreReducer(reducers) { if (typeof reducers === 'function') { preReducers.push(reducers); } else if (Array.isArray(reducers)) { preReducers.push.apply(preReducers, _toConsumableArray(reducers)); } } function preApplyReducer(reducer) { if (preReducers.length === 0) { return reducer; } var newReducer = function newReducer(state, action) { var newState = preReducers.reduce(function (accumulatedState, r) { return r(accumulatedState, action); }, state); return reducer(newState, action); }; return newReducer; } /** * Return the CMF reducer * @param {function|Object} appReducer [description] * @return {function} [description] */ function getReducer(appReducer) { var reducerObject = {}; if (appReducer) { if (_typeof(appReducer) === 'object') { reducerObject = _objectSpread({}, appReducer); } else if (typeof appReducer === 'function') { reducerObject = { app: appReducer }; } } else { (0, _invariant["default"])(true, 'Are you sure you want to bootstrap an app without reducers ?'); } if (!reducerObject.cmf) { reducerObject.cmf = _reducers["default"]; } return (0, _reduxBatchedActions.enableBatching)(preApplyReducer((0, _redux.combineReducers)(reducerObject))); } /** * return the array of all middleware needed for CMF to run * @param {array|function} middleware * @returns {array} of middlewares */ function getMiddlewares(middleware) { if (Array.isArray(middleware)) { middleware.forEach(function (mid) { if (middlewares.indexOf(mid) === -1) { middlewares.push(mid); } }); } else if (middleware) { middlewares.push(middleware); } if (!defaultHttpMiddlewareOverwrite) { setHttpMiddleware((0, _http["default"])()); } return middlewares; } /** * helper to create the store with all the things needed by CMF * the store look like this: * - root * |- app (with appReducer) * |- cmf (for the internals) * * @param {function} appReducer the reducer for your app. * @param {any} preloadedState if you want to create your state tree with initial values. * This is usefull for server side renderring * @param {function} enhancer The store enhancer * @param {Array|function} middleware redux middleware: http://redux.js.org/docs/api/applyMiddleware.html * @return {Object} The created store */ function initialize(appReducer, preloadedState, enhancer, middleware) { var reducer = getReducer(appReducer); if (typeof enhancer === 'function') { enhancers.push(enhancer); } var middles = getMiddlewares(middleware); var store = _redux.compose.apply(void 0, [_redux.applyMiddleware.apply(void 0, _toConsumableArray(middles))].concat(enhancers))(_redux.createStore)(reducer, preloadedState); return store; } var _default = { addPreReducer: addPreReducer, setHttpMiddleware: setHttpMiddleware, initialize: initialize, // for testing purepose only getReducer: getReducer, getMiddlewares: getMiddlewares }; exports["default"] = _default; //# sourceMappingURL=store.js.map /***/ }), /* 1042 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _redux = __webpack_require__(181); var _collectionsReducers = _interopRequireDefault(__webpack_require__(2103)); var _componentsReducers = __webpack_require__(2104); var _settingsReducers = __webpack_require__(2105); var _constant = _interopRequireDefault(__webpack_require__(74)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * @module react-cmf/lib/reducers * @see module:react-cmf/lib/reducers/collectionsReducers * @see module:react-cmf/lib/reducers/componentsReducers * @see module:react-cmf/lib/reducers/settingsReducers */ var defaultState = []; /** * errorsReducer */ function errorsReducer() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; var action = arguments.length > 1 ? arguments[1] : undefined; if (action.type === _constant["default"].ERROR) { return state.concat(action.error); } return state; } /** * exported API * @type {object} * @example import reducer from 'react-cmf/lib/reducers'; */ var _default = (0, _redux.combineReducers)({ collections: _collectionsReducers["default"], components: _componentsReducers.componentsReducers, settings: _settingsReducers.settingsReducers, errors: errorsReducer }); exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 1043 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "OPTIONS", { enumerable: true, get: function get() { return constants.OPTIONS; } }); Object.defineProperty(exports, "GET", { enumerable: true, get: function get() { return constants.GET; } }); Object.defineProperty(exports, "HEAD", { enumerable: true, get: function get() { return constants.HEAD; } }); Object.defineProperty(exports, "POST", { enumerable: true, get: function get() { return constants.POST; } }); Object.defineProperty(exports, "PUT", { enumerable: true, get: function get() { return constants.PUT; } }); Object.defineProperty(exports, "DELETE", { enumerable: true, get: function get() { return constants.DELETE; } }); Object.defineProperty(exports, "TRACE", { enumerable: true, get: function get() { return constants.TRACE; } }); Object.defineProperty(exports, "CONNECT", { enumerable: true, get: function get() { return constants.CONNECT; } }); Object.defineProperty(exports, "HTTP_METHODS", { enumerable: true, get: function get() { return constants.HTTP_METHODS; } }); exports["default"] = void 0; var _middleware = __webpack_require__(2106); var csrf = _interopRequireWildcard(__webpack_require__(633)); var constants = _interopRequireWildcard(__webpack_require__(425)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } _middleware.httpMiddleware.OPTIONS = constants.OPTIONS; _middleware.httpMiddleware.GET = constants.GET; _middleware.httpMiddleware.HEAD = constants.HEAD; _middleware.httpMiddleware.POST = constants.GET; _middleware.httpMiddleware.PUT = constants.PUT; _middleware.httpMiddleware.DELETE = constants.DELETE; _middleware.httpMiddleware.TRACE = constants.TRACE; _middleware.httpMiddleware.CONNECT = constants.CONNECT; _middleware.httpMiddleware.HTTP_METHODS = constants.HTTP_METHODS; _middleware.httpMiddleware.csrf = csrf; _middleware.httpMiddleware.constants = constants; var _default = _middleware.httpMiddleware; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 1044 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _actions = _interopRequireDefault(__webpack_require__(221)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var cmfMiddleware = function cmfMiddleware(store) { return function (next) { return function (action) { var config = action.cmf; if (!config) { return next(action); } if (config.collectionId && action.response) { store.dispatch(_actions["default"].collections.addOrReplace(config.collectionId, action.response)); } return next(action); }; }; }; var _default = cmfMiddleware; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 1045 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _allOf = _interopRequireDefault(__webpack_require__(2110)); var _getInState = _interopRequireDefault(__webpack_require__(2111)); var _includes = _interopRequireDefault(__webpack_require__(2112)); var _oneOf = _interopRequireDefault(__webpack_require__(2113)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = { 'cmf.collections.get': (0, _getInState["default"])('cmf.collections'), 'cmf.components.get': (0, _getInState["default"])('cmf.components'), 'cmf.collections.includes': (0, _includes["default"])('cmf.collections'), 'cmf.components.includes': (0, _includes["default"])('cmf.components'), 'cmf.collections.oneOf': (0, _oneOf["default"])('cmf.collections'), 'cmf.collections.allOf': (0, _allOf["default"])('cmf.collections') }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 1046 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = mergeModulesAndApp; var _cmfModule = _interopRequireDefault(__webpack_require__(2114)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _asyncIterator(iterable) { var method; if (typeof Symbol !== "undefined") { if (Symbol.asyncIterator) { method = iterable[Symbol.asyncIterator]; if (method != null) return method.call(iterable); } if (Symbol.iterator) { method = iterable[Symbol.iterator]; if (method != null) return method.call(iterable); } } throw new TypeError("Object is not async iterable"); } function getModule(_x) { return _getModule.apply(this, arguments); } function _getModule() { _getModule = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(module) { var init, syncModule, asyncModule; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: init = module.init, syncModule = _objectWithoutProperties(module, ["init"]); if (!init) { _context.next = 6; break; } _context.next = 4; return init(); case 4: asyncModule = _context.sent; return _context.abrupt("return", _objectSpread(_objectSpread({}, syncModule), asyncModule)); case 6: return _context.abrupt("return", syncModule); case 7: case "end": return _context.stop(); } } }, _callee); })); return _getModule.apply(this, arguments); } function find(_x2) { return _find.apply(this, arguments); } /** * This function find all modules then it merge all configurations * @return {Object} the configuration for cmf.bootstrap */ function _find() { _find = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(options) { var buff, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _loop, _iterator, _step, _value, _args3 = arguments; return regeneratorRuntime.wrap(function _callee2$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: buff = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : []; if (!options.modules) { _context3.next = 35; break; } _iteratorNormalCompletion = true; _didIteratorError = false; _context3.prev = 4; _loop = /*#__PURE__*/regeneratorRuntime.mark(function _loop() { var current, module; return regeneratorRuntime.wrap(function _loop$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: current = _value; if (current.id) { _context2.next = 3; break; } throw new Error('a cmf.module must have an id'); case 3: if (!buff.some(function (_ref) { var id = _ref.id; return current.id === id; })) { _context2.next = 7; break; } // eslint-disable-next-line no-console console.warn("cmf.bootstrap: 2 modules have the same id ".concat(current.id, ". This duplicated module will be skipped.")); _context2.next = 13; break; case 7: _context2.next = 9; return getModule(current); case 9: module = _context2.sent; buff.push(module); _context2.next = 13; return find(module, buff); case 13: case "end": return _context2.stop(); } } }, _loop); }); _iterator = _asyncIterator(options.modules); case 7: _context3.next = 9; return _iterator.next(); case 9: _step = _context3.sent; _iteratorNormalCompletion = _step.done; _context3.next = 13; return _step.value; case 13: _value = _context3.sent; if (_iteratorNormalCompletion) { _context3.next = 19; break; } return _context3.delegateYield(_loop(), "t0", 16); case 16: _iteratorNormalCompletion = true; _context3.next = 7; break; case 19: _context3.next = 25; break; case 21: _context3.prev = 21; _context3.t1 = _context3["catch"](4); _didIteratorError = true; _iteratorError = _context3.t1; case 25: _context3.prev = 25; _context3.prev = 26; if (!(!_iteratorNormalCompletion && _iterator["return"] != null)) { _context3.next = 30; break; } _context3.next = 30; return _iterator["return"](); case 30: _context3.prev = 30; if (!_didIteratorError) { _context3.next = 33; break; } throw _iteratorError; case 33: return _context3.finish(30); case 34: return _context3.finish(25); case 35: return _context3.abrupt("return", buff); case 36: case "end": return _context3.stop(); } } }, _callee2, null, [[4, 21, 25, 35], [26,, 30, 34]]); })); return _find.apply(this, arguments); } function mergeModulesAndApp(_x3) { return _mergeModulesAndApp.apply(this, arguments); } function _mergeModulesAndApp() { _mergeModulesAndApp = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(options) { var modules; return regeneratorRuntime.wrap(function _callee3$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: _context4.next = 2; return find(options); case 2: modules = _context4.sent; return _context4.abrupt("return", _cmfModule["default"].apply(void 0, _toConsumableArray(modules).concat([options]))); case 4: case "end": return _context4.stop(); } } }, _callee3); })); return _mergeModulesAndApp.apply(this, arguments); } mergeModulesAndApp.merge = _cmfModule["default"]; //# sourceMappingURL=cmfModule.js.map /***/ }), /* 1047 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports.getComponentName = getComponentName; exports.getComponentId = getComponentId; exports.getStateToProps = getStateToProps; exports.getDispatchToProps = getDispatchToProps; exports.getMergeProps = getMergeProps; exports["default"] = cmfConnect; var _propTypes = _interopRequireDefault(__webpack_require__(11)); var _react = _interopRequireWildcard(__webpack_require__(0)); var _hoistNonReactStatics = _interopRequireDefault(__webpack_require__(336)); var _reactImmutableProptypes = _interopRequireDefault(__webpack_require__(1048)); var _reactRedux = __webpack_require__(335); var _uuid = __webpack_require__(2115); var _actions = _interopRequireDefault(__webpack_require__(221)); var _actionCreator = _interopRequireDefault(__webpack_require__(179)); var _component = _interopRequireDefault(__webpack_require__(432)); var _constant = _interopRequireDefault(__webpack_require__(74)); var _expression = _interopRequireDefault(__webpack_require__(339)); var _onEvent = _interopRequireDefault(__webpack_require__(2118)); var _componentState = __webpack_require__(1051); var _settings = __webpack_require__(620); var _omit = _interopRequireDefault(__webpack_require__(2119)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _extends() { _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; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getComponentName(WrappedComponent) { return WrappedComponent.displayName || WrappedComponent.name || 'Component'; } function getComponentId(componentId, props) { if (typeof componentId === 'function') { return componentId(props) || 'default'; } else if (typeof componentId === 'string') { return componentId; } else if (props.componentId) { return props.componentId; } return 'default'; } function getStateToProps(_ref) { var defaultProps = _ref.defaultProps, componentId = _ref.componentId, ownProps = _ref.ownProps, state = _ref.state, mapStateToProps = _ref.mapStateToProps, WrappedComponent = _ref.WrappedComponent; var props = _objectSpread({}, defaultProps); var cmfProps = (0, _componentState.getStateProps)(state, getComponentName(WrappedComponent), getComponentId(componentId, ownProps)); _extends(props, cmfProps); var viewProps = (0, _settings.mapStateToViewProps)(state, ownProps, getComponentName(WrappedComponent), getComponentId(componentId, ownProps)); _extends(props, viewProps); var userProps = {}; if (mapStateToProps) { userProps = mapStateToProps(state, _objectSpread(_objectSpread({}, ownProps), props), cmfProps); } _extends(props, userProps); _extends(props, _expression["default"].mapStateToProps(state, _objectSpread(_objectSpread({}, ownProps), props))); return props; } function getDispatchToProps(_ref2) { var defaultState = _ref2.defaultState, dispatch = _ref2.dispatch, componentId = _ref2.componentId, mapDispatchToProps = _ref2.mapDispatchToProps, ownProps = _ref2.ownProps, WrappedComponent = _ref2.WrappedComponent; var cmfProps = (0, _componentState.getStateAccessors)(dispatch, getComponentName(WrappedComponent), getComponentId(componentId, ownProps), defaultState); cmfProps.dispatch = dispatch; cmfProps.getComponent = _component["default"].get; cmfProps.dispatchActionCreator = function (actionId, event, data, context) { dispatch(_actionCreator["default"].get(context, actionId)(event, data, context)); }; var userProps = {}; if (mapDispatchToProps) { if (process.env.NODE_ENV === 'development') { // eslint-disable-next-line no-console console.warn("DEPRECATION WARNING: mapDispatchToProps will be removed from cmfConnect.\n\t\t\tPlease use the injectedProps dispatchActionCreator or dispatch"); } userProps = mapDispatchToProps(dispatch, ownProps, cmfProps); } return _objectSpread(_objectSpread({}, cmfProps), userProps); } /** * Internal: you should not have to use this * return the merged props which cleanup expression props * call mergeProps if exists after the cleanup * @param {object} options { mergeProps, stateProps, dispatchProps, ownProps } */ function getMergeProps(_ref3) { var mergeProps = _ref3.mergeProps, stateProps = _ref3.stateProps, dispatchProps = _ref3.dispatchProps, ownProps = _ref3.ownProps; if (mergeProps) { return mergeProps(_expression["default"].mergeProps(stateProps), _expression["default"].mergeProps(dispatchProps), _expression["default"].mergeProps(ownProps)); } return _objectSpread(_objectSpread(_objectSpread({}, _expression["default"].mergeProps(ownProps)), _expression["default"].mergeProps(dispatchProps)), _expression["default"].mergeProps(stateProps)); } /** * this function wrap your component to inject CMF props * @example * The following props are injected: * - props.state * - props.setState * - props.initState (you should never have to call it your self) * - dispatch(action) * - dispatchActionCreator(id, event, data, [context]) * * support for the following props * - initialState (called by props.initState) * - didMountActionCreator (id or array of id) * - willUnMountActionCreator (id or array of id) * - componentId (or will use uuid) * - keepComponentState (boolean, overrides the keepComponentState defined in container) * - didMountActionCreator (string called as action creator in didMount) * - view (string to inject the settings as props with ref support) * - whateverExpression (will inject `whatever` props and will remove it) * @example * options has the following shape: { componentId, // string or function(props) to compute the id in the store defaultState, // the default state when the component is mount keepComponent, // boolean, when the component is unmount, to keep it's state in redux store mapStateToProps, // function(state, ownProps) that should return the props (same as redux) mapDispatchToProps, // same as redux connect arg, you should use dispatchActionCreator instead mergeProps, // same as redux connect } * @param {object} options Option objects to configure the redux connect * @return {ReactComponent} */ function cmfConnect() { var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, componentId = _ref4.componentId, defaultState = _ref4.defaultState, defaultProps = _ref4.defaultProps, keepComponentState = _ref4.keepComponentState, mapStateToProps = _ref4.mapStateToProps, mapDispatchToProps = _ref4.mapDispatchToProps, mergeProps = _ref4.mergeProps, _ref4$omitCMFProps = _ref4.omitCMFProps, omitCMFProps = _ref4$omitCMFProps === void 0 ? true : _ref4$omitCMFProps, _ref4$withComponentRe = _ref4.withComponentRegistry, withComponentRegistry = _ref4$withComponentRe === void 0 ? false : _ref4$withComponentRe, _ref4$withDispatch = _ref4.withDispatch, withDispatch = _ref4$withDispatch === void 0 ? false : _ref4$withDispatch, _ref4$withDispatchAct = _ref4.withDispatchActionCreator, withDispatchActionCreator = _ref4$withDispatchAct === void 0 ? false : _ref4$withDispatchAct, _ref4$withComponentId = _ref4.withComponentId, withComponentId = _ref4$withComponentId === void 0 ? false : _ref4$withComponentId, rest = _objectWithoutProperties(_ref4, ["componentId", "defaultState", "defaultProps", "keepComponentState", "mapStateToProps", "mapDispatchToProps", "mergeProps", "omitCMFProps", "withComponentRegistry", "withDispatch", "withDispatchActionCreator", "withComponentId"]); var propsToOmit = []; if (omitCMFProps) { if (!defaultState) { propsToOmit.push.apply(propsToOmit, _toConsumableArray(_constant["default"].INJECTED_STATE_PROPS)); } if (!withComponentRegistry) { propsToOmit.push('getComponent'); } if (!withComponentId) { propsToOmit.push('componentId'); } if (!withDispatch) { propsToOmit.push('dispatch'); } if (!withDispatchActionCreator) { propsToOmit.push('dispatchActionCreator'); } } var displayNameWarning = true; return function wrapWithCMF(WrappedComponent) { if (!WrappedComponent.displayName && displayNameWarning) { displayNameWarning = false; // eslint-disable-next-line no-console console.warn("".concat(WrappedComponent.name, " has no displayName. Please read https://jira.talendforge.org/browse/TUI-302")); } function getState(state) { var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default'; return state.cmf.components.getIn([getComponentName(WrappedComponent), id], defaultState); } function getSetStateAction(state, id, type) { return { type: type || "".concat(getComponentName(WrappedComponent), ".setState"), cmf: { componentState: _actions["default"].components.mergeState(getComponentName(WrappedComponent), id, state) } }; } var CMFContainer = /*#__PURE__*/function (_React$Component) { _inherits(CMFContainer, _React$Component); var _super = _createSuper(CMFContainer); function CMFContainer(props, context) { var _this; _classCallCheck(this, CMFContainer); _this = _super.call(this, props, context); _this.dispatchActionCreator = _this.dispatchActionCreator.bind(_assertThisInitialized(_this)); _this.getOnEventProps = _this.getOnEventProps.bind(_assertThisInitialized(_this)); _this.id = (0, _uuid.v4)(); return _this; } _createClass(CMFContainer, [{ key: "componentDidMount", value: function componentDidMount() { (0, _componentState.initState)(this.props); if (this.props.saga) { this.dispatchActionCreator('cmf.saga.start', { type: 'DID_MOUNT', componentId: this.id }, _objectSpread(_objectSpread({}, this.props), {}, { // DEPRECATED componentId: getComponentId(componentId, this.props) })); } if (this.props.didMountActionCreator) { this.dispatchActionCreator(this.props.didMountActionCreator, null, this.props); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.props.willUnmountActionCreator) { this.dispatchActionCreator(this.props.willUnmountActionCreator, null, this.props); } // if the props.keepComponentState is present we have to stick to it if (this.props.keepComponentState === false || this.props.keepComponentState === undefined && !keepComponentState) { this.props.deleteState(this.props.initialState); } if (this.props.saga) { this.dispatchActionCreator('cmf.saga.stop', { type: 'WILL_UNMOUNT', componentId: this.id }, this.props); } } }, { key: "getOnEventProps", value: function getOnEventProps() { var _this2 = this; return Object.keys(this.props).reduce(function (props, key) { _onEvent["default"].addOnEventSupport(_onEvent["default"].DISPATCH, _this2, props, key); _onEvent["default"].addOnEventSupport(_onEvent["default"].ACTION_CREATOR, _this2, props, key); _onEvent["default"].addOnEventSupport(_onEvent["default"].SETSTATE, _this2, props, key); return props; }, { toOmit: [] }); } }, { key: "dispatchActionCreator", value: function dispatchActionCreator(actionCreatorId, event, data, context) { var extendedContext = _objectSpread(_objectSpread({}, this.context), context); this.props.dispatchActionCreator(actionCreatorId, event, data, extendedContext); } }, { key: "render", value: function render() { if (this.props.renderIf === false) { return null; } var _this$getOnEventProps = this.getOnEventProps(), toOmit = _this$getOnEventProps.toOmit, spreadCMFState = _this$getOnEventProps.spreadCMFState, handlers = _objectWithoutProperties(_this$getOnEventProps, ["toOmit", "spreadCMFState"]); // remove all internal props already used by the container toOmit.push.apply(toOmit, _toConsumableArray(_constant["default"].CMF_PROPS).concat(propsToOmit)); if (this.props.omitRouterProps) { toOmit.push.apply(toOmit, ['omitRouterProps'].concat(_toConsumableArray(_constant["default"].INJECTED_ROUTER_PROPS))); } var spreadedState = {}; if ((spreadCMFState || this.props.spreadCMFState) && this.props.state) { spreadedState = this.props.state.toJS(); } var props = _objectSpread(_objectSpread(_objectSpread({}, (0, _omit["default"])(this.props, toOmit)), handlers), spreadedState); if (props.dispatchActionCreator && props.dispatchActionCreator && toOmit.indexOf('dispatchActionCreator') === -1) { // override to inject CMFContainer context props.dispatchActionCreator = this.dispatchActionCreator; } if (!props.state && defaultState && toOmit.indexOf('state') === -1) { props.state = defaultState; } return /*#__PURE__*/(0, _react.createElement)(WrappedComponent, props); } }]); return CMFContainer; }(_react["default"].Component); _defineProperty(CMFContainer, "displayName", "CMF(".concat(getComponentName(WrappedComponent), ")")); _defineProperty(CMFContainer, "propTypes", _objectSpread({}, cmfConnect.propTypes)); _defineProperty(CMFContainer, "contextTypes", { store: _propTypes["default"].object, registry: _propTypes["default"].object, router: _propTypes["default"].object }); _defineProperty(CMFContainer, "WrappedComponent", WrappedComponent); _defineProperty(CMFContainer, "getState", getState); _defineProperty(CMFContainer, "setStateAction", function setStateAction(state) { var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default'; var type = arguments.length > 2 ? arguments[2] : undefined; if (typeof state !== 'function') { return getSetStateAction(state, id, type); } return function (_, getReduxState) { return getSetStateAction(state(getState(getReduxState(), id)), id, type); }; }); var Connected = (0, _reactRedux.connect)(function (state, ownProps) { return getStateToProps({ componentId: componentId, defaultProps: defaultProps, defaultState: defaultState, ownProps: ownProps, state: state, mapStateToProps: mapStateToProps, WrappedComponent: WrappedComponent }); }, function (dispatch, ownProps) { return getDispatchToProps({ defaultState: defaultState, dispatch: dispatch, componentId: componentId, mapDispatchToProps: mapDispatchToProps, ownProps: ownProps, WrappedComponent: WrappedComponent }); }, function (stateProps, dispatchProps, ownProps) { return getMergeProps({ mergeProps: mergeProps, stateProps: stateProps, dispatchProps: dispatchProps, ownProps: ownProps }); }, _objectSpread({}, rest))((0, _hoistNonReactStatics["default"])(CMFContainer, WrappedComponent)); Connected.CMFContainer = CMFContainer; return Connected; }; } cmfConnect.INJECTED_PROPS = _constant["default"].INJECTED_PROPS; cmfConnect.INJECTED_STATE_PROPS = _constant["default"].INJECTED_STATE_PROPS; cmfConnect.INJECTED_ROUTER_PROPS = _constant["default"].INJECTED_ROUTER_PROPS; cmfConnect.ALL_INJECTED_PROPS = _constant["default"].INJECTED_PROPS.concat(['getComponent', 'componentId']); cmfConnect.omit = _omit["default"]; cmfConnect.omitAllProps = function (props) { return cmfConnect.omit(props, cmfConnect.ALL_INJECTED_PROPS); }; cmfConnect.propTypes = { state: _reactImmutableProptypes["default"].map, initialState: _propTypes["default"].oneOfType([_reactImmutableProptypes["default"].map, _propTypes["default"].object]), getComponent: _propTypes["default"].func, setState: _propTypes["default"].func, initState: _propTypes["default"].func, dispatchActionCreator: _propTypes["default"].func, dispatch: _propTypes["default"].func }; //# sourceMappingURL=cmfConnect.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 1048 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * This is a straight rip-off of the React.js ReactPropTypes.js proptype validators, * modified to make it possible to validate Immutable.js data. * ImmutableTypes.listOf is patterned after React.PropTypes.arrayOf, but for Immutable.List * ImmutableTypes.shape is based on React.PropTypes.shape, but for any Immutable.Iterable */ var Immutable = __webpack_require__(81); var ANONYMOUS = "<>"; var ImmutablePropTypes; if (process.env.NODE_ENV !== "production") { ImmutablePropTypes = { listOf: createListOfTypeChecker, mapOf: createMapOfTypeChecker, orderedMapOf: createOrderedMapOfTypeChecker, setOf: createSetOfTypeChecker, orderedSetOf: createOrderedSetOfTypeChecker, stackOf: createStackOfTypeChecker, iterableOf: createIterableOfTypeChecker, recordOf: createRecordOfTypeChecker, shape: createShapeChecker, contains: createShapeChecker, mapContains: createMapContainsChecker, orderedMapContains: createOrderedMapContainsChecker, // Primitive Types list: createImmutableTypeChecker("List", Immutable.List.isList), map: createImmutableTypeChecker("Map", Immutable.Map.isMap), orderedMap: createImmutableTypeChecker("OrderedMap", Immutable.OrderedMap.isOrderedMap), set: createImmutableTypeChecker("Set", Immutable.Set.isSet), orderedSet: createImmutableTypeChecker("OrderedSet", Immutable.OrderedSet.isOrderedSet), stack: createImmutableTypeChecker("Stack", Immutable.Stack.isStack), seq: createImmutableTypeChecker("Seq", Immutable.Seq.isSeq), record: createImmutableTypeChecker("Record", function (isRecord) { return isRecord instanceof Immutable.Record; }), iterable: createImmutableTypeChecker("Iterable", Immutable.Iterable.isIterable) }; } else { var productionTypeChecker = function productionTypeChecker() { invariant(false, "ImmutablePropTypes type checking code is stripped in production."); }; productionTypeChecker.isRequired = productionTypeChecker; var getProductionTypeChecker = function getProductionTypeChecker() { return productionTypeChecker; }; ImmutablePropTypes = { listOf: getProductionTypeChecker, mapOf: getProductionTypeChecker, orderedMapOf: getProductionTypeChecker, setOf: getProductionTypeChecker, orderedSetOf: getProductionTypeChecker, stackOf: getProductionTypeChecker, iterableOf: getProductionTypeChecker, recordOf: getProductionTypeChecker, shape: getProductionTypeChecker, contains: getProductionTypeChecker, mapContains: getProductionTypeChecker, orderedMapContains: getProductionTypeChecker, // Primitive Types list: productionTypeChecker, map: productionTypeChecker, orderedMap: productionTypeChecker, set: productionTypeChecker, orderedSet: productionTypeChecker, stack: productionTypeChecker, seq: productionTypeChecker, record: productionTypeChecker, iterable: productionTypeChecker }; } ImmutablePropTypes.iterable.indexed = createIterableSubclassTypeChecker("Indexed", Immutable.Iterable.isIndexed); ImmutablePropTypes.iterable.keyed = createIterableSubclassTypeChecker("Keyed", Immutable.Iterable.isKeyed); function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return "array"; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return "object"; } if (propValue instanceof Immutable.Iterable) { return "Immutable." + propValue.toSource().split(" ")[0]; } return propType; } function createChainableTypeChecker(validate) { function checkType(isRequired, props, propName, componentName, location, propFullName) { for (var _len = arguments.length, rest = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) { rest[_key - 6] = arguments[_key]; } propFullName = propFullName || propName; componentName = componentName || ANONYMOUS; if (props[propName] == null) { var locationName = location; if (isRequired) { return new Error("Required " + locationName + " `" + propFullName + "` was not specified in " + ("`" + componentName + "`.")); } } else { return validate.apply(undefined, [props, propName, componentName, location, propFullName].concat(rest)); } } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; } function createImmutableTypeChecker(immutableClassName, immutableClassTypeValidator) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!immutableClassTypeValidator(propValue)) { var propType = getPropType(propValue); return new Error("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `" + immutableClassName + "`.")); } return null; } return createChainableTypeChecker(validate); } function createIterableSubclassTypeChecker(subclassName, validator) { return createImmutableTypeChecker("Iterable." + subclassName, function (propValue) { return Immutable.Iterable.isIterable(propValue) && validator(propValue); }); } function createIterableTypeChecker(typeChecker, immutableClassName, immutableClassTypeValidator) { function validate(props, propName, componentName, location, propFullName) { for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { rest[_key - 5] = arguments[_key]; } var propValue = props[propName]; if (!immutableClassTypeValidator(propValue)) { var locationName = location; var propType = getPropType(propValue); return new Error("Invalid " + locationName + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an Immutable.js " + immutableClassName + ".")); } if (typeof typeChecker !== "function") { return new Error("Invalid typeChecker supplied to `" + componentName + "` " + ("for propType `" + propFullName + "`, expected a function.")); } var propValues = propValue.valueSeq().toArray(); for (var i = 0, len = propValues.length; i < len; i++) { var error = typeChecker.apply(undefined, [propValues, i, componentName, location, "" + propFullName + "[" + i + "]"].concat(rest)); if (error instanceof Error) { return error; } } } return createChainableTypeChecker(validate); } function createKeysTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { rest[_key - 5] = arguments[_key]; } var propValue = props[propName]; if (typeof typeChecker !== "function") { return new Error("Invalid keysTypeChecker (optional second argument) supplied to `" + componentName + "` " + ("for propType `" + propFullName + "`, expected a function.")); } var keys = propValue.keySeq().toArray(); for (var i = 0, len = keys.length; i < len; i++) { var error = typeChecker.apply(undefined, [keys, i, componentName, location, "" + propFullName + " -> key(" + keys[i] + ")"].concat(rest)); if (error instanceof Error) { return error; } } } return createChainableTypeChecker(validate); } function createListOfTypeChecker(typeChecker) { return createIterableTypeChecker(typeChecker, "List", Immutable.List.isList); } function createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, immutableClassName, immutableClassTypeValidator) { function validate() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return createIterableTypeChecker(valuesTypeChecker, immutableClassName, immutableClassTypeValidator).apply(undefined, args) || keysTypeChecker && createKeysTypeChecker(keysTypeChecker).apply(undefined, args); } return createChainableTypeChecker(validate); } function createMapOfTypeChecker(valuesTypeChecker, keysTypeChecker) { return createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, "Map", Immutable.Map.isMap); } function createOrderedMapOfTypeChecker(valuesTypeChecker, keysTypeChecker) { return createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, "OrderedMap", Immutable.OrderedMap.isOrderedMap); } function createSetOfTypeChecker(typeChecker) { return createIterableTypeChecker(typeChecker, "Set", Immutable.Set.isSet); } function createOrderedSetOfTypeChecker(typeChecker) { return createIterableTypeChecker(typeChecker, "OrderedSet", Immutable.OrderedSet.isOrderedSet); } function createStackOfTypeChecker(typeChecker) { return createIterableTypeChecker(typeChecker, "Stack", Immutable.Stack.isStack); } function createIterableOfTypeChecker(typeChecker) { return createIterableTypeChecker(typeChecker, "Iterable", Immutable.Iterable.isIterable); } function createRecordOfTypeChecker(recordKeys) { function validate(props, propName, componentName, location, propFullName) { for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { rest[_key - 5] = arguments[_key]; } var propValue = props[propName]; if (!(propValue instanceof Immutable.Record)) { var propType = getPropType(propValue); var locationName = location; return new Error("Invalid " + locationName + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected an Immutable.js Record.")); } for (var key in recordKeys) { var checker = recordKeys[key]; if (!checker) { continue; } var mutablePropValue = propValue.toObject(); var error = checker.apply(undefined, [mutablePropValue, key, componentName, location, "" + propFullName + "." + key].concat(rest)); if (error) { return error; } } } return createChainableTypeChecker(validate); } // there is some irony in the fact that shapeTypes is a standard hash and not an immutable collection function createShapeTypeChecker(shapeTypes) { var immutableClassName = arguments[1] === undefined ? "Iterable" : arguments[1]; var immutableClassTypeValidator = arguments[2] === undefined ? Immutable.Iterable.isIterable : arguments[2]; function validate(props, propName, componentName, location, propFullName) { for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { rest[_key - 5] = arguments[_key]; } var propValue = props[propName]; if (!immutableClassTypeValidator(propValue)) { var propType = getPropType(propValue); var locationName = location; return new Error("Invalid " + locationName + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected an Immutable.js " + immutableClassName + ".")); } var mutablePropValue = propValue.toObject(); for (var key in shapeTypes) { var checker = shapeTypes[key]; if (!checker) { continue; } var error = checker.apply(undefined, [mutablePropValue, key, componentName, location, "" + propFullName + "." + key].concat(rest)); if (error) { return error; } } } return createChainableTypeChecker(validate); } function createShapeChecker(shapeTypes) { return createShapeTypeChecker(shapeTypes); } function createMapContainsChecker(shapeTypes) { return createShapeTypeChecker(shapeTypes, "Map", Immutable.Map.isMap); } function createOrderedMapContainsChecker(shapeTypes) { return createShapeTypeChecker(shapeTypes, "OrderedMap", Immutable.OrderedMap.isOrderedMap); } module.exports = ImmutablePropTypes; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 1049 */ /***/ (function(module, exports) { // Unique ID creation requires a high quality random # generator. In the // browser this is a little complicated due to unknown quality of Math.random() // and inconsistent support for the `crypto` API. We do the best we can via // feature-detection // getRandomValues needs to be invoked in a context where "this" is a Crypto // implementation. Also, find the complete implementation of crypto on IE11. var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto)); if (getRandomValues) { // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef module.exports = function whatwgRNG() { getRandomValues(rnds8); return rnds8; }; } else { // Math.random()-based (RNG) // // If all else fails, use Math.random(). It's fast, but is of unspecified // quality. var rnds = new Array(16); module.exports = function mathRNG() { for (var i = 0, r; i < 16; i++) { if ((i & 0x03) === 0) r = Math.random() * 0x100000000; rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; } return rnds; }; } /***/ }), /* 1050 */ /***/ (function(module, exports) { /** * Convert array of 16 byte values to UUID string format of the form: * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ var byteToHex = []; for (var i = 0; i < 256; ++i) { byteToHex[i] = (i + 0x100).toString(16).substr(1); } function bytesToUuid(buf, offset) { var i = offset || 0; var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 return ([ bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]] ]).join(''); } module.exports = bytesToUuid; /***/ }), /* 1051 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getStateProps = getStateProps; exports.initState = initState; exports.getStateAccessors = getStateAccessors; exports["default"] = exports.statePropTypes = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(11)); var _immutable = _interopRequireDefault(__webpack_require__(81)); var _actions = _interopRequireDefault(__webpack_require__(221)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /** * This module provide props.setState and props.state into * cmfConnected component. It exposes CMF propTypes * @module react-cmf/lib/componentState * @see module:react-cmf/lib/cmfConnect * @example import { cmfConnect, componentState } from '@talend/react-cmf'; class MyComponent extends React.Component { static propTypes = { ...componentState.propTypes, }; render() { // ... } } export default cmfConnect({})(MyComponent); */ function getStateProps(state, name) { var id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default'; return { state: state.cmf.components.getIn([name, id]) }; } function initState(props) { if (!props.state && props.initState) { props.initState(props.initialState); } } function getAction(_ref) { var name = _ref.name, id = _ref.id, operation = _ref.operation, componentState = _ref.componentState; return { id: id, type: "".concat(name, ".").concat(operation), cmf: { componentState: componentState } }; } function getStateAccessors(dispatch, name, id, DEFAULT_STATE) { var dispatchAction = function dispatchAction(operation, componentState) { dispatch(getAction({ id: id, name: name, componentState: componentState, operation: operation })); }; var accessors = { setState: function setState(state) { dispatch(function (_, getState) { var newState = state; if (typeof newState === 'function') { newState = state(getStateProps(getState(), name, id)); } var componentState = _actions["default"].components.mergeState(name, id, newState); dispatchAction('setState', componentState); }); }, initState: function initState(initialState) { var state; if (DEFAULT_STATE) { state = DEFAULT_STATE.merge(initialState); } else if (initialState) { state = _immutable["default"].Map.isMap(initialState) ? initialState : _immutable["default"].fromJS(initialState); } if (state) { var componentState = _actions["default"].components.addState(name, id, state); dispatchAction('initState', componentState); } }, deleteState: function deleteState(initialState) { if (DEFAULT_STATE || initialState) { var componentState = _actions["default"].components.removeState(name, id); dispatchAction('deleteState', componentState); } } }; accessors.updateState = function updateState(state) { // eslint-disable-next-line no-console console.warn('DEPRECATION WARNING: please use props.setState'); accessors.setState(state); }; return accessors; } // DEPRECATION Warning: Please use cmfConnect.propTypes var statePropTypes = { state: _propTypes["default"].object, initialState: _propTypes["default"].object, setState: _propTypes["default"].func, initState: _propTypes["default"].func }; exports.statePropTypes = statePropTypes; var _default = { propTypes: statePropTypes, init: initState, getProps: getStateProps, getAccessors: getStateAccessors }; exports["default"] = _default; //# sourceMappingURL=componentState.js.map /***/ }), /* 1052 */ /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(607), castPath = __webpack_require__(266), isIndex = __webpack_require__(331), isObject = __webpack_require__(112), toKey = __webpack_require__(267); /** * The base implementation of `_.set`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { if (!isObject(object)) { return object; } path = castPath(path, object); var index = -1, length = path.length, lastIndex = length - 1, nested = object; while (nested != null && ++index < length) { var key = toKey(path[index]), newValue = value; if (key === '__proto__' || key === 'constructor' || key === 'prototype') { return object; } if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; if (newValue === undefined) { newValue = isObject(objValue) ? objValue : (isIndex(path[index + 1]) ? [] : {}); } } assignValue(nested, key, newValue); nested = nested[key]; } return object; } module.exports = baseSet; /***/ }), /* 1053 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _get = _interopRequireDefault(__webpack_require__(101)); var _deprecated = _interopRequireDefault(__webpack_require__(2123)); var _actionCreator = _interopRequireDefault(__webpack_require__(179)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * This module is DEPRECATED and will be removed in future version. * it provide low level api to register and handle action in a CMF App. * @module react-cmf/lib/action * @see module:react-cmf/lib/Dispatcher */ /** * get the global actions registered in the settings * @param {object} context * @return {object} actions with key === action id */ function getActionsById(context) { var state = context.store.getState(); return (0, _get["default"])(state, 'cmf.settings.actions', {}); } /** * return actions registered for a given content type * @param {object} context * @param {String} contentType * @param {String} category * @return {Array} actions */ function getContentTypeActions(context, contentType, category) { var state = context.store.getState(); return (0, _get["default"])(state, "cmf.settings.contentTypes[".concat(contentType, ".actions[").concat(category, "]"), []); } /** * Return information available about this action * @param {object} context * @param {String} id * @return {object} */ function getActionInfo(context, id) { var action = getActionsById(context)[id]; if (!action) { throw new Error("action not found id: ".concat(id)); } return _objectSpread({}, action); } /** * Return the action object ready to be dispatched * This is supposed to be used outside of content type * @param {object} context * @param {String|Object} action or the action * @param {object} event event which have trigger this action * @param {object} data data attached to the action */ function getActionObject(context, action, event, data) { var actionInfo; if (typeof action === 'string') { actionInfo = getActionInfo(context, action); } else { actionInfo = action; } if (actionInfo.actionCreator) { var actionCreator = _actionCreator["default"].get(context, actionInfo.actionCreator); return actionCreator(event, data, { store: context.store, getState: context.store.getState, registry: context.registry, actionInfo: actionInfo }); } return _objectSpread(_objectSpread({}, actionInfo.payload), {}, { event: event, data: data, context: context }); } /** * return every props name that start with 'on' * @param {object} props react props * @return {Array} of string */ function getOnProps(props) { return Object.keys(props).filter(function (name) { return {}.hasOwnProperty.call(props, name) && /^on.+/.test(name); }); } /** * create a map dispatchable action function expecting event object, props, and context information * merge this map with non event properties * @param {Function} dispatch the dispatch function * @param {object} props props object containing maybe on(event) with string * or action creator function] * @return {object} the connected object * @throws if an action is unknown in configuration, throw */ function mapDispatchToProps(dispatch, props) { var resolvedActions = {}; getOnProps(props).forEach(function (name) { resolvedActions[name] = function (event, data, context) { var action = props[name]; if (typeof action === 'string') { action = getActionObject(context, action, event, data); } dispatch(action); }; }); return _objectSpread(_objectSpread({}, props), resolvedActions); } var registerActionCreator = (0, _deprecated["default"])(function (id, actionCreator, context) { return _actionCreator["default"].register(id, actionCreator, context); }, 'stop use cmf.action.registerActionCreator. please use cmf.actionCreator.register'); var getActionCreatorFunction = (0, _deprecated["default"])(function (context, id) { return _actionCreator["default"].get(context, id); }, 'stop use cmf.action.getActionCreatorFunction. please use cmf.actionCreator.get'); var _default = { getActionsById: getActionsById, getActionCreatorFunction: getActionCreatorFunction, getActionInfo: getActionInfo, getActionObject: getActionObject, getContentTypeActions: getContentTypeActions, getOnProps: getOnProps, mapDispatchToProps: mapDispatchToProps, registerActionCreator: registerActionCreator }; exports["default"] = _default; //# sourceMappingURL=action.js.map /***/ }), /* 1054 */ /***/ (function(module, exports, __webpack_require__) { /* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2010, Ajax.org B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Ajax.org B.V. nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ***** END LICENSE BLOCK ***** */ /** * Define a module along with a payload * @param module a name for the payload * @param payload a function to call with (acequire, exports, module) params */ (function() { var ACE_NAMESPACE = "ace"; var global = (function() { return this; })(); if (!global && typeof window != "undefined") global = window; // strict mode if (!ACE_NAMESPACE && typeof acequirejs !== "undefined") return; var define = function(module, deps, payload) { if (typeof module !== "string") { if (define.original) define.original.apply(this, arguments); else { console.error("dropping module because define wasn\'t a string."); console.trace(); } return; } if (arguments.length == 2) payload = deps; if (!define.modules[module]) { define.payloads[module] = payload; define.modules[module] = null; } }; define.modules = {}; define.payloads = {}; /** * Get at functionality define()ed using the function above */ var _acequire = function(parentId, module, callback) { if (typeof module === "string") { var payload = lookup(parentId, module); if (payload != undefined) { callback && callback(); return payload; } } else if (Object.prototype.toString.call(module) === "[object Array]") { var params = []; for (var i = 0, l = module.length; i < l; ++i) { var dep = lookup(parentId, module[i]); if (dep == undefined && acequire.original) return; params.push(dep); } return callback && callback.apply(null, params) || true; } }; var acequire = function(module, callback) { var packagedModule = _acequire("", module, callback); if (packagedModule == undefined && acequire.original) return acequire.original.apply(this, arguments); return packagedModule; }; var normalizeModule = function(parentId, moduleName) { // normalize plugin acequires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.split("!"); return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]); } // normalize relative acequires if (moduleName.charAt(0) == ".") { var base = parentId.split("/").slice(0, -1).join("/"); moduleName = base + "/" + moduleName; while(moduleName.indexOf(".") !== -1 && previous != moduleName) { var previous = moduleName; moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); } } return moduleName; }; /** * Internal function to lookup moduleNames and resolve them by calling the * definition function if needed. */ var lookup = function(parentId, moduleName) { moduleName = normalizeModule(parentId, moduleName); var module = define.modules[moduleName]; if (!module) { module = define.payloads[moduleName]; if (typeof module === 'function') { var exports = {}; var mod = { id: moduleName, uri: '', exports: exports, packaged: true }; var req = function(module, callback) { return _acequire(moduleName, module, callback); }; var returnValue = module(req, exports, mod); exports = returnValue || mod.exports; define.modules[moduleName] = exports; delete define.payloads[moduleName]; } module = define.modules[moduleName] = exports || module; } return module; }; function exportAce(ns) { var root = global; if (ns) { if (!global[ns]) global[ns] = {}; root = global[ns]; } if (!root.define || !root.define.packaged) { define.original = root.define; root.define = define; root.define.packaged = true; } if (!root.acequire || !root.acequire.packaged) { acequire.original = root.acequire; root.acequire = acequire; root.acequire.packaged = true; } } exportAce(ACE_NAMESPACE); })(); ace.define("ace/lib/regexp",["require","exports","module"], function(acequire, exports, module) { "use strict"; var real = { exec: RegExp.prototype.exec, test: RegExp.prototype.test, match: String.prototype.match, replace: String.prototype.replace, split: String.prototype.split }, compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups compliantLastIndexIncrement = function () { var x = /^/g; real.test.call(x, ""); return !x.lastIndex; }(); if (compliantLastIndexIncrement && compliantExecNpcg) return; RegExp.prototype.exec = function (str) { var match = real.exec.apply(this, arguments), name, r2; if ( typeof(str) == 'string' && match) { if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) { r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", "")); real.replace.call(str.slice(match.index), r2, function () { for (var i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } if (this._xregexp && this._xregexp.captureNames) { for (var i = 1; i < match.length; i++) { name = this._xregexp.captureNames[i - 1]; if (name) match[name] = match[i]; } } if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) this.lastIndex--; } return match; }; if (!compliantLastIndexIncrement) { RegExp.prototype.test = function (str) { var match = real.exec.call(this, str); if (match && this.global && !match[0].length && (this.lastIndex > match.index)) this.lastIndex--; return !!match; }; } function getNativeFlags (regex) { return (regex.global ? "g" : "") + (regex.ignoreCase ? "i" : "") + (regex.multiline ? "m" : "") + (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3 (regex.sticky ? "y" : ""); } function indexOf (array, item, from) { if (Array.prototype.indexOf) // Use the native array method if available return array.indexOf(item, from); for (var i = from || 0; i < array.length; i++) { if (array[i] === item) return i; } return -1; } }); ace.define("ace/lib/es5-shim",["require","exports","module"], function(acequire, exports, module) { function Empty() {} if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { // .length is 1 var target = this; if (typeof target != "function") { throw new TypeError("Function.prototype.bind called on incompatible " + target); } var args = slice.call(arguments, 1); // for normal call var bound = function () { if (this instanceof bound) { var result = target.apply( this, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return this; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; if(target.prototype) { Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; } var call = Function.prototype.call; var prototypeOfArray = Array.prototype; var prototypeOfObject = Object.prototype; var slice = prototypeOfArray.slice; var _toString = call.bind(prototypeOfObject.toString); var owns = call.bind(prototypeOfObject.hasOwnProperty); var defineGetter; var defineSetter; var lookupGetter; var lookupSetter; var supportsAccessors; if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { defineGetter = call.bind(prototypeOfObject.__defineGetter__); defineSetter = call.bind(prototypeOfObject.__defineSetter__); lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); } if ([1,2].splice(0).length != 2) { if(function() { // test IE < 9 to splice bug - see issue #138 function makeArray(l) { var a = new Array(l+2); a[0] = a[1] = 0; return a; } var array = [], lengthBefore; array.splice.apply(array, makeArray(20)); array.splice.apply(array, makeArray(26)); lengthBefore = array.length; //46 array.splice(5, 0, "XXX"); // add one element lengthBefore + 1 == array.length if (lengthBefore + 1 == array.length) { return true;// has right splice implementation without bugs } }()) {//IE 6/7 var array_splice = Array.prototype.splice; Array.prototype.splice = function(start, deleteCount) { if (!arguments.length) { return []; } else { return array_splice.apply(this, [ start === void 0 ? 0 : start, deleteCount === void 0 ? (this.length - start) : deleteCount ].concat(slice.call(arguments, 2))) } }; } else {//IE8 Array.prototype.splice = function(pos, removeCount){ var length = this.length; if (pos > 0) { if (pos > length) pos = length; } else if (pos == void 0) { pos = 0; } else if (pos < 0) { pos = Math.max(length + pos, 0); } if (!(pos+removeCount < length)) removeCount = length - pos; var removed = this.slice(pos, pos+removeCount); var insert = slice.call(arguments, 2); var add = insert.length; if (pos === length) { if (add) { this.push.apply(this, insert); } } else { var remove = Math.min(removeCount, length - pos); var tailOldPos = pos + remove; var tailNewPos = tailOldPos + add - remove; var tailCount = length - tailOldPos; var lengthAfterRemove = length - remove; if (tailNewPos < tailOldPos) { // case A for (var i = 0; i < tailCount; ++i) { this[tailNewPos+i] = this[tailOldPos+i]; } } else if (tailNewPos > tailOldPos) { // case B for (i = tailCount; i--; ) { this[tailNewPos+i] = this[tailOldPos+i]; } } // else, add == remove (nothing to do) if (add && pos === lengthAfterRemove) { this.length = lengthAfterRemove; // truncate array this.push.apply(this, insert); } else { this.length = lengthAfterRemove + add; // reserves space for (i = 0; i < add; ++i) { this[pos+i] = insert[i]; } } } return removed; }; } } if (!Array.isArray) { Array.isArray = function isArray(obj) { return _toString(obj) == "[object Array]"; }; } var boxedString = Object("a"), splitString = boxedString[0] != "a" || !(0 in boxedString); if (!Array.prototype.forEach) { Array.prototype.forEach = function forEach(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, thisp = arguments[1], i = -1, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(); // TODO message } while (++i < length) { if (i in self) { fun.call(thisp, self[i], i, object); } } }; } if (!Array.prototype.map) { Array.prototype.map = function map(fun /*, thisp*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = Array(length), thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) result[i] = fun.call(thisp, self[i], i, object); } return result; }; } if (!Array.prototype.filter) { Array.prototype.filter = function filter(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, result = [], value, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self) { value = self[i]; if (fun.call(thisp, value, i, object)) { result.push(value); } } } return result; }; } if (!Array.prototype.every) { Array.prototype.every = function every(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && !fun.call(thisp, self[i], i, object)) { return false; } } return true; }; } if (!Array.prototype.some) { Array.prototype.some = function some(fun /*, thisp */) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0, thisp = arguments[1]; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } for (var i = 0; i < length; i++) { if (i in self && fun.call(thisp, self[i], i, object)) { return true; } } return false; }; } if (!Array.prototype.reduce) { Array.prototype.reduce = function reduce(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduce of empty array with no initial value"); } var i = 0; var result; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i++]; break; } if (++i >= length) { throw new TypeError("reduce of empty array with no initial value"); } } while (true); } for (; i < length; i++) { if (i in self) { result = fun.call(void 0, result, self[i], i, object); } } return result; }; } if (!Array.prototype.reduceRight) { Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { var object = toObject(this), self = splitString && _toString(this) == "[object String]" ? this.split("") : object, length = self.length >>> 0; if (_toString(fun) != "[object Function]") { throw new TypeError(fun + " is not a function"); } if (!length && arguments.length == 1) { throw new TypeError("reduceRight of empty array with no initial value"); } var result, i = length - 1; if (arguments.length >= 2) { result = arguments[1]; } else { do { if (i in self) { result = self[i--]; break; } if (--i < 0) { throw new TypeError("reduceRight of empty array with no initial value"); } } while (true); } do { if (i in this) { result = fun.call(void 0, result, self[i], i, object); } } while (i--); return result; }; } if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = 0; if (arguments.length > 1) { i = toInteger(arguments[1]); } i = i >= 0 ? i : Math.max(0, length + i); for (; i < length; i++) { if (i in self && self[i] === sought) { return i; } } return -1; }; } if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { var self = splitString && _toString(this) == "[object String]" ? this.split("") : toObject(this), length = self.length >>> 0; if (!length) { return -1; } var i = length - 1; if (arguments.length > 1) { i = Math.min(i, toInteger(arguments[1])); } i = i >= 0 ? i : length - Math.abs(i); for (; i >= 0; i--) { if (i in self && sought === self[i]) { return i; } } return -1; }; } if (!Object.getPrototypeOf) { Object.getPrototypeOf = function getPrototypeOf(object) { return object.__proto__ || ( object.constructor ? object.constructor.prototype : prototypeOfObject ); }; } if (!Object.getOwnPropertyDescriptor) { var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + "non-object: "; Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT + object); if (!owns(object, property)) return; var descriptor, getter, setter; descriptor = { enumerable: true, configurable: true }; if (supportsAccessors) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; var getter = lookupGetter(object, property); var setter = lookupSetter(object, property); object.__proto__ = prototype; if (getter || setter) { if (getter) descriptor.get = getter; if (setter) descriptor.set = setter; return descriptor; } } descriptor.value = object[property]; return descriptor; }; } if (!Object.getOwnPropertyNames) { Object.getOwnPropertyNames = function getOwnPropertyNames(object) { return Object.keys(object); }; } if (!Object.create) { var createEmpty; if (Object.prototype.__proto__ === null) { createEmpty = function () { return { "__proto__": null }; }; } else { createEmpty = function () { var empty = {}; for (var i in empty) empty[i] = null; empty.constructor = empty.hasOwnProperty = empty.propertyIsEnumerable = empty.isPrototypeOf = empty.toLocaleString = empty.toString = empty.valueOf = empty.__proto__ = null; return empty; } } Object.create = function create(prototype, properties) { var object; if (prototype === null) { object = createEmpty(); } else { if (typeof prototype != "object") throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); var Type = function () {}; Type.prototype = prototype; object = new Type(); object.__proto__ = prototype; } if (properties !== void 0) Object.defineProperties(object, properties); return object; }; } function doesDefinePropertyWork(object) { try { Object.defineProperty(object, "sentinel", {}); return "sentinel" in object; } catch (exception) { } } if (Object.defineProperty) { var definePropertyWorksOnObject = doesDefinePropertyWork({}); var definePropertyWorksOnDom = typeof document == "undefined" || doesDefinePropertyWork(document.createElement("div")); if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { var definePropertyFallback = Object.defineProperty; } } if (!Object.defineProperty || definePropertyFallback) { var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + "on this javascript engine"; Object.defineProperty = function defineProperty(object, property, descriptor) { if ((typeof object != "object" && typeof object != "function") || object === null) throw new TypeError(ERR_NON_OBJECT_TARGET + object); if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); if (definePropertyFallback) { try { return definePropertyFallback.call(Object, object, property, descriptor); } catch (exception) { } } if (owns(descriptor, "value")) { if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) { var prototype = object.__proto__; object.__proto__ = prototypeOfObject; delete object[property]; object[property] = descriptor.value; object.__proto__ = prototype; } else { object[property] = descriptor.value; } } else { if (!supportsAccessors) throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); if (owns(descriptor, "get")) defineGetter(object, property, descriptor.get); if (owns(descriptor, "set")) defineSetter(object, property, descriptor.set); } return object; }; } if (!Object.defineProperties) { Object.defineProperties = function defineProperties(object, properties) { for (var property in properties) { if (owns(properties, property)) Object.defineProperty(object, property, properties[property]); } return object; }; } if (!Object.seal) { Object.seal = function seal(object) { return object; }; } if (!Object.freeze) { Object.freeze = function freeze(object) { return object; }; } try { Object.freeze(function () {}); } catch (exception) { Object.freeze = (function freeze(freezeObject) { return function freeze(object) { if (typeof object == "function") { return object; } else { return freezeObject(object); } }; })(Object.freeze); } if (!Object.preventExtensions) { Object.preventExtensions = function preventExtensions(object) { return object; }; } if (!Object.isSealed) { Object.isSealed = function isSealed(object) { return false; }; } if (!Object.isFrozen) { Object.isFrozen = function isFrozen(object) { return false; }; } if (!Object.isExtensible) { Object.isExtensible = function isExtensible(object) { if (Object(object) === object) { throw new TypeError(); // TODO message } var name = ''; while (owns(object, name)) { name += '?'; } object[name] = true; var returnValue = owns(object, name); delete object[name]; return returnValue; }; } if (!Object.keys) { var hasDontEnumBug = true, dontEnums = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], dontEnumsLength = dontEnums.length; for (var key in {"toString": null}) { hasDontEnumBug = false; } Object.keys = function keys(object) { if ( (typeof object != "object" && typeof object != "function") || object === null ) { throw new TypeError("Object.keys called on a non-object"); } var keys = []; for (var name in object) { if (owns(object, name)) { keys.push(name); } } if (hasDontEnumBug) { for (var i = 0, ii = dontEnumsLength; i < ii; i++) { var dontEnum = dontEnums[i]; if (owns(object, dontEnum)) { keys.push(dontEnum); } } } return keys; }; } if (!Date.now) { Date.now = function now() { return new Date().getTime(); }; } var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + "\u2029\uFEFF"; if (!String.prototype.trim || ws.trim()) { ws = "[" + ws + "]"; var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), trimEndRegexp = new RegExp(ws + ws + "*$"); String.prototype.trim = function trim() { return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); }; } function toInteger(n) { n = +n; if (n !== n) { // isNaN n = 0; } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { n = (n > 0 || -1) * Math.floor(Math.abs(n)); } return n; } function isPrimitive(input) { var type = typeof input; return ( input === null || type === "undefined" || type === "boolean" || type === "number" || type === "string" ); } function toPrimitive(input) { var val, valueOf, toString; if (isPrimitive(input)) { return input; } valueOf = input.valueOf; if (typeof valueOf === "function") { val = valueOf.call(input); if (isPrimitive(val)) { return val; } } toString = input.toString; if (typeof toString === "function") { val = toString.call(input); if (isPrimitive(val)) { return val; } } throw new TypeError(); } var toObject = function (o) { if (o == null) { // this matches both null and undefined throw new TypeError("can't convert "+o+" to object"); } return Object(o); }; }); ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"], function(acequire, exports, module) { "use strict"; acequire("./regexp"); acequire("./es5-shim"); }); ace.define("ace/lib/dom",["require","exports","module"], function(acequire, exports, module) { "use strict"; var XHTML_NS = "http://www.w3.org/1999/xhtml"; exports.getDocumentHead = function(doc) { if (!doc) doc = document; return doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement; } exports.createElement = function(tag, ns) { return document.createElementNS ? document.createElementNS(ns || XHTML_NS, tag) : document.createElement(tag); }; exports.hasCssClass = function(el, name) { var classes = (el.className + "").split(/\s+/g); return classes.indexOf(name) !== -1; }; exports.addCssClass = function(el, name) { if (!exports.hasCssClass(el, name)) { el.className += " " + name; } }; exports.removeCssClass = function(el, name) { var classes = el.className.split(/\s+/g); while (true) { var index = classes.indexOf(name); if (index == -1) { break; } classes.splice(index, 1); } el.className = classes.join(" "); }; exports.toggleCssClass = function(el, name) { var classes = el.className.split(/\s+/g), add = true; while (true) { var index = classes.indexOf(name); if (index == -1) { break; } add = false; classes.splice(index, 1); } if (add) classes.push(name); el.className = classes.join(" "); return add; }; exports.setCssClass = function(node, className, include) { if (include) { exports.addCssClass(node, className); } else { exports.removeCssClass(node, className); } }; exports.hasCssString = function(id, doc) { var index = 0, sheets; doc = doc || document; if (doc.createStyleSheet && (sheets = doc.styleSheets)) { while (index < sheets.length) if (sheets[index++].owningElement.id === id) return true; } else if ((sheets = doc.getElementsByTagName("style"))) { while (index < sheets.length) if (sheets[index++].id === id) return true; } return false; }; exports.importCssString = function importCssString(cssText, id, doc) { doc = doc || document; if (id && exports.hasCssString(id, doc)) return null; var style; if (id) cssText += "\n/*# sourceURL=ace/css/" + id + " */"; if (doc.createStyleSheet) { style = doc.createStyleSheet(); style.cssText = cssText; if (id) style.owningElement.id = id; } else { style = exports.createElement("style"); style.appendChild(doc.createTextNode(cssText)); if (id) style.id = id; exports.getDocumentHead(doc).appendChild(style); } }; exports.importCssStylsheet = function(uri, doc) { if (doc.createStyleSheet) { doc.createStyleSheet(uri); } else { var link = exports.createElement('link'); link.rel = 'stylesheet'; link.href = uri; exports.getDocumentHead(doc).appendChild(link); } }; exports.getInnerWidth = function(element) { return ( parseInt(exports.computedStyle(element, "paddingLeft"), 10) + parseInt(exports.computedStyle(element, "paddingRight"), 10) + element.clientWidth ); }; exports.getInnerHeight = function(element) { return ( parseInt(exports.computedStyle(element, "paddingTop"), 10) + parseInt(exports.computedStyle(element, "paddingBottom"), 10) + element.clientHeight ); }; exports.scrollbarWidth = function(document) { var inner = exports.createElement("ace_inner"); inner.style.width = "100%"; inner.style.minWidth = "0px"; inner.style.height = "200px"; inner.style.display = "block"; var outer = exports.createElement("ace_outer"); var style = outer.style; style.position = "absolute"; style.left = "-10000px"; style.overflow = "hidden"; style.width = "200px"; style.minWidth = "0px"; style.height = "150px"; style.display = "block"; outer.appendChild(inner); var body = document.documentElement; body.appendChild(outer); var noScrollbar = inner.offsetWidth; style.overflow = "scroll"; var withScrollbar = inner.offsetWidth; if (noScrollbar == withScrollbar) { withScrollbar = outer.clientWidth; } body.removeChild(outer); return noScrollbar-withScrollbar; }; if (typeof document == "undefined") { exports.importCssString = function() {}; return; } if (window.pageYOffset !== undefined) { exports.getPageScrollTop = function() { return window.pageYOffset; }; exports.getPageScrollLeft = function() { return window.pageXOffset; }; } else { exports.getPageScrollTop = function() { return document.body.scrollTop; }; exports.getPageScrollLeft = function() { return document.body.scrollLeft; }; } if (window.getComputedStyle) exports.computedStyle = function(element, style) { if (style) return (window.getComputedStyle(element, "") || {})[style] || ""; return window.getComputedStyle(element, "") || {}; }; else exports.computedStyle = function(element, style) { if (style) return element.currentStyle[style]; return element.currentStyle; }; exports.setInnerHtml = function(el, innerHtml) { var element = el.cloneNode(false);//document.createElement("div"); element.innerHTML = innerHtml; el.parentNode.replaceChild(element, el); return element; }; if ("textContent" in document.documentElement) { exports.setInnerText = function(el, innerText) { el.textContent = innerText; }; exports.getInnerText = function(el) { return el.textContent; }; } else { exports.setInnerText = function(el, innerText) { el.innerText = innerText; }; exports.getInnerText = function(el) { return el.innerText; }; } exports.getParentWindow = function(document) { return document.defaultView || document.parentWindow; }; }); ace.define("ace/lib/oop",["require","exports","module"], function(acequire, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports.mixin = function(obj, mixin) { for (var key in mixin) { obj[key] = mixin[key]; } return obj; }; exports.implement = function(proto, mixin) { exports.mixin(proto, mixin); }; }); ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"], function(acequire, exports, module) { "use strict"; acequire("./fixoldbrowsers"); var oop = acequire("./oop"); var Keys = (function() { var ret = { MODIFIER_KEYS: { 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta' }, KEY_MODS: { "ctrl": 1, "alt": 2, "option" : 2, "shift": 4, "super": 8, "meta": 8, "command": 8, "cmd": 8 }, FUNCTION_KEYS : { 8 : "Backspace", 9 : "Tab", 13 : "Return", 19 : "Pause", 27 : "Esc", 32 : "Space", 33 : "PageUp", 34 : "PageDown", 35 : "End", 36 : "Home", 37 : "Left", 38 : "Up", 39 : "Right", 40 : "Down", 44 : "Print", 45 : "Insert", 46 : "Delete", 96 : "Numpad0", 97 : "Numpad1", 98 : "Numpad2", 99 : "Numpad3", 100: "Numpad4", 101: "Numpad5", 102: "Numpad6", 103: "Numpad7", 104: "Numpad8", 105: "Numpad9", '-13': "NumpadEnter", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "Numlock", 145: "Scrolllock" }, PRINTABLE_KEYS: { 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a', 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.', 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\',221: ']', 222: "'", 111: '/', 106: '*' } }; var name, i; for (i in ret.FUNCTION_KEYS) { name = ret.FUNCTION_KEYS[i].toLowerCase(); ret[name] = parseInt(i, 10); } for (i in ret.PRINTABLE_KEYS) { name = ret.PRINTABLE_KEYS[i].toLowerCase(); ret[name] = parseInt(i, 10); } oop.mixin(ret, ret.MODIFIER_KEYS); oop.mixin(ret, ret.PRINTABLE_KEYS); oop.mixin(ret, ret.FUNCTION_KEYS); ret.enter = ret["return"]; ret.escape = ret.esc; ret.del = ret["delete"]; ret[173] = '-'; (function() { var mods = ["cmd", "ctrl", "alt", "shift"]; for (var i = Math.pow(2, mods.length); i--;) { ret.KEY_MODS[i] = mods.filter(function(x) { return i & ret.KEY_MODS[x]; }).join("-") + "-"; } })(); ret.KEY_MODS[0] = ""; ret.KEY_MODS[-1] = "input-"; return ret; })(); oop.mixin(exports, Keys); exports.keyCodeToString = function(keyCode) { var keyString = Keys[keyCode]; if (typeof keyString != "string") keyString = String.fromCharCode(keyCode); return keyString.toLowerCase(); }; }); ace.define("ace/lib/useragent",["require","exports","module"], function(acequire, exports, module) { "use strict"; exports.OS = { LINUX: "LINUX", MAC: "MAC", WINDOWS: "WINDOWS" }; exports.getOS = function() { if (exports.isMac) { return exports.OS.MAC; } else if (exports.isLinux) { return exports.OS.LINUX; } else { return exports.OS.WINDOWS; } }; if (typeof navigator != "object") return; var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase(); var ua = navigator.userAgent; exports.isWin = (os == "win"); exports.isMac = (os == "mac"); exports.isLinux = (os == "linux"); exports.isIE = (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0) ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]) : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie exports.isOldIE = exports.isIE && exports.isIE < 9; exports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === "Gecko"; exports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv:(\d+)/)||[])[1], 10) < 4; exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]"; exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined; exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined; exports.isAIR = ua.indexOf("AdobeAIR") >= 0; exports.isIPad = ua.indexOf("iPad") >= 0; exports.isTouchPad = ua.indexOf("TouchPad") >= 0; exports.isChromeOS = ua.indexOf(" CrOS ") >= 0; }); ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(acequire, exports, module) { "use strict"; var keys = acequire("./keys"); var useragent = acequire("./useragent"); var pressedKeys = null; var ts = 0; exports.addListener = function(elem, type, callback) { if (elem.addEventListener) { return elem.addEventListener(type, callback, false); } if (elem.attachEvent) { var wrapper = function() { callback.call(elem, window.event); }; callback._wrapper = wrapper; elem.attachEvent("on" + type, wrapper); } }; exports.removeListener = function(elem, type, callback) { if (elem.removeEventListener) { return elem.removeEventListener(type, callback, false); } if (elem.detachEvent) { elem.detachEvent("on" + type, callback._wrapper || callback); } }; exports.stopEvent = function(e) { exports.stopPropagation(e); exports.preventDefault(e); return false; }; exports.stopPropagation = function(e) { if (e.stopPropagation) e.stopPropagation(); else e.cancelBubble = true; }; exports.preventDefault = function(e) { if (e.preventDefault) e.preventDefault(); else e.returnValue = false; }; exports.getButton = function(e) { if (e.type == "dblclick") return 0; if (e.type == "contextmenu" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey))) return 2; if (e.preventDefault) { return e.button; } else { return {1:0, 2:2, 4:1}[e.button]; } }; exports.capture = function(el, eventHandler, releaseCaptureHandler) { function onMouseUp(e) { eventHandler && eventHandler(e); releaseCaptureHandler && releaseCaptureHandler(e); exports.removeListener(document, "mousemove", eventHandler, true); exports.removeListener(document, "mouseup", onMouseUp, true); exports.removeListener(document, "dragstart", onMouseUp, true); } exports.addListener(document, "mousemove", eventHandler, true); exports.addListener(document, "mouseup", onMouseUp, true); exports.addListener(document, "dragstart", onMouseUp, true); return onMouseUp; }; exports.addTouchMoveListener = function (el, callback) { if ("ontouchmove" in el) { var startx, starty; exports.addListener(el, "touchstart", function (e) { var touchObj = e.changedTouches[0]; startx = touchObj.clientX; starty = touchObj.clientY; }); exports.addListener(el, "touchmove", function (e) { var factor = 1, touchObj = e.changedTouches[0]; e.wheelX = -(touchObj.clientX - startx) / factor; e.wheelY = -(touchObj.clientY - starty) / factor; startx = touchObj.clientX; starty = touchObj.clientY; callback(e); }); } }; exports.addMouseWheelListener = function(el, callback) { if ("onmousewheel" in el) { exports.addListener(el, "mousewheel", function(e) { var factor = 8; if (e.wheelDeltaX !== undefined) { e.wheelX = -e.wheelDeltaX / factor; e.wheelY = -e.wheelDeltaY / factor; } else { e.wheelX = 0; e.wheelY = -e.wheelDelta / factor; } callback(e); }); } else if ("onwheel" in el) { exports.addListener(el, "wheel", function(e) { var factor = 0.35; switch (e.deltaMode) { case e.DOM_DELTA_PIXEL: e.wheelX = e.deltaX * factor || 0; e.wheelY = e.deltaY * factor || 0; break; case e.DOM_DELTA_LINE: case e.DOM_DELTA_PAGE: e.wheelX = (e.deltaX || 0) * 5; e.wheelY = (e.deltaY || 0) * 5; break; } callback(e); }); } else { exports.addListener(el, "DOMMouseScroll", function(e) { if (e.axis && e.axis == e.HORIZONTAL_AXIS) { e.wheelX = (e.detail || 0) * 5; e.wheelY = 0; } else { e.wheelX = 0; e.wheelY = (e.detail || 0) * 5; } callback(e); }); } }; exports.addMultiMouseDownListener = function(elements, timeouts, eventHandler, callbackName) { var clicks = 0; var startX, startY, timer; var eventNames = { 2: "dblclick", 3: "tripleclick", 4: "quadclick" }; function onMousedown(e) { if (exports.getButton(e) !== 0) { clicks = 0; } else if (e.detail > 1) { clicks++; if (clicks > 4) clicks = 1; } else { clicks = 1; } if (useragent.isIE) { var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5; if (!timer || isNewClick) clicks = 1; if (timer) clearTimeout(timer); timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); if (clicks == 1) { startX = e.clientX; startY = e.clientY; } } e._clicks = clicks; eventHandler[callbackName]("mousedown", e); if (clicks > 4) clicks = 0; else if (clicks > 1) return eventHandler[callbackName](eventNames[clicks], e); } function onDblclick(e) { clicks = 2; if (timer) clearTimeout(timer); timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); eventHandler[callbackName]("mousedown", e); eventHandler[callbackName](eventNames[clicks], e); } if (!Array.isArray(elements)) elements = [elements]; elements.forEach(function(el) { exports.addListener(el, "mousedown", onMousedown); if (useragent.isOldIE) exports.addListener(el, "dblclick", onDblclick); }); }; var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent" in window) ? function(e) { return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0); } : function(e) { return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0); }; exports.getModifierString = function(e) { return keys.KEY_MODS[getModifierHash(e)]; }; function normalizeCommandKeys(callback, e, keyCode) { var hashId = getModifierHash(e); if (!useragent.isMac && pressedKeys) { if (e.getModifierState && (e.getModifierState("OS") || e.getModifierState("Win"))) hashId |= 8; if (pressedKeys.altGr) { if ((3 & hashId) != 3) pressedKeys.altGr = 0; else return; } if (keyCode === 18 || keyCode === 17) { var location = "location" in e ? e.location : e.keyLocation; if (keyCode === 17 && location === 1) { if (pressedKeys[keyCode] == 1) ts = e.timeStamp; } else if (keyCode === 18 && hashId === 3 && location === 2) { var dt = e.timeStamp - ts; if (dt < 50) pressedKeys.altGr = true; } } } if (keyCode in keys.MODIFIER_KEYS) { keyCode = -1; } if (hashId & 8 && (keyCode >= 91 && keyCode <= 93)) { keyCode = -1; } if (!hashId && keyCode === 13) { var location = "location" in e ? e.location : e.keyLocation; if (location === 3) { callback(e, hashId, -keyCode); if (e.defaultPrevented) return; } } if (useragent.isChromeOS && hashId & 8) { callback(e, hashId, keyCode); if (e.defaultPrevented) return; else hashId &= ~8; } if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) { return false; } return callback(e, hashId, keyCode); } exports.addCommandKeyListener = function(el, callback) { var addListener = exports.addListener; if (useragent.isOldGecko || (useragent.isOpera && !("KeyboardEvent" in window))) { var lastKeyDownKeyCode = null; addListener(el, "keydown", function(e) { lastKeyDownKeyCode = e.keyCode; }); addListener(el, "keypress", function(e) { return normalizeCommandKeys(callback, e, lastKeyDownKeyCode); }); } else { var lastDefaultPrevented = null; addListener(el, "keydown", function(e) { pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1; var result = normalizeCommandKeys(callback, e, e.keyCode); lastDefaultPrevented = e.defaultPrevented; return result; }); addListener(el, "keypress", function(e) { if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) { exports.stopEvent(e); lastDefaultPrevented = null; } }); addListener(el, "keyup", function(e) { pressedKeys[e.keyCode] = null; }); if (!pressedKeys) { resetPressedKeys(); addListener(window, "focus", resetPressedKeys); } } }; function resetPressedKeys() { pressedKeys = Object.create(null); } if (typeof window == "object" && window.postMessage && !useragent.isOldIE) { var postMessageId = 1; exports.nextTick = function(callback, win) { win = win || window; var messageName = "zero-timeout-message-" + postMessageId; exports.addListener(win, "message", function listener(e) { if (e.data == messageName) { exports.stopPropagation(e); exports.removeListener(win, "message", listener); callback(); } }); win.postMessage(messageName, "*"); }; } exports.nextFrame = typeof window == "object" && (window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame); if (exports.nextFrame) exports.nextFrame = exports.nextFrame.bind(window); else exports.nextFrame = function(callback) { setTimeout(callback, 17); }; }); ace.define("ace/lib/lang",["require","exports","module"], function(acequire, exports, module) { "use strict"; exports.last = function(a) { return a[a.length - 1]; }; exports.stringReverse = function(string) { return string.split("").reverse().join(""); }; exports.stringRepeat = function (string, count) { var result = ''; while (count > 0) { if (count & 1) result += string; if (count >>= 1) string += string; } return result; }; var trimBeginRegexp = /^\s\s*/; var trimEndRegexp = /\s\s*$/; exports.stringTrimLeft = function (string) { return string.replace(trimBeginRegexp, ''); }; exports.stringTrimRight = function (string) { return string.replace(trimEndRegexp, ''); }; exports.copyObject = function(obj) { var copy = {}; for (var key in obj) { copy[key] = obj[key]; } return copy; }; exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i= 53) { onInput(); } }; var syncComposition = lang.delayedCall(onCompositionUpdate, 50); event.addListener(text, "compositionstart", onCompositionStart); if (useragent.isGecko) { event.addListener(text, "text", function(){syncComposition.schedule()}); } else { event.addListener(text, "keyup", function(){syncComposition.schedule()}); event.addListener(text, "keydown", function(){syncComposition.schedule()}); } event.addListener(text, "compositionend", onCompositionEnd); this.getElement = function() { return text; }; this.setReadOnly = function(readOnly) { text.readOnly = readOnly; }; this.onContextMenu = function(e) { afterContextMenu = true; resetSelection(host.selection.isEmpty()); host._emit("nativecontextmenu", {target: host, domEvent: e}); this.moveToMouse(e, true); }; this.moveToMouse = function(e, bringToFront) { if (!bringToFront && useragent.isOldIE) return; if (!tempStyle) tempStyle = text.style.cssText; text.style.cssText = (bringToFront ? "z-index:100000;" : "") + "height:" + text.style.height + ";" + (useragent.isIE ? "opacity:0.1;" : ""); var rect = host.container.getBoundingClientRect(); var style = dom.computedStyle(host.container); var top = rect.top + (parseInt(style.borderTopWidth) || 0); var left = rect.left + (parseInt(rect.borderLeftWidth) || 0); var maxTop = rect.bottom - top - text.clientHeight -2; var move = function(e) { text.style.left = e.clientX - left - 2 + "px"; text.style.top = Math.min(e.clientY - top - 2, maxTop) + "px"; }; move(e); if (e.type != "mousedown") return; if (host.renderer.$keepTextAreaAtCursor) host.renderer.$keepTextAreaAtCursor = null; clearTimeout(closeTimeout); if (useragent.isWin && !useragent.isOldIE) event.capture(host.container, move, onContextMenuClose); }; this.onContextMenuClose = onContextMenuClose; var closeTimeout; function onContextMenuClose() { clearTimeout(closeTimeout); closeTimeout = setTimeout(function () { if (tempStyle) { text.style.cssText = tempStyle; tempStyle = ''; } if (host.renderer.$keepTextAreaAtCursor == null) { host.renderer.$keepTextAreaAtCursor = true; host.renderer.$moveTextAreaToCursor(); } }, useragent.isOldIE ? 200 : 0); } var onContextMenu = function(e) { host.textInput.onContextMenu(e); onContextMenuClose(); }; event.addListener(text, "mouseup", onContextMenu); event.addListener(text, "mousedown", function(e) { e.preventDefault(); onContextMenuClose(); }); event.addListener(host.renderer.scroller, "contextmenu", onContextMenu); event.addListener(text, "contextmenu", onContextMenu); }; exports.TextInput = TextInput; }); ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(acequire, exports, module) { "use strict"; var dom = acequire("../lib/dom"); var event = acequire("../lib/event"); var useragent = acequire("../lib/useragent"); var DRAG_OFFSET = 0; // pixels function DefaultHandlers(mouseHandler) { mouseHandler.$clickSelection = null; var editor = mouseHandler.editor; editor.setDefaultHandler("mousedown", this.onMouseDown.bind(mouseHandler)); editor.setDefaultHandler("dblclick", this.onDoubleClick.bind(mouseHandler)); editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(mouseHandler)); editor.setDefaultHandler("quadclick", this.onQuadClick.bind(mouseHandler)); editor.setDefaultHandler("mousewheel", this.onMouseWheel.bind(mouseHandler)); editor.setDefaultHandler("touchmove", this.onTouchMove.bind(mouseHandler)); var exports = ["select", "startSelect", "selectEnd", "selectAllEnd", "selectByWordsEnd", "selectByLinesEnd", "dragWait", "dragWaitEnd", "focusWait"]; exports.forEach(function(x) { mouseHandler[x] = this[x]; }, this); mouseHandler.selectByLines = this.extendSelectionBy.bind(mouseHandler, "getLineRange"); mouseHandler.selectByWords = this.extendSelectionBy.bind(mouseHandler, "getWordRange"); } (function() { this.onMouseDown = function(ev) { var inSelection = ev.inSelection(); var pos = ev.getDocumentPosition(); this.mousedownEvent = ev; var editor = this.editor; var button = ev.getButton(); if (button !== 0) { var selectionRange = editor.getSelectionRange(); var selectionEmpty = selectionRange.isEmpty(); editor.$blockScrolling++; if (selectionEmpty || button == 1) editor.selection.moveToPosition(pos); editor.$blockScrolling--; if (button == 2) editor.textInput.onContextMenu(ev.domEvent); return; // stopping event here breaks contextmenu on ff mac } this.mousedownEvent.time = Date.now(); if (inSelection && !editor.isFocused()) { editor.focus(); if (this.$focusTimout && !this.$clickSelection && !editor.inMultiSelectMode) { this.setState("focusWait"); this.captureMouse(ev); return; } } this.captureMouse(ev); this.startSelect(pos, ev.domEvent._clicks > 1); return ev.preventDefault(); }; this.startSelect = function(pos, waitForClickSelection) { pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y); var editor = this.editor; editor.$blockScrolling++; if (this.mousedownEvent.getShiftKey()) editor.selection.selectToPosition(pos); else if (!waitForClickSelection) editor.selection.moveToPosition(pos); if (!waitForClickSelection) this.select(); if (editor.renderer.scroller.setCapture) { editor.renderer.scroller.setCapture(); } editor.setStyle("ace_selecting"); this.setState("select"); editor.$blockScrolling--; }; this.select = function() { var anchor, editor = this.editor; var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); editor.$blockScrolling++; if (this.$clickSelection) { var cmp = this.$clickSelection.comparePoint(cursor); if (cmp == -1) { anchor = this.$clickSelection.end; } else if (cmp == 1) { anchor = this.$clickSelection.start; } else { var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); cursor = orientedRange.cursor; anchor = orientedRange.anchor; } editor.selection.setSelectionAnchor(anchor.row, anchor.column); } editor.selection.selectToPosition(cursor); editor.$blockScrolling--; editor.renderer.scrollCursorIntoView(); }; this.extendSelectionBy = function(unitName) { var anchor, editor = this.editor; var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); var range = editor.selection[unitName](cursor.row, cursor.column); editor.$blockScrolling++; if (this.$clickSelection) { var cmpStart = this.$clickSelection.comparePoint(range.start); var cmpEnd = this.$clickSelection.comparePoint(range.end); if (cmpStart == -1 && cmpEnd <= 0) { anchor = this.$clickSelection.end; if (range.end.row != cursor.row || range.end.column != cursor.column) cursor = range.start; } else if (cmpEnd == 1 && cmpStart >= 0) { anchor = this.$clickSelection.start; if (range.start.row != cursor.row || range.start.column != cursor.column) cursor = range.end; } else if (cmpStart == -1 && cmpEnd == 1) { cursor = range.end; anchor = range.start; } else { var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); cursor = orientedRange.cursor; anchor = orientedRange.anchor; } editor.selection.setSelectionAnchor(anchor.row, anchor.column); } editor.selection.selectToPosition(cursor); editor.$blockScrolling--; editor.renderer.scrollCursorIntoView(); }; this.selectEnd = this.selectAllEnd = this.selectByWordsEnd = this.selectByLinesEnd = function() { this.$clickSelection = null; this.editor.unsetStyle("ace_selecting"); if (this.editor.renderer.scroller.releaseCapture) { this.editor.renderer.scroller.releaseCapture(); } }; this.focusWait = function() { var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); var time = Date.now(); if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout) this.startSelect(this.mousedownEvent.getDocumentPosition()); }; this.onDoubleClick = function(ev) { var pos = ev.getDocumentPosition(); var editor = this.editor; var session = editor.session; var range = session.getBracketRange(pos); if (range) { if (range.isEmpty()) { range.start.column--; range.end.column++; } this.setState("select"); } else { range = editor.selection.getWordRange(pos.row, pos.column); this.setState("selectByWords"); } this.$clickSelection = range; this.select(); }; this.onTripleClick = function(ev) { var pos = ev.getDocumentPosition(); var editor = this.editor; this.setState("selectByLines"); var range = editor.getSelectionRange(); if (range.isMultiLine() && range.contains(pos.row, pos.column)) { this.$clickSelection = editor.selection.getLineRange(range.start.row); this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end; } else { this.$clickSelection = editor.selection.getLineRange(pos.row); } this.select(); }; this.onQuadClick = function(ev) { var editor = this.editor; editor.selectAll(); this.$clickSelection = editor.getSelectionRange(); this.setState("selectAll"); }; this.onMouseWheel = function(ev) { if (ev.getAccelKey()) return; if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) { ev.wheelX = ev.wheelY; ev.wheelY = 0; } var t = ev.domEvent.timeStamp; var dt = t - (this.$lastScrollTime||0); var editor = this.editor; var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); if (isScrolable || dt < 200) { this.$lastScrollTime = t; editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); return ev.stop(); } }; this.onTouchMove = function (ev) { var t = ev.domEvent.timeStamp; var dt = t - (this.$lastScrollTime || 0); var editor = this.editor; var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); if (isScrolable || dt < 200) { this.$lastScrollTime = t; editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); return ev.stop(); } }; }).call(DefaultHandlers.prototype); exports.DefaultHandlers = DefaultHandlers; function calcDistance(ax, ay, bx, by) { return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); } function calcRangeOrientation(range, cursor) { if (range.start.row == range.end.row) var cmp = 2 * cursor.column - range.start.column - range.end.column; else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column) var cmp = cursor.column - 4; else var cmp = 2 * cursor.row - range.start.row - range.end.row; if (cmp < 0) return {cursor: range.start, anchor: range.end}; else return {cursor: range.end, anchor: range.start}; } }); ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"], function(acequire, exports, module) { "use strict"; var oop = acequire("./lib/oop"); var dom = acequire("./lib/dom"); function Tooltip (parentNode) { this.isOpen = false; this.$element = null; this.$parentNode = parentNode; } (function() { this.$init = function() { this.$element = dom.createElement("div"); this.$element.className = "ace_tooltip"; this.$element.style.display = "none"; this.$parentNode.appendChild(this.$element); return this.$element; }; this.getElement = function() { return this.$element || this.$init(); }; this.setText = function(text) { dom.setInnerText(this.getElement(), text); }; this.setHtml = function(html) { this.getElement().innerHTML = html; }; this.setPosition = function(x, y) { this.getElement().style.left = x + "px"; this.getElement().style.top = y + "px"; }; this.setClassName = function(className) { dom.addCssClass(this.getElement(), className); }; this.show = function(text, x, y) { if (text != null) this.setText(text); if (x != null && y != null) this.setPosition(x, y); if (!this.isOpen) { this.getElement().style.display = "block"; this.isOpen = true; } }; this.hide = function() { if (this.isOpen) { this.getElement().style.display = "none"; this.isOpen = false; } }; this.getHeight = function() { return this.getElement().offsetHeight; }; this.getWidth = function() { return this.getElement().offsetWidth; }; }).call(Tooltip.prototype); exports.Tooltip = Tooltip; }); ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"], function(acequire, exports, module) { "use strict"; var dom = acequire("../lib/dom"); var oop = acequire("../lib/oop"); var event = acequire("../lib/event"); var Tooltip = acequire("../tooltip").Tooltip; function GutterHandler(mouseHandler) { var editor = mouseHandler.editor; var gutter = editor.renderer.$gutterLayer; var tooltip = new GutterTooltip(editor.container); mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) { if (!editor.isFocused() || e.getButton() != 0) return; var gutterRegion = gutter.getRegion(e); if (gutterRegion == "foldWidgets") return; var row = e.getDocumentPosition().row; var selection = editor.session.selection; if (e.getShiftKey()) selection.selectTo(row, 0); else { if (e.domEvent.detail == 2) { editor.selectAll(); return e.preventDefault(); } mouseHandler.$clickSelection = editor.selection.getLineRange(row); } mouseHandler.setState("selectByLines"); mouseHandler.captureMouse(e); return e.preventDefault(); }); var tooltipTimeout, mouseEvent, tooltipAnnotation; function showTooltip() { var row = mouseEvent.getDocumentPosition().row; var annotation = gutter.$annotations[row]; if (!annotation) return hideTooltip(); var maxRow = editor.session.getLength(); if (row == maxRow) { var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row; var pos = mouseEvent.$pos; if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column)) return hideTooltip(); } if (tooltipAnnotation == annotation) return; tooltipAnnotation = annotation.text.join("
"); tooltip.setHtml(tooltipAnnotation); tooltip.show(); editor._signal("showGutterTooltip", tooltip); editor.on("mousewheel", hideTooltip); if (mouseHandler.$tooltipFollowsMouse) { moveTooltip(mouseEvent); } else { var gutterElement = mouseEvent.domEvent.target; var rect = gutterElement.getBoundingClientRect(); var style = tooltip.getElement().style; style.left = rect.right + "px"; style.top = rect.bottom + "px"; } } function hideTooltip() { if (tooltipTimeout) tooltipTimeout = clearTimeout(tooltipTimeout); if (tooltipAnnotation) { tooltip.hide(); tooltipAnnotation = null; editor._signal("hideGutterTooltip", tooltip); editor.removeEventListener("mousewheel", hideTooltip); } } function moveTooltip(e) { tooltip.setPosition(e.x, e.y); } mouseHandler.editor.setDefaultHandler("guttermousemove", function(e) { var target = e.domEvent.target || e.domEvent.srcElement; if (dom.hasCssClass(target, "ace_fold-widget")) return hideTooltip(); if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse) moveTooltip(e); mouseEvent = e; if (tooltipTimeout) return; tooltipTimeout = setTimeout(function() { tooltipTimeout = null; if (mouseEvent && !mouseHandler.isMousePressed) showTooltip(); else hideTooltip(); }, 50); }); event.addListener(editor.renderer.$gutter, "mouseout", function(e) { mouseEvent = null; if (!tooltipAnnotation || tooltipTimeout) return; tooltipTimeout = setTimeout(function() { tooltipTimeout = null; hideTooltip(); }, 50); }); editor.on("changeSession", hideTooltip); } function GutterTooltip(parentNode) { Tooltip.call(this, parentNode); } oop.inherits(GutterTooltip, Tooltip); (function(){ this.setPosition = function(x, y) { var windowWidth = window.innerWidth || document.documentElement.clientWidth; var windowHeight = window.innerHeight || document.documentElement.clientHeight; var width = this.getWidth(); var height = this.getHeight(); x += 15; y += 15; if (x + width > windowWidth) { x -= (x + width) - windowWidth; } if (y + height > windowHeight) { y -= 20 + height; } Tooltip.prototype.setPosition.call(this, x, y); }; }).call(GutterTooltip.prototype); exports.GutterHandler = GutterHandler; }); ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(acequire, exports, module) { "use strict"; var event = acequire("../lib/event"); var useragent = acequire("../lib/useragent"); var MouseEvent = exports.MouseEvent = function(domEvent, editor) { this.domEvent = domEvent; this.editor = editor; this.x = this.clientX = domEvent.clientX; this.y = this.clientY = domEvent.clientY; this.$pos = null; this.$inSelection = null; this.propagationStopped = false; this.defaultPrevented = false; }; (function() { this.stopPropagation = function() { event.stopPropagation(this.domEvent); this.propagationStopped = true; }; this.preventDefault = function() { event.preventDefault(this.domEvent); this.defaultPrevented = true; }; this.stop = function() { this.stopPropagation(); this.preventDefault(); }; this.getDocumentPosition = function() { if (this.$pos) return this.$pos; this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY); return this.$pos; }; this.inSelection = function() { if (this.$inSelection !== null) return this.$inSelection; var editor = this.editor; var selectionRange = editor.getSelectionRange(); if (selectionRange.isEmpty()) this.$inSelection = false; else { var pos = this.getDocumentPosition(); this.$inSelection = selectionRange.contains(pos.row, pos.column); } return this.$inSelection; }; this.getButton = function() { return event.getButton(this.domEvent); }; this.getShiftKey = function() { return this.domEvent.shiftKey; }; this.getAccelKey = useragent.isMac ? function() { return this.domEvent.metaKey; } : function() { return this.domEvent.ctrlKey; }; }).call(MouseEvent.prototype); }); ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(acequire, exports, module) { "use strict"; var dom = acequire("../lib/dom"); var event = acequire("../lib/event"); var useragent = acequire("../lib/useragent"); var AUTOSCROLL_DELAY = 200; var SCROLL_CURSOR_DELAY = 200; var SCROLL_CURSOR_HYSTERESIS = 5; function DragdropHandler(mouseHandler) { var editor = mouseHandler.editor; var blankImage = dom.createElement("img"); blankImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; if (useragent.isOpera) blankImage.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"; var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"]; exports.forEach(function(x) { mouseHandler[x] = this[x]; }, this); editor.addEventListener("mousedown", this.onMouseDown.bind(mouseHandler)); var mouseTarget = editor.container; var dragSelectionMarker, x, y; var timerId, range; var dragCursor, counter = 0; var dragOperation; var isInternal; var autoScrollStartTime; var cursorMovedTime; var cursorPointOnCaretMoved; this.onDragStart = function(e) { if (this.cancelDrag || !mouseTarget.draggable) { var self = this; setTimeout(function(){ self.startSelect(); self.captureMouse(e); }, 0); return e.preventDefault(); } range = editor.getSelectionRange(); var dataTransfer = e.dataTransfer; dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove"; if (useragent.isOpera) { editor.container.appendChild(blankImage); blankImage.scrollTop = 0; } dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0); if (useragent.isOpera) { editor.container.removeChild(blankImage); } dataTransfer.clearData(); dataTransfer.setData("Text", editor.session.getTextRange()); isInternal = true; this.setState("drag"); }; this.onDragEnd = function(e) { mouseTarget.draggable = false; isInternal = false; this.setState(null); if (!editor.getReadOnly()) { var dropEffect = e.dataTransfer.dropEffect; if (!dragOperation && dropEffect == "move") editor.session.remove(editor.getSelectionRange()); editor.renderer.$cursorLayer.setBlinking(true); } this.editor.unsetStyle("ace_dragging"); this.editor.renderer.setCursorStyle(""); }; this.onDragEnter = function(e) { if (editor.getReadOnly() || !canAccept(e.dataTransfer)) return; x = e.clientX; y = e.clientY; if (!dragSelectionMarker) addDragMarker(); counter++; e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); return event.preventDefault(e); }; this.onDragOver = function(e) { if (editor.getReadOnly() || !canAccept(e.dataTransfer)) return; x = e.clientX; y = e.clientY; if (!dragSelectionMarker) { addDragMarker(); counter++; } if (onMouseMoveTimer !== null) onMouseMoveTimer = null; e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); return event.preventDefault(e); }; this.onDragLeave = function(e) { counter--; if (counter <= 0 && dragSelectionMarker) { clearDragMarker(); dragOperation = null; return event.preventDefault(e); } }; this.onDrop = function(e) { if (!dragCursor) return; var dataTransfer = e.dataTransfer; if (isInternal) { switch (dragOperation) { case "move": if (range.contains(dragCursor.row, dragCursor.column)) { range = { start: dragCursor, end: dragCursor }; } else { range = editor.moveText(range, dragCursor); } break; case "copy": range = editor.moveText(range, dragCursor, true); break; } } else { var dropData = dataTransfer.getData('Text'); range = { start: dragCursor, end: editor.session.insert(dragCursor, dropData) }; editor.focus(); dragOperation = null; } clearDragMarker(); return event.preventDefault(e); }; event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler)); event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler)); event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler)); event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler)); event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler)); event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler)); function scrollCursorIntoView(cursor, prevCursor) { var now = Date.now(); var vMovement = !prevCursor || cursor.row != prevCursor.row; var hMovement = !prevCursor || cursor.column != prevCursor.column; if (!cursorMovedTime || vMovement || hMovement) { editor.$blockScrolling += 1; editor.moveCursorToPosition(cursor); editor.$blockScrolling -= 1; cursorMovedTime = now; cursorPointOnCaretMoved = {x: x, y: y}; } else { var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y); if (distance > SCROLL_CURSOR_HYSTERESIS) { cursorMovedTime = null; } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) { editor.renderer.scrollCursorIntoView(); cursorMovedTime = null; } } } function autoScroll(cursor, prevCursor) { var now = Date.now(); var lineHeight = editor.renderer.layerConfig.lineHeight; var characterWidth = editor.renderer.layerConfig.characterWidth; var editorRect = editor.renderer.scroller.getBoundingClientRect(); var offsets = { x: { left: x - editorRect.left, right: editorRect.right - x }, y: { top: y - editorRect.top, bottom: editorRect.bottom - y } }; var nearestXOffset = Math.min(offsets.x.left, offsets.x.right); var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom); var scrollCursor = {row: cursor.row, column: cursor.column}; if (nearestXOffset / characterWidth <= 2) { scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2); } if (nearestYOffset / lineHeight <= 1) { scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1); } var vScroll = cursor.row != scrollCursor.row; var hScroll = cursor.column != scrollCursor.column; var vMovement = !prevCursor || cursor.row != prevCursor.row; if (vScroll || (hScroll && !vMovement)) { if (!autoScrollStartTime) autoScrollStartTime = now; else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY) editor.renderer.scrollCursorIntoView(scrollCursor); } else { autoScrollStartTime = null; } } function onDragInterval() { var prevCursor = dragCursor; dragCursor = editor.renderer.screenToTextCoordinates(x, y); scrollCursorIntoView(dragCursor, prevCursor); autoScroll(dragCursor, prevCursor); } function addDragMarker() { range = editor.selection.toOrientedRange(); dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle()); editor.clearSelection(); if (editor.isFocused()) editor.renderer.$cursorLayer.setBlinking(false); clearInterval(timerId); onDragInterval(); timerId = setInterval(onDragInterval, 20); counter = 0; event.addListener(document, "mousemove", onMouseMove); } function clearDragMarker() { clearInterval(timerId); editor.session.removeMarker(dragSelectionMarker); dragSelectionMarker = null; editor.$blockScrolling += 1; editor.selection.fromOrientedRange(range); editor.$blockScrolling -= 1; if (editor.isFocused() && !isInternal) editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly()); range = null; dragCursor = null; counter = 0; autoScrollStartTime = null; cursorMovedTime = null; event.removeListener(document, "mousemove", onMouseMove); } var onMouseMoveTimer = null; function onMouseMove() { if (onMouseMoveTimer == null) { onMouseMoveTimer = setTimeout(function() { if (onMouseMoveTimer != null && dragSelectionMarker) clearDragMarker(); }, 20); } } function canAccept(dataTransfer) { var types = dataTransfer.types; return !types || Array.prototype.some.call(types, function(type) { return type == 'text/plain' || type == 'Text'; }); } function getDropEffect(e) { var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized']; var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized']; var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey; var effectAllowed = "uninitialized"; try { effectAllowed = e.dataTransfer.effectAllowed.toLowerCase(); } catch (e) {} var dropEffect = "none"; if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0) dropEffect = "copy"; else if (moveAllowed.indexOf(effectAllowed) >= 0) dropEffect = "move"; else if (copyAllowed.indexOf(effectAllowed) >= 0) dropEffect = "copy"; return dropEffect; } } (function() { this.dragWait = function() { var interval = Date.now() - this.mousedownEvent.time; if (interval > this.editor.getDragDelay()) this.startDrag(); }; this.dragWaitEnd = function() { var target = this.editor.container; target.draggable = false; this.startSelect(this.mousedownEvent.getDocumentPosition()); this.selectEnd(); }; this.dragReadyEnd = function(e) { this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()); this.editor.unsetStyle("ace_dragging"); this.editor.renderer.setCursorStyle(""); this.dragWaitEnd(); }; this.startDrag = function(){ this.cancelDrag = false; var editor = this.editor; var target = editor.container; target.draggable = true; editor.renderer.$cursorLayer.setBlinking(false); editor.setStyle("ace_dragging"); var cursorStyle = useragent.isWin ? "default" : "move"; editor.renderer.setCursorStyle(cursorStyle); this.setState("dragReady"); }; this.onMouseDrag = function(e) { var target = this.editor.container; if (useragent.isIE && this.state == "dragReady") { var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); if (distance > 3) target.dragDrop(); } if (this.state === "dragWait") { var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); if (distance > 0) { target.draggable = false; this.startSelect(this.mousedownEvent.getDocumentPosition()); } } }; this.onMouseDown = function(e) { if (!this.$dragEnabled) return; this.mousedownEvent = e; var editor = this.editor; var inSelection = e.inSelection(); var button = e.getButton(); var clickCount = e.domEvent.detail || 1; if (clickCount === 1 && button === 0 && inSelection) { if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey())) return; this.mousedownEvent.time = Date.now(); var eventTarget = e.domEvent.target || e.domEvent.srcElement; if ("unselectable" in eventTarget) eventTarget.unselectable = "on"; if (editor.getDragDelay()) { if (useragent.isWebKit) { this.cancelDrag = true; var mouseTarget = editor.container; mouseTarget.draggable = true; } this.setState("dragWait"); } else { this.startDrag(); } this.captureMouse(e, this.onMouseDrag.bind(this)); e.defaultPrevented = true; } }; }).call(DragdropHandler.prototype); function calcDistance(ax, ay, bx, by) { return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); } exports.DragdropHandler = DragdropHandler; }); ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(acequire, exports, module) { "use strict"; var dom = acequire("./dom"); exports.get = function (url, callback) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { callback(xhr.responseText); } }; xhr.send(null); }; exports.loadScript = function(path, callback) { var head = dom.getDocumentHead(); var s = document.createElement('script'); s.src = path; head.appendChild(s); s.onload = s.onreadystatechange = function(_, isAbort) { if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") { s = s.onload = s.onreadystatechange = null; if (!isAbort) callback(); } }; }; exports.qualifyURL = function(url) { var a = document.createElement('a'); a.href = url; return a.href; } }); ace.define("ace/lib/event_emitter",["require","exports","module"], function(acequire, exports, module) { "use strict"; var EventEmitter = {}; var stopPropagation = function() { this.propagationStopped = true; }; var preventDefault = function() { this.defaultPrevented = true; }; EventEmitter._emit = EventEmitter._dispatchEvent = function(eventName, e) { this._eventRegistry || (this._eventRegistry = {}); this._defaultHandlers || (this._defaultHandlers = {}); var listeners = this._eventRegistry[eventName] || []; var defaultHandler = this._defaultHandlers[eventName]; if (!listeners.length && !defaultHandler) return; if (typeof e != "object" || !e) e = {}; if (!e.type) e.type = eventName; if (!e.stopPropagation) e.stopPropagation = stopPropagation; if (!e.preventDefault) e.preventDefault = preventDefault; listeners = listeners.slice(); for (var i=0; i 1) base = parts[parts.length - 2]; var path = options[component + "Path"]; if (path == null) { path = options.basePath; } else if (sep == "/") { component = sep = ""; } if (path && path.slice(-1) != "/") path += "/"; return path + component + sep + base + this.get("suffix"); }; exports.setModuleUrl = function(name, subst) { return options.$moduleUrls[name] = subst; }; exports.$loading = {}; exports.loadModule = function(moduleName, onLoad) { var module, moduleType; if (Array.isArray(moduleName)) { moduleType = moduleName[0]; moduleName = moduleName[1]; } try { module = acequire(moduleName); } catch (e) {} if (module && !exports.$loading[moduleName]) return onLoad && onLoad(module); if (!exports.$loading[moduleName]) exports.$loading[moduleName] = []; exports.$loading[moduleName].push(onLoad); if (exports.$loading[moduleName].length > 1) return; var afterLoad = function() { acequire([moduleName], function(module) { exports._emit("load.module", {name: moduleName, module: module}); var listeners = exports.$loading[moduleName]; exports.$loading[moduleName] = null; listeners.forEach(function(onLoad) { onLoad && onLoad(module); }); }); }; if (!exports.get("packaged")) return afterLoad(); net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad); }; init(true);function init(packaged) { if (!global || !global.document) return; options.packaged = packaged || acequire.packaged || module.packaged || (global.define && __webpack_require__(1055).packaged); var scriptOptions = {}; var scriptUrl = ""; var currentScript = (document.currentScript || document._currentScript ); // native or polyfill var currentDocument = currentScript && currentScript.ownerDocument || document; var scripts = currentDocument.getElementsByTagName("script"); for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); }; this.contains = function(row, column) { return this.compare(row, column) == 0; }; this.compareRange = function(range) { var cmp, end = range.end, start = range.start; cmp = this.compare(end.row, end.column); if (cmp == 1) { cmp = this.compare(start.row, start.column); if (cmp == 1) { return 2; } else if (cmp == 0) { return 1; } else { return 0; } } else if (cmp == -1) { return -2; } else { cmp = this.compare(start.row, start.column); if (cmp == -1) { return -1; } else if (cmp == 1) { return 42; } else { return 0; } } }; this.comparePoint = function(p) { return this.compare(p.row, p.column); }; this.containsRange = function(range) { return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; }; this.intersects = function(range) { var cmp = this.compareRange(range); return (cmp == -1 || cmp == 0 || cmp == 1); }; this.isEnd = function(row, column) { return this.end.row == row && this.end.column == column; }; this.isStart = function(row, column) { return this.start.row == row && this.start.column == column; }; this.setStart = function(row, column) { if (typeof row == "object") { this.start.column = row.column; this.start.row = row.row; } else { this.start.row = row; this.start.column = column; } }; this.setEnd = function(row, column) { if (typeof row == "object") { this.end.column = row.column; this.end.row = row.row; } else { this.end.row = row; this.end.column = column; } }; this.inside = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column) || this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.insideStart = function(row, column) { if (this.compare(row, column) == 0) { if (this.isEnd(row, column)) { return false; } else { return true; } } return false; }; this.insideEnd = function(row, column) { if (this.compare(row, column) == 0) { if (this.isStart(row, column)) { return false; } else { return true; } } return false; }; this.compare = function(row, column) { if (!this.isMultiLine()) { if (row === this.start.row) { return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); } } if (row < this.start.row) return -1; if (row > this.end.row) return 1; if (this.start.row === row) return column >= this.start.column ? 0 : -1; if (this.end.row === row) return column <= this.end.column ? 0 : 1; return 0; }; this.compareStart = function(row, column) { if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.compareEnd = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else { return this.compare(row, column); } }; this.compareInside = function(row, column) { if (this.end.row == row && this.end.column == column) { return 1; } else if (this.start.row == row && this.start.column == column) { return -1; } else { return this.compare(row, column); } }; this.clipRows = function(firstRow, lastRow) { if (this.end.row > lastRow) var end = {row: lastRow + 1, column: 0}; else if (this.end.row < firstRow) var end = {row: firstRow, column: 0}; if (this.start.row > lastRow) var start = {row: lastRow + 1, column: 0}; else if (this.start.row < firstRow) var start = {row: firstRow, column: 0}; return Range.fromPoints(start || this.start, end || this.end); }; this.extend = function(row, column) { var cmp = this.compare(row, column); if (cmp == 0) return this; else if (cmp == -1) var start = {row: row, column: column}; else var end = {row: row, column: column}; return Range.fromPoints(start || this.start, end || this.end); }; this.isEmpty = function() { return (this.start.row === this.end.row && this.start.column === this.end.column); }; this.isMultiLine = function() { return (this.start.row !== this.end.row); }; this.clone = function() { return Range.fromPoints(this.start, this.end); }; this.collapseRows = function() { if (this.end.column == 0) return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) else return new Range(this.start.row, 0, this.end.row, 0) }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); var screenPosEnd = session.documentToScreenPosition(this.end); return new Range( screenPosStart.row, screenPosStart.column, screenPosEnd.row, screenPosEnd.column ); }; this.moveBy = function(row, column) { this.start.row += row; this.start.column += column; this.end.row += row; this.end.column += column; }; }).call(Range.prototype); Range.fromPoints = function(start, end) { return new Range(start.row, start.column, end.row, end.column); }; Range.comparePoints = comparePoints; Range.comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; }; exports.Range = Range; }); ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"], function(acequire, exports, module) { "use strict"; var oop = acequire("./lib/oop"); var lang = acequire("./lib/lang"); var EventEmitter = acequire("./lib/event_emitter").EventEmitter; var Range = acequire("./range").Range; var Selection = function(session) { this.session = session; this.doc = session.getDocument(); this.clearSelection(); this.lead = this.selectionLead = this.doc.createAnchor(0, 0); this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0); var self = this; this.lead.on("change", function(e) { self._emit("changeCursor"); if (!self.$isEmpty) self._emit("changeSelection"); if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column) self.$desiredColumn = null; }); this.selectionAnchor.on("change", function() { if (!self.$isEmpty) self._emit("changeSelection"); }); }; (function() { oop.implement(this, EventEmitter); this.isEmpty = function() { return (this.$isEmpty || ( this.anchor.row == this.lead.row && this.anchor.column == this.lead.column )); }; this.isMultiLine = function() { if (this.isEmpty()) { return false; } return this.getRange().isMultiLine(); }; this.getCursor = function() { return this.lead.getPosition(); }; this.setSelectionAnchor = function(row, column) { this.anchor.setPosition(row, column); if (this.$isEmpty) { this.$isEmpty = false; this._emit("changeSelection"); } }; this.getSelectionAnchor = function() { if (this.$isEmpty) return this.getSelectionLead(); else return this.anchor.getPosition(); }; this.getSelectionLead = function() { return this.lead.getPosition(); }; this.shiftSelection = function(columns) { if (this.$isEmpty) { this.moveCursorTo(this.lead.row, this.lead.column + columns); return; } var anchor = this.getSelectionAnchor(); var lead = this.getSelectionLead(); var isBackwards = this.isBackwards(); if (!isBackwards || anchor.column !== 0) this.setSelectionAnchor(anchor.row, anchor.column + columns); if (isBackwards || lead.column !== 0) { this.$moveSelection(function() { this.moveCursorTo(lead.row, lead.column + columns); }); } }; this.isBackwards = function() { var anchor = this.anchor; var lead = this.lead; return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column)); }; this.getRange = function() { var anchor = this.anchor; var lead = this.lead; if (this.isEmpty()) return Range.fromPoints(lead, lead); if (this.isBackwards()) { return Range.fromPoints(lead, anchor); } else { return Range.fromPoints(anchor, lead); } }; this.clearSelection = function() { if (!this.$isEmpty) { this.$isEmpty = true; this._emit("changeSelection"); } }; this.selectAll = function() { var lastRow = this.doc.getLength() - 1; this.setSelectionAnchor(0, 0); this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length); }; this.setRange = this.setSelectionRange = function(range, reverse) { if (reverse) { this.setSelectionAnchor(range.end.row, range.end.column); this.selectTo(range.start.row, range.start.column); } else { this.setSelectionAnchor(range.start.row, range.start.column); this.selectTo(range.end.row, range.end.column); } if (this.getRange().isEmpty()) this.$isEmpty = true; this.$desiredColumn = null; }; this.$moveSelection = function(mover) { var lead = this.lead; if (this.$isEmpty) this.setSelectionAnchor(lead.row, lead.column); mover.call(this); }; this.selectTo = function(row, column) { this.$moveSelection(function() { this.moveCursorTo(row, column); }); }; this.selectToPosition = function(pos) { this.$moveSelection(function() { this.moveCursorToPosition(pos); }); }; this.moveTo = function(row, column) { this.clearSelection(); this.moveCursorTo(row, column); }; this.moveToPosition = function(pos) { this.clearSelection(); this.moveCursorToPosition(pos); }; this.selectUp = function() { this.$moveSelection(this.moveCursorUp); }; this.selectDown = function() { this.$moveSelection(this.moveCursorDown); }; this.selectRight = function() { this.$moveSelection(this.moveCursorRight); }; this.selectLeft = function() { this.$moveSelection(this.moveCursorLeft); }; this.selectLineStart = function() { this.$moveSelection(this.moveCursorLineStart); }; this.selectLineEnd = function() { this.$moveSelection(this.moveCursorLineEnd); }; this.selectFileEnd = function() { this.$moveSelection(this.moveCursorFileEnd); }; this.selectFileStart = function() { this.$moveSelection(this.moveCursorFileStart); }; this.selectWordRight = function() { this.$moveSelection(this.moveCursorWordRight); }; this.selectWordLeft = function() { this.$moveSelection(this.moveCursorWordLeft); }; this.getWordRange = function(row, column) { if (typeof column == "undefined") { var cursor = row || this.lead; row = cursor.row; column = cursor.column; } return this.session.getWordRange(row, column); }; this.selectWord = function() { this.setSelectionRange(this.getWordRange()); }; this.selectAWord = function() { var cursor = this.getCursor(); var range = this.session.getAWordRange(cursor.row, cursor.column); this.setSelectionRange(range); }; this.getLineRange = function(row, excludeLastChar) { var rowStart = typeof row == "number" ? row : this.lead.row; var rowEnd; var foldLine = this.session.getFoldLine(rowStart); if (foldLine) { rowStart = foldLine.start.row; rowEnd = foldLine.end.row; } else { rowEnd = rowStart; } if (excludeLastChar === true) return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length); else return new Range(rowStart, 0, rowEnd + 1, 0); }; this.selectLine = function() { this.setSelectionRange(this.getLineRange()); }; this.moveCursorUp = function() { this.moveCursorBy(-1, 0); }; this.moveCursorDown = function() { this.moveCursorBy(1, 0); }; this.moveCursorLeft = function() { var cursor = this.lead.getPosition(), fold; if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) { this.moveCursorTo(fold.start.row, fold.start.column); } else if (cursor.column === 0) { if (cursor.row > 0) { this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length); } } else { var tabSize = this.session.getTabSize(); if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(" ").length-1 == tabSize) this.moveCursorBy(0, -tabSize); else this.moveCursorBy(0, -1); } }; this.moveCursorRight = function() { var cursor = this.lead.getPosition(), fold; if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) { this.moveCursorTo(fold.end.row, fold.end.column); } else if (this.lead.column == this.doc.getLine(this.lead.row).length) { if (this.lead.row < this.doc.getLength() - 1) { this.moveCursorTo(this.lead.row + 1, 0); } } else { var tabSize = this.session.getTabSize(); var cursor = this.lead; if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(" ").length-1 == tabSize) this.moveCursorBy(0, tabSize); else this.moveCursorBy(0, 1); } }; this.moveCursorLineStart = function() { var row = this.lead.row; var column = this.lead.column; var screenRow = this.session.documentToScreenRow(row, column); var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0); var beforeCursor = this.session.getDisplayLine( row, null, firstColumnPosition.row, firstColumnPosition.column ); var leadingSpace = beforeCursor.match(/^\s*/); if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart) firstColumnPosition.column += leadingSpace[0].length; this.moveCursorToPosition(firstColumnPosition); }; this.moveCursorLineEnd = function() { var lead = this.lead; var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column); if (this.lead.column == lineEnd.column) { var line = this.session.getLine(lineEnd.row); if (lineEnd.column == line.length) { var textEnd = line.search(/\s+$/); if (textEnd > 0) lineEnd.column = textEnd; } } this.moveCursorTo(lineEnd.row, lineEnd.column); }; this.moveCursorFileEnd = function() { var row = this.doc.getLength() - 1; var column = this.doc.getLine(row).length; this.moveCursorTo(row, column); }; this.moveCursorFileStart = function() { this.moveCursorTo(0, 0); }; this.moveCursorLongWordRight = function() { var row = this.lead.row; var column = this.lead.column; var line = this.doc.getLine(row); var rightOfCursor = line.substring(column); var match; this.session.nonTokenRe.lastIndex = 0; this.session.tokenRe.lastIndex = 0; var fold = this.session.getFoldAt(row, column, 1); if (fold) { this.moveCursorTo(fold.end.row, fold.end.column); return; } if (match = this.session.nonTokenRe.exec(rightOfCursor)) { column += this.session.nonTokenRe.lastIndex; this.session.nonTokenRe.lastIndex = 0; rightOfCursor = line.substring(column); } if (column >= line.length) { this.moveCursorTo(row, line.length); this.moveCursorRight(); if (row < this.doc.getLength() - 1) this.moveCursorWordRight(); return; } if (match = this.session.tokenRe.exec(rightOfCursor)) { column += this.session.tokenRe.lastIndex; this.session.tokenRe.lastIndex = 0; } this.moveCursorTo(row, column); }; this.moveCursorLongWordLeft = function() { var row = this.lead.row; var column = this.lead.column; var fold; if (fold = this.session.getFoldAt(row, column, -1)) { this.moveCursorTo(fold.start.row, fold.start.column); return; } var str = this.session.getFoldStringAt(row, column, -1); if (str == null) { str = this.doc.getLine(row).substring(0, column); } var leftOfCursor = lang.stringReverse(str); var match; this.session.nonTokenRe.lastIndex = 0; this.session.tokenRe.lastIndex = 0; if (match = this.session.nonTokenRe.exec(leftOfCursor)) { column -= this.session.nonTokenRe.lastIndex; leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex); this.session.nonTokenRe.lastIndex = 0; } if (column <= 0) { this.moveCursorTo(row, 0); this.moveCursorLeft(); if (row > 0) this.moveCursorWordLeft(); return; } if (match = this.session.tokenRe.exec(leftOfCursor)) { column -= this.session.tokenRe.lastIndex; this.session.tokenRe.lastIndex = 0; } this.moveCursorTo(row, column); }; this.$shortWordEndIndex = function(rightOfCursor) { var match, index = 0, ch; var whitespaceRe = /\s/; var tokenRe = this.session.tokenRe; tokenRe.lastIndex = 0; if (match = this.session.tokenRe.exec(rightOfCursor)) { index = this.session.tokenRe.lastIndex; } else { while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) index ++; if (index < 1) { tokenRe.lastIndex = 0; while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) { tokenRe.lastIndex = 0; index ++; if (whitespaceRe.test(ch)) { if (index > 2) { index--; break; } else { while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) index ++; if (index > 2) break; } } } } } tokenRe.lastIndex = 0; return index; }; this.moveCursorShortWordRight = function() { var row = this.lead.row; var column = this.lead.column; var line = this.doc.getLine(row); var rightOfCursor = line.substring(column); var fold = this.session.getFoldAt(row, column, 1); if (fold) return this.moveCursorTo(fold.end.row, fold.end.column); if (column == line.length) { var l = this.doc.getLength(); do { row++; rightOfCursor = this.doc.getLine(row); } while (row < l && /^\s*$/.test(rightOfCursor)); if (!/^\s+/.test(rightOfCursor)) rightOfCursor = ""; column = 0; } var index = this.$shortWordEndIndex(rightOfCursor); this.moveCursorTo(row, column + index); }; this.moveCursorShortWordLeft = function() { var row = this.lead.row; var column = this.lead.column; var fold; if (fold = this.session.getFoldAt(row, column, -1)) return this.moveCursorTo(fold.start.row, fold.start.column); var line = this.session.getLine(row).substring(0, column); if (column === 0) { do { row--; line = this.doc.getLine(row); } while (row > 0 && /^\s*$/.test(line)); column = line.length; if (!/\s+$/.test(line)) line = ""; } var leftOfCursor = lang.stringReverse(line); var index = this.$shortWordEndIndex(leftOfCursor); return this.moveCursorTo(row, column - index); }; this.moveCursorWordRight = function() { if (this.session.$selectLongWords) this.moveCursorLongWordRight(); else this.moveCursorShortWordRight(); }; this.moveCursorWordLeft = function() { if (this.session.$selectLongWords) this.moveCursorLongWordLeft(); else this.moveCursorShortWordLeft(); }; this.moveCursorBy = function(rows, chars) { var screenPos = this.session.documentToScreenPosition( this.lead.row, this.lead.column ); if (chars === 0) { if (this.$desiredColumn) screenPos.column = this.$desiredColumn; else this.$desiredColumn = screenPos.column; } var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column); if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) { if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) { if (docPos.row > 0 || rows > 0) docPos.row++; } } this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0); }; this.moveCursorToPosition = function(position) { this.moveCursorTo(position.row, position.column); }; this.moveCursorTo = function(row, column, keepDesiredColumn) { var fold = this.session.getFoldAt(row, column, 1); if (fold) { row = fold.start.row; column = fold.start.column; } this.$keepDesiredColumnOnChange = true; this.lead.setPosition(row, column); this.$keepDesiredColumnOnChange = false; if (!keepDesiredColumn) this.$desiredColumn = null; }; this.moveCursorToScreen = function(row, column, keepDesiredColumn) { var pos = this.session.screenToDocumentPosition(row, column); this.moveCursorTo(pos.row, pos.column, keepDesiredColumn); }; this.detach = function() { this.lead.detach(); this.anchor.detach(); this.session = this.doc = null; }; this.fromOrientedRange = function(range) { this.setSelectionRange(range, range.cursor == range.start); this.$desiredColumn = range.desiredColumn || this.$desiredColumn; }; this.toOrientedRange = function(range) { var r = this.getRange(); if (range) { range.start.column = r.start.column; range.start.row = r.start.row; range.end.column = r.end.column; range.end.row = r.end.row; } else { range = r; } range.cursor = this.isBackwards() ? range.start : range.end; range.desiredColumn = this.$desiredColumn; return range; }; this.getRangeOfMovements = function(func) { var start = this.getCursor(); try { func(this); var end = this.getCursor(); return Range.fromPoints(start,end); } catch(e) { return Range.fromPoints(start,start); } finally { this.moveCursorToPosition(start); } }; this.toJSON = function() { if (this.rangeCount) { var data = this.ranges.map(function(r) { var r1 = r.clone(); r1.isBackwards = r.cursor == r.start; return r1; }); } else { var data = this.getRange(); data.isBackwards = this.isBackwards(); } return data; }; this.fromJSON = function(data) { if (data.start == undefined) { if (this.rangeList) { this.toSingleRange(data[0]); for (var i = data.length; i--; ) { var r = Range.fromPoints(data[i].start, data[i].end); if (data[i].isBackwards) r.cursor = r.start; this.addRange(r, true); } return; } else data = data[0]; } if (this.rangeList) this.toSingleRange(data); this.setSelectionRange(data, data.isBackwards); }; this.isEqual = function(data) { if ((data.length || this.rangeCount) && data.length != this.rangeCount) return false; if (!data.length || !this.ranges) return this.getRange().isEqual(data); for (var i = this.ranges.length; i--; ) { if (!this.ranges[i].isEqual(data[i])) return false; } return true; }; }).call(Selection.prototype); exports.Selection = Selection; }); ace.define("ace/tokenizer",["require","exports","module","ace/config"], function(acequire, exports, module) { "use strict"; var config = acequire("./config"); var MAX_TOKEN_COUNT = 2000; var Tokenizer = function(rules) { this.states = rules; this.regExps = {}; this.matchMappings = {}; for (var key in this.states) { var state = this.states[key]; var ruleRegExps = []; var matchTotal = 0; var mapping = this.matchMappings[key] = {defaultToken: "text"}; var flag = "g"; var splitterRurles = []; for (var i = 0; i < state.length; i++) { var rule = state[i]; if (rule.defaultToken) mapping.defaultToken = rule.defaultToken; if (rule.caseInsensitive) flag = "gi"; if (rule.regex == null) continue; if (rule.regex instanceof RegExp) rule.regex = rule.regex.toString().slice(1, -1); var adjustedregex = rule.regex; var matchcount = new RegExp("(?:(" + adjustedregex + ")|(.))").exec("a").length - 2; if (Array.isArray(rule.token)) { if (rule.token.length == 1 || matchcount == 1) { rule.token = rule.token[0]; } else if (matchcount - 1 != rule.token.length) { this.reportError("number of classes and regexp groups doesn't match", { rule: rule, groupCount: matchcount - 1 }); rule.token = rule.token[0]; } else { rule.tokenArray = rule.token; rule.token = null; rule.onMatch = this.$arrayTokens; } } else if (typeof rule.token == "function" && !rule.onMatch) { if (matchcount > 1) rule.onMatch = this.$applyToken; else rule.onMatch = rule.token; } if (matchcount > 1) { if (/\\\d/.test(rule.regex)) { adjustedregex = rule.regex.replace(/\\([0-9]+)/g, function(match, digit) { return "\\" + (parseInt(digit, 10) + matchTotal + 1); }); } else { matchcount = 1; adjustedregex = this.removeCapturingGroups(rule.regex); } if (!rule.splitRegex && typeof rule.token != "string") splitterRurles.push(rule); // flag will be known only at the very end } mapping[matchTotal] = i; matchTotal += matchcount; ruleRegExps.push(adjustedregex); if (!rule.onMatch) rule.onMatch = null; } if (!ruleRegExps.length) { mapping[0] = 0; ruleRegExps.push("$"); } splitterRurles.forEach(function(rule) { rule.splitRegex = this.createSplitterRegexp(rule.regex, flag); }, this); this.regExps[key] = new RegExp("(" + ruleRegExps.join(")|(") + ")|($)", flag); } }; (function() { this.$setMaxTokenCount = function(m) { MAX_TOKEN_COUNT = m | 0; }; this.$applyToken = function(str) { var values = this.splitRegex.exec(str).slice(1); var types = this.token.apply(this, values); if (typeof types === "string") return [{type: types, value: str}]; var tokens = []; for (var i = 0, l = types.length; i < l; i++) { if (values[i]) tokens[tokens.length] = { type: types[i], value: values[i] }; } return tokens; }; this.$arrayTokens = function(str) { if (!str) return []; var values = this.splitRegex.exec(str); if (!values) return "text"; var tokens = []; var types = this.tokenArray; for (var i = 0, l = types.length; i < l; i++) { if (values[i + 1]) tokens[tokens.length] = { type: types[i], value: values[i + 1] }; } return tokens; }; this.removeCapturingGroups = function(src) { var r = src.replace( /\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g, function(x, y) {return y ? "(?:" : x;} ); return r; }; this.createSplitterRegexp = function(src, flag) { if (src.indexOf("(?=") != -1) { var stack = 0; var inChClass = false; var lastCapture = {}; src.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function( m, esc, parenOpen, parenClose, square, index ) { if (inChClass) { inChClass = square != "]"; } else if (square) { inChClass = true; } else if (parenClose) { if (stack == lastCapture.stack) { lastCapture.end = index+1; lastCapture.stack = -1; } stack--; } else if (parenOpen) { stack++; if (parenOpen.length != 1) { lastCapture.stack = stack lastCapture.start = index; } } return m; }); if (lastCapture.end != null && /^\)*$/.test(src.substr(lastCapture.end))) src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end); } if (src.charAt(0) != "^") src = "^" + src; if (src.charAt(src.length - 1) != "$") src += "$"; return new RegExp(src, (flag||"").replace("g", "")); }; this.getLineTokens = function(line, startState) { if (startState && typeof startState != "string") { var stack = startState.slice(0); startState = stack[0]; if (startState === "#tmp") { stack.shift() startState = stack.shift() } } else var stack = []; var currentState = startState || "start"; var state = this.states[currentState]; if (!state) { currentState = "start"; state = this.states[currentState]; } var mapping = this.matchMappings[currentState]; var re = this.regExps[currentState]; re.lastIndex = 0; var match, tokens = []; var lastIndex = 0; var matchAttempts = 0; var token = {type: null, value: ""}; while (match = re.exec(line)) { var type = mapping.defaultToken; var rule = null; var value = match[0]; var index = re.lastIndex; if (index - value.length > lastIndex) { var skipped = line.substring(lastIndex, index - value.length); if (token.type == type) { token.value += skipped; } else { if (token.type) tokens.push(token); token = {type: type, value: skipped}; } } for (var i = 0; i < match.length-2; i++) { if (match[i + 1] === undefined) continue; rule = state[mapping[i]]; if (rule.onMatch) type = rule.onMatch(value, currentState, stack); else type = rule.token; if (rule.next) { if (typeof rule.next == "string") { currentState = rule.next; } else { currentState = rule.next(currentState, stack); } state = this.states[currentState]; if (!state) { this.reportError("state doesn't exist", currentState); currentState = "start"; state = this.states[currentState]; } mapping = this.matchMappings[currentState]; lastIndex = index; re = this.regExps[currentState]; re.lastIndex = index; } break; } if (value) { if (typeof type === "string") { if ((!rule || rule.merge !== false) && token.type === type) { token.value += value; } else { if (token.type) tokens.push(token); token = {type: type, value: value}; } } else if (type) { if (token.type) tokens.push(token); token = {type: null, value: ""}; for (var i = 0; i < type.length; i++) tokens.push(type[i]); } } if (lastIndex == line.length) break; lastIndex = index; if (matchAttempts++ > MAX_TOKEN_COUNT) { if (matchAttempts > 2 * line.length) { this.reportError("infinite loop with in ace tokenizer", { startState: startState, line: line }); } while (lastIndex < line.length) { if (token.type) tokens.push(token); token = { value: line.substring(lastIndex, lastIndex += 2000), type: "overflow" }; } currentState = "start"; stack = []; break; } } if (token.type) tokens.push(token); if (stack.length > 1) { if (stack[0] !== currentState) stack.unshift("#tmp", currentState); } return { tokens : tokens, state : stack.length ? stack : currentState }; }; this.reportError = config.reportError; }).call(Tokenizer.prototype); exports.Tokenizer = Tokenizer; }); ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"], function(acequire, exports, module) { "use strict"; var lang = acequire("../lib/lang"); var TextHighlightRules = function() { this.$rules = { "start" : [{ token : "empty_line", regex : '^$' }, { defaultToken : "text" }] }; }; (function() { this.addRules = function(rules, prefix) { if (!prefix) { for (var key in rules) this.$rules[key] = rules[key]; return; } for (var key in rules) { var state = rules[key]; for (var i = 0; i < state.length; i++) { var rule = state[i]; if (rule.next || rule.onMatch) { if (typeof rule.next == "string") { if (rule.next.indexOf(prefix) !== 0) rule.next = prefix + rule.next; } if (rule.nextState && rule.nextState.indexOf(prefix) !== 0) rule.nextState = prefix + rule.nextState; } } this.$rules[prefix + key] = state; } }; this.getRules = function() { return this.$rules; }; this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) { var embedRules = typeof HighlightRules == "function" ? new HighlightRules().getRules() : HighlightRules; if (states) { for (var i = 0; i < states.length; i++) states[i] = prefix + states[i]; } else { states = []; for (var key in embedRules) states.push(prefix + key); } this.addRules(embedRules, prefix); if (escapeRules) { var addRules = Array.prototype[append ? "push" : "unshift"]; for (var i = 0; i < states.length; i++) addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules)); } if (!this.$embeds) this.$embeds = []; this.$embeds.push(prefix); }; this.getEmbeds = function() { return this.$embeds; }; var pushState = function(currentState, stack) { if (currentState != "start" || stack.length) stack.unshift(this.nextState, currentState); return this.nextState; }; var popState = function(currentState, stack) { stack.shift(); return stack.shift() || "start"; }; this.normalizeRules = function() { var id = 0; var rules = this.$rules; function processState(key) { var state = rules[key]; state.processed = true; for (var i = 0; i < state.length; i++) { var rule = state[i]; var toInsert = null; if (Array.isArray(rule)) { toInsert = rule; rule = {}; } if (!rule.regex && rule.start) { rule.regex = rule.start; if (!rule.next) rule.next = []; rule.next.push({ defaultToken: rule.token }, { token: rule.token + ".end", regex: rule.end || rule.start, next: "pop" }); rule.token = rule.token + ".start"; rule.push = true; } var next = rule.next || rule.push; if (next && Array.isArray(next)) { var stateName = rule.stateName; if (!stateName) { stateName = rule.token; if (typeof stateName != "string") stateName = stateName[0] || ""; if (rules[stateName]) stateName += id++; } rules[stateName] = next; rule.next = stateName; processState(stateName); } else if (next == "pop") { rule.next = popState; } if (rule.push) { rule.nextState = rule.next || rule.push; rule.next = pushState; delete rule.push; } if (rule.rules) { for (var r in rule.rules) { if (rules[r]) { if (rules[r].push) rules[r].push.apply(rules[r], rule.rules[r]); } else { rules[r] = rule.rules[r]; } } } var includeName = typeof rule == "string" ? rule : typeof rule.include == "string" ? rule.include : ""; if (includeName) { toInsert = rules[includeName]; } if (toInsert) { var args = [i, 1].concat(toInsert); if (rule.noEscape) args = args.filter(function(x) {return !x.next;}); state.splice.apply(state, args); i--; } if (rule.keywordMap) { rule.token = this.createKeywordMapper( rule.keywordMap, rule.defaultToken || "text", rule.caseInsensitive ); delete rule.defaultToken; } } } Object.keys(rules).forEach(processState, this); }; this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) { var keywords = Object.create(null); Object.keys(map).forEach(function(className) { var a = map[className]; if (ignoreCase) a = a.toLowerCase(); var list = a.split(splitChar || "|"); for (var i = list.length; i--; ) keywords[list[i]] = className; }); if (Object.getPrototypeOf(keywords)) { keywords.__proto__ = null; } this.$keywordList = Object.keys(keywords); map = null; return ignoreCase ? function(value) {return keywords[value.toLowerCase()] || defaultToken } : function(value) {return keywords[value] || defaultToken }; }; this.getKeywords = function() { return this.$keywords; }; }).call(TextHighlightRules.prototype); exports.TextHighlightRules = TextHighlightRules; }); ace.define("ace/mode/behaviour",["require","exports","module"], function(acequire, exports, module) { "use strict"; var Behaviour = function() { this.$behaviours = {}; }; (function () { this.add = function (name, action, callback) { switch (undefined) { case this.$behaviours: this.$behaviours = {}; case this.$behaviours[name]: this.$behaviours[name] = {}; } this.$behaviours[name][action] = callback; } this.addBehaviours = function (behaviours) { for (var key in behaviours) { for (var action in behaviours[key]) { this.add(key, action, behaviours[key][action]); } } } this.remove = function (name) { if (this.$behaviours && this.$behaviours[name]) { delete this.$behaviours[name]; } } this.inherit = function (mode, filter) { if (typeof mode === "function") { var behaviours = new mode().getBehaviours(filter); } else { var behaviours = mode.getBehaviours(filter); } this.addBehaviours(behaviours); } this.getBehaviours = function (filter) { if (!filter) { return this.$behaviours; } else { var ret = {} for (var i = 0; i < filter.length; i++) { if (this.$behaviours[filter[i]]) { ret[filter[i]] = this.$behaviours[filter[i]]; } } return ret; } } }).call(Behaviour.prototype); exports.Behaviour = Behaviour; }); ace.define("ace/token_iterator",["require","exports","module"], function(acequire, exports, module) { "use strict"; var TokenIterator = function(session, initialRow, initialColumn) { this.$session = session; this.$row = initialRow; this.$rowTokens = session.getTokens(initialRow); var token = session.getTokenAt(initialRow, initialColumn); this.$tokenIndex = token ? token.index : -1; }; (function() { this.stepBackward = function() { this.$tokenIndex -= 1; while (this.$tokenIndex < 0) { this.$row -= 1; if (this.$row < 0) { this.$row = 0; return null; } this.$rowTokens = this.$session.getTokens(this.$row); this.$tokenIndex = this.$rowTokens.length - 1; } return this.$rowTokens[this.$tokenIndex]; }; this.stepForward = function() { this.$tokenIndex += 1; var rowCount; while (this.$tokenIndex >= this.$rowTokens.length) { this.$row += 1; if (!rowCount) rowCount = this.$session.getLength(); if (this.$row >= rowCount) { this.$row = rowCount - 1; return null; } this.$rowTokens = this.$session.getTokens(this.$row); this.$tokenIndex = 0; } return this.$rowTokens[this.$tokenIndex]; }; this.getCurrentToken = function () { return this.$rowTokens[this.$tokenIndex]; }; this.getCurrentTokenRow = function () { return this.$row; }; this.getCurrentTokenColumn = function() { var rowTokens = this.$rowTokens; var tokenIndex = this.$tokenIndex; var column = rowTokens[tokenIndex].start; if (column !== undefined) return column; column = 0; while (tokenIndex > 0) { tokenIndex -= 1; column += rowTokens[tokenIndex].value.length; } return column; }; this.getCurrentTokenPosition = function() { return {row: this.$row, column: this.getCurrentTokenColumn()}; }; }).call(TokenIterator.prototype); exports.TokenIterator = TokenIterator; }); ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(acequire, exports, module) { "use strict"; var oop = acequire("../../lib/oop"); var Behaviour = acequire("../behaviour").Behaviour; var TokenIterator = acequire("../../token_iterator").TokenIterator; var lang = acequire("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var context; var contextCache = {}; var initContext = function(editor) { var id = -1; if (editor.multiSelect) { id = editor.selection.index; if (contextCache.rangeCount != editor.multiSelect.rangeCount) contextCache = {rangeCount: editor.multiSelect.rangeCount}; } if (contextCache[id]) return context = contextCache[id]; context = contextCache[id] = { autoInsertedBrackets: 0, autoInsertedRow: -1, autoInsertedLineEnd: "", maybeInsertedBrackets: 0, maybeInsertedRow: -1, maybeInsertedLineStart: "", maybeInsertedLineEnd: "" }; }; var getWrapped = function(selection, selected, opening, closing) { var rowDiff = selection.end.row - selection.start.row; return { text: opening + selected + closing, selection: [ 0, selection.start.column + 1, rowDiff, selection.end.column + (rowDiff ? 0 : 1) ] }; }; var CstyleBehaviour = function() { this.add("braces", "insertion", function(state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '{', '}'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { initContext(editor); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { initContext(editor); var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", context.maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar === '}') { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); if (!openBracePos) return null; var next_indent = this.$getIndent(session.getLine(openBracePos.row)); } else if (closing) { var next_indent = this.$getIndent(line); } else { CstyleBehaviour.clearMaybeInsertedClosing(); return; } var indent = next_indent + session.getTabString(); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } else { CstyleBehaviour.clearMaybeInsertedClosing(); } }); this.add("braces", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { context.maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function(state, action, editor, session, text) { if (text == '(') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '(', ')'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function(state, action, editor, session, text) { if (text == '[') { initContext(editor); var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, '[', ']'); } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { initContext(editor); var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { if (text == '"' || text == "'") { if (this.lineCommentStart && this.lineCommentStart.indexOf(text) != -1) return; initContext(editor); var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return getWrapped(selection, selected, quote, quote); } else if (!selected) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); var rightChar = line.substring(cursor.column, cursor.column + 1); var token = session.getTokenAt(cursor.row, cursor.column); var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); if (leftChar == "\\" && token && /escape/.test(token.type)) return null; var stringBefore = token && /string|escape/.test(token.type); var stringAfter = !rightToken || /string|escape/.test(rightToken.type); var pair; if (rightChar == quote) { pair = stringBefore !== stringAfter; if (pair && /string\.end/.test(rightToken.type)) pair = false; } else { if (stringBefore && !stringAfter) return null; // wrap string with different quote if (stringBefore && stringAfter) return null; // do not pair quotes inside strings var wordRe = session.$mode.tokenRe; wordRe.lastIndex = 0; var isWordBefore = wordRe.test(leftChar); wordRe.lastIndex = 0; var isWordAfter = wordRe.test(leftChar); if (isWordBefore || isWordAfter) return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing pair = true; } return { text: pair ? quote + quote : "", selection: [1,1] }; } } }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == selected) { range.end.column++; return range; } } }); }; CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) context.autoInsertedBrackets = 0; context.autoInsertedRow = cursor.row; context.autoInsertedLineEnd = bracket + line.substr(cursor.column); context.autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) context.maybeInsertedBrackets = 0; context.maybeInsertedRow = cursor.row; context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; context.maybeInsertedLineEnd = line.substr(cursor.column); context.maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return context.autoInsertedBrackets > 0 && cursor.row === context.autoInsertedRow && bracket === context.autoInsertedLineEnd[0] && line.substr(cursor.column) === context.autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return context.maybeInsertedBrackets > 0 && cursor.row === context.maybeInsertedRow && line.substr(cursor.column) === context.maybeInsertedLineEnd && line.substr(0, cursor.column) == context.maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); context.autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { if (context) { context.maybeInsertedBrackets = 0; context.maybeInsertedRow = -1; } }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); ace.define("ace/unicode",["require","exports","module"], function(acequire, exports, module) { "use strict"; exports.packages = {}; addUnicodePackage({ L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A", Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A", Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC", Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F", Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26", Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26", Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC", Me: "0488048906DE20DD-20E020E2-20E4A670-A672", N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF", No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835", P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65", Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D", Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62", Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63", Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20", Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21", Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F", Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65", S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD", Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC", Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6", Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3", So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD", Z: "002000A01680180E2000-200A20282029202F205F3000", Zs: "002000A01680180E2000-200A202F205F3000", Zl: "2028", Zp: "2029", C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF", Cc: "0000-001F007F-009F", Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB", Co: "E000-F8FF", Cs: "D800-DFFF", Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF" }); function addUnicodePackage (pack) { var codePoint = /\w{4}/g; for (var name in pack) exports.packages[name] = pack[name].replace(codePoint, "\\u$&"); } }); ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"], function(acequire, exports, module) { "use strict"; var Tokenizer = acequire("../tokenizer").Tokenizer; var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; var unicode = acequire("../unicode"); var lang = acequire("../lib/lang"); var TokenIterator = acequire("../token_iterator").TokenIterator; var Range = acequire("../range").Range; var Mode = function() { this.HighlightRules = TextHighlightRules; }; (function() { this.$defaultBehaviour = new CstyleBehaviour(); this.tokenRe = new RegExp("^[" + unicode.packages.L + unicode.packages.Mn + unicode.packages.Mc + unicode.packages.Nd + unicode.packages.Pc + "\\$_]+", "g" ); this.nonTokenRe = new RegExp("^(?:[^" + unicode.packages.L + unicode.packages.Mn + unicode.packages.Mc + unicode.packages.Nd + unicode.packages.Pc + "\\$_]|\\s])+", "g" ); this.getTokenizer = function() { if (!this.$tokenizer) { this.$highlightRules = this.$highlightRules || new this.HighlightRules(this.$highlightRuleConfig); this.$tokenizer = new Tokenizer(this.$highlightRules.getRules()); } return this.$tokenizer; }; this.lineCommentStart = ""; this.blockComment = ""; this.toggleCommentLines = function(state, session, startRow, endRow) { var doc = session.doc; var ignoreBlankLines = true; var shouldRemove = true; var minIndent = Infinity; var tabSize = session.getTabSize(); var insertAtTabStop = false; if (!this.lineCommentStart) { if (!this.blockComment) return false; var lineCommentStart = this.blockComment.start; var lineCommentEnd = this.blockComment.end; var regexpStart = new RegExp("^(\\s*)(?:" + lang.escapeRegExp(lineCommentStart) + ")"); var regexpEnd = new RegExp("(?:" + lang.escapeRegExp(lineCommentEnd) + ")\\s*$"); var comment = function(line, i) { if (testRemove(line, i)) return; if (!ignoreBlankLines || /\S/.test(line)) { doc.insertInLine({row: i, column: line.length}, lineCommentEnd); doc.insertInLine({row: i, column: minIndent}, lineCommentStart); } }; var uncomment = function(line, i) { var m; if (m = line.match(regexpEnd)) doc.removeInLine(i, line.length - m[0].length, line.length); if (m = line.match(regexpStart)) doc.removeInLine(i, m[1].length, m[0].length); }; var testRemove = function(line, row) { if (regexpStart.test(line)) return true; var tokens = session.getTokens(row); for (var i = 0; i < tokens.length; i++) { if (tokens[i].type === "comment") return true; } }; } else { if (Array.isArray(this.lineCommentStart)) { var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join("|"); var lineCommentStart = this.lineCommentStart[0]; } else { var regexpStart = lang.escapeRegExp(this.lineCommentStart); var lineCommentStart = this.lineCommentStart; } regexpStart = new RegExp("^(\\s*)(?:" + regexpStart + ") ?"); insertAtTabStop = session.getUseSoftTabs(); var uncomment = function(line, i) { var m = line.match(regexpStart); if (!m) return; var start = m[1].length, end = m[0].length; if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == " ") end--; doc.removeInLine(i, start, end); }; var commentWithSpace = lineCommentStart + " "; var comment = function(line, i) { if (!ignoreBlankLines || /\S/.test(line)) { if (shouldInsertSpace(line, minIndent, minIndent)) doc.insertInLine({row: i, column: minIndent}, commentWithSpace); else doc.insertInLine({row: i, column: minIndent}, lineCommentStart); } }; var testRemove = function(line, i) { return regexpStart.test(line); }; var shouldInsertSpace = function(line, before, after) { var spaces = 0; while (before-- && line.charAt(before) == " ") spaces++; if (spaces % tabSize != 0) return false; var spaces = 0; while (line.charAt(after++) == " ") spaces++; if (tabSize > 2) return spaces % tabSize != tabSize - 1; else return spaces % tabSize == 0; return true; }; } function iter(fun) { for (var i = startRow; i <= endRow; i++) fun(doc.getLine(i), i); } var minEmptyLength = Infinity; iter(function(line, i) { var indent = line.search(/\S/); if (indent !== -1) { if (indent < minIndent) minIndent = indent; if (shouldRemove && !testRemove(line, i)) shouldRemove = false; } else if (minEmptyLength > line.length) { minEmptyLength = line.length; } }); if (minIndent == Infinity) { minIndent = minEmptyLength; ignoreBlankLines = false; shouldRemove = false; } if (insertAtTabStop && minIndent % tabSize != 0) minIndent = Math.floor(minIndent / tabSize) * tabSize; iter(shouldRemove ? uncomment : comment); }; this.toggleBlockComment = function(state, session, range, cursor) { var comment = this.blockComment; if (!comment) return; if (!comment.start && comment[0]) comment = comment[0]; var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); var sel = session.selection; var initialRange = session.selection.toOrientedRange(); var startRow, colDiff; if (token && /comment/.test(token.type)) { var startRange, endRange; while (token && /comment/.test(token.type)) { var i = token.value.indexOf(comment.start); if (i != -1) { var row = iterator.getCurrentTokenRow(); var column = iterator.getCurrentTokenColumn() + i; startRange = new Range(row, column, row, column + comment.start.length); break; } token = iterator.stepBackward(); } var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); while (token && /comment/.test(token.type)) { var i = token.value.indexOf(comment.end); if (i != -1) { var row = iterator.getCurrentTokenRow(); var column = iterator.getCurrentTokenColumn() + i; endRange = new Range(row, column, row, column + comment.end.length); break; } token = iterator.stepForward(); } if (endRange) session.remove(endRange); if (startRange) { session.remove(startRange); startRow = startRange.start.row; colDiff = -comment.start.length; } } else { colDiff = comment.start.length; startRow = range.start.row; session.insert(range.end, comment.end); session.insert(range.start, comment.start); } if (initialRange.start.row == startRow) initialRange.start.column += colDiff; if (initialRange.end.row == startRow) initialRange.end.column += colDiff; session.selection.fromOrientedRange(initialRange); }; this.getNextLineIndent = function(state, line, tab) { return this.$getIndent(line); }; this.checkOutdent = function(state, line, input) { return false; }; this.autoOutdent = function(state, doc, row) { }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; this.createWorker = function(session) { return null; }; this.createModeDelegates = function (mapping) { this.$embeds = []; this.$modes = {}; for (var i in mapping) { if (mapping[i]) { this.$embeds.push(i); this.$modes[i] = new mapping[i](); } } var delegations = ["toggleBlockComment", "toggleCommentLines", "getNextLineIndent", "checkOutdent", "autoOutdent", "transformAction", "getCompletions"]; for (var i = 0; i < delegations.length; i++) { (function(scope) { var functionName = delegations[i]; var defaultHandler = scope[functionName]; scope[delegations[i]] = function() { return this.$delegator(functionName, arguments, defaultHandler); }; }(this)); } }; this.$delegator = function(method, args, defaultHandler) { var state = args[0]; if (typeof state != "string") state = state[0]; for (var i = 0; i < this.$embeds.length; i++) { if (!this.$modes[this.$embeds[i]]) continue; var split = state.split(this.$embeds[i]); if (!split[0] && split[1]) { args[0] = split[1]; var mode = this.$modes[this.$embeds[i]]; return mode[method].apply(mode, args); } } var ret = defaultHandler.apply(this, args); return defaultHandler ? ret : undefined; }; this.transformAction = function(state, action, editor, session, param) { if (this.$behaviour) { var behaviours = this.$behaviour.getBehaviours(); for (var key in behaviours) { if (behaviours[key][action]) { var ret = behaviours[key][action].apply(this, arguments); if (ret) { return ret; } } } } }; this.getKeywords = function(append) { if (!this.completionKeywords) { var rules = this.$tokenizer.rules; var completionKeywords = []; for (var rule in rules) { var ruleItr = rules[rule]; for (var r = 0, l = ruleItr.length; r < l; r++) { if (typeof ruleItr[r].token === "string") { if (/keyword|support|storage/.test(ruleItr[r].token)) completionKeywords.push(ruleItr[r].regex); } else if (typeof ruleItr[r].token === "object") { for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) { if (/keyword|support|storage/.test(ruleItr[r].token[a])) { var rule = ruleItr[r].regex.match(/\(.+?\)/g)[a]; completionKeywords.push(rule.substr(1, rule.length - 2)); } } } } } this.completionKeywords = completionKeywords; } if (!append) return this.$keywordList; return completionKeywords.concat(this.$keywordList || []); }; this.$createKeywordList = function() { if (!this.$highlightRules) this.getTokenizer(); return this.$keywordList = this.$highlightRules.$keywordList || []; }; this.getCompletions = function(state, session, pos, prefix) { var keywords = this.$keywordList || this.$createKeywordList(); return keywords.map(function(word) { return { name: word, value: word, score: 0, meta: "keyword" }; }); }; this.$id = "ace/mode/text"; }).call(Mode.prototype); exports.Mode = Mode; }); ace.define("ace/apply_delta",["require","exports","module"], function(acequire, exports, module) { "use strict"; function throwDeltaError(delta, errorText){ console.log("Invalid Delta:", delta); throw "Invalid Delta: " + errorText; } function positionInDocument(docLines, position) { return position.row >= 0 && position.row < docLines.length && position.column >= 0 && position.column <= docLines[position.row].length; } function validateDelta(docLines, delta) { if (delta.action != "insert" && delta.action != "remove") throwDeltaError(delta, "delta.action must be 'insert' or 'remove'"); if (!(delta.lines instanceof Array)) throwDeltaError(delta, "delta.lines must be an Array"); if (!delta.start || !delta.end) throwDeltaError(delta, "delta.start/end must be an present"); var start = delta.start; if (!positionInDocument(docLines, delta.start)) throwDeltaError(delta, "delta.start must be contained in document"); var end = delta.end; if (delta.action == "remove" && !positionInDocument(docLines, end)) throwDeltaError(delta, "delta.end must contained in document for 'remove' actions"); var numRangeRows = end.row - start.row; var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0)); if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars) throwDeltaError(delta, "delta.range must match delta lines"); } exports.applyDelta = function(docLines, delta, doNotValidate) { var row = delta.start.row; var startColumn = delta.start.column; var line = docLines[row] || ""; switch (delta.action) { case "insert": var lines = delta.lines; if (lines.length === 1) { docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn); } else { var args = [row, 1].concat(delta.lines); docLines.splice.apply(docLines, args); docLines[row] = line.substring(0, startColumn) + docLines[row]; docLines[row + delta.lines.length - 1] += line.substring(startColumn); } break; case "remove": var endColumn = delta.end.column; var endRow = delta.end.row; if (row === endRow) { docLines[row] = line.substring(0, startColumn) + line.substring(endColumn); } else { docLines.splice( row, endRow - row + 1, line.substring(0, startColumn) + docLines[endRow].substring(endColumn) ); } break; } } }); ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(acequire, exports, module) { "use strict"; var oop = acequire("./lib/oop"); var EventEmitter = acequire("./lib/event_emitter").EventEmitter; var Anchor = exports.Anchor = function(doc, row, column) { this.$onChange = this.onChange.bind(this); this.attach(doc); if (typeof column == "undefined") this.setPosition(row.row, row.column); else this.setPosition(row, column); }; (function() { oop.implement(this, EventEmitter); this.getPosition = function() { return this.$clipPositionToDocument(this.row, this.column); }; this.getDocument = function() { return this.document; }; this.$insertRight = false; this.onChange = function(delta) { if (delta.start.row == delta.end.row && delta.start.row != this.row) return; if (delta.start.row > this.row) return; var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); this.setPosition(point.row, point.column, true); }; function $pointsInOrder(point1, point2, equalPointsInOrder) { var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column; return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter); } function $getTransformedPoint(delta, point, moveIfEqual) { var deltaIsInsert = delta.action == "insert"; var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row); var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column); var deltaStart = delta.start; var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range. if ($pointsInOrder(point, deltaStart, moveIfEqual)) { return { row: point.row, column: point.column }; } if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) { return { row: point.row + deltaRowShift, column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0) }; } return { row: deltaStart.row, column: deltaStart.column }; } this.setPosition = function(row, column, noClip) { var pos; if (noClip) { pos = { row: row, column: column }; } else { pos = this.$clipPositionToDocument(row, column); } if (this.row == pos.row && this.column == pos.column) return; var old = { row: this.row, column: this.column }; this.row = pos.row; this.column = pos.column; this._signal("change", { old: old, value: pos }); }; this.detach = function() { this.document.removeEventListener("change", this.$onChange); }; this.attach = function(doc) { this.document = doc || this.document; this.document.on("change", this.$onChange); }; this.$clipPositionToDocument = function(row, column) { var pos = {}; if (row >= this.document.getLength()) { pos.row = Math.max(0, this.document.getLength() - 1); pos.column = this.document.getLine(pos.row).length; } else if (row < 0) { pos.row = 0; pos.column = 0; } else { pos.row = row; pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); } if (column < 0) pos.column = 0; return pos; }; }).call(Anchor.prototype); }); ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(acequire, exports, module) { "use strict"; var oop = acequire("./lib/oop"); var applyDelta = acequire("./apply_delta").applyDelta; var EventEmitter = acequire("./lib/event_emitter").EventEmitter; var Range = acequire("./range").Range; var Anchor = acequire("./anchor").Anchor; var Document = function(textOrLines) { this.$lines = [""]; if (textOrLines.length === 0) { this.$lines = [""]; } else if (Array.isArray(textOrLines)) { this.insertMergedLines({row: 0, column: 0}, textOrLines); } else { this.insert({row: 0, column:0}, textOrLines); } }; (function() { oop.implement(this, EventEmitter); this.setValue = function(text) { var len = this.getLength() - 1; this.remove(new Range(0, 0, len, this.getLine(len).length)); this.insert({row: 0, column: 0}, text); }; this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; if ("aaa".split(/a/).length === 0) { this.$split = function(text) { return text.replace(/\r\n|\r/g, "\n").split("\n"); }; } else { this.$split = function(text) { return text.split(/\r\n|\r|\n/); }; } this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n"; this._signal("changeNewLineMode"); }; this.getNewLineCharacter = function() { switch (this.$newLineMode) { case "windows": return "\r\n"; case "unix": return "\n"; default: return this.$autoNewLine || "\n"; } }; this.$autoNewLine = ""; this.$newLineMode = "auto"; this.setNewLineMode = function(newLineMode) { if (this.$newLineMode === newLineMode) return; this.$newLineMode = newLineMode; this._signal("changeNewLineMode"); }; this.getNewLineMode = function() { return this.$newLineMode; }; this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; this.getLine = function(row) { return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; this.getAllLines = function() { return this.getLines(0, this.getLength()); }; this.getLength = function() { return this.$lines.length; }; this.getTextRange = function(range) { return this.getLinesForRange(range).join(this.getNewLineCharacter()); }; this.getLinesForRange = function(range) { var lines; if (range.start.row === range.end.row) { lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)]; } else { lines = this.getLines(range.start.row, range.end.row); lines[0] = (lines[0] || "").substring(range.start.column); var l = lines.length - 1; if (range.end.row - range.start.row == l) lines[l] = lines[l].substring(0, range.end.column); } return lines; }; this.insertLines = function(row, lines) { console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); return this.insertFullLines(row, lines); }; this.removeLines = function(firstRow, lastRow) { console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); return this.removeFullLines(firstRow, lastRow); }; this.insertNewLine = function(position) { console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); return this.insertMergedLines(position, ["", ""]); }; this.insert = function(position, text) { if (this.getLength() <= 1) this.$detectNewLine(text); return this.insertMergedLines(position, this.$split(text)); }; this.insertInLine = function(position, text) { var start = this.clippedPos(position.row, position.column); var end = this.pos(position.row, position.column + text.length); this.applyDelta({ start: start, end: end, action: "insert", lines: [text] }, true); return this.clonePos(end); }; this.clippedPos = function(row, column) { var length = this.getLength(); if (row === undefined) { row = length; } else if (row < 0) { row = 0; } else if (row >= length) { row = length - 1; column = undefined; } var line = this.getLine(row); if (column == undefined) column = line.length; column = Math.min(Math.max(column, 0), line.length); return {row: row, column: column}; }; this.clonePos = function(pos) { return {row: pos.row, column: pos.column}; }; this.pos = function(row, column) { return {row: row, column: column}; }; this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { position.row = Math.max(0, length - 1); position.column = this.getLine(length - 1).length; } else { position.row = Math.max(0, position.row); position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length); } return position; }; this.insertFullLines = function(row, lines) { row = Math.min(Math.max(row, 0), this.getLength()); var column = 0; if (row < this.getLength()) { lines = lines.concat([""]); column = 0; } else { lines = [""].concat(lines); row--; column = this.$lines[row].length; } this.insertMergedLines({row: row, column: column}, lines); }; this.insertMergedLines = function(position, lines) { var start = this.clippedPos(position.row, position.column); var end = { row: start.row + lines.length - 1, column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length }; this.applyDelta({ start: start, end: end, action: "insert", lines: lines }); return this.clonePos(end); }; this.remove = function(range) { var start = this.clippedPos(range.start.row, range.start.column); var end = this.clippedPos(range.end.row, range.end.column); this.applyDelta({ start: start, end: end, action: "remove", lines: this.getLinesForRange({start: start, end: end}) }); return this.clonePos(start); }; this.removeInLine = function(row, startColumn, endColumn) { var start = this.clippedPos(row, startColumn); var end = this.clippedPos(row, endColumn); this.applyDelta({ start: start, end: end, action: "remove", lines: this.getLinesForRange({start: start, end: end}) }, true); return this.clonePos(start); }; this.removeFullLines = function(firstRow, lastRow) { firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1); lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1); var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0; var deleteLastNewLine = lastRow < this.getLength() - 1; var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow ); var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 ); var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow ); var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length ); var range = new Range(startRow, startCol, endRow, endCol); var deletedLines = this.$lines.slice(firstRow, lastRow + 1); this.applyDelta({ start: range.start, end: range.end, action: "remove", lines: this.getLinesForRange(range) }); return deletedLines; }; this.removeNewLine = function(row) { if (row < this.getLength() - 1 && row >= 0) { this.applyDelta({ start: this.pos(row, this.getLine(row).length), end: this.pos(row + 1, 0), action: "remove", lines: ["", ""] }); } }; this.replace = function(range, text) { if (!(range instanceof Range)) range = Range.fromPoints(range.start, range.end); if (text.length === 0 && range.isEmpty()) return range.start; if (text == this.getTextRange(range)) return range.end; this.remove(range); var end; if (text) { end = this.insert(range.start, text); } else { end = range.start; } return end; }; this.applyDeltas = function(deltas) { for (var i=0; i=0; i--) { this.revertDelta(deltas[i]); } }; this.applyDelta = function(delta, doNotValidate) { var isInsert = delta.action == "insert"; if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] : !Range.comparePoints(delta.start, delta.end)) { return; } if (isInsert && delta.lines.length > 20000) this.$splitAndapplyLargeDelta(delta, 20000); applyDelta(this.$lines, delta, doNotValidate); this._signal("change", delta); }; this.$splitAndapplyLargeDelta = function(delta, MAX) { var lines = delta.lines; var l = lines.length; var row = delta.start.row; var column = delta.start.column; var from = 0, to = 0; do { from = to; to += MAX - 1; var chunk = lines.slice(from, to); if (to > l) { delta.lines = chunk; delta.start.row = row + from; delta.start.column = column; break; } chunk.push(""); this.applyDelta({ start: this.pos(row + from, column), end: this.pos(row + to, column = 0), action: delta.action, lines: chunk }, true); } while(true); }; this.revertDelta = function(delta) { this.applyDelta({ start: this.clonePos(delta.start), end: this.clonePos(delta.end), action: (delta.action == "insert" ? "remove" : "insert"), lines: delta.lines.slice() }); }; this.indexToPosition = function(index, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; for (var i = startRow || 0, l = lines.length; i < l; i++) { index -= lines[i].length + newlineLength; if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } return {row: l-1, column: lines[l-1].length}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); var newlineLength = this.getNewLineCharacter().length; var index = 0; var row = Math.min(pos.row, lines.length); for (var i = startRow || 0; i < row; ++i) index += lines[i].length + newlineLength; return index + pos.column; }; }).call(Document.prototype); exports.Document = Document; }); ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(acequire, exports, module) { "use strict"; var oop = acequire("./lib/oop"); var EventEmitter = acequire("./lib/event_emitter").EventEmitter; var BackgroundTokenizer = function(tokenizer, editor) { this.running = false; this.lines = []; this.states = []; this.currentLine = 0; this.tokenizer = tokenizer; var self = this; this.$worker = function() { if (!self.running) { return; } var workerStart = new Date(); var currentLine = self.currentLine; var endLine = -1; var doc = self.doc; var startLine = currentLine; while (self.lines[currentLine]) currentLine++; var len = doc.getLength(); var processedLines = 0; self.running = false; while (currentLine < len) { self.$tokenizeRow(currentLine); endLine = currentLine; do { currentLine++; } while (self.lines[currentLine]); processedLines ++; if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { self.running = setTimeout(self.$worker, 20); break; } } self.currentLine = currentLine; if (startLine <= endLine) self.fireUpdateEvent(startLine, endLine); }; }; (function(){ oop.implement(this, EventEmitter); this.setTokenizer = function(tokenizer) { this.tokenizer = tokenizer; this.lines = []; this.states = []; this.start(0); }; this.setDocument = function(doc) { this.doc = doc; this.lines = []; this.states = []; this.stop(); }; this.fireUpdateEvent = function(firstRow, lastRow) { var data = { first: firstRow, last: lastRow }; this._signal("update", {data: data}); }; this.start = function(startRow) { this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength()); this.lines.splice(this.currentLine, this.lines.length); this.states.splice(this.currentLine, this.states.length); this.stop(); this.running = setTimeout(this.$worker, 700); }; this.scheduleStart = function() { if (!this.running) this.running = setTimeout(this.$worker, 700); } this.$updateOnChange = function(delta) { var startRow = delta.start.row; var len = delta.end.row - startRow; if (len === 0) { this.lines[startRow] = null; } else if (delta.action == "remove") { this.lines.splice(startRow, len + 1, null); this.states.splice(startRow, len + 1, null); } else { var args = Array(len + 1); args.unshift(startRow, 1); this.lines.splice.apply(this.lines, args); this.states.splice.apply(this.states, args); } this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength()); this.stop(); }; this.stop = function() { if (this.running) clearTimeout(this.running); this.running = false; }; this.getTokens = function(row) { return this.lines[row] || this.$tokenizeRow(row); }; this.getState = function(row) { if (this.currentLine == row) this.$tokenizeRow(row); return this.states[row] || "start"; }; this.$tokenizeRow = function(row) { var line = this.doc.getLine(row); var state = this.states[row - 1]; var data = this.tokenizer.getLineTokens(line, state, row); if (this.states[row] + "" !== data.state + "") { this.states[row] = data.state; this.lines[row + 1] = null; if (this.currentLine > row + 1) this.currentLine = row + 1; } else if (this.currentLine == row) { this.currentLine = row + 1; } return this.lines[row] = data.tokens; }; }).call(BackgroundTokenizer.prototype); exports.BackgroundTokenizer = BackgroundTokenizer; }); ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(acequire, exports, module) { "use strict"; var lang = acequire("./lib/lang"); var oop = acequire("./lib/oop"); var Range = acequire("./range").Range; var SearchHighlight = function(regExp, clazz, type) { this.setRegexp(regExp); this.clazz = clazz; this.type = type || "text"; }; (function() { this.MAX_RANGES = 500; this.setRegexp = function(regExp) { if (this.regExp+"" == regExp+"") return; this.regExp = regExp; this.cache = []; }; this.update = function(html, markerLayer, session, config) { if (!this.regExp) return; var start = config.firstRow, end = config.lastRow; for (var i = start; i <= end; i++) { var ranges = this.cache[i]; if (ranges == null) { ranges = lang.getMatchOffsets(session.getLine(i), this.regExp); if (ranges.length > this.MAX_RANGES) ranges = ranges.slice(0, this.MAX_RANGES); ranges = ranges.map(function(match) { return new Range(i, match.offset, i, match.offset + match.length); }); this.cache[i] = ranges.length ? ranges : ""; } for (var j = ranges.length; j --; ) { markerLayer.drawSingleLineMarker( html, ranges[j].toScreenRange(session), this.clazz, config); } } }; }).call(SearchHighlight.prototype); exports.SearchHighlight = SearchHighlight; }); ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"], function(acequire, exports, module) { "use strict"; var Range = acequire("../range").Range; function FoldLine(foldData, folds) { this.foldData = foldData; if (Array.isArray(folds)) { this.folds = folds; } else { folds = this.folds = [ folds ]; } var last = folds[folds.length - 1]; this.range = new Range(folds[0].start.row, folds[0].start.column, last.end.row, last.end.column); this.start = this.range.start; this.end = this.range.end; this.folds.forEach(function(fold) { fold.setFoldLine(this); }, this); } (function() { this.shiftRow = function(shift) { this.start.row += shift; this.end.row += shift; this.folds.forEach(function(fold) { fold.start.row += shift; fold.end.row += shift; }); }; this.addFold = function(fold) { if (fold.sameRow) { if (fold.start.row < this.startRow || fold.endRow > this.endRow) { throw new Error("Can't add a fold to this FoldLine as it has no connection"); } this.folds.push(fold); this.folds.sort(function(a, b) { return -a.range.compareEnd(b.start.row, b.start.column); }); if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) { this.end.row = fold.end.row; this.end.column = fold.end.column; } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) { this.start.row = fold.start.row; this.start.column = fold.start.column; } } else if (fold.start.row == this.end.row) { this.folds.push(fold); this.end.row = fold.end.row; this.end.column = fold.end.column; } else if (fold.end.row == this.start.row) { this.folds.unshift(fold); this.start.row = fold.start.row; this.start.column = fold.start.column; } else { throw new Error("Trying to add fold to FoldRow that doesn't have a matching row"); } fold.foldLine = this; }; this.containsRow = function(row) { return row >= this.start.row && row <= this.end.row; }; this.walk = function(callback, endRow, endColumn) { var lastEnd = 0, folds = this.folds, fold, cmp, stop, isNewRow = true; if (endRow == null) { endRow = this.end.row; endColumn = this.end.column; } for (var i = 0; i < folds.length; i++) { fold = folds[i]; cmp = fold.range.compareStart(endRow, endColumn); if (cmp == -1) { callback(null, endRow, endColumn, lastEnd, isNewRow); return; } stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow); stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd); if (stop || cmp === 0) { return; } isNewRow = !fold.sameRow; lastEnd = fold.end.column; } callback(null, endRow, endColumn, lastEnd, isNewRow); }; this.getNextFoldTo = function(row, column) { var fold, cmp; for (var i = 0; i < this.folds.length; i++) { fold = this.folds[i]; cmp = fold.range.compareEnd(row, column); if (cmp == -1) { return { fold: fold, kind: "after" }; } else if (cmp === 0) { return { fold: fold, kind: "inside" }; } } return null; }; this.addRemoveChars = function(row, column, len) { var ret = this.getNextFoldTo(row, column), fold, folds; if (ret) { fold = ret.fold; if (ret.kind == "inside" && fold.start.column != column && fold.start.row != row) { window.console && window.console.log(row, column, fold); } else if (fold.start.row == row) { folds = this.folds; var i = folds.indexOf(fold); if (i === 0) { this.start.column += len; } for (i; i < folds.length; i++) { fold = folds[i]; fold.start.column += len; if (!fold.sameRow) { return; } fold.end.column += len; } this.end.column += len; } } }; this.split = function(row, column) { var pos = this.getNextFoldTo(row, column); if (!pos || pos.kind == "inside") return null; var fold = pos.fold; var folds = this.folds; var foldData = this.foldData; var i = folds.indexOf(fold); var foldBefore = folds[i - 1]; this.end.row = foldBefore.end.row; this.end.column = foldBefore.end.column; folds = folds.splice(i, folds.length - i); var newFoldLine = new FoldLine(foldData, folds); foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine); return newFoldLine; }; this.merge = function(foldLineNext) { var folds = foldLineNext.folds; for (var i = 0; i < folds.length; i++) { this.addFold(folds[i]); } var foldData = this.foldData; foldData.splice(foldData.indexOf(foldLineNext), 1); }; this.toString = function() { var ret = [this.range.toString() + ": [" ]; this.folds.forEach(function(fold) { ret.push(" " + fold.toString()); }); ret.push("]"); return ret.join("\n"); }; this.idxToPosition = function(idx) { var lastFoldEndColumn = 0; for (var i = 0; i < this.folds.length; i++) { var fold = this.folds[i]; idx -= fold.start.column - lastFoldEndColumn; if (idx < 0) { return { row: fold.start.row, column: fold.start.column + idx }; } idx -= fold.placeholder.length; if (idx < 0) { return fold.start; } lastFoldEndColumn = fold.end.column; } return { row: this.end.row, column: this.end.column + idx }; }; }).call(FoldLine.prototype); exports.FoldLine = FoldLine; }); ace.define("ace/range_list",["require","exports","module","ace/range"], function(acequire, exports, module) { "use strict"; var Range = acequire("./range").Range; var comparePoints = Range.comparePoints; var RangeList = function() { this.ranges = []; }; (function() { this.comparePoints = comparePoints; this.pointIndex = function(pos, excludeEdges, startIndex) { var list = this.ranges; for (var i = startIndex || 0; i < list.length; i++) { var range = list[i]; var cmpEnd = comparePoints(pos, range.end); if (cmpEnd > 0) continue; var cmpStart = comparePoints(pos, range.start); if (cmpEnd === 0) return excludeEdges && cmpStart !== 0 ? -i-2 : i; if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges)) return i; return -i-1; } return -i - 1; }; this.add = function(range) { var excludeEdges = !range.isEmpty(); var startIndex = this.pointIndex(range.start, excludeEdges); if (startIndex < 0) startIndex = -startIndex - 1; var endIndex = this.pointIndex(range.end, excludeEdges, startIndex); if (endIndex < 0) endIndex = -endIndex - 1; else endIndex++; return this.ranges.splice(startIndex, endIndex - startIndex, range); }; this.addList = function(list) { var removed = []; for (var i = list.length; i--; ) { removed.push.apply(removed, this.add(list[i])); } return removed; }; this.substractPoint = function(pos) { var i = this.pointIndex(pos); if (i >= 0) return this.ranges.splice(i, 1); }; this.merge = function() { var removed = []; var list = this.ranges; list = list.sort(function(a, b) { return comparePoints(a.start, b.start); }); var next = list[0], range; for (var i = 1; i < list.length; i++) { range = next; next = list[i]; var cmp = comparePoints(range.end, next.start); if (cmp < 0) continue; if (cmp == 0 && !range.isEmpty() && !next.isEmpty()) continue; if (comparePoints(range.end, next.end) < 0) { range.end.row = next.end.row; range.end.column = next.end.column; } list.splice(i, 1); removed.push(next); next = range; i--; } this.ranges = list; return removed; }; this.contains = function(row, column) { return this.pointIndex({row: row, column: column}) >= 0; }; this.containsPoint = function(pos) { return this.pointIndex(pos) >= 0; }; this.rangeAtPoint = function(pos) { var i = this.pointIndex(pos); if (i >= 0) return this.ranges[i]; }; this.clipRows = function(startRow, endRow) { var list = this.ranges; if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow) return []; var startIndex = this.pointIndex({row: startRow, column: 0}); if (startIndex < 0) startIndex = -startIndex - 1; var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex); if (endIndex < 0) endIndex = -endIndex - 1; var clipped = []; for (var i = startIndex; i < endIndex; i++) { clipped.push(list[i]); } return clipped; }; this.removeAll = function() { return this.ranges.splice(0, this.ranges.length); }; this.attach = function(session) { if (this.session) this.detach(); this.session = session; this.onChange = this.$onChange.bind(this); this.session.on('change', this.onChange); }; this.detach = function() { if (!this.session) return; this.session.removeListener('change', this.onChange); this.session = null; }; this.$onChange = function(delta) { if (delta.action == "insert"){ var start = delta.start; var end = delta.end; } else { var end = delta.start; var start = delta.end; } var startRow = start.row; var endRow = end.row; var lineDif = endRow - startRow; var colDiff = -start.column + end.column; var ranges = this.ranges; for (var i = 0, n = ranges.length; i < n; i++) { var r = ranges[i]; if (r.end.row < startRow) continue; if (r.start.row > startRow) break; if (r.start.row == startRow && r.start.column >= start.column ) { if (r.start.column == start.column && this.$insertRight) { } else { r.start.column += colDiff; r.start.row += lineDif; } } if (r.end.row == startRow && r.end.column >= start.column) { if (r.end.column == start.column && this.$insertRight) { continue; } if (r.end.column == start.column && colDiff > 0 && i < n - 1) { if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column) r.end.column -= colDiff; } r.end.column += colDiff; r.end.row += lineDif; } } if (lineDif != 0 && i < n) { for (; i < n; i++) { var r = ranges[i]; r.start.row += lineDif; r.end.row += lineDif; } } }; }).call(RangeList.prototype); exports.RangeList = RangeList; }); ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"], function(acequire, exports, module) { "use strict"; var Range = acequire("../range").Range; var RangeList = acequire("../range_list").RangeList; var oop = acequire("../lib/oop") var Fold = exports.Fold = function(range, placeholder) { this.foldLine = null; this.placeholder = placeholder; this.range = range; this.start = range.start; this.end = range.end; this.sameRow = range.start.row == range.end.row; this.subFolds = this.ranges = []; }; oop.inherits(Fold, RangeList); (function() { this.toString = function() { return '"' + this.placeholder + '" ' + this.range.toString(); }; this.setFoldLine = function(foldLine) { this.foldLine = foldLine; this.subFolds.forEach(function(fold) { fold.setFoldLine(foldLine); }); }; this.clone = function() { var range = this.range.clone(); var fold = new Fold(range, this.placeholder); this.subFolds.forEach(function(subFold) { fold.subFolds.push(subFold.clone()); }); fold.collapseChildren = this.collapseChildren; return fold; }; this.addSubFold = function(fold) { if (this.range.isEqual(fold)) return; if (!this.range.containsRange(fold)) throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); consumeRange(fold, this.start); var row = fold.start.row, column = fold.start.column; for (var i = 0, cmp = -1; i < this.subFolds.length; i++) { cmp = this.subFolds[i].range.compare(row, column); if (cmp != 1) break; } var afterStart = this.subFolds[i]; if (cmp == 0) return afterStart.addSubFold(fold); var row = fold.range.end.row, column = fold.range.end.column; for (var j = i, cmp = -1; j < this.subFolds.length; j++) { cmp = this.subFolds[j].range.compare(row, column); if (cmp != 1) break; } var afterEnd = this.subFolds[j]; if (cmp == 0) throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); var consumedFolds = this.subFolds.splice(i, j - i, fold); fold.setFoldLine(this.foldLine); return fold; }; this.restoreRange = function(range) { return restoreRange(range, this.start); }; }).call(Fold.prototype); function consumePoint(point, anchor) { point.row -= anchor.row; if (point.row == 0) point.column -= anchor.column; } function consumeRange(range, anchor) { consumePoint(range.start, anchor); consumePoint(range.end, anchor); } function restorePoint(point, anchor) { if (point.row == 0) point.column += anchor.column; point.row += anchor.row; } function restoreRange(range, anchor) { restorePoint(range.start, anchor); restorePoint(range.end, anchor); } }); ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"], function(acequire, exports, module) { "use strict"; var Range = acequire("../range").Range; var FoldLine = acequire("./fold_line").FoldLine; var Fold = acequire("./fold").Fold; var TokenIterator = acequire("../token_iterator").TokenIterator; function Folding() { this.getFoldAt = function(row, column, side) { var foldLine = this.getFoldLine(row); if (!foldLine) return null; var folds = foldLine.folds; for (var i = 0; i < folds.length; i++) { var fold = folds[i]; if (fold.range.contains(row, column)) { if (side == 1 && fold.range.isEnd(row, column)) { continue; } else if (side == -1 && fold.range.isStart(row, column)) { continue; } return fold; } } }; this.getFoldsInRange = function(range) { var start = range.start; var end = range.end; var foldLines = this.$foldData; var foundFolds = []; start.column += 1; end.column -= 1; for (var i = 0; i < foldLines.length; i++) { var cmp = foldLines[i].range.compareRange(range); if (cmp == 2) { continue; } else if (cmp == -2) { break; } var folds = foldLines[i].folds; for (var j = 0; j < folds.length; j++) { var fold = folds[j]; cmp = fold.range.compareRange(range); if (cmp == -2) { break; } else if (cmp == 2) { continue; } else if (cmp == 42) { break; } foundFolds.push(fold); } } start.column -= 1; end.column += 1; return foundFolds; }; this.getFoldsInRangeList = function(ranges) { if (Array.isArray(ranges)) { var folds = []; ranges.forEach(function(range) { folds = folds.concat(this.getFoldsInRange(range)); }, this); } else { var folds = this.getFoldsInRange(ranges); } return folds; }; this.getAllFolds = function() { var folds = []; var foldLines = this.$foldData; for (var i = 0; i < foldLines.length; i++) for (var j = 0; j < foldLines[i].folds.length; j++) folds.push(foldLines[i].folds[j]); return folds; }; this.getFoldStringAt = function(row, column, trim, foldLine) { foldLine = foldLine || this.getFoldLine(row); if (!foldLine) return null; var lastFold = { end: { column: 0 } }; var str, fold; for (var i = 0; i < foldLine.folds.length; i++) { fold = foldLine.folds[i]; var cmp = fold.range.compareEnd(row, column); if (cmp == -1) { str = this .getLine(fold.start.row) .substring(lastFold.end.column, fold.start.column); break; } else if (cmp === 0) { return null; } lastFold = fold; } if (!str) str = this.getLine(fold.start.row).substring(lastFold.end.column); if (trim == -1) return str.substring(0, column - lastFold.end.column); else if (trim == 1) return str.substring(column - lastFold.end.column); else return str; }; this.getFoldLine = function(docRow, startFoldLine) { var foldData = this.$foldData; var i = 0; if (startFoldLine) i = foldData.indexOf(startFoldLine); if (i == -1) i = 0; for (i; i < foldData.length; i++) { var foldLine = foldData[i]; if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) { return foldLine; } else if (foldLine.end.row > docRow) { return null; } } return null; }; this.getNextFoldLine = function(docRow, startFoldLine) { var foldData = this.$foldData; var i = 0; if (startFoldLine) i = foldData.indexOf(startFoldLine); if (i == -1) i = 0; for (i; i < foldData.length; i++) { var foldLine = foldData[i]; if (foldLine.end.row >= docRow) { return foldLine; } } return null; }; this.getFoldedRowCount = function(first, last) { var foldData = this.$foldData, rowCount = last-first+1; for (var i = 0; i < foldData.length; i++) { var foldLine = foldData[i], end = foldLine.end.row, start = foldLine.start.row; if (end >= last) { if (start < last) { if (start >= first) rowCount -= last-start; else rowCount = 0; // in one fold } break; } else if (end >= first){ if (start >= first) // fold inside range rowCount -= end-start; else rowCount -= end-first+1; } } return rowCount; }; this.$addFoldLine = function(foldLine) { this.$foldData.push(foldLine); this.$foldData.sort(function(a, b) { return a.start.row - b.start.row; }); return foldLine; }; this.addFold = function(placeholder, range) { var foldData = this.$foldData; var added = false; var fold; if (placeholder instanceof Fold) fold = placeholder; else { fold = new Fold(range, placeholder); fold.collapseChildren = range.collapseChildren; } this.$clipRangeToDocument(fold.range); var startRow = fold.start.row; var startColumn = fold.start.column; var endRow = fold.end.row; var endColumn = fold.end.column; if (!(startRow < endRow || startRow == endRow && startColumn <= endColumn - 2)) throw new Error("The range has to be at least 2 characters width"); var startFold = this.getFoldAt(startRow, startColumn, 1); var endFold = this.getFoldAt(endRow, endColumn, -1); if (startFold && endFold == startFold) return startFold.addSubFold(fold); if (startFold && !startFold.range.isStart(startRow, startColumn)) this.removeFold(startFold); if (endFold && !endFold.range.isEnd(endRow, endColumn)) this.removeFold(endFold); var folds = this.getFoldsInRange(fold.range); if (folds.length > 0) { this.removeFolds(folds); folds.forEach(function(subFold) { fold.addSubFold(subFold); }); } for (var i = 0; i < foldData.length; i++) { var foldLine = foldData[i]; if (endRow == foldLine.start.row) { foldLine.addFold(fold); added = true; break; } else if (startRow == foldLine.end.row) { foldLine.addFold(fold); added = true; if (!fold.sameRow) { var foldLineNext = foldData[i + 1]; if (foldLineNext && foldLineNext.start.row == endRow) { foldLine.merge(foldLineNext); break; } } break; } else if (endRow <= foldLine.start.row) { break; } } if (!added) foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold)); if (this.$useWrapMode) this.$updateWrapData(foldLine.start.row, foldLine.start.row); else this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row); this.$modified = true; this._signal("changeFold", { data: fold, action: "add" }); return fold; }; this.addFolds = function(folds) { folds.forEach(function(fold) { this.addFold(fold); }, this); }; this.removeFold = function(fold) { var foldLine = fold.foldLine; var startRow = foldLine.start.row; var endRow = foldLine.end.row; var foldLines = this.$foldData; var folds = foldLine.folds; if (folds.length == 1) { foldLines.splice(foldLines.indexOf(foldLine), 1); } else if (foldLine.range.isEnd(fold.end.row, fold.end.column)) { folds.pop(); foldLine.end.row = folds[folds.length - 1].end.row; foldLine.end.column = folds[folds.length - 1].end.column; } else if (foldLine.range.isStart(fold.start.row, fold.start.column)) { folds.shift(); foldLine.start.row = folds[0].start.row; foldLine.start.column = folds[0].start.column; } else if (fold.sameRow) { folds.splice(folds.indexOf(fold), 1); } else { var newFoldLine = foldLine.split(fold.start.row, fold.start.column); folds = newFoldLine.folds; folds.shift(); newFoldLine.start.row = folds[0].start.row; newFoldLine.start.column = folds[0].start.column; } if (!this.$updating) { if (this.$useWrapMode) this.$updateWrapData(startRow, endRow); else this.$updateRowLengthCache(startRow, endRow); } this.$modified = true; this._signal("changeFold", { data: fold, action: "remove" }); }; this.removeFolds = function(folds) { var cloneFolds = []; for (var i = 0; i < folds.length; i++) { cloneFolds.push(folds[i]); } cloneFolds.forEach(function(fold) { this.removeFold(fold); }, this); this.$modified = true; }; this.expandFold = function(fold) { this.removeFold(fold); fold.subFolds.forEach(function(subFold) { fold.restoreRange(subFold); this.addFold(subFold); }, this); if (fold.collapseChildren > 0) { this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1); } fold.subFolds = []; }; this.expandFolds = function(folds) { folds.forEach(function(fold) { this.expandFold(fold); }, this); }; this.unfold = function(location, expandInner) { var range, folds; if (location == null) { range = new Range(0, 0, this.getLength(), 0); expandInner = true; } else if (typeof location == "number") range = new Range(location, 0, location, this.getLine(location).length); else if ("row" in location) range = Range.fromPoints(location, location); else range = location; folds = this.getFoldsInRangeList(range); if (expandInner) { this.removeFolds(folds); } else { var subFolds = folds; while (subFolds.length) { this.expandFolds(subFolds); subFolds = this.getFoldsInRangeList(range); } } if (folds.length) return folds; }; this.isRowFolded = function(docRow, startFoldRow) { return !!this.getFoldLine(docRow, startFoldRow); }; this.getRowFoldEnd = function(docRow, startFoldRow) { var foldLine = this.getFoldLine(docRow, startFoldRow); return foldLine ? foldLine.end.row : docRow; }; this.getRowFoldStart = function(docRow, startFoldRow) { var foldLine = this.getFoldLine(docRow, startFoldRow); return foldLine ? foldLine.start.row : docRow; }; this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) { if (startRow == null) startRow = foldLine.start.row; if (startColumn == null) startColumn = 0; if (endRow == null) endRow = foldLine.end.row; if (endColumn == null) endColumn = this.getLine(endRow).length; var doc = this.doc; var textLine = ""; foldLine.walk(function(placeholder, row, column, lastColumn) { if (row < startRow) return; if (row == startRow) { if (column < startColumn) return; lastColumn = Math.max(startColumn, lastColumn); } if (placeholder != null) { textLine += placeholder; } else { textLine += doc.getLine(row).substring(lastColumn, column); } }, endRow, endColumn); return textLine; }; this.getDisplayLine = function(row, endColumn, startRow, startColumn) { var foldLine = this.getFoldLine(row); if (!foldLine) { var line; line = this.doc.getLine(row); return line.substring(startColumn || 0, endColumn || line.length); } else { return this.getFoldDisplayLine( foldLine, row, endColumn, startRow, startColumn); } }; this.$cloneFoldData = function() { var fd = []; fd = this.$foldData.map(function(foldLine) { var folds = foldLine.folds.map(function(fold) { return fold.clone(); }); return new FoldLine(fd, folds); }); return fd; }; this.toggleFold = function(tryToUnfold) { var selection = this.selection; var range = selection.getRange(); var fold; var bracketPos; if (range.isEmpty()) { var cursor = range.start; fold = this.getFoldAt(cursor.row, cursor.column); if (fold) { this.expandFold(fold); return; } else if (bracketPos = this.findMatchingBracket(cursor)) { if (range.comparePoint(bracketPos) == 1) { range.end = bracketPos; } else { range.start = bracketPos; range.start.column++; range.end.column--; } } else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) { if (range.comparePoint(bracketPos) == 1) range.end = bracketPos; else range.start = bracketPos; range.start.column++; } else { range = this.getCommentFoldRange(cursor.row, cursor.column) || range; } } else { var folds = this.getFoldsInRange(range); if (tryToUnfold && folds.length) { this.expandFolds(folds); return; } else if (folds.length == 1 ) { fold = folds[0]; } } if (!fold) fold = this.getFoldAt(range.start.row, range.start.column); if (fold && fold.range.toString() == range.toString()) { this.expandFold(fold); return; } var placeholder = "..."; if (!range.isMultiLine()) { placeholder = this.getTextRange(range); if (placeholder.length < 4) return; placeholder = placeholder.trim().substring(0, 2) + ".."; } this.addFold(placeholder, range); }; this.getCommentFoldRange = function(row, column, dir) { var iterator = new TokenIterator(this, row, column); var token = iterator.getCurrentToken(); if (token && /^comment|string/.test(token.type)) { var range = new Range(); var re = new RegExp(token.type.replace(/\..*/, "\\.")); if (dir != 1) { do { token = iterator.stepBackward(); } while (token && re.test(token.type)); iterator.stepForward(); } range.start.row = iterator.getCurrentTokenRow(); range.start.column = iterator.getCurrentTokenColumn() + 2; iterator = new TokenIterator(this, row, column); if (dir != -1) { do { token = iterator.stepForward(); } while (token && re.test(token.type)); token = iterator.stepBackward(); } else token = iterator.getCurrentToken(); range.end.row = iterator.getCurrentTokenRow(); range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2; return range; } }; this.foldAll = function(startRow, endRow, depth) { if (depth == undefined) depth = 100000; // JSON.stringify doesn't hanle Infinity var foldWidgets = this.foldWidgets; if (!foldWidgets) return; // mode doesn't support folding endRow = endRow || this.getLength(); startRow = startRow || 0; for (var row = startRow; row < endRow; row++) { if (foldWidgets[row] == null) foldWidgets[row] = this.getFoldWidget(row); if (foldWidgets[row] != "start") continue; var range = this.getFoldWidgetRange(row); if (range && range.isMultiLine() && range.end.row <= endRow && range.start.row >= startRow ) { row = range.end.row; try { var fold = this.addFold("...", range); if (fold) fold.collapseChildren = depth; } catch(e) {} } } }; this.$foldStyles = { "manual": 1, "markbegin": 1, "markbeginend": 1 }; this.$foldStyle = "markbegin"; this.setFoldStyle = function(style) { if (!this.$foldStyles[style]) throw new Error("invalid fold style: " + style + "[" + Object.keys(this.$foldStyles).join(", ") + "]"); if (this.$foldStyle == style) return; this.$foldStyle = style; if (style == "manual") this.unfold(); var mode = this.$foldMode; this.$setFolding(null); this.$setFolding(mode); }; this.$setFolding = function(foldMode) { if (this.$foldMode == foldMode) return; this.$foldMode = foldMode; this.off('change', this.$updateFoldWidgets); this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); this._signal("changeAnnotation"); if (!foldMode || this.$foldStyle == "manual") { this.foldWidgets = null; return; } this.foldWidgets = []; this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle); this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle); this.$updateFoldWidgets = this.updateFoldWidgets.bind(this); this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this); this.on('change', this.$updateFoldWidgets); this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); }; this.getParentFoldRangeData = function (row, ignoreCurrent) { var fw = this.foldWidgets; if (!fw || (ignoreCurrent && fw[row])) return {}; var i = row - 1, firstRange; while (i >= 0) { var c = fw[i]; if (c == null) c = fw[i] = this.getFoldWidget(i); if (c == "start") { var range = this.getFoldWidgetRange(i); if (!firstRange) firstRange = range; if (range && range.end.row >= row) break; } i--; } return { range: i !== -1 && range, firstRange: firstRange }; }; this.onFoldWidgetClick = function(row, e) { e = e.domEvent; var options = { children: e.shiftKey, all: e.ctrlKey || e.metaKey, siblings: e.altKey }; var range = this.$toggleFoldWidget(row, options); if (!range) { var el = (e.target || e.srcElement); if (el && /ace_fold-widget/.test(el.className)) el.className += " ace_invalid"; } }; this.$toggleFoldWidget = function(row, options) { if (!this.getFoldWidget) return; var type = this.getFoldWidget(row); var line = this.getLine(row); var dir = type === "end" ? -1 : 1; var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir); if (fold) { if (options.children || options.all) this.removeFold(fold); else this.expandFold(fold); return fold; } var range = this.getFoldWidgetRange(row, true); if (range && !range.isMultiLine()) { fold = this.getFoldAt(range.start.row, range.start.column, 1); if (fold && range.isEqual(fold.range)) { this.removeFold(fold); return fold; } } if (options.siblings) { var data = this.getParentFoldRangeData(row); if (data.range) { var startRow = data.range.start.row + 1; var endRow = data.range.end.row; } this.foldAll(startRow, endRow, options.all ? 10000 : 0); } else if (options.children) { endRow = range ? range.end.row : this.getLength(); this.foldAll(row + 1, endRow, options.all ? 10000 : 0); } else if (range) { if (options.all) range.collapseChildren = 10000; this.addFold("...", range); } return range; }; this.toggleFoldWidget = function(toggleParent) { var row = this.selection.getCursor().row; row = this.getRowFoldStart(row); var range = this.$toggleFoldWidget(row, {}); if (range) return; var data = this.getParentFoldRangeData(row, true); range = data.range || data.firstRange; if (range) { row = range.start.row; var fold = this.getFoldAt(row, this.getLine(row).length, 1); if (fold) { this.removeFold(fold); } else { this.addFold("...", range); } } }; this.updateFoldWidgets = function(delta) { var firstRow = delta.start.row; var len = delta.end.row - firstRow; if (len === 0) { this.foldWidgets[firstRow] = null; } else if (delta.action == 'remove') { this.foldWidgets.splice(firstRow, len + 1, null); } else { var args = Array(len + 1); args.unshift(firstRow, 1); this.foldWidgets.splice.apply(this.foldWidgets, args); } }; this.tokenizerUpdateFoldWidgets = function(e) { var rows = e.data; if (rows.first != rows.last) { if (this.foldWidgets.length > rows.first) this.foldWidgets.splice(rows.first, this.foldWidgets.length); } }; } exports.Folding = Folding; }); ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"], function(acequire, exports, module) { "use strict"; var TokenIterator = acequire("../token_iterator").TokenIterator; var Range = acequire("../range").Range; function BracketMatch() { this.findMatchingBracket = function(position, chr) { if (position.column == 0) return null; var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1); if (charBeforeCursor == "") return null; var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/); if (!match) return null; if (match[1]) return this.$findClosingBracket(match[1], position); else return this.$findOpeningBracket(match[2], position); }; this.getBracketRange = function(pos) { var line = this.getLine(pos.row); var before = true, range; var chr = line.charAt(pos.column-1); var match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); if (!match) { chr = line.charAt(pos.column); pos = {row: pos.row, column: pos.column + 1}; match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); before = false; } if (!match) return null; if (match[1]) { var bracketPos = this.$findClosingBracket(match[1], pos); if (!bracketPos) return null; range = Range.fromPoints(pos, bracketPos); if (!before) { range.end.column++; range.start.column--; } range.cursor = range.end; } else { var bracketPos = this.$findOpeningBracket(match[2], pos); if (!bracketPos) return null; range = Range.fromPoints(bracketPos, pos); if (!before) { range.start.column++; range.end.column--; } range.cursor = range.start; } return range; }; this.$brackets = { ")": "(", "(": ")", "]": "[", "[": "]", "{": "}", "}": "{" }; this.$findOpeningBracket = function(bracket, position, typeRe) { var openBracket = this.$brackets[bracket]; var depth = 1; var iterator = new TokenIterator(this, position.row, position.column); var token = iterator.getCurrentToken(); if (!token) token = iterator.stepForward(); if (!token) return; if (!typeRe){ typeRe = new RegExp( "(\\.?" + token.type.replace(".", "\\.").replace("rparen", ".paren") .replace(/\b(?:end)\b/, "(?:start|begin|end)") + ")+" ); } var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2; var value = token.value; while (true) { while (valueIndex >= 0) { var chr = value.charAt(valueIndex); if (chr == openBracket) { depth -= 1; if (depth == 0) { return {row: iterator.getCurrentTokenRow(), column: valueIndex + iterator.getCurrentTokenColumn()}; } } else if (chr == bracket) { depth += 1; } valueIndex -= 1; } do { token = iterator.stepBackward(); } while (token && !typeRe.test(token.type)); if (token == null) break; value = token.value; valueIndex = value.length - 1; } return null; }; this.$findClosingBracket = function(bracket, position, typeRe) { var closingBracket = this.$brackets[bracket]; var depth = 1; var iterator = new TokenIterator(this, position.row, position.column); var token = iterator.getCurrentToken(); if (!token) token = iterator.stepForward(); if (!token) return; if (!typeRe){ typeRe = new RegExp( "(\\.?" + token.type.replace(".", "\\.").replace("lparen", ".paren") .replace(/\b(?:start|begin)\b/, "(?:start|begin|end)") + ")+" ); } var valueIndex = position.column - iterator.getCurrentTokenColumn(); while (true) { var value = token.value; var valueLength = value.length; while (valueIndex < valueLength) { var chr = value.charAt(valueIndex); if (chr == closingBracket) { depth -= 1; if (depth == 0) { return {row: iterator.getCurrentTokenRow(), column: valueIndex + iterator.getCurrentTokenColumn()}; } } else if (chr == bracket) { depth += 1; } valueIndex += 1; } do { token = iterator.stepForward(); } while (token && !typeRe.test(token.type)); if (token == null) break; valueIndex = 0; } return null; }; } exports.BracketMatch = BracketMatch; }); ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"], function(acequire, exports, module) { "use strict"; var oop = acequire("./lib/oop"); var lang = acequire("./lib/lang"); var config = acequire("./config"); var EventEmitter = acequire("./lib/event_emitter").EventEmitter; var Selection = acequire("./selection").Selection; var TextMode = acequire("./mode/text").Mode; var Range = acequire("./range").Range; var Document = acequire("./document").Document; var BackgroundTokenizer = acequire("./background_tokenizer").BackgroundTokenizer; var SearchHighlight = acequire("./search_highlight").SearchHighlight; var EditSession = function(text, mode) { this.$breakpoints = []; this.$decorations = []; this.$frontMarkers = {}; this.$backMarkers = {}; this.$markerId = 1; this.$undoSelect = true; this.$foldData = []; this.id = "session" + (++EditSession.$uid); this.$foldData.toString = function() { return this.join("\n"); }; this.on("changeFold", this.onChangeFold.bind(this)); this.$onChange = this.onChange.bind(this); if (typeof text != "object" || !text.getLine) text = new Document(text); this.setDocument(text); this.selection = new Selection(this); config.resetOptions(this); this.setMode(mode); config._signal("session", this); }; (function() { oop.implement(this, EventEmitter); this.setDocument = function(doc) { if (this.doc) this.doc.removeListener("change", this.$onChange); this.doc = doc; doc.on("change", this.$onChange); if (this.bgTokenizer) this.bgTokenizer.setDocument(this.getDocument()); this.resetCaches(); }; this.getDocument = function() { return this.doc; }; this.$resetRowCache = function(docRow) { if (!docRow) { this.$docRowCache = []; this.$screenRowCache = []; return; } var l = this.$docRowCache.length; var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1; if (l > i) { this.$docRowCache.splice(i, l); this.$screenRowCache.splice(i, l); } }; this.$getRowCacheIndex = function(cacheArray, val) { var low = 0; var hi = cacheArray.length - 1; while (low <= hi) { var mid = (low + hi) >> 1; var c = cacheArray[mid]; if (val > c) low = mid + 1; else if (val < c) hi = mid - 1; else return mid; } return low -1; }; this.resetCaches = function() { this.$modified = true; this.$wrapData = []; this.$rowLengthCache = []; this.$resetRowCache(0); if (this.bgTokenizer) this.bgTokenizer.start(0); }; this.onChangeFold = function(e) { var fold = e.data; this.$resetRowCache(fold.start.row); }; this.onChange = function(delta) { this.$modified = true; this.$resetRowCache(delta.start.row); var removedFolds = this.$updateInternalDataOnChange(delta); if (!this.$fromUndo && this.$undoManager && !delta.ignore) { this.$deltasDoc.push(delta); if (removedFolds && removedFolds.length != 0) { this.$deltasFold.push({ action: "removeFolds", folds: removedFolds }); } this.$informUndoManager.schedule(); } this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta); this._signal("change", delta); }; this.setValue = function(text) { this.doc.setValue(text); this.selection.moveTo(0, 0); this.$resetRowCache(0); this.$deltas = []; this.$deltasDoc = []; this.$deltasFold = []; this.setUndoManager(this.$undoManager); this.getUndoManager().reset(); }; this.getValue = this.toString = function() { return this.doc.getValue(); }; this.getSelection = function() { return this.selection; }; this.getState = function(row) { return this.bgTokenizer.getState(row); }; this.getTokens = function(row) { return this.bgTokenizer.getTokens(row); }; this.getTokenAt = function(row, column) { var tokens = this.bgTokenizer.getTokens(row); var token, c = 0; if (column == null) { i = tokens.length - 1; c = this.getLine(row).length; } else { for (var i = 0; i < tokens.length; i++) { c += tokens[i].value.length; if (c >= column) break; } } token = tokens[i]; if (!token) return null; token.index = i; token.start = c - token.value.length; return token; }; this.setUndoManager = function(undoManager) { this.$undoManager = undoManager; this.$deltas = []; this.$deltasDoc = []; this.$deltasFold = []; if (this.$informUndoManager) this.$informUndoManager.cancel(); if (undoManager) { var self = this; this.$syncInformUndoManager = function() { self.$informUndoManager.cancel(); if (self.$deltasFold.length) { self.$deltas.push({ group: "fold", deltas: self.$deltasFold }); self.$deltasFold = []; } if (self.$deltasDoc.length) { self.$deltas.push({ group: "doc", deltas: self.$deltasDoc }); self.$deltasDoc = []; } if (self.$deltas.length > 0) { undoManager.execute({ action: "aceupdate", args: [self.$deltas, self], merge: self.mergeUndoDeltas }); } self.mergeUndoDeltas = false; self.$deltas = []; }; this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager); } }; this.markUndoGroup = function() { if (this.$syncInformUndoManager) this.$syncInformUndoManager(); }; this.$defaultUndoManager = { undo: function() {}, redo: function() {}, reset: function() {} }; this.getUndoManager = function() { return this.$undoManager || this.$defaultUndoManager; }; this.getTabString = function() { if (this.getUseSoftTabs()) { return lang.stringRepeat(" ", this.getTabSize()); } else { return "\t"; } }; this.setUseSoftTabs = function(val) { this.setOption("useSoftTabs", val); }; this.getUseSoftTabs = function() { return this.$useSoftTabs && !this.$mode.$indentWithTabs; }; this.setTabSize = function(tabSize) { this.setOption("tabSize", tabSize); }; this.getTabSize = function() { return this.$tabSize; }; this.isTabStop = function(position) { return this.$useSoftTabs && (position.column % this.$tabSize === 0); }; this.$overwrite = false; this.setOverwrite = function(overwrite) { this.setOption("overwrite", overwrite); }; this.getOverwrite = function() { return this.$overwrite; }; this.toggleOverwrite = function() { this.setOverwrite(!this.$overwrite); }; this.addGutterDecoration = function(row, className) { if (!this.$decorations[row]) this.$decorations[row] = ""; this.$decorations[row] += " " + className; this._signal("changeBreakpoint", {}); }; this.removeGutterDecoration = function(row, className) { this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, ""); this._signal("changeBreakpoint", {}); }; this.getBreakpoints = function() { return this.$breakpoints; }; this.setBreakpoints = function(rows) { this.$breakpoints = []; for (var i=0; i 0) inToken = !!line.charAt(column - 1).match(this.tokenRe); if (!inToken) inToken = !!line.charAt(column).match(this.tokenRe); if (inToken) var re = this.tokenRe; else if (/^\s+$/.test(line.slice(column-1, column+1))) var re = /\s/; else var re = this.nonTokenRe; var start = column; if (start > 0) { do { start--; } while (start >= 0 && line.charAt(start).match(re)); start++; } var end = column; while (end < line.length && line.charAt(end).match(re)) { end++; } return new Range(row, start, row, end); }; this.getAWordRange = function(row, column) { var wordRange = this.getWordRange(row, column); var line = this.getLine(wordRange.end.row); while (line.charAt(wordRange.end.column).match(/[ \t]/)) { wordRange.end.column += 1; } return wordRange; }; this.setNewLineMode = function(newLineMode) { this.doc.setNewLineMode(newLineMode); }; this.getNewLineMode = function() { return this.doc.getNewLineMode(); }; this.setUseWorker = function(useWorker) { this.setOption("useWorker", useWorker); }; this.getUseWorker = function() { return this.$useWorker; }; this.onReloadTokenizer = function(e) { var rows = e.data; this.bgTokenizer.start(rows.first); this._signal("tokenizerUpdate", e); }; this.$modes = {}; this.$mode = null; this.$modeId = null; this.setMode = function(mode, cb) { if (mode && typeof mode === "object") { if (mode.getTokenizer) return this.$onChangeMode(mode); var options = mode; var path = options.path; } else { path = mode || "ace/mode/text"; } if (!this.$modes["ace/mode/text"]) this.$modes["ace/mode/text"] = new TextMode(); if (this.$modes[path] && !options) { this.$onChangeMode(this.$modes[path]); cb && cb(); return; } this.$modeId = path; config.loadModule(["mode", path], function(m) { if (this.$modeId !== path) return cb && cb(); if (this.$modes[path] && !options) { this.$onChangeMode(this.$modes[path]); } else if (m && m.Mode) { m = new m.Mode(options); if (!options) { this.$modes[path] = m; m.$id = path; } this.$onChangeMode(m); } cb && cb(); }.bind(this)); if (!this.$mode) this.$onChangeMode(this.$modes["ace/mode/text"], true); }; this.$onChangeMode = function(mode, $isPlaceholder) { if (!$isPlaceholder) this.$modeId = mode.$id; if (this.$mode === mode) return; this.$mode = mode; this.$stopWorker(); if (this.$useWorker) this.$startWorker(); var tokenizer = mode.getTokenizer(); if(tokenizer.addEventListener !== undefined) { var onReloadTokenizer = this.onReloadTokenizer.bind(this); tokenizer.addEventListener("update", onReloadTokenizer); } if (!this.bgTokenizer) { this.bgTokenizer = new BackgroundTokenizer(tokenizer); var _self = this; this.bgTokenizer.addEventListener("update", function(e) { _self._signal("tokenizerUpdate", e); }); } else { this.bgTokenizer.setTokenizer(tokenizer); } this.bgTokenizer.setDocument(this.getDocument()); this.tokenRe = mode.tokenRe; this.nonTokenRe = mode.nonTokenRe; if (!$isPlaceholder) { if (mode.attachToSession) mode.attachToSession(this); this.$options.wrapMethod.set.call(this, this.$wrapMethod); this.$setFolding(mode.foldingRules); this.bgTokenizer.start(0); this._emit("changeMode"); } }; this.$stopWorker = function() { if (this.$worker) { this.$worker.terminate(); this.$worker = null; } }; this.$startWorker = function() { try { this.$worker = this.$mode.createWorker(this); } catch (e) { config.warn("Could not load worker", e); this.$worker = null; } }; this.getMode = function() { return this.$mode; }; this.$scrollTop = 0; this.setScrollTop = function(scrollTop) { if (this.$scrollTop === scrollTop || isNaN(scrollTop)) return; this.$scrollTop = scrollTop; this._signal("changeScrollTop", scrollTop); }; this.getScrollTop = function() { return this.$scrollTop; }; this.$scrollLeft = 0; this.setScrollLeft = function(scrollLeft) { if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft)) return; this.$scrollLeft = scrollLeft; this._signal("changeScrollLeft", scrollLeft); }; this.getScrollLeft = function() { return this.$scrollLeft; }; this.getScreenWidth = function() { this.$computeWidth(); if (this.lineWidgets) return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth); return this.screenWidth; }; this.getLineWidgetMaxWidth = function() { if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth; var width = 0; this.lineWidgets.forEach(function(w) { if (w && w.screenWidth > width) width = w.screenWidth; }); return this.lineWidgetWidth = width; }; this.$computeWidth = function(force) { if (this.$modified || force) { this.$modified = false; if (this.$useWrapMode) return this.screenWidth = this.$wrapLimit; var lines = this.doc.getAllLines(); var cache = this.$rowLengthCache; var longestScreenLine = 0; var foldIndex = 0; var foldLine = this.$foldData[foldIndex]; var foldStart = foldLine ? foldLine.start.row : Infinity; var len = lines.length; for (var i = 0; i < len; i++) { if (i > foldStart) { i = foldLine.end.row + 1; if (i >= len) break; foldLine = this.$foldData[foldIndex++]; foldStart = foldLine ? foldLine.start.row : Infinity; } if (cache[i] == null) cache[i] = this.$getStringScreenWidth(lines[i])[0]; if (cache[i] > longestScreenLine) longestScreenLine = cache[i]; } this.screenWidth = longestScreenLine; } }; this.getLine = function(row) { return this.doc.getLine(row); }; this.getLines = function(firstRow, lastRow) { return this.doc.getLines(firstRow, lastRow); }; this.getLength = function() { return this.doc.getLength(); }; this.getTextRange = function(range) { return this.doc.getTextRange(range || this.selection.getRange()); }; this.insert = function(position, text) { return this.doc.insert(position, text); }; this.remove = function(range) { return this.doc.remove(range); }; this.removeFullLines = function(firstRow, lastRow){ return this.doc.removeFullLines(firstRow, lastRow); }; this.undoChanges = function(deltas, dontSelect) { if (!deltas.length) return; this.$fromUndo = true; var lastUndoRange = null; for (var i = deltas.length - 1; i != -1; i--) { var delta = deltas[i]; if (delta.group == "doc") { this.doc.revertDeltas(delta.deltas); lastUndoRange = this.$getUndoSelection(delta.deltas, true, lastUndoRange); } else { delta.deltas.forEach(function(foldDelta) { this.addFolds(foldDelta.folds); }, this); } } this.$fromUndo = false; lastUndoRange && this.$undoSelect && !dontSelect && this.selection.setSelectionRange(lastUndoRange); return lastUndoRange; }; this.redoChanges = function(deltas, dontSelect) { if (!deltas.length) return; this.$fromUndo = true; var lastUndoRange = null; for (var i = 0; i < deltas.length; i++) { var delta = deltas[i]; if (delta.group == "doc") { this.doc.applyDeltas(delta.deltas); lastUndoRange = this.$getUndoSelection(delta.deltas, false, lastUndoRange); } } this.$fromUndo = false; lastUndoRange && this.$undoSelect && !dontSelect && this.selection.setSelectionRange(lastUndoRange); return lastUndoRange; }; this.setUndoSelect = function(enable) { this.$undoSelect = enable; }; this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) { function isInsert(delta) { return isUndo ? delta.action !== "insert" : delta.action === "insert"; } var delta = deltas[0]; var range, point; var lastDeltaIsInsert = false; if (isInsert(delta)) { range = Range.fromPoints(delta.start, delta.end); lastDeltaIsInsert = true; } else { range = Range.fromPoints(delta.start, delta.start); lastDeltaIsInsert = false; } for (var i = 1; i < deltas.length; i++) { delta = deltas[i]; if (isInsert(delta)) { point = delta.start; if (range.compare(point.row, point.column) == -1) { range.setStart(point); } point = delta.end; if (range.compare(point.row, point.column) == 1) { range.setEnd(point); } lastDeltaIsInsert = true; } else { point = delta.start; if (range.compare(point.row, point.column) == -1) { range = Range.fromPoints(delta.start, delta.start); } lastDeltaIsInsert = false; } } if (lastUndoRange != null) { if (Range.comparePoints(lastUndoRange.start, range.start) === 0) { lastUndoRange.start.column += range.end.column - range.start.column; lastUndoRange.end.column += range.end.column - range.start.column; } var cmp = lastUndoRange.compareRange(range); if (cmp == 1) { range.setStart(lastUndoRange.start); } else if (cmp == -1) { range.setEnd(lastUndoRange.end); } } return range; }; this.replace = function(range, text) { return this.doc.replace(range, text); }; this.moveText = function(fromRange, toPosition, copy) { var text = this.getTextRange(fromRange); var folds = this.getFoldsInRange(fromRange); var toRange = Range.fromPoints(toPosition, toPosition); if (!copy) { this.remove(fromRange); var rowDiff = fromRange.start.row - fromRange.end.row; var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column; if (collDiff) { if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column) toRange.start.column += collDiff; if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column) toRange.end.column += collDiff; } if (rowDiff && toRange.start.row >= fromRange.end.row) { toRange.start.row += rowDiff; toRange.end.row += rowDiff; } } toRange.end = this.insert(toRange.start, text); if (folds.length) { var oldStart = fromRange.start; var newStart = toRange.start; var rowDiff = newStart.row - oldStart.row; var collDiff = newStart.column - oldStart.column; this.addFolds(folds.map(function(x) { x = x.clone(); if (x.start.row == oldStart.row) x.start.column += collDiff; if (x.end.row == oldStart.row) x.end.column += collDiff; x.start.row += rowDiff; x.end.row += rowDiff; return x; })); } return toRange; }; this.indentRows = function(startRow, endRow, indentString) { indentString = indentString.replace(/\t/g, this.getTabString()); for (var row=startRow; row<=endRow; row++) this.doc.insertInLine({row: row, column: 0}, indentString); }; this.outdentRows = function (range) { var rowRange = range.collapseRows(); var deleteRange = new Range(0, 0, 0, 0); var size = this.getTabSize(); for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) { var line = this.getLine(i); deleteRange.start.row = i; deleteRange.end.row = i; for (var j = 0; j < size; ++j) if (line.charAt(j) != ' ') break; if (j < size && line.charAt(j) == '\t') { deleteRange.start.column = j; deleteRange.end.column = j + 1; } else { deleteRange.start.column = 0; deleteRange.end.column = j; } this.remove(deleteRange); } }; this.$moveLines = function(firstRow, lastRow, dir) { firstRow = this.getRowFoldStart(firstRow); lastRow = this.getRowFoldEnd(lastRow); if (dir < 0) { var row = this.getRowFoldStart(firstRow + dir); if (row < 0) return 0; var diff = row-firstRow; } else if (dir > 0) { var row = this.getRowFoldEnd(lastRow + dir); if (row > this.doc.getLength()-1) return 0; var diff = row-lastRow; } else { firstRow = this.$clipRowToDocument(firstRow); lastRow = this.$clipRowToDocument(lastRow); var diff = lastRow - firstRow + 1; } var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE); var folds = this.getFoldsInRange(range).map(function(x){ x = x.clone(); x.start.row += diff; x.end.row += diff; return x; }); var lines = dir == 0 ? this.doc.getLines(firstRow, lastRow) : this.doc.removeFullLines(firstRow, lastRow); this.doc.insertFullLines(firstRow+diff, lines); folds.length && this.addFolds(folds); return diff; }; this.moveLinesUp = function(firstRow, lastRow) { return this.$moveLines(firstRow, lastRow, -1); }; this.moveLinesDown = function(firstRow, lastRow) { return this.$moveLines(firstRow, lastRow, 1); }; this.duplicateLines = function(firstRow, lastRow) { return this.$moveLines(firstRow, lastRow, 0); }; this.$clipRowToDocument = function(row) { return Math.max(0, Math.min(row, this.doc.getLength()-1)); }; this.$clipColumnToRow = function(row, column) { if (column < 0) return 0; return Math.min(this.doc.getLine(row).length, column); }; this.$clipPositionToDocument = function(row, column) { column = Math.max(0, column); if (row < 0) { row = 0; column = 0; } else { var len = this.doc.getLength(); if (row >= len) { row = len - 1; column = this.doc.getLine(len-1).length; } else { column = Math.min(this.doc.getLine(row).length, column); } } return { row: row, column: column }; }; this.$clipRangeToDocument = function(range) { if (range.start.row < 0) { range.start.row = 0; range.start.column = 0; } else { range.start.column = this.$clipColumnToRow( range.start.row, range.start.column ); } var len = this.doc.getLength() - 1; if (range.end.row > len) { range.end.row = len; range.end.column = this.doc.getLine(len).length; } else { range.end.column = this.$clipColumnToRow( range.end.row, range.end.column ); } return range; }; this.$wrapLimit = 80; this.$useWrapMode = false; this.$wrapLimitRange = { min : null, max : null }; this.setUseWrapMode = function(useWrapMode) { if (useWrapMode != this.$useWrapMode) { this.$useWrapMode = useWrapMode; this.$modified = true; this.$resetRowCache(0); if (useWrapMode) { var len = this.getLength(); this.$wrapData = Array(len); this.$updateWrapData(0, len - 1); } this._signal("changeWrapMode"); } }; this.getUseWrapMode = function() { return this.$useWrapMode; }; this.setWrapLimitRange = function(min, max) { if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) { this.$wrapLimitRange = { min: min, max: max }; this.$modified = true; if (this.$useWrapMode) this._signal("changeWrapMode"); } }; this.adjustWrapLimit = function(desiredLimit, $printMargin) { var limits = this.$wrapLimitRange; if (limits.max < 0) limits = {min: $printMargin, max: $printMargin}; var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max); if (wrapLimit != this.$wrapLimit && wrapLimit > 1) { this.$wrapLimit = wrapLimit; this.$modified = true; if (this.$useWrapMode) { this.$updateWrapData(0, this.getLength() - 1); this.$resetRowCache(0); this._signal("changeWrapLimit"); } return true; } return false; }; this.$constrainWrapLimit = function(wrapLimit, min, max) { if (min) wrapLimit = Math.max(min, wrapLimit); if (max) wrapLimit = Math.min(max, wrapLimit); return wrapLimit; }; this.getWrapLimit = function() { return this.$wrapLimit; }; this.setWrapLimit = function (limit) { this.setWrapLimitRange(limit, limit); }; this.getWrapLimitRange = function() { return { min : this.$wrapLimitRange.min, max : this.$wrapLimitRange.max }; }; this.$updateInternalDataOnChange = function(delta) { var useWrapMode = this.$useWrapMode; var action = delta.action; var start = delta.start; var end = delta.end; var firstRow = start.row; var lastRow = end.row; var len = lastRow - firstRow; var removedFolds = null; this.$updating = true; if (len != 0) { if (action === "remove") { this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len); var foldLines = this.$foldData; removedFolds = this.getFoldsInRange(delta); this.removeFolds(removedFolds); var foldLine = this.getFoldLine(end.row); var idx = 0; if (foldLine) { foldLine.addRemoveChars(end.row, end.column, start.column - end.column); foldLine.shiftRow(-len); var foldLineBefore = this.getFoldLine(firstRow); if (foldLineBefore && foldLineBefore !== foldLine) { foldLineBefore.merge(foldLine); foldLine = foldLineBefore; } idx = foldLines.indexOf(foldLine) + 1; } for (idx; idx < foldLines.length; idx++) { var foldLine = foldLines[idx]; if (foldLine.start.row >= end.row) { foldLine.shiftRow(-len); } } lastRow = firstRow; } else { var args = Array(len); args.unshift(firstRow, 0); var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache arr.splice.apply(arr, args); var foldLines = this.$foldData; var foldLine = this.getFoldLine(firstRow); var idx = 0; if (foldLine) { var cmp = foldLine.range.compareInside(start.row, start.column); if (cmp == 0) { foldLine = foldLine.split(start.row, start.column); if (foldLine) { foldLine.shiftRow(len); foldLine.addRemoveChars(lastRow, 0, end.column - start.column); } } else if (cmp == -1) { foldLine.addRemoveChars(firstRow, 0, end.column - start.column); foldLine.shiftRow(len); } idx = foldLines.indexOf(foldLine) + 1; } for (idx; idx < foldLines.length; idx++) { var foldLine = foldLines[idx]; if (foldLine.start.row >= firstRow) { foldLine.shiftRow(len); } } } } else { len = Math.abs(delta.start.column - delta.end.column); if (action === "remove") { removedFolds = this.getFoldsInRange(delta); this.removeFolds(removedFolds); len = -len; } var foldLine = this.getFoldLine(firstRow); if (foldLine) { foldLine.addRemoveChars(firstRow, start.column, len); } } if (useWrapMode && this.$wrapData.length != this.doc.getLength()) { console.error("doc.getLength() and $wrapData.length have to be the same!"); } this.$updating = false; if (useWrapMode) this.$updateWrapData(firstRow, lastRow); else this.$updateRowLengthCache(firstRow, lastRow); return removedFolds; }; this.$updateRowLengthCache = function(firstRow, lastRow, b) { this.$rowLengthCache[firstRow] = null; this.$rowLengthCache[lastRow] = null; }; this.$updateWrapData = function(firstRow, lastRow) { var lines = this.doc.getAllLines(); var tabSize = this.getTabSize(); var wrapData = this.$wrapData; var wrapLimit = this.$wrapLimit; var tokens; var foldLine; var row = firstRow; lastRow = Math.min(lastRow, lines.length - 1); while (row <= lastRow) { foldLine = this.getFoldLine(row, foldLine); if (!foldLine) { tokens = this.$getDisplayTokens(lines[row]); wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); row ++; } else { tokens = []; foldLine.walk(function(placeholder, row, column, lastColumn) { var walkTokens; if (placeholder != null) { walkTokens = this.$getDisplayTokens( placeholder, tokens.length); walkTokens[0] = PLACEHOLDER_START; for (var i = 1; i < walkTokens.length; i++) { walkTokens[i] = PLACEHOLDER_BODY; } } else { walkTokens = this.$getDisplayTokens( lines[row].substring(lastColumn, column), tokens.length); } tokens = tokens.concat(walkTokens); }.bind(this), foldLine.end.row, lines[foldLine.end.row].length + 1 ); wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); row = foldLine.end.row + 1; } } }; var CHAR = 1, CHAR_EXT = 2, PLACEHOLDER_START = 3, PLACEHOLDER_BODY = 4, PUNCTUATION = 9, SPACE = 10, TAB = 11, TAB_SPACE = 12; this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) { if (tokens.length == 0) { return []; } var splits = []; var displayLength = tokens.length; var lastSplit = 0, lastDocSplit = 0; var isCode = this.$wrapAsCode; var indentedSoftWrap = this.$indentedSoftWrap; var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8) || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2); function getWrapIndent() { var indentation = 0; if (maxIndent === 0) return indentation; if (indentedSoftWrap) { for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (token == SPACE) indentation += 1; else if (token == TAB) indentation += tabSize; else if (token == TAB_SPACE) continue; else break; } } if (isCode && indentedSoftWrap !== false) indentation += tabSize; return Math.min(indentation, maxIndent); } function addSplit(screenPos) { var displayed = tokens.slice(lastSplit, screenPos); var len = displayed.length; displayed.join("") .replace(/12/g, function() { len -= 1; }) .replace(/2/g, function() { len -= 1; }); if (!splits.length) { indent = getWrapIndent(); splits.indent = indent; } lastDocSplit += len; splits.push(lastDocSplit); lastSplit = screenPos; } var indent = 0; while (displayLength - lastSplit > wrapLimit - indent) { var split = lastSplit + wrapLimit - indent; if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) { addSplit(split); continue; } if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) { for (split; split != lastSplit - 1; split--) { if (tokens[split] == PLACEHOLDER_START) { break; } } if (split > lastSplit) { addSplit(split); continue; } split = lastSplit + wrapLimit; for (split; split < tokens.length; split++) { if (tokens[split] != PLACEHOLDER_BODY) { break; } } if (split == tokens.length) { break; // Breaks the while-loop. } addSplit(split); continue; } var minSplit = Math.max(split - (wrapLimit -(wrapLimit>>2)), lastSplit - 1); while (split > minSplit && tokens[split] < PLACEHOLDER_START) { split --; } if (isCode) { while (split > minSplit && tokens[split] < PLACEHOLDER_START) { split --; } while (split > minSplit && tokens[split] == PUNCTUATION) { split --; } } else { while (split > minSplit && tokens[split] < SPACE) { split --; } } if (split > minSplit) { addSplit(++split); continue; } split = lastSplit + wrapLimit; if (tokens[split] == CHAR_EXT) split--; addSplit(split - indent); } return splits; }; this.$getDisplayTokens = function(str, offset) { var arr = []; var tabSize; offset = offset || 0; for (var i = 0; i < str.length; i++) { var c = str.charCodeAt(i); if (c == 9) { tabSize = this.getScreenTabSize(arr.length + offset); arr.push(TAB); for (var n = 1; n < tabSize; n++) { arr.push(TAB_SPACE); } } else if (c == 32) { arr.push(SPACE); } else if((c > 39 && c < 48) || (c > 57 && c < 64)) { arr.push(PUNCTUATION); } else if (c >= 0x1100 && isFullWidth(c)) { arr.push(CHAR, CHAR_EXT); } else { arr.push(CHAR); } } return arr; }; this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) { if (maxScreenColumn == 0) return [0, 0]; if (maxScreenColumn == null) maxScreenColumn = Infinity; screenColumn = screenColumn || 0; var c, column; for (column = 0; column < str.length; column++) { c = str.charCodeAt(column); if (c == 9) { screenColumn += this.getScreenTabSize(screenColumn); } else if (c >= 0x1100 && isFullWidth(c)) { screenColumn += 2; } else { screenColumn += 1; } if (screenColumn > maxScreenColumn) { break; } } return [screenColumn, column]; }; this.lineWidgets = null; this.getRowLength = function(row) { if (this.lineWidgets) var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; else h = 0 if (!this.$useWrapMode || !this.$wrapData[row]) { return 1 + h; } else { return this.$wrapData[row].length + 1 + h; } }; this.getRowLineCount = function(row) { if (!this.$useWrapMode || !this.$wrapData[row]) { return 1; } else { return this.$wrapData[row].length + 1; } }; this.getRowWrapIndent = function(screenRow) { if (this.$useWrapMode) { var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); var splits = this.$wrapData[pos.row]; return splits.length && splits[0] < pos.column ? splits.indent : 0; } else { return 0; } } this.getScreenLastRowColumn = function(screenRow) { var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); return this.documentToScreenColumn(pos.row, pos.column); }; this.getDocumentLastRowColumn = function(docRow, docColumn) { var screenRow = this.documentToScreenRow(docRow, docColumn); return this.getScreenLastRowColumn(screenRow); }; this.getDocumentLastRowColumnPosition = function(docRow, docColumn) { var screenRow = this.documentToScreenRow(docRow, docColumn); return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10); }; this.getRowSplitData = function(row) { if (!this.$useWrapMode) { return undefined; } else { return this.$wrapData[row]; } }; this.getScreenTabSize = function(screenColumn) { return this.$tabSize - screenColumn % this.$tabSize; }; this.screenToDocumentRow = function(screenRow, screenColumn) { return this.screenToDocumentPosition(screenRow, screenColumn).row; }; this.screenToDocumentColumn = function(screenRow, screenColumn) { return this.screenToDocumentPosition(screenRow, screenColumn).column; }; this.screenToDocumentPosition = function(screenRow, screenColumn) { if (screenRow < 0) return {row: 0, column: 0}; var line; var docRow = 0; var docColumn = 0; var column; var row = 0; var rowLength = 0; var rowCache = this.$screenRowCache; var i = this.$getRowCacheIndex(rowCache, screenRow); var l = rowCache.length; if (l && i >= 0) { var row = rowCache[i]; var docRow = this.$docRowCache[i]; var doCache = screenRow > rowCache[l - 1]; } else { var doCache = !l; } var maxRow = this.getLength() - 1; var foldLine = this.getNextFoldLine(docRow); var foldStart = foldLine ? foldLine.start.row : Infinity; while (row <= screenRow) { rowLength = this.getRowLength(docRow); if (row + rowLength > screenRow || docRow >= maxRow) { break; } else { row += rowLength; docRow++; if (docRow > foldStart) { docRow = foldLine.end.row+1; foldLine = this.getNextFoldLine(docRow, foldLine); foldStart = foldLine ? foldLine.start.row : Infinity; } } if (doCache) { this.$docRowCache.push(docRow); this.$screenRowCache.push(row); } } if (foldLine && foldLine.start.row <= docRow) { line = this.getFoldDisplayLine(foldLine); docRow = foldLine.start.row; } else if (row + rowLength <= screenRow || docRow > maxRow) { return { row: maxRow, column: this.getLine(maxRow).length }; } else { line = this.getLine(docRow); foldLine = null; } var wrapIndent = 0; if (this.$useWrapMode) { var splits = this.$wrapData[docRow]; if (splits) { var splitIndex = Math.floor(screenRow - row); column = splits[splitIndex]; if(splitIndex > 0 && splits.length) { wrapIndent = splits.indent; docColumn = splits[splitIndex - 1] || splits[splits.length - 1]; line = line.substring(docColumn); } } } docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1]; if (this.$useWrapMode && docColumn >= column) docColumn = column - 1; if (foldLine) return foldLine.idxToPosition(docColumn); return {row: docRow, column: docColumn}; }; this.documentToScreenPosition = function(docRow, docColumn) { if (typeof docColumn === "undefined") var pos = this.$clipPositionToDocument(docRow.row, docRow.column); else pos = this.$clipPositionToDocument(docRow, docColumn); docRow = pos.row; docColumn = pos.column; var screenRow = 0; var foldStartRow = null; var fold = null; fold = this.getFoldAt(docRow, docColumn, 1); if (fold) { docRow = fold.start.row; docColumn = fold.start.column; } var rowEnd, row = 0; var rowCache = this.$docRowCache; var i = this.$getRowCacheIndex(rowCache, docRow); var l = rowCache.length; if (l && i >= 0) { var row = rowCache[i]; var screenRow = this.$screenRowCache[i]; var doCache = docRow > rowCache[l - 1]; } else { var doCache = !l; } var foldLine = this.getNextFoldLine(row); var foldStart = foldLine ?foldLine.start.row :Infinity; while (row < docRow) { if (row >= foldStart) { rowEnd = foldLine.end.row + 1; if (rowEnd > docRow) break; foldLine = this.getNextFoldLine(rowEnd, foldLine); foldStart = foldLine ?foldLine.start.row :Infinity; } else { rowEnd = row + 1; } screenRow += this.getRowLength(row); row = rowEnd; if (doCache) { this.$docRowCache.push(row); this.$screenRowCache.push(screenRow); } } var textLine = ""; if (foldLine && row >= foldStart) { textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn); foldStartRow = foldLine.start.row; } else { textLine = this.getLine(docRow).substring(0, docColumn); foldStartRow = docRow; } var wrapIndent = 0; if (this.$useWrapMode) { var wrapRow = this.$wrapData[foldStartRow]; if (wrapRow) { var screenRowOffset = 0; while (textLine.length >= wrapRow[screenRowOffset]) { screenRow ++; screenRowOffset++; } textLine = textLine.substring( wrapRow[screenRowOffset - 1] || 0, textLine.length ); wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0; } } return { row: screenRow, column: wrapIndent + this.$getStringScreenWidth(textLine)[0] }; }; this.documentToScreenColumn = function(row, docColumn) { return this.documentToScreenPosition(row, docColumn).column; }; this.documentToScreenRow = function(docRow, docColumn) { return this.documentToScreenPosition(docRow, docColumn).row; }; this.getScreenLength = function() { var screenRows = 0; var fold = null; if (!this.$useWrapMode) { screenRows = this.getLength(); var foldData = this.$foldData; for (var i = 0; i < foldData.length; i++) { fold = foldData[i]; screenRows -= fold.end.row - fold.start.row; } } else { var lastRow = this.$wrapData.length; var row = 0, i = 0; var fold = this.$foldData[i++]; var foldStart = fold ? fold.start.row :Infinity; while (row < lastRow) { var splits = this.$wrapData[row]; screenRows += splits ? splits.length + 1 : 1; row ++; if (row > foldStart) { row = fold.end.row+1; fold = this.$foldData[i++]; foldStart = fold ?fold.start.row :Infinity; } } } if (this.lineWidgets) screenRows += this.$getWidgetScreenLength(); return screenRows; }; this.$setFontMetrics = function(fm) { if (!this.$enableVarChar) return; this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) { if (maxScreenColumn === 0) return [0, 0]; if (!maxScreenColumn) maxScreenColumn = Infinity; screenColumn = screenColumn || 0; var c, column; for (column = 0; column < str.length; column++) { c = str.charAt(column); if (c === "\t") { screenColumn += this.getScreenTabSize(screenColumn); } else { screenColumn += fm.getCharacterWidth(c); } if (screenColumn > maxScreenColumn) { break; } } return [screenColumn, column]; }; }; this.destroy = function() { if (this.bgTokenizer) { this.bgTokenizer.setDocument(null); this.bgTokenizer = null; } this.$stopWorker(); }; function isFullWidth(c) { if (c < 0x1100) return false; return c >= 0x1100 && c <= 0x115F || c >= 0x11A3 && c <= 0x11A7 || c >= 0x11FA && c <= 0x11FF || c >= 0x2329 && c <= 0x232A || c >= 0x2E80 && c <= 0x2E99 || c >= 0x2E9B && c <= 0x2EF3 || c >= 0x2F00 && c <= 0x2FD5 || c >= 0x2FF0 && c <= 0x2FFB || c >= 0x3000 && c <= 0x303E || c >= 0x3041 && c <= 0x3096 || c >= 0x3099 && c <= 0x30FF || c >= 0x3105 && c <= 0x312D || c >= 0x3131 && c <= 0x318E || c >= 0x3190 && c <= 0x31BA || c >= 0x31C0 && c <= 0x31E3 || c >= 0x31F0 && c <= 0x321E || c >= 0x3220 && c <= 0x3247 || c >= 0x3250 && c <= 0x32FE || c >= 0x3300 && c <= 0x4DBF || c >= 0x4E00 && c <= 0xA48C || c >= 0xA490 && c <= 0xA4C6 || c >= 0xA960 && c <= 0xA97C || c >= 0xAC00 && c <= 0xD7A3 || c >= 0xD7B0 && c <= 0xD7C6 || c >= 0xD7CB && c <= 0xD7FB || c >= 0xF900 && c <= 0xFAFF || c >= 0xFE10 && c <= 0xFE19 || c >= 0xFE30 && c <= 0xFE52 || c >= 0xFE54 && c <= 0xFE66 || c >= 0xFE68 && c <= 0xFE6B || c >= 0xFF01 && c <= 0xFF60 || c >= 0xFFE0 && c <= 0xFFE6; } }).call(EditSession.prototype); acequire("./edit_session/folding").Folding.call(EditSession.prototype); acequire("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype); config.defineOptions(EditSession.prototype, "session", { wrap: { set: function(value) { if (!value || value == "off") value = false; else if (value == "free") value = true; else if (value == "printMargin") value = -1; else if (typeof value == "string") value = parseInt(value, 10) || false; if (this.$wrap == value) return; this.$wrap = value; if (!value) { this.setUseWrapMode(false); } else { var col = typeof value == "number" ? value : null; this.setWrapLimitRange(col, col); this.setUseWrapMode(true); } }, get: function() { if (this.getUseWrapMode()) { if (this.$wrap == -1) return "printMargin"; if (!this.getWrapLimitRange().min) return "free"; return this.$wrap; } return "off"; }, handlesSet: true }, wrapMethod: { set: function(val) { val = val == "auto" ? this.$mode.type != "text" : val != "text"; if (val != this.$wrapAsCode) { this.$wrapAsCode = val; if (this.$useWrapMode) { this.$modified = true; this.$resetRowCache(0); this.$updateWrapData(0, this.getLength() - 1); } } }, initialValue: "auto" }, indentedSoftWrap: { initialValue: true }, firstLineNumber: { set: function() {this._signal("changeBreakpoint");}, initialValue: 1 }, useWorker: { set: function(useWorker) { this.$useWorker = useWorker; this.$stopWorker(); if (useWorker) this.$startWorker(); }, initialValue: true }, useSoftTabs: {initialValue: true}, tabSize: { set: function(tabSize) { if (isNaN(tabSize) || this.$tabSize === tabSize) return; this.$modified = true; this.$rowLengthCache = []; this.$tabSize = tabSize; this._signal("changeTabSize"); }, initialValue: 4, handlesSet: true }, overwrite: { set: function(val) {this._signal("changeOverwrite");}, initialValue: false }, newLineMode: { set: function(val) {this.doc.setNewLineMode(val)}, get: function() {return this.doc.getNewLineMode()}, handlesSet: true }, mode: { set: function(val) { this.setMode(val) }, get: function() { return this.$modeId } } }); exports.EditSession = EditSession; }); ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(acequire, exports, module) { "use strict"; var lang = acequire("./lib/lang"); var oop = acequire("./lib/oop"); var Range = acequire("./range").Range; var Search = function() { this.$options = {}; }; (function() { this.set = function(options) { oop.mixin(this.$options, options); return this; }; this.getOptions = function() { return lang.copyObject(this.$options); }; this.setOptions = function(options) { this.$options = options; }; this.find = function(session) { var options = this.$options; var iterator = this.$matchIterator(session, options); if (!iterator) return false; var firstRange = null; iterator.forEach(function(range, row, offset) { if (!range.start) { var column = range.offset + (offset || 0); firstRange = new Range(row, column, row, column + range.length); if (!range.length && options.start && options.start.start && options.skipCurrent != false && firstRange.isEqual(options.start) ) { firstRange = null; return false; } } else firstRange = range; return true; }); return firstRange; }; this.findAll = function(session) { var options = this.$options; if (!options.needle) return []; this.$assembleRegExp(options); var range = options.range; var lines = range ? session.getLines(range.start.row, range.end.row) : session.doc.getAllLines(); var ranges = []; var re = options.re; if (options.$isMultiLine) { var len = re.length; var maxRow = lines.length - len; var prevRange; outer: for (var row = re.offset || 0; row <= maxRow; row++) { for (var j = 0; j < len; j++) if (lines[row + j].search(re[j]) == -1) continue outer; var startLine = lines[row]; var line = lines[row + len - 1]; var startIndex = startLine.length - startLine.match(re[0])[0].length; var endIndex = line.match(re[len - 1])[0].length; if (prevRange && prevRange.end.row === row && prevRange.end.column > startIndex ) { continue; } ranges.push(prevRange = new Range( row, startIndex, row + len - 1, endIndex )); if (len > 2) row = row + len - 2; } } else { for (var i = 0; i < lines.length; i++) { var matches = lang.getMatchOffsets(lines[i], re); for (var j = 0; j < matches.length; j++) { var match = matches[j]; ranges.push(new Range(i, match.offset, i, match.offset + match.length)); } } } if (range) { var startColumn = range.start.column; var endColumn = range.start.column; var i = 0, j = ranges.length - 1; while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row) i++; while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row) j--; ranges = ranges.slice(i, j + 1); for (i = 0, j = ranges.length; i < j; i++) { ranges[i].start.row += range.start.row; ranges[i].end.row += range.start.row; } } return ranges; }; this.replace = function(input, replacement) { var options = this.$options; var re = this.$assembleRegExp(options); if (options.$isMultiLine) return replacement; if (!re) return; var match = re.exec(input); if (!match || match[0].length != input.length) return null; replacement = input.replace(re, replacement); if (options.preserveCase) { replacement = replacement.split(""); for (var i = Math.min(input.length, input.length); i--; ) { var ch = input[i]; if (ch && ch.toLowerCase() != ch) replacement[i] = replacement[i].toUpperCase(); else replacement[i] = replacement[i].toLowerCase(); } replacement = replacement.join(""); } return replacement; }; this.$matchIterator = function(session, options) { var re = this.$assembleRegExp(options); if (!re) return false; var callback; if (options.$isMultiLine) { var len = re.length; var matchIterator = function(line, row, offset) { var startIndex = line.search(re[0]); if (startIndex == -1) return; for (var i = 1; i < len; i++) { line = session.getLine(row + i); if (line.search(re[i]) == -1) return; } var endIndex = line.match(re[len - 1])[0].length; var range = new Range(row, startIndex, row + len - 1, endIndex); if (re.offset == 1) { range.start.row--; range.start.column = Number.MAX_VALUE; } else if (offset) range.start.column += offset; if (callback(range)) return true; }; } else if (options.backwards) { var matchIterator = function(line, row, startIndex) { var matches = lang.getMatchOffsets(line, re); for (var i = matches.length-1; i >= 0; i--) if (callback(matches[i], row, startIndex)) return true; }; } else { var matchIterator = function(line, row, startIndex) { var matches = lang.getMatchOffsets(line, re); for (var i = 0; i < matches.length; i++) if (callback(matches[i], row, startIndex)) return true; }; } var lineIterator = this.$lineIterator(session, options); return { forEach: function(_callback) { callback = _callback; lineIterator.forEach(matchIterator); } }; }; this.$assembleRegExp = function(options, $disableFakeMultiline) { if (options.needle instanceof RegExp) return options.re = options.needle; var needle = options.needle; if (!options.needle) return options.re = false; if (!options.regExp) needle = lang.escapeRegExp(needle); if (options.wholeWord) needle = addWordBoundary(needle, options); var modifier = options.caseSensitive ? "gm" : "gmi"; options.$isMultiLine = !$disableFakeMultiline && /[\n\r]/.test(needle); if (options.$isMultiLine) return options.re = this.$assembleMultilineRegExp(needle, modifier); try { var re = new RegExp(needle, modifier); } catch(e) { re = false; } return options.re = re; }; this.$assembleMultilineRegExp = function(needle, modifier) { var parts = needle.replace(/\r\n|\r|\n/g, "$\n^").split("\n"); var re = []; for (var i = 0; i < parts.length; i++) try { re.push(new RegExp(parts[i], modifier)); } catch(e) { return false; } if (parts[0] == "") { re.shift(); re.offset = 1; } else { re.offset = 0; } return re; }; this.$lineIterator = function(session, options) { var backwards = options.backwards == true; var skipCurrent = options.skipCurrent != false; var range = options.range; var start = options.start; if (!start) start = range ? range[backwards ? "end" : "start"] : session.selection.getRange(); if (start.start) start = start[skipCurrent != backwards ? "end" : "start"]; var firstRow = range ? range.start.row : 0; var lastRow = range ? range.end.row : session.getLength() - 1; var forEach = backwards ? function(callback) { var row = start.row; var line = session.getLine(row).substring(0, start.column); if (callback(line, row)) return; for (row--; row >= firstRow; row--) if (callback(session.getLine(row), row)) return; if (options.wrap == false) return; for (row = lastRow, firstRow = start.row; row >= firstRow; row--) if (callback(session.getLine(row), row)) return; } : function(callback) { var row = start.row; var line = session.getLine(row).substr(start.column); if (callback(line, row, start.column)) return; for (row = row+1; row <= lastRow; row++) if (callback(session.getLine(row), row)) return; if (options.wrap == false) return; for (row = firstRow, lastRow = start.row; row <= lastRow; row++) if (callback(session.getLine(row), row)) return; }; return {forEach: forEach}; }; }).call(Search.prototype); function addWordBoundary(needle, options) { function wordBoundary(c) { if (/\w/.test(c) || options.regExp) return "\\b"; return ""; } return wordBoundary(needle[0]) + needle + wordBoundary(needle[needle.length - 1]); } exports.Search = Search; }); ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(acequire, exports, module) { "use strict"; var keyUtil = acequire("../lib/keys"); var useragent = acequire("../lib/useragent"); var KEY_MODS = keyUtil.KEY_MODS; function HashHandler(config, platform) { this.platform = platform || (useragent.isMac ? "mac" : "win"); this.commands = {}; this.commandKeyBinding = {}; this.addCommands(config); this.$singleCommand = true; } function MultiHashHandler(config, platform) { HashHandler.call(this, config, platform); this.$singleCommand = false; } MultiHashHandler.prototype = HashHandler.prototype; (function() { this.addCommand = function(command) { if (this.commands[command.name]) this.removeCommand(command); this.commands[command.name] = command; if (command.bindKey) this._buildKeyHash(command); }; this.removeCommand = function(command, keepCommand) { var name = command && (typeof command === 'string' ? command : command.name); command = this.commands[name]; if (!keepCommand) delete this.commands[name]; var ckb = this.commandKeyBinding; for (var keyId in ckb) { var cmdGroup = ckb[keyId]; if (cmdGroup == command) { delete ckb[keyId]; } else if (Array.isArray(cmdGroup)) { var i = cmdGroup.indexOf(command); if (i != -1) { cmdGroup.splice(i, 1); if (cmdGroup.length == 1) ckb[keyId] = cmdGroup[0]; } } } }; this.bindKey = function(key, command, position) { if (typeof key == "object" && key) { if (position == undefined) position = key.position; key = key[this.platform]; } if (!key) return; if (typeof command == "function") return this.addCommand({exec: command, bindKey: key, name: command.name || key}); key.split("|").forEach(function(keyPart) { var chain = ""; if (keyPart.indexOf(" ") != -1) { var parts = keyPart.split(/\s+/); keyPart = parts.pop(); parts.forEach(function(keyPart) { var binding = this.parseKeys(keyPart); var id = KEY_MODS[binding.hashId] + binding.key; chain += (chain ? " " : "") + id; this._addCommandToBinding(chain, "chainKeys"); }, this); chain += " "; } var binding = this.parseKeys(keyPart); var id = KEY_MODS[binding.hashId] + binding.key; this._addCommandToBinding(chain + id, command, position); }, this); }; function getPosition(command) { return typeof command == "object" && command.bindKey && command.bindKey.position || 0; } this._addCommandToBinding = function(keyId, command, position) { var ckb = this.commandKeyBinding, i; if (!command) { delete ckb[keyId]; } else if (!ckb[keyId] || this.$singleCommand) { ckb[keyId] = command; } else { if (!Array.isArray(ckb[keyId])) { ckb[keyId] = [ckb[keyId]]; } else if ((i = ckb[keyId].indexOf(command)) != -1) { ckb[keyId].splice(i, 1); } if (typeof position != "number") { if (position || command.isDefault) position = -100; else position = getPosition(command); } var commands = ckb[keyId]; for (i = 0; i < commands.length; i++) { var other = commands[i]; var otherPos = getPosition(other); if (otherPos > position) break; } commands.splice(i, 0, command); } }; this.addCommands = function(commands) { commands && Object.keys(commands).forEach(function(name) { var command = commands[name]; if (!command) return; if (typeof command === "string") return this.bindKey(command, name); if (typeof command === "function") command = { exec: command }; if (typeof command !== "object") return; if (!command.name) command.name = name; this.addCommand(command); }, this); }; this.removeCommands = function(commands) { Object.keys(commands).forEach(function(name) { this.removeCommand(commands[name]); }, this); }; this.bindKeys = function(keyList) { Object.keys(keyList).forEach(function(key) { this.bindKey(key, keyList[key]); }, this); }; this._buildKeyHash = function(command) { this.bindKey(command.bindKey, command); }; this.parseKeys = function(keys) { var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x}); var key = parts.pop(); var keyCode = keyUtil[key]; if (keyUtil.FUNCTION_KEYS[keyCode]) key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase(); else if (!parts.length) return {key: key, hashId: -1}; else if (parts.length == 1 && parts[0] == "shift") return {key: key.toUpperCase(), hashId: -1}; var hashId = 0; for (var i = parts.length; i--;) { var modifier = keyUtil.KEY_MODS[parts[i]]; if (modifier == null) { if (typeof console != "undefined") console.error("invalid modifier " + parts[i] + " in " + keys); return false; } hashId |= modifier; } return {key: key, hashId: hashId}; }; this.findKeyCommand = function findKeyCommand(hashId, keyString) { var key = KEY_MODS[hashId] + keyString; return this.commandKeyBinding[key]; }; this.handleKeyboard = function(data, hashId, keyString, keyCode) { if (keyCode < 0) return; var key = KEY_MODS[hashId] + keyString; var command = this.commandKeyBinding[key]; if (data.$keyChain) { data.$keyChain += " " + key; command = this.commandKeyBinding[data.$keyChain] || command; } if (command) { if (command == "chainKeys" || command[command.length - 1] == "chainKeys") { data.$keyChain = data.$keyChain || key; return {command: "null"}; } } if (data.$keyChain) { if ((!hashId || hashId == 4) && keyString.length == 1) data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input else if (hashId == -1 || keyCode > 0) data.$keyChain = ""; // reset keyChain } return {command: command}; }; this.getStatusText = function(editor, data) { return data.$keyChain || ""; }; }).call(HashHandler.prototype); exports.HashHandler = HashHandler; exports.MultiHashHandler = MultiHashHandler; }); ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"], function(acequire, exports, module) { "use strict"; var oop = acequire("../lib/oop"); var MultiHashHandler = acequire("../keyboard/hash_handler").MultiHashHandler; var EventEmitter = acequire("../lib/event_emitter").EventEmitter; var CommandManager = function(platform, commands) { MultiHashHandler.call(this, commands, platform); this.byName = this.commands; this.setDefaultHandler("exec", function(e) { return e.command.exec(e.editor, e.args || {}); }); }; oop.inherits(CommandManager, MultiHashHandler); (function() { oop.implement(this, EventEmitter); this.exec = function(command, editor, args) { if (Array.isArray(command)) { for (var i = command.length; i--; ) { if (this.exec(command[i], editor, args)) return true; } return false; } if (typeof command === "string") command = this.commands[command]; if (!command) return false; if (editor && editor.$readOnly && !command.readOnly) return false; var e = {editor: editor, command: command, args: args}; e.returnValue = this._emit("exec", e); this._signal("afterExec", e); return e.returnValue === false ? false : true; }; this.toggleRecording = function(editor) { if (this.$inReplay) return; editor && editor._emit("changeStatus"); if (this.recording) { this.macro.pop(); this.removeEventListener("exec", this.$addCommandToMacro); if (!this.macro.length) this.macro = this.oldMacro; return this.recording = false; } if (!this.$addCommandToMacro) { this.$addCommandToMacro = function(e) { this.macro.push([e.command, e.args]); }.bind(this); } this.oldMacro = this.macro; this.macro = []; this.on("exec", this.$addCommandToMacro); return this.recording = true; }; this.replay = function(editor) { if (this.$inReplay || !this.macro) return; if (this.recording) return this.toggleRecording(editor); try { this.$inReplay = true; this.macro.forEach(function(x) { if (typeof x == "string") this.exec(x, editor); else this.exec(x[0], editor, x[1]); }, this); } finally { this.$inReplay = false; } }; this.trimMacro = function(m) { return m.map(function(x){ if (typeof x[0] != "string") x[0] = x[0].name; if (!x[1]) x = x[0]; return x; }); }; }).call(CommandManager.prototype); exports.CommandManager = CommandManager; }); ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"], function(acequire, exports, module) { "use strict"; var lang = acequire("../lib/lang"); var config = acequire("../config"); var Range = acequire("../range").Range; function bindKey(win, mac) { return {win: win, mac: mac}; } exports.commands = [{ name: "showSettingsMenu", bindKey: bindKey("Ctrl-,", "Command-,"), exec: function(editor) { config.loadModule("ace/ext/settings_menu", function(module) { module.init(editor); editor.showSettingsMenu(); }); }, readOnly: true }, { name: "goToNextError", bindKey: bindKey("Alt-E", "F4"), exec: function(editor) { config.loadModule("ace/ext/error_marker", function(module) { module.showErrorMarker(editor, 1); }); }, scrollIntoView: "animate", readOnly: true }, { name: "goToPreviousError", bindKey: bindKey("Alt-Shift-E", "Shift-F4"), exec: function(editor) { config.loadModule("ace/ext/error_marker", function(module) { module.showErrorMarker(editor, -1); }); }, scrollIntoView: "animate", readOnly: true }, { name: "selectall", bindKey: bindKey("Ctrl-A", "Command-A"), exec: function(editor) { editor.selectAll(); }, readOnly: true }, { name: "centerselection", bindKey: bindKey(null, "Ctrl-L"), exec: function(editor) { editor.centerSelection(); }, readOnly: true }, { name: "gotoline", bindKey: bindKey("Ctrl-L", "Command-L"), exec: function(editor) { var line = parseInt(prompt("Enter line number:"), 10); if (!isNaN(line)) { editor.gotoLine(line); } }, readOnly: true }, { name: "fold", bindKey: bindKey("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"), exec: function(editor) { editor.session.toggleFold(false); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "unfold", bindKey: bindKey("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"), exec: function(editor) { editor.session.toggleFold(true); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "toggleFoldWidget", bindKey: bindKey("F2", "F2"), exec: function(editor) { editor.session.toggleFoldWidget(); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "toggleParentFoldWidget", bindKey: bindKey("Alt-F2", "Alt-F2"), exec: function(editor) { editor.session.toggleFoldWidget(true); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "foldall", bindKey: bindKey(null, "Ctrl-Command-Option-0"), exec: function(editor) { editor.session.foldAll(); }, scrollIntoView: "center", readOnly: true }, { name: "foldOther", bindKey: bindKey("Alt-0", "Command-Option-0"), exec: function(editor) { editor.session.foldAll(); editor.session.unfold(editor.selection.getAllRanges()); }, scrollIntoView: "center", readOnly: true }, { name: "unfoldall", bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"), exec: function(editor) { editor.session.unfold(); }, scrollIntoView: "center", readOnly: true }, { name: "findnext", bindKey: bindKey("Ctrl-K", "Command-G"), exec: function(editor) { editor.findNext(); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "findprevious", bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"), exec: function(editor) { editor.findPrevious(); }, multiSelectAction: "forEach", scrollIntoView: "center", readOnly: true }, { name: "selectOrFindNext", bindKey: bindKey("Alt-K", "Ctrl-G"), exec: function(editor) { if (editor.selection.isEmpty()) editor.selection.selectWord(); else editor.findNext(); }, readOnly: true }, { name: "selectOrFindPrevious", bindKey: bindKey("Alt-Shift-K", "Ctrl-Shift-G"), exec: function(editor) { if (editor.selection.isEmpty()) editor.selection.selectWord(); else editor.findPrevious(); }, readOnly: true }, { name: "find", bindKey: bindKey("Ctrl-F", "Command-F"), exec: function(editor) { config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor)}); }, readOnly: true }, { name: "overwrite", bindKey: "Insert", exec: function(editor) { editor.toggleOverwrite(); }, readOnly: true }, { name: "selecttostart", bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Home|Command-Shift-Up"), exec: function(editor) { editor.getSelection().selectFileStart(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "gotostart", bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"), exec: function(editor) { editor.navigateFileStart(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "selectup", bindKey: bindKey("Shift-Up", "Shift-Up|Ctrl-Shift-P"), exec: function(editor) { editor.getSelection().selectUp(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "golineup", bindKey: bindKey("Up", "Up|Ctrl-P"), exec: function(editor, args) { editor.navigateUp(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selecttoend", bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-End|Command-Shift-Down"), exec: function(editor) { editor.getSelection().selectFileEnd(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "gotoend", bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"), exec: function(editor) { editor.navigateFileEnd(); }, multiSelectAction: "forEach", readOnly: true, scrollIntoView: "animate", aceCommandGroup: "fileJump" }, { name: "selectdown", bindKey: bindKey("Shift-Down", "Shift-Down|Ctrl-Shift-N"), exec: function(editor) { editor.getSelection().selectDown(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "golinedown", bindKey: bindKey("Down", "Down|Ctrl-N"), exec: function(editor, args) { editor.navigateDown(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectwordleft", bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"), exec: function(editor) { editor.getSelection().selectWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotowordleft", bindKey: bindKey("Ctrl-Left", "Option-Left"), exec: function(editor) { editor.navigateWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selecttolinestart", bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left|Ctrl-Shift-A"), exec: function(editor) { editor.getSelection().selectLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotolinestart", bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"), exec: function(editor) { editor.navigateLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectleft", bindKey: bindKey("Shift-Left", "Shift-Left|Ctrl-Shift-B"), exec: function(editor) { editor.getSelection().selectLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotoleft", bindKey: bindKey("Left", "Left|Ctrl-B"), exec: function(editor, args) { editor.navigateLeft(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectwordright", bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"), exec: function(editor) { editor.getSelection().selectWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotowordright", bindKey: bindKey("Ctrl-Right", "Option-Right"), exec: function(editor) { editor.navigateWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selecttolineend", bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right|Shift-End|Ctrl-Shift-E"), exec: function(editor) { editor.getSelection().selectLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotolineend", bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"), exec: function(editor) { editor.navigateLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectright", bindKey: bindKey("Shift-Right", "Shift-Right"), exec: function(editor) { editor.getSelection().selectRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "gotoright", bindKey: bindKey("Right", "Right|Ctrl-F"), exec: function(editor, args) { editor.navigateRight(args.times); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectpagedown", bindKey: "Shift-PageDown", exec: function(editor) { editor.selectPageDown(); }, readOnly: true }, { name: "pagedown", bindKey: bindKey(null, "Option-PageDown"), exec: function(editor) { editor.scrollPageDown(); }, readOnly: true }, { name: "gotopagedown", bindKey: bindKey("PageDown", "PageDown|Ctrl-V"), exec: function(editor) { editor.gotoPageDown(); }, readOnly: true }, { name: "selectpageup", bindKey: "Shift-PageUp", exec: function(editor) { editor.selectPageUp(); }, readOnly: true }, { name: "pageup", bindKey: bindKey(null, "Option-PageUp"), exec: function(editor) { editor.scrollPageUp(); }, readOnly: true }, { name: "gotopageup", bindKey: "PageUp", exec: function(editor) { editor.gotoPageUp(); }, readOnly: true }, { name: "scrollup", bindKey: bindKey("Ctrl-Up", null), exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); }, readOnly: true }, { name: "scrolldown", bindKey: bindKey("Ctrl-Down", null), exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); }, readOnly: true }, { name: "selectlinestart", bindKey: "Shift-Home", exec: function(editor) { editor.getSelection().selectLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "selectlineend", bindKey: "Shift-End", exec: function(editor) { editor.getSelection().selectLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "togglerecording", bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"), exec: function(editor) { editor.commands.toggleRecording(editor); }, readOnly: true }, { name: "replaymacro", bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"), exec: function(editor) { editor.commands.replay(editor); }, readOnly: true }, { name: "jumptomatching", bindKey: bindKey("Ctrl-P", "Ctrl-P"), exec: function(editor) { editor.jumpToMatching(); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "selecttomatching", bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"), exec: function(editor) { editor.jumpToMatching(true); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "expandToMatching", bindKey: bindKey("Ctrl-Shift-M", "Ctrl-Shift-M"), exec: function(editor) { editor.jumpToMatching(true, true); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "passKeysToBrowser", bindKey: bindKey(null, null), exec: function() {}, passEvent: true, readOnly: true }, { name: "copy", exec: function(editor) { }, readOnly: true }, { name: "cut", exec: function(editor) { var range = editor.getSelectionRange(); editor._emit("cut", range); if (!editor.selection.isEmpty()) { editor.session.remove(range); editor.clearSelection(); } }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "paste", exec: function(editor, args) { editor.$handlePaste(args); }, scrollIntoView: "cursor" }, { name: "removeline", bindKey: bindKey("Ctrl-D", "Command-D"), exec: function(editor) { editor.removeLines(); }, scrollIntoView: "cursor", multiSelectAction: "forEachLine" }, { name: "duplicateSelection", bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"), exec: function(editor) { editor.duplicateSelection(); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "sortlines", bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"), exec: function(editor) { editor.sortLines(); }, scrollIntoView: "selection", multiSelectAction: "forEachLine" }, { name: "togglecomment", bindKey: bindKey("Ctrl-/", "Command-/"), exec: function(editor) { editor.toggleCommentLines(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "toggleBlockComment", bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"), exec: function(editor) { editor.toggleBlockComment(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "modifyNumberUp", bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"), exec: function(editor) { editor.modifyNumber(1); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "modifyNumberDown", bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"), exec: function(editor) { editor.modifyNumber(-1); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "replace", bindKey: bindKey("Ctrl-H", "Command-Option-F"), exec: function(editor) { config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true)}); } }, { name: "undo", bindKey: bindKey("Ctrl-Z", "Command-Z"), exec: function(editor) { editor.undo(); } }, { name: "redo", bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"), exec: function(editor) { editor.redo(); } }, { name: "copylinesup", bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"), exec: function(editor) { editor.copyLinesUp(); }, scrollIntoView: "cursor" }, { name: "movelinesup", bindKey: bindKey("Alt-Up", "Option-Up"), exec: function(editor) { editor.moveLinesUp(); }, scrollIntoView: "cursor" }, { name: "copylinesdown", bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"), exec: function(editor) { editor.copyLinesDown(); }, scrollIntoView: "cursor" }, { name: "movelinesdown", bindKey: bindKey("Alt-Down", "Option-Down"), exec: function(editor) { editor.moveLinesDown(); }, scrollIntoView: "cursor" }, { name: "del", bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"), exec: function(editor) { editor.remove("right"); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "backspace", bindKey: bindKey( "Shift-Backspace|Backspace", "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H" ), exec: function(editor) { editor.remove("left"); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "cut_or_delete", bindKey: bindKey("Shift-Delete", null), exec: function(editor) { if (editor.selection.isEmpty()) { editor.remove("left"); } else { return false; } }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removetolinestart", bindKey: bindKey("Alt-Backspace", "Command-Backspace"), exec: function(editor) { editor.removeToLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removetolineend", bindKey: bindKey("Alt-Delete", "Ctrl-K"), exec: function(editor) { editor.removeToLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removewordleft", bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"), exec: function(editor) { editor.removeWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removewordright", bindKey: bindKey("Ctrl-Delete", "Alt-Delete"), exec: function(editor) { editor.removeWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "outdent", bindKey: bindKey("Shift-Tab", "Shift-Tab"), exec: function(editor) { editor.blockOutdent(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "indent", bindKey: bindKey("Tab", "Tab"), exec: function(editor) { editor.indent(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "blockoutdent", bindKey: bindKey("Ctrl-[", "Ctrl-["), exec: function(editor) { editor.blockOutdent(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "blockindent", bindKey: bindKey("Ctrl-]", "Ctrl-]"), exec: function(editor) { editor.blockIndent(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "insertstring", exec: function(editor, str) { editor.insert(str); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "inserttext", exec: function(editor, args) { editor.insert(lang.stringRepeat(args.text || "", args.times || 1)); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "splitline", bindKey: bindKey(null, "Ctrl-O"), exec: function(editor) { editor.splitLine(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "transposeletters", bindKey: bindKey("Ctrl-T", "Ctrl-T"), exec: function(editor) { editor.transposeLetters(); }, multiSelectAction: function(editor) {editor.transposeSelections(1); }, scrollIntoView: "cursor" }, { name: "touppercase", bindKey: bindKey("Ctrl-U", "Ctrl-U"), exec: function(editor) { editor.toUpperCase(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "tolowercase", bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"), exec: function(editor) { editor.toLowerCase(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "expandtoline", bindKey: bindKey("Ctrl-Shift-L", "Command-Shift-L"), exec: function(editor) { var range = editor.selection.getRange(); range.start.column = range.end.column = 0; range.end.row++; editor.selection.setRange(range, false); }, multiSelectAction: "forEach", scrollIntoView: "cursor", readOnly: true }, { name: "joinlines", bindKey: bindKey(null, null), exec: function(editor) { var isBackwards = editor.selection.isBackwards(); var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor(); var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead(); var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length; var selectedText = editor.session.doc.getTextRange(editor.selection.getRange()); var selectedCount = selectedText.replace(/\n\s*/, " ").length; var insertLine = editor.session.doc.getLine(selectionStart.row); for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) { var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i))); if (curLine.length !== 0) { curLine = " " + curLine; } insertLine += curLine; } if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) { insertLine += editor.session.doc.getNewLineCharacter(); } editor.clearSelection(); editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine); if (selectedCount > 0) { editor.selection.moveCursorTo(selectionStart.row, selectionStart.column); editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount); } else { firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol; editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol); } }, multiSelectAction: "forEach", readOnly: true }, { name: "invertSelection", bindKey: bindKey(null, null), exec: function(editor) { var endRow = editor.session.doc.getLength() - 1; var endCol = editor.session.doc.getLine(endRow).length; var ranges = editor.selection.rangeList.ranges; var newRanges = []; if (ranges.length < 1) { ranges = [editor.selection.getRange()]; } for (var i = 0; i < ranges.length; i++) { if (i == (ranges.length - 1)) { if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) { newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol)); } } if (i === 0) { if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) { newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column)); } } else { newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column)); } } editor.exitMultiSelectMode(); editor.clearSelection(); for(var i = 0; i < newRanges.length; i++) { editor.selection.addRange(newRanges[i], false); } }, readOnly: true, scrollIntoView: "none" }]; }); ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"], function(acequire, exports, module) { "use strict"; acequire("./lib/fixoldbrowsers"); var oop = acequire("./lib/oop"); var dom = acequire("./lib/dom"); var lang = acequire("./lib/lang"); var useragent = acequire("./lib/useragent"); var TextInput = acequire("./keyboard/textinput").TextInput; var MouseHandler = acequire("./mouse/mouse_handler").MouseHandler; var FoldHandler = acequire("./mouse/fold_handler").FoldHandler; var KeyBinding = acequire("./keyboard/keybinding").KeyBinding; var EditSession = acequire("./edit_session").EditSession; var Search = acequire("./search").Search; var Range = acequire("./range").Range; var EventEmitter = acequire("./lib/event_emitter").EventEmitter; var CommandManager = acequire("./commands/command_manager").CommandManager; var defaultCommands = acequire("./commands/default_commands").commands; var config = acequire("./config"); var TokenIterator = acequire("./token_iterator").TokenIterator; var Editor = function(renderer, session) { var container = renderer.getContainerElement(); this.container = container; this.renderer = renderer; this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands); this.textInput = new TextInput(renderer.getTextAreaContainer(), this); this.renderer.textarea = this.textInput.getElement(); this.keyBinding = new KeyBinding(this); this.$mouseHandler = new MouseHandler(this); new FoldHandler(this); this.$blockScrolling = 0; this.$search = new Search().set({ wrap: true }); this.$historyTracker = this.$historyTracker.bind(this); this.commands.on("exec", this.$historyTracker); this.$initOperationListeners(); this._$emitInputEvent = lang.delayedCall(function() { this._signal("input", {}); if (this.session && this.session.bgTokenizer) this.session.bgTokenizer.scheduleStart(); }.bind(this)); this.on("change", function(_, _self) { _self._$emitInputEvent.schedule(31); }); this.setSession(session || new EditSession("")); config.resetOptions(this); config._signal("editor", this); }; (function(){ oop.implement(this, EventEmitter); this.$initOperationListeners = function() { function last(a) {return a[a.length - 1]} this.selections = []; this.commands.on("exec", this.startOperation.bind(this), true); this.commands.on("afterExec", this.endOperation.bind(this), true); this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this)); this.on("change", function() { this.curOp || this.startOperation(); this.curOp.docChanged = true; }.bind(this), true); this.on("changeSelection", function() { this.curOp || this.startOperation(); this.curOp.selectionChanged = true; }.bind(this), true); }; this.curOp = null; this.prevOp = {}; this.startOperation = function(commadEvent) { if (this.curOp) { if (!commadEvent || this.curOp.command) return; this.prevOp = this.curOp; } if (!commadEvent) { this.previousCommand = null; commadEvent = {}; } this.$opResetTimer.schedule(); this.curOp = { command: commadEvent.command || {}, args: commadEvent.args, scrollTop: this.renderer.scrollTop }; if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined) this.$blockScrolling++; }; this.endOperation = function(e) { if (this.curOp) { if (e && e.returnValue === false) return this.curOp = null; this._signal("beforeEndOperation"); var command = this.curOp.command; if (command.name && this.$blockScrolling > 0) this.$blockScrolling--; var scrollIntoView = command && command.scrollIntoView; if (scrollIntoView) { switch (scrollIntoView) { case "center-animate": scrollIntoView = "animate"; case "center": this.renderer.scrollCursorIntoView(null, 0.5); break; case "animate": case "cursor": this.renderer.scrollCursorIntoView(); break; case "selectionPart": var range = this.selection.getRange(); var config = this.renderer.layerConfig; if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) { this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead); } break; default: break; } if (scrollIntoView == "animate") this.renderer.animateScrolling(this.curOp.scrollTop); } this.prevOp = this.curOp; this.curOp = null; } }; this.$mergeableCommands = ["backspace", "del", "insertstring"]; this.$historyTracker = function(e) { if (!this.$mergeUndoDeltas) return; var prev = this.prevOp; var mergeableCommands = this.$mergeableCommands; var shouldMerge = prev.command && (e.command.name == prev.command.name); if (e.command.name == "insertstring") { var text = e.args; if (this.mergeNextCommand === undefined) this.mergeNextCommand = true; shouldMerge = shouldMerge && this.mergeNextCommand // previous command allows to coalesce with && (!/\s/.test(text) || /\s/.test(prev.args)); // previous insertion was of same type this.mergeNextCommand = true; } else { shouldMerge = shouldMerge && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable } if ( this.$mergeUndoDeltas != "always" && Date.now() - this.sequenceStartTime > 2000 ) { shouldMerge = false; // the sequence is too long } if (shouldMerge) this.session.mergeUndoDeltas = true; else if (mergeableCommands.indexOf(e.command.name) !== -1) this.sequenceStartTime = Date.now(); }; this.setKeyboardHandler = function(keyboardHandler, cb) { if (keyboardHandler && typeof keyboardHandler === "string") { this.$keybindingId = keyboardHandler; var _self = this; config.loadModule(["keybinding", keyboardHandler], function(module) { if (_self.$keybindingId == keyboardHandler) _self.keyBinding.setKeyboardHandler(module && module.handler); cb && cb(); }); } else { this.$keybindingId = null; this.keyBinding.setKeyboardHandler(keyboardHandler); cb && cb(); } }; this.getKeyboardHandler = function() { return this.keyBinding.getKeyboardHandler(); }; this.setSession = function(session) { if (this.session == session) return; if (this.curOp) this.endOperation(); this.curOp = {}; var oldSession = this.session; if (oldSession) { this.session.off("change", this.$onDocumentChange); this.session.off("changeMode", this.$onChangeMode); this.session.off("tokenizerUpdate", this.$onTokenizerUpdate); this.session.off("changeTabSize", this.$onChangeTabSize); this.session.off("changeWrapLimit", this.$onChangeWrapLimit); this.session.off("changeWrapMode", this.$onChangeWrapMode); this.session.off("changeFold", this.$onChangeFold); this.session.off("changeFrontMarker", this.$onChangeFrontMarker); this.session.off("changeBackMarker", this.$onChangeBackMarker); this.session.off("changeBreakpoint", this.$onChangeBreakpoint); this.session.off("changeAnnotation", this.$onChangeAnnotation); this.session.off("changeOverwrite", this.$onCursorChange); this.session.off("changeScrollTop", this.$onScrollTopChange); this.session.off("changeScrollLeft", this.$onScrollLeftChange); var selection = this.session.getSelection(); selection.off("changeCursor", this.$onCursorChange); selection.off("changeSelection", this.$onSelectionChange); } this.session = session; if (session) { this.$onDocumentChange = this.onDocumentChange.bind(this); session.on("change", this.$onDocumentChange); this.renderer.setSession(session); this.$onChangeMode = this.onChangeMode.bind(this); session.on("changeMode", this.$onChangeMode); this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this); session.on("tokenizerUpdate", this.$onTokenizerUpdate); this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer); session.on("changeTabSize", this.$onChangeTabSize); this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this); session.on("changeWrapLimit", this.$onChangeWrapLimit); this.$onChangeWrapMode = this.onChangeWrapMode.bind(this); session.on("changeWrapMode", this.$onChangeWrapMode); this.$onChangeFold = this.onChangeFold.bind(this); session.on("changeFold", this.$onChangeFold); this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this); this.session.on("changeFrontMarker", this.$onChangeFrontMarker); this.$onChangeBackMarker = this.onChangeBackMarker.bind(this); this.session.on("changeBackMarker", this.$onChangeBackMarker); this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this); this.session.on("changeBreakpoint", this.$onChangeBreakpoint); this.$onChangeAnnotation = this.onChangeAnnotation.bind(this); this.session.on("changeAnnotation", this.$onChangeAnnotation); this.$onCursorChange = this.onCursorChange.bind(this); this.session.on("changeOverwrite", this.$onCursorChange); this.$onScrollTopChange = this.onScrollTopChange.bind(this); this.session.on("changeScrollTop", this.$onScrollTopChange); this.$onScrollLeftChange = this.onScrollLeftChange.bind(this); this.session.on("changeScrollLeft", this.$onScrollLeftChange); this.selection = session.getSelection(); this.selection.on("changeCursor", this.$onCursorChange); this.$onSelectionChange = this.onSelectionChange.bind(this); this.selection.on("changeSelection", this.$onSelectionChange); this.onChangeMode(); this.$blockScrolling += 1; this.onCursorChange(); this.$blockScrolling -= 1; this.onScrollTopChange(); this.onScrollLeftChange(); this.onSelectionChange(); this.onChangeFrontMarker(); this.onChangeBackMarker(); this.onChangeBreakpoint(); this.onChangeAnnotation(); this.session.getUseWrapMode() && this.renderer.adjustWrapLimit(); this.renderer.updateFull(); } else { this.selection = null; this.renderer.setSession(session); } this._signal("changeSession", { session: session, oldSession: oldSession }); this.curOp = null; oldSession && oldSession._signal("changeEditor", {oldEditor: this}); session && session._signal("changeEditor", {editor: this}); }; this.getSession = function() { return this.session; }; this.setValue = function(val, cursorPos) { this.session.doc.setValue(val); if (!cursorPos) this.selectAll(); else if (cursorPos == 1) this.navigateFileEnd(); else if (cursorPos == -1) this.navigateFileStart(); return val; }; this.getValue = function() { return this.session.getValue(); }; this.getSelection = function() { return this.selection; }; this.resize = function(force) { this.renderer.onResize(force); }; this.setTheme = function(theme, cb) { this.renderer.setTheme(theme, cb); }; this.getTheme = function() { return this.renderer.getTheme(); }; this.setStyle = function(style) { this.renderer.setStyle(style); }; this.unsetStyle = function(style) { this.renderer.unsetStyle(style); }; this.getFontSize = function () { return this.getOption("fontSize") || dom.computedStyle(this.container, "fontSize"); }; this.setFontSize = function(size) { this.setOption("fontSize", size); }; this.$highlightBrackets = function() { if (this.session.$bracketHighlight) { this.session.removeMarker(this.session.$bracketHighlight); this.session.$bracketHighlight = null; } if (this.$highlightPending) { return; } var self = this; this.$highlightPending = true; setTimeout(function() { self.$highlightPending = false; var session = self.session; if (!session || !session.bgTokenizer) return; var pos = session.findMatchingBracket(self.getCursorPosition()); if (pos) { var range = new Range(pos.row, pos.column, pos.row, pos.column + 1); } else if (session.$mode.getMatching) { var range = session.$mode.getMatching(self.session); } if (range) session.$bracketHighlight = session.addMarker(range, "ace_bracket", "text"); }, 50); }; this.$highlightTags = function() { if (this.$highlightTagPending) return; var self = this; this.$highlightTagPending = true; setTimeout(function() { self.$highlightTagPending = false; var session = self.session; if (!session || !session.bgTokenizer) return; var pos = self.getCursorPosition(); var iterator = new TokenIterator(self.session, pos.row, pos.column); var token = iterator.getCurrentToken(); if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) { session.removeMarker(session.$tagHighlight); session.$tagHighlight = null; return; } if (token.type.indexOf("tag-open") != -1) { token = iterator.stepForward(); if (!token) return; } var tag = token.value; var depth = 0; var prevToken = iterator.stepBackward(); if (prevToken.value == '<'){ do { prevToken = token; token = iterator.stepForward(); if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) { if (prevToken.value === '<'){ depth++; } else if (prevToken.value === '= 0); } else { do { token = prevToken; prevToken = iterator.stepBackward(); if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) { if (prevToken.value === '<') { depth++; } else if (prevToken.value === ' 1)) highlight = false; } if (session.$highlightLineMarker && !highlight) { session.removeMarker(session.$highlightLineMarker.id); session.$highlightLineMarker = null; } else if (!session.$highlightLineMarker && highlight) { var range = new Range(highlight.row, highlight.column, highlight.row, Infinity); range.id = session.addMarker(range, "ace_active-line", "screenLine"); session.$highlightLineMarker = range; } else if (highlight) { session.$highlightLineMarker.start.row = highlight.row; session.$highlightLineMarker.end.row = highlight.row; session.$highlightLineMarker.start.column = highlight.column; session._signal("changeBackMarker"); } }; this.onSelectionChange = function(e) { var session = this.session; if (session.$selectionMarker) { session.removeMarker(session.$selectionMarker); } session.$selectionMarker = null; if (!this.selection.isEmpty()) { var range = this.selection.getRange(); var style = this.getSelectionStyle(); session.$selectionMarker = session.addMarker(range, "ace_selection", style); } else { this.$updateHighlightActiveLine(); } var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp(); this.session.highlight(re); this._signal("changeSelection"); }; this.$getSelectionHighLightRegexp = function() { var session = this.session; var selection = this.getSelectionRange(); if (selection.isEmpty() || selection.isMultiLine()) return; var startOuter = selection.start.column - 1; var endOuter = selection.end.column + 1; var line = session.getLine(selection.start.row); var lineCols = line.length; var needle = line.substring(Math.max(startOuter, 0), Math.min(endOuter, lineCols)); if ((startOuter >= 0 && /^[\w\d]/.test(needle)) || (endOuter <= lineCols && /[\w\d]$/.test(needle))) return; needle = line.substring(selection.start.column, selection.end.column); if (!/^[\w\d]+$/.test(needle)) return; var re = this.$search.$assembleRegExp({ wholeWord: true, caseSensitive: true, needle: needle }); return re; }; this.onChangeFrontMarker = function() { this.renderer.updateFrontMarkers(); }; this.onChangeBackMarker = function() { this.renderer.updateBackMarkers(); }; this.onChangeBreakpoint = function() { this.renderer.updateBreakpoints(); }; this.onChangeAnnotation = function() { this.renderer.setAnnotations(this.session.getAnnotations()); }; this.onChangeMode = function(e) { this.renderer.updateText(); this._emit("changeMode", e); }; this.onChangeWrapLimit = function() { this.renderer.updateFull(); }; this.onChangeWrapMode = function() { this.renderer.onResize(true); }; this.onChangeFold = function() { this.$updateHighlightActiveLine(); this.renderer.updateFull(); }; this.getSelectedText = function() { return this.session.getTextRange(this.getSelectionRange()); }; this.getCopyText = function() { var text = this.getSelectedText(); this._signal("copy", text); return text; }; this.onCopy = function() { this.commands.exec("copy", this); }; this.onCut = function() { this.commands.exec("cut", this); }; this.onPaste = function(text, event) { var e = {text: text, event: event}; this.commands.exec("paste", this, e); }; this.$handlePaste = function(e) { if (typeof e == "string") e = {text: e}; this._signal("paste", e); var text = e.text; if (!this.inMultiSelectMode || this.inVirtualSelectionMode) { this.insert(text); } else { var lines = text.split(/\r\n|\r|\n/); var ranges = this.selection.rangeList.ranges; if (lines.length > ranges.length || lines.length < 2 || !lines[1]) return this.commands.exec("insertstring", this, text); for (var i = ranges.length; i--;) { var range = ranges[i]; if (!range.isEmpty()) this.session.remove(range); this.session.insert(range.start, lines[i]); } } }; this.execCommand = function(command, args) { return this.commands.exec(command, this, args); }; this.insert = function(text, pasted) { var session = this.session; var mode = session.getMode(); var cursor = this.getCursorPosition(); if (this.getBehavioursEnabled() && !pasted) { var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text); if (transform) { if (text !== transform.text) { this.session.mergeUndoDeltas = false; this.$mergeNextCommand = false; } text = transform.text; } } if (text == "\t") text = this.session.getTabString(); if (!this.selection.isEmpty()) { var range = this.getSelectionRange(); cursor = this.session.remove(range); this.clearSelection(); } else if (this.session.getOverwrite()) { var range = new Range.fromPoints(cursor, cursor); range.end.column += text.length; this.session.remove(range); } if (text == "\n" || text == "\r\n") { var line = session.getLine(cursor.row); if (cursor.column > line.search(/\S|$/)) { var d = line.substr(cursor.column).search(/\S|$/); session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d); } } this.clearSelection(); var start = cursor.column; var lineState = session.getState(cursor.row); var line = session.getLine(cursor.row); var shouldOutdent = mode.checkOutdent(lineState, line, text); var end = session.insert(cursor, text); if (transform && transform.selection) { if (transform.selection.length == 2) { // Transform relative to the current column this.selection.setSelectionRange( new Range(cursor.row, start + transform.selection[0], cursor.row, start + transform.selection[1])); } else { // Transform relative to the current row. this.selection.setSelectionRange( new Range(cursor.row + transform.selection[0], transform.selection[1], cursor.row + transform.selection[2], transform.selection[3])); } } if (session.getDocument().isNewLine(text)) { var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString()); session.insert({row: cursor.row+1, column: 0}, lineIndent); } if (shouldOutdent) mode.autoOutdent(lineState, session, cursor.row); }; this.onTextInput = function(text) { this.keyBinding.onTextInput(text); }; this.onCommandKey = function(e, hashId, keyCode) { this.keyBinding.onCommandKey(e, hashId, keyCode); }; this.setOverwrite = function(overwrite) { this.session.setOverwrite(overwrite); }; this.getOverwrite = function() { return this.session.getOverwrite(); }; this.toggleOverwrite = function() { this.session.toggleOverwrite(); }; this.setScrollSpeed = function(speed) { this.setOption("scrollSpeed", speed); }; this.getScrollSpeed = function() { return this.getOption("scrollSpeed"); }; this.setDragDelay = function(dragDelay) { this.setOption("dragDelay", dragDelay); }; this.getDragDelay = function() { return this.getOption("dragDelay"); }; this.setSelectionStyle = function(val) { this.setOption("selectionStyle", val); }; this.getSelectionStyle = function() { return this.getOption("selectionStyle"); }; this.setHighlightActiveLine = function(shouldHighlight) { this.setOption("highlightActiveLine", shouldHighlight); }; this.getHighlightActiveLine = function() { return this.getOption("highlightActiveLine"); }; this.setHighlightGutterLine = function(shouldHighlight) { this.setOption("highlightGutterLine", shouldHighlight); }; this.getHighlightGutterLine = function() { return this.getOption("highlightGutterLine"); }; this.setHighlightSelectedWord = function(shouldHighlight) { this.setOption("highlightSelectedWord", shouldHighlight); }; this.getHighlightSelectedWord = function() { return this.$highlightSelectedWord; }; this.setAnimatedScroll = function(shouldAnimate){ this.renderer.setAnimatedScroll(shouldAnimate); }; this.getAnimatedScroll = function(){ return this.renderer.getAnimatedScroll(); }; this.setShowInvisibles = function(showInvisibles) { this.renderer.setShowInvisibles(showInvisibles); }; this.getShowInvisibles = function() { return this.renderer.getShowInvisibles(); }; this.setDisplayIndentGuides = function(display) { this.renderer.setDisplayIndentGuides(display); }; this.getDisplayIndentGuides = function() { return this.renderer.getDisplayIndentGuides(); }; this.setShowPrintMargin = function(showPrintMargin) { this.renderer.setShowPrintMargin(showPrintMargin); }; this.getShowPrintMargin = function() { return this.renderer.getShowPrintMargin(); }; this.setPrintMarginColumn = function(showPrintMargin) { this.renderer.setPrintMarginColumn(showPrintMargin); }; this.getPrintMarginColumn = function() { return this.renderer.getPrintMarginColumn(); }; this.setReadOnly = function(readOnly) { this.setOption("readOnly", readOnly); }; this.getReadOnly = function() { return this.getOption("readOnly"); }; this.setBehavioursEnabled = function (enabled) { this.setOption("behavioursEnabled", enabled); }; this.getBehavioursEnabled = function () { return this.getOption("behavioursEnabled"); }; this.setWrapBehavioursEnabled = function (enabled) { this.setOption("wrapBehavioursEnabled", enabled); }; this.getWrapBehavioursEnabled = function () { return this.getOption("wrapBehavioursEnabled"); }; this.setShowFoldWidgets = function(show) { this.setOption("showFoldWidgets", show); }; this.getShowFoldWidgets = function() { return this.getOption("showFoldWidgets"); }; this.setFadeFoldWidgets = function(fade) { this.setOption("fadeFoldWidgets", fade); }; this.getFadeFoldWidgets = function() { return this.getOption("fadeFoldWidgets"); }; this.remove = function(dir) { if (this.selection.isEmpty()){ if (dir == "left") this.selection.selectLeft(); else this.selection.selectRight(); } var range = this.getSelectionRange(); if (this.getBehavioursEnabled()) { var session = this.session; var state = session.getState(range.start.row); var new_range = session.getMode().transformAction(state, 'deletion', this, session, range); if (range.end.column === 0) { var text = session.getTextRange(range); if (text[text.length - 1] == "\n") { var line = session.getLine(range.end.row); if (/^\s+$/.test(line)) { range.end.column = line.length; } } } if (new_range) range = new_range; } this.session.remove(range); this.clearSelection(); }; this.removeWordRight = function() { if (this.selection.isEmpty()) this.selection.selectWordRight(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; this.removeWordLeft = function() { if (this.selection.isEmpty()) this.selection.selectWordLeft(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; this.removeToLineStart = function() { if (this.selection.isEmpty()) this.selection.selectLineStart(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; this.removeToLineEnd = function() { if (this.selection.isEmpty()) this.selection.selectLineEnd(); var range = this.getSelectionRange(); if (range.start.column == range.end.column && range.start.row == range.end.row) { range.end.column = 0; range.end.row++; } this.session.remove(range); this.clearSelection(); }; this.splitLine = function() { if (!this.selection.isEmpty()) { this.session.remove(this.getSelectionRange()); this.clearSelection(); } var cursor = this.getCursorPosition(); this.insert("\n"); this.moveCursorToPosition(cursor); }; this.transposeLetters = function() { if (!this.selection.isEmpty()) { return; } var cursor = this.getCursorPosition(); var column = cursor.column; if (column === 0) return; var line = this.session.getLine(cursor.row); var swap, range; if (column < line.length) { swap = line.charAt(column) + line.charAt(column-1); range = new Range(cursor.row, column-1, cursor.row, column+1); } else { swap = line.charAt(column-1) + line.charAt(column-2); range = new Range(cursor.row, column-2, cursor.row, column); } this.session.replace(range, swap); }; this.toLowerCase = function() { var originalRange = this.getSelectionRange(); if (this.selection.isEmpty()) { this.selection.selectWord(); } var range = this.getSelectionRange(); var text = this.session.getTextRange(range); this.session.replace(range, text.toLowerCase()); this.selection.setSelectionRange(originalRange); }; this.toUpperCase = function() { var originalRange = this.getSelectionRange(); if (this.selection.isEmpty()) { this.selection.selectWord(); } var range = this.getSelectionRange(); var text = this.session.getTextRange(range); this.session.replace(range, text.toUpperCase()); this.selection.setSelectionRange(originalRange); }; this.indent = function() { var session = this.session; var range = this.getSelectionRange(); if (range.start.row < range.end.row) { var rows = this.$getSelectedRows(); session.indentRows(rows.first, rows.last, "\t"); return; } else if (range.start.column < range.end.column) { var text = session.getTextRange(range); if (!/^\s+$/.test(text)) { var rows = this.$getSelectedRows(); session.indentRows(rows.first, rows.last, "\t"); return; } } var line = session.getLine(range.start.row); var position = range.start; var size = session.getTabSize(); var column = session.documentToScreenColumn(position.row, position.column); if (this.session.getUseSoftTabs()) { var count = (size - column % size); var indentString = lang.stringRepeat(" ", count); } else { var count = column % size; while (line[range.start.column - 1] == " " && count) { range.start.column--; count--; } this.selection.setSelectionRange(range); indentString = "\t"; } return this.insert(indentString); }; this.blockIndent = function() { var rows = this.$getSelectedRows(); this.session.indentRows(rows.first, rows.last, "\t"); }; this.blockOutdent = function() { var selection = this.session.getSelection(); this.session.outdentRows(selection.getRange()); }; this.sortLines = function() { var rows = this.$getSelectedRows(); var session = this.session; var lines = []; for (i = rows.first; i <= rows.last; i++) lines.push(session.getLine(i)); lines.sort(function(a, b) { if (a.toLowerCase() < b.toLowerCase()) return -1; if (a.toLowerCase() > b.toLowerCase()) return 1; return 0; }); var deleteRange = new Range(0, 0, 0, 0); for (var i = rows.first; i <= rows.last; i++) { var line = session.getLine(i); deleteRange.start.row = i; deleteRange.end.row = i; deleteRange.end.column = line.length; session.replace(deleteRange, lines[i-rows.first]); } }; this.toggleCommentLines = function() { var state = this.session.getState(this.getCursorPosition().row); var rows = this.$getSelectedRows(); this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last); }; this.toggleBlockComment = function() { var cursor = this.getCursorPosition(); var state = this.session.getState(cursor.row); var range = this.getSelectionRange(); this.session.getMode().toggleBlockComment(state, this.session, range, cursor); }; this.getNumberAt = function(row, column) { var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g; _numberRx.lastIndex = 0; var s = this.session.getLine(row); while (_numberRx.lastIndex < column) { var m = _numberRx.exec(s); if(m.index <= column && m.index+m[0].length >= column){ var number = { value: m[0], start: m.index, end: m.index+m[0].length }; return number; } } return null; }; this.modifyNumber = function(amount) { var row = this.selection.getCursor().row; var column = this.selection.getCursor().column; var charRange = new Range(row, column-1, row, column); var c = this.session.getTextRange(charRange); if (!isNaN(parseFloat(c)) && isFinite(c)) { var nr = this.getNumberAt(row, column); if (nr) { var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end; var decimals = nr.start + nr.value.length - fp; var t = parseFloat(nr.value); t *= Math.pow(10, decimals); if(fp !== nr.end && column < fp){ amount *= Math.pow(10, nr.end - column - 1); } else { amount *= Math.pow(10, nr.end - column); } t += amount; t /= Math.pow(10, decimals); var nnr = t.toFixed(decimals); var replaceRange = new Range(row, nr.start, row, nr.end); this.session.replace(replaceRange, nnr); this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length)); } } }; this.removeLines = function() { var rows = this.$getSelectedRows(); this.session.removeFullLines(rows.first, rows.last); this.clearSelection(); }; this.duplicateSelection = function() { var sel = this.selection; var doc = this.session; var range = sel.getRange(); var reverse = sel.isBackwards(); if (range.isEmpty()) { var row = range.start.row; doc.duplicateLines(row, row); } else { var point = reverse ? range.start : range.end; var endPoint = doc.insert(point, doc.getTextRange(range), false); range.start = point; range.end = endPoint; sel.setSelectionRange(range, reverse); } }; this.moveLinesDown = function() { this.$moveLines(1, false); }; this.moveLinesUp = function() { this.$moveLines(-1, false); }; this.moveText = function(range, toPosition, copy) { return this.session.moveText(range, toPosition, copy); }; this.copyLinesUp = function() { this.$moveLines(-1, true); }; this.copyLinesDown = function() { this.$moveLines(1, true); }; this.$moveLines = function(dir, copy) { var rows, moved; var selection = this.selection; if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) { var range = selection.toOrientedRange(); rows = this.$getSelectedRows(range); moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir); if (copy && dir == -1) moved = 0; range.moveBy(moved, 0); selection.fromOrientedRange(range); } else { var ranges = selection.rangeList.ranges; selection.rangeList.detach(this.session); this.inVirtualSelectionMode = true; var diff = 0; var totalDiff = 0; var l = ranges.length; for (var i = 0; i < l; i++) { var rangeIndex = i; ranges[i].moveBy(diff, 0); rows = this.$getSelectedRows(ranges[i]); var first = rows.first; var last = rows.last; while (++i < l) { if (totalDiff) ranges[i].moveBy(totalDiff, 0); var subRows = this.$getSelectedRows(ranges[i]); if (copy && subRows.first != last) break; else if (!copy && subRows.first > last + 1) break; last = subRows.last; } i--; diff = this.session.$moveLines(first, last, copy ? 0 : dir); if (copy && dir == -1) rangeIndex = i + 1; while (rangeIndex <= i) { ranges[rangeIndex].moveBy(diff, 0); rangeIndex++; } if (!copy) diff = 0; totalDiff += diff; } selection.fromOrientedRange(selection.ranges[0]); selection.rangeList.attach(this.session); this.inVirtualSelectionMode = false; } }; this.$getSelectedRows = function(range) { range = (range || this.getSelectionRange()).collapseRows(); return { first: this.session.getRowFoldStart(range.start.row), last: this.session.getRowFoldEnd(range.end.row) }; }; this.onCompositionStart = function(text) { this.renderer.showComposition(this.getCursorPosition()); }; this.onCompositionUpdate = function(text) { this.renderer.setCompositionText(text); }; this.onCompositionEnd = function() { this.renderer.hideComposition(); }; this.getFirstVisibleRow = function() { return this.renderer.getFirstVisibleRow(); }; this.getLastVisibleRow = function() { return this.renderer.getLastVisibleRow(); }; this.isRowVisible = function(row) { return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow()); }; this.isRowFullyVisible = function(row) { return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow()); }; this.$getVisibleRowCount = function() { return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1; }; this.$moveByPage = function(dir, select) { var renderer = this.renderer; var config = this.renderer.layerConfig; var rows = dir * Math.floor(config.height / config.lineHeight); this.$blockScrolling++; if (select === true) { this.selection.$moveSelection(function(){ this.moveCursorBy(rows, 0); }); } else if (select === false) { this.selection.moveCursorBy(rows, 0); this.selection.clearSelection(); } this.$blockScrolling--; var scrollTop = renderer.scrollTop; renderer.scrollBy(0, rows * config.lineHeight); if (select != null) renderer.scrollCursorIntoView(null, 0.5); renderer.animateScrolling(scrollTop); }; this.selectPageDown = function() { this.$moveByPage(1, true); }; this.selectPageUp = function() { this.$moveByPage(-1, true); }; this.gotoPageDown = function() { this.$moveByPage(1, false); }; this.gotoPageUp = function() { this.$moveByPage(-1, false); }; this.scrollPageDown = function() { this.$moveByPage(1); }; this.scrollPageUp = function() { this.$moveByPage(-1); }; this.scrollToRow = function(row) { this.renderer.scrollToRow(row); }; this.scrollToLine = function(line, center, animate, callback) { this.renderer.scrollToLine(line, center, animate, callback); }; this.centerSelection = function() { var range = this.getSelectionRange(); var pos = { row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2), column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2) }; this.renderer.alignCursor(pos, 0.5); }; this.getCursorPosition = function() { return this.selection.getCursor(); }; this.getCursorPositionScreen = function() { return this.session.documentToScreenPosition(this.getCursorPosition()); }; this.getSelectionRange = function() { return this.selection.getRange(); }; this.selectAll = function() { this.$blockScrolling += 1; this.selection.selectAll(); this.$blockScrolling -= 1; }; this.clearSelection = function() { this.selection.clearSelection(); }; this.moveCursorTo = function(row, column) { this.selection.moveCursorTo(row, column); }; this.moveCursorToPosition = function(pos) { this.selection.moveCursorToPosition(pos); }; this.jumpToMatching = function(select, expand) { var cursor = this.getCursorPosition(); var iterator = new TokenIterator(this.session, cursor.row, cursor.column); var prevToken = iterator.getCurrentToken(); var token = prevToken || iterator.stepForward(); if (!token) return; var matchType; var found = false; var depth = {}; var i = cursor.column - token.start; var bracketType; var brackets = { ")": "(", "(": "(", "]": "[", "[": "[", "{": "{", "}": "{" }; do { if (token.value.match(/[{}()\[\]]/g)) { for (; i < token.value.length && !found; i++) { if (!brackets[token.value[i]]) { continue; } bracketType = brackets[token.value[i]] + '.' + token.type.replace("rparen", "lparen"); if (isNaN(depth[bracketType])) { depth[bracketType] = 0; } switch (token.value[i]) { case '(': case '[': case '{': depth[bracketType]++; break; case ')': case ']': case '}': depth[bracketType]--; if (depth[bracketType] === -1) { matchType = 'bracket'; found = true; } break; } } } else if (token && token.type.indexOf('tag-name') !== -1) { if (isNaN(depth[token.value])) { depth[token.value] = 0; } if (prevToken.value === '<') { depth[token.value]++; } else if (prevToken.value === '= 0; --i) { if(this.$tryReplace(ranges[i], replacement)) { replaced++; } } this.selection.setSelectionRange(selection); this.$blockScrolling -= 1; return replaced; }; this.$tryReplace = function(range, replacement) { var input = this.session.getTextRange(range); replacement = this.$search.replace(input, replacement); if (replacement !== null) { range.end = this.session.replace(range, replacement); return range; } else { return null; } }; this.getLastSearchOptions = function() { return this.$search.getOptions(); }; this.find = function(needle, options, animate) { if (!options) options = {}; if (typeof needle == "string" || needle instanceof RegExp) options.needle = needle; else if (typeof needle == "object") oop.mixin(options, needle); var range = this.selection.getRange(); if (options.needle == null) { needle = this.session.getTextRange(range) || this.$search.$options.needle; if (!needle) { range = this.session.getWordRange(range.start.row, range.start.column); needle = this.session.getTextRange(range); } this.$search.set({needle: needle}); } this.$search.set(options); if (!options.start) this.$search.set({start: range}); var newRange = this.$search.find(this.session); if (options.preventScroll) return newRange; if (newRange) { this.revealRange(newRange, animate); return newRange; } if (options.backwards) range.start = range.end; else range.end = range.start; this.selection.setRange(range); }; this.findNext = function(options, animate) { this.find({skipCurrent: true, backwards: false}, options, animate); }; this.findPrevious = function(options, animate) { this.find(options, {skipCurrent: true, backwards: true}, animate); }; this.revealRange = function(range, animate) { this.$blockScrolling += 1; this.session.unfold(range); this.selection.setSelectionRange(range); this.$blockScrolling -= 1; var scrollTop = this.renderer.scrollTop; this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5); if (animate !== false) this.renderer.animateScrolling(scrollTop); }; this.undo = function() { this.$blockScrolling++; this.session.getUndoManager().undo(); this.$blockScrolling--; this.renderer.scrollCursorIntoView(null, 0.5); }; this.redo = function() { this.$blockScrolling++; this.session.getUndoManager().redo(); this.$blockScrolling--; this.renderer.scrollCursorIntoView(null, 0.5); }; this.destroy = function() { this.renderer.destroy(); this._signal("destroy", this); if (this.session) { this.session.destroy(); } }; this.setAutoScrollEditorIntoView = function(enable) { if (!enable) return; var rect; var self = this; var shouldScroll = false; if (!this.$scrollAnchor) this.$scrollAnchor = document.createElement("div"); var scrollAnchor = this.$scrollAnchor; scrollAnchor.style.cssText = "position:absolute"; this.container.insertBefore(scrollAnchor, this.container.firstChild); var onChangeSelection = this.on("changeSelection", function() { shouldScroll = true; }); var onBeforeRender = this.renderer.on("beforeRender", function() { if (shouldScroll) rect = self.renderer.container.getBoundingClientRect(); }); var onAfterRender = this.renderer.on("afterRender", function() { if (shouldScroll && rect && (self.isFocused() || self.searchBox && self.searchBox.isFocused()) ) { var renderer = self.renderer; var pos = renderer.$cursorLayer.$pixelPos; var config = renderer.layerConfig; var top = pos.top - config.offset; if (pos.top >= 0 && top + rect.top < 0) { shouldScroll = true; } else if (pos.top < config.height && pos.top + rect.top + config.lineHeight > window.innerHeight) { shouldScroll = false; } else { shouldScroll = null; } if (shouldScroll != null) { scrollAnchor.style.top = top + "px"; scrollAnchor.style.left = pos.left + "px"; scrollAnchor.style.height = config.lineHeight + "px"; scrollAnchor.scrollIntoView(shouldScroll); } shouldScroll = rect = null; } }); this.setAutoScrollEditorIntoView = function(enable) { if (enable) return; delete this.setAutoScrollEditorIntoView; this.off("changeSelection", onChangeSelection); this.renderer.off("afterRender", onAfterRender); this.renderer.off("beforeRender", onBeforeRender); }; }; this.$resetCursorStyle = function() { var style = this.$cursorStyle || "ace"; var cursorLayer = this.renderer.$cursorLayer; if (!cursorLayer) return; cursorLayer.setSmoothBlinking(/smooth/.test(style)); cursorLayer.isBlinking = !this.$readOnly && style != "wide"; dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style)); }; }).call(Editor.prototype); config.defineOptions(Editor.prototype, "editor", { selectionStyle: { set: function(style) { this.onSelectionChange(); this._signal("changeSelectionStyle", {data: style}); }, initialValue: "line" }, highlightActiveLine: { set: function() {this.$updateHighlightActiveLine();}, initialValue: true }, highlightSelectedWord: { set: function(shouldHighlight) {this.$onSelectionChange();}, initialValue: true }, readOnly: { set: function(readOnly) { this.$resetCursorStyle(); }, initialValue: false }, cursorStyle: { set: function(val) { this.$resetCursorStyle(); }, values: ["ace", "slim", "smooth", "wide"], initialValue: "ace" }, mergeUndoDeltas: { values: [false, true, "always"], initialValue: true }, behavioursEnabled: {initialValue: true}, wrapBehavioursEnabled: {initialValue: true}, autoScrollEditorIntoView: { set: function(val) {this.setAutoScrollEditorIntoView(val)} }, keyboardHandler: { set: function(val) { this.setKeyboardHandler(val); }, get: function() { return this.keybindingId; }, handlesSet: true }, hScrollBarAlwaysVisible: "renderer", vScrollBarAlwaysVisible: "renderer", highlightGutterLine: "renderer", animatedScroll: "renderer", showInvisibles: "renderer", showPrintMargin: "renderer", printMarginColumn: "renderer", printMargin: "renderer", fadeFoldWidgets: "renderer", showFoldWidgets: "renderer", showLineNumbers: "renderer", showGutter: "renderer", displayIndentGuides: "renderer", fontSize: "renderer", fontFamily: "renderer", maxLines: "renderer", minLines: "renderer", scrollPastEnd: "renderer", fixedWidthGutter: "renderer", theme: "renderer", scrollSpeed: "$mouseHandler", dragDelay: "$mouseHandler", dragEnabled: "$mouseHandler", focusTimout: "$mouseHandler", tooltipFollowsMouse: "$mouseHandler", firstLineNumber: "session", overwrite: "session", newLineMode: "session", useWorker: "session", useSoftTabs: "session", tabSize: "session", wrap: "session", indentedSoftWrap: "session", foldStyle: "session", mode: "session" }); exports.Editor = Editor; }); ace.define("ace/undomanager",["require","exports","module"], function(acequire, exports, module) { "use strict"; var UndoManager = function() { this.reset(); }; (function() { this.execute = function(options) { var deltaSets = options.args[0]; this.$doc = options.args[1]; if (options.merge && this.hasUndo()){ this.dirtyCounter--; deltaSets = this.$undoStack.pop().concat(deltaSets); } this.$undoStack.push(deltaSets); this.$redoStack = []; if (this.dirtyCounter < 0) { this.dirtyCounter = NaN; } this.dirtyCounter++; }; this.undo = function(dontSelect) { var deltaSets = this.$undoStack.pop(); var undoSelectionRange = null; if (deltaSets) { undoSelectionRange = this.$doc.undoChanges(deltaSets, dontSelect); this.$redoStack.push(deltaSets); this.dirtyCounter--; } return undoSelectionRange; }; this.redo = function(dontSelect) { var deltaSets = this.$redoStack.pop(); var redoSelectionRange = null; if (deltaSets) { redoSelectionRange = this.$doc.redoChanges(this.$deserializeDeltas(deltaSets), dontSelect); this.$undoStack.push(deltaSets); this.dirtyCounter++; } return redoSelectionRange; }; this.reset = function() { this.$undoStack = []; this.$redoStack = []; this.dirtyCounter = 0; }; this.hasUndo = function() { return this.$undoStack.length > 0; }; this.hasRedo = function() { return this.$redoStack.length > 0; }; this.markClean = function() { this.dirtyCounter = 0; }; this.isClean = function() { return this.dirtyCounter === 0; }; this.$serializeDeltas = function(deltaSets) { return cloneDeltaSetsObj(deltaSets, $serializeDelta); }; this.$deserializeDeltas = function(deltaSets) { return cloneDeltaSetsObj(deltaSets, $deserializeDelta); }; function $serializeDelta(delta){ return { action: delta.action, start: delta.start, end: delta.end, lines: delta.lines.length == 1 ? null : delta.lines, text: delta.lines.length == 1 ? delta.lines[0] : null }; } function $deserializeDelta(delta) { return { action: delta.action, start: delta.start, end: delta.end, lines: delta.lines || [delta.text] }; } function cloneDeltaSetsObj(deltaSets_old, fnGetModifiedDelta) { var deltaSets_new = new Array(deltaSets_old.length); for (var i = 0; i < deltaSets_old.length; i++) { var deltaSet_old = deltaSets_old[i]; var deltaSet_new = { group: deltaSet_old.group, deltas: new Array(deltaSet_old.length)}; for (var j = 0; j < deltaSet_old.deltas.length; j++) { var delta_old = deltaSet_old.deltas[j]; deltaSet_new.deltas[j] = fnGetModifiedDelta(delta_old); } deltaSets_new[i] = deltaSet_new; } return deltaSets_new; } }).call(UndoManager.prototype); exports.UndoManager = UndoManager; }); ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"], function(acequire, exports, module) { "use strict"; var dom = acequire("../lib/dom"); var oop = acequire("../lib/oop"); var lang = acequire("../lib/lang"); var EventEmitter = acequire("../lib/event_emitter").EventEmitter; var Gutter = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_gutter-layer"; parentEl.appendChild(this.element); this.setShowFoldWidgets(this.$showFoldWidgets); this.gutterWidth = 0; this.$annotations = []; this.$updateAnnotations = this.$updateAnnotations.bind(this); this.$cells = []; }; (function() { oop.implement(this, EventEmitter); this.setSession = function(session) { if (this.session) this.session.removeEventListener("change", this.$updateAnnotations); this.session = session; if (session) session.on("change", this.$updateAnnotations); }; this.addGutterDecoration = function(row, className){ if (window.console) console.warn && console.warn("deprecated use session.addGutterDecoration"); this.session.addGutterDecoration(row, className); }; this.removeGutterDecoration = function(row, className){ if (window.console) console.warn && console.warn("deprecated use session.removeGutterDecoration"); this.session.removeGutterDecoration(row, className); }; this.setAnnotations = function(annotations) { this.$annotations = []; for (var i = 0; i < annotations.length; i++) { var annotation = annotations[i]; var row = annotation.row; var rowInfo = this.$annotations[row]; if (!rowInfo) rowInfo = this.$annotations[row] = {text: []}; var annoText = annotation.text; annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || ""; if (rowInfo.text.indexOf(annoText) === -1) rowInfo.text.push(annoText); var type = annotation.type; if (type == "error") rowInfo.className = " ace_error"; else if (type == "warning" && rowInfo.className != " ace_error") rowInfo.className = " ace_warning"; else if (type == "info" && (!rowInfo.className)) rowInfo.className = " ace_info"; } }; this.$updateAnnotations = function (delta) { if (!this.$annotations.length) return; var firstRow = delta.start.row; var len = delta.end.row - firstRow; if (len === 0) { } else if (delta.action == 'remove') { this.$annotations.splice(firstRow, len + 1, null); } else { var args = new Array(len + 1); args.unshift(firstRow, 1); this.$annotations.splice.apply(this.$annotations, args); } }; this.update = function(config) { var session = this.session; var firstRow = config.firstRow; var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar session.getLength() - 1); var fold = session.getNextFoldLine(firstRow); var foldStart = fold ? fold.start.row : Infinity; var foldWidgets = this.$showFoldWidgets && session.foldWidgets; var breakpoints = session.$breakpoints; var decorations = session.$decorations; var firstLineNumber = session.$firstLineNumber; var lastLineNumber = 0; var gutterRenderer = session.gutterRenderer || this.$renderer; var cell = null; var index = -1; var row = firstRow; while (true) { if (row > foldStart) { row = fold.end.row + 1; fold = session.getNextFoldLine(row, fold); foldStart = fold ? fold.start.row : Infinity; } if (row > lastRow) { while (this.$cells.length > index + 1) { cell = this.$cells.pop(); this.element.removeChild(cell.element); } break; } cell = this.$cells[++index]; if (!cell) { cell = {element: null, textNode: null, foldWidget: null}; cell.element = dom.createElement("div"); cell.textNode = document.createTextNode(''); cell.element.appendChild(cell.textNode); this.element.appendChild(cell.element); this.$cells[index] = cell; } var className = "ace_gutter-cell "; if (breakpoints[row]) className += breakpoints[row]; if (decorations[row]) className += decorations[row]; if (this.$annotations[row]) className += this.$annotations[row].className; if (cell.element.className != className) cell.element.className = className; var height = session.getRowLength(row) * config.lineHeight + "px"; if (height != cell.element.style.height) cell.element.style.height = height; if (foldWidgets) { var c = foldWidgets[row]; if (c == null) c = foldWidgets[row] = session.getFoldWidget(row); } if (c) { if (!cell.foldWidget) { cell.foldWidget = dom.createElement("span"); cell.element.appendChild(cell.foldWidget); } var className = "ace_fold-widget ace_" + c; if (c == "start" && row == foldStart && row < fold.end.row) className += " ace_closed"; else className += " ace_open"; if (cell.foldWidget.className != className) cell.foldWidget.className = className; var height = config.lineHeight + "px"; if (cell.foldWidget.style.height != height) cell.foldWidget.style.height = height; } else { if (cell.foldWidget) { cell.element.removeChild(cell.foldWidget); cell.foldWidget = null; } } var text = lastLineNumber = gutterRenderer ? gutterRenderer.getText(session, row) : row + firstLineNumber; if (text != cell.textNode.data) cell.textNode.data = text; row++; } this.element.style.height = config.minHeight + "px"; if (this.$fixedWidth || session.$useWrapMode) lastLineNumber = session.getLength() + firstLineNumber; var gutterWidth = gutterRenderer ? gutterRenderer.getWidth(session, lastLineNumber, config) : lastLineNumber.toString().length * config.characterWidth; var padding = this.$padding || this.$computePadding(); gutterWidth += padding.left + padding.right; if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) { this.gutterWidth = gutterWidth; this.element.style.width = Math.ceil(this.gutterWidth) + "px"; this._emit("changeGutterWidth", gutterWidth); } }; this.$fixedWidth = false; this.$showLineNumbers = true; this.$renderer = ""; this.setShowLineNumbers = function(show) { this.$renderer = !show && { getWidth: function() {return ""}, getText: function() {return ""} }; }; this.getShowLineNumbers = function() { return this.$showLineNumbers; }; this.$showFoldWidgets = true; this.setShowFoldWidgets = function(show) { if (show) dom.addCssClass(this.element, "ace_folding-enabled"); else dom.removeCssClass(this.element, "ace_folding-enabled"); this.$showFoldWidgets = show; this.$padding = null; }; this.getShowFoldWidgets = function() { return this.$showFoldWidgets; }; this.$computePadding = function() { if (!this.element.firstChild) return {left: 0, right: 0}; var style = dom.computedStyle(this.element.firstChild); this.$padding = {}; this.$padding.left = parseInt(style.paddingLeft) + 1 || 0; this.$padding.right = parseInt(style.paddingRight) || 0; return this.$padding; }; this.getRegion = function(point) { var padding = this.$padding || this.$computePadding(); var rect = this.element.getBoundingClientRect(); if (point.x < padding.left + rect.left) return "markers"; if (this.$showFoldWidgets && point.x > rect.right - padding.right) return "foldWidgets"; }; }).call(Gutter.prototype); exports.Gutter = Gutter; }); ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"], function(acequire, exports, module) { "use strict"; var Range = acequire("../range").Range; var dom = acequire("../lib/dom"); var Marker = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_marker-layer"; parentEl.appendChild(this.element); }; (function() { this.$padding = 0; this.setPadding = function(padding) { this.$padding = padding; }; this.setSession = function(session) { this.session = session; }; this.setMarkers = function(markers) { this.markers = markers; }; this.update = function(config) { var config = config || this.config; if (!config) return; this.config = config; var html = []; for (var key in this.markers) { var marker = this.markers[key]; if (!marker.range) { marker.update(html, this, this.session, config); continue; } var range = marker.range.clipRows(config.firstRow, config.lastRow); if (range.isEmpty()) continue; range = range.toScreenRange(this.session); if (marker.renderer) { var top = this.$getTop(range.start.row, config); var left = this.$padding + range.start.column * config.characterWidth; marker.renderer(html, range, left, top, config); } else if (marker.type == "fullLine") { this.drawFullLineMarker(html, range, marker.clazz, config); } else if (marker.type == "screenLine") { this.drawScreenLineMarker(html, range, marker.clazz, config); } else if (range.isMultiLine()) { if (marker.type == "text") this.drawTextMarker(html, range, marker.clazz, config); else this.drawMultiLineMarker(html, range, marker.clazz, config); } else { this.drawSingleLineMarker(html, range, marker.clazz + " ace_start" + " ace_br15", config); } } this.element.innerHTML = html.join(""); }; this.$getTop = function(row, layerConfig) { return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight; }; function getBorderClass(tl, tr, br, bl) { return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0); } this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) { var session = this.session; var start = range.start.row; var end = range.end.row; var row = start; var prev = 0; var curr = 0; var next = session.getScreenLastRowColumn(row); var lineRange = new Range(row, range.start.column, row, curr); for (; row <= end; row++) { lineRange.start.row = lineRange.end.row = row; lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row); lineRange.end.column = next; prev = curr; curr = next; next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column; this.drawSingleLineMarker(stringBuilder, lineRange, clazz + (row == start ? " ace_start" : "") + " ace_br" + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end), layerConfig, row == end ? 0 : 1, extraStyle); } }; this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var padding = this.$padding; var height = config.lineHeight; var top = this.$getTop(range.start.row, config); var left = padding + range.start.column * config.characterWidth; extraStyle = extraStyle || ""; stringBuilder.push( "
" ); top = this.$getTop(range.end.row, config); var width = range.end.column * config.characterWidth; stringBuilder.push( "
" ); height = (range.end.row - range.start.row - 1) * config.lineHeight; if (height <= 0) return; top = this.$getTop(range.start.row + 1, config); var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8); stringBuilder.push( "
" ); }; this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) { var height = config.lineHeight; var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth; var top = this.$getTop(range.start.row, config); var left = this.$padding + range.start.column * config.characterWidth; stringBuilder.push( "
" ); }; this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var top = this.$getTop(range.start.row, config); var height = config.lineHeight; if (range.start.row != range.end.row) height += this.$getTop(range.end.row, config) - top; stringBuilder.push( "
" ); }; this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var top = this.$getTop(range.start.row, config); var height = config.lineHeight; stringBuilder.push( "
" ); }; }).call(Marker.prototype); exports.Marker = Marker; }); ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(acequire, exports, module) { "use strict"; var oop = acequire("../lib/oop"); var dom = acequire("../lib/dom"); var lang = acequire("../lib/lang"); var useragent = acequire("../lib/useragent"); var EventEmitter = acequire("../lib/event_emitter").EventEmitter; var Text = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_text-layer"; parentEl.appendChild(this.element); this.$updateEolChar = this.$updateEolChar.bind(this); }; (function() { oop.implement(this, EventEmitter); this.EOF_CHAR = "\xB6"; this.EOL_CHAR_LF = "\xAC"; this.EOL_CHAR_CRLF = "\xa4"; this.EOL_CHAR = this.EOL_CHAR_LF; this.TAB_CHAR = "\u2014"; //"\u21E5"; this.SPACE_CHAR = "\xB7"; this.$padding = 0; this.$updateEolChar = function() { var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n" ? this.EOL_CHAR_LF : this.EOL_CHAR_CRLF; if (this.EOL_CHAR != EOL_CHAR) { this.EOL_CHAR = EOL_CHAR; return true; } } this.setPadding = function(padding) { this.$padding = padding; this.element.style.padding = "0 " + padding + "px"; }; this.getLineHeight = function() { return this.$fontMetrics.$characterSize.height || 0; }; this.getCharacterWidth = function() { return this.$fontMetrics.$characterSize.width || 0; }; this.$setFontMetrics = function(measure) { this.$fontMetrics = measure; this.$fontMetrics.on("changeCharacterSize", function(e) { this._signal("changeCharacterSize", e); }.bind(this)); this.$pollSizeChanges(); } this.checkForSizeChanges = function() { this.$fontMetrics.checkForSizeChanges(); }; this.$pollSizeChanges = function() { return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges(); }; this.setSession = function(session) { this.session = session; if (session) this.$computeTabString(); }; this.showInvisibles = false; this.setShowInvisibles = function(showInvisibles) { if (this.showInvisibles == showInvisibles) return false; this.showInvisibles = showInvisibles; this.$computeTabString(); return true; }; this.displayIndentGuides = true; this.setDisplayIndentGuides = function(display) { if (this.displayIndentGuides == display) return false; this.displayIndentGuides = display; this.$computeTabString(); return true; }; this.$tabStrings = []; this.onChangeTabSize = this.$computeTabString = function() { var tabSize = this.session.getTabSize(); this.tabSize = tabSize; var tabStr = this.$tabStrings = [0]; for (var i = 1; i < tabSize + 1; i++) { if (this.showInvisibles) { tabStr.push("" + lang.stringRepeat(this.TAB_CHAR, i) + ""); } else { tabStr.push(lang.stringRepeat(" ", i)); } } if (this.displayIndentGuides) { this.$indentGuideRe = /\s\S| \t|\t |\s$/; var className = "ace_indent-guide"; var spaceClass = ""; var tabClass = ""; if (this.showInvisibles) { className += " ace_invisible"; spaceClass = " ace_invisible_space"; tabClass = " ace_invisible_tab"; var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize); var tabContent = lang.stringRepeat(this.TAB_CHAR, this.tabSize); } else{ var spaceContent = lang.stringRepeat(" ", this.tabSize); var tabContent = spaceContent; } this.$tabStrings[" "] = "" + spaceContent + ""; this.$tabStrings["\t"] = "" + tabContent + ""; } }; this.updateLines = function(config, firstRow, lastRow) { if (this.config.lastRow != config.lastRow || this.config.firstRow != config.firstRow) { this.scrollLines(config); } this.config = config; var first = Math.max(firstRow, config.firstRow); var last = Math.min(lastRow, config.lastRow); var lineElements = this.element.childNodes; var lineElementsIdx = 0; for (var row = config.firstRow; row < first; row++) { var foldLine = this.session.getFoldLine(row); if (foldLine) { if (foldLine.containsRow(first)) { first = foldLine.start.row; break; } else { row = foldLine.end.row; } } lineElementsIdx ++; } var row = first; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; while (true) { if (row > foldStart) { row = foldLine.end.row+1; foldLine = this.session.getNextFoldLine(row, foldLine); foldStart = foldLine ? foldLine.start.row :Infinity; } if (row > last) break; var lineElement = lineElements[lineElementsIdx++]; if (lineElement) { var html = []; this.$renderLine( html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false ); lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; lineElement.innerHTML = html.join(""); } row++; } }; this.scrollLines = function(config) { var oldConfig = this.config; this.config = config; if (!oldConfig || oldConfig.lastRow < config.firstRow) return this.update(config); if (config.lastRow < oldConfig.firstRow) return this.update(config); var el = this.element; if (oldConfig.firstRow < config.firstRow) for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--) el.removeChild(el.firstChild); if (oldConfig.lastRow > config.lastRow) for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--) el.removeChild(el.lastChild); if (config.firstRow < oldConfig.firstRow) { var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1); if (el.firstChild) el.insertBefore(fragment, el.firstChild); else el.appendChild(fragment); } if (config.lastRow > oldConfig.lastRow) { var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow); el.appendChild(fragment); } }; this.$renderLinesFragment = function(config, firstRow, lastRow) { var fragment = this.element.ownerDocument.createDocumentFragment(); var row = firstRow; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; while (true) { if (row > foldStart) { row = foldLine.end.row+1; foldLine = this.session.getNextFoldLine(row, foldLine); foldStart = foldLine ? foldLine.start.row : Infinity; } if (row > lastRow) break; var container = dom.createElement("div"); var html = []; this.$renderLine(html, row, false, row == foldStart ? foldLine : false); container.innerHTML = html.join(""); if (this.$useLineGroups()) { container.className = 'ace_line_group'; fragment.appendChild(container); container.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; } else { while(container.firstChild) fragment.appendChild(container.firstChild); } row++; } return fragment; }; this.update = function(config) { this.config = config; var html = []; var firstRow = config.firstRow, lastRow = config.lastRow; var row = firstRow; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; while (true) { if (row > foldStart) { row = foldLine.end.row+1; foldLine = this.session.getNextFoldLine(row, foldLine); foldStart = foldLine ? foldLine.start.row :Infinity; } if (row > lastRow) break; if (this.$useLineGroups()) html.push("
") this.$renderLine(html, row, false, row == foldStart ? foldLine : false); if (this.$useLineGroups()) html.push("
"); // end the line group row++; } this.element.innerHTML = html.join(""); }; this.$textToken = { "text": true, "rparen": true, "lparen": true }; this.$renderToken = function(stringBuilder, screenColumn, token, value) { var self = this; var replaceReg = /\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g; var replaceFunc = function(c, a, b, tabIdx, idx4) { if (a) { return self.showInvisibles ? "" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "" : c; } else if (c == "&") { return "&"; } else if (c == "<") { return "<"; } else if (c == ">") { return ">"; } else if (c == "\t") { var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx); screenColumn += tabSize - 1; return self.$tabStrings[tabSize]; } else if (c == "\u3000") { var classToUse = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk"; var space = self.showInvisibles ? self.SPACE_CHAR : ""; screenColumn += 1; return "" + space + ""; } else if (b) { return "" + self.SPACE_CHAR + ""; } else { screenColumn += 1; return "" + c + ""; } }; var output = value.replace(replaceReg, replaceFunc); if (!this.$textToken[token.type]) { var classes = "ace_" + token.type.replace(/\./g, " ace_"); var style = ""; if (token.type == "fold") style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' "; stringBuilder.push("", output, ""); } else { stringBuilder.push(output); } return screenColumn + value.length; }; this.renderIndentGuide = function(stringBuilder, value, max) { var cols = value.search(this.$indentGuideRe); if (cols <= 0 || cols >= max) return value; if (value[0] == " ") { cols -= cols % this.tabSize; stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "], cols/this.tabSize)); return value.substr(cols); } else if (value[0] == "\t") { stringBuilder.push(lang.stringRepeat(this.$tabStrings["\t"], cols)); return value.substr(cols); } return value; }; this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) { var chars = 0; var split = 0; var splitChars = splits[0]; var screenColumn = 0; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; var value = token.value; if (i == 0 && this.displayIndentGuides) { chars = value.length; value = this.renderIndentGuide(stringBuilder, value, splitChars); if (!value) continue; chars -= value.length; } if (chars + value.length < splitChars) { screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); chars += value.length; } else { while (chars + value.length >= splitChars) { screenColumn = this.$renderToken( stringBuilder, screenColumn, token, value.substring(0, splitChars - chars) ); value = value.substring(splitChars - chars); chars = splitChars; if (!onlyContents) { stringBuilder.push("
", "
" ); } stringBuilder.push(lang.stringRepeat("\xa0", splits.indent)); split ++; screenColumn = 0; splitChars = splits[split] || Number.MAX_VALUE; } if (value.length != 0) { chars += value.length; screenColumn = this.$renderToken( stringBuilder, screenColumn, token, value ); } } } }; this.$renderSimpleLine = function(stringBuilder, tokens) { var screenColumn = 0; var token = tokens[0]; var value = token.value; if (this.displayIndentGuides) value = this.renderIndentGuide(stringBuilder, value); if (value) screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); for (var i = 1; i < tokens.length; i++) { token = tokens[i]; value = token.value; screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); } }; this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) { if (!foldLine && foldLine != false) foldLine = this.session.getFoldLine(row); if (foldLine) var tokens = this.$getFoldLineTokens(row, foldLine); else var tokens = this.session.getTokens(row); if (!onlyContents) { stringBuilder.push( "
" ); } if (tokens.length) { var splits = this.session.getRowSplitData(row); if (splits && splits.length) this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents); else this.$renderSimpleLine(stringBuilder, tokens); } if (this.showInvisibles) { if (foldLine) row = foldLine.end.row stringBuilder.push( "", row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR, "" ); } if (!onlyContents) stringBuilder.push("
"); }; this.$getFoldLineTokens = function(row, foldLine) { var session = this.session; var renderTokens = []; function addTokens(tokens, from, to) { var idx = 0, col = 0; while ((col + tokens[idx].value.length) < from) { col += tokens[idx].value.length; idx++; if (idx == tokens.length) return; } if (col != from) { var value = tokens[idx].value.substring(from - col); if (value.length > (to - from)) value = value.substring(0, to - from); renderTokens.push({ type: tokens[idx].type, value: value }); col = from + value.length; idx += 1; } while (col < to && idx < tokens.length) { var value = tokens[idx].value; if (value.length + col > to) { renderTokens.push({ type: tokens[idx].type, value: value.substring(0, to - col) }); } else renderTokens.push(tokens[idx]); col += value.length; idx += 1; } } var tokens = session.getTokens(row); foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) { if (placeholder != null) { renderTokens.push({ type: "fold", value: placeholder }); } else { if (isNewRow) tokens = session.getTokens(row); if (tokens.length) addTokens(tokens, lastColumn, column); } }, foldLine.end.row, this.session.getLine(foldLine.end.row).length); return renderTokens; }; this.$useLineGroups = function() { return this.session.getUseWrapMode(); }; this.destroy = function() { clearInterval(this.$pollSizeChangesTimer); if (this.$measureNode) this.$measureNode.parentNode.removeChild(this.$measureNode); delete this.$measureNode; }; }).call(Text.prototype); exports.Text = Text; }); ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"], function(acequire, exports, module) { "use strict"; var dom = acequire("../lib/dom"); var isIE8; var Cursor = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_cursor-layer"; parentEl.appendChild(this.element); if (isIE8 === undefined) isIE8 = !("opacity" in this.element.style); this.isVisible = false; this.isBlinking = true; this.blinkInterval = 1000; this.smoothBlinking = false; this.cursors = []; this.cursor = this.addCursor(); dom.addCssClass(this.element, "ace_hidden-cursors"); this.$updateCursors = (isIE8 ? this.$updateVisibility : this.$updateOpacity).bind(this); }; (function() { this.$updateVisibility = function(val) { var cursors = this.cursors; for (var i = cursors.length; i--; ) cursors[i].style.visibility = val ? "" : "hidden"; }; this.$updateOpacity = function(val) { var cursors = this.cursors; for (var i = cursors.length; i--; ) cursors[i].style.opacity = val ? "" : "0"; }; this.$padding = 0; this.setPadding = function(padding) { this.$padding = padding; }; this.setSession = function(session) { this.session = session; }; this.setBlinking = function(blinking) { if (blinking != this.isBlinking){ this.isBlinking = blinking; this.restartTimer(); } }; this.setBlinkInterval = function(blinkInterval) { if (blinkInterval != this.blinkInterval){ this.blinkInterval = blinkInterval; this.restartTimer(); } }; this.setSmoothBlinking = function(smoothBlinking) { if (smoothBlinking != this.smoothBlinking && !isIE8) { this.smoothBlinking = smoothBlinking; dom.setCssClass(this.element, "ace_smooth-blinking", smoothBlinking); this.$updateCursors(true); this.$updateCursors = (this.$updateOpacity).bind(this); this.restartTimer(); } }; this.addCursor = function() { var el = dom.createElement("div"); el.className = "ace_cursor"; this.element.appendChild(el); this.cursors.push(el); return el; }; this.removeCursor = function() { if (this.cursors.length > 1) { var el = this.cursors.pop(); el.parentNode.removeChild(el); return el; } }; this.hideCursor = function() { this.isVisible = false; dom.addCssClass(this.element, "ace_hidden-cursors"); this.restartTimer(); }; this.showCursor = function() { this.isVisible = true; dom.removeCssClass(this.element, "ace_hidden-cursors"); this.restartTimer(); }; this.restartTimer = function() { var update = this.$updateCursors; clearInterval(this.intervalId); clearTimeout(this.timeoutId); if (this.smoothBlinking) { dom.removeCssClass(this.element, "ace_smooth-blinking"); } update(true); if (!this.isBlinking || !this.blinkInterval || !this.isVisible) return; if (this.smoothBlinking) { setTimeout(function(){ dom.addCssClass(this.element, "ace_smooth-blinking"); }.bind(this)); } var blink = function(){ this.timeoutId = setTimeout(function() { update(false); }, 0.6 * this.blinkInterval); }.bind(this); this.intervalId = setInterval(function() { update(true); blink(); }, this.blinkInterval); blink(); }; this.getPixelPosition = function(position, onScreen) { if (!this.config || !this.session) return {left : 0, top : 0}; if (!position) position = this.session.selection.getCursor(); var pos = this.session.documentToScreenPosition(position); var cursorLeft = this.$padding + pos.column * this.config.characterWidth; var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) * this.config.lineHeight; return {left : cursorLeft, top : cursorTop}; }; this.update = function(config) { this.config = config; var selections = this.session.$selectionMarkers; var i = 0, cursorIndex = 0; if (selections === undefined || selections.length === 0){ selections = [{cursor: null}]; } for (var i = 0, n = selections.length; i < n; i++) { var pixelPos = this.getPixelPosition(selections[i].cursor, true); if ((pixelPos.top > config.height + config.offset || pixelPos.top < 0) && i > 1) { continue; } var style = (this.cursors[cursorIndex++] || this.addCursor()).style; if (!this.drawCursor) { style.left = pixelPos.left + "px"; style.top = pixelPos.top + "px"; style.width = config.characterWidth + "px"; style.height = config.lineHeight + "px"; } else { this.drawCursor(style, pixelPos, config, selections[i], this.session); } } while (this.cursors.length > cursorIndex) this.removeCursor(); var overwrite = this.session.getOverwrite(); this.$setOverwrite(overwrite); this.$pixelPos = pixelPos; this.restartTimer(); }; this.drawCursor = null; this.$setOverwrite = function(overwrite) { if (overwrite != this.overwrite) { this.overwrite = overwrite; if (overwrite) dom.addCssClass(this.element, "ace_overwrite-cursors"); else dom.removeCssClass(this.element, "ace_overwrite-cursors"); } }; this.destroy = function() { clearInterval(this.intervalId); clearTimeout(this.timeoutId); }; }).call(Cursor.prototype); exports.Cursor = Cursor; }); ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"], function(acequire, exports, module) { "use strict"; var oop = acequire("./lib/oop"); var dom = acequire("./lib/dom"); var event = acequire("./lib/event"); var EventEmitter = acequire("./lib/event_emitter").EventEmitter; var MAX_SCROLL_H = 0x8000; var ScrollBar = function(parent) { this.element = dom.createElement("div"); this.element.className = "ace_scrollbar ace_scrollbar" + this.classSuffix; this.inner = dom.createElement("div"); this.inner.className = "ace_scrollbar-inner"; this.element.appendChild(this.inner); parent.appendChild(this.element); this.setVisible(false); this.skipEvent = false; event.addListener(this.element, "scroll", this.onScroll.bind(this)); event.addListener(this.element, "mousedown", event.preventDefault); }; (function() { oop.implement(this, EventEmitter); this.setVisible = function(isVisible) { this.element.style.display = isVisible ? "" : "none"; this.isVisible = isVisible; this.coeff = 1; }; }).call(ScrollBar.prototype); var VScrollBar = function(parent, renderer) { ScrollBar.call(this, parent); this.scrollTop = 0; this.scrollHeight = 0; renderer.$scrollbarWidth = this.width = dom.scrollbarWidth(parent.ownerDocument); this.inner.style.width = this.element.style.width = (this.width || 15) + 5 + "px"; }; oop.inherits(VScrollBar, ScrollBar); (function() { this.classSuffix = '-v'; this.onScroll = function() { if (!this.skipEvent) { this.scrollTop = this.element.scrollTop; if (this.coeff != 1) { var h = this.element.clientHeight / this.scrollHeight; this.scrollTop = this.scrollTop * (1 - h) / (this.coeff - h); } this._emit("scroll", {data: this.scrollTop}); } this.skipEvent = false; }; this.getWidth = function() { return this.isVisible ? this.width : 0; }; this.setHeight = function(height) { this.element.style.height = height + "px"; }; this.setInnerHeight = this.setScrollHeight = function(height) { this.scrollHeight = height; if (height > MAX_SCROLL_H) { this.coeff = MAX_SCROLL_H / height; height = MAX_SCROLL_H; } else if (this.coeff != 1) { this.coeff = 1 } this.inner.style.height = height + "px"; }; this.setScrollTop = function(scrollTop) { if (this.scrollTop != scrollTop) { this.skipEvent = true; this.scrollTop = scrollTop; this.element.scrollTop = scrollTop * this.coeff; } }; }).call(VScrollBar.prototype); var HScrollBar = function(parent, renderer) { ScrollBar.call(this, parent); this.scrollLeft = 0; this.height = renderer.$scrollbarWidth; this.inner.style.height = this.element.style.height = (this.height || 15) + 5 + "px"; }; oop.inherits(HScrollBar, ScrollBar); (function() { this.classSuffix = '-h'; this.onScroll = function() { if (!this.skipEvent) { this.scrollLeft = this.element.scrollLeft; this._emit("scroll", {data: this.scrollLeft}); } this.skipEvent = false; }; this.getHeight = function() { return this.isVisible ? this.height : 0; }; this.setWidth = function(width) { this.element.style.width = width + "px"; }; this.setInnerWidth = function(width) { this.inner.style.width = width + "px"; }; this.setScrollWidth = function(width) { this.inner.style.width = width + "px"; }; this.setScrollLeft = function(scrollLeft) { if (this.scrollLeft != scrollLeft) { this.skipEvent = true; this.scrollLeft = this.element.scrollLeft = scrollLeft; } }; }).call(HScrollBar.prototype); exports.ScrollBar = VScrollBar; // backward compatibility exports.ScrollBarV = VScrollBar; // backward compatibility exports.ScrollBarH = HScrollBar; // backward compatibility exports.VScrollBar = VScrollBar; exports.HScrollBar = HScrollBar; }); ace.define("ace/renderloop",["require","exports","module","ace/lib/event"], function(acequire, exports, module) { "use strict"; var event = acequire("./lib/event"); var RenderLoop = function(onRender, win) { this.onRender = onRender; this.pending = false; this.changes = 0; this.window = win || window; }; (function() { this.schedule = function(change) { this.changes = this.changes | change; if (!this.pending && this.changes) { this.pending = true; var _self = this; event.nextFrame(function() { _self.pending = false; var changes; while (changes = _self.changes) { _self.changes = 0; _self.onRender(changes); } }, this.window); } }; }).call(RenderLoop.prototype); exports.RenderLoop = RenderLoop; }); ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(acequire, exports, module) { var oop = acequire("../lib/oop"); var dom = acequire("../lib/dom"); var lang = acequire("../lib/lang"); var useragent = acequire("../lib/useragent"); var EventEmitter = acequire("../lib/event_emitter").EventEmitter; var CHAR_COUNT = 0; var FontMetrics = exports.FontMetrics = function(parentEl) { this.el = dom.createElement("div"); this.$setMeasureNodeStyles(this.el.style, true); this.$main = dom.createElement("div"); this.$setMeasureNodeStyles(this.$main.style); this.$measureNode = dom.createElement("div"); this.$setMeasureNodeStyles(this.$measureNode.style); this.el.appendChild(this.$main); this.el.appendChild(this.$measureNode); parentEl.appendChild(this.el); if (!CHAR_COUNT) this.$testFractionalRect(); this.$measureNode.innerHTML = lang.stringRepeat("X", CHAR_COUNT); this.$characterSize = {width: 0, height: 0}; this.checkForSizeChanges(); }; (function() { oop.implement(this, EventEmitter); this.$characterSize = {width: 0, height: 0}; this.$testFractionalRect = function() { var el = dom.createElement("div"); this.$setMeasureNodeStyles(el.style); el.style.width = "0.2px"; document.documentElement.appendChild(el); var w = el.getBoundingClientRect().width; if (w > 0 && w < 1) CHAR_COUNT = 50; else CHAR_COUNT = 100; el.parentNode.removeChild(el); }; this.$setMeasureNodeStyles = function(style, isRoot) { style.width = style.height = "auto"; style.left = style.top = "0px"; style.visibility = "hidden"; style.position = "absolute"; style.whiteSpace = "pre"; if (useragent.isIE < 8) { style["font-family"] = "inherit"; } else { style.font = "inherit"; } style.overflow = isRoot ? "hidden" : "visible"; }; this.checkForSizeChanges = function() { var size = this.$measureSizes(); if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) { this.$measureNode.style.fontWeight = "bold"; var boldSize = this.$measureSizes(); this.$measureNode.style.fontWeight = ""; this.$characterSize = size; this.charSizes = Object.create(null); this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height; this._emit("changeCharacterSize", {data: size}); } }; this.$pollSizeChanges = function() { if (this.$pollSizeChangesTimer) return this.$pollSizeChangesTimer; var self = this; return this.$pollSizeChangesTimer = setInterval(function() { self.checkForSizeChanges(); }, 500); }; this.setPolling = function(val) { if (val) { this.$pollSizeChanges(); } else if (this.$pollSizeChangesTimer) { clearInterval(this.$pollSizeChangesTimer); this.$pollSizeChangesTimer = 0; } }; this.$measureSizes = function() { if (CHAR_COUNT === 50) { var rect = null; try { rect = this.$measureNode.getBoundingClientRect(); } catch(e) { rect = {width: 0, height:0 }; } var size = { height: rect.height, width: rect.width / CHAR_COUNT }; } else { var size = { height: this.$measureNode.clientHeight, width: this.$measureNode.clientWidth / CHAR_COUNT }; } if (size.width === 0 || size.height === 0) return null; return size; }; this.$measureCharWidth = function(ch) { this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT); var rect = this.$main.getBoundingClientRect(); return rect.width / CHAR_COUNT; }; this.getCharacterWidth = function(ch) { var w = this.charSizes[ch]; if (w === undefined) { w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width; } return w; }; this.destroy = function() { clearInterval(this.$pollSizeChangesTimer); if (this.el && this.el.parentNode) this.el.parentNode.removeChild(this.el); }; }).call(FontMetrics.prototype); }); ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"], function(acequire, exports, module) { "use strict"; var oop = acequire("./lib/oop"); var dom = acequire("./lib/dom"); var config = acequire("./config"); var useragent = acequire("./lib/useragent"); var GutterLayer = acequire("./layer/gutter").Gutter; var MarkerLayer = acequire("./layer/marker").Marker; var TextLayer = acequire("./layer/text").Text; var CursorLayer = acequire("./layer/cursor").Cursor; var HScrollBar = acequire("./scrollbar").HScrollBar; var VScrollBar = acequire("./scrollbar").VScrollBar; var RenderLoop = acequire("./renderloop").RenderLoop; var FontMetrics = acequire("./layer/font_metrics").FontMetrics; var EventEmitter = acequire("./lib/event_emitter").EventEmitter; var editorCss = ".ace_editor {\ position: relative;\ overflow: hidden;\ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\ direction: ltr;\ text-align: left;\ }\ .ace_scroller {\ position: absolute;\ overflow: hidden;\ top: 0;\ bottom: 0;\ background-color: inherit;\ -ms-user-select: none;\ -moz-user-select: none;\ -webkit-user-select: none;\ user-select: none;\ cursor: text;\ }\ .ace_content {\ position: absolute;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ min-width: 100%;\ }\ .ace_dragging .ace_scroller:before{\ position: absolute;\ top: 0;\ left: 0;\ right: 0;\ bottom: 0;\ content: '';\ background: rgba(250, 250, 250, 0.01);\ z-index: 1000;\ }\ .ace_dragging.ace_dark .ace_scroller:before{\ background: rgba(0, 0, 0, 0.01);\ }\ .ace_selecting, .ace_selecting * {\ cursor: text !important;\ }\ .ace_gutter {\ position: absolute;\ overflow : hidden;\ width: auto;\ top: 0;\ bottom: 0;\ left: 0;\ cursor: default;\ z-index: 4;\ -ms-user-select: none;\ -moz-user-select: none;\ -webkit-user-select: none;\ user-select: none;\ }\ .ace_gutter-active-line {\ position: absolute;\ left: 0;\ right: 0;\ }\ .ace_scroller.ace_scroll-left {\ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\ }\ .ace_gutter-cell {\ padding-left: 19px;\ padding-right: 6px;\ background-repeat: no-repeat;\ }\ .ace_gutter-cell.ace_error {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\");\ background-repeat: no-repeat;\ background-position: 2px center;\ }\ .ace_gutter-cell.ace_warning {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\");\ background-position: 2px center;\ }\ .ace_gutter-cell.ace_info {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\");\ background-position: 2px center;\ }\ .ace_dark .ace_gutter-cell.ace_info {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\");\ }\ .ace_scrollbar {\ position: absolute;\ right: 0;\ bottom: 0;\ z-index: 6;\ }\ .ace_scrollbar-inner {\ position: absolute;\ cursor: text;\ left: 0;\ top: 0;\ }\ .ace_scrollbar-v{\ overflow-x: hidden;\ overflow-y: scroll;\ top: 0;\ }\ .ace_scrollbar-h {\ overflow-x: scroll;\ overflow-y: hidden;\ left: 0;\ }\ .ace_print-margin {\ position: absolute;\ height: 100%;\ }\ .ace_text-input {\ position: absolute;\ z-index: 0;\ width: 0.5em;\ height: 1em;\ opacity: 0;\ background: transparent;\ -moz-appearance: none;\ appearance: none;\ border: none;\ resize: none;\ outline: none;\ overflow: hidden;\ font: inherit;\ padding: 0 1px;\ margin: 0 -1px;\ text-indent: -1em;\ -ms-user-select: text;\ -moz-user-select: text;\ -webkit-user-select: text;\ user-select: text;\ white-space: pre!important;\ }\ .ace_text-input.ace_composition {\ background: inherit;\ color: inherit;\ z-index: 1000;\ opacity: 1;\ text-indent: 0;\ }\ .ace_layer {\ z-index: 1;\ position: absolute;\ overflow: hidden;\ word-wrap: normal;\ white-space: pre;\ height: 100%;\ width: 100%;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ pointer-events: none;\ }\ .ace_gutter-layer {\ position: relative;\ width: auto;\ text-align: right;\ pointer-events: auto;\ }\ .ace_text-layer {\ font: inherit !important;\ }\ .ace_cjk {\ display: inline-block;\ text-align: center;\ }\ .ace_cursor-layer {\ z-index: 4;\ }\ .ace_cursor {\ z-index: 4;\ position: absolute;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ border-left: 2px solid;\ transform: translatez(0);\ }\ .ace_slim-cursors .ace_cursor {\ border-left-width: 1px;\ }\ .ace_overwrite-cursors .ace_cursor {\ border-left-width: 0;\ border-bottom: 1px solid;\ }\ .ace_hidden-cursors .ace_cursor {\ opacity: 0.2;\ }\ .ace_smooth-blinking .ace_cursor {\ -webkit-transition: opacity 0.18s;\ transition: opacity 0.18s;\ }\ .ace_editor.ace_multiselect .ace_cursor {\ border-left-width: 1px;\ }\ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\ position: absolute;\ z-index: 3;\ }\ .ace_marker-layer .ace_selection {\ position: absolute;\ z-index: 5;\ }\ .ace_marker-layer .ace_bracket {\ position: absolute;\ z-index: 6;\ }\ .ace_marker-layer .ace_active-line {\ position: absolute;\ z-index: 2;\ }\ .ace_marker-layer .ace_selected-word {\ position: absolute;\ z-index: 4;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ }\ .ace_line .ace_fold {\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ display: inline-block;\ height: 11px;\ margin-top: -2px;\ vertical-align: middle;\ background-image:\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\");\ background-repeat: no-repeat, repeat-x;\ background-position: center center, top left;\ color: transparent;\ border: 1px solid black;\ border-radius: 2px;\ cursor: pointer;\ pointer-events: auto;\ }\ .ace_dark .ace_fold {\ }\ .ace_fold:hover{\ background-image:\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\");\ }\ .ace_tooltip {\ background-color: #FFF;\ background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\ background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\ border: 1px solid gray;\ border-radius: 1px;\ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\ color: black;\ max-width: 100%;\ padding: 3px 4px;\ position: fixed;\ z-index: 999999;\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ cursor: default;\ white-space: pre;\ word-wrap: break-word;\ line-height: normal;\ font-style: normal;\ font-weight: normal;\ letter-spacing: normal;\ pointer-events: none;\ }\ .ace_folding-enabled > .ace_gutter-cell {\ padding-right: 13px;\ }\ .ace_fold-widget {\ -moz-box-sizing: border-box;\ -webkit-box-sizing: border-box;\ box-sizing: border-box;\ margin: 0 -12px 0 1px;\ display: none;\ width: 11px;\ vertical-align: top;\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\");\ background-repeat: no-repeat;\ background-position: center;\ border-radius: 3px;\ border: 1px solid transparent;\ cursor: pointer;\ }\ .ace_folding-enabled .ace_fold-widget {\ display: inline-block; \ }\ .ace_fold-widget.ace_end {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\");\ }\ .ace_fold-widget.ace_closed {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\");\ }\ .ace_fold-widget:hover {\ border: 1px solid rgba(0, 0, 0, 0.3);\ background-color: rgba(255, 255, 255, 0.2);\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\ }\ .ace_fold-widget:active {\ border: 1px solid rgba(0, 0, 0, 0.4);\ background-color: rgba(0, 0, 0, 0.05);\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\ }\ .ace_dark .ace_fold-widget {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");\ }\ .ace_dark .ace_fold-widget.ace_end {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");\ }\ .ace_dark .ace_fold-widget.ace_closed {\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");\ }\ .ace_dark .ace_fold-widget:hover {\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ background-color: rgba(255, 255, 255, 0.1);\ }\ .ace_dark .ace_fold-widget:active {\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ }\ .ace_fold-widget.ace_invalid {\ background-color: #FFB4B4;\ border-color: #DE5555;\ }\ .ace_fade-fold-widgets .ace_fold-widget {\ -webkit-transition: opacity 0.4s ease 0.05s;\ transition: opacity 0.4s ease 0.05s;\ opacity: 0;\ }\ .ace_fade-fold-widgets:hover .ace_fold-widget {\ -webkit-transition: opacity 0.05s ease 0.05s;\ transition: opacity 0.05s ease 0.05s;\ opacity:1;\ }\ .ace_underline {\ text-decoration: underline;\ }\ .ace_bold {\ font-weight: bold;\ }\ .ace_nobold .ace_bold {\ font-weight: normal;\ }\ .ace_italic {\ font-style: italic;\ }\ .ace_error-marker {\ background-color: rgba(255, 0, 0,0.2);\ position: absolute;\ z-index: 9;\ }\ .ace_highlight-marker {\ background-color: rgba(255, 255, 0,0.2);\ position: absolute;\ z-index: 8;\ }\ .ace_br1 {border-top-left-radius : 3px;}\ .ace_br2 {border-top-right-radius : 3px;}\ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\ .ace_br4 {border-bottom-right-radius: 3px;}\ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\ .ace_br8 {border-bottom-left-radius : 3px;}\ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ "; dom.importCssString(editorCss, "ace_editor.css"); var VirtualRenderer = function(container, theme) { var _self = this; this.container = container || dom.createElement("div"); this.$keepTextAreaAtCursor = !useragent.isOldIE; dom.addCssClass(this.container, "ace_editor"); this.setTheme(theme); this.$gutter = dom.createElement("div"); this.$gutter.className = "ace_gutter"; this.container.appendChild(this.$gutter); this.scroller = dom.createElement("div"); this.scroller.className = "ace_scroller"; this.container.appendChild(this.scroller); this.content = dom.createElement("div"); this.content.className = "ace_content"; this.scroller.appendChild(this.content); this.$gutterLayer = new GutterLayer(this.$gutter); this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this)); this.$markerBack = new MarkerLayer(this.content); var textLayer = this.$textLayer = new TextLayer(this.content); this.canvas = textLayer.element; this.$markerFront = new MarkerLayer(this.content); this.$cursorLayer = new CursorLayer(this.content); this.$horizScroll = false; this.$vScroll = false; this.scrollBar = this.scrollBarV = new VScrollBar(this.container, this); this.scrollBarH = new HScrollBar(this.container, this); this.scrollBarV.addEventListener("scroll", function(e) { if (!_self.$scrollAnimation) _self.session.setScrollTop(e.data - _self.scrollMargin.top); }); this.scrollBarH.addEventListener("scroll", function(e) { if (!_self.$scrollAnimation) _self.session.setScrollLeft(e.data - _self.scrollMargin.left); }); this.scrollTop = 0; this.scrollLeft = 0; this.cursorPos = { row : 0, column : 0 }; this.$fontMetrics = new FontMetrics(this.container); this.$textLayer.$setFontMetrics(this.$fontMetrics); this.$textLayer.addEventListener("changeCharacterSize", function(e) { _self.updateCharacterSize(); _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height); _self._signal("changeCharacterSize", e); }); this.$size = { width: 0, height: 0, scrollerHeight: 0, scrollerWidth: 0, $dirty: true }; this.layerConfig = { width : 1, padding : 0, firstRow : 0, firstRowScreen: 0, lastRow : 0, lineHeight : 0, characterWidth : 0, minHeight : 1, maxHeight : 1, offset : 0, height : 1, gutterOffset: 1 }; this.scrollMargin = { left: 0, right: 0, top: 0, bottom: 0, v: 0, h: 0 }; this.$loop = new RenderLoop( this.$renderChanges.bind(this), this.container.ownerDocument.defaultView ); this.$loop.schedule(this.CHANGE_FULL); this.updateCharacterSize(); this.setPadding(4); config.resetOptions(this); config._emit("renderer", this); }; (function() { this.CHANGE_CURSOR = 1; this.CHANGE_MARKER = 2; this.CHANGE_GUTTER = 4; this.CHANGE_SCROLL = 8; this.CHANGE_LINES = 16; this.CHANGE_TEXT = 32; this.CHANGE_SIZE = 64; this.CHANGE_MARKER_BACK = 128; this.CHANGE_MARKER_FRONT = 256; this.CHANGE_FULL = 512; this.CHANGE_H_SCROLL = 1024; oop.implement(this, EventEmitter); this.updateCharacterSize = function() { if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) { this.$allowBoldFonts = this.$textLayer.allowBoldFonts; this.setStyle("ace_nobold", !this.$allowBoldFonts); } this.layerConfig.characterWidth = this.characterWidth = this.$textLayer.getCharacterWidth(); this.layerConfig.lineHeight = this.lineHeight = this.$textLayer.getLineHeight(); this.$updatePrintMargin(); }; this.setSession = function(session) { if (this.session) this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode); this.session = session; if (session && this.scrollMargin.top && session.getScrollTop() <= 0) session.setScrollTop(-this.scrollMargin.top); this.$cursorLayer.setSession(session); this.$markerBack.setSession(session); this.$markerFront.setSession(session); this.$gutterLayer.setSession(session); this.$textLayer.setSession(session); if (!session) return; this.$loop.schedule(this.CHANGE_FULL); this.session.$setFontMetrics(this.$fontMetrics); this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null; this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this); this.onChangeNewLineMode() this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode); }; this.updateLines = function(firstRow, lastRow, force) { if (lastRow === undefined) lastRow = Infinity; if (!this.$changedLines) { this.$changedLines = { firstRow: firstRow, lastRow: lastRow }; } else { if (this.$changedLines.firstRow > firstRow) this.$changedLines.firstRow = firstRow; if (this.$changedLines.lastRow < lastRow) this.$changedLines.lastRow = lastRow; } if (this.$changedLines.lastRow < this.layerConfig.firstRow) { if (force) this.$changedLines.lastRow = this.layerConfig.lastRow; else return; } if (this.$changedLines.firstRow > this.layerConfig.lastRow) return; this.$loop.schedule(this.CHANGE_LINES); }; this.onChangeNewLineMode = function() { this.$loop.schedule(this.CHANGE_TEXT); this.$textLayer.$updateEolChar(); }; this.onChangeTabSize = function() { this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER); this.$textLayer.onChangeTabSize(); }; this.updateText = function() { this.$loop.schedule(this.CHANGE_TEXT); }; this.updateFull = function(force) { if (force) this.$renderChanges(this.CHANGE_FULL, true); else this.$loop.schedule(this.CHANGE_FULL); }; this.updateFontSize = function() { this.$textLayer.checkForSizeChanges(); }; this.$changes = 0; this.$updateSizeAsync = function() { if (this.$loop.pending) this.$size.$dirty = true; else this.onResize(); }; this.onResize = function(force, gutterWidth, width, height) { if (this.resizing > 2) return; else if (this.resizing > 0) this.resizing++; else this.resizing = force ? 1 : 0; var el = this.container; if (!height) height = el.clientHeight || el.scrollHeight; if (!width) width = el.clientWidth || el.scrollWidth; var changes = this.$updateCachedSize(force, gutterWidth, width, height); if (!this.$size.scrollerHeight || (!width && !height)) return this.resizing = 0; if (force) this.$gutterLayer.$padding = null; if (force) this.$renderChanges(changes | this.$changes, true); else this.$loop.schedule(changes | this.$changes); if (this.resizing) this.resizing = 0; this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null; }; this.$updateCachedSize = function(force, gutterWidth, width, height) { height -= (this.$extraHeight || 0); var changes = 0; var size = this.$size; var oldSize = { width: size.width, height: size.height, scrollerHeight: size.scrollerHeight, scrollerWidth: size.scrollerWidth }; if (height && (force || size.height != height)) { size.height = height; changes |= this.CHANGE_SIZE; size.scrollerHeight = size.height; if (this.$horizScroll) size.scrollerHeight -= this.scrollBarH.getHeight(); this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px"; changes = changes | this.CHANGE_SCROLL; } if (width && (force || size.width != width)) { changes |= this.CHANGE_SIZE; size.width = width; if (gutterWidth == null) gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; this.gutterWidth = gutterWidth; this.scrollBarH.element.style.left = this.scroller.style.left = gutterWidth + "px"; size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth()); this.scrollBarH.element.style.right = this.scroller.style.right = this.scrollBarV.getWidth() + "px"; this.scroller.style.bottom = this.scrollBarH.getHeight() + "px"; if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force) changes |= this.CHANGE_FULL; } size.$dirty = !width || !height; if (changes) this._signal("resize", oldSize); return changes; }; this.onGutterResize = function() { var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; if (gutterWidth != this.gutterWidth) this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height); if (this.session.getUseWrapMode() && this.adjustWrapLimit()) { this.$loop.schedule(this.CHANGE_FULL); } else if (this.$size.$dirty) { this.$loop.schedule(this.CHANGE_FULL); } else { this.$computeLayerConfig(); this.$loop.schedule(this.CHANGE_MARKER); } }; this.adjustWrapLimit = function() { var availableWidth = this.$size.scrollerWidth - this.$padding * 2; var limit = Math.floor(availableWidth / this.characterWidth); return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn); }; this.setAnimatedScroll = function(shouldAnimate){ this.setOption("animatedScroll", shouldAnimate); }; this.getAnimatedScroll = function() { return this.$animatedScroll; }; this.setShowInvisibles = function(showInvisibles) { this.setOption("showInvisibles", showInvisibles); }; this.getShowInvisibles = function() { return this.getOption("showInvisibles"); }; this.getDisplayIndentGuides = function() { return this.getOption("displayIndentGuides"); }; this.setDisplayIndentGuides = function(display) { this.setOption("displayIndentGuides", display); }; this.setShowPrintMargin = function(showPrintMargin) { this.setOption("showPrintMargin", showPrintMargin); }; this.getShowPrintMargin = function() { return this.getOption("showPrintMargin"); }; this.setPrintMarginColumn = function(showPrintMargin) { this.setOption("printMarginColumn", showPrintMargin); }; this.getPrintMarginColumn = function() { return this.getOption("printMarginColumn"); }; this.getShowGutter = function(){ return this.getOption("showGutter"); }; this.setShowGutter = function(show){ return this.setOption("showGutter", show); }; this.getFadeFoldWidgets = function(){ return this.getOption("fadeFoldWidgets") }; this.setFadeFoldWidgets = function(show) { this.setOption("fadeFoldWidgets", show); }; this.setHighlightGutterLine = function(shouldHighlight) { this.setOption("highlightGutterLine", shouldHighlight); }; this.getHighlightGutterLine = function() { return this.getOption("highlightGutterLine"); }; this.$updateGutterLineHighlight = function() { var pos = this.$cursorLayer.$pixelPos; var height = this.layerConfig.lineHeight; if (this.session.getUseWrapMode()) { var cursor = this.session.selection.getCursor(); cursor.column = 0; pos = this.$cursorLayer.getPixelPosition(cursor, true); height *= this.session.getRowLength(cursor.row); } this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + "px"; this.$gutterLineHighlight.style.height = height + "px"; }; this.$updatePrintMargin = function() { if (!this.$showPrintMargin && !this.$printMarginEl) return; if (!this.$printMarginEl) { var containerEl = dom.createElement("div"); containerEl.className = "ace_layer ace_print-margin-layer"; this.$printMarginEl = dom.createElement("div"); this.$printMarginEl.className = "ace_print-margin"; containerEl.appendChild(this.$printMarginEl); this.content.insertBefore(containerEl, this.content.firstChild); } var style = this.$printMarginEl.style; style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px"; style.visibility = this.$showPrintMargin ? "visible" : "hidden"; if (this.session && this.session.$wrap == -1) this.adjustWrapLimit(); }; this.getContainerElement = function() { return this.container; }; this.getMouseEventTarget = function() { return this.scroller; }; this.getTextAreaContainer = function() { return this.container; }; this.$moveTextAreaToCursor = function() { if (!this.$keepTextAreaAtCursor) return; var config = this.layerConfig; var posTop = this.$cursorLayer.$pixelPos.top; var posLeft = this.$cursorLayer.$pixelPos.left; posTop -= config.offset; var style = this.textarea.style; var h = this.lineHeight; if (posTop < 0 || posTop > config.height - h) { style.top = style.left = "0"; return; } var w = this.characterWidth; if (this.$composition) { var val = this.textarea.value.replace(/^\x01+/, ""); w *= (this.session.$getStringScreenWidth(val)[0]+2); h += 2; } posLeft -= this.scrollLeft; if (posLeft > this.$size.scrollerWidth - w) posLeft = this.$size.scrollerWidth - w; posLeft += this.gutterWidth; style.height = h + "px"; style.width = w + "px"; style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + "px"; style.top = Math.min(posTop, this.$size.height - h) + "px"; }; this.getFirstVisibleRow = function() { return this.layerConfig.firstRow; }; this.getFirstFullyVisibleRow = function() { return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1); }; this.getLastFullyVisibleRow = function() { var config = this.layerConfig; var lastRow = config.lastRow var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight; if (top - this.session.getScrollTop() > config.height - config.lineHeight) return lastRow - 1; return lastRow; }; this.getLastVisibleRow = function() { return this.layerConfig.lastRow; }; this.$padding = null; this.setPadding = function(padding) { this.$padding = padding; this.$textLayer.setPadding(padding); this.$cursorLayer.setPadding(padding); this.$markerFront.setPadding(padding); this.$markerBack.setPadding(padding); this.$loop.schedule(this.CHANGE_FULL); this.$updatePrintMargin(); }; this.setScrollMargin = function(top, bottom, left, right) { var sm = this.scrollMargin; sm.top = top|0; sm.bottom = bottom|0; sm.right = right|0; sm.left = left|0; sm.v = sm.top + sm.bottom; sm.h = sm.left + sm.right; if (sm.top && this.scrollTop <= 0 && this.session) this.session.setScrollTop(-sm.top); this.updateFull(); }; this.getHScrollBarAlwaysVisible = function() { return this.$hScrollBarAlwaysVisible; }; this.setHScrollBarAlwaysVisible = function(alwaysVisible) { this.setOption("hScrollBarAlwaysVisible", alwaysVisible); }; this.getVScrollBarAlwaysVisible = function() { return this.$vScrollBarAlwaysVisible; }; this.setVScrollBarAlwaysVisible = function(alwaysVisible) { this.setOption("vScrollBarAlwaysVisible", alwaysVisible); }; this.$updateScrollBarV = function() { var scrollHeight = this.layerConfig.maxHeight; var scrollerHeight = this.$size.scrollerHeight; if (!this.$maxLines && this.$scrollPastEnd) { scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd; if (this.scrollTop > scrollHeight - scrollerHeight) { scrollHeight = this.scrollTop + scrollerHeight; this.scrollBarV.scrollTop = null; } } this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v); this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top); }; this.$updateScrollBarH = function() { this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h); this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left); }; this.$frozen = false; this.freeze = function() { this.$frozen = true; }; this.unfreeze = function() { this.$frozen = false; }; this.$renderChanges = function(changes, force) { if (this.$changes) { changes |= this.$changes; this.$changes = 0; } if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) { this.$changes |= changes; return; } if (this.$size.$dirty) { this.$changes |= changes; return this.onResize(true); } if (!this.lineHeight) { this.$textLayer.checkForSizeChanges(); } this._signal("beforeRender"); var config = this.layerConfig; if (changes & this.CHANGE_FULL || changes & this.CHANGE_SIZE || changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES || changes & this.CHANGE_SCROLL || changes & this.CHANGE_H_SCROLL ) { changes |= this.$computeLayerConfig(); if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) { var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight; if (st > 0) { this.scrollTop = st; changes = changes | this.CHANGE_SCROLL; changes |= this.$computeLayerConfig(); } } config = this.layerConfig; this.$updateScrollBarV(); if (changes & this.CHANGE_H_SCROLL) this.$updateScrollBarH(); this.$gutterLayer.element.style.marginTop = (-config.offset) + "px"; this.content.style.marginTop = (-config.offset) + "px"; this.content.style.width = config.width + 2 * this.$padding + "px"; this.content.style.height = config.minHeight + "px"; } if (changes & this.CHANGE_H_SCROLL) { this.content.style.marginLeft = -this.scrollLeft + "px"; this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left"; } if (changes & this.CHANGE_FULL) { this.$textLayer.update(config); if (this.$showGutter) this.$gutterLayer.update(config); this.$markerBack.update(config); this.$markerFront.update(config); this.$cursorLayer.update(config); this.$moveTextAreaToCursor(); this.$highlightGutterLine && this.$updateGutterLineHighlight(); this._signal("afterRender"); return; } if (changes & this.CHANGE_SCROLL) { if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES) this.$textLayer.update(config); else this.$textLayer.scrollLines(config); if (this.$showGutter) this.$gutterLayer.update(config); this.$markerBack.update(config); this.$markerFront.update(config); this.$cursorLayer.update(config); this.$highlightGutterLine && this.$updateGutterLineHighlight(); this.$moveTextAreaToCursor(); this._signal("afterRender"); return; } if (changes & this.CHANGE_TEXT) { this.$textLayer.update(config); if (this.$showGutter) this.$gutterLayer.update(config); } else if (changes & this.CHANGE_LINES) { if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter) this.$gutterLayer.update(config); } else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) { if (this.$showGutter) this.$gutterLayer.update(config); } if (changes & this.CHANGE_CURSOR) { this.$cursorLayer.update(config); this.$moveTextAreaToCursor(); this.$highlightGutterLine && this.$updateGutterLineHighlight(); } if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) { this.$markerFront.update(config); } if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) { this.$markerBack.update(config); } this._signal("afterRender"); }; this.$autosize = function() { var height = this.session.getScreenLength() * this.lineHeight; var maxHeight = this.$maxLines * this.lineHeight; var desiredHeight = Math.min(maxHeight, Math.max((this.$minLines || 1) * this.lineHeight, height) ) + this.scrollMargin.v + (this.$extraHeight || 0); if (this.$horizScroll) desiredHeight += this.scrollBarH.getHeight(); if (this.$maxPixelHeight && desiredHeight > this.$maxPixelHeight) desiredHeight = this.$maxPixelHeight; var vScroll = height > maxHeight; if (desiredHeight != this.desiredHeight || this.$size.height != this.desiredHeight || vScroll != this.$vScroll) { if (vScroll != this.$vScroll) { this.$vScroll = vScroll; this.scrollBarV.setVisible(vScroll); } var w = this.container.clientWidth; this.container.style.height = desiredHeight + "px"; this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight); this.desiredHeight = desiredHeight; this._signal("autosize"); } }; this.$computeLayerConfig = function() { var session = this.session; var size = this.$size; var hideScrollbars = size.height <= 2 * this.lineHeight; var screenLines = this.session.getScreenLength(); var maxHeight = screenLines * this.lineHeight; var longestLine = this.$getLongestLine(); var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible || size.scrollerWidth - longestLine - 2 * this.$padding < 0); var hScrollChanged = this.$horizScroll !== horizScroll; if (hScrollChanged) { this.$horizScroll = horizScroll; this.scrollBarH.setVisible(horizScroll); } var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine if (this.$maxLines && this.lineHeight > 1) this.$autosize(); var offset = this.scrollTop % this.lineHeight; var minHeight = size.scrollerHeight + this.lineHeight; var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd : 0; maxHeight += scrollPastEnd; var sm = this.scrollMargin; this.session.setScrollTop(Math.max(-sm.top, Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom))); this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, longestLine + 2 * this.$padding - size.scrollerWidth + sm.right))); var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible || size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top); var vScrollChanged = vScrollBefore !== vScroll; if (vScrollChanged) { this.$vScroll = vScroll; this.scrollBarV.setVisible(vScroll); } var lineCount = Math.ceil(minHeight / this.lineHeight) - 1; var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight)); var lastRow = firstRow + lineCount; var firstRowScreen, firstRowHeight; var lineHeight = this.lineHeight; firstRow = session.screenToDocumentRow(firstRow, 0); var foldLine = session.getFoldLine(firstRow); if (foldLine) { firstRow = foldLine.start.row; } firstRowScreen = session.documentToScreenRow(firstRow, 0); firstRowHeight = session.getRowLength(firstRow) * lineHeight; lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1); minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight + firstRowHeight; offset = this.scrollTop - firstRowScreen * lineHeight; var changes = 0; if (this.layerConfig.width != longestLine) changes = this.CHANGE_H_SCROLL; if (hScrollChanged || vScrollChanged) { changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height); this._signal("scrollbarVisibilityChanged"); if (vScrollChanged) longestLine = this.$getLongestLine(); } this.layerConfig = { width : longestLine, padding : this.$padding, firstRow : firstRow, firstRowScreen: firstRowScreen, lastRow : lastRow, lineHeight : lineHeight, characterWidth : this.characterWidth, minHeight : minHeight, maxHeight : maxHeight, offset : offset, gutterOffset : lineHeight ? Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)) : 0, height : this.$size.scrollerHeight }; return changes; }; this.$updateLines = function() { var firstRow = this.$changedLines.firstRow; var lastRow = this.$changedLines.lastRow; this.$changedLines = null; var layerConfig = this.layerConfig; if (firstRow > layerConfig.lastRow + 1) { return; } if (lastRow < layerConfig.firstRow) { return; } if (lastRow === Infinity) { if (this.$showGutter) this.$gutterLayer.update(layerConfig); this.$textLayer.update(layerConfig); return; } this.$textLayer.updateLines(layerConfig, firstRow, lastRow); return true; }; this.$getLongestLine = function() { var charCount = this.session.getScreenWidth(); if (this.showInvisibles && !this.session.$useWrapMode) charCount += 1; return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth)); }; this.updateFrontMarkers = function() { this.$markerFront.setMarkers(this.session.getMarkers(true)); this.$loop.schedule(this.CHANGE_MARKER_FRONT); }; this.updateBackMarkers = function() { this.$markerBack.setMarkers(this.session.getMarkers()); this.$loop.schedule(this.CHANGE_MARKER_BACK); }; this.addGutterDecoration = function(row, className){ this.$gutterLayer.addGutterDecoration(row, className); }; this.removeGutterDecoration = function(row, className){ this.$gutterLayer.removeGutterDecoration(row, className); }; this.updateBreakpoints = function(rows) { this.$loop.schedule(this.CHANGE_GUTTER); }; this.setAnnotations = function(annotations) { this.$gutterLayer.setAnnotations(annotations); this.$loop.schedule(this.CHANGE_GUTTER); }; this.updateCursor = function() { this.$loop.schedule(this.CHANGE_CURSOR); }; this.hideCursor = function() { this.$cursorLayer.hideCursor(); }; this.showCursor = function() { this.$cursorLayer.showCursor(); }; this.scrollSelectionIntoView = function(anchor, lead, offset) { this.scrollCursorIntoView(anchor, offset); this.scrollCursorIntoView(lead, offset); }; this.scrollCursorIntoView = function(cursor, offset, $viewMargin) { if (this.$size.scrollerHeight === 0) return; var pos = this.$cursorLayer.getPixelPosition(cursor); var left = pos.left; var top = pos.top; var topMargin = $viewMargin && $viewMargin.top || 0; var bottomMargin = $viewMargin && $viewMargin.bottom || 0; var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop; if (scrollTop + topMargin > top) { if (offset && scrollTop + topMargin > top + this.lineHeight) top -= offset * this.$size.scrollerHeight; if (top === 0) top = -this.scrollMargin.top; this.session.setScrollTop(top); } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) { if (offset && scrollTop + this.$size.scrollerHeight - bottomMargin < top - this.lineHeight) top += offset * this.$size.scrollerHeight; this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight); } var scrollLeft = this.scrollLeft; if (scrollLeft > left) { if (left < this.$padding + 2 * this.layerConfig.characterWidth) left = -this.scrollMargin.left; this.session.setScrollLeft(left); } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) { this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth)); } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) { this.session.setScrollLeft(0); } }; this.getScrollTop = function() { return this.session.getScrollTop(); }; this.getScrollLeft = function() { return this.session.getScrollLeft(); }; this.getScrollTopRow = function() { return this.scrollTop / this.lineHeight; }; this.getScrollBottomRow = function() { return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1); }; this.scrollToRow = function(row) { this.session.setScrollTop(row * this.lineHeight); }; this.alignCursor = function(cursor, alignment) { if (typeof cursor == "number") cursor = {row: cursor, column: 0}; var pos = this.$cursorLayer.getPixelPosition(cursor); var h = this.$size.scrollerHeight - this.lineHeight; var offset = pos.top - h * (alignment || 0); this.session.setScrollTop(offset); return offset; }; this.STEPS = 8; this.$calcSteps = function(fromValue, toValue){ var i = 0; var l = this.STEPS; var steps = []; var func = function(t, x_min, dx) { return dx * (Math.pow(t - 1, 3) + 1) + x_min; }; for (i = 0; i < l; ++i) steps.push(func(i / this.STEPS, fromValue, toValue - fromValue)); return steps; }; this.scrollToLine = function(line, center, animate, callback) { var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0}); var offset = pos.top; if (center) offset -= this.$size.scrollerHeight / 2; var initialScroll = this.scrollTop; this.session.setScrollTop(offset); if (animate !== false) this.animateScrolling(initialScroll, callback); }; this.animateScrolling = function(fromValue, callback) { var toValue = this.scrollTop; if (!this.$animatedScroll) return; var _self = this; if (fromValue == toValue) return; if (this.$scrollAnimation) { var oldSteps = this.$scrollAnimation.steps; if (oldSteps.length) { fromValue = oldSteps[0]; if (fromValue == toValue) return; } } var steps = _self.$calcSteps(fromValue, toValue); this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps}; clearInterval(this.$timer); _self.session.setScrollTop(steps.shift()); _self.session.$scrollTop = toValue; this.$timer = setInterval(function() { if (steps.length) { _self.session.setScrollTop(steps.shift()); _self.session.$scrollTop = toValue; } else if (toValue != null) { _self.session.$scrollTop = -1; _self.session.setScrollTop(toValue); toValue = null; } else { _self.$timer = clearInterval(_self.$timer); _self.$scrollAnimation = null; callback && callback(); } }, 10); }; this.scrollToY = function(scrollTop) { if (this.scrollTop !== scrollTop) { this.$loop.schedule(this.CHANGE_SCROLL); this.scrollTop = scrollTop; } }; this.scrollToX = function(scrollLeft) { if (this.scrollLeft !== scrollLeft) this.scrollLeft = scrollLeft; this.$loop.schedule(this.CHANGE_H_SCROLL); }; this.scrollTo = function(x, y) { this.session.setScrollTop(y); this.session.setScrollLeft(y); }; this.scrollBy = function(deltaX, deltaY) { deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY); deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX); }; this.isScrollableBy = function(deltaX, deltaY) { if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top) return true; if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom) return true; if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left) return true; if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth - this.layerConfig.width < -1 + this.scrollMargin.right) return true; }; this.pixelToScreenCoordinates = function(x, y) { var canvasPos = this.scroller.getBoundingClientRect(); var offset = (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth; var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight); var col = Math.round(offset); return {row: row, column: col, side: offset - col > 0 ? 1 : -1}; }; this.screenToTextCoordinates = function(x, y) { var canvasPos = this.scroller.getBoundingClientRect(); var col = Math.round( (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth ); var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight; return this.session.screenToDocumentPosition(row, Math.max(col, 0)); }; this.textToScreenCoordinates = function(row, column) { var canvasPos = this.scroller.getBoundingClientRect(); var pos = this.session.documentToScreenPosition(row, column); var x = this.$padding + Math.round(pos.column * this.characterWidth); var y = pos.row * this.lineHeight; return { pageX: canvasPos.left + x - this.scrollLeft, pageY: canvasPos.top + y - this.scrollTop }; }; this.visualizeFocus = function() { dom.addCssClass(this.container, "ace_focus"); }; this.visualizeBlur = function() { dom.removeCssClass(this.container, "ace_focus"); }; this.showComposition = function(position) { if (!this.$composition) this.$composition = { keepTextAreaAtCursor: this.$keepTextAreaAtCursor, cssText: this.textarea.style.cssText }; this.$keepTextAreaAtCursor = true; dom.addCssClass(this.textarea, "ace_composition"); this.textarea.style.cssText = ""; this.$moveTextAreaToCursor(); }; this.setCompositionText = function(text) { this.$moveTextAreaToCursor(); }; this.hideComposition = function() { if (!this.$composition) return; dom.removeCssClass(this.textarea, "ace_composition"); this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor; this.textarea.style.cssText = this.$composition.cssText; this.$composition = null; }; this.setTheme = function(theme, cb) { var _self = this; this.$themeId = theme; _self._dispatchEvent('themeChange',{theme:theme}); if (!theme || typeof theme == "string") { var moduleName = theme || this.$options.theme.initialValue; config.loadModule(["theme", moduleName], afterLoad); } else { afterLoad(theme); } function afterLoad(module) { if (_self.$themeId != theme) return cb && cb(); if (!module || !module.cssClass) throw new Error("couldn't load module " + theme + " or it didn't call define"); dom.importCssString( module.cssText, module.cssClass, _self.container.ownerDocument ); if (_self.theme) dom.removeCssClass(_self.container, _self.theme.cssClass); var padding = "padding" in module ? module.padding : "padding" in (_self.theme || {}) ? 4 : _self.$padding; if (_self.$padding && padding != _self.$padding) _self.setPadding(padding); _self.$theme = module.cssClass; _self.theme = module; dom.addCssClass(_self.container, module.cssClass); dom.setCssClass(_self.container, "ace_dark", module.isDark); if (_self.$size) { _self.$size.width = 0; _self.$updateSizeAsync(); } _self._dispatchEvent('themeLoaded', {theme:module}); cb && cb(); } }; this.getTheme = function() { return this.$themeId; }; this.setStyle = function(style, include) { dom.setCssClass(this.container, style, include !== false); }; this.unsetStyle = function(style) { dom.removeCssClass(this.container, style); }; this.setCursorStyle = function(style) { if (this.scroller.style.cursor != style) this.scroller.style.cursor = style; }; this.setMouseCursor = function(cursorStyle) { this.scroller.style.cursor = cursorStyle; }; this.destroy = function() { this.$textLayer.destroy(); this.$cursorLayer.destroy(); }; }).call(VirtualRenderer.prototype); config.defineOptions(VirtualRenderer.prototype, "renderer", { animatedScroll: {initialValue: false}, showInvisibles: { set: function(value) { if (this.$textLayer.setShowInvisibles(value)) this.$loop.schedule(this.CHANGE_TEXT); }, initialValue: false }, showPrintMargin: { set: function() { this.$updatePrintMargin(); }, initialValue: true }, printMarginColumn: { set: function() { this.$updatePrintMargin(); }, initialValue: 80 }, printMargin: { set: function(val) { if (typeof val == "number") this.$printMarginColumn = val; this.$showPrintMargin = !!val; this.$updatePrintMargin(); }, get: function() { return this.$showPrintMargin && this.$printMarginColumn; } }, showGutter: { set: function(show){ this.$gutter.style.display = show ? "block" : "none"; this.$loop.schedule(this.CHANGE_FULL); this.onGutterResize(); }, initialValue: true }, fadeFoldWidgets: { set: function(show) { dom.setCssClass(this.$gutter, "ace_fade-fold-widgets", show); }, initialValue: false }, showFoldWidgets: { set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)}, initialValue: true }, showLineNumbers: { set: function(show) { this.$gutterLayer.setShowLineNumbers(show); this.$loop.schedule(this.CHANGE_GUTTER); }, initialValue: true }, displayIndentGuides: { set: function(show) { if (this.$textLayer.setDisplayIndentGuides(show)) this.$loop.schedule(this.CHANGE_TEXT); }, initialValue: true }, highlightGutterLine: { set: function(shouldHighlight) { if (!this.$gutterLineHighlight) { this.$gutterLineHighlight = dom.createElement("div"); this.$gutterLineHighlight.className = "ace_gutter-active-line"; this.$gutter.appendChild(this.$gutterLineHighlight); return; } this.$gutterLineHighlight.style.display = shouldHighlight ? "" : "none"; if (this.$cursorLayer.$pixelPos) this.$updateGutterLineHighlight(); }, initialValue: false, value: true }, hScrollBarAlwaysVisible: { set: function(val) { if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll) this.$loop.schedule(this.CHANGE_SCROLL); }, initialValue: false }, vScrollBarAlwaysVisible: { set: function(val) { if (!this.$vScrollBarAlwaysVisible || !this.$vScroll) this.$loop.schedule(this.CHANGE_SCROLL); }, initialValue: false }, fontSize: { set: function(size) { if (typeof size == "number") size = size + "px"; this.container.style.fontSize = size; this.updateFontSize(); }, initialValue: 12 }, fontFamily: { set: function(name) { this.container.style.fontFamily = name; this.updateFontSize(); } }, maxLines: { set: function(val) { this.updateFull(); } }, minLines: { set: function(val) { this.updateFull(); } }, maxPixelHeight: { set: function(val) { this.updateFull(); }, initialValue: 0 }, scrollPastEnd: { set: function(val) { val = +val || 0; if (this.$scrollPastEnd == val) return; this.$scrollPastEnd = val; this.$loop.schedule(this.CHANGE_SCROLL); }, initialValue: 0, handlesSet: true }, fixedWidthGutter: { set: function(val) { this.$gutterLayer.$fixedWidth = !!val; this.$loop.schedule(this.CHANGE_GUTTER); } }, theme: { set: function(val) { this.setTheme(val) }, get: function() { return this.$themeId || this.theme; }, initialValue: "./theme/textmate", handlesSet: true } }); exports.VirtualRenderer = VirtualRenderer; }); ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"], function(acequire, exports, module) { "use strict"; var oop = acequire("../lib/oop"); var net = acequire("../lib/net"); var EventEmitter = acequire("../lib/event_emitter").EventEmitter; var config = acequire("../config"); var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) { this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); this.changeListener = this.changeListener.bind(this); this.onMessage = this.onMessage.bind(this); if (acequire.nameToUrl && !acequire.toUrl) acequire.toUrl = acequire.nameToUrl; if (config.get("packaged") || !acequire.toUrl) { workerUrl = workerUrl || config.moduleUrl(mod.id, "worker") } else { var normalizePath = this.$normalizePath; workerUrl = workerUrl || normalizePath(acequire.toUrl("ace/worker/worker.js", null, "_")); var tlns = {}; topLevelNamespaces.forEach(function(ns) { tlns[ns] = normalizePath(acequire.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, "")); }); } try { var workerSrc = mod.src; var Blob = __webpack_require__(2133); var blob = new Blob([ workerSrc ], { type: 'application/javascript' }); var blobUrl = (window.URL || window.webkitURL).createObjectURL(blob); this.$worker = new Worker(blobUrl); } catch(e) { if (e instanceof window.DOMException) { var blob = this.$workerBlob(workerUrl); var URL = window.URL || window.webkitURL; var blobURL = URL.createObjectURL(blob); this.$worker = new Worker(blobURL); URL.revokeObjectURL(blobURL); } else { throw e; } } this.$worker.postMessage({ init : true, tlns : tlns, module : mod.id, classname : classname }); this.callbackId = 1; this.callbacks = {}; this.$worker.onmessage = this.onMessage; }; (function(){ oop.implement(this, EventEmitter); this.onMessage = function(e) { var msg = e.data; switch(msg.type) { case "event": this._signal(msg.name, {data: msg.data}); break; case "call": var callback = this.callbacks[msg.id]; if (callback) { callback(msg.data); delete this.callbacks[msg.id]; } break; case "error": this.reportError(msg.data); break; case "log": window.console && console.log && console.log.apply(console, msg.data); break; } }; this.reportError = function(err) { window.console && console.error && console.error(err); }; this.$normalizePath = function(path) { return net.qualifyURL(path); }; this.terminate = function() { this._signal("terminate", {}); this.deltaQueue = null; this.$worker.terminate(); this.$worker = null; if (this.$doc) this.$doc.off("change", this.changeListener); this.$doc = null; }; this.send = function(cmd, args) { this.$worker.postMessage({command: cmd, args: args}); }; this.call = function(cmd, args, callback) { if (callback) { var id = this.callbackId++; this.callbacks[id] = callback; args.push(id); } this.send(cmd, args); }; this.emit = function(event, data) { try { this.$worker.postMessage({event: event, data: {data: data.data}}); } catch(ex) { console.error(ex.stack); } }; this.attachToDocument = function(doc) { if(this.$doc) this.terminate(); this.$doc = doc; this.call("setValue", [doc.getValue()]); doc.on("change", this.changeListener); }; this.changeListener = function(delta) { if (!this.deltaQueue) { this.deltaQueue = []; setTimeout(this.$sendDeltaQueue, 0); } if (delta.action == "insert") this.deltaQueue.push(delta.start, delta.lines); else this.deltaQueue.push(delta.start, delta.end); }; this.$sendDeltaQueue = function() { var q = this.deltaQueue; if (!q) return; this.deltaQueue = null; if (q.length > 50 && q.length > this.$doc.getLength() >> 1) { this.call("setValue", [this.$doc.getValue()]); } else this.emit("change", {data: q}); }; this.$workerBlob = function(workerUrl) { var script = "importScripts('" + net.qualifyURL(workerUrl) + "');"; try { return new Blob([script], {"type": "application/javascript"}); } catch (e) { // Backwards-compatibility var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder; var blobBuilder = new BlobBuilder(); blobBuilder.append(script); return blobBuilder.getBlob("application/javascript"); } }; }).call(WorkerClient.prototype); var UIWorkerClient = function(topLevelNamespaces, mod, classname) { this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); this.changeListener = this.changeListener.bind(this); this.callbackId = 1; this.callbacks = {}; this.messageBuffer = []; var main = null; var emitSync = false; var sender = Object.create(EventEmitter); var _self = this; this.$worker = {}; this.$worker.terminate = function() {}; this.$worker.postMessage = function(e) { _self.messageBuffer.push(e); if (main) { if (emitSync) setTimeout(processNext); else processNext(); } }; this.setEmitSync = function(val) { emitSync = val }; var processNext = function() { var msg = _self.messageBuffer.shift(); if (msg.command) main[msg.command].apply(main, msg.args); else if (msg.event) sender._signal(msg.event, msg.data); }; sender.postMessage = function(msg) { _self.onMessage({data: msg}); }; sender.callback = function(data, callbackId) { this.postMessage({type: "call", id: callbackId, data: data}); }; sender.emit = function(name, data) { this.postMessage({type: "event", name: name, data: data}); }; config.loadModule(["worker", mod], function(Main) { main = new Main[classname](sender); while (_self.messageBuffer.length) processNext(); }); }; UIWorkerClient.prototype = WorkerClient.prototype; exports.UIWorkerClient = UIWorkerClient; exports.WorkerClient = WorkerClient; }); ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"], function(acequire, exports, module) { "use strict"; var Range = acequire("./range").Range; var EventEmitter = acequire("./lib/event_emitter").EventEmitter; var oop = acequire("./lib/oop"); var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) { var _self = this; this.length = length; this.session = session; this.doc = session.getDocument(); this.mainClass = mainClass; this.othersClass = othersClass; this.$onUpdate = this.onUpdate.bind(this); this.doc.on("change", this.$onUpdate); this.$others = others; this.$onCursorChange = function() { setTimeout(function() { _self.onCursorChange(); }); }; this.$pos = pos; var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1}; this.$undoStackDepth = undoStack.length; this.setup(); session.selection.on("changeCursor", this.$onCursorChange); }; (function() { oop.implement(this, EventEmitter); this.setup = function() { var _self = this; var doc = this.doc; var session = this.session; this.selectionBefore = session.selection.toJSON(); if (session.selection.inMultiSelectMode) session.selection.toSingleRange(); this.pos = doc.createAnchor(this.$pos.row, this.$pos.column); var pos = this.pos; pos.$insertRight = true; pos.detach(); pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false); this.others = []; this.$others.forEach(function(other) { var anchor = doc.createAnchor(other.row, other.column); anchor.$insertRight = true; anchor.detach(); _self.others.push(anchor); }); session.setUndoSelect(false); }; this.showOtherMarkers = function() { if (this.othersActive) return; var session = this.session; var _self = this; this.othersActive = true; this.others.forEach(function(anchor) { anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false); }); }; this.hideOtherMarkers = function() { if (!this.othersActive) return; this.othersActive = false; for (var i = 0; i < this.others.length; i++) { this.session.removeMarker(this.others[i].markerId); } }; this.onUpdate = function(delta) { if (this.$updating) return this.updateAnchors(delta); var range = delta; if (range.start.row !== range.end.row) return; if (range.start.row !== this.pos.row) return; this.$updating = true; var lengthDiff = delta.action === "insert" ? range.end.column - range.start.column : range.start.column - range.end.column; var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1; var distanceFromStart = range.start.column - this.pos.column; this.updateAnchors(delta); if (inMainRange) this.length += lengthDiff; if (inMainRange && !this.session.$fromUndo) { if (delta.action === 'insert') { for (var i = this.others.length - 1; i >= 0; i--) { var otherPos = this.others[i]; var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart}; this.doc.insertMergedLines(newPos, delta.lines); } } else if (delta.action === 'remove') { for (var i = this.others.length - 1; i >= 0; i--) { var otherPos = this.others[i]; var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart}; this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff)); } } } this.$updating = false; this.updateMarkers(); }; this.updateAnchors = function(delta) { this.pos.onChange(delta); for (var i = this.others.length; i--;) this.others[i].onChange(delta); this.updateMarkers(); }; this.updateMarkers = function() { if (this.$updating) return; var _self = this; var session = this.session; var updateMarker = function(pos, className) { session.removeMarker(pos.markerId); pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column+_self.length), className, null, false); }; updateMarker(this.pos, this.mainClass); for (var i = this.others.length; i--;) updateMarker(this.others[i], this.othersClass); }; this.onCursorChange = function(event) { if (this.$updating || !this.session) return; var pos = this.session.selection.getCursor(); if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) { this.showOtherMarkers(); this._emit("cursorEnter", event); } else { this.hideOtherMarkers(); this._emit("cursorLeave", event); } }; this.detach = function() { this.session.removeMarker(this.pos && this.pos.markerId); this.hideOtherMarkers(); this.doc.removeEventListener("change", this.$onUpdate); this.session.selection.removeEventListener("changeCursor", this.$onCursorChange); this.session.setUndoSelect(true); this.session = null; }; this.cancel = function() { if (this.$undoStackDepth === -1) return; var undoManager = this.session.getUndoManager(); var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth; for (var i = 0; i < undosRequired; i++) { undoManager.undo(true); } if (this.selectionBefore) this.session.selection.fromJSON(this.selectionBefore); }; }).call(PlaceHolder.prototype); exports.PlaceHolder = PlaceHolder; }); ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(acequire, exports, module) { var event = acequire("../lib/event"); var useragent = acequire("../lib/useragent"); function isSamePoint(p1, p2) { return p1.row == p2.row && p1.column == p2.column; } function onMouseDown(e) { var ev = e.domEvent; var alt = ev.altKey; var shift = ev.shiftKey; var ctrl = ev.ctrlKey; var accel = e.getAccelKey(); var button = e.getButton(); if (ctrl && useragent.isMac) button = ev.button; if (e.editor.inMultiSelectMode && button == 2) { e.editor.textInput.onContextMenu(e.domEvent); return; } if (!ctrl && !alt && !accel) { if (button === 0 && e.editor.inMultiSelectMode) e.editor.exitMultiSelectMode(); return; } if (button !== 0) return; var editor = e.editor; var selection = editor.selection; var isMultiSelect = editor.inMultiSelectMode; var pos = e.getDocumentPosition(); var cursor = selection.getCursor(); var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor)); var mouseX = e.x, mouseY = e.y; var onMouseSelection = function(e) { mouseX = e.clientX; mouseY = e.clientY; }; var session = editor.session; var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); var screenCursor = screenAnchor; var selectionMode; if (editor.$mouseHandler.$enableJumpToDef) { if (ctrl && alt || accel && alt) selectionMode = shift ? "block" : "add"; else if (alt && editor.$blockSelectEnabled) selectionMode = "block"; } else { if (accel && !alt) { selectionMode = "add"; if (!isMultiSelect && shift) return; } else if (alt && editor.$blockSelectEnabled) { selectionMode = "block"; } } if (selectionMode && useragent.isMac && ev.ctrlKey) { editor.$mouseHandler.cancelContextMenu(); } if (selectionMode == "add") { if (!isMultiSelect && inSelection) return; // dragging if (!isMultiSelect) { var range = selection.toOrientedRange(); editor.addSelectionMarker(range); } var oldRange = selection.rangeList.rangeAtPoint(pos); editor.$blockScrolling++; editor.inVirtualSelectionMode = true; if (shift) { oldRange = null; range = selection.ranges[0] || range; editor.removeSelectionMarker(range); } editor.once("mouseup", function() { var tmpSel = selection.toOrientedRange(); if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor)) selection.substractPoint(tmpSel.cursor); else { if (shift) { selection.substractPoint(range.cursor); } else if (range) { editor.removeSelectionMarker(range); selection.addRange(range); } selection.addRange(tmpSel); } editor.$blockScrolling--; editor.inVirtualSelectionMode = false; }); } else if (selectionMode == "block") { e.stop(); editor.inVirtualSelectionMode = true; var initialRange; var rectSel = []; var blockSelect = function() { var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column); if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead)) return; screenCursor = newCursor; editor.$blockScrolling++; editor.selection.moveToPosition(cursor); editor.renderer.scrollCursorIntoView(); editor.removeSelectionMarkers(rectSel); rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor); if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty()) rectSel[0] = editor.$mouseHandler.$clickSelection.clone(); rectSel.forEach(editor.addSelectionMarker, editor); editor.updateSelectionMarkers(); editor.$blockScrolling--; }; editor.$blockScrolling++; if (isMultiSelect && !accel) { selection.toSingleRange(); } else if (!isMultiSelect && accel) { initialRange = selection.toOrientedRange(); editor.addSelectionMarker(initialRange); } if (shift) screenAnchor = session.documentToScreenPosition(selection.lead); else selection.moveToPosition(pos); editor.$blockScrolling--; screenCursor = {row: -1, column: -1}; var onMouseSelectionEnd = function(e) { clearInterval(timerId); editor.removeSelectionMarkers(rectSel); if (!rectSel.length) rectSel = [selection.toOrientedRange()]; editor.$blockScrolling++; if (initialRange) { editor.removeSelectionMarker(initialRange); selection.toSingleRange(initialRange); } for (var i = 0; i < rectSel.length; i++) selection.addRange(rectSel[i]); editor.inVirtualSelectionMode = false; editor.$mouseHandler.$clickSelection = null; editor.$blockScrolling--; }; var onSelectionInterval = blockSelect; event.capture(editor.container, onMouseSelection, onMouseSelectionEnd); var timerId = setInterval(function() {onSelectionInterval();}, 20); return e.preventDefault(); } } exports.onMouseDown = onMouseDown; }); ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"], function(acequire, exports, module) { exports.defaultCommands = [{ name: "addCursorAbove", exec: function(editor) { editor.selectMoreLines(-1); }, bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"}, scrollIntoView: "cursor", readOnly: true }, { name: "addCursorBelow", exec: function(editor) { editor.selectMoreLines(1); }, bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"}, scrollIntoView: "cursor", readOnly: true }, { name: "addCursorAboveSkipCurrent", exec: function(editor) { editor.selectMoreLines(-1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"}, scrollIntoView: "cursor", readOnly: true }, { name: "addCursorBelowSkipCurrent", exec: function(editor) { editor.selectMoreLines(1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"}, scrollIntoView: "cursor", readOnly: true }, { name: "selectMoreBefore", exec: function(editor) { editor.selectMore(-1); }, bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"}, scrollIntoView: "cursor", readOnly: true }, { name: "selectMoreAfter", exec: function(editor) { editor.selectMore(1); }, bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"}, scrollIntoView: "cursor", readOnly: true }, { name: "selectNextBefore", exec: function(editor) { editor.selectMore(-1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"}, scrollIntoView: "cursor", readOnly: true }, { name: "selectNextAfter", exec: function(editor) { editor.selectMore(1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"}, scrollIntoView: "cursor", readOnly: true }, { name: "splitIntoLines", exec: function(editor) { editor.multiSelect.splitIntoLines(); }, bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"}, readOnly: true }, { name: "alignCursors", exec: function(editor) { editor.alignCursors(); }, bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"}, scrollIntoView: "cursor" }, { name: "findAll", exec: function(editor) { editor.findAll(); }, bindKey: {win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G"}, scrollIntoView: "cursor", readOnly: true }]; exports.multiSelectCommands = [{ name: "singleSelection", bindKey: "esc", exec: function(editor) { editor.exitMultiSelectMode(); }, scrollIntoView: "cursor", readOnly: true, isAvailable: function(editor) {return editor && editor.inMultiSelectMode} }]; var HashHandler = acequire("../keyboard/hash_handler").HashHandler; exports.keyboardHandler = new HashHandler(exports.multiSelectCommands); }); ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"], function(acequire, exports, module) { var RangeList = acequire("./range_list").RangeList; var Range = acequire("./range").Range; var Selection = acequire("./selection").Selection; var onMouseDown = acequire("./mouse/multi_select_handler").onMouseDown; var event = acequire("./lib/event"); var lang = acequire("./lib/lang"); var commands = acequire("./commands/multi_select_commands"); exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands); var Search = acequire("./search").Search; var search = new Search(); function find(session, needle, dir) { search.$options.wrap = true; search.$options.needle = needle; search.$options.backwards = dir == -1; return search.find(session); } var EditSession = acequire("./edit_session").EditSession; (function() { this.getSelectionMarkers = function() { return this.$selectionMarkers; }; }).call(EditSession.prototype); (function() { this.ranges = null; this.rangeList = null; this.addRange = function(range, $blockChangeEvents) { if (!range) return; if (!this.inMultiSelectMode && this.rangeCount === 0) { var oldRange = this.toOrientedRange(); this.rangeList.add(oldRange); this.rangeList.add(range); if (this.rangeList.ranges.length != 2) { this.rangeList.removeAll(); return $blockChangeEvents || this.fromOrientedRange(range); } this.rangeList.removeAll(); this.rangeList.add(oldRange); this.$onAddRange(oldRange); } if (!range.cursor) range.cursor = range.end; var removed = this.rangeList.add(range); this.$onAddRange(range); if (removed.length) this.$onRemoveRange(removed); if (this.rangeCount > 1 && !this.inMultiSelectMode) { this._signal("multiSelect"); this.inMultiSelectMode = true; this.session.$undoSelect = false; this.rangeList.attach(this.session); } return $blockChangeEvents || this.fromOrientedRange(range); }; this.toSingleRange = function(range) { range = range || this.ranges[0]; var removed = this.rangeList.removeAll(); if (removed.length) this.$onRemoveRange(removed); range && this.fromOrientedRange(range); }; this.substractPoint = function(pos) { var removed = this.rangeList.substractPoint(pos); if (removed) { this.$onRemoveRange(removed); return removed[0]; } }; this.mergeOverlappingRanges = function() { var removed = this.rangeList.merge(); if (removed.length) this.$onRemoveRange(removed); else if(this.ranges[0]) this.fromOrientedRange(this.ranges[0]); }; this.$onAddRange = function(range) { this.rangeCount = this.rangeList.ranges.length; this.ranges.unshift(range); this._signal("addRange", {range: range}); }; this.$onRemoveRange = function(removed) { this.rangeCount = this.rangeList.ranges.length; if (this.rangeCount == 1 && this.inMultiSelectMode) { var lastRange = this.rangeList.ranges.pop(); removed.push(lastRange); this.rangeCount = 0; } for (var i = removed.length; i--; ) { var index = this.ranges.indexOf(removed[i]); this.ranges.splice(index, 1); } this._signal("removeRange", {ranges: removed}); if (this.rangeCount === 0 && this.inMultiSelectMode) { this.inMultiSelectMode = false; this._signal("singleSelect"); this.session.$undoSelect = true; this.rangeList.detach(this.session); } lastRange = lastRange || this.ranges[0]; if (lastRange && !lastRange.isEqual(this.getRange())) this.fromOrientedRange(lastRange); }; this.$initRangeList = function() { if (this.rangeList) return; this.rangeList = new RangeList(); this.ranges = []; this.rangeCount = 0; }; this.getAllRanges = function() { return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()]; }; this.splitIntoLines = function () { if (this.rangeCount > 1) { var ranges = this.rangeList.ranges; var lastRange = ranges[ranges.length - 1]; var range = Range.fromPoints(ranges[0].start, lastRange.end); this.toSingleRange(); this.setSelectionRange(range, lastRange.cursor == lastRange.start); } else { var range = this.getRange(); var isBackwards = this.isBackwards(); var startRow = range.start.row; var endRow = range.end.row; if (startRow == endRow) { if (isBackwards) var start = range.end, end = range.start; else var start = range.start, end = range.end; this.addRange(Range.fromPoints(end, end)); this.addRange(Range.fromPoints(start, start)); return; } var rectSel = []; var r = this.getLineRange(startRow, true); r.start.column = range.start.column; rectSel.push(r); for (var i = startRow + 1; i < endRow; i++) rectSel.push(this.getLineRange(i, true)); r = this.getLineRange(endRow, true); r.end.column = range.end.column; rectSel.push(r); rectSel.forEach(this.addRange, this); } }; this.toggleBlockSelection = function () { if (this.rangeCount > 1) { var ranges = this.rangeList.ranges; var lastRange = ranges[ranges.length - 1]; var range = Range.fromPoints(ranges[0].start, lastRange.end); this.toSingleRange(); this.setSelectionRange(range, lastRange.cursor == lastRange.start); } else { var cursor = this.session.documentToScreenPosition(this.selectionLead); var anchor = this.session.documentToScreenPosition(this.selectionAnchor); var rectSel = this.rectangularRangeBlock(cursor, anchor); rectSel.forEach(this.addRange, this); } }; this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) { var rectSel = []; var xBackwards = screenCursor.column < screenAnchor.column; if (xBackwards) { var startColumn = screenCursor.column; var endColumn = screenAnchor.column; } else { var startColumn = screenAnchor.column; var endColumn = screenCursor.column; } var yBackwards = screenCursor.row < screenAnchor.row; if (yBackwards) { var startRow = screenCursor.row; var endRow = screenAnchor.row; } else { var startRow = screenAnchor.row; var endRow = screenCursor.row; } if (startColumn < 0) startColumn = 0; if (startRow < 0) startRow = 0; if (startRow == endRow) includeEmptyLines = true; for (var row = startRow; row <= endRow; row++) { var range = Range.fromPoints( this.session.screenToDocumentPosition(row, startColumn), this.session.screenToDocumentPosition(row, endColumn) ); if (range.isEmpty()) { if (docEnd && isSamePoint(range.end, docEnd)) break; var docEnd = range.end; } range.cursor = xBackwards ? range.start : range.end; rectSel.push(range); } if (yBackwards) rectSel.reverse(); if (!includeEmptyLines) { var end = rectSel.length - 1; while (rectSel[end].isEmpty() && end > 0) end--; if (end > 0) { var start = 0; while (rectSel[start].isEmpty()) start++; } for (var i = end; i >= start; i--) { if (rectSel[i].isEmpty()) rectSel.splice(i, 1); } } return rectSel; }; }).call(Selection.prototype); var Editor = acequire("./editor").Editor; (function() { this.updateSelectionMarkers = function() { this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.addSelectionMarker = function(orientedRange) { if (!orientedRange.cursor) orientedRange.cursor = orientedRange.end; var style = this.getSelectionStyle(); orientedRange.marker = this.session.addMarker(orientedRange, "ace_selection", style); this.session.$selectionMarkers.push(orientedRange); this.session.selectionMarkerCount = this.session.$selectionMarkers.length; return orientedRange; }; this.removeSelectionMarker = function(range) { if (!range.marker) return; this.session.removeMarker(range.marker); var index = this.session.$selectionMarkers.indexOf(range); if (index != -1) this.session.$selectionMarkers.splice(index, 1); this.session.selectionMarkerCount = this.session.$selectionMarkers.length; }; this.removeSelectionMarkers = function(ranges) { var markerList = this.session.$selectionMarkers; for (var i = ranges.length; i--; ) { var range = ranges[i]; if (!range.marker) continue; this.session.removeMarker(range.marker); var index = markerList.indexOf(range); if (index != -1) markerList.splice(index, 1); } this.session.selectionMarkerCount = markerList.length; }; this.$onAddRange = function(e) { this.addSelectionMarker(e.range); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.$onRemoveRange = function(e) { this.removeSelectionMarkers(e.ranges); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.$onMultiSelect = function(e) { if (this.inMultiSelectMode) return; this.inMultiSelectMode = true; this.setStyle("ace_multiselect"); this.keyBinding.addKeyboardHandler(commands.keyboardHandler); this.commands.setDefaultHandler("exec", this.$onMultiSelectExec); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); }; this.$onSingleSelect = function(e) { if (this.session.multiSelect.inVirtualMode) return; this.inMultiSelectMode = false; this.unsetStyle("ace_multiselect"); this.keyBinding.removeKeyboardHandler(commands.keyboardHandler); this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); this._emit("changeSelection"); }; this.$onMultiSelectExec = function(e) { var command = e.command; var editor = e.editor; if (!editor.multiSelect) return; if (!command.multiSelectAction) { var result = command.exec(editor, e.args || {}); editor.multiSelect.addRange(editor.multiSelect.toOrientedRange()); editor.multiSelect.mergeOverlappingRanges(); } else if (command.multiSelectAction == "forEach") { result = editor.forEachSelection(command, e.args); } else if (command.multiSelectAction == "forEachLine") { result = editor.forEachSelection(command, e.args, true); } else if (command.multiSelectAction == "single") { editor.exitMultiSelectMode(); result = command.exec(editor, e.args || {}); } else { result = command.multiSelectAction(editor, e.args || {}); } return result; }; this.forEachSelection = function(cmd, args, options) { if (this.inVirtualSelectionMode) return; var keepOrder = options && options.keepOrder; var $byLines = options == true || options && options.$byLines var session = this.session; var selection = this.selection; var rangeList = selection.rangeList; var ranges = (keepOrder ? selection : rangeList).ranges; var result; if (!ranges.length) return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); var reg = selection._eventRegistry; selection._eventRegistry = {}; var tmpSel = new Selection(session); this.inVirtualSelectionMode = true; for (var i = ranges.length; i--;) { if ($byLines) { while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row) i--; } tmpSel.fromOrientedRange(ranges[i]); tmpSel.index = i; this.selection = session.selection = tmpSel; var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); if (!result && cmdResult !== undefined) result = cmdResult; tmpSel.toOrientedRange(ranges[i]); } tmpSel.detach(); this.selection = session.selection = selection; this.inVirtualSelectionMode = false; selection._eventRegistry = reg; selection.mergeOverlappingRanges(); var anim = this.renderer.$scrollAnimation; this.onCursorChange(); this.onSelectionChange(); if (anim && anim.from == anim.to) this.renderer.animateScrolling(anim.from); return result; }; this.exitMultiSelectMode = function() { if (!this.inMultiSelectMode || this.inVirtualSelectionMode) return; this.multiSelect.toSingleRange(); }; this.getSelectedText = function() { var text = ""; if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { var ranges = this.multiSelect.rangeList.ranges; var buf = []; for (var i = 0; i < ranges.length; i++) { buf.push(this.session.getTextRange(ranges[i])); } var nl = this.session.getDocument().getNewLineCharacter(); text = buf.join(nl); if (text.length == (buf.length - 1) * nl.length) text = ""; } else if (!this.selection.isEmpty()) { text = this.session.getTextRange(this.getSelectionRange()); } return text; }; this.$checkMultiselectChange = function(e, anchor) { if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { var range = this.multiSelect.ranges[0]; if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor) return; var pos = anchor == this.multiSelect.anchor ? range.cursor == range.start ? range.end : range.start : range.cursor; if (pos.row != anchor.row || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column) this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()); } }; this.findAll = function(needle, options, additive) { options = options || {}; options.needle = needle || options.needle; if (options.needle == undefined) { var range = this.selection.isEmpty() ? this.selection.getWordRange() : this.selection.getRange(); options.needle = this.session.getTextRange(range); } this.$search.set(options); var ranges = this.$search.findAll(this.session); if (!ranges.length) return 0; this.$blockScrolling += 1; var selection = this.multiSelect; if (!additive) selection.toSingleRange(ranges[0]); for (var i = ranges.length; i--; ) selection.addRange(ranges[i], true); if (range && selection.rangeList.rangeAtPoint(range.start)) selection.addRange(range, true); this.$blockScrolling -= 1; return ranges.length; }; this.selectMoreLines = function(dir, skip) { var range = this.selection.toOrientedRange(); var isBackwards = range.cursor == range.end; var screenLead = this.session.documentToScreenPosition(range.cursor); if (this.selection.$desiredColumn) screenLead.column = this.selection.$desiredColumn; var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column); if (!range.isEmpty()) { var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start); var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column); } else { var anchor = lead; } if (isBackwards) { var newRange = Range.fromPoints(lead, anchor); newRange.cursor = newRange.start; } else { var newRange = Range.fromPoints(anchor, lead); newRange.cursor = newRange.end; } newRange.desiredColumn = screenLead.column; if (!this.selection.inMultiSelectMode) { this.selection.addRange(range); } else { if (skip) var toRemove = range.cursor; } this.selection.addRange(newRange); if (toRemove) this.selection.substractPoint(toRemove); }; this.transposeSelections = function(dir) { var session = this.session; var sel = session.multiSelect; var all = sel.ranges; for (var i = all.length; i--; ) { var range = all[i]; if (range.isEmpty()) { var tmp = session.getWordRange(range.start.row, range.start.column); range.start.row = tmp.start.row; range.start.column = tmp.start.column; range.end.row = tmp.end.row; range.end.column = tmp.end.column; } } sel.mergeOverlappingRanges(); var words = []; for (var i = all.length; i--; ) { var range = all[i]; words.unshift(session.getTextRange(range)); } if (dir < 0) words.unshift(words.pop()); else words.push(words.shift()); for (var i = all.length; i--; ) { var range = all[i]; var tmp = range.clone(); session.replace(range, words[i]); range.start.row = tmp.start.row; range.start.column = tmp.start.column; } }; this.selectMore = function(dir, skip, stopAtFirst) { var session = this.session; var sel = session.multiSelect; var range = sel.toOrientedRange(); if (range.isEmpty()) { range = session.getWordRange(range.start.row, range.start.column); range.cursor = dir == -1 ? range.start : range.end; this.multiSelect.addRange(range); if (stopAtFirst) return; } var needle = session.getTextRange(range); var newRange = find(session, needle, dir); if (newRange) { newRange.cursor = dir == -1 ? newRange.start : newRange.end; this.$blockScrolling += 1; this.session.unfold(newRange); this.multiSelect.addRange(newRange); this.$blockScrolling -= 1; this.renderer.scrollCursorIntoView(null, 0.5); } if (skip) this.multiSelect.substractPoint(range.cursor); }; this.alignCursors = function() { var session = this.session; var sel = session.multiSelect; var ranges = sel.ranges; var row = -1; var sameRowRanges = ranges.filter(function(r) { if (r.cursor.row == row) return true; row = r.cursor.row; }); if (!ranges.length || sameRowRanges.length == ranges.length - 1) { var range = this.selection.getRange(); var fr = range.start.row, lr = range.end.row; var guessRange = fr == lr; if (guessRange) { var max = this.session.getLength(); var line; do { line = this.session.getLine(lr); } while (/[=:]/.test(line) && ++lr < max); do { line = this.session.getLine(fr); } while (/[=:]/.test(line) && --fr > 0); if (fr < 0) fr = 0; if (lr >= max) lr = max - 1; } var lines = this.session.removeFullLines(fr, lr); lines = this.$reAlignText(lines, guessRange); this.session.insert({row: fr, column: 0}, lines.join("\n") + "\n"); if (!guessRange) { range.start.column = 0; range.end.column = lines[lines.length - 1].length; } this.selection.setRange(range); } else { sameRowRanges.forEach(function(r) { sel.substractPoint(r.cursor); }); var maxCol = 0; var minSpace = Infinity; var spaceOffsets = ranges.map(function(r) { var p = r.cursor; var line = session.getLine(p.row); var spaceOffset = line.substr(p.column).search(/\S/g); if (spaceOffset == -1) spaceOffset = 0; if (p.column > maxCol) maxCol = p.column; if (spaceOffset < minSpace) minSpace = spaceOffset; return spaceOffset; }); ranges.forEach(function(r, i) { var p = r.cursor; var l = maxCol - p.column; var d = spaceOffsets[i] - minSpace; if (l > d) session.insert(p, lang.stringRepeat(" ", l - d)); else session.remove(new Range(p.row, p.column, p.row, p.column - l + d)); r.start.column = r.end.column = maxCol; r.start.row = r.end.row = p.row; r.cursor = r.end; }); sel.fromOrientedRange(ranges[0]); this.renderer.updateCursor(); this.renderer.updateBackMarkers(); } }; this.$reAlignText = function(lines, forceLeft) { var isLeftAligned = true, isRightAligned = true; var startW, textW, endW; return lines.map(function(line) { var m = line.match(/(\s*)(.*?)(\s*)([=:].*)/); if (!m) return [line]; if (startW == null) { startW = m[1].length; textW = m[2].length; endW = m[3].length; return m; } if (startW + textW + endW != m[1].length + m[2].length + m[3].length) isRightAligned = false; if (startW != m[1].length) isLeftAligned = false; if (startW > m[1].length) startW = m[1].length; if (textW < m[2].length) textW = m[2].length; if (endW > m[3].length) endW = m[3].length; return m; }).map(forceLeft ? alignLeft : isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign); function spaces(n) { return lang.stringRepeat(" ", n); } function alignLeft(m) { return !m[2] ? m[0] : spaces(startW) + m[2] + spaces(textW - m[2].length + endW) + m[4].replace(/^([=:])\s+/, "$1 "); } function alignRight(m) { return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2] + spaces(endW, " ") + m[4].replace(/^([=:])\s+/, "$1 "); } function unAlign(m) { return !m[2] ? m[0] : spaces(startW) + m[2] + spaces(endW) + m[4].replace(/^([=:])\s+/, "$1 "); } }; }).call(Editor.prototype); function isSamePoint(p1, p2) { return p1.row == p2.row && p1.column == p2.column; } exports.onSessionChange = function(e) { var session = e.session; if (session && !session.multiSelect) { session.$selectionMarkers = []; session.selection.$initRangeList(); session.multiSelect = session.selection; } this.multiSelect = session && session.multiSelect; var oldSession = e.oldSession; if (oldSession) { oldSession.multiSelect.off("addRange", this.$onAddRange); oldSession.multiSelect.off("removeRange", this.$onRemoveRange); oldSession.multiSelect.off("multiSelect", this.$onMultiSelect); oldSession.multiSelect.off("singleSelect", this.$onSingleSelect); oldSession.multiSelect.lead.off("change", this.$checkMultiselectChange); oldSession.multiSelect.anchor.off("change", this.$checkMultiselectChange); } if (session) { session.multiSelect.on("addRange", this.$onAddRange); session.multiSelect.on("removeRange", this.$onRemoveRange); session.multiSelect.on("multiSelect", this.$onMultiSelect); session.multiSelect.on("singleSelect", this.$onSingleSelect); session.multiSelect.lead.on("change", this.$checkMultiselectChange); session.multiSelect.anchor.on("change", this.$checkMultiselectChange); } if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) { if (session.selection.inMultiSelectMode) this.$onMultiSelect(); else this.$onSingleSelect(); } }; function MultiSelect(editor) { if (editor.$multiselectOnSessionChange) return; editor.$onAddRange = editor.$onAddRange.bind(editor); editor.$onRemoveRange = editor.$onRemoveRange.bind(editor); editor.$onMultiSelect = editor.$onMultiSelect.bind(editor); editor.$onSingleSelect = editor.$onSingleSelect.bind(editor); editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor); editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor); editor.$multiselectOnSessionChange(editor); editor.on("changeSession", editor.$multiselectOnSessionChange); editor.on("mousedown", onMouseDown); editor.commands.addCommands(commands.defaultCommands); addAltCursorListeners(editor); } function addAltCursorListeners(editor){ var el = editor.textInput.getElement(); var altCursor = false; event.addListener(el, "keydown", function(e) { var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey); if (editor.$blockSelectEnabled && altDown) { if (!altCursor) { editor.renderer.setMouseCursor("crosshair"); altCursor = true; } } else if (altCursor) { reset(); } }); event.addListener(el, "keyup", reset); event.addListener(el, "blur", reset); function reset(e) { if (altCursor) { editor.renderer.setMouseCursor(""); altCursor = false; } } } exports.MultiSelect = MultiSelect; acequire("./config").defineOptions(Editor.prototype, "editor", { enableMultiselect: { set: function(val) { MultiSelect(this); if (val) { this.on("changeSession", this.$multiselectOnSessionChange); this.on("mousedown", onMouseDown); } else { this.off("changeSession", this.$multiselectOnSessionChange); this.off("mousedown", onMouseDown); } }, value: true }, enableBlockSelect: { set: function(val) { this.$blockSelectEnabled = val; }, value: true } }); }); ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"], function(acequire, exports, module) { "use strict"; var Range = acequire("../../range").Range; var FoldMode = exports.FoldMode = function() {}; (function() { this.foldingStartMarker = null; this.foldingStopMarker = null; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.foldingStartMarker.test(line)) return "start"; if (foldStyle == "markbeginend" && this.foldingStopMarker && this.foldingStopMarker.test(line)) return "end"; return ""; }; this.getFoldWidgetRange = function(session, foldStyle, row) { return null; }; this.indentationBlock = function(session, row, column) { var re = /\S/; var line = session.getLine(row); var startLevel = line.search(re); if (startLevel == -1) return; var startColumn = column || line.length; var maxRow = session.getLength(); var startRow = row; var endRow = row; while (++row < maxRow) { var level = session.getLine(row).search(re); if (level == -1) continue; if (level <= startLevel) break; endRow = row; } if (endRow > startRow) { var endColumn = session.getLine(endRow).length; return new Range(startRow, startColumn, endRow, endColumn); } }; this.openingBracketBlock = function(session, bracket, row, column, typeRe) { var start = {row: row, column: column + 1}; var end = session.$findClosingBracket(bracket, start, typeRe); if (!end) return; var fw = session.foldWidgets[end.row]; if (fw == null) fw = session.getFoldWidget(end.row); if (fw == "start" && end.row > start.row) { end.row --; end.column = session.getLine(end.row).length; } return Range.fromPoints(start, end); }; this.closingBracketBlock = function(session, bracket, row, column, typeRe) { var end = {row: row, column: column}; var start = session.$findOpeningBracket(bracket, end); if (!start) return; start.column++; end.column--; return Range.fromPoints(start, end); }; }).call(FoldMode.prototype); }); ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(acequire, exports, module) { "use strict"; exports.isDark = false; exports.cssClass = "ace-tm"; exports.cssText = ".ace-tm .ace_gutter {\ background: #f0f0f0;\ color: #333;\ }\ .ace-tm .ace_print-margin {\ width: 1px;\ background: #e8e8e8;\ }\ .ace-tm .ace_fold {\ background-color: #6B72E6;\ }\ .ace-tm {\ background-color: #FFFFFF;\ color: black;\ }\ .ace-tm .ace_cursor {\ color: black;\ }\ .ace-tm .ace_invisible {\ color: rgb(191, 191, 191);\ }\ .ace-tm .ace_storage,\ .ace-tm .ace_keyword {\ color: blue;\ }\ .ace-tm .ace_constant {\ color: rgb(197, 6, 11);\ }\ .ace-tm .ace_constant.ace_buildin {\ color: rgb(88, 72, 246);\ }\ .ace-tm .ace_constant.ace_language {\ color: rgb(88, 92, 246);\ }\ .ace-tm .ace_constant.ace_library {\ color: rgb(6, 150, 14);\ }\ .ace-tm .ace_invalid {\ background-color: rgba(255, 0, 0, 0.1);\ color: red;\ }\ .ace-tm .ace_support.ace_function {\ color: rgb(60, 76, 114);\ }\ .ace-tm .ace_support.ace_constant {\ color: rgb(6, 150, 14);\ }\ .ace-tm .ace_support.ace_type,\ .ace-tm .ace_support.ace_class {\ color: rgb(109, 121, 222);\ }\ .ace-tm .ace_keyword.ace_operator {\ color: rgb(104, 118, 135);\ }\ .ace-tm .ace_string {\ color: rgb(3, 106, 7);\ }\ .ace-tm .ace_comment {\ color: rgb(76, 136, 107);\ }\ .ace-tm .ace_comment.ace_doc {\ color: rgb(0, 102, 255);\ }\ .ace-tm .ace_comment.ace_doc.ace_tag {\ color: rgb(128, 159, 191);\ }\ .ace-tm .ace_constant.ace_numeric {\ color: rgb(0, 0, 205);\ }\ .ace-tm .ace_variable {\ color: rgb(49, 132, 149);\ }\ .ace-tm .ace_xml-pe {\ color: rgb(104, 104, 91);\ }\ .ace-tm .ace_entity.ace_name.ace_function {\ color: #0000A2;\ }\ .ace-tm .ace_heading {\ color: rgb(12, 7, 255);\ }\ .ace-tm .ace_list {\ color:rgb(185, 6, 144);\ }\ .ace-tm .ace_meta.ace_tag {\ color:rgb(0, 22, 142);\ }\ .ace-tm .ace_string.ace_regex {\ color: rgb(255, 0, 0)\ }\ .ace-tm .ace_marker-layer .ace_selection {\ background: rgb(181, 213, 255);\ }\ .ace-tm.ace_multiselect .ace_selection.ace_start {\ box-shadow: 0 0 3px 0px white;\ }\ .ace-tm .ace_marker-layer .ace_step {\ background: rgb(252, 255, 0);\ }\ .ace-tm .ace_marker-layer .ace_stack {\ background: rgb(164, 229, 101);\ }\ .ace-tm .ace_marker-layer .ace_bracket {\ margin: -1px 0 0 -1px;\ border: 1px solid rgb(192, 192, 192);\ }\ .ace-tm .ace_marker-layer .ace_active-line {\ background: rgba(0, 0, 0, 0.07);\ }\ .ace-tm .ace_gutter-active-line {\ background-color : #dcdcdc;\ }\ .ace-tm .ace_marker-layer .ace_selected-word {\ background: rgb(250, 250, 255);\ border: 1px solid rgb(200, 200, 250);\ }\ .ace-tm .ace_indent-guide {\ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ }\ "; var dom = acequire("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"], function(acequire, exports, module) { "use strict"; var oop = acequire("./lib/oop"); var dom = acequire("./lib/dom"); var Range = acequire("./range").Range; function LineWidgets(session) { this.session = session; this.session.widgetManager = this; this.session.getRowLength = this.getRowLength; this.session.$getWidgetScreenLength = this.$getWidgetScreenLength; this.updateOnChange = this.updateOnChange.bind(this); this.renderWidgets = this.renderWidgets.bind(this); this.measureWidgets = this.measureWidgets.bind(this); this.session._changedWidgets = []; this.$onChangeEditor = this.$onChangeEditor.bind(this); this.session.on("change", this.updateOnChange); this.session.on("changeFold", this.updateOnFold); this.session.on("changeEditor", this.$onChangeEditor); } (function() { this.getRowLength = function(row) { var h; if (this.lineWidgets) h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; else h = 0; if (!this.$useWrapMode || !this.$wrapData[row]) { return 1 + h; } else { return this.$wrapData[row].length + 1 + h; } }; this.$getWidgetScreenLength = function() { var screenRows = 0; this.lineWidgets.forEach(function(w){ if (w && w.rowCount && !w.hidden) screenRows += w.rowCount; }); return screenRows; }; this.$onChangeEditor = function(e) { this.attach(e.editor); }; this.attach = function(editor) { if (editor && editor.widgetManager && editor.widgetManager != this) editor.widgetManager.detach(); if (this.editor == editor) return; this.detach(); this.editor = editor; if (editor) { editor.widgetManager = this; editor.renderer.on("beforeRender", this.measureWidgets); editor.renderer.on("afterRender", this.renderWidgets); } }; this.detach = function(e) { var editor = this.editor; if (!editor) return; this.editor = null; editor.widgetManager = null; editor.renderer.off("beforeRender", this.measureWidgets); editor.renderer.off("afterRender", this.renderWidgets); var lineWidgets = this.session.lineWidgets; lineWidgets && lineWidgets.forEach(function(w) { if (w && w.el && w.el.parentNode) { w._inDocument = false; w.el.parentNode.removeChild(w.el); } }); }; this.updateOnFold = function(e, session) { var lineWidgets = session.lineWidgets; if (!lineWidgets || !e.action) return; var fold = e.data; var start = fold.start.row; var end = fold.end.row; var hide = e.action == "add"; for (var i = start + 1; i < end; i++) { if (lineWidgets[i]) lineWidgets[i].hidden = hide; } if (lineWidgets[end]) { if (hide) { if (!lineWidgets[start]) lineWidgets[start] = lineWidgets[end]; else lineWidgets[end].hidden = hide; } else { if (lineWidgets[start] == lineWidgets[end]) lineWidgets[start] = undefined; lineWidgets[end].hidden = hide; } } }; this.updateOnChange = function(delta) { var lineWidgets = this.session.lineWidgets; if (!lineWidgets) return; var startRow = delta.start.row; var len = delta.end.row - startRow; if (len === 0) { } else if (delta.action == 'remove') { var removed = lineWidgets.splice(startRow + 1, len); removed.forEach(function(w) { w && this.removeLineWidget(w); }, this); this.$updateRows(); } else { var args = new Array(len); args.unshift(startRow, 0); lineWidgets.splice.apply(lineWidgets, args); this.$updateRows(); } }; this.$updateRows = function() { var lineWidgets = this.session.lineWidgets; if (!lineWidgets) return; var noWidgets = true; lineWidgets.forEach(function(w, i) { if (w) { noWidgets = false; w.row = i; while (w.$oldWidget) { w.$oldWidget.row = i; w = w.$oldWidget; } } }); if (noWidgets) this.session.lineWidgets = null; }; this.addLineWidget = function(w) { if (!this.session.lineWidgets) this.session.lineWidgets = new Array(this.session.getLength()); var old = this.session.lineWidgets[w.row]; if (old) { w.$oldWidget = old; if (old.el && old.el.parentNode) { old.el.parentNode.removeChild(old.el); old._inDocument = false; } } this.session.lineWidgets[w.row] = w; w.session = this.session; var renderer = this.editor.renderer; if (w.html && !w.el) { w.el = dom.createElement("div"); w.el.innerHTML = w.html; } if (w.el) { dom.addCssClass(w.el, "ace_lineWidgetContainer"); w.el.style.position = "absolute"; w.el.style.zIndex = 5; renderer.container.appendChild(w.el); w._inDocument = true; } if (!w.coverGutter) { w.el.style.zIndex = 3; } if (w.pixelHeight == null) { w.pixelHeight = w.el.offsetHeight; } if (w.rowCount == null) { w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight; } var fold = this.session.getFoldAt(w.row, 0); w.$fold = fold; if (fold) { var lineWidgets = this.session.lineWidgets; if (w.row == fold.end.row && !lineWidgets[fold.start.row]) lineWidgets[fold.start.row] = w; else w.hidden = true; } this.session._emit("changeFold", {data:{start:{row: w.row}}}); this.$updateRows(); this.renderWidgets(null, renderer); this.onWidgetChanged(w); return w; }; this.removeLineWidget = function(w) { w._inDocument = false; w.session = null; if (w.el && w.el.parentNode) w.el.parentNode.removeChild(w.el); if (w.editor && w.editor.destroy) try { w.editor.destroy(); } catch(e){} if (this.session.lineWidgets) { var w1 = this.session.lineWidgets[w.row] if (w1 == w) { this.session.lineWidgets[w.row] = w.$oldWidget; if (w.$oldWidget) this.onWidgetChanged(w.$oldWidget); } else { while (w1) { if (w1.$oldWidget == w) { w1.$oldWidget = w.$oldWidget; break; } w1 = w1.$oldWidget; } } } this.session._emit("changeFold", {data:{start:{row: w.row}}}); this.$updateRows(); }; this.getWidgetsAtRow = function(row) { var lineWidgets = this.session.lineWidgets; var w = lineWidgets && lineWidgets[row]; var list = []; while (w) { list.push(w); w = w.$oldWidget; } return list; }; this.onWidgetChanged = function(w) { this.session._changedWidgets.push(w); this.editor && this.editor.renderer.updateFull(); }; this.measureWidgets = function(e, renderer) { var changedWidgets = this.session._changedWidgets; var config = renderer.layerConfig; if (!changedWidgets || !changedWidgets.length) return; var min = Infinity; for (var i = 0; i < changedWidgets.length; i++) { var w = changedWidgets[i]; if (!w || !w.el) continue; if (w.session != this.session) continue; if (!w._inDocument) { if (this.session.lineWidgets[w.row] != w) continue; w._inDocument = true; renderer.container.appendChild(w.el); } w.h = w.el.offsetHeight; if (!w.fixedWidth) { w.w = w.el.offsetWidth; w.screenWidth = Math.ceil(w.w / config.characterWidth); } var rowCount = w.h / config.lineHeight; if (w.coverLine) { rowCount -= this.session.getRowLineCount(w.row); if (rowCount < 0) rowCount = 0; } if (w.rowCount != rowCount) { w.rowCount = rowCount; if (w.row < min) min = w.row; } } if (min != Infinity) { this.session._emit("changeFold", {data:{start:{row: min}}}); this.session.lineWidgetWidth = null; } this.session._changedWidgets = []; }; this.renderWidgets = function(e, renderer) { var config = renderer.layerConfig; var lineWidgets = this.session.lineWidgets; if (!lineWidgets) return; var first = Math.min(this.firstRow, config.firstRow); var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length); while (first > 0 && !lineWidgets[first]) first--; this.firstRow = config.firstRow; this.lastRow = config.lastRow; renderer.$cursorLayer.config = config; for (var i = first; i <= last; i++) { var w = lineWidgets[i]; if (!w || !w.el) continue; if (w.hidden) { w.el.style.top = -100 - (w.pixelHeight || 0) + "px"; continue; } if (!w._inDocument) { w._inDocument = true; renderer.container.appendChild(w.el); } var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top; if (!w.coverLine) top += config.lineHeight * this.session.getRowLineCount(w.row); w.el.style.top = top - config.offset + "px"; var left = w.coverGutter ? 0 : renderer.gutterWidth; if (!w.fixedWidth) left -= renderer.scrollLeft; w.el.style.left = left + "px"; if (w.fullWidth && w.screenWidth) { w.el.style.minWidth = config.width + 2 * config.padding + "px"; } if (w.fixedWidth) { w.el.style.right = renderer.scrollBar.getWidth() + "px"; } else { w.el.style.right = ""; } } }; }).call(LineWidgets.prototype); exports.LineWidgets = LineWidgets; }); ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"], function(acequire, exports, module) { "use strict"; var LineWidgets = acequire("../line_widgets").LineWidgets; var dom = acequire("../lib/dom"); var Range = acequire("../range").Range; function binarySearch(array, needle, comparator) { var first = 0; var last = array.length - 1; while (first <= last) { var mid = (first + last) >> 1; var c = comparator(needle, array[mid]); if (c > 0) first = mid + 1; else if (c < 0) last = mid - 1; else return mid; } return -(first + 1); } function findAnnotations(session, row, dir) { var annotations = session.getAnnotations().sort(Range.comparePoints); if (!annotations.length) return; var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints); if (i < 0) i = -i - 1; if (i >= annotations.length) i = dir > 0 ? 0 : annotations.length - 1; else if (i === 0 && dir < 0) i = annotations.length - 1; var annotation = annotations[i]; if (!annotation || !dir) return; if (annotation.row === row) { do { annotation = annotations[i += dir]; } while (annotation && annotation.row === row); if (!annotation) return annotations.slice(); } var matched = []; row = annotation.row; do { matched[dir < 0 ? "unshift" : "push"](annotation); annotation = annotations[i += dir]; } while (annotation && annotation.row == row); return matched.length && matched; } exports.showErrorMarker = function(editor, dir) { var session = editor.session; if (!session.widgetManager) { session.widgetManager = new LineWidgets(session); session.widgetManager.attach(editor); } var pos = editor.getCursorPosition(); var row = pos.row; var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function(w) { return w.type == "errorMarker"; })[0]; if (oldWidget) { oldWidget.destroy(); } else { row -= dir; } var annotations = findAnnotations(session, row, dir); var gutterAnno; if (annotations) { var annotation = annotations[0]; pos.column = (annotation.pos && typeof annotation.column != "number" ? annotation.pos.sc : annotation.column) || 0; pos.row = annotation.row; gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row]; } else if (oldWidget) { return; } else { gutterAnno = { text: ["Looks good!"], className: "ace_ok" }; } editor.session.unfold(pos.row); editor.selection.moveToPosition(pos); var w = { row: pos.row, fixedWidth: true, coverGutter: true, el: dom.createElement("div"), type: "errorMarker" }; var el = w.el.appendChild(dom.createElement("div")); var arrow = w.el.appendChild(dom.createElement("div")); arrow.className = "error_widget_arrow " + gutterAnno.className; var left = editor.renderer.$cursorLayer .getPixelPosition(pos).left; arrow.style.left = left + editor.renderer.gutterWidth - 5 + "px"; w.el.className = "error_widget_wrapper"; el.className = "error_widget " + gutterAnno.className; el.innerHTML = gutterAnno.text.join("
"); el.appendChild(dom.createElement("div")); var kb = function(_, hashId, keyString) { if (hashId === 0 && (keyString === "esc" || keyString === "return")) { w.destroy(); return {command: "null"}; } }; w.destroy = function() { if (editor.$mouseHandler.isMousePressed) return; editor.keyBinding.removeKeyboardHandler(kb); session.widgetManager.removeLineWidget(w); editor.off("changeSelection", w.destroy); editor.off("changeSession", w.destroy); editor.off("mouseup", w.destroy); editor.off("change", w.destroy); }; editor.keyBinding.addKeyboardHandler(kb); editor.on("changeSelection", w.destroy); editor.on("changeSession", w.destroy); editor.on("mouseup", w.destroy); editor.on("change", w.destroy); editor.session.widgetManager.addLineWidget(w); w.el.onmousedown = editor.focus.bind(editor); editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight}); }; dom.importCssString("\ .error_widget_wrapper {\ background: inherit;\ color: inherit;\ border:none\ }\ .error_widget {\ border-top: solid 2px;\ border-bottom: solid 2px;\ margin: 5px 0;\ padding: 10px 40px;\ white-space: pre-wrap;\ }\ .error_widget.ace_error, .error_widget_arrow.ace_error{\ border-color: #ff5a5a\ }\ .error_widget.ace_warning, .error_widget_arrow.ace_warning{\ border-color: #F1D817\ }\ .error_widget.ace_info, .error_widget_arrow.ace_info{\ border-color: #5a5a5a\ }\ .error_widget.ace_ok, .error_widget_arrow.ace_ok{\ border-color: #5aaa5a\ }\ .error_widget_arrow {\ position: absolute;\ border: solid 5px;\ border-top-color: transparent!important;\ border-right-color: transparent!important;\ border-left-color: transparent!important;\ top: -5px;\ }\ ", ""); }); ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(acequire, exports, module) { "use strict"; acequire("./lib/fixoldbrowsers"); var dom = acequire("./lib/dom"); var event = acequire("./lib/event"); var Editor = acequire("./editor").Editor; var EditSession = acequire("./edit_session").EditSession; var UndoManager = acequire("./undomanager").UndoManager; var Renderer = acequire("./virtual_renderer").VirtualRenderer; acequire("./worker/worker_client"); acequire("./keyboard/hash_handler"); acequire("./placeholder"); acequire("./multi_select"); acequire("./mode/folding/fold_mode"); acequire("./theme/textmate"); acequire("./ext/error_marker"); exports.config = acequire("./config"); exports.acequire = acequire; if (true) exports.define = __webpack_require__(1055); exports.edit = function(el) { if (typeof el == "string") { var _id = el; el = document.getElementById(_id); if (!el) throw new Error("ace.edit can't find div #" + _id); } if (el && el.env && el.env.editor instanceof Editor) return el.env.editor; var value = ""; if (el && /input|textarea/i.test(el.tagName)) { var oldNode = el; value = oldNode.value; el = dom.createElement("pre"); oldNode.parentNode.replaceChild(el, oldNode); } else if (el) { value = dom.getInnerText(el); el.innerHTML = ""; } var doc = exports.createEditSession(value); var editor = new Editor(new Renderer(el)); editor.setSession(doc); var env = { document: doc, editor: editor, onResize: editor.resize.bind(editor, null) }; if (oldNode) env.textarea = oldNode; event.addListener(window, "resize", env.onResize); editor.on("destroy", function() { event.removeListener(window, "resize", env.onResize); env.editor.container.env = null; // prevent memory leak on old ie }); editor.container.env = editor.env = env; return editor; }; exports.createEditSession = function(text, mode) { var doc = new EditSession(text, mode); doc.setUndoManager(new UndoManager()); return doc; } exports.EditSession = EditSession; exports.UndoManager = UndoManager; exports.version = "1.2.6"; }); (function() { ace.acequire(["ace/ace"], function(a) { if (a) { a.config.init(true); a.define = ace.define; } if (!window.ace) window.ace = a; for (var key in a) if (a.hasOwnProperty(key)) window.ace[key] = a[key]; }); })(); module.exports = window.ace.acequire("ace/ace"); /***/ }), /* 1055 */ /***/ (function(module, exports) { module.exports = function() { throw new Error("define cannot be used indirect"); }; /***/ }), /* 1056 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var editorOptions = ['minLines', 'maxLines', 'readOnly', 'highlightActiveLine', 'tabSize', 'enableBasicAutocompletion', 'enableLiveAutocompletion', 'enableSnippets']; var editorEvents = ['onChange', 'onFocus', 'onBlur', 'onCopy', 'onPaste', 'onSelectionChange', 'onScroll', 'handleOptions', 'updateRef']; exports.editorOptions = editorOptions; exports.editorEvents = editorEvents; /***/ }), /* 1057 */ /***/ (function(module, exports) { ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(acequire, exports, module) { "use strict"; var oop = acequire("./lib/oop"); var EventEmitter = acequire("./lib/event_emitter").EventEmitter; var lang = acequire("./lib/lang"); var Range = acequire("./range").Range; var Anchor = acequire("./anchor").Anchor; var HashHandler = acequire("./keyboard/hash_handler").HashHandler; var Tokenizer = acequire("./tokenizer").Tokenizer; var comparePoints = Range.comparePoints; var SnippetManager = function() { this.snippetMap = {}; this.snippetNameMap = {}; }; (function() { oop.implement(this, EventEmitter); this.getTokenizer = function() { function TabstopToken(str, _, stack) { str = str.substr(1); if (/^\d+$/.test(str) && !stack.inFormatString) return [{tabstopId: parseInt(str, 10)}]; return [{text: str}]; } function escape(ch) { return "(?:[^\\\\" + ch + "]|\\\\.)"; } SnippetManager.$tokenizer = new Tokenizer({ start: [ {regex: /:/, onMatch: function(val, state, stack) { if (stack.length && stack[0].expectIf) { stack[0].expectIf = false; stack[0].elseBranch = stack[0]; return [stack[0]]; } return ":"; }}, {regex: /\\./, onMatch: function(val, state, stack) { var ch = val[1]; if (ch == "}" && stack.length) { val = ch; }else if ("`$\\".indexOf(ch) != -1) { val = ch; } else if (stack.inFormatString) { if (ch == "n") val = "\n"; else if (ch == "t") val = "\n"; else if ("ulULE".indexOf(ch) != -1) { val = {changeCase: ch, local: ch > "a"}; } } return [val]; }}, {regex: /}/, onMatch: function(val, state, stack) { return [stack.length ? stack.shift() : val]; }}, {regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken}, {regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) { var t = TabstopToken(str.substr(1), state, stack); stack.unshift(t[0]); return t; }, next: "snippetVar"}, {regex: /\n/, token: "newline", merge: false} ], snippetVar: [ {regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) { stack[0].choices = val.slice(1, -1).split(","); }, next: "start"}, {regex: "/(" + escape("/") + "+)/(?:(" + escape("/") + "*)/)(\\w*):?", onMatch: function(val, state, stack) { var ts = stack[0]; ts.fmtString = val; val = this.splitRegex.exec(val); ts.guard = val[1]; ts.fmt = val[2]; ts.flag = val[3]; return ""; }, next: "start"}, {regex: "`" + escape("`") + "*`", onMatch: function(val, state, stack) { stack[0].code = val.splice(1, -1); return ""; }, next: "start"}, {regex: "\\?", onMatch: function(val, state, stack) { if (stack[0]) stack[0].expectIf = true; }, next: "start"}, {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"} ], formatString: [ {regex: "/(" + escape("/") + "+)/", token: "regex"}, {regex: "", onMatch: function(val, state, stack) { stack.inFormatString = true; }, next: "start"} ] }); SnippetManager.prototype.getTokenizer = function() { return SnippetManager.$tokenizer; }; return SnippetManager.$tokenizer; }; this.tokenizeTmSnippet = function(str, startState) { return this.getTokenizer().getLineTokens(str, startState).tokens.map(function(x) { return x.value || x; }); }; this.$getDefaultValue = function(editor, name) { if (/^[A-Z]\d+$/.test(name)) { var i = name.substr(1); return (this.variables[name[0] + "__"] || {})[i]; } if (/^\d+$/.test(name)) { return (this.variables.__ || {})[name]; } name = name.replace(/^TM_/, ""); if (!editor) return; var s = editor.session; switch(name) { case "CURRENT_WORD": var r = s.getWordRange(); case "SELECTION": case "SELECTED_TEXT": return s.getTextRange(r); case "CURRENT_LINE": return s.getLine(editor.getCursorPosition().row); case "PREV_LINE": // not possible in textmate return s.getLine(editor.getCursorPosition().row - 1); case "LINE_INDEX": return editor.getCursorPosition().column; case "LINE_NUMBER": return editor.getCursorPosition().row + 1; case "SOFT_TABS": return s.getUseSoftTabs() ? "YES" : "NO"; case "TAB_SIZE": return s.getTabSize(); case "FILENAME": case "FILEPATH": return ""; case "FULLNAME": return "Ace"; } }; this.variables = {}; this.getVariableValue = function(editor, varName) { if (this.variables.hasOwnProperty(varName)) return this.variables[varName](editor, varName) || ""; return this.$getDefaultValue(editor, varName) || ""; }; this.tmStrFormat = function(str, ch, editor) { var flag = ch.flag || ""; var re = ch.guard; re = new RegExp(re, flag.replace(/[^gi]/, "")); var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString"); var _self = this; var formatted = str.replace(re, function() { _self.variables.__ = arguments; var fmtParts = _self.resolveVariables(fmtTokens, editor); var gChangeCase = "E"; for (var i = 0; i < fmtParts.length; i++) { var ch = fmtParts[i]; if (typeof ch == "object") { fmtParts[i] = ""; if (ch.changeCase && ch.local) { var next = fmtParts[i + 1]; if (next && typeof next == "string") { if (ch.changeCase == "u") fmtParts[i] = next[0].toUpperCase(); else fmtParts[i] = next[0].toLowerCase(); fmtParts[i + 1] = next.substr(1); } } else if (ch.changeCase) { gChangeCase = ch.changeCase; } } else if (gChangeCase == "U") { fmtParts[i] = ch.toUpperCase(); } else if (gChangeCase == "L") { fmtParts[i] = ch.toLowerCase(); } } return fmtParts.join(""); }); this.variables.__ = null; return formatted; }; this.resolveVariables = function(snippet, editor) { var result = []; for (var i = 0; i < snippet.length; i++) { var ch = snippet[i]; if (typeof ch == "string") { result.push(ch); } else if (typeof ch != "object") { continue; } else if (ch.skip) { gotoNext(ch); } else if (ch.processed < i) { continue; } else if (ch.text) { var value = this.getVariableValue(editor, ch.text); if (value && ch.fmtString) value = this.tmStrFormat(value, ch); ch.processed = i; if (ch.expectIf == null) { if (value) { result.push(value); gotoNext(ch); } } else { if (value) { ch.skip = ch.elseBranch; } else gotoNext(ch); } } else if (ch.tabstopId != null) { result.push(ch); } else if (ch.changeCase != null) { result.push(ch); } } function gotoNext(ch) { var i1 = snippet.indexOf(ch, i + 1); if (i1 != -1) i = i1; } return result; }; this.insertSnippetForSelection = function(editor, snippetText) { var cursor = editor.getCursorPosition(); var line = editor.session.getLine(cursor.row); var tabString = editor.session.getTabString(); var indentString = line.match(/^\s*/)[0]; if (cursor.column < indentString.length) indentString = indentString.slice(0, cursor.column); snippetText = snippetText.replace(/\r/g, ""); var tokens = this.tokenizeTmSnippet(snippetText); tokens = this.resolveVariables(tokens, editor); tokens = tokens.map(function(x) { if (x == "\n") return x + indentString; if (typeof x == "string") return x.replace(/\t/g, tabString); return x; }); var tabstops = []; tokens.forEach(function(p, i) { if (typeof p != "object") return; var id = p.tabstopId; var ts = tabstops[id]; if (!ts) { ts = tabstops[id] = []; ts.index = id; ts.value = ""; } if (ts.indexOf(p) !== -1) return; ts.push(p); var i1 = tokens.indexOf(p, i + 1); if (i1 === -1) return; var value = tokens.slice(i + 1, i1); var isNested = value.some(function(t) {return typeof t === "object"}); if (isNested && !ts.value) { ts.value = value; } else if (value.length && (!ts.value || typeof ts.value !== "string")) { ts.value = value.join(""); } }); tabstops.forEach(function(ts) {ts.length = 0}); var expanding = {}; function copyValue(val) { var copy = []; for (var i = 0; i < val.length; i++) { var p = val[i]; if (typeof p == "object") { if (expanding[p.tabstopId]) continue; var j = val.lastIndexOf(p, i - 1); p = copy[j] || {tabstopId: p.tabstopId}; } copy[i] = p; } return copy; } for (var i = 0; i < tokens.length; i++) { var p = tokens[i]; if (typeof p != "object") continue; var id = p.tabstopId; var i1 = tokens.indexOf(p, i + 1); if (expanding[id]) { if (expanding[id] === p) expanding[id] = null; continue; } var ts = tabstops[id]; var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value); arg.unshift(i + 1, Math.max(0, i1 - i)); arg.push(p); expanding[id] = p; tokens.splice.apply(tokens, arg); if (ts.indexOf(p) === -1) ts.push(p); } var row = 0, column = 0; var text = ""; tokens.forEach(function(t) { if (typeof t === "string") { var lines = t.split("\n"); if (lines.length > 1){ column = lines[lines.length - 1].length; row += lines.length - 1; } else column += t.length; text += t; } else { if (!t.start) t.start = {row: row, column: column}; else t.end = {row: row, column: column}; } }); var range = editor.getSelectionRange(); var end = editor.session.replace(range, text); var tabstopManager = new TabstopManager(editor); var selectionId = editor.inVirtualSelectionMode && editor.selection.index; tabstopManager.addTabstops(tabstops, range.start, end, selectionId); }; this.insertSnippet = function(editor, snippetText) { var self = this; if (editor.inVirtualSelectionMode) return self.insertSnippetForSelection(editor, snippetText); editor.forEachSelection(function() { self.insertSnippetForSelection(editor, snippetText); }, null, {keepOrder: true}); if (editor.tabstopManager) editor.tabstopManager.tabNext(); }; this.$getScope = function(editor) { var scope = editor.session.$mode.$id || ""; scope = scope.split("/").pop(); if (scope === "html" || scope === "php") { if (scope === "php" && !editor.session.$mode.inlinePhp) scope = "html"; var c = editor.getCursorPosition(); var state = editor.session.getState(c.row); if (typeof state === "object") { state = state[0]; } if (state.substring) { if (state.substring(0, 3) == "js-") scope = "javascript"; else if (state.substring(0, 4) == "css-") scope = "css"; else if (state.substring(0, 4) == "php-") scope = "php"; } } return scope; }; this.getActiveScopes = function(editor) { var scope = this.$getScope(editor); var scopes = [scope]; var snippetMap = this.snippetMap; if (snippetMap[scope] && snippetMap[scope].includeScopes) { scopes.push.apply(scopes, snippetMap[scope].includeScopes); } scopes.push("_"); return scopes; }; this.expandWithTab = function(editor, options) { var self = this; var result = editor.forEachSelection(function() { return self.expandSnippetForSelection(editor, options); }, null, {keepOrder: true}); if (result && editor.tabstopManager) editor.tabstopManager.tabNext(); return result; }; this.expandSnippetForSelection = function(editor, options) { var cursor = editor.getCursorPosition(); var line = editor.session.getLine(cursor.row); var before = line.substring(0, cursor.column); var after = line.substr(cursor.column); var snippetMap = this.snippetMap; var snippet; this.getActiveScopes(editor).some(function(scope) { var snippets = snippetMap[scope]; if (snippets) snippet = this.findMatchingSnippet(snippets, before, after); return !!snippet; }, this); if (!snippet) return false; if (options && options.dryRun) return true; editor.session.doc.removeInLine(cursor.row, cursor.column - snippet.replaceBefore.length, cursor.column + snippet.replaceAfter.length ); this.variables.M__ = snippet.matchBefore; this.variables.T__ = snippet.matchAfter; this.insertSnippetForSelection(editor, snippet.content); this.variables.M__ = this.variables.T__ = null; return true; }; this.findMatchingSnippet = function(snippetList, before, after) { for (var i = snippetList.length; i--;) { var s = snippetList[i]; if (s.startRe && !s.startRe.test(before)) continue; if (s.endRe && !s.endRe.test(after)) continue; if (!s.startRe && !s.endRe) continue; s.matchBefore = s.startRe ? s.startRe.exec(before) : [""]; s.matchAfter = s.endRe ? s.endRe.exec(after) : [""]; s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : ""; s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : ""; return s; } }; this.snippetMap = {}; this.snippetNameMap = {}; this.register = function(snippets, scope) { var snippetMap = this.snippetMap; var snippetNameMap = this.snippetNameMap; var self = this; if (!snippets) snippets = []; function wrapRegexp(src) { if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src)) src = "(?:" + src + ")"; return src || ""; } function guardedRegexp(re, guard, opening) { re = wrapRegexp(re); guard = wrapRegexp(guard); if (opening) { re = guard + re; if (re && re[re.length - 1] != "$") re = re + "$"; } else { re = re + guard; if (re && re[0] != "^") re = "^" + re; } return new RegExp(re); } function addSnippet(s) { if (!s.scope) s.scope = scope || "_"; scope = s.scope; if (!snippetMap[scope]) { snippetMap[scope] = []; snippetNameMap[scope] = {}; } var map = snippetNameMap[scope]; if (s.name) { var old = map[s.name]; if (old) self.unregister(old); map[s.name] = s; } snippetMap[scope].push(s); if (s.tabTrigger && !s.trigger) { if (!s.guard && /^\w/.test(s.tabTrigger)) s.guard = "\\b"; s.trigger = lang.escapeRegExp(s.tabTrigger); } if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard) return; s.startRe = guardedRegexp(s.trigger, s.guard, true); s.triggerRe = new RegExp(s.trigger, "", true); s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true); s.endTriggerRe = new RegExp(s.endTrigger, "", true); } if (snippets && snippets.content) addSnippet(snippets); else if (Array.isArray(snippets)) snippets.forEach(addSnippet); this._signal("registerSnippets", {scope: scope}); }; this.unregister = function(snippets, scope) { var snippetMap = this.snippetMap; var snippetNameMap = this.snippetNameMap; function removeSnippet(s) { var nameMap = snippetNameMap[s.scope||scope]; if (nameMap && nameMap[s.name]) { delete nameMap[s.name]; var map = snippetMap[s.scope||scope]; var i = map && map.indexOf(s); if (i >= 0) map.splice(i, 1); } } if (snippets.content) removeSnippet(snippets); else if (Array.isArray(snippets)) snippets.forEach(removeSnippet); }; this.parseSnippetFile = function(str) { str = str.replace(/\r/g, ""); var list = [], snippet = {}; var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm; var m; while (m = re.exec(str)) { if (m[1]) { try { snippet = JSON.parse(m[1]); list.push(snippet); } catch (e) {} } if (m[4]) { snippet.content = m[4].replace(/^\t/gm, ""); list.push(snippet); snippet = {}; } else { var key = m[2], val = m[3]; if (key == "regex") { var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g; snippet.guard = guardRe.exec(val)[1]; snippet.trigger = guardRe.exec(val)[1]; snippet.endTrigger = guardRe.exec(val)[1]; snippet.endGuard = guardRe.exec(val)[1]; } else if (key == "snippet") { snippet.tabTrigger = val.match(/^\S*/)[0]; if (!snippet.name) snippet.name = val; } else { snippet[key] = val; } } } return list; }; this.getSnippetByName = function(name, editor) { var snippetMap = this.snippetNameMap; var snippet; this.getActiveScopes(editor).some(function(scope) { var snippets = snippetMap[scope]; if (snippets) snippet = snippets[name]; return !!snippet; }, this); return snippet; }; }).call(SnippetManager.prototype); var TabstopManager = function(editor) { if (editor.tabstopManager) return editor.tabstopManager; editor.tabstopManager = this; this.$onChange = this.onChange.bind(this); this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule; this.$onChangeSession = this.onChangeSession.bind(this); this.$onAfterExec = this.onAfterExec.bind(this); this.attach(editor); }; (function() { this.attach = function(editor) { this.index = 0; this.ranges = []; this.tabstops = []; this.$openTabstops = null; this.selectedTabstop = null; this.editor = editor; this.editor.on("change", this.$onChange); this.editor.on("changeSelection", this.$onChangeSelection); this.editor.on("changeSession", this.$onChangeSession); this.editor.commands.on("afterExec", this.$onAfterExec); this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); }; this.detach = function() { this.tabstops.forEach(this.removeTabstopMarkers, this); this.ranges = null; this.tabstops = null; this.selectedTabstop = null; this.editor.removeListener("change", this.$onChange); this.editor.removeListener("changeSelection", this.$onChangeSelection); this.editor.removeListener("changeSession", this.$onChangeSession); this.editor.commands.removeListener("afterExec", this.$onAfterExec); this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); this.editor.tabstopManager = null; this.editor = null; }; this.onChange = function(delta) { var changeRange = delta; var isRemove = delta.action[0] == "r"; var start = delta.start; var end = delta.end; var startRow = start.row; var endRow = end.row; var lineDif = endRow - startRow; var colDiff = end.column - start.column; if (isRemove) { lineDif = -lineDif; colDiff = -colDiff; } if (!this.$inChange && isRemove) { var ts = this.selectedTabstop; var changedOutside = ts && !ts.some(function(r) { return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0; }); if (changedOutside) return this.detach(); } var ranges = this.ranges; for (var i = 0; i < ranges.length; i++) { var r = ranges[i]; if (r.end.row < start.row) continue; if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) { this.removeRange(r); i--; continue; } if (r.start.row == startRow && r.start.column > start.column) r.start.column += colDiff; if (r.end.row == startRow && r.end.column >= start.column) r.end.column += colDiff; if (r.start.row >= startRow) r.start.row += lineDif; if (r.end.row >= startRow) r.end.row += lineDif; if (comparePoints(r.start, r.end) > 0) this.removeRange(r); } if (!ranges.length) this.detach(); }; this.updateLinkedFields = function() { var ts = this.selectedTabstop; if (!ts || !ts.hasLinkedRanges) return; this.$inChange = true; var session = this.editor.session; var text = session.getTextRange(ts.firstNonLinked); for (var i = ts.length; i--;) { var range = ts[i]; if (!range.linked) continue; var fmt = exports.snippetManager.tmStrFormat(text, range.original); session.replace(range, fmt); } this.$inChange = false; }; this.onAfterExec = function(e) { if (e.command && !e.command.readOnly) this.updateLinkedFields(); }; this.onChangeSelection = function() { if (!this.editor) return; var lead = this.editor.selection.lead; var anchor = this.editor.selection.anchor; var isEmpty = this.editor.selection.isEmpty(); for (var i = this.ranges.length; i--;) { if (this.ranges[i].linked) continue; var containsLead = this.ranges[i].contains(lead.row, lead.column); var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column); if (containsLead && containsAnchor) return; } this.detach(); }; this.onChangeSession = function() { this.detach(); }; this.tabNext = function(dir) { var max = this.tabstops.length; var index = this.index + (dir || 1); index = Math.min(Math.max(index, 1), max); if (index == max) index = 0; this.selectTabstop(index); if (index === 0) this.detach(); }; this.selectTabstop = function(index) { this.$openTabstops = null; var ts = this.tabstops[this.index]; if (ts) this.addTabstopMarkers(ts); this.index = index; ts = this.tabstops[this.index]; if (!ts || !ts.length) return; this.selectedTabstop = ts; if (!this.editor.inVirtualSelectionMode) { var sel = this.editor.multiSelect; sel.toSingleRange(ts.firstNonLinked.clone()); for (var i = ts.length; i--;) { if (ts.hasLinkedRanges && ts[i].linked) continue; sel.addRange(ts[i].clone(), true); } if (sel.ranges[0]) sel.addRange(sel.ranges[0].clone()); } else { this.editor.selection.setRange(ts.firstNonLinked); } this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); }; this.addTabstops = function(tabstops, start, end) { if (!this.$openTabstops) this.$openTabstops = []; if (!tabstops[0]) { var p = Range.fromPoints(end, end); moveRelative(p.start, start); moveRelative(p.end, start); tabstops[0] = [p]; tabstops[0].index = 0; } var i = this.index; var arg = [i + 1, 0]; var ranges = this.ranges; tabstops.forEach(function(ts, index) { var dest = this.$openTabstops[index] || ts; for (var i = ts.length; i--;) { var p = ts[i]; var range = Range.fromPoints(p.start, p.end || p.start); movePoint(range.start, start); movePoint(range.end, start); range.original = p; range.tabstop = dest; ranges.push(range); if (dest != ts) dest.unshift(range); else dest[i] = range; if (p.fmtString) { range.linked = true; dest.hasLinkedRanges = true; } else if (!dest.firstNonLinked) dest.firstNonLinked = range; } if (!dest.firstNonLinked) dest.hasLinkedRanges = false; if (dest === ts) { arg.push(dest); this.$openTabstops[index] = dest; } this.addTabstopMarkers(dest); }, this); if (arg.length > 2) { if (this.tabstops.length) arg.push(arg.splice(2, 1)[0]); this.tabstops.splice.apply(this.tabstops, arg); } }; this.addTabstopMarkers = function(ts) { var session = this.editor.session; ts.forEach(function(range) { if (!range.markerId) range.markerId = session.addMarker(range, "ace_snippet-marker", "text"); }); }; this.removeTabstopMarkers = function(ts) { var session = this.editor.session; ts.forEach(function(range) { session.removeMarker(range.markerId); range.markerId = null; }); }; this.removeRange = function(range) { var i = range.tabstop.indexOf(range); range.tabstop.splice(i, 1); i = this.ranges.indexOf(range); this.ranges.splice(i, 1); this.editor.session.removeMarker(range.markerId); if (!range.tabstop.length) { i = this.tabstops.indexOf(range.tabstop); if (i != -1) this.tabstops.splice(i, 1); if (!this.tabstops.length) this.detach(); } }; this.keyboardHandler = new HashHandler(); this.keyboardHandler.bindKeys({ "Tab": function(ed) { if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) { return; } ed.tabstopManager.tabNext(1); }, "Shift-Tab": function(ed) { ed.tabstopManager.tabNext(-1); }, "Esc": function(ed) { ed.tabstopManager.detach(); }, "Return": function(ed) { return false; } }); }).call(TabstopManager.prototype); var changeTracker = {}; changeTracker.onChange = Anchor.prototype.onChange; changeTracker.setPosition = function(row, column) { this.pos.row = row; this.pos.column = column; }; changeTracker.update = function(pos, delta, $insertRight) { this.$insertRight = $insertRight; this.pos = pos; this.onChange(delta); }; var movePoint = function(point, diff) { if (point.row == 0) point.column += diff.column; point.row += diff.row; }; var moveRelative = function(point, start) { if (point.row == start.row) point.column -= start.column; point.row -= start.row; }; acequire("./lib/dom").importCssString("\ .ace_snippet-marker {\ -moz-box-sizing: border-box;\ box-sizing: border-box;\ background: rgba(194, 193, 208, 0.09);\ border: 1px dotted rgba(211, 208, 235, 0.62);\ position: absolute;\ }"); exports.snippetManager = new SnippetManager(); var Editor = acequire("./editor").Editor; (function() { this.insertSnippet = function(content, options) { return exports.snippetManager.insertSnippet(this, content, options); }; this.expandSnippet = function(options) { return exports.snippetManager.expandWithTab(this, options); }; }).call(Editor.prototype); }); ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"], function(acequire, exports, module) { "use strict"; var Renderer = acequire("../virtual_renderer").VirtualRenderer; var Editor = acequire("../editor").Editor; var Range = acequire("../range").Range; var event = acequire("../lib/event"); var lang = acequire("../lib/lang"); var dom = acequire("../lib/dom"); var $singleLineEditor = function(el) { var renderer = new Renderer(el); renderer.$maxLines = 4; var editor = new Editor(renderer); editor.setHighlightActiveLine(false); editor.setShowPrintMargin(false); editor.renderer.setShowGutter(false); editor.renderer.setHighlightGutterLine(false); editor.$mouseHandler.$focusWaitTimout = 0; editor.$highlightTagPending = true; return editor; }; var AcePopup = function(parentNode) { var el = dom.createElement("div"); var popup = new $singleLineEditor(el); if (parentNode) parentNode.appendChild(el); el.style.display = "none"; popup.renderer.content.style.cursor = "default"; popup.renderer.setStyle("ace_autocomplete"); popup.setOption("displayIndentGuides", false); popup.setOption("dragDelay", 150); var noop = function(){}; popup.focus = noop; popup.$isFocused = true; popup.renderer.$cursorLayer.restartTimer = noop; popup.renderer.$cursorLayer.element.style.opacity = 0; popup.renderer.$maxLines = 8; popup.renderer.$keepTextAreaAtCursor = false; popup.setHighlightActiveLine(false); popup.session.highlight(""); popup.session.$searchHighlight.clazz = "ace_highlight-marker"; popup.on("mousedown", function(e) { var pos = e.getDocumentPosition(); popup.selection.moveToPosition(pos); selectionMarker.start.row = selectionMarker.end.row = pos.row; e.stop(); }); var lastMouseEvent; var hoverMarker = new Range(-1,0,-1,Infinity); var selectionMarker = new Range(-1,0,-1,Infinity); selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine"); popup.setSelectOnHover = function(val) { if (!val) { hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine"); } else if (hoverMarker.id) { popup.session.removeMarker(hoverMarker.id); hoverMarker.id = null; } }; popup.setSelectOnHover(false); popup.on("mousemove", function(e) { if (!lastMouseEvent) { lastMouseEvent = e; return; } if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) { return; } lastMouseEvent = e; lastMouseEvent.scrollTop = popup.renderer.scrollTop; var row = lastMouseEvent.getDocumentPosition().row; if (hoverMarker.start.row != row) { if (!hoverMarker.id) popup.setRow(row); setHoverMarker(row); } }); popup.renderer.on("beforeRender", function() { if (lastMouseEvent && hoverMarker.start.row != -1) { lastMouseEvent.$pos = null; var row = lastMouseEvent.getDocumentPosition().row; if (!hoverMarker.id) popup.setRow(row); setHoverMarker(row, true); } }); popup.renderer.on("afterRender", function() { var row = popup.getRow(); var t = popup.renderer.$textLayer; var selected = t.element.childNodes[row - t.config.firstRow]; if (selected == t.selectedNode) return; if (t.selectedNode) dom.removeCssClass(t.selectedNode, "ace_selected"); t.selectedNode = selected; if (selected) dom.addCssClass(selected, "ace_selected"); }); var hideHoverMarker = function() { setHoverMarker(-1) }; var setHoverMarker = function(row, suppressRedraw) { if (row !== hoverMarker.start.row) { hoverMarker.start.row = hoverMarker.end.row = row; if (!suppressRedraw) popup.session._emit("changeBackMarker"); popup._emit("changeHoverMarker"); } }; popup.getHoveredRow = function() { return hoverMarker.start.row; }; event.addListener(popup.container, "mouseout", hideHoverMarker); popup.on("hide", hideHoverMarker); popup.on("changeSelection", hideHoverMarker); popup.session.doc.getLength = function() { return popup.data.length; }; popup.session.doc.getLine = function(i) { var data = popup.data[i]; if (typeof data == "string") return data; return (data && data.value) || ""; }; var bgTokenizer = popup.session.bgTokenizer; bgTokenizer.$tokenizeRow = function(row) { var data = popup.data[row]; var tokens = []; if (!data) return tokens; if (typeof data == "string") data = {value: data}; if (!data.caption) data.caption = data.value || data.name; var last = -1; var flag, c; for (var i = 0; i < data.caption.length; i++) { c = data.caption[i]; flag = data.matchMask & (1 << i) ? 1 : 0; if (last !== flag) { tokens.push({type: data.className || "" + ( flag ? "completion-highlight" : ""), value: c}); last = flag; } else { tokens[tokens.length - 1].value += c; } } if (data.meta) { var maxW = popup.renderer.$size.scrollerWidth / popup.renderer.layerConfig.characterWidth; var metaData = data.meta; if (metaData.length + data.caption.length > maxW - 2) { metaData = metaData.substr(0, maxW - data.caption.length - 3) + "\u2026" } tokens.push({type: "rightAlignedText", value: metaData}); } return tokens; }; bgTokenizer.$updateOnChange = noop; bgTokenizer.start = noop; popup.session.$computeWidth = function() { return this.screenWidth = 0; }; popup.$blockScrolling = Infinity; popup.isOpen = false; popup.isTopdown = false; popup.data = []; popup.setData = function(list) { popup.setValue(lang.stringRepeat("\n", list.length), -1); popup.data = list || []; popup.setRow(0); }; popup.getData = function(row) { return popup.data[row]; }; popup.getRow = function() { return selectionMarker.start.row; }; popup.setRow = function(line) { line = Math.max(0, Math.min(this.data.length, line)); if (selectionMarker.start.row != line) { popup.selection.clearSelection(); selectionMarker.start.row = selectionMarker.end.row = line || 0; popup.session._emit("changeBackMarker"); popup.moveCursorTo(line || 0, 0); if (popup.isOpen) popup._signal("select"); } }; popup.on("changeSelection", function() { if (popup.isOpen) popup.setRow(popup.selection.lead.row); popup.renderer.scrollCursorIntoView(); }); popup.hide = function() { this.container.style.display = "none"; this._signal("hide"); popup.isOpen = false; }; popup.show = function(pos, lineHeight, topdownOnly) { var el = this.container; var screenHeight = window.innerHeight; var screenWidth = window.innerWidth; var renderer = this.renderer; var maxH = renderer.$maxLines * lineHeight * 1.4; var top = pos.top + this.$borderSize; var allowTopdown = top > screenHeight / 2 && !topdownOnly; if (allowTopdown && top + lineHeight + maxH > screenHeight) { renderer.$maxPixelHeight = top - 2 * this.$borderSize; el.style.top = ""; el.style.bottom = screenHeight - top + "px"; popup.isTopdown = false; } else { top += lineHeight; renderer.$maxPixelHeight = screenHeight - top - 0.2 * lineHeight; el.style.top = top + "px"; el.style.bottom = ""; popup.isTopdown = true; } el.style.display = ""; this.renderer.$textLayer.checkForSizeChanges(); var left = pos.left; if (left + el.offsetWidth > screenWidth) left = screenWidth - el.offsetWidth; el.style.left = left + "px"; this._signal("show"); lastMouseEvent = null; popup.isOpen = true; }; popup.getTextLeftOffset = function() { return this.$borderSize + this.renderer.$padding + this.$imageSize; }; popup.$imageSize = 0; popup.$borderSize = 1; return popup; }; dom.importCssString("\ .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\ background-color: #CAD6FA;\ z-index: 1;\ }\ .ace_editor.ace_autocomplete .ace_line-hover {\ border: 1px solid #abbffe;\ margin-top: -1px;\ background: rgba(233,233,253,0.4);\ }\ .ace_editor.ace_autocomplete .ace_line-hover {\ position: absolute;\ z-index: 2;\ }\ .ace_editor.ace_autocomplete .ace_scroller {\ background: none;\ border: none;\ box-shadow: none;\ }\ .ace_rightAlignedText {\ color: gray;\ display: inline-block;\ position: absolute;\ right: 4px;\ text-align: right;\ z-index: -1;\ }\ .ace_editor.ace_autocomplete .ace_completion-highlight{\ color: #000;\ text-shadow: 0 0 0.01em;\ }\ .ace_editor.ace_autocomplete {\ width: 280px;\ z-index: 200000;\ background: #fbfbfb;\ color: #444;\ border: 1px lightgray solid;\ position: fixed;\ box-shadow: 2px 3px 5px rgba(0,0,0,.2);\ line-height: 1.4;\ }"); exports.AcePopup = AcePopup; }); ace.define("ace/autocomplete/util",["require","exports","module"], function(acequire, exports, module) { "use strict"; exports.parForEach = function(array, fn, callback) { var completed = 0; var arLength = array.length; if (arLength === 0) callback(); for (var i = 0; i < arLength; i++) { fn(array[i], function(result, err) { completed++; if (completed === arLength) callback(result, err); }); } }; var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/; exports.retrievePrecedingIdentifier = function(text, pos, regex) { regex = regex || ID_REGEX; var buf = []; for (var i = pos-1; i >= 0; i--) { if (regex.test(text[i])) buf.push(text[i]); else break; } return buf.reverse().join(""); }; exports.retrieveFollowingIdentifier = function(text, pos, regex) { regex = regex || ID_REGEX; var buf = []; for (var i = pos; i < text.length; i++) { if (regex.test(text[i])) buf.push(text[i]); else break; } return buf; }; exports.getCompletionPrefix = function (editor) { var pos = editor.getCursorPosition(); var line = editor.session.getLine(pos.row); var prefix; editor.completers.forEach(function(completer) { if (completer.identifierRegexps) { completer.identifierRegexps.forEach(function(identifierRegex) { if (!prefix && identifierRegex) prefix = this.retrievePrecedingIdentifier(line, pos.column, identifierRegex); }.bind(this)); } }.bind(this)); return prefix || this.retrievePrecedingIdentifier(line, pos.column); }; }); ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"], function(acequire, exports, module) { "use strict"; var HashHandler = acequire("./keyboard/hash_handler").HashHandler; var AcePopup = acequire("./autocomplete/popup").AcePopup; var util = acequire("./autocomplete/util"); var event = acequire("./lib/event"); var lang = acequire("./lib/lang"); var dom = acequire("./lib/dom"); var snippetManager = acequire("./snippets").snippetManager; var Autocomplete = function() { this.autoInsert = false; this.autoSelect = true; this.exactMatch = false; this.gatherCompletionsId = 0; this.keyboardHandler = new HashHandler(); this.keyboardHandler.bindKeys(this.commands); this.blurListener = this.blurListener.bind(this); this.changeListener = this.changeListener.bind(this); this.mousedownListener = this.mousedownListener.bind(this); this.mousewheelListener = this.mousewheelListener.bind(this); this.changeTimer = lang.delayedCall(function() { this.updateCompletions(true); }.bind(this)); this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50); }; (function() { this.$init = function() { this.popup = new AcePopup(document.body || document.documentElement); this.popup.on("click", function(e) { this.insertMatch(); e.stop(); }.bind(this)); this.popup.focus = this.editor.focus.bind(this.editor); this.popup.on("show", this.tooltipTimer.bind(null, null)); this.popup.on("select", this.tooltipTimer.bind(null, null)); this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null)); return this.popup; }; this.getPopup = function() { return this.popup || this.$init(); }; this.openPopup = function(editor, prefix, keepPopupPosition) { if (!this.popup) this.$init(); this.popup.setData(this.completions.filtered); editor.keyBinding.addKeyboardHandler(this.keyboardHandler); var renderer = editor.renderer; this.popup.setRow(this.autoSelect ? 0 : -1); if (!keepPopupPosition) { this.popup.setTheme(editor.getTheme()); this.popup.setFontSize(editor.getFontSize()); var lineHeight = renderer.layerConfig.lineHeight; var pos = renderer.$cursorLayer.getPixelPosition(this.base, true); pos.left -= this.popup.getTextLeftOffset(); var rect = editor.container.getBoundingClientRect(); pos.top += rect.top - renderer.layerConfig.offset; pos.left += rect.left - editor.renderer.scrollLeft; pos.left += renderer.gutterWidth; this.popup.show(pos, lineHeight); } else if (keepPopupPosition && !prefix) { this.detach(); } }; this.detach = function() { this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); this.editor.off("changeSelection", this.changeListener); this.editor.off("blur", this.blurListener); this.editor.off("mousedown", this.mousedownListener); this.editor.off("mousewheel", this.mousewheelListener); this.changeTimer.cancel(); this.hideDocTooltip(); this.gatherCompletionsId += 1; if (this.popup && this.popup.isOpen) this.popup.hide(); if (this.base) this.base.detach(); this.activated = false; this.completions = this.base = null; }; this.changeListener = function(e) { var cursor = this.editor.selection.lead; if (cursor.row != this.base.row || cursor.column < this.base.column) { this.detach(); } if (this.activated) this.changeTimer.schedule(); else this.detach(); }; this.blurListener = function(e) { if (e.relatedTarget && e.relatedTarget.nodeName == "A" && e.relatedTarget.href) { window.open(e.relatedTarget.href, "_blank"); } var el = document.activeElement; var text = this.editor.textInput.getElement(); var fromTooltip = e.relatedTarget && e.relatedTarget == this.tooltipNode; var container = this.popup && this.popup.container; if (el != text && el.parentNode != container && !fromTooltip && el != this.tooltipNode && e.relatedTarget != text ) { this.detach(); } }; this.mousedownListener = function(e) { this.detach(); }; this.mousewheelListener = function(e) { this.detach(); }; this.goTo = function(where) { var row = this.popup.getRow(); var max = this.popup.session.getLength() - 1; switch(where) { case "up": row = row <= 0 ? max : row - 1; break; case "down": row = row >= max ? -1 : row + 1; break; case "start": row = 0; break; case "end": row = max; break; } this.popup.setRow(row); }; this.insertMatch = function(data, options) { if (!data) data = this.popup.getData(this.popup.getRow()); if (!data) return false; if (data.completer && data.completer.insertMatch) { data.completer.insertMatch(this.editor, data); } else { if (this.completions.filterText) { var ranges = this.editor.selection.getAllRanges(); for (var i = 0, range; range = ranges[i]; i++) { range.start.column -= this.completions.filterText.length; this.editor.session.remove(range); } } if (data.snippet) snippetManager.insertSnippet(this.editor, data.snippet); else this.editor.execCommand("insertstring", data.value || data); } this.detach(); }; this.commands = { "Up": function(editor) { editor.completer.goTo("up"); }, "Down": function(editor) { editor.completer.goTo("down"); }, "Ctrl-Up|Ctrl-Home": function(editor) { editor.completer.goTo("start"); }, "Ctrl-Down|Ctrl-End": function(editor) { editor.completer.goTo("end"); }, "Esc": function(editor) { editor.completer.detach(); }, "Return": function(editor) { return editor.completer.insertMatch(); }, "Shift-Return": function(editor) { editor.completer.insertMatch(null, {deleteSuffix: true}); }, "Tab": function(editor) { var result = editor.completer.insertMatch(); if (!result && !editor.tabstopManager) editor.completer.goTo("down"); else return result; }, "PageUp": function(editor) { editor.completer.popup.gotoPageUp(); }, "PageDown": function(editor) { editor.completer.popup.gotoPageDown(); } }; this.gatherCompletions = function(editor, callback) { var session = editor.getSession(); var pos = editor.getCursorPosition(); var line = session.getLine(pos.row); var prefix = util.getCompletionPrefix(editor); this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length); this.base.$insertRight = true; var matches = []; var total = editor.completers.length; editor.completers.forEach(function(completer, i) { completer.getCompletions(editor, session, pos, prefix, function(err, results) { if (!err && results) matches = matches.concat(results); var pos = editor.getCursorPosition(); var line = session.getLine(pos.row); callback(null, { prefix: prefix, matches: matches, finished: (--total === 0) }); }); }); return true; }; this.showPopup = function(editor) { if (this.editor) this.detach(); this.activated = true; this.editor = editor; if (editor.completer != this) { if (editor.completer) editor.completer.detach(); editor.completer = this; } editor.on("changeSelection", this.changeListener); editor.on("blur", this.blurListener); editor.on("mousedown", this.mousedownListener); editor.on("mousewheel", this.mousewheelListener); this.updateCompletions(); }; this.updateCompletions = function(keepPopupPosition) { if (keepPopupPosition && this.base && this.completions) { var pos = this.editor.getCursorPosition(); var prefix = this.editor.session.getTextRange({start: this.base, end: pos}); if (prefix == this.completions.filterText) return; this.completions.setFilter(prefix); if (!this.completions.filtered.length) return this.detach(); if (this.completions.filtered.length == 1 && this.completions.filtered[0].value == prefix && !this.completions.filtered[0].snippet) return this.detach(); this.openPopup(this.editor, prefix, keepPopupPosition); return; } var _id = this.gatherCompletionsId; this.gatherCompletions(this.editor, function(err, results) { var detachIfFinished = function() { if (!results.finished) return; return this.detach(); }.bind(this); var prefix = results.prefix; var matches = results && results.matches; if (!matches || !matches.length) return detachIfFinished(); if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId) return; this.completions = new FilteredList(matches); if (this.exactMatch) this.completions.exactMatch = true; this.completions.setFilter(prefix); var filtered = this.completions.filtered; if (!filtered.length) return detachIfFinished(); if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet) return detachIfFinished(); if (this.autoInsert && filtered.length == 1 && results.finished) return this.insertMatch(filtered[0]); this.openPopup(this.editor, prefix, keepPopupPosition); }.bind(this)); }; this.cancelContextMenu = function() { this.editor.$mouseHandler.cancelContextMenu(); }; this.updateDocTooltip = function() { var popup = this.popup; var all = popup.data; var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]); var doc = null; if (!selected || !this.editor || !this.popup.isOpen) return this.hideDocTooltip(); this.editor.completers.some(function(completer) { if (completer.getDocTooltip) doc = completer.getDocTooltip(selected); return doc; }); if (!doc) doc = selected; if (typeof doc == "string") doc = {docText: doc}; if (!doc || !(doc.docHTML || doc.docText)) return this.hideDocTooltip(); this.showDocTooltip(doc); }; this.showDocTooltip = function(item) { if (!this.tooltipNode) { this.tooltipNode = dom.createElement("div"); this.tooltipNode.className = "ace_tooltip ace_doc-tooltip"; this.tooltipNode.style.margin = 0; this.tooltipNode.style.pointerEvents = "auto"; this.tooltipNode.tabIndex = -1; this.tooltipNode.onblur = this.blurListener.bind(this); } var tooltipNode = this.tooltipNode; if (item.docHTML) { tooltipNode.innerHTML = item.docHTML; } else if (item.docText) { tooltipNode.textContent = item.docText; } if (!tooltipNode.parentNode) document.body.appendChild(tooltipNode); var popup = this.popup; var rect = popup.container.getBoundingClientRect(); tooltipNode.style.top = popup.container.style.top; tooltipNode.style.bottom = popup.container.style.bottom; if (window.innerWidth - rect.right < 320) { tooltipNode.style.right = window.innerWidth - rect.left + "px"; tooltipNode.style.left = ""; } else { tooltipNode.style.left = (rect.right + 1) + "px"; tooltipNode.style.right = ""; } tooltipNode.style.display = "block"; }; this.hideDocTooltip = function() { this.tooltipTimer.cancel(); if (!this.tooltipNode) return; var el = this.tooltipNode; if (!this.editor.isFocused() && document.activeElement == el) this.editor.focus(); this.tooltipNode = null; if (el.parentNode) el.parentNode.removeChild(el); }; }).call(Autocomplete.prototype); Autocomplete.startCommand = { name: "startAutocomplete", exec: function(editor) { if (!editor.completer) editor.completer = new Autocomplete(); editor.completer.autoInsert = false; editor.completer.autoSelect = true; editor.completer.showPopup(editor); editor.completer.cancelContextMenu(); }, bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space" }; var FilteredList = function(array, filterText) { this.all = array; this.filtered = array; this.filterText = filterText || ""; this.exactMatch = false; }; (function(){ this.setFilter = function(str) { if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0) var matches = this.filtered; else var matches = this.all; this.filterText = str; matches = this.filterCompletions(matches, this.filterText); matches = matches.sort(function(a, b) { return b.exactMatch - a.exactMatch || b.score - a.score; }); var prev = null; matches = matches.filter(function(item){ var caption = item.snippet || item.caption || item.value; if (caption === prev) return false; prev = caption; return true; }); this.filtered = matches; }; this.filterCompletions = function(items, needle) { var results = []; var upper = needle.toUpperCase(); var lower = needle.toLowerCase(); loop: for (var i = 0, item; item = items[i]; i++) { var caption = item.value || item.caption || item.snippet; if (!caption) continue; var lastIndex = -1; var matchMask = 0; var penalty = 0; var index, distance; if (this.exactMatch) { if (needle !== caption.substr(0, needle.length)) continue loop; }else{ for (var j = 0; j < needle.length; j++) { var i1 = caption.indexOf(lower[j], lastIndex + 1); var i2 = caption.indexOf(upper[j], lastIndex + 1); index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2; if (index < 0) continue loop; distance = index - lastIndex - 1; if (distance > 0) { if (lastIndex === -1) penalty += 10; penalty += distance; } matchMask = matchMask | (1 << index); lastIndex = index; } } item.matchMask = matchMask; item.exactMatch = penalty ? 0 : 1; item.score = (item.score || 0) - penalty; results.push(item); } return results; }; }).call(FilteredList.prototype); exports.Autocomplete = Autocomplete; exports.FilteredList = FilteredList; }); ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(acequire, exports, module) { var Range = acequire("../range").Range; var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/; function getWordIndex(doc, pos) { var textBefore = doc.getTextRange(Range.fromPoints({row: 0, column:0}, pos)); return textBefore.split(splitRegex).length - 1; } function wordDistance(doc, pos) { var prefixPos = getWordIndex(doc, pos); var words = doc.getValue().split(splitRegex); var wordScores = Object.create(null); var currentWord = words[prefixPos]; words.forEach(function(word, idx) { if (!word || word === currentWord) return; var distance = Math.abs(prefixPos - idx); var score = words.length - distance; if (wordScores[word]) { wordScores[word] = Math.max(score, wordScores[word]); } else { wordScores[word] = score; } }); return wordScores; } exports.getCompletions = function(editor, session, pos, prefix, callback) { var wordScore = wordDistance(session, pos, prefix); var wordList = Object.keys(wordScore); callback(null, wordList.map(function(word) { return { caption: word, value: word, score: wordScore[word], meta: "local" }; })); }; }); ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"], function(acequire, exports, module) { "use strict"; var snippetManager = acequire("../snippets").snippetManager; var Autocomplete = acequire("../autocomplete").Autocomplete; var config = acequire("../config"); var lang = acequire("../lib/lang"); var util = acequire("../autocomplete/util"); var textCompleter = acequire("../autocomplete/text_completer"); var keyWordCompleter = { getCompletions: function(editor, session, pos, prefix, callback) { if (session.$mode.completer) { return session.$mode.completer.getCompletions(editor, session, pos, prefix, callback); } var state = editor.session.getState(pos.row); var completions = session.$mode.getCompletions(state, session, pos, prefix); callback(null, completions); } }; var snippetCompleter = { getCompletions: function(editor, session, pos, prefix, callback) { var snippetMap = snippetManager.snippetMap; var completions = []; snippetManager.getActiveScopes(editor).forEach(function(scope) { var snippets = snippetMap[scope] || []; for (var i = snippets.length; i--;) { var s = snippets[i]; var caption = s.name || s.tabTrigger; if (!caption) continue; completions.push({ caption: caption, snippet: s.content, meta: s.tabTrigger && !s.name ? s.tabTrigger + "\u21E5 " : "snippet", type: "snippet" }); } }, this); callback(null, completions); }, getDocTooltip: function(item) { if (item.type == "snippet" && !item.docHTML) { item.docHTML = [ "", lang.escapeHTML(item.caption), "", "
", lang.escapeHTML(item.snippet) ].join(""); } } }; var completers = [snippetCompleter, textCompleter, keyWordCompleter]; exports.setCompleters = function(val) { completers.length = 0; if (val) completers.push.apply(completers, val); }; exports.addCompleter = function(completer) { completers.push(completer); }; exports.textCompleter = textCompleter; exports.keyWordCompleter = keyWordCompleter; exports.snippetCompleter = snippetCompleter; var expandSnippet = { name: "expandSnippet", exec: function(editor) { return snippetManager.expandWithTab(editor); }, bindKey: "Tab" }; var onChangeMode = function(e, editor) { loadSnippetsForMode(editor.session.$mode); }; var loadSnippetsForMode = function(mode) { var id = mode.$id; if (!snippetManager.files) snippetManager.files = {}; loadSnippetFile(id); if (mode.modes) mode.modes.forEach(loadSnippetsForMode); }; var loadSnippetFile = function(id) { if (!id || snippetManager.files[id]) return; var snippetFilePath = id.replace("mode", "snippets"); snippetManager.files[id] = {}; config.loadModule(snippetFilePath, function(m) { if (m) { snippetManager.files[id] = m; if (!m.snippets && m.snippetText) m.snippets = snippetManager.parseSnippetFile(m.snippetText); snippetManager.register(m.snippets || [], m.scope); if (m.includeScopes) { snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes; m.includeScopes.forEach(function(x) { loadSnippetFile("ace/mode/" + x); }); } } }); }; var doLiveAutocomplete = function(e) { var editor = e.editor; var hasCompleter = editor.completer && editor.completer.activated; if (e.command.name === "backspace") { if (hasCompleter && !util.getCompletionPrefix(editor)) editor.completer.detach(); } else if (e.command.name === "insertstring") { var prefix = util.getCompletionPrefix(editor); if (prefix && !hasCompleter) { if (!editor.completer) { editor.completer = new Autocomplete(); } editor.completer.autoInsert = false; editor.completer.showPopup(editor); } } }; var Editor = acequire("../editor").Editor; acequire("../config").defineOptions(Editor.prototype, "editor", { enableBasicAutocompletion: { set: function(val) { if (val) { if (!this.completers) this.completers = Array.isArray(val)? val: completers; this.commands.addCommand(Autocomplete.startCommand); } else { this.commands.removeCommand(Autocomplete.startCommand); } }, value: false }, enableLiveAutocompletion: { set: function(val) { if (val) { if (!this.completers) this.completers = Array.isArray(val)? val: completers; this.commands.on('afterExec', doLiveAutocomplete); } else { this.commands.removeListener('afterExec', doLiveAutocomplete); } }, value: false }, enableSnippets: { set: function(val) { if (val) { this.commands.addCommand(expandSnippet); this.on("changeMode", onChangeMode); onChangeMode(null, this); } else { this.commands.removeCommand(expandSnippet); this.off("changeMode", onChangeMode); } }, value: false } }); }); (function() { ace.acequire(["ace/ext/language_tools"], function() {}); })(); /***/ }), /* 1058 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _i18next = __webpack_require__(341); var _i18next2 = _interopRequireDefault(_i18next); var _reactI18next = __webpack_require__(10); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Copyright (C) 2006-2021 Talend Inc. - www.talend.com * * Licensed under the Apache License, Version 2.0 (the 'License'); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an 'AS IS' BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ _i18next2.default.use(_reactI18next.initReactI18next).init({ fallbackLng: 'en', lng: 'en', react: { useSuspense: false }, resources: { en: { 'tui-components': {} } } }); exports.default = _i18next2.default; /***/ }), /* 1059 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony default export */ __webpack_exports__["a"] = ({ processors: {}, addPostProcessor: function addPostProcessor(module) { this.processors[module.name] = module; }, handle: function handle(processors, value, key, options, translator) { var _this = this; processors.forEach(function (processor) { if (_this.processors[processor]) value = _this.processors[processor].process(value, key, options, translator); }); return value; } }); /***/ }), /* 1060 */ /***/ (function(module, exports) { function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } module.exports = _objectWithoutPropertiesLoose; /***/ }), /* 1061 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = useSSR; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(274); function useSSR(initialI18nStore, initialLanguage) { var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var i18nFromProps = props.i18n; var _ref = Object(__WEBPACK_IMPORTED_MODULE_1__context__["e" /* getHasUsedI18nextProvider */])() ? Object(__WEBPACK_IMPORTED_MODULE_0_react__["useContext"])(__WEBPACK_IMPORTED_MODULE_1__context__["a" /* I18nContext */]) : {}, i18nFromContext = _ref.i18n; var i18n = i18nFromProps || i18nFromContext || Object(__WEBPACK_IMPORTED_MODULE_1__context__["f" /* getI18n */])(); // opt out if is a cloned instance, eg. created by i18next-express-middleware on request // -> do not set initial stuff on server side if (i18n.options && i18n.options.isClone) return; // nextjs / SSR: getting data from next.js or other ssr stack if (initialI18nStore && !i18n.initializedStoreOnce) { i18n.services.resourceStore.data = initialI18nStore; i18n.initializedStoreOnce = true; } if (initialLanguage && !i18n.initializedLanguageOnce) { i18n.changeLanguage(initialLanguage); i18n.initializedLanguageOnce = true; } } /***/ }), /* 1062 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "AboutDialog", { enumerable: true, get: function get() { return _AboutDialog["default"]; } }); Object.defineProperty(exports, "ActionBar", { enumerable: true, get: function get() { return _ActionBar["default"]; } }); Object.defineProperty(exports, "ActionIntercom", { enumerable: true, get: function get() { return _ActionIntercom["default"]; } }); Object.defineProperty(exports, "ActionList", { enumerable: true, get: function get() { return _ActionList["default"]; } }); Object.defineProperty(exports, "Action", { enumerable: true, get: function get() { return _Actions.Action; } }); Object.defineProperty(exports, "Actions", { enumerable: true, get: function get() { return _Actions.Actions; } }); Object.defineProperty(exports, "ActionButton", { enumerable: true, get: function get() { return _Actions.ActionButton; } }); Object.defineProperty(exports, "ActionDropdown", { enumerable: true, get: function get() { return _Actions.ActionDropdown; } }); Object.defineProperty(exports, "ActionFile", { enumerable: true, get: function get() { return _Actions.ActionFile; } }); Object.defineProperty(exports, "ActionIconToggle", { enumerable: true, get: function get() { return _Actions.ActionIconToggle; } }); Object.defineProperty(exports, "ActionSplitDropdown", { enumerable: true, get: function get() { return _Actions.ActionSplitDropdown; } }); Object.defineProperty(exports, "AppGuidedTour", { enumerable: true, get: function get() { return _AppGuidedTour["default"]; } }); Object.defineProperty(exports, "AppLoader", { enumerable: true, get: function get() { return _AppLoader["default"]; } }); Object.defineProperty(exports, "AppSwitcher", { enumerable: true, get: function get() { return _AppSwitcher["default"]; } }); Object.defineProperty(exports, "Badge", { enumerable: true, get: function get() { return _Badge["default"]; } }); Object.defineProperty(exports, "Breadcrumbs", { enumerable: true, get: function get() { return _Breadcrumbs["default"]; } }); Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function get() { return _Checkbox["default"]; } }); Object.defineProperty(exports, "CircularProgress", { enumerable: true, get: function get() { return _CircularProgress["default"]; } }); Object.defineProperty(exports, "CollapsiblePanel", { enumerable: true, get: function get() { return _CollapsiblePanel["default"]; } }); Object.defineProperty(exports, "ConfirmDialog", { enumerable: true, get: function get() { return _ConfirmDialog["default"]; } }); Object.defineProperty(exports, "Datalist", { enumerable: true, get: function get() { return _Datalist["default"]; } }); Object.defineProperty(exports, "ModelViewer", { enumerable: true, get: function get() { return _DataViewer.ModelViewer; } }); Object.defineProperty(exports, "RecordsViewer", { enumerable: true, get: function get() { return _DataViewer.RecordsViewer; } }); Object.defineProperty(exports, "InputDatePicker", { enumerable: true, get: function get() { return _DateTimePickers.InputDatePicker; } }); Object.defineProperty(exports, "InputDateRangePicker", { enumerable: true, get: function get() { return _DateTimePickers.InputDateRangePicker; } }); Object.defineProperty(exports, "InputDateTimePicker", { enumerable: true, get: function get() { return _DateTimePickers.InputDateTimePicker; } }); Object.defineProperty(exports, "InputTimePicker", { enumerable: true, get: function get() { return _DateTimePickers.InputTimePicker; } }); Object.defineProperty(exports, "Dialog", { enumerable: true, get: function get() { return _Dialog["default"]; } }); Object.defineProperty(exports, "DraggableComponent", { enumerable: true, get: function get() { return _Draggable["default"]; } }); Object.defineProperty(exports, "Drawer", { enumerable: true, get: function get() { return _Drawer["default"]; } }); Object.defineProperty(exports, "EditableText", { enumerable: true, get: function get() { return _EditableText["default"]; } }); Object.defineProperty(exports, "Emphasis", { enumerable: true, get: function get() { return _Emphasis["default"]; } }); Object.defineProperty(exports, "Enumeration", { enumerable: true, get: function get() { return _Enumeration["default"]; } }); Object.defineProperty(exports, "FilterBar", { enumerable: true, get: function get() { return _FilterBar["default"]; } }); Object.defineProperty(exports, "FocusManager", { enumerable: true, get: function get() { return _FocusManager["default"]; } }); Object.defineProperty(exports, "GridLayout", { enumerable: true, get: function get() { return _GridLayout["default"]; } }); Object.defineProperty(exports, "GuidedTour", { enumerable: true, get: function get() { return _GuidedTour["default"]; } }); Object.defineProperty(exports, "HeaderBar", { enumerable: true, get: function get() { return _HeaderBar["default"]; } }); Object.defineProperty(exports, "HttpError", { enumerable: true, get: function get() { return _HttpError["default"]; } }); Object.defineProperty(exports, "i18n", { enumerable: true, get: function get() { return _i18n["default"]; } }); Object.defineProperty(exports, "Icon", { enumerable: true, get: function get() { return _Icon["default"]; } }); Object.defineProperty(exports, "IconsProvider", { enumerable: true, get: function get() { return _IconsProvider["default"]; } }); Object.defineProperty(exports, "Inject", { enumerable: true, get: function get() { return _Inject["default"]; } }); Object.defineProperty(exports, "InlineMessage", { enumerable: true, get: function get() { return _InlineMessage.InlineMessage; } }); Object.defineProperty(exports, "JSONSchemaRenderer", { enumerable: true, get: function get() { return _JSONSchemaRenderer["default"]; } }); Object.defineProperty(exports, "Layout", { enumerable: true, get: function get() { return _Layout["default"]; } }); Object.defineProperty(exports, "List", { enumerable: true, get: function get() { return _List["default"]; } }); Object.defineProperty(exports, "ListView", { enumerable: true, get: function get() { return _ListView["default"]; } }); Object.defineProperty(exports, "Loader", { enumerable: true, get: function get() { return _Loader["default"]; } }); Object.defineProperty(exports, "MultiSelect", { enumerable: true, get: function get() { return _MultiSelect["default"]; } }); Object.defineProperty(exports, "Notification", { enumerable: true, get: function get() { return _Notification["default"]; } }); Object.defineProperty(exports, "ObjectViewer", { enumerable: true, get: function get() { return _ObjectViewer["default"]; } }); Object.defineProperty(exports, "PieChart", { enumerable: true, get: function get() { return _PieChart["default"]; } }); Object.defineProperty(exports, "Progress", { enumerable: true, get: function get() { return _Progress["default"]; } }); Object.defineProperty(exports, "RadarChart", { enumerable: true, get: function get() { return _RadarChart["default"]; } }); Object.defineProperty(exports, "ResourceList", { enumerable: true, get: function get() { return _ResourceList["default"]; } }); Object.defineProperty(exports, "ResourcePicker", { enumerable: true, get: function get() { return _ResourcePicker["default"]; } }); Object.defineProperty(exports, "Rich", { enumerable: true, get: function get() { return _RichTooltip["default"]; } }); Object.defineProperty(exports, "SidePanel", { enumerable: true, get: function get() { return _SidePanel["default"]; } }); Object.defineProperty(exports, "Skeleton", { enumerable: true, get: function get() { return _Skeleton["default"]; } }); Object.defineProperty(exports, "Slider", { enumerable: true, get: function get() { return _Slider["default"]; } }); Object.defineProperty(exports, "Status", { enumerable: true, get: function get() { return _Status["default"]; } }); Object.defineProperty(exports, "Stepper", { enumerable: true, get: function get() { return _Stepper["default"]; } }); Object.defineProperty(exports, "SubHeaderBar", { enumerable: true, get: function get() { return _SubHeaderBar["default"]; } }); Object.defineProperty(exports, "TabBar", { enumerable: true, get: function get() { return _TabBar["default"]; } }); Object.defineProperty(exports, "Toggle", { enumerable: true, get: function get() { return _Toggle["default"]; } }); Object.defineProperty(exports, "TooltipTrigger", { enumerable: true, get: function get() { return _TooltipTrigger["default"]; } }); Object.defineProperty(exports, "TreeView", { enumerable: true, get: function get() { return _TreeView["default"]; } }); Object.defineProperty(exports, "Typeahead", { enumerable: true, get: function get() { return _Typeahead["default"]; } }); Object.defineProperty(exports, "VirtualizedList", { enumerable: true, get: function get() { return _VirtualizedList["default"]; } }); Object.defineProperty(exports, "WithDrawer", { enumerable: true, get: function get() { return _WithDrawer["default"]; } }); Object.defineProperty(exports, "getTheme", { enumerable: true, get: function get() { return _theme["default"]; } }); Object.defineProperty(exports, "HeaderTitle", { enumerable: true, get: function get() { return _HeaderTitle["default"]; } }); Object.defineProperty(exports, "RichLayout", { enumerable: true, get: function get() { return _RichLayout["default"]; } }); Object.defineProperty(exports, "RichError", { enumerable: true, get: function get() { return _RichError["default"]; } }); Object.defineProperty(exports, "Table", { enumerable: true, get: function get() { return _Table["default"]; } }); Object.defineProperty(exports, "Tile", { enumerable: true, get: function get() { return _Tile["default"]; } }); Object.defineProperty(exports, "getTranslated", { enumerable: true, get: function get() { return _TranslateWrapper["default"]; } }); Object.defineProperty(exports, "I18N_DOMAIN_COMPONENTS", { enumerable: true, get: function get() { return _constants["default"]; } }); Object.defineProperty(exports, "CIRCULAR_PROGRESS_SIZE", { enumerable: true, get: function get() { return _constants.CIRCULAR_PROGRESS_SIZE; } }); exports.Well = exports.Tooltip = exports.Thumbnail = exports.Tabs = exports.TabPane = exports.TabContent = exports.TabContainer = exports.Tab = exports.SplitButton = exports.SafeAnchor = exports.Row = exports.ResponsiveEmbed = exports.Radio = exports.ProgressBar = exports.Popover = exports.PanelGroup = exports.Panel = exports.Pagination = exports.Pager = exports.PageItem = exports.PageHeader = exports.OverlayTrigger = exports.Overlay = exports.NavItem = exports.NavDropdown = exports.NavbarBrand = exports.Navbar = exports.Nav = exports.ModalTitle = exports.ModalHeader = exports.ModalFooter = exports.ModalBody = exports.Modal = exports.MenuItem = exports.Media = exports.ListGroupItem = exports.ListGroup = exports.Label = exports.Jumbotron = exports.InputGroup = exports.HelpBlock = exports.Grid = exports.Glyphicon = exports.FormGroup = exports.FormControl = exports.Form = exports.Fade = exports.DropdownButton = exports.Dropdown = exports.Collapse = exports.Col = exports.ControlLabel = exports.Clearfix = exports.CarouselItem = exports.Carousel = exports.ButtonToolbar = exports.ButtonGroup = exports.Button = exports.BreadcrumbItem = exports.Breadcrumb = exports.BootstrapTable = exports.BootstrapCheckbox = exports.BootstrapBadge = exports.Alert = void 0; var _bootstrap = _interopRequireDefault(__webpack_require__(2179)); var _AboutDialog = _interopRequireDefault(__webpack_require__(2376)); var _ActionBar = _interopRequireDefault(__webpack_require__(359)); var _ActionIntercom = _interopRequireDefault(__webpack_require__(1153)); var _ActionList = _interopRequireDefault(__webpack_require__(1154)); var _Actions = __webpack_require__(32); var _AppGuidedTour = _interopRequireDefault(__webpack_require__(2453)); var _AppLoader = _interopRequireDefault(__webpack_require__(2524)); var _AppSwitcher = _interopRequireDefault(__webpack_require__(1165)); var _Badge = _interopRequireDefault(__webpack_require__(191)); var _Breadcrumbs = _interopRequireDefault(__webpack_require__(2542)); var _Checkbox = _interopRequireDefault(__webpack_require__(363)); var _CircularProgress = _interopRequireDefault(__webpack_require__(189)); var _CollapsiblePanel = _interopRequireDefault(__webpack_require__(1167)); var _ConfirmDialog = _interopRequireDefault(__webpack_require__(2602)); var _Datalist = _interopRequireDefault(__webpack_require__(1177)); var _DataViewer = __webpack_require__(2641); var _DateTimePickers = __webpack_require__(478); var _Dialog = _interopRequireDefault(__webpack_require__(689)); var _Draggable = _interopRequireDefault(__webpack_require__(2909)); var _Drawer = _interopRequireDefault(__webpack_require__(1283)); var _EditableText = _interopRequireDefault(__webpack_require__(788)); var _Emphasis = _interopRequireDefault(__webpack_require__(712)); var _Enumeration = _interopRequireDefault(__webpack_require__(789)); var _FilterBar = _interopRequireDefault(__webpack_require__(300)); var _FocusManager = _interopRequireDefault(__webpack_require__(163)); var _GridLayout = _interopRequireDefault(__webpack_require__(3074)); var _GuidedTour = _interopRequireDefault(__webpack_require__(1157)); var _HeaderBar = _interopRequireDefault(__webpack_require__(3095)); var _HttpError = _interopRequireDefault(__webpack_require__(3098)); var _i18n = _interopRequireDefault(__webpack_require__(3101)); var _Icon = _interopRequireDefault(__webpack_require__(19)); var _IconsProvider = _interopRequireDefault(__webpack_require__(698)); var _Inject = _interopRequireDefault(__webpack_require__(58)); var _InlineMessage = __webpack_require__(3102); var _JSONSchemaRenderer = _interopRequireDefault(__webpack_require__(3105)); var _Layout = _interopRequireDefault(__webpack_require__(3113)); var _List = _interopRequireDefault(__webpack_require__(3127)); var _ListView = _interopRequireDefault(__webpack_require__(499)); var _Loader = _interopRequireDefault(__webpack_require__(797)); var _MultiSelect = _interopRequireDefault(__webpack_require__(1378)); var _Notification = _interopRequireDefault(__webpack_require__(3377)); var _ObjectViewer = _interopRequireDefault(__webpack_require__(3384)); var _PieChart = _interopRequireDefault(__webpack_require__(3406)); var _Progress = _interopRequireDefault(__webpack_require__(1150)); var _RadarChart = _interopRequireDefault(__webpack_require__(3433)); var _ResourceList = _interopRequireDefault(__webpack_require__(1496)); var _ResourcePicker = _interopRequireDefault(__webpack_require__(1500)); var _RichTooltip = _interopRequireDefault(__webpack_require__(3724)); var _SidePanel = _interopRequireDefault(__webpack_require__(3729)); var _Skeleton = _interopRequireDefault(__webpack_require__(77)); var _Slider = _interopRequireDefault(__webpack_require__(3773)); var _Status = _interopRequireDefault(__webpack_require__(1169)); var _Stepper = _interopRequireDefault(__webpack_require__(707)); var _SubHeaderBar = _interopRequireDefault(__webpack_require__(3816)); var _TabBar = _interopRequireDefault(__webpack_require__(299)); var _Toggle = _interopRequireDefault(__webpack_require__(233)); var _TooltipTrigger = _interopRequireDefault(__webpack_require__(55)); var _TreeView = _interopRequireDefault(__webpack_require__(3822)); var _Typeahead = _interopRequireDefault(__webpack_require__(364)); var _VirtualizedList = _interopRequireDefault(__webpack_require__(247)); var _WithDrawer = _interopRequireDefault(__webpack_require__(795)); var _theme = _interopRequireDefault(__webpack_require__(25)); var _HeaderTitle = _interopRequireDefault(__webpack_require__(1502)); var _RichLayout = _interopRequireDefault(__webpack_require__(378)); var _RichError = _interopRequireDefault(__webpack_require__(1501)); var _Table = _interopRequireDefault(__webpack_require__(3828)); var _Tile = _interopRequireDefault(__webpack_require__(794)); var _TranslateWrapper = _interopRequireDefault(__webpack_require__(3842)); var _constants = _interopRequireWildcard(__webpack_require__(14)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } // TODO 6.0: remove those imports // TODO 6.0: remove the component var Alert = _bootstrap["default"].Alert, Breadcrumb = _bootstrap["default"].Breadcrumb, BreadcrumbItem = _bootstrap["default"].BreadcrumbItem, Button = _bootstrap["default"].Button, ButtonGroup = _bootstrap["default"].ButtonGroup, ButtonToolbar = _bootstrap["default"].ButtonToolbar, Carousel = _bootstrap["default"].Carousel, CarouselItem = _bootstrap["default"].CarouselItem, Clearfix = _bootstrap["default"].Clearfix, ControlLabel = _bootstrap["default"].ControlLabel, Col = _bootstrap["default"].Col, Collapse = _bootstrap["default"].Collapse, Dropdown = _bootstrap["default"].Dropdown, DropdownButton = _bootstrap["default"].DropdownButton, Fade = _bootstrap["default"].Fade, Form = _bootstrap["default"].Form, FormControl = _bootstrap["default"].FormControl, FormGroup = _bootstrap["default"].FormGroup, Glyphicon = _bootstrap["default"].Glyphicon, Grid = _bootstrap["default"].Grid, HelpBlock = _bootstrap["default"].HelpBlock, InputGroup = _bootstrap["default"].InputGroup, Jumbotron = _bootstrap["default"].Jumbotron, Label = _bootstrap["default"].Label, ListGroup = _bootstrap["default"].ListGroup, ListGroupItem = _bootstrap["default"].ListGroupItem, Media = _bootstrap["default"].Media, MenuItem = _bootstrap["default"].MenuItem, Modal = _bootstrap["default"].Modal, ModalBody = _bootstrap["default"].ModalBody, ModalFooter = _bootstrap["default"].ModalFooter, ModalHeader = _bootstrap["default"].ModalHeader, ModalTitle = _bootstrap["default"].ModalTitle, Nav = _bootstrap["default"].Nav, Navbar = _bootstrap["default"].Navbar, NavbarBrand = _bootstrap["default"].NavbarBrand, NavDropdown = _bootstrap["default"].NavDropdown, NavItem = _bootstrap["default"].NavItem, Overlay = _bootstrap["default"].Overlay, OverlayTrigger = _bootstrap["default"].OverlayTrigger, PageHeader = _bootstrap["default"].PageHeader, PageItem = _bootstrap["default"].PageItem, Pager = _bootstrap["default"].Pager, Pagination = _bootstrap["default"].Pagination, Panel = _bootstrap["default"].Panel, PanelGroup = _bootstrap["default"].PanelGroup, Popover = _bootstrap["default"].Popover, ProgressBar = _bootstrap["default"].ProgressBar, Radio = _bootstrap["default"].Radio, ResponsiveEmbed = _bootstrap["default"].ResponsiveEmbed, Row = _bootstrap["default"].Row, SafeAnchor = _bootstrap["default"].SafeAnchor, SplitButton = _bootstrap["default"].SplitButton, Tab = _bootstrap["default"].Tab, TabContainer = _bootstrap["default"].TabContainer, TabContent = _bootstrap["default"].TabContent, TabPane = _bootstrap["default"].TabPane, Tabs = _bootstrap["default"].Tabs, Thumbnail = _bootstrap["default"].Thumbnail, Tooltip = _bootstrap["default"].Tooltip, Well = _bootstrap["default"].Well; exports.Well = Well; exports.Tooltip = Tooltip; exports.Thumbnail = Thumbnail; exports.Tabs = Tabs; exports.TabPane = TabPane; exports.TabContent = TabContent; exports.TabContainer = TabContainer; exports.Tab = Tab; exports.SplitButton = SplitButton; exports.SafeAnchor = SafeAnchor; exports.Row = Row; exports.ResponsiveEmbed = ResponsiveEmbed; exports.Radio = Radio; exports.ProgressBar = ProgressBar; exports.Popover = Popover; exports.PanelGroup = PanelGroup; exports.Panel = Panel; exports.Pagination = Pagination; exports.Pager = Pager; exports.PageItem = PageItem; exports.PageHeader = PageHeader; exports.OverlayTrigger = OverlayTrigger; exports.Overlay = Overlay; exports.NavItem = NavItem; exports.NavDropdown = NavDropdown; exports.NavbarBrand = NavbarBrand; exports.Navbar = Navbar; exports.Nav = Nav; exports.ModalTitle = ModalTitle; exports.ModalHeader = ModalHeader; exports.ModalFooter = ModalFooter; exports.ModalBody = ModalBody; exports.Modal = Modal; exports.MenuItem = MenuItem; exports.Media = Media; exports.ListGroupItem = ListGroupItem; exports.ListGroup = ListGroup; exports.Label = Label; exports.Jumbotron = Jumbotron; exports.InputGroup = InputGroup; exports.HelpBlock = HelpBlock; exports.Grid = Grid; exports.Glyphicon = Glyphicon; exports.FormGroup = FormGroup; exports.FormControl = FormControl; exports.Form = Form; exports.Fade = Fade; exports.DropdownButton = DropdownButton; exports.Dropdown = Dropdown; exports.Collapse = Collapse; exports.Col = Col; exports.ControlLabel = ControlLabel; exports.Clearfix = Clearfix; exports.CarouselItem = CarouselItem; exports.Carousel = Carousel; exports.ButtonToolbar = ButtonToolbar; exports.ButtonGroup = ButtonGroup; exports.Button = Button; exports.BreadcrumbItem = BreadcrumbItem; exports.Breadcrumb = Breadcrumb; exports.Alert = Alert; var BootstrapBadge = _bootstrap["default"].Badge; exports.BootstrapBadge = BootstrapBadge; var BootstrapCheckbox = _bootstrap["default"].Checkbox; exports.BootstrapCheckbox = BootstrapCheckbox; var BootstrapTable = _bootstrap["default"].Table; exports.BootstrapTable = BootstrapTable; //# sourceMappingURL=index.js.map /***/ }), /* 1063 */ /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /* 1064 */ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(141) && !__webpack_require__(185)(function () { return Object.defineProperty(__webpack_require__(1065)('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 1065 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(140); var document = __webpack_require__(123).document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; /***/ }), /* 1066 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 19.1.2.1 Object.assign(target, source, ...) var DESCRIPTORS = __webpack_require__(141); var getKeys = __webpack_require__(275); var gOPS = __webpack_require__(645); var pIE = __webpack_require__(346); var toObject = __webpack_require__(276); var IObject = __webpack_require__(639); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(185)(function () { var A = {}; var B = {}; // eslint-disable-next-line no-undef var S = Symbol(); var K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function (k) { B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars var T = toObject(target); var aLen = arguments.length; var index = 1; var getSymbols = gOPS.f; var isEnum = pIE.f; while (aLen > index) { var S = IObject(arguments[index++]); var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); var length = keys.length; var j = 0; var key; while (length > j) { key = keys[j++]; if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; } } return T; } : $assign; /***/ }), /* 1067 */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(186); var toIObject = __webpack_require__(187); var arrayIndexOf = __webpack_require__(2183)(false); var IE_PROTO = __webpack_require__(642)('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }), /* 1068 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2185); /***/ }), /* 1069 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_uncontrollable__ = __webpack_require__(75); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_uncontrollable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_uncontrollable__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__ = __webpack_require__(87); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__ = __webpack_require__(1074); var propTypes = { accordion: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, /** * When `accordion` is enabled, `activeKey` controls the which child `Panel` is expanded. `activeKey` should * match a child Panel `eventKey` prop exactly. * * @controllable onSelect */ activeKey: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any, /** * A callback fired when a child Panel collapse state changes. It's called with the next expanded `activeKey` * * @controllable activeKey */ onSelect: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, /** * An HTML role attribute */ role: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, /** * A function that takes an eventKey and type and returns a * unique id for each Panel heading and Panel Collapse. The function _must_ be a pure function, * meaning it should always return the _same_ id for the same set of inputs. The default * value requires that an `id` to be set for the PanelGroup. * * The `type` argument will either be `"body"` or `"heading"`. * * @defaultValue (eventKey, type) => `${this.props.id}-${type}-${key}` */ generateChildId: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, /** * HTML id attribute, required if no `generateChildId` prop * is specified. */ id: Object(__WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__["b" /* generatedId */])('PanelGroup') }; var defaultProps = { accordion: false }; var childContextTypes = { $bs_panelGroup: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ getId: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, headerRole: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, panelRole: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, activeKey: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any, onToggle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func }) }; var PanelGroup = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(PanelGroup, _React$Component); function PanelGroup() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; _this.handleSelect = function (key, expanded, e) { if (expanded) { _this.props.onSelect(key, e); } else if (_this.props.activeKey === key) { _this.props.onSelect(null, e); } }; return _this; } var _proto = PanelGroup.prototype; _proto.getChildContext = function getChildContext() { var _this$props = this.props, activeKey = _this$props.activeKey, accordion = _this$props.accordion, generateChildId = _this$props.generateChildId, id = _this$props.id; var getId = null; if (accordion) { getId = generateChildId || function (key, type) { return id ? id + "-" + type + "-" + key : null; }; } return { $bs_panelGroup: Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({ getId: getId, headerRole: 'tab', panelRole: 'tabpanel' }, accordion && { activeKey: activeKey, onToggle: this.handleSelect }) }; }; _proto.render = function render() { var _this$props2 = this.props, accordion = _this$props2.accordion, className = _this$props2.className, children = _this$props2.children, props = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props2, ["accordion", "className", "children"]); var _splitBsPropsAndOmit = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsPropsAndOmit"])(props, ['onSelect', 'activeKey']), bsProps = _splitBsPropsAndOmit[0], elementProps = _splitBsPropsAndOmit[1]; if (accordion) { elementProps.role = elementProps.role || 'tablist'; } var classes = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) }), __WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__["a" /* default */].map(children, function (child) { return Object(__WEBPACK_IMPORTED_MODULE_5_react__["cloneElement"])(child, { bsStyle: child.props.bsStyle || bsProps.bsStyle }); })); }; return PanelGroup; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); PanelGroup.propTypes = propTypes; PanelGroup.defaultProps = defaultProps; PanelGroup.childContextTypes = childContextTypes; /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_6_uncontrollable___default()(Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('panel-group', PanelGroup), { activeKey: 'onSelect' })); /***/ }), /* 1070 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2189); /***/ }), /* 1071 */ /***/ (function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(82); var core = __webpack_require__(72); var fails = __webpack_require__(185); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; /***/ }), /* 1072 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var invariant = function(condition, format, a, b, c, d, e, f) { if (process.env.NODE_ENV !== 'production') { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error( 'Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.' ); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error( format.replace(/%s/g, function() { return args[argIndex++]; }) ); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 1073 */ /***/ (function(module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(141); var getKeys = __webpack_require__(275); var toIObject = __webpack_require__(187); var isEnum = __webpack_require__(346).f; module.exports = function (isEntries) { return function (it) { var O = toIObject(it); var keys = getKeys(O); var length = keys.length; var i = 0; var result = []; var key; while (length > i) { key = keys[i++]; if (!DESCRIPTORS || isEnum.call(O, key)) { result.push(isEntries ? [key, O[key]] : O[key]); } } return result; }; }; /***/ }), /* 1074 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["b"] = generatedId; /* harmony export (immutable) */ __webpack_exports__["c"] = requiredRoles; /* harmony export (immutable) */ __webpack_exports__["a"] = exclusiveRoles; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types_extra_lib_utils_createChainableTypeChecker__ = __webpack_require__(347); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types_extra_lib_utils_createChainableTypeChecker___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types_extra_lib_utils_createChainableTypeChecker__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ValidComponentChildren__ = __webpack_require__(87); var idPropType = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number]); function generatedId(name) { return function (props) { var error = null; if (!props.generateChildId) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } error = idPropType.apply(void 0, [props].concat(args)); if (!error && !props.id) { error = new Error("In order to properly initialize the " + name + " in a way that is accessible to assistive technologies " + ("(such as screen readers) an `id` or a `generateChildId` prop to " + name + " is required")); } } return error; }; } function requiredRoles() { for (var _len2 = arguments.length, roles = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { roles[_key2] = arguments[_key2]; } return __WEBPACK_IMPORTED_MODULE_1_prop_types_extra_lib_utils_createChainableTypeChecker___default()(function (props, propName, component) { var missing; roles.every(function (role) { if (!__WEBPACK_IMPORTED_MODULE_2__ValidComponentChildren__["a" /* default */].some(props.children, function (child) { return child.props.bsRole === role; })) { missing = role; return false; } return true; }); if (missing) { return new Error("(children) " + component + " - Missing a required child with bsRole: " + (missing + ". " + component + " must have at least one child of each of ") + ("the following bsRoles: " + roles.join(', '))); } return null; }); } function exclusiveRoles() { for (var _len3 = arguments.length, roles = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { roles[_key3] = arguments[_key3]; } return __WEBPACK_IMPORTED_MODULE_1_prop_types_extra_lib_utils_createChainableTypeChecker___default()(function (props, propName, component) { var duplicate; roles.every(function (role) { var childrenWithRole = __WEBPACK_IMPORTED_MODULE_2__ValidComponentChildren__["a" /* default */].filter(props.children, function (child) { return child.props.bsRole === role; }); if (childrenWithRole.length > 1) { duplicate = role; return false; } return true; }); if (duplicate) { return new Error("(children) " + component + " - Duplicate children detected of bsRole: " + (duplicate + ". Only one child each allowed with the following ") + ("bsRoles: " + roles.join(', '))); } return null; }); } /***/ }), /* 1075 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__SafeAnchor__ = __webpack_require__(124); var propTypes = { /** * If set to true, renders `span` instead of `a` */ active: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * `href` attribute for the inner `a` element */ href: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, /** * `title` attribute for the inner `a` element */ title: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node, /** * `target` attribute for the inner `a` element */ target: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string }; var defaultProps = { active: false }; var BreadcrumbItem = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(BreadcrumbItem, _React$Component); function BreadcrumbItem() { return _React$Component.apply(this, arguments) || this; } var _proto = BreadcrumbItem.prototype; _proto.render = function render() { var _this$props = this.props, active = _this$props.active, href = _this$props.href, title = _this$props.title, target = _this$props.target, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["active", "href", "title", "target", "className"]); // Don't try to render these props on non-active . var linkProps = { href: href, title: title, target: target }; return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("li", { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, { active: active }) }, active ? __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span", props) : __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__SafeAnchor__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, linkProps))); }; return BreadcrumbItem; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); BreadcrumbItem.propTypes = propTypes; BreadcrumbItem.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (BreadcrumbItem); /***/ }), /* 1076 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom__ = __webpack_require__(18); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_dom__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_dom_helpers_transition__ = __webpack_require__(1077); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_dom_helpers_transition___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_dom_helpers_transition__); var propTypes = { direction: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['prev', 'next']), onAnimateOutEnd: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, active: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, animateIn: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, animateOut: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, index: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number }; var defaultProps = { active: false, animateIn: false, animateOut: false }; var CarouselItem = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(CarouselItem, _React$Component); function CarouselItem(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; _this.handleAnimateOutEnd = _this.handleAnimateOutEnd.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.state = { direction: null }; _this.isUnmounted = false; return _this; } var _proto = CarouselItem.prototype; _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (this.props.active !== nextProps.active) { this.setState({ direction: null }); } }; _proto.componentDidUpdate = function componentDidUpdate(prevProps) { var _this2 = this; var active = this.props.active; var prevActive = prevProps.active; if (!active && prevActive) { __WEBPACK_IMPORTED_MODULE_8_dom_helpers_transition___default.a.end(__WEBPACK_IMPORTED_MODULE_7_react_dom___default.a.findDOMNode(this), this.handleAnimateOutEnd); } if (active !== prevActive) { setTimeout(function () { return _this2.startAnimation(); }, 20); } }; _proto.componentWillUnmount = function componentWillUnmount() { this.isUnmounted = true; }; _proto.handleAnimateOutEnd = function handleAnimateOutEnd() { if (this.isUnmounted) { return; } if (this.props.onAnimateOutEnd) { this.props.onAnimateOutEnd(this.props.index); } }; _proto.startAnimation = function startAnimation() { if (this.isUnmounted) { return; } this.setState({ direction: this.props.direction === 'prev' ? 'right' : 'left' }); }; _proto.render = function render() { var _this$props = this.props, direction = _this$props.direction, active = _this$props.active, animateIn = _this$props.animateIn, animateOut = _this$props.animateOut, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["direction", "active", "animateIn", "animateOut", "className"]); delete props.onAnimateOutEnd; delete props.index; var classes = { item: true, active: active && !animateIn || animateOut }; if (direction && active && animateIn) { classes[direction] = true; } if (this.state.direction && (animateIn || animateOut)) { classes[this.state.direction] = true; } return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, classes) })); }; return CarouselItem; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); CarouselItem.propTypes = propTypes; CarouselItem.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (CarouselItem); /***/ }), /* 1077 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(57); exports.__esModule = true; exports.default = void 0; var _end = _interopRequireDefault(__webpack_require__(2205)); exports.end = _end.default; var _properties = _interopRequireDefault(__webpack_require__(651)); exports.properties = _properties.default; var _default = { end: _end.default, properties: _properties.default }; exports.default = _default; /***/ }), /* 1078 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(57); exports.__esModule = true; exports.default = camelizeStyleName; var _camelize = _interopRequireDefault(__webpack_require__(2206)); /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/camelizeStyleName.js */ var msPattern = /^-ms-/; function camelizeStyleName(string) { return (0, _camelize.default)(string.replace(msPattern, 'ms-')); } module.exports = exports["default"]; /***/ }), /* 1079 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = capitalize; function capitalize(string) { return "" + string.charAt(0).toUpperCase() + string.slice(1); } /***/ }), /* 1080 */ /***/ (function(module, exports) { module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; /***/ }), /* 1081 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.classNamesShape = exports.timeoutsShape = undefined; exports.transitionTimeout = transitionTimeout; var _propTypes = __webpack_require__(349); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function transitionTimeout(transitionType) { var timeoutPropName = 'transition' + transitionType + 'Timeout'; var enabledPropName = 'transition' + transitionType; return function (props) { // If the transition is enabled if (props[enabledPropName]) { // If no timeout duration is provided if (props[timeoutPropName] == null) { return new Error(timeoutPropName + ' wasn\'t supplied to CSSTransitionGroup: ' + 'this can cause unreliable animations and won\'t be supported in ' + 'a future version of React. See ' + 'https://fb.me/react-animation-transition-group-timeout for more ' + 'information.'); // If the duration isn't a number } else if (typeof props[timeoutPropName] !== 'number') { return new Error(timeoutPropName + ' must be a number (in milliseconds)'); } } return null; }; } var timeoutsShape = exports.timeoutsShape = _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.shape({ enter: _propTypes2.default.number, exit: _propTypes2.default.number }).isRequired]); var classNamesShape = exports.classNamesShape = _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({ enter: _propTypes2.default.string, exit: _propTypes2.default.string, active: _propTypes2.default.string }), _propTypes2.default.shape({ enter: _propTypes2.default.string, enterDone: _propTypes2.default.string, enterActive: _propTypes2.default.string, exit: _propTypes2.default.string, exitDone: _propTypes2.default.string, exitActive: _propTypes2.default.string })]); /***/ }), /* 1082 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2224); /***/ }), /* 1083 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $at = __webpack_require__(2225)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(1084)(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); /***/ }), /* 1084 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(443); var $export = __webpack_require__(82); var redefine = __webpack_require__(657); var hide = __webpack_require__(184); var Iterators = __webpack_require__(350); var $iterCreate = __webpack_require__(2226); var setToStringTag = __webpack_require__(446); var getPrototypeOf = __webpack_require__(2227); var ITERATOR = __webpack_require__(125)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }), /* 1085 */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(225); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; /***/ }), /* 1086 */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(350); var ITERATOR = __webpack_require__(125)('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }), /* 1087 */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(2230); var ITERATOR = __webpack_require__(125)('iterator'); var Iterators = __webpack_require__(350); module.exports = __webpack_require__(72).getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /* 1088 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (node, event, handler, capture) { (0, _on2.default)(node, event, handler, capture); return { remove: function remove() { (0, _off2.default)(node, event, handler, capture); } }; }; var _on = __webpack_require__(659); var _on2 = _interopRequireDefault(_on); var _off = __webpack_require__(660); var _off2 = _interopRequireDefault(_off); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } module.exports = exports['default']; /***/ }), /* 1089 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Button__ = __webpack_require__(348); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__SafeAnchor__ = __webpack_require__(124); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(12); var propTypes = { noCaret: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, open: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, title: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, useAnchor: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool }; var defaultProps = { open: false, useAnchor: false, bsRole: 'toggle' }; var DropdownToggle = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(DropdownToggle, _React$Component); function DropdownToggle() { return _React$Component.apply(this, arguments) || this; } var _proto = DropdownToggle.prototype; _proto.render = function render() { var _this$props = this.props, noCaret = _this$props.noCaret, open = _this$props.open, useAnchor = _this$props.useAnchor, bsClass = _this$props.bsClass, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["noCaret", "open", "useAnchor", "bsClass", "className", "children"]); delete props.bsRole; var Component = useAnchor ? __WEBPACK_IMPORTED_MODULE_7__SafeAnchor__["a" /* default */] : __WEBPACK_IMPORTED_MODULE_6__Button__["a" /* default */]; var useCaret = !noCaret; // This intentionally forwards bsSize and bsStyle (if set) to the // underlying component, to allow it to render size and style variants. // FIXME: Should this really fall back to `title` as children? return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { role: "button", className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, bsClass), "aria-haspopup": true, "aria-expanded": open }), children || props.title, useCaret && ' ', useCaret && __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("span", { className: "caret" })); }; return DropdownToggle; }(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component); DropdownToggle.propTypes = propTypes; DropdownToggle.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["bsClass"])('dropdown-toggle', DropdownToggle)); /***/ }), /* 1090 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(12); var propTypes = { /** * Turn any fixed-width grid layout into a full-width layout by this property. * * Adds `container-fluid` class. */ fluid: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * You can use a custom element for this component */ componentClass: __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'div', fluid: false }; var Grid = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Grid, _React$Component); function Grid() { return _React$Component.apply(this, arguments) || this; } var _proto = Grid.prototype; _proto.render = function render() { var _this$props = this.props, fluid = _this$props.fluid, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["fluid", "componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, fluid && 'fluid'); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return Grid; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Grid.propTypes = propTypes; Grid.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('container', Grid)); /***/ }), /* 1091 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values__ = __webpack_require__(88); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__ = __webpack_require__(76); var propTypes = { active: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any, disabled: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any, header: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node, listItem: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, href: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, type: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string }; var defaultProps = { listItem: false }; var ListGroupItem = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ListGroupItem, _React$Component); function ListGroupItem() { return _React$Component.apply(this, arguments) || this; } var _proto = ListGroupItem.prototype; _proto.renderHeader = function renderHeader(header, headingClassName) { if (__WEBPACK_IMPORTED_MODULE_5_react___default.a.isValidElement(header)) { return Object(__WEBPACK_IMPORTED_MODULE_5_react__["cloneElement"])(header, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(header.props.className, headingClassName) }); } return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("h4", { className: headingClassName }, header); }; _proto.render = function render() { var _this$props = this.props, active = _this$props.active, disabled = _this$props.disabled, className = _this$props.className, header = _this$props.header, listItem = _this$props.listItem, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["active", "disabled", "className", "header", "listItem", "children"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["getClassSet"])(bsProps), { active: active, disabled: disabled }); var Component; if (elementProps.href) { Component = 'a'; } else if (elementProps.onClick) { Component = 'button'; elementProps.type = elementProps.type || 'button'; } else if (listItem) { Component = 'li'; } else { Component = 'span'; } elementProps.className = __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, classes); // TODO: Deprecate `header` prop. if (header) { return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(Component, elementProps, this.renderHeader(header, Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'heading')), __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("p", { className: Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'text') }, children)); } return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(Component, elementProps, children); }; return ListGroupItem; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); ListGroupItem.propTypes = propTypes; ListGroupItem.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('list-group-item', Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsStyles"])(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values___default()(__WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__["d" /* State */]), ListGroupItem))); /***/ }), /* 1092 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = hasClass; function hasClass(element, className) { if (element.classList) return !!className && element.classList.contains(className);else return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1; } module.exports = exports["default"]; /***/ }), /* 1093 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _componentOrElement = __webpack_require__(450); var _componentOrElement2 = _interopRequireDefault(_componentOrElement); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(18); var _reactDom2 = _interopRequireDefault(_reactDom); var _getContainer = __webpack_require__(453); var _getContainer2 = _interopRequireDefault(_getContainer); var _ownerDocument = __webpack_require__(277); var _ownerDocument2 = _interopRequireDefault(_ownerDocument); var _LegacyPortal = __webpack_require__(2261); var _LegacyPortal2 = _interopRequireDefault(_LegacyPortal); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * The `` component renders its children into a new "subtree" outside of current component hierarchy. * You can think of it as a declarative `appendChild()`, or jQuery's `$.fn.appendTo()`. * The children of `` component will be appended to the `container` specified. */ var Portal = function (_React$Component) { _inherits(Portal, _React$Component); function Portal() { var _temp, _this, _ret; _classCallCheck(this, Portal); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.setContainer = function () { var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.props; _this._portalContainerNode = (0, _getContainer2.default)(props.container, (0, _ownerDocument2.default)(_this).body); }, _this.getMountNode = function () { return _this._portalContainerNode; }, _temp), _possibleConstructorReturn(_this, _ret); } Portal.prototype.componentDidMount = function componentDidMount() { this.setContainer(); this.forceUpdate(this.props.onRendered); }; Portal.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (nextProps.container !== this.props.container) { this.setContainer(nextProps); } }; Portal.prototype.componentWillUnmount = function componentWillUnmount() { this._portalContainerNode = null; }; Portal.prototype.render = function render() { return this.props.children && this._portalContainerNode ? _reactDom2.default.createPortal(this.props.children, this._portalContainerNode) : null; }; return Portal; }(_react2.default.Component); Portal.displayName = 'Portal'; Portal.propTypes = { /** * A Node, Component instance, or function that returns either. The `container` will have the Portal children * appended to it. */ container: _propTypes2.default.oneOfType([_componentOrElement2.default, _propTypes2.default.func]), onRendered: _propTypes2.default.func }; exports.default = _reactDom2.default.createPortal ? Portal : _LegacyPortal2.default; module.exports = exports['default']; /***/ }), /* 1094 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(12); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'div' }; var ModalBody = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ModalBody, _React$Component); function ModalBody() { return _React$Component.apply(this, arguments) || this; } var _proto = ModalBody.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return ModalBody; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); ModalBody.propTypes = propTypes; ModalBody.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('modal-body', ModalBody)); /***/ }), /* 1095 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_StyleConfig__ = __webpack_require__(76); var propTypes = { /** * A css class to apply to the Modal dialog DOM node. */ dialogClassName: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string }; var ModalDialog = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ModalDialog, _React$Component); function ModalDialog() { return _React$Component.apply(this, arguments) || this; } var _proto = ModalDialog.prototype; _proto.render = function render() { var _extends2; var _this$props = this.props, dialogClassName = _this$props.dialogClassName, className = _this$props.className, style = _this$props.style, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["dialogClassName", "className", "style", "children"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var bsClassName = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps); var modalStyle = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({ display: 'block' }, style); var dialogClasses = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps), (_extends2 = {}, _extends2[bsClassName] = false, _extends2[Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps, 'dialog')] = true, _extends2)); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { tabIndex: "-1", role: "dialog", style: modalStyle, className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, bsClassName) }), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(dialogClassName, dialogClasses) }, __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", { className: Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps, 'content'), role: "document" }, children))); }; return ModalDialog; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); ModalDialog.propTypes = propTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('modal', Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsSizes"])([__WEBPACK_IMPORTED_MODULE_7__utils_StyleConfig__["c" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_7__utils_StyleConfig__["c" /* Size */].SMALL], ModalDialog))); /***/ }), /* 1096 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(12); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'div' }; var ModalFooter = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ModalFooter, _React$Component); function ModalFooter() { return _React$Component.apply(this, arguments) || this; } var _proto = ModalFooter.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return ModalFooter; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); ModalFooter.propTypes = propTypes; ModalFooter.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('modal-footer', ModalFooter)); /***/ }), /* 1097 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_createChainedFunction__ = __webpack_require__(68); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__CloseButton__ = __webpack_require__(649); // TODO: `aria-label` should be `closeLabel`. var propTypes = { /** * Provides an accessible label for the close * button. It is used for Assistive Technology when the label text is not * readable. */ closeLabel: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, /** * Specify whether the Component should contain a close button */ closeButton: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, /** * A Callback fired when the close button is clicked. If used directly inside * a Modal component, the onHide will automatically be propagated up to the * parent Modal `onHide`. */ onHide: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func }; var defaultProps = { closeLabel: 'Close', closeButton: false }; var contextTypes = { $bs_modal: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ onHide: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func }) }; var ModalHeader = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ModalHeader, _React$Component); function ModalHeader() { return _React$Component.apply(this, arguments) || this; } var _proto = ModalHeader.prototype; _proto.render = function render() { var _this$props = this.props, closeLabel = _this$props.closeLabel, closeButton = _this$props.closeButton, onHide = _this$props.onHide, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["closeLabel", "closeButton", "onHide", "className", "children"]); var modal = this.context.$bs_modal; var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) }), closeButton && __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__CloseButton__["a" /* default */], { label: closeLabel, onClick: Object(__WEBPACK_IMPORTED_MODULE_7__utils_createChainedFunction__["a" /* default */])(modal && modal.onHide, onHide) }), children); }; return ModalHeader; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); ModalHeader.propTypes = propTypes; ModalHeader.defaultProps = defaultProps; ModalHeader.contextTypes = contextTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('modal-header', ModalHeader)); /***/ }), /* 1098 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(12); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'h4' }; var ModalTitle = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ModalTitle, _React$Component); function ModalTitle() { return _React$Component.apply(this, arguments) || this; } var _proto = ModalTitle.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return ModalTitle; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); ModalTitle.propTypes = propTypes; ModalTitle.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('modal-title', ModalTitle)); /***/ }), /* 1099 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_keycode__ = __webpack_require__(34); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_keycode___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_keycode__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom__ = __webpack_require__(18); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_dom__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types_extra_lib_all__ = __webpack_require__(159); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types_extra_lib_all___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types_extra_lib_all__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_warning__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__ = __webpack_require__(68); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_ValidComponentChildren__ = __webpack_require__(87); // TODO: Should we expose `` as ``? // TODO: This `bsStyle` is very unlike the others. Should we rename it? // TODO: `pullRight` and `pullLeft` don't render right outside of `navbar`. // Consider renaming or replacing them. var propTypes = { /** * Marks the NavItem with a matching `eventKey` as active. Has a * higher precedence over `activeHref`. */ activeKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any, /** * Marks the child NavItem with a matching `href` prop as active. */ activeHref: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, /** * NavItems are be positioned vertically. */ stacked: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, justified: __WEBPACK_IMPORTED_MODULE_8_prop_types_extra_lib_all___default()(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, function (_ref) { var justified = _ref.justified, navbar = _ref.navbar; return justified && navbar ? Error('justified navbar `Nav`s are not supported') : null; }), /** * A callback fired when a NavItem is selected. * * ```js * function ( * Any eventKey, * SyntheticEvent event? * ) * ``` */ onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, /** * ARIA role for the Nav, in the context of a TabContainer, the default will * be set to "tablist", but can be overridden by the Nav when set explicitly. * * When the role is set to "tablist" NavItem focus is managed according to * the ARIA authoring practices for tabs: * https://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel */ role: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, /** * Apply styling an alignment for use in a Navbar. This prop will be set * automatically when the Nav is used inside a Navbar. */ navbar: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * Float the Nav to the right. When `navbar` is `true` the appropriate * contextual classes are added as well. */ pullRight: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * Float the Nav to the left. When `navbar` is `true` the appropriate * contextual classes are added as well. */ pullLeft: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool }; var defaultProps = { justified: false, pullRight: false, pullLeft: false, stacked: false }; var contextTypes = { $bs_navbar: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({ bsClass: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func }), $bs_tabContainer: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({ activeKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any, onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired, getTabId: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired, getPaneId: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired }) }; var Nav = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Nav, _React$Component); function Nav() { return _React$Component.apply(this, arguments) || this; } var _proto = Nav.prototype; _proto.componentDidUpdate = function componentDidUpdate() { var _this = this; if (!this._needsRefocus) { return; } this._needsRefocus = false; var children = this.props.children; var _this$getActiveProps = this.getActiveProps(), activeKey = _this$getActiveProps.activeKey, activeHref = _this$getActiveProps.activeHref; var activeChild = __WEBPACK_IMPORTED_MODULE_12__utils_ValidComponentChildren__["a" /* default */].find(children, function (child) { return _this.isActive(child, activeKey, activeHref); }); var childrenArray = __WEBPACK_IMPORTED_MODULE_12__utils_ValidComponentChildren__["a" /* default */].toArray(children); var activeChildIndex = childrenArray.indexOf(activeChild); var childNodes = __WEBPACK_IMPORTED_MODULE_7_react_dom___default.a.findDOMNode(this).children; var activeNode = childNodes && childNodes[activeChildIndex]; if (!activeNode || !activeNode.firstChild) { return; } activeNode.firstChild.focus(); }; _proto.getActiveProps = function getActiveProps() { var tabContainer = this.context.$bs_tabContainer; if (tabContainer) { process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_9_warning___default()(this.props.activeKey == null && !this.props.activeHref, 'Specifying a `
"; } else { return "" + "
" + (node.$content()) + "
" }; }, $Base_format$20.$$arity = 3), nil) && 'format'; })($nesting[0], null, $nesting); self.$extend($$($nesting, 'DefaultFactory')); })($nesting[0], $nesting) })($nesting[0], $nesting); self.$require("asciidoctor/syntax_highlighter.rb"+ '/../' + "syntax_highlighter/highlightjs"); if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { return nil } else { return nil }; }; /* Generated by Opal 0.11.99.dev */ Opal.modules["asciidoctor/timings"] = function(Opal) { function $rb_minus(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); } function $rb_plus(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); } function $rb_gt(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); } var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy, $gvars = Opal.gvars; Opal.add_stubs(['$now', '$[]=', '$-', '$delete', '$reduce', '$+', '$[]', '$>', '$time', '$puts', '$%', '$to_f', '$read_parse', '$convert', '$read_parse_convert', '$private', '$const_defined?', '$==', '$clock_gettime']); return (function($base, $parent_nesting) { var self = $module($base, 'Asciidoctor'); var $nesting = [self].concat($parent_nesting); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Timings'); var $nesting = [self].concat($parent_nesting), $Timings_initialize$1, $Timings_start$2, $Timings_record$3, $Timings_time$4, $Timings_read$6, $Timings_parse$7, $Timings_read_parse$8, $Timings_convert$9, $Timings_read_parse_convert$10, $Timings_write$11, $Timings_total$12, $Timings_print_report$13, $a, $b, $c, $d, $e, $Timings_now$14, $Timings_now$15; self.$$prototype.timers = self.$$prototype.log = nil; Opal.def(self, '$initialize', $Timings_initialize$1 = function $$initialize() { var self = this; self.log = $hash2([], {}); return (self.timers = $hash2([], {})); }, $Timings_initialize$1.$$arity = 0); Opal.def(self, '$start', $Timings_start$2 = function $$start(key) { var self = this, $writer = nil; $writer = [key, self.$now()]; $send(self.timers, '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)]; }, $Timings_start$2.$$arity = 1); Opal.def(self, '$record', $Timings_record$3 = function $$record(key) { var self = this, $writer = nil; $writer = [key, $rb_minus(self.$now(), self.timers.$delete(key))]; $send(self.log, '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)]; }, $Timings_record$3.$$arity = 1); Opal.def(self, '$time', $Timings_time$4 = function $$time($a) { var $post_args, keys, $$5, self = this, time = nil; $post_args = Opal.slice.call(arguments, 0, arguments.length); keys = $post_args;; time = $send(keys, 'reduce', [0], ($$5 = function(sum, key){var self = $$5.$$s || this, $b; if (self.log == null) self.log = nil; if (sum == null) { sum = nil; }; if (key == null) { key = nil; }; return $rb_plus(sum, ($truthy($b = self.log['$[]'](key)) ? $b : 0));}, $$5.$$s = self, $$5.$$arity = 2, $$5)); if ($truthy($rb_gt(time, 0))) { return time } else { return nil }; }, $Timings_time$4.$$arity = -1); Opal.def(self, '$read', $Timings_read$6 = function $$read() { var self = this; return self.$time("read") }, $Timings_read$6.$$arity = 0); Opal.def(self, '$parse', $Timings_parse$7 = function $$parse() { var self = this; return self.$time("parse") }, $Timings_parse$7.$$arity = 0); Opal.def(self, '$read_parse', $Timings_read_parse$8 = function $$read_parse() { var self = this; return self.$time("read", "parse") }, $Timings_read_parse$8.$$arity = 0); Opal.def(self, '$convert', $Timings_convert$9 = function $$convert() { var self = this; return self.$time("convert") }, $Timings_convert$9.$$arity = 0); Opal.def(self, '$read_parse_convert', $Timings_read_parse_convert$10 = function $$read_parse_convert() { var self = this; return self.$time("read", "parse", "convert") }, $Timings_read_parse_convert$10.$$arity = 0); Opal.def(self, '$write', $Timings_write$11 = function $$write() { var self = this; return self.$time("write") }, $Timings_write$11.$$arity = 0); Opal.def(self, '$total', $Timings_total$12 = function $$total() { var self = this; return self.$time("read", "parse", "convert", "write") }, $Timings_total$12.$$arity = 0); Opal.def(self, '$print_report', $Timings_print_report$13 = function $$print_report(to, subject) { var self = this; if ($gvars.stdout == null) $gvars.stdout = nil; if (to == null) { to = $gvars.stdout; }; if (subject == null) { subject = nil; }; if ($truthy(subject)) { to.$puts("" + "Input file: " + (subject))}; to.$puts("" + " Time to read and parse source: " + ("%05.5f"['$%'](self.$read_parse().$to_f()))); to.$puts("" + " Time to convert document: " + ("%05.5f"['$%'](self.$convert().$to_f()))); return to.$puts("" + " Total time (read, parse and convert): " + ("%05.5f"['$%'](self.$read_parse_convert().$to_f()))); }, $Timings_print_report$13.$$arity = -1); self.$private(); if ($truthy(($truthy($a = $$$('::', 'Process')['$const_defined?']("CLOCK_MONOTONIC", false)) ? ((($b = $$$('::', 'Process', 'skip_raise')) && ($c = $b, $c) && ($d = $c) && ((($e = $d.$clock_gettime) && !$e.$$stub) || $d['$respond_to_missing?']('clock_gettime'))) ? 'method' : nil)['$==']("method") : $a))) { Opal.const_set($nesting[0], 'CLOCK_ID', $$$($$$('::', 'Process'), 'CLOCK_MONOTONIC')); return (Opal.def(self, '$now', $Timings_now$14 = function $$now() { var self = this; return $$$('::', 'Process').$clock_gettime($$($nesting, 'CLOCK_ID')) }, $Timings_now$14.$$arity = 0), nil) && 'now'; } else { return (Opal.def(self, '$now', $Timings_now$15 = function $$now() { var self = this; return $$$('::', 'Time').$now() }, $Timings_now$15.$$arity = 0), nil) && 'now' }; })($nesting[0], null, $nesting) })($nesting[0], $nesting) }; /* Generated by Opal 0.11.99.dev */ Opal.modules["asciidoctor/converter/composite"] = function(Opal) { function $rb_minus(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); } var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy; Opal.add_stubs(['$attr_reader', '$each', '$respond_to?', '$composed', '$init_backend_traits', '$backend_traits', '$new', '$find_converter', '$[]=', '$-', '$convert', '$converter_for', '$node_name', '$[]', '$handles?', '$raise']); return (function($base, $parent_nesting) { var self = $module($base, 'Asciidoctor'); var $nesting = [self].concat($parent_nesting); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'CompositeConverter'); var $nesting = [self].concat($parent_nesting), $CompositeConverter_initialize$1, $CompositeConverter_convert$4, $CompositeConverter_converter_for$5, $CompositeConverter_find_converter$6; self.$$prototype.converter_cache = self.$$prototype.converters = nil; self.$attr_reader("converters"); Opal.def(self, '$initialize', $CompositeConverter_initialize$1 = function $$initialize(backend, $a, $b) { var $post_args, $kwargs, converters, backend_traits_source, $$2, $$3, self = this; $post_args = Opal.slice.call(arguments, 1, arguments.length); $kwargs = Opal.extract_kwargs($post_args); if ($kwargs == null) { $kwargs = $hash2([], {}); } else if (!$kwargs.$$is_hash) { throw Opal.ArgumentError.$new('expected kwargs'); }; converters = $post_args;; backend_traits_source = $kwargs.$$smap["backend_traits_source"]; if (backend_traits_source == null) { backend_traits_source = nil }; self.backend = backend; $send((self.converters = converters), 'each', [], ($$2 = function(converter){var self = $$2.$$s || this; if (converter == null) { converter = nil; }; if ($truthy(converter['$respond_to?']("composed"))) { return converter.$composed(self) } else { return nil };}, $$2.$$s = self, $$2.$$arity = 1, $$2)); if ($truthy(backend_traits_source)) { self.$init_backend_traits(backend_traits_source.$backend_traits())}; return (self.converter_cache = $send($$$('::', 'Hash'), 'new', [], ($$3 = function(hash, key){var self = $$3.$$s || this, $writer = nil; if (hash == null) { hash = nil; }; if (key == null) { key = nil; }; $writer = [key, self.$find_converter(key)]; $send(hash, '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)];}, $$3.$$s = self, $$3.$$arity = 2, $$3))); }, $CompositeConverter_initialize$1.$$arity = -2); Opal.def(self, '$convert', $CompositeConverter_convert$4 = function $$convert(node, transform, opts) { var $a, self = this; if (transform == null) { transform = nil; }; if (opts == null) { opts = nil; }; return self.$converter_for((transform = ($truthy($a = transform) ? $a : node.$node_name()))).$convert(node, transform, opts); }, $CompositeConverter_convert$4.$$arity = -2); Opal.def(self, '$converter_for', $CompositeConverter_converter_for$5 = function $$converter_for(transform) { var self = this; return self.converter_cache['$[]'](transform) }, $CompositeConverter_converter_for$5.$$arity = 1); return (Opal.def(self, '$find_converter', $CompositeConverter_find_converter$6 = function $$find_converter(transform) {try { var $$7, self = this; $send(self.converters, 'each', [], ($$7 = function(candidate){var self = $$7.$$s || this; if (candidate == null) { candidate = nil; }; if ($truthy(candidate['$handles?'](transform))) { Opal.ret(candidate) } else { return nil };}, $$7.$$s = self, $$7.$$arity = 1, $$7)); return self.$raise("" + "Could not find a converter to handle transform: " + (transform)); } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } }, $CompositeConverter_find_converter$6.$$arity = 1), nil) && 'find_converter'; })($$($nesting, 'Converter'), $$$($$($nesting, 'Converter'), 'Base'), $nesting) })($nesting[0], $nesting) }; /* Generated by Opal 0.11.99.dev */ Opal.modules["asciidoctor/converter/html5"] = function(Opal) { function $rb_minus(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); } function $rb_gt(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); } function $rb_plus(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); } function $rb_le(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs <= rhs : lhs['$<='](rhs); } function $rb_lt(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); } function $rb_times(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs); } var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy, $gvars = Opal.gvars; Opal.add_stubs(['$register_for', '$default=', '$-', '$==', '$[]', '$init_backend_traits', '$node_name', '$convert_inline_quoted', '$convert_paragraph', '$convert_inline_anchor', '$convert_section', '$convert_listing', '$convert_literal', '$convert_ulist', '$convert_olist', '$convert_dlist', '$convert_admonition', '$convert_colist', '$convert_embedded', '$convert_example', '$convert_floating_title', '$convert_image', '$convert_inline_break', '$convert_inline_button', '$convert_inline_callout', '$convert_inline_footnote', '$convert_inline_image', '$convert_inline_indexterm', '$convert_inline_kbd', '$convert_inline_menu', '$convert_open', '$convert_page_break', '$convert_preamble', '$convert_quote', '$convert_sidebar', '$convert_stem', '$convert_table', '$convert_thematic_break', '$convert_verse', '$convert_video', '$convert_document', '$convert_toc', '$convert_pass', '$convert_audio', '$empty?', '$attr', '$attr?', '$<<', '$include?', '$sub_replacements', '$gsub', '$extname', '$slice', '$length', '$doctitle', '$normalize_web_path', '$primary_stylesheet_data', '$instance', '$read_asset', '$normalize_system_path', '$syntax_highlighter', '$docinfo?', '$docinfo', '$id', '$sections?', '$doctype', '$role?', '$role', '$join', '$noheader', '$convert_outline', '$generate_manname_section', '$header?', '$notitle', '$title', '$header', '$each', '$authors', '$>', '$name', '$email', '$sub_macros', '$+', '$downcase', '$concat', '$content', '$footnotes?', '$!', '$footnotes', '$index', '$text', '$nofooter', '$inspect', '$!=', '$to_i', '$attributes', '$document', '$sections', '$level', '$caption', '$captioned_title', '$numbered', '$<=', '$<', '$sectname', '$sectnum', '$title?', '$icon_uri', '$compact', '$media_uri', '$option?', '$append_boolean_attribute', '$style', '$items', '$blocks?', '$===', '$text?', '$chomp', '$safe', '$read_svg_contents', '$alt', '$image_uri', '$encode_attribute_value', '$append_link_constraint_attrs', '$highlight?', '$to_sym', '$[]=', '$format', '$*', '$count', '$start_with?', '$end_with?', '$list_marker_keyword', '$parent', '$warn', '$logger', '$context', '$error', '$new', '$size', '$columns', '$to_h', '$rows', '$colspan', '$rowspan', '$unshift', '$shift', '$pop', '$split', '$nil_or_empty?', '$type', '$catalog', '$xreftext', '$target', '$reftext', '$map', '$chop', '$read_contents', '$sub', '$match', '$private', '$upcase', '$to_s', '$handles?', '$send']); return (function($base, $parent_nesting) { var self = $module($base, 'Asciidoctor'); var $nesting = [self].concat($parent_nesting); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Html5Converter'); var $nesting = [self].concat($parent_nesting), $Html5Converter_initialize$1, $Html5Converter_convert$2, $Html5Converter_convert_document$3, $Html5Converter_convert_embedded$6, $Html5Converter_convert_outline$8, $Html5Converter_convert_section$10, $Html5Converter_convert_admonition$11, $Html5Converter_convert_audio$12, $Html5Converter_convert_colist$13, $Html5Converter_convert_dlist$16, $Html5Converter_convert_example$23, $Html5Converter_convert_floating_title$24, $Html5Converter_convert_image$25, $Html5Converter_convert_listing$26, $Html5Converter_convert_literal$27, $Html5Converter_convert_stem$28, $Html5Converter_convert_olist$30, $Html5Converter_convert_open$32, $Html5Converter_convert_page_break$33, $Html5Converter_convert_paragraph$34, $Html5Converter_convert_preamble$35, $Html5Converter_convert_quote$36, $Html5Converter_convert_thematic_break$37, $Html5Converter_convert_sidebar$38, $Html5Converter_convert_table$39, $Html5Converter_convert_toc$44, $Html5Converter_convert_ulist$45, $Html5Converter_convert_verse$47, $Html5Converter_convert_video$48, $Html5Converter_convert_inline_anchor$49, $Html5Converter_convert_inline_break$50, $Html5Converter_convert_inline_button$51, $Html5Converter_convert_inline_callout$52, $Html5Converter_convert_inline_footnote$53, $Html5Converter_convert_inline_image$54, $Html5Converter_convert_inline_indexterm$57, $Html5Converter_convert_inline_kbd$58, $Html5Converter_convert_inline_menu$59, $Html5Converter_convert_inline_quoted$60, $Html5Converter_read_svg_contents$61, $Html5Converter_append_boolean_attribute$63, $Html5Converter_append_link_constraint_attrs$64, $Html5Converter_encode_attribute_value$65, $Html5Converter_generate_manname_section$66, $Html5Converter_method_missing$67, $writer = nil; self.$$prototype.void_element_slash = self.$$prototype.xml_mode = self.$$prototype.refs = nil; self.$register_for("html5"); $writer = [["", ""]]; $send(Opal.const_set($nesting[0], 'QUOTE_TAGS', $hash2(["monospaced", "emphasis", "strong", "double", "single", "mark", "superscript", "subscript", "asciimath", "latexmath"], {"monospaced": ["", "", true], "emphasis": ["", "", true], "strong": ["", "", true], "double": ["“", "”"], "single": ["‘", "’"], "mark": ["", "", true], "superscript": ["", "", true], "subscript": ["", "", true], "asciimath": ["\\$", "\\$"], "latexmath": ["\\(", "\\)"]})), 'default=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];; Opal.const_set($nesting[0], 'DropAnchorRx', /<(?:a[^>+]+|\/a)>/); Opal.const_set($nesting[0], 'StemBreakRx', / *\\\n(?:\\?\n)*|\n\n+/); if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { Opal.const_set($nesting[0], 'SvgPreambleRx', new RegExp("" + "^" + ($$($nesting, 'CC_ALL')) + "*?(?=]*>/); } else { nil }; Opal.const_set($nesting[0], 'DimensionAttributeRx', new RegExp("" + "\\s(?:width|height|style)=([\"'])" + ($$($nesting, 'CC_ANY')) + "*?\\1")); Opal.def(self, '$initialize', $Html5Converter_initialize$1 = function $$initialize(backend, opts) { var self = this, syntax = nil; if (opts == null) { opts = $hash2([], {}); }; self.backend = backend; if (opts['$[]']("htmlsyntax")['$==']("xml")) { syntax = "xml"; self.xml_mode = true; self.void_element_slash = "/"; } else { syntax = "html"; self.xml_mode = nil; self.void_element_slash = ""; }; return self.$init_backend_traits($hash2(["basebackend", "filetype", "htmlsyntax", "outfilesuffix", "supports_templates"], {"basebackend": "html", "filetype": "html", "htmlsyntax": syntax, "outfilesuffix": ".html", "supports_templates": true})); }, $Html5Converter_initialize$1.$$arity = -2); Opal.def(self, '$convert', $Html5Converter_convert$2 = function $$convert(node, transform, opts) { var $iter = $Html5Converter_convert$2.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; if ($iter) $Html5Converter_convert$2.$$p = null; // Prepare super implicit arguments for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { $zuper[$zuper_i] = arguments[$zuper_i]; } if (transform == null) { transform = node.$node_name(); }; if (opts == null) { opts = nil; }; if (transform['$==']("inline_quoted")) { return self.$convert_inline_quoted(node) } else if (transform['$==']("paragraph")) { return self.$convert_paragraph(node) } else if (transform['$==']("inline_anchor")) { return self.$convert_inline_anchor(node) } else if (transform['$==']("section")) { return self.$convert_section(node) } else if (transform['$==']("listing")) { return self.$convert_listing(node) } else if (transform['$==']("literal")) { return self.$convert_literal(node) } else if (transform['$==']("ulist")) { return self.$convert_ulist(node) } else if (transform['$==']("olist")) { return self.$convert_olist(node) } else if (transform['$==']("dlist")) { return self.$convert_dlist(node) } else if (transform['$==']("admonition")) { return self.$convert_admonition(node) } else if (transform['$==']("colist")) { return self.$convert_colist(node) } else if (transform['$==']("embedded")) { return self.$convert_embedded(node) } else if (transform['$==']("example")) { return self.$convert_example(node) } else if (transform['$==']("floating_title")) { return self.$convert_floating_title(node) } else if (transform['$==']("image")) { return self.$convert_image(node) } else if (transform['$==']("inline_break")) { return self.$convert_inline_break(node) } else if (transform['$==']("inline_button")) { return self.$convert_inline_button(node) } else if (transform['$==']("inline_callout")) { return self.$convert_inline_callout(node) } else if (transform['$==']("inline_footnote")) { return self.$convert_inline_footnote(node) } else if (transform['$==']("inline_image")) { return self.$convert_inline_image(node) } else if (transform['$==']("inline_indexterm")) { return self.$convert_inline_indexterm(node) } else if (transform['$==']("inline_kbd")) { return self.$convert_inline_kbd(node) } else if (transform['$==']("inline_menu")) { return self.$convert_inline_menu(node) } else if (transform['$==']("open")) { return self.$convert_open(node) } else if (transform['$==']("page_break")) { return self.$convert_page_break(node) } else if (transform['$==']("preamble")) { return self.$convert_preamble(node) } else if (transform['$==']("quote")) { return self.$convert_quote(node) } else if (transform['$==']("sidebar")) { return self.$convert_sidebar(node) } else if (transform['$==']("stem")) { return self.$convert_stem(node) } else if (transform['$==']("table")) { return self.$convert_table(node) } else if (transform['$==']("thematic_break")) { return self.$convert_thematic_break(node) } else if (transform['$==']("verse")) { return self.$convert_verse(node) } else if (transform['$==']("video")) { return self.$convert_video(node) } else if (transform['$==']("document")) { return self.$convert_document(node) } else if (transform['$==']("toc")) { return self.$convert_toc(node) } else if (transform['$==']("pass")) { return self.$convert_pass(node) } else if (transform['$==']("audio")) { return self.$convert_audio(node) } else { return $send(self, Opal.find_super_dispatcher(self, 'convert', $Html5Converter_convert$2, false), $zuper, $iter) }; }, $Html5Converter_convert$2.$$arity = -2); Opal.def(self, '$convert_document', $Html5Converter_convert_document$3 = function $$convert_document(node) { var $a, $b, $c, $$4, $$5, self = this, br = nil, slash = nil, asset_uri_scheme = nil, cdn_base_url = nil, linkcss = nil, result = nil, lang_attribute = nil, authors = nil, icon_href = nil, icon_type = nil, icon_ext = nil, webfonts = nil, iconfont_stylesheet = nil, syntax_hl = nil, docinfo_content = nil, body_attrs = nil, sectioned = nil, classes = nil, details = nil, idx = nil, eqnums_val = nil, eqnums_opt = nil; br = "" + ""; if ($truthy((asset_uri_scheme = node.$attr("asset-uri-scheme", "https"))['$empty?']())) { } else { asset_uri_scheme = "" + (asset_uri_scheme) + ":" }; cdn_base_url = "" + (asset_uri_scheme) + "//cdnjs.cloudflare.com/ajax/libs"; linkcss = node['$attr?']("linkcss"); result = [""]; lang_attribute = (function() {if ($truthy(node['$attr?']("nolang"))) { return "" } else { return "" + " lang=\"" + (node.$attr("lang", "en")) + "\"" }; return nil; })(); result['$<<']("" + ""); result['$<<']("" + "\n" + "\n" + "\n" + "\n" + ""); if ($truthy(node['$attr?']("app-name"))) { result['$<<']("" + "")}; if ($truthy(node['$attr?']("description"))) { result['$<<']("" + "")}; if ($truthy(node['$attr?']("keywords"))) { result['$<<']("" + "")}; if ($truthy(node['$attr?']("authors"))) { result['$<<']("" + "")}; if ($truthy(node['$attr?']("copyright"))) { result['$<<']("" + "")}; if ($truthy(node['$attr?']("favicon"))) { if ($truthy((icon_href = node.$attr("favicon"))['$empty?']())) { icon_href = "favicon.ico"; icon_type = "image/x-icon"; } else if ($truthy((icon_ext = $$($nesting, 'Helpers').$extname(icon_href, nil)))) { icon_type = (function() {if (icon_ext['$=='](".ico")) { return "image/x-icon" } else { return "" + "image/" + (icon_ext.$slice(1, icon_ext.$length())) }; return nil; })() } else { icon_type = "image/x-icon" }; result['$<<']("" + "");}; result['$<<']("" + "" + (node.$doctitle($hash2(["sanitize", "use_fallback"], {"sanitize": true, "use_fallback": true}))) + ""); if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](node.$attr("stylesheet")))) { if ($truthy((webfonts = node.$attr("webfonts")))) { result['$<<']("" + "")}; if ($truthy(linkcss)) { result['$<<']("" + "") } else { result['$<<']("" + "") }; } else if ($truthy(node['$attr?']("stylesheet"))) { if ($truthy(linkcss)) { result['$<<']("" + "") } else { result['$<<']("" + "") }}; if ($truthy(node['$attr?']("icons", "font"))) { if ($truthy(node['$attr?']("iconfont-remote"))) { result['$<<']("" + "") } else { iconfont_stylesheet = "" + (node.$attr("iconfont-name", "font-awesome")) + ".css"; result['$<<']("" + ""); }}; if ($truthy(($truthy($a = (syntax_hl = node.$syntax_highlighter())) ? syntax_hl['$docinfo?']("head") : $a))) { result['$<<'](syntax_hl.$docinfo("head", node, $hash2(["linkcss"], {"linkcss": linkcss})))}; if ($truthy((docinfo_content = node.$docinfo())['$empty?']())) { } else { result['$<<'](docinfo_content) }; result['$<<'](""); body_attrs = (function() {if ($truthy(node.$id())) { return ["" + "id=\"" + (node.$id()) + "\""] } else { return [] }; return nil; })(); if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = (sectioned = node['$sections?']())) ? node['$attr?']("toc-class") : $c)) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) { classes = [node.$doctype(), node.$attr("toc-class"), "" + "toc-" + (node.$attr("toc-position", "header"))] } else { classes = [node.$doctype()] }; if ($truthy(node['$role?']())) { classes['$<<'](node.$role())}; body_attrs['$<<']("" + "class=\"" + (classes.$join(" ")) + "\""); if ($truthy(node['$attr?']("max-width"))) { body_attrs['$<<']("" + "style=\"max-width: " + (node.$attr("max-width")) + ";\"")}; result['$<<']("" + ""); if ($truthy((docinfo_content = node.$docinfo("header"))['$empty?']())) { } else { result['$<<'](docinfo_content) }; if ($truthy(node.$noheader())) { } else { result['$<<']("
"); if (node.$doctype()['$==']("manpage")) { result['$<<']("" + "

" + (node.$doctitle()) + " Manual Page

"); if ($truthy(($truthy($a = ($truthy($b = sectioned) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) { result['$<<']("" + "
\n" + "
" + (node.$attr("toc-title")) + "
\n" + (self.$convert_outline(node)) + "\n" + "
")}; if ($truthy(node['$attr?']("manpurpose"))) { result['$<<'](self.$generate_manname_section(node))}; } else { if ($truthy(node['$header?']())) { if ($truthy(node.$notitle())) { } else { result['$<<']("" + "

" + (node.$header().$title()) + "

") }; details = []; idx = 1; $send(node.$authors(), 'each', [], ($$4 = function(author){var self = $$4.$$s || this; if (author == null) { author = nil; }; details['$<<']("" + "" + (node.$sub_replacements(author.$name())) + "" + (br)); if ($truthy(author.$email())) { details['$<<']("" + "" + (node.$sub_macros(author.$email())) + "" + (br))}; return (idx = $rb_plus(idx, 1));}, $$4.$$s = self, $$4.$$arity = 1, $$4)); if ($truthy(node['$attr?']("revnumber"))) { details['$<<']("" + "" + (($truthy($a = node.$attr("version-label")) ? $a : "").$downcase()) + " " + (node.$attr("revnumber")) + ((function() {if ($truthy(node['$attr?']("revdate"))) { return "," } else { return "" }; return nil; })()) + "")}; if ($truthy(node['$attr?']("revdate"))) { details['$<<']("" + "" + (node.$attr("revdate")) + "")}; if ($truthy(node['$attr?']("revremark"))) { details['$<<']("" + (br) + "" + (node.$attr("revremark")) + "")}; if ($truthy(details['$empty?']())) { } else { result['$<<']("
"); result.$concat(details); result['$<<']("
"); };}; if ($truthy(($truthy($a = ($truthy($b = sectioned) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) { result['$<<']("" + "
\n" + "
" + (node.$attr("toc-title")) + "
\n" + (self.$convert_outline(node)) + "\n" + "
")}; }; result['$<<']("
"); }; result['$<<']("" + "
\n" + (node.$content()) + "\n" + "
"); if ($truthy(($truthy($a = node['$footnotes?']()) ? node['$attr?']("nofootnotes")['$!']() : $a))) { result['$<<']("" + "
");}; if ($truthy(node.$nofooter())) { } else { result['$<<']("
"); result['$<<']("
"); if ($truthy(node['$attr?']("revnumber"))) { result['$<<']("" + (node.$attr("version-label")) + " " + (node.$attr("revnumber")) + (br))}; if ($truthy(($truthy($a = node['$attr?']("last-update-label")) ? node['$attr?']("reproducible")['$!']() : $a))) { result['$<<']("" + (node.$attr("last-update-label")) + " " + (node.$attr("docdatetime")))}; result['$<<']("
"); result['$<<']("
"); }; if ($truthy(($truthy($a = syntax_hl) ? syntax_hl['$docinfo?']("footer") : $a))) { result['$<<'](syntax_hl.$docinfo("footer", node, $hash2(["cdn_base_url", "linkcss", "self_closing_tag_slash"], {"cdn_base_url": cdn_base_url, "linkcss": linkcss, "self_closing_tag_slash": slash})))}; if ($truthy(node['$attr?']("stem"))) { eqnums_val = node.$attr("eqnums", "none"); if ($truthy(eqnums_val['$empty?']())) { eqnums_val = "AMS"}; eqnums_opt = "" + " equationNumbers: { autoNumber: \"" + (eqnums_val) + "\" } "; result['$<<']("" + "\n" + "");}; if ($truthy((docinfo_content = node.$docinfo("footer"))['$empty?']())) { } else { result['$<<'](docinfo_content) }; result['$<<'](""); result['$<<'](""); return result.$join($$($nesting, 'LF')); }, $Html5Converter_convert_document$3.$$arity = 1); Opal.def(self, '$convert_embedded', $Html5Converter_convert_embedded$6 = function $$convert_embedded(node) { var $a, $b, $c, $$7, self = this, result = nil, id_attr = nil, toc_p = nil; result = []; if (node.$doctype()['$==']("manpage")) { if ($truthy(node.$notitle())) { } else { id_attr = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); result['$<<']("" + "" + (node.$doctitle()) + " Manual Page"); }; if ($truthy(node['$attr?']("manpurpose"))) { result['$<<'](self.$generate_manname_section(node))}; } else if ($truthy(($truthy($a = node['$header?']()) ? node.$notitle()['$!']() : $a))) { id_attr = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); result['$<<']("" + "" + (node.$header().$title()) + "");}; if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = node['$sections?']()) ? node['$attr?']("toc") : $c)) ? (toc_p = node.$attr("toc-placement"))['$!=']("macro") : $b)) ? toc_p['$!=']("preamble") : $a))) { result['$<<']("" + "
\n" + "
" + (node.$attr("toc-title")) + "
\n" + (self.$convert_outline(node)) + "\n" + "
")}; result['$<<'](node.$content()); if ($truthy(($truthy($a = node['$footnotes?']()) ? node['$attr?']("nofootnotes")['$!']() : $a))) { result['$<<']("" + "
");}; return result.$join($$($nesting, 'LF')); }, $Html5Converter_convert_embedded$6.$$arity = 1); Opal.def(self, '$convert_outline', $Html5Converter_convert_outline$8 = function $$convert_outline(node, opts) { var $a, $b, $$9, self = this, sectnumlevels = nil, toclevels = nil, sections = nil, result = nil; if (opts == null) { opts = $hash2([], {}); }; if ($truthy(node['$sections?']())) { } else { return nil }; sectnumlevels = ($truthy($a = opts['$[]']("sectnumlevels")) ? $a : ($truthy($b = node.$document().$attributes()['$[]']("sectnumlevels")) ? $b : 3).$to_i()); toclevels = ($truthy($a = opts['$[]']("toclevels")) ? $a : ($truthy($b = node.$document().$attributes()['$[]']("toclevels")) ? $b : 2).$to_i()); sections = node.$sections(); result = ["" + ""); return result.$join($$($nesting, 'LF')); }, $Html5Converter_convert_outline$8.$$arity = -2); Opal.def(self, '$convert_section', $Html5Converter_convert_section$10 = function $$convert_section(node) { var $a, $b, self = this, doc_attrs = nil, level = nil, title = nil, signifier = nil, id_attr = nil, id = nil, role = nil; doc_attrs = node.$document().$attributes(); level = node.$level(); if ($truthy(node.$caption())) { title = node.$captioned_title() } else if ($truthy(($truthy($a = node.$numbered()) ? $rb_le(level, ($truthy($b = doc_attrs['$[]']("sectnumlevels")) ? $b : 3).$to_i()) : $a))) { if ($truthy(($truthy($a = $rb_lt(level, 2)) ? node.$document().$doctype()['$==']("book") : $a))) { if (node.$sectname()['$==']("chapter")) { title = "" + ((function() {if ($truthy((signifier = doc_attrs['$[]']("chapter-signifier")))) { return "" + (signifier) + " " } else { return "" }; return nil; })()) + (node.$sectnum()) + " " + (node.$title()) } else if (node.$sectname()['$==']("part")) { title = "" + ((function() {if ($truthy((signifier = doc_attrs['$[]']("part-signifier")))) { return "" + (signifier) + " " } else { return "" }; return nil; })()) + (node.$sectnum(nil, ":")) + " " + (node.$title()) } else { title = "" + (node.$sectnum()) + " " + (node.$title()) } } else { title = "" + (node.$sectnum()) + " " + (node.$title()) } } else { title = node.$title() }; if ($truthy(node.$id())) { id_attr = "" + " id=\"" + ((id = node.$id())) + "\""; if ($truthy(doc_attrs['$[]']("sectlinks"))) { title = "" + "" + (title) + ""}; if ($truthy(doc_attrs['$[]']("sectanchors"))) { if (doc_attrs['$[]']("sectanchors")['$==']("after")) { title = "" + (title) + "" } else { title = "" + "" + (title) }}; } else { id_attr = "" }; if (level['$=='](0)) { return "" + "" + (title) + "\n" + (node.$content()) } else { return "" + "
\n" + "" + (title) + "\n" + ((function() {if (level['$=='](1)) { return "" + "
\n" + (node.$content()) + "\n" + "
" } else { return node.$content() }; return nil; })()) + "\n" + "
" }; }, $Html5Converter_convert_section$10.$$arity = 1); Opal.def(self, '$convert_admonition', $Html5Converter_convert_admonition$11 = function $$convert_admonition(node) { var $a, self = this, id_attr = nil, name = nil, title_element = nil, label = nil, role = nil; id_attr = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); name = node.$attr("name"); title_element = (function() {if ($truthy(node['$title?']())) { return "" + "
" + (node.$title()) + "
\n" } else { return "" }; return nil; })(); if ($truthy(node.$document()['$attr?']("icons"))) { if ($truthy(($truthy($a = node.$document()['$attr?']("icons", "font")) ? node['$attr?']("icon")['$!']() : $a))) { label = "" + "" } else { label = "" + "\""" } } else { label = "" + "
" + (node.$attr("textlabel")) + "
" }; return "" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "
\n" + (label) + "\n" + "\n" + (title_element) + (node.$content()) + "\n" + "
\n" + "
"; }, $Html5Converter_convert_admonition$11.$$arity = 1); Opal.def(self, '$convert_audio', $Html5Converter_convert_audio$12 = function $$convert_audio(node) { var $a, self = this, xml = nil, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, start_t = nil, end_t = nil, time_anchor = nil; xml = self.xml_mode; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); classes = ["audioblock", node.$role()].$compact(); class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; title_element = (function() {if ($truthy(node['$title?']())) { return "" + "
" + (node.$title()) + "
\n" } else { return "" }; return nil; })(); start_t = node.$attr("start"); end_t = node.$attr("end"); time_anchor = (function() {if ($truthy(($truthy($a = start_t) ? $a : end_t))) { return "" + "#t=" + (($truthy($a = start_t) ? $a : "")) + ((function() {if ($truthy(end_t)) { return "" + "," + (end_t) } else { return "" }; return nil; })()) } else { return "" }; return nil; })(); return "" + "\n" + (title_element) + "
\n" + "\n" + "
\n" + ""; }, $Html5Converter_convert_audio$12.$$arity = 1); Opal.def(self, '$convert_colist', $Html5Converter_convert_colist$13 = function $$convert_colist(node) { var $a, $$14, $$15, self = this, result = nil, id_attribute = nil, classes = nil, class_attribute = nil, font_icons = nil, num = nil; result = []; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); classes = ["colist", node.$style(), node.$role()].$compact(); class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; result['$<<']("" + ""); if ($truthy(node['$title?']())) { result['$<<']("" + "
" + (node.$title()) + "
")}; if ($truthy(node.$document()['$attr?']("icons"))) { result['$<<'](""); $a = [node.$document()['$attr?']("icons", "font"), 0], (font_icons = $a[0]), (num = $a[1]), $a; $send(node.$items(), 'each', [], ($$14 = function(item){var self = $$14.$$s || this, num_label = nil; if (self.void_element_slash == null) self.void_element_slash = nil; if (item == null) { item = nil; }; num = $rb_plus(num, 1); if ($truthy(font_icons)) { num_label = "" + "" + (num) + "" } else { num_label = "" + "\""" }; return result['$<<']("" + "\n" + "\n" + "\n" + "");}, $$14.$$s = self, $$14.$$arity = 1, $$14)); result['$<<']("
" + (num_label) + "" + (item.$text()) + ((function() {if ($truthy(item['$blocks?']())) { return $rb_plus($$($nesting, 'LF'), item.$content()) } else { return "" }; return nil; })()) + "
"); } else { result['$<<']("
    "); $send(node.$items(), 'each', [], ($$15 = function(item){var self = $$15.$$s || this; if (item == null) { item = nil; }; return result['$<<']("" + "
  1. \n" + "

    " + (item.$text()) + "

    " + ((function() {if ($truthy(item['$blocks?']())) { return $rb_plus($$($nesting, 'LF'), item.$content()) } else { return "" }; return nil; })()) + "\n" + "
  2. ");}, $$15.$$s = self, $$15.$$arity = 1, $$15)); result['$<<']("
"); }; result['$<<'](""); return result.$join($$($nesting, 'LF')); }, $Html5Converter_convert_colist$13.$$arity = 1); Opal.def(self, '$convert_dlist', $Html5Converter_convert_dlist$16 = function $$convert_dlist(node) { var $$17, $a, $$19, $$21, self = this, result = nil, id_attribute = nil, classes = nil, $case = nil, class_attribute = nil, slash = nil, col_style_attribute = nil, dt_style_attribute = nil; result = []; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); classes = (function() {$case = node.$style(); if ("qanda"['$===']($case)) {return ["qlist", "qanda", node.$role()]} else if ("horizontal"['$===']($case)) {return ["hdlist", node.$role()]} else {return ["dlist", node.$style(), node.$role()]}})().$compact(); class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; result['$<<']("" + ""); if ($truthy(node['$title?']())) { result['$<<']("" + "
" + (node.$title()) + "
")}; $case = node.$style(); if ("qanda"['$===']($case)) { result['$<<']("
    "); $send(node.$items(), 'each', [], ($$17 = function(terms, dd){var self = $$17.$$s || this, $$18; if (terms == null) { terms = nil; }; if (dd == null) { dd = nil; }; result['$<<']("
  1. "); $send(terms, 'each', [], ($$18 = function(dt){var self = $$18.$$s || this; if (dt == null) { dt = nil; }; return result['$<<']("" + "

    " + (dt.$text()) + "

    ");}, $$18.$$s = self, $$18.$$arity = 1, $$18)); if ($truthy(dd)) { if ($truthy(dd['$text?']())) { result['$<<']("" + "

    " + (dd.$text()) + "

    ")}; if ($truthy(dd['$blocks?']())) { result['$<<'](dd.$content())};}; return result['$<<']("
  2. ");}, $$17.$$s = self, $$17.$$arity = 2, $$17)); result['$<<']("
");} else if ("horizontal"['$===']($case)) { slash = self.void_element_slash; result['$<<'](""); if ($truthy(($truthy($a = node['$attr?']("labelwidth")) ? $a : node['$attr?']("itemwidth")))) { result['$<<'](""); col_style_attribute = (function() {if ($truthy(node['$attr?']("labelwidth"))) { return "" + " style=\"width: " + (node.$attr("labelwidth").$chomp("%")) + "%;\"" } else { return "" }; return nil; })(); result['$<<']("" + ""); col_style_attribute = (function() {if ($truthy(node['$attr?']("itemwidth"))) { return "" + " style=\"width: " + (node.$attr("itemwidth").$chomp("%")) + "%;\"" } else { return "" }; return nil; })(); result['$<<']("" + ""); result['$<<']("");}; $send(node.$items(), 'each', [], ($$19 = function(terms, dd){var self = $$19.$$s || this, $$20, first_term = nil; if (terms == null) { terms = nil; }; if (dd == null) { dd = nil; }; result['$<<'](""); result['$<<']("" + ""); result['$<<'](""); return result['$<<']("");}, $$19.$$s = self, $$19.$$arity = 2, $$19)); result['$<<']("
"); first_term = true; $send(terms, 'each', [], ($$20 = function(dt){var self = $$20.$$s || this; if (dt == null) { dt = nil; }; if ($truthy(first_term)) { } else { result['$<<']("" + "") }; result['$<<'](dt.$text()); return (first_term = nil);}, $$20.$$s = self, $$20.$$arity = 1, $$20)); result['$<<'](""); if ($truthy(dd)) { if ($truthy(dd['$text?']())) { result['$<<']("" + "

" + (dd.$text()) + "

")}; if ($truthy(dd['$blocks?']())) { result['$<<'](dd.$content())};}; result['$<<']("
");} else { result['$<<']("
"); dt_style_attribute = (function() {if ($truthy(node.$style())) { return "" } else { return " class=\"hdlist1\"" }; return nil; })(); $send(node.$items(), 'each', [], ($$21 = function(terms, dd){var self = $$21.$$s || this, $$22; if (terms == null) { terms = nil; }; if (dd == null) { dd = nil; }; $send(terms, 'each', [], ($$22 = function(dt){var self = $$22.$$s || this; if (dt == null) { dt = nil; }; return result['$<<']("" + "" + (dt.$text()) + "");}, $$22.$$s = self, $$22.$$arity = 1, $$22)); if ($truthy(dd)) { result['$<<']("
"); if ($truthy(dd['$text?']())) { result['$<<']("" + "

" + (dd.$text()) + "

")}; if ($truthy(dd['$blocks?']())) { result['$<<'](dd.$content())}; return result['$<<']("
"); } else { return nil };}, $$21.$$s = self, $$21.$$arity = 2, $$21)); result['$<<']("
");}; result['$<<'](""); return result.$join($$($nesting, 'LF')); }, $Html5Converter_convert_dlist$16.$$arity = 1); Opal.def(self, '$convert_example', $Html5Converter_convert_example$23 = function $$convert_example(node) { var self = this, id_attribute = nil, class_attribute = nil, summary_element = nil, title_element = nil, role = nil; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); if ($truthy(node['$option?']("collapsible"))) { class_attribute = (function() {if ($truthy(node.$role())) { return "" + " class=\"" + (node.$role()) + "\"" } else { return "" }; return nil; })(); summary_element = (function() {if ($truthy(node['$title?']())) { return "" + "" + (node.$title()) + "" } else { return "Details" }; return nil; })(); return "" + "\n" + (summary_element) + "\n" + "
\n" + (node.$content()) + "\n" + "
\n" + ""; } else { title_element = (function() {if ($truthy(node['$title?']())) { return "" + "
" + (node.$captioned_title()) + "
\n" } else { return "" }; return nil; })(); return "" + "\n" + (title_element) + "
\n" + (node.$content()) + "\n" + "
\n" + ""; }; }, $Html5Converter_convert_example$23.$$arity = 1); Opal.def(self, '$convert_floating_title', $Html5Converter_convert_floating_title$24 = function $$convert_floating_title(node) { var self = this, tag_name = nil, id_attribute = nil, classes = nil; tag_name = "" + "h" + ($rb_plus(node.$level(), 1)); id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); classes = [node.$style(), node.$role()].$compact(); return "" + "<" + (tag_name) + (id_attribute) + " class=\"" + (classes.$join(" ")) + "\">" + (node.$title()) + ""; }, $Html5Converter_convert_floating_title$24.$$arity = 1); Opal.def(self, '$convert_image', $Html5Converter_convert_image$25 = function $$convert_image(node) { var $a, $b, $c, self = this, target = nil, width_attr = nil, height_attr = nil, svg = nil, obj = nil, img = nil, fallback = nil, id_attr = nil, classes = nil, class_attr = nil, title_el = nil; target = node.$attr("target"); width_attr = (function() {if ($truthy(node['$attr?']("width"))) { return "" + " width=\"" + (node.$attr("width")) + "\"" } else { return "" }; return nil; })(); height_attr = (function() {if ($truthy(node['$attr?']("height"))) { return "" + " height=\"" + (node.$attr("height")) + "\"" } else { return "" }; return nil; })(); if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = node['$attr?']("format", "svg")) ? $c : target['$include?'](".svg"))) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $b)) ? ($truthy($b = (svg = node['$option?']("inline"))) ? $b : (obj = node['$option?']("interactive"))) : $a))) { if ($truthy(svg)) { img = ($truthy($a = self.$read_svg_contents(node, target)) ? $a : "" + "" + (node.$alt()) + "") } else if ($truthy(obj)) { fallback = (function() {if ($truthy(node['$attr?']("fallback"))) { return "" + "\""" } else { return "" + "" + (node.$alt()) + "" }; return nil; })(); img = "" + "" + (fallback) + "";}}; img = ($truthy($a = img) ? $a : "" + "\"""); if ($truthy(node['$attr?']("link"))) { img = "" + "" + (img) + ""}; id_attr = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); classes = ["imageblock"]; if ($truthy(node['$attr?']("float"))) { classes['$<<'](node.$attr("float"))}; if ($truthy(node['$attr?']("align"))) { classes['$<<']("" + "text-" + (node.$attr("align")))}; if ($truthy(node.$role())) { classes['$<<'](node.$role())}; class_attr = "" + " class=\"" + (classes.$join(" ")) + "\""; title_el = (function() {if ($truthy(node['$title?']())) { return "" + "\n
" + (node.$captioned_title()) + "
" } else { return "" }; return nil; })(); return "" + "\n" + "
\n" + (img) + "\n" + "
" + (title_el) + "\n" + ""; }, $Html5Converter_convert_image$25.$$arity = 1); Opal.def(self, '$convert_listing', $Html5Converter_convert_listing$26 = function $$convert_listing(node) { var $a, self = this, nowrap = nil, lang = nil, syntax_hl = nil, opts = nil, doc_attrs = nil, $writer = nil, pre_open = nil, pre_close = nil, id_attribute = nil, title_element = nil, role = nil; nowrap = ($truthy($a = node['$option?']("nowrap")) ? $a : node.$document()['$attr?']("prewrap")['$!']()); if (node.$style()['$==']("source")) { lang = node.$attr("language"); if ($truthy((syntax_hl = node.$document().$syntax_highlighter()))) { opts = (function() {if ($truthy(syntax_hl['$highlight?']())) { return $hash2(["css_mode", "style"], {"css_mode": ($truthy($a = (doc_attrs = node.$document().$attributes())['$[]']("" + (syntax_hl.$name()) + "-css")) ? $a : "class").$to_sym(), "style": doc_attrs['$[]']("" + (syntax_hl.$name()) + "-style")}) } else { return $hash2([], {}) }; return nil; })(); $writer = ["nowrap", nowrap]; $send(opts, '[]=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];; } else { pre_open = "" + "
";
            pre_close = "
"; }; } else { pre_open = "" + ""; pre_close = ""; }; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); title_element = (function() {if ($truthy(node['$title?']())) { return "" + "
" + (node.$captioned_title()) + "
\n" } else { return "" }; return nil; })(); return "" + "\n" + (title_element) + "
\n" + ((function() {if ($truthy(syntax_hl)) { return syntax_hl.$format(node, lang, opts); } else { return $rb_plus($rb_plus(pre_open, ($truthy($a = node.$content()) ? $a : "")), pre_close) }; return nil; })()) + "\n" + "
\n" + ""; }, $Html5Converter_convert_listing$26.$$arity = 1); Opal.def(self, '$convert_literal', $Html5Converter_convert_literal$27 = function $$convert_literal(node) { var $a, self = this, id_attribute = nil, title_element = nil, nowrap = nil, role = nil; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); title_element = (function() {if ($truthy(node['$title?']())) { return "" + "
" + (node.$title()) + "
\n" } else { return "" }; return nil; })(); nowrap = ($truthy($a = node.$document()['$attr?']("prewrap")['$!']()) ? $a : node['$option?']("nowrap")); return "" + "\n" + (title_element) + "
\n" + "" + (node.$content()) + "\n" + "
\n" + ""; }, $Html5Converter_convert_literal$27.$$arity = 1); Opal.def(self, '$convert_stem', $Html5Converter_convert_stem$28 = function $$convert_stem(node) { var $a, $b, $$29, self = this, id_attribute = nil, title_element = nil, style = nil, open = nil, close = nil, equation = nil, br = nil, role = nil; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); title_element = (function() {if ($truthy(node['$title?']())) { return "" + "
" + (node.$title()) + "
\n" } else { return "" }; return nil; })(); $b = $$($nesting, 'BLOCK_MATH_DELIMITERS')['$[]']((style = node.$style().$to_sym())), $a = Opal.to_ary($b), (open = ($a[0] == null ? nil : $a[0])), (close = ($a[1] == null ? nil : $a[1])), $b; if ($truthy((equation = node.$content()))) { if ($truthy((($a = style['$==']("asciimath")) ? equation['$include?']($$($nesting, 'LF')) : style['$==']("asciimath")))) { br = "" + "" + ($$($nesting, 'LF')); equation = $send(equation, 'gsub', [$$($nesting, 'StemBreakRx')], ($$29 = function(){var self = $$29.$$s || this, $c; return "" + (close) + ($rb_times(br, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$count($$($nesting, 'LF')))) + (open)}, $$29.$$s = self, $$29.$$arity = 0, $$29));}; if ($truthy(($truthy($a = equation['$start_with?'](open)) ? equation['$end_with?'](close) : $a))) { } else { equation = "" + (open) + (equation) + (close) }; } else { equation = "" }; return "" + "\n" + (title_element) + "
\n" + (equation) + "\n" + "
\n" + ""; }, $Html5Converter_convert_stem$28.$$arity = 1); Opal.def(self, '$convert_olist', $Html5Converter_convert_olist$30 = function $$convert_olist(node) { var $$31, self = this, result = nil, id_attribute = nil, classes = nil, class_attribute = nil, type_attribute = nil, keyword = nil, start_attribute = nil, reversed_attribute = nil; result = []; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); classes = ["olist", node.$style(), node.$role()].$compact(); class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; result['$<<']("" + ""); if ($truthy(node['$title?']())) { result['$<<']("" + "
" + (node.$title()) + "
")}; type_attribute = (function() {if ($truthy((keyword = node.$list_marker_keyword()))) { return "" + " type=\"" + (keyword) + "\"" } else { return "" }; return nil; })(); start_attribute = (function() {if ($truthy(node['$attr?']("start"))) { return "" + " start=\"" + (node.$attr("start")) + "\"" } else { return "" }; return nil; })(); reversed_attribute = (function() {if ($truthy(node['$option?']("reversed"))) { return self.$append_boolean_attribute("reversed", self.xml_mode); } else { return "" }; return nil; })(); result['$<<']("" + "
    "); $send(node.$items(), 'each', [], ($$31 = function(item){var self = $$31.$$s || this; if (item == null) { item = nil; }; if ($truthy(item.$id())) { result['$<<']("" + "
  1. ") } else if ($truthy(item.$role())) { result['$<<']("" + "
  2. ") } else { result['$<<']("
  3. ") }; result['$<<']("" + "

    " + (item.$text()) + "

    "); if ($truthy(item['$blocks?']())) { result['$<<'](item.$content())}; return result['$<<']("
  4. ");}, $$31.$$s = self, $$31.$$arity = 1, $$31)); result['$<<']("
"); result['$<<'](""); return result.$join($$($nesting, 'LF')); }, $Html5Converter_convert_olist$30.$$arity = 1); Opal.def(self, '$convert_open', $Html5Converter_convert_open$32 = function $$convert_open(node) { var $a, $b, $c, self = this, style = nil, id_attr = nil, title_el = nil, role = nil; if ((style = node.$style())['$==']("abstract")) { if ($truthy((($a = node.$parent()['$=='](node.$document())) ? node.$document().$doctype()['$==']("book") : node.$parent()['$=='](node.$document())))) { self.$logger().$warn("abstract block cannot be used in a document without a title when doctype is book. Excluding block content."); return ""; } else { id_attr = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); title_el = (function() {if ($truthy(node['$title?']())) { return "" + "
" + (node.$title()) + "
\n" } else { return "" }; return nil; })(); return "" + "\n" + (title_el) + "
\n" + (node.$content()) + "\n" + "
\n" + ""; } } else if ($truthy((($a = style['$==']("partintro")) ? ($truthy($b = ($truthy($c = $rb_gt(node.$level(), 0)) ? $c : node.$parent().$context()['$!=']("section"))) ? $b : node.$document().$doctype()['$!=']("book")) : style['$==']("partintro")))) { self.$logger().$error("partintro block can only be used when doctype is book and must be a child of a book part. Excluding block content."); return ""; } else { id_attr = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); title_el = (function() {if ($truthy(node['$title?']())) { return "" + "
" + (node.$title()) + "
\n" } else { return "" }; return nil; })(); return "" + "" }, $Html5Converter_convert_page_break$33.$$arity = 1); Opal.def(self, '$convert_paragraph', $Html5Converter_convert_paragraph$34 = function $$convert_paragraph(node) { var self = this, attributes = nil; if ($truthy(node.$role())) { attributes = "" + ((function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })()) + " class=\"paragraph " + (node.$role()) + "\"" } else if ($truthy(node.$id())) { attributes = "" + " id=\"" + (node.$id()) + "\" class=\"paragraph\"" } else { attributes = " class=\"paragraph\"" }; if ($truthy(node['$title?']())) { return "" + "\n" + "
" + (node.$title()) + "
\n" + "

" + (node.$content()) + "

\n" + "" } else { return "" + "\n" + "

" + (node.$content()) + "

\n" + "" }; }, $Html5Converter_convert_paragraph$34.$$arity = 1); Opal.alias(self, "convert_pass", "content_only"); Opal.def(self, '$convert_preamble', $Html5Converter_convert_preamble$35 = function $$convert_preamble(node) { var $a, $b, self = this, doc = nil, toc = nil; if ($truthy(($truthy($a = ($truthy($b = (doc = node.$document())['$attr?']("toc-placement", "preamble")) ? doc['$sections?']() : $b)) ? doc['$attr?']("toc") : $a))) { toc = "" + "\n" + "
\n" + "
" + (doc.$attr("toc-title")) + "
\n" + (self.$convert_outline(doc)) + "\n" + "
" } else { toc = "" }; return "" + "
\n" + "
\n" + (node.$content()) + "\n" + "
" + (toc) + "\n" + "
"; }, $Html5Converter_convert_preamble$35.$$arity = 1); Opal.def(self, '$convert_quote', $Html5Converter_convert_quote$36 = function $$convert_quote(node) { var $a, self = this, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, attribution = nil, citetitle = nil, cite_element = nil, attribution_text = nil, attribution_element = nil; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); classes = ["quoteblock", node.$role()].$compact(); class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; title_element = (function() {if ($truthy(node['$title?']())) { return "" + "\n
" + (node.$title()) + "
" } else { return "" }; return nil; })(); attribution = (function() {if ($truthy(node['$attr?']("attribution"))) { return node.$attr("attribution"); } else { return nil }; return nil; })(); citetitle = (function() {if ($truthy(node['$attr?']("citetitle"))) { return node.$attr("citetitle"); } else { return nil }; return nil; })(); if ($truthy(($truthy($a = attribution) ? $a : citetitle))) { cite_element = (function() {if ($truthy(citetitle)) { return "" + "" + (citetitle) + "" } else { return "" }; return nil; })(); attribution_text = (function() {if ($truthy(attribution)) { return "" + "— " + (attribution) + ((function() {if ($truthy(citetitle)) { return "" + "\n" } else { return "" }; return nil; })()) } else { return "" }; return nil; })(); attribution_element = "" + "\n
\n" + (attribution_text) + (cite_element) + "\n
"; } else { attribution_element = "" }; return "" + "" + (title_element) + "\n" + "
\n" + (node.$content()) + "\n" + "
" + (attribution_element) + "\n" + ""; }, $Html5Converter_convert_quote$36.$$arity = 1); Opal.def(self, '$convert_thematic_break', $Html5Converter_convert_thematic_break$37 = function $$convert_thematic_break(node) { var self = this; return "" + "" }, $Html5Converter_convert_thematic_break$37.$$arity = 1); Opal.def(self, '$convert_sidebar', $Html5Converter_convert_sidebar$38 = function $$convert_sidebar(node) { var self = this, id_attribute = nil, title_element = nil, role = nil; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); title_element = (function() {if ($truthy(node['$title?']())) { return "" + "
" + (node.$title()) + "
\n" } else { return "" }; return nil; })(); return "" + "\n" + "
\n" + (title_element) + (node.$content()) + "\n" + "
\n" + ""; }, $Html5Converter_convert_sidebar$38.$$arity = 1); Opal.def(self, '$convert_table', $Html5Converter_convert_table$39 = function $$convert_table(node) { var $a, $$40, $$41, self = this, result = nil, id_attribute = nil, classes = nil, stripes = nil, styles = nil, autowidth = nil, tablewidth = nil, role = nil, class_attribute = nil, style_attribute = nil, slash = nil; result = []; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); classes = ["tableblock", "" + "frame-" + (node.$attr("frame", "all", "table-frame")), "" + "grid-" + (node.$attr("grid", "all", "table-grid"))]; if ($truthy((stripes = node.$attr("stripes", nil, "table-stripes")))) { classes['$<<']("" + "stripes-" + (stripes))}; styles = []; if ($truthy(($truthy($a = (autowidth = node['$option?']("autowidth"))) ? node['$attr?']("width")['$!']() : $a))) { classes['$<<']("fit-content") } else if ((tablewidth = node.$attr("tablepcwidth"))['$=='](100)) { classes['$<<']("stretch") } else { styles['$<<']("" + "width: " + (tablewidth) + "%;") }; if ($truthy(node['$attr?']("float"))) { classes['$<<'](node.$attr("float"))}; if ($truthy((role = node.$role()))) { classes['$<<'](role)}; class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; style_attribute = (function() {if ($truthy(styles['$empty?']())) { return "" } else { return "" + " style=\"" + (styles.$join(" ")) + "\"" }; return nil; })(); result['$<<']("" + ""); if ($truthy(node['$title?']())) { result['$<<']("" + "" + (node.$captioned_title()) + "")}; if ($truthy($rb_gt(node.$attr("rowcount"), 0))) { slash = self.void_element_slash; result['$<<'](""); if ($truthy(autowidth)) { result = $rb_plus(result, $$($nesting, 'Array').$new(node.$columns().$size(), "" + "")) } else { $send(node.$columns(), 'each', [], ($$40 = function(col){var self = $$40.$$s || this; if (col == null) { col = nil; }; return result['$<<']((function() {if ($truthy(col['$option?']("autowidth"))) { return "" + "" } else { return "" + "" }; return nil; })());}, $$40.$$s = self, $$40.$$arity = 1, $$40)) }; result['$<<'](""); $send(node.$rows().$to_h(), 'each', [], ($$41 = function(tsec, rows){var self = $$41.$$s || this, $$42; if (tsec == null) { tsec = nil; }; if (rows == null) { rows = nil; }; if ($truthy(rows['$empty?']())) { return nil;}; result['$<<']("" + ""); $send(rows, 'each', [], ($$42 = function(row){var self = $$42.$$s || this, $$43; if (row == null) { row = nil; }; result['$<<'](""); $send(row, 'each', [], ($$43 = function(cell){var self = $$43.$$s || this, $b, cell_content = nil, $case = nil, cell_tag_name = nil, cell_class_attribute = nil, cell_colspan_attribute = nil, cell_rowspan_attribute = nil, cell_style_attribute = nil; if (cell == null) { cell = nil; }; if (tsec['$==']("head")) { cell_content = cell.$text() } else { $case = cell.$style(); if ("asciidoc"['$===']($case)) {cell_content = "" + "
" + (cell.$content()) + "
"} else if ("literal"['$===']($case)) {cell_content = "" + "
" + (cell.$text()) + "
"} else {cell_content = (function() {if ($truthy((cell_content = cell.$content())['$empty?']())) { return "" } else { return "" + "

" + (cell_content.$join("" + "

\n" + "

")) + "

" }; return nil; })()} }; cell_tag_name = (function() {if ($truthy(($truthy($b = tsec['$==']("head")) ? $b : cell.$style()['$==']("header")))) { return "th" } else { return "td" }; return nil; })(); cell_class_attribute = "" + " class=\"tableblock halign-" + (cell.$attr("halign")) + " valign-" + (cell.$attr("valign")) + "\""; cell_colspan_attribute = (function() {if ($truthy(cell.$colspan())) { return "" + " colspan=\"" + (cell.$colspan()) + "\"" } else { return "" }; return nil; })(); cell_rowspan_attribute = (function() {if ($truthy(cell.$rowspan())) { return "" + " rowspan=\"" + (cell.$rowspan()) + "\"" } else { return "" }; return nil; })(); cell_style_attribute = (function() {if ($truthy(node.$document()['$attr?']("cellbgcolor"))) { return "" + " style=\"background-color: " + (node.$document().$attr("cellbgcolor")) + ";\"" } else { return "" }; return nil; })(); return result['$<<']("" + "<" + (cell_tag_name) + (cell_class_attribute) + (cell_colspan_attribute) + (cell_rowspan_attribute) + (cell_style_attribute) + ">" + (cell_content) + "");}, $$43.$$s = self, $$43.$$arity = 1, $$43)); return result['$<<']("");}, $$42.$$s = self, $$42.$$arity = 1, $$42)); return result['$<<']("" + "
");}, $$41.$$s = self, $$41.$$arity = 2, $$41));}; result['$<<'](""); return result.$join($$($nesting, 'LF')); }, $Html5Converter_convert_table$39.$$arity = 1); Opal.def(self, '$convert_toc', $Html5Converter_convert_toc$44 = function $$convert_toc(node) { var $a, $b, self = this, doc = nil, id_attr = nil, title_id_attr = nil, title = nil, levels = nil, role = nil; if ($truthy(($truthy($a = ($truthy($b = (doc = node.$document())['$attr?']("toc-placement", "macro")) ? doc['$sections?']() : $b)) ? doc['$attr?']("toc") : $a))) { } else { return "" }; if ($truthy(node.$id())) { id_attr = "" + " id=\"" + (node.$id()) + "\""; title_id_attr = "" + " id=\"" + (node.$id()) + "title\""; } else { id_attr = " id=\"toc\""; title_id_attr = " id=\"toctitle\""; }; title = (function() {if ($truthy(node['$title?']())) { return node.$title() } else { return doc.$attr("toc-title"); }; return nil; })(); levels = (function() {if ($truthy(node['$attr?']("levels"))) { return node.$attr("levels").$to_i() } else { return nil }; return nil; })(); role = (function() {if ($truthy(node['$role?']())) { return node.$role() } else { return doc.$attr("toc-class", "toc"); }; return nil; })(); return "" + "\n" + "" + (title) + "\n" + (self.$convert_outline(doc, $hash2(["toclevels"], {"toclevels": levels}))) + "\n" + ""; }, $Html5Converter_convert_toc$44.$$arity = 1); Opal.def(self, '$convert_ulist', $Html5Converter_convert_ulist$45 = function $$convert_ulist(node) { var $$46, self = this, result = nil, id_attribute = nil, div_classes = nil, marker_checked = nil, marker_unchecked = nil, checklist = nil, ul_class_attribute = nil; result = []; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); div_classes = ["ulist", node.$style(), node.$role()].$compact(); marker_checked = (marker_unchecked = ""); if ($truthy((checklist = node['$option?']("checklist")))) { div_classes.$unshift(div_classes.$shift(), "checklist"); ul_class_attribute = " class=\"checklist\""; if ($truthy(node['$option?']("interactive"))) { if ($truthy(self.xml_mode)) { marker_checked = " "; marker_unchecked = " "; } else { marker_checked = " "; marker_unchecked = " "; } } else if ($truthy(node.$document()['$attr?']("icons", "font"))) { marker_checked = " "; marker_unchecked = " "; } else { marker_checked = "✓ "; marker_unchecked = "❏ "; }; } else { ul_class_attribute = (function() {if ($truthy(node.$style())) { return "" + " class=\"" + (node.$style()) + "\"" } else { return "" }; return nil; })() }; result['$<<']("" + ""); if ($truthy(node['$title?']())) { result['$<<']("" + "
" + (node.$title()) + "
")}; result['$<<']("" + ""); $send(node.$items(), 'each', [], ($$46 = function(item){var self = $$46.$$s || this, $a; if (item == null) { item = nil; }; if ($truthy(item.$id())) { result['$<<']("" + "
  • ") } else if ($truthy(item.$role())) { result['$<<']("" + "
  • ") } else { result['$<<']("
  • ") }; if ($truthy(($truthy($a = checklist) ? item['$attr?']("checkbox") : $a))) { result['$<<']("" + "

    " + ((function() {if ($truthy(item['$attr?']("checked"))) { return marker_checked } else { return marker_unchecked }; return nil; })()) + (item.$text()) + "

    ") } else { result['$<<']("" + "

    " + (item.$text()) + "

    ") }; if ($truthy(item['$blocks?']())) { result['$<<'](item.$content())}; return result['$<<']("
  • ");}, $$46.$$s = self, $$46.$$arity = 1, $$46)); result['$<<'](""); result['$<<'](""); return result.$join($$($nesting, 'LF')); }, $Html5Converter_convert_ulist$45.$$arity = 1); Opal.def(self, '$convert_verse', $Html5Converter_convert_verse$47 = function $$convert_verse(node) { var $a, self = this, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, attribution = nil, citetitle = nil, cite_element = nil, attribution_text = nil, attribution_element = nil; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); classes = ["verseblock", node.$role()].$compact(); class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; title_element = (function() {if ($truthy(node['$title?']())) { return "" + "\n
    " + (node.$title()) + "
    " } else { return "" }; return nil; })(); attribution = (function() {if ($truthy(node['$attr?']("attribution"))) { return node.$attr("attribution"); } else { return nil }; return nil; })(); citetitle = (function() {if ($truthy(node['$attr?']("citetitle"))) { return node.$attr("citetitle"); } else { return nil }; return nil; })(); if ($truthy(($truthy($a = attribution) ? $a : citetitle))) { cite_element = (function() {if ($truthy(citetitle)) { return "" + "" + (citetitle) + "" } else { return "" }; return nil; })(); attribution_text = (function() {if ($truthy(attribution)) { return "" + "— " + (attribution) + ((function() {if ($truthy(citetitle)) { return "" + "\n" } else { return "" }; return nil; })()) } else { return "" }; return nil; })(); attribution_element = "" + "\n
    \n" + (attribution_text) + (cite_element) + "\n
    "; } else { attribution_element = "" }; return "" + "" + (title_element) + "\n" + "
    " + (node.$content()) + "
    " + (attribution_element) + "\n" + ""; }, $Html5Converter_convert_verse$47.$$arity = 1); Opal.def(self, '$convert_video', $Html5Converter_convert_video$48 = function $$convert_video(node) { var $a, $b, self = this, xml = nil, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, width_attribute = nil, height_attribute = nil, $case = nil, asset_uri_scheme = nil, start_anchor = nil, delimiter = nil, autoplay_param = nil, loop_param = nil, muted_param = nil, rel_param_val = nil, start_param = nil, end_param = nil, has_loop_param = nil, mute_param = nil, controls_param = nil, fs_param = nil, fs_attribute = nil, modest_param = nil, theme_param = nil, hl_param = nil, target = nil, list = nil, list_param = nil, playlist = nil, poster_attribute = nil, val = nil, preload_attribute = nil, start_t = nil, end_t = nil, time_anchor = nil; xml = self.xml_mode; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); classes = ["videoblock"]; if ($truthy(node['$attr?']("float"))) { classes['$<<'](node.$attr("float"))}; if ($truthy(node['$attr?']("align"))) { classes['$<<']("" + "text-" + (node.$attr("align")))}; if ($truthy(node.$role())) { classes['$<<'](node.$role())}; class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; title_element = (function() {if ($truthy(node['$title?']())) { return "" + "\n
    " + (node.$title()) + "
    " } else { return "" }; return nil; })(); width_attribute = (function() {if ($truthy(node['$attr?']("width"))) { return "" + " width=\"" + (node.$attr("width")) + "\"" } else { return "" }; return nil; })(); height_attribute = (function() {if ($truthy(node['$attr?']("height"))) { return "" + " height=\"" + (node.$attr("height")) + "\"" } else { return "" }; return nil; })(); return (function() {$case = node.$attr("poster"); if ("vimeo"['$===']($case)) { if ($truthy((asset_uri_scheme = node.$document().$attr("asset-uri-scheme", "https"))['$empty?']())) { } else { asset_uri_scheme = "" + (asset_uri_scheme) + ":" }; start_anchor = (function() {if ($truthy(node['$attr?']("start"))) { return "" + "#at=" + (node.$attr("start")) } else { return "" }; return nil; })(); delimiter = ["?"]; autoplay_param = (function() {if ($truthy(node['$option?']("autoplay"))) { return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "autoplay=1" } else { return "" }; return nil; })(); loop_param = (function() {if ($truthy(node['$option?']("loop"))) { return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "loop=1" } else { return "" }; return nil; })(); muted_param = (function() {if ($truthy(node['$option?']("muted"))) { return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "muted=1" } else { return "" }; return nil; })(); return "" + "" + (title_element) + "\n" + "
    \n" + "\n" + "
    \n" + "";} else if ("youtube"['$===']($case)) { if ($truthy((asset_uri_scheme = node.$document().$attr("asset-uri-scheme", "https"))['$empty?']())) { } else { asset_uri_scheme = "" + (asset_uri_scheme) + ":" }; rel_param_val = (function() {if ($truthy(node['$option?']("related"))) { return 1 } else { return 0 }; return nil; })(); start_param = (function() {if ($truthy(node['$attr?']("start"))) { return "" + "&start=" + (node.$attr("start")) } else { return "" }; return nil; })(); end_param = (function() {if ($truthy(node['$attr?']("end"))) { return "" + "&end=" + (node.$attr("end")) } else { return "" }; return nil; })(); autoplay_param = (function() {if ($truthy(node['$option?']("autoplay"))) { return "&autoplay=1" } else { return "" }; return nil; })(); loop_param = (function() {if ($truthy((has_loop_param = node['$option?']("loop")))) { return "&loop=1" } else { return "" }; return nil; })(); mute_param = (function() {if ($truthy(node['$option?']("muted"))) { return "&mute=1" } else { return "" }; return nil; })(); controls_param = (function() {if ($truthy(node['$option?']("nocontrols"))) { return "&controls=0" } else { return "" }; return nil; })(); if ($truthy(node['$option?']("nofullscreen"))) { fs_param = "&fs=0"; fs_attribute = ""; } else { fs_param = ""; fs_attribute = self.$append_boolean_attribute("allowfullscreen", xml); }; modest_param = (function() {if ($truthy(node['$option?']("modest"))) { return "&modestbranding=1" } else { return "" }; return nil; })(); theme_param = (function() {if ($truthy(node['$attr?']("theme"))) { return "" + "&theme=" + (node.$attr("theme")) } else { return "" }; return nil; })(); hl_param = (function() {if ($truthy(node['$attr?']("lang"))) { return "" + "&hl=" + (node.$attr("lang")) } else { return "" }; return nil; })(); $b = node.$attr("target").$split("/", 2), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (list = ($a[1] == null ? nil : $a[1])), $b; if ($truthy((list = ($truthy($a = list) ? $a : node.$attr("list"))))) { list_param = "" + "&list=" + (list) } else { $b = target.$split(",", 2), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (playlist = ($a[1] == null ? nil : $a[1])), $b; if ($truthy((playlist = ($truthy($a = playlist) ? $a : node.$attr("playlist"))))) { list_param = "" + "&playlist=" + (playlist) } else { list_param = (function() {if ($truthy(has_loop_param)) { return "" + "&playlist=" + (target) } else { return "" }; return nil; })() }; }; return "" + "" + (title_element) + "\n" + "
    \n" + "\n" + "
    \n" + "";} else { poster_attribute = (function() {if ($truthy((val = node.$attr("poster"))['$nil_or_empty?']())) { return "" } else { return "" + " poster=\"" + (node.$media_uri(val)) + "\"" }; return nil; })(); preload_attribute = (function() {if ($truthy((val = node.$attr("preload"))['$nil_or_empty?']())) { return "" } else { return "" + " preload=\"" + (val) + "\"" }; return nil; })(); start_t = node.$attr("start"); end_t = node.$attr("end"); time_anchor = (function() {if ($truthy(($truthy($a = start_t) ? $a : end_t))) { return "" + "#t=" + (($truthy($a = start_t) ? $a : "")) + ((function() {if ($truthy(end_t)) { return "" + "," + (end_t) } else { return "" }; return nil; })()) } else { return "" }; return nil; })(); return "" + "" + (title_element) + "\n" + "
    \n" + "\n" + "
    \n" + "";}})(); }, $Html5Converter_convert_video$48.$$arity = 1); Opal.def(self, '$convert_inline_anchor', $Html5Converter_convert_inline_anchor$49 = function $$convert_inline_anchor(node) { var $a, self = this, $case = nil, path = nil, attrs = nil, text = nil, refid = nil, ref = nil; return (function() {$case = node.$type(); if ("xref"['$===']($case)) { if ($truthy((path = node.$attributes()['$[]']("path")))) { attrs = self.$append_link_constraint_attrs(node, (function() {if ($truthy(node.$role())) { return ["" + " class=\"" + (node.$role()) + "\""] } else { return [] }; return nil; })()).$join(); text = ($truthy($a = node.$text()) ? $a : path); } else { attrs = (function() {if ($truthy(node.$role())) { return "" + " class=\"" + (node.$role()) + "\"" } else { return "" }; return nil; })(); if ($truthy((text = node.$text()))) { } else { refid = node.$attributes()['$[]']("refid"); if ($truthy($$($nesting, 'AbstractNode')['$===']((ref = (self.refs = ($truthy($a = self.refs) ? $a : node.$document().$catalog()['$[]']("refs")))['$[]'](refid))))) { text = ($truthy($a = ref.$xreftext(node.$attr("xrefstyle", nil, true))) ? $a : "" + "[" + (refid) + "]") } else { text = "" + "[" + (refid) + "]" }; }; }; return "" + "" + (text) + "";} else if ("ref"['$===']($case)) {return "" + ""} else if ("link"['$===']($case)) { attrs = (function() {if ($truthy(node.$id())) { return ["" + " id=\"" + (node.$id()) + "\""] } else { return [] }; return nil; })(); if ($truthy(node.$role())) { attrs['$<<']("" + " class=\"" + (node.$role()) + "\"")}; if ($truthy(node['$attr?']("title"))) { attrs['$<<']("" + " title=\"" + (node.$attr("title")) + "\"")}; return "" + "" + (node.$text()) + "";} else if ("bibref"['$===']($case)) {return "" + "[" + (($truthy($a = node.$reftext()) ? $a : node.$id())) + "]"} else { self.$logger().$warn("" + "unknown anchor type: " + (node.$type().$inspect())); return nil;}})() }, $Html5Converter_convert_inline_anchor$49.$$arity = 1); Opal.def(self, '$convert_inline_break', $Html5Converter_convert_inline_break$50 = function $$convert_inline_break(node) { var self = this; return "" + (node.$text()) + "" }, $Html5Converter_convert_inline_break$50.$$arity = 1); Opal.def(self, '$convert_inline_button', $Html5Converter_convert_inline_button$51 = function $$convert_inline_button(node) { var self = this; return "" + "" + (node.$text()) + "" }, $Html5Converter_convert_inline_button$51.$$arity = 1); Opal.def(self, '$convert_inline_callout', $Html5Converter_convert_inline_callout$52 = function $$convert_inline_callout(node) { var self = this, src = nil; if ($truthy(node.$document()['$attr?']("icons", "font"))) { return "" + "(" + (node.$text()) + ")" } else if ($truthy(node.$document()['$attr?']("icons"))) { src = node.$icon_uri("" + "callouts/" + (node.$text())); return "" + "\"""; } else { return "" + (node.$attributes()['$[]']("guard")) + "(" + (node.$text()) + ")" } }, $Html5Converter_convert_inline_callout$52.$$arity = 1); Opal.def(self, '$convert_inline_footnote', $Html5Converter_convert_inline_footnote$53 = function $$convert_inline_footnote(node) { var self = this, index = nil, id_attr = nil; if ($truthy((index = node.$attr("index")))) { if (node.$type()['$==']("xref")) { return "" + "[" + (index) + "]" } else { id_attr = (function() {if ($truthy(node.$id())) { return "" + " id=\"_footnote_" + (node.$id()) + "\"" } else { return "" }; return nil; })(); return "" + "[" + (index) + "]"; } } else if (node.$type()['$==']("xref")) { return "" + "[" + (node.$text()) + "]" } else { return nil } }, $Html5Converter_convert_inline_footnote$53.$$arity = 1); Opal.def(self, '$convert_inline_image', $Html5Converter_convert_inline_image$54 = function $$convert_inline_image(node) { var $a, $b, $$55, $$56, $c, $d, self = this, type = nil, class_attr_val = nil, title_attr = nil, img = nil, target = nil, attrs = nil, svg = nil, obj = nil, fallback = nil, role = nil; if ($truthy((($a = (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")) ? node.$document()['$attr?']("icons", "font") : (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")))) { class_attr_val = "" + "fa fa-" + (node.$target()); $send($hash2(["size", "rotate", "flip"], {"size": "fa-", "rotate": "fa-rotate-", "flip": "fa-flip-"}), 'each', [], ($$55 = function(key, prefix){var self = $$55.$$s || this; if (key == null) { key = nil; }; if (prefix == null) { prefix = nil; }; if ($truthy(node['$attr?'](key))) { return (class_attr_val = "" + (class_attr_val) + " " + (prefix) + (node.$attr(key))) } else { return nil };}, $$55.$$s = self, $$55.$$arity = 2, $$55)); title_attr = (function() {if ($truthy(node['$attr?']("title"))) { return "" + " title=\"" + (node.$attr("title")) + "\"" } else { return "" }; return nil; })(); img = "" + ""; } else if ($truthy((($a = type['$==']("icon")) ? node.$document()['$attr?']("icons")['$!']() : type['$==']("icon")))) { img = "" + "[" + (node.$alt()) + "]" } else { target = node.$target(); attrs = $send(["width", "height", "title"], 'map', [], ($$56 = function(name){var self = $$56.$$s || this; if (name == null) { name = nil; }; if ($truthy(node['$attr?'](name))) { return "" + " " + (name) + "=\"" + (node.$attr(name)) + "\"" } else { return "" };}, $$56.$$s = self, $$56.$$arity = 1, $$56)).$join(); if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = type['$!=']("icon")) ? ($truthy($d = node['$attr?']("format", "svg")) ? $d : target['$include?'](".svg")) : $c)) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $b)) ? ($truthy($b = (svg = node['$option?']("inline"))) ? $b : (obj = node['$option?']("interactive"))) : $a))) { if ($truthy(svg)) { img = ($truthy($a = self.$read_svg_contents(node, target)) ? $a : "" + "" + (node.$alt()) + "") } else if ($truthy(obj)) { fallback = (function() {if ($truthy(node['$attr?']("fallback"))) { return "" + "\""" } else { return "" + "" + (node.$alt()) + "" }; return nil; })(); img = "" + "" + (fallback) + "";}}; img = ($truthy($a = img) ? $a : "" + "\"""); }; if ($truthy(node['$attr?']("link"))) { img = "" + "" + (img) + ""}; if ($truthy((role = node.$role()))) { if ($truthy(node['$attr?']("float"))) { class_attr_val = "" + (type) + " " + (node.$attr("float")) + " " + (role) } else { class_attr_val = "" + (type) + " " + (role) } } else if ($truthy(node['$attr?']("float"))) { class_attr_val = "" + (type) + " " + (node.$attr("float")) } else { class_attr_val = type }; return "" + "" + (img) + ""; }, $Html5Converter_convert_inline_image$54.$$arity = 1); Opal.def(self, '$convert_inline_indexterm', $Html5Converter_convert_inline_indexterm$57 = function $$convert_inline_indexterm(node) { var self = this; if (node.$type()['$==']("visible")) { return node.$text() } else { return "" } }, $Html5Converter_convert_inline_indexterm$57.$$arity = 1); Opal.def(self, '$convert_inline_kbd', $Html5Converter_convert_inline_kbd$58 = function $$convert_inline_kbd(node) { var self = this, keys = nil; if ((keys = node.$attr("keys")).$size()['$=='](1)) { return "" + "" + (keys['$[]'](0)) + "" } else { return "" + "" + (keys.$join("+")) + "" } }, $Html5Converter_convert_inline_kbd$58.$$arity = 1); Opal.def(self, '$convert_inline_menu', $Html5Converter_convert_inline_menu$59 = function $$convert_inline_menu(node) { var self = this, caret = nil, submenu_joiner = nil, menu = nil, submenus = nil, menuitem = nil; caret = (function() {if ($truthy(node.$document()['$attr?']("icons", "font"))) { return "  " } else { return "  " }; return nil; })(); submenu_joiner = "" + "" + (caret) + ""; menu = node.$attr("menu"); if ($truthy((submenus = node.$attr("submenus"))['$empty?']())) { if ($truthy((menuitem = node.$attr("menuitem")))) { return "" + "" + (menu) + "" + (caret) + "" + (menuitem) + "" } else { return "" + "" + (menu) + "" } } else { return "" + "" + (menu) + "" + (caret) + "" + (submenus.$join(submenu_joiner)) + "" + (caret) + "" + (node.$attr("menuitem")) + "" }; }, $Html5Converter_convert_inline_menu$59.$$arity = 1); Opal.def(self, '$convert_inline_quoted', $Html5Converter_convert_inline_quoted$60 = function $$convert_inline_quoted(node) { var $a, $b, self = this, open = nil, close = nil, tag = nil, class_attr = nil; $b = $$($nesting, 'QUOTE_TAGS')['$[]'](node.$type()), $a = Opal.to_ary($b), (open = ($a[0] == null ? nil : $a[0])), (close = ($a[1] == null ? nil : $a[1])), (tag = ($a[2] == null ? nil : $a[2])), $b; if ($truthy(node.$id())) { class_attr = (function() {if ($truthy(node.$role())) { return "" + " class=\"" + (node.$role()) + "\"" } else { return "" }; return nil; })(); if ($truthy(tag)) { return "" + (open.$chop()) + " id=\"" + (node.$id()) + "\"" + (class_attr) + ">" + (node.$text()) + (close) } else { return "" + "" + (open) + (node.$text()) + (close) + "" }; } else if ($truthy(node.$role())) { if ($truthy(tag)) { return "" + (open.$chop()) + " class=\"" + (node.$role()) + "\">" + (node.$text()) + (close) } else { return "" + "" + (open) + (node.$text()) + (close) + "" } } else { return "" + (open) + (node.$text()) + (close) }; }, $Html5Converter_convert_inline_quoted$60.$$arity = 1); Opal.def(self, '$read_svg_contents', $Html5Converter_read_svg_contents$61 = function $$read_svg_contents(node, target) { var $$62, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil; if ($truthy((svg = node.$read_contents(target, $hash2(["start", "normalize", "label"], {"start": node.$document().$attr("imagesdir"), "normalize": true, "label": "SVG"}))))) { if ($truthy(svg['$start_with?'](""); } else { return nil };}, $$62.$$s = self, $$62.$$arity = 1, $$62)); if ($truthy(new_start_tag)) { svg = "" + (new_start_tag) + (svg['$[]'](Opal.Range.$new(old_start_tag.$length(), -1, false)))};}; return svg; }, $Html5Converter_read_svg_contents$61.$$arity = 2); self.$private(); Opal.def(self, '$append_boolean_attribute', $Html5Converter_append_boolean_attribute$63 = function $$append_boolean_attribute(name, xml) { var self = this; if ($truthy(xml)) { return "" + " " + (name) + "=\"" + (name) + "\"" } else { return "" + " " + (name) } }, $Html5Converter_append_boolean_attribute$63.$$arity = 2); Opal.def(self, '$append_link_constraint_attrs', $Html5Converter_append_link_constraint_attrs$64 = function $$append_link_constraint_attrs(node, attrs) { var $a, self = this, rel = nil, window = nil; if (attrs == null) { attrs = []; }; if ($truthy(node['$option?']("nofollow"))) { rel = "nofollow"}; if ($truthy((window = node.$attributes()['$[]']("window")))) { attrs['$<<']("" + " target=\"" + (window) + "\""); if ($truthy(($truthy($a = window['$==']("_blank")) ? $a : node['$option?']("noopener")))) { attrs['$<<']((function() {if ($truthy(rel)) { return "" + " rel=\"" + (rel) + " noopener\"" } else { return " rel=\"noopener\"" }; return nil; })())}; } else if ($truthy(rel)) { attrs['$<<']("" + " rel=\"" + (rel) + "\"")}; return attrs; }, $Html5Converter_append_link_constraint_attrs$64.$$arity = -2); Opal.def(self, '$encode_attribute_value', $Html5Converter_encode_attribute_value$65 = function $$encode_attribute_value(val) { var self = this; if ($truthy(val['$include?']("\""))) { return val.$gsub("\"", """); } else { return val } }, $Html5Converter_encode_attribute_value$65.$$arity = 1); Opal.def(self, '$generate_manname_section', $Html5Converter_generate_manname_section$66 = function $$generate_manname_section(node) { var $a, self = this, manname_title = nil, next_section = nil, next_section_title = nil, manname_id_attr = nil, manname_id = nil; manname_title = node.$attr("manname-title", "Name"); if ($truthy(($truthy($a = (next_section = node.$sections()['$[]'](0))) ? (next_section_title = next_section.$title())['$=='](next_section_title.$upcase()) : $a))) { manname_title = manname_title.$upcase()}; manname_id_attr = (function() {if ($truthy((manname_id = node.$attr("manname-id")))) { return "" + " id=\"" + (manname_id) + "\"" } else { return "" }; return nil; })(); return "" + "" + (manname_title) + "\n" + "
    \n" + "

    " + (node.$attr("manname")) + " - " + (node.$attr("manpurpose")) + "

    \n" + "
    "; }, $Html5Converter_generate_manname_section$66.$$arity = 1); return (Opal.def(self, '$method_missing', $Html5Converter_method_missing$67 = function $$method_missing(id, $a) { var $post_args, params, $b, $iter = $Html5Converter_method_missing$67.$$p, $yield = $iter || nil, self = this, name = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; if ($iter) $Html5Converter_method_missing$67.$$p = null; // Prepare super implicit arguments for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { $zuper[$zuper_i] = arguments[$zuper_i]; } $post_args = Opal.slice.call(arguments, 1, arguments.length); params = $post_args;; if ($truthy(($truthy($b = (name = id.$to_s())['$start_with?']("convert_")['$!']()) ? self['$handles?'](name) : $b))) { return $send(self, 'send', ["" + "convert_" + (name)].concat(Opal.to_a(params))); } else { return $send(self, Opal.find_super_dispatcher(self, 'method_missing', $Html5Converter_method_missing$67, false), $zuper, $iter) }; }, $Html5Converter_method_missing$67.$$arity = -2), nil) && 'method_missing'; })($$($nesting, 'Converter'), $$$($$($nesting, 'Converter'), 'Base'), $nesting) })($nesting[0], $nesting) }; /* Generated by Opal 0.11.99.dev */ Opal.modules["asciidoctor/extensions"] = function(Opal) { function $rb_minus(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); } function $rb_plus(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs); } function $rb_gt(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs); } function $rb_lt(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); } var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy, $hash2 = Opal.hash2, $send = Opal.send, $hash = Opal.hash; Opal.add_stubs(['$==', '$[]=', '$config', '$-', '$const_defined?', '$singleton_class?', '$include', '$const_get', '$extend', '$attr_reader', '$merge', '$class', '$update', '$raise', '$document', '$doctype', '$[]', '$+', '$level', '$delete', '$>', '$casecmp', '$new', '$title=', '$sectname=', '$special=', '$fetch', '$numbered=', '$!', '$key?', '$attr?', '$special', '$numbered', '$generate_id', '$title', '$id=', '$update_attributes', '$tr', '$basename', '$create_block', '$assign_caption', '$===', '$parse_blocks', '$empty?', '$include?', '$sub_attributes', '$parse', '$each', '$define_method', '$unshift', '$shift', '$send', '$size', '$binding', '$receiver', '$define_singleton_method', '$instance_exec', '$to_proc', '$call', '$option', '$flatten', '$respond_to?', '$to_s', '$partition', '$to_i', '$<<', '$compact', '$inspect', '$attr_accessor', '$to_set', '$match?', '$resolve_regexp', '$method', '$register', '$values', '$groups', '$arity', '$activate', '$add_document_processor', '$any?', '$select', '$add_syntax_processor', '$to_sym', '$instance_variable_get', '$kind', '$private', '$join', '$map', '$split', '$capitalize', '$instance_variable_set', '$resolve_args', '$enable_dsl', '$singleton_class', '$process_block_given?', '$source_location', '$freeze', '$resolve_class', '$<', '$update_config', '$as_symbol', '$name', '$name=', '$pop', '$-@', '$next_auto_id', '$generate_name']); if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { } else { nil }; return (function($base, $parent_nesting) { var self = $module($base, 'Asciidoctor'); var $nesting = [self].concat($parent_nesting); (function($base, $parent_nesting) { var self = $module($base, 'Extensions'); var $nesting = [self].concat($parent_nesting); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Processor'); var $nesting = [self].concat($parent_nesting), $Processor_initialize$4, $Processor_update_config$5, $Processor_process$6, $Processor_create_section$7, $Processor_create_block$8, $Processor_create_list$9, $Processor_create_list_item$10, $Processor_create_image_block$11, $Processor_create_inline$12, $Processor_parse_content$13, $Processor_parse_attributes$14, $Processor$15; self.$$prototype.config = nil; (function(self, $parent_nesting) { var $nesting = [self].concat($parent_nesting), $config$1, $option$2, $enable_dsl$3; Opal.def(self, '$config', $config$1 = function $$config() { var $a, self = this; if (self.config == null) self.config = nil; return (self.config = ($truthy($a = self.config) ? $a : $hash2([], {}))) }, $config$1.$$arity = 0); Opal.def(self, '$option', $option$2 = function $$option(key, default_value) { var self = this, $writer = nil; $writer = [key, default_value]; $send(self.$config(), '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)]; }, $option$2.$$arity = 2); Opal.def(self, '$enable_dsl', $enable_dsl$3 = function $$enable_dsl() { var self = this; if ($truthy(self['$const_defined?']("DSL"))) { if ($truthy(self['$singleton_class?']())) { return self.$include(self.$const_get("DSL")) } else { return self.$extend(self.$const_get("DSL")) } } else { return nil } }, $enable_dsl$3.$$arity = 0); return Opal.alias(self, "use_dsl", "enable_dsl"); })(Opal.get_singleton_class(self), $nesting); self.$attr_reader("config"); Opal.def(self, '$initialize', $Processor_initialize$4 = function $$initialize(config) { var self = this; if (config == null) { config = $hash2([], {}); }; return (self.config = self.$class().$config().$merge(config)); }, $Processor_initialize$4.$$arity = -1); Opal.def(self, '$update_config', $Processor_update_config$5 = function $$update_config(config) { var self = this; return self.config.$update(config) }, $Processor_update_config$5.$$arity = 1); Opal.def(self, '$process', $Processor_process$6 = function $$process($a) { var $post_args, args, self = this; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Processor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method"); }, $Processor_process$6.$$arity = -1); Opal.def(self, '$create_section', $Processor_create_section$7 = function $$create_section(parent, title, attrs, opts) { var $a, self = this, doc = nil, book = nil, doctype = nil, level = nil, style = nil, sectname = nil, special = nil, sect = nil, $writer = nil, id = nil; if (opts == null) { opts = $hash2([], {}); }; doc = parent.$document(); book = (doctype = doc.$doctype())['$==']("book"); level = ($truthy($a = opts['$[]']("level")) ? $a : $rb_plus(parent.$level(), 1)); if ($truthy((style = attrs.$delete("style")))) { if ($truthy(($truthy($a = book) ? style['$==']("abstract") : $a))) { $a = ["chapter", 1], (sectname = $a[0]), (level = $a[1]), $a } else { $a = [style, true], (sectname = $a[0]), (special = $a[1]), $a; if (level['$=='](0)) { level = 1}; } } else if ($truthy(book)) { sectname = (function() {if (level['$=='](0)) { return "part" } else { if ($truthy($rb_gt(level, 1))) { return "section" } else { return "chapter" }; }; return nil; })() } else if ($truthy((($a = doctype['$==']("manpage")) ? title.$casecmp("synopsis")['$=='](0) : doctype['$==']("manpage")))) { $a = ["synopsis", true], (sectname = $a[0]), (special = $a[1]), $a } else { sectname = "section" }; sect = $$($nesting, 'Section').$new(parent, level); $a = [title, sectname], sect['$title=']($a[0]), sect['$sectname=']($a[1]), $a; if ($truthy(special)) { $writer = [true]; $send(sect, 'special=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];; if ($truthy(opts.$fetch("numbered", style['$==']("appendix")))) { $writer = [true]; $send(sect, 'numbered=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)]; } else if ($truthy(($truthy($a = opts['$key?']("numbered")['$!']()) ? doc['$attr?']("sectnums", "all") : $a))) { $writer = [(function() {if ($truthy(($truthy($a = book) ? level['$=='](1) : $a))) { return "chapter" } else { return true }; return nil; })()]; $send(sect, 'numbered=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];}; } else if ($truthy($rb_gt(level, 0))) { if ($truthy(opts.$fetch("numbered", doc['$attr?']("sectnums")))) { $writer = [(function() {if ($truthy(sect.$special())) { return ($truthy($a = parent.$numbered()) ? true : $a) } else { return true }; return nil; })()]; $send(sect, 'numbered=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];} } else if ($truthy(opts.$fetch("numbered", ($truthy($a = book) ? doc['$attr?']("partnums") : $a)))) { $writer = [true]; $send(sect, 'numbered=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];}; if ((id = attrs['$[]']("id"))['$=='](false)) { attrs.$delete("id") } else { $writer = [(($writer = ["id", ($truthy($a = id) ? $a : (function() {if ($truthy(doc['$attr?']("sectids"))) { return $$($nesting, 'Section').$generate_id(sect.$title(), doc); } else { return nil }; return nil; })())]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]; $send(sect, 'id=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)]; }; sect.$update_attributes(attrs); return sect; }, $Processor_create_section$7.$$arity = -4); Opal.def(self, '$create_block', $Processor_create_block$8 = function $$create_block(parent, context, source, attrs, opts) { var self = this; if (opts == null) { opts = $hash2([], {}); }; return $$($nesting, 'Block').$new(parent, context, $hash2(["source", "attributes"], {"source": source, "attributes": attrs}).$merge(opts)); }, $Processor_create_block$8.$$arity = -5); Opal.def(self, '$create_list', $Processor_create_list$9 = function $$create_list(parent, context, attrs) { var self = this, list = nil; if (attrs == null) { attrs = nil; }; list = $$($nesting, 'List').$new(parent, context); if ($truthy(attrs)) { list.$update_attributes(attrs)}; return list; }, $Processor_create_list$9.$$arity = -3); Opal.def(self, '$create_list_item', $Processor_create_list_item$10 = function $$create_list_item(parent, text) { var self = this; if (text == null) { text = nil; }; return $$($nesting, 'ListItem').$new(parent, text); }, $Processor_create_list_item$10.$$arity = -2); Opal.def(self, '$create_image_block', $Processor_create_image_block$11 = function $$create_image_block(parent, attrs, opts) { var $a, self = this, target = nil, $writer = nil, title = nil, block = nil; if (opts == null) { opts = $hash2([], {}); }; if ($truthy((target = attrs['$[]']("target")))) { } else { self.$raise($$$('::', 'ArgumentError'), "Unable to create an image block, target attribute is required") }; ($truthy($a = attrs['$[]']("alt")) ? $a : (($writer = ["alt", (($writer = ["default-alt", $$($nesting, 'Helpers').$basename(target, true).$tr("_-", " ")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); title = (function() {if ($truthy(attrs['$key?']("title"))) { return attrs.$delete("title"); } else { return nil }; return nil; })(); block = self.$create_block(parent, "image", nil, attrs, opts); if ($truthy(title)) { $writer = [title]; $send(block, 'title=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];; block.$assign_caption(attrs.$delete("caption"), "figure");}; return block; }, $Processor_create_image_block$11.$$arity = -3); Opal.def(self, '$create_inline', $Processor_create_inline$12 = function $$create_inline(parent, context, text, opts) { var self = this; if (opts == null) { opts = $hash2([], {}); }; return $$($nesting, 'Inline').$new(parent, context, text, (function() {if (context['$==']("quoted")) { return $hash2(["type"], {"type": "unquoted"}).$merge(opts); } else { return opts }; return nil; })()); }, $Processor_create_inline$12.$$arity = -4); Opal.def(self, '$parse_content', $Processor_parse_content$13 = function $$parse_content(parent, content, attributes) { var self = this, reader = nil; if (attributes == null) { attributes = nil; }; reader = (function() {if ($truthy($$($nesting, 'Reader')['$==='](content))) { return content } else { return $$($nesting, 'Reader').$new(content); }; return nil; })(); $$($nesting, 'Parser').$parse_blocks(reader, parent, attributes); return parent; }, $Processor_parse_content$13.$$arity = -3); Opal.def(self, '$parse_attributes', $Processor_parse_attributes$14 = function $$parse_attributes(block, attrlist, opts) { var $a, self = this; if (opts == null) { opts = $hash2([], {}); }; if ($truthy((function() {if ($truthy(attrlist)) { return attrlist['$empty?']() } else { return true }; return nil; })())) { return $hash2([], {})}; if ($truthy(($truthy($a = opts['$[]']("sub_attributes")) ? attrlist['$include?']($$($nesting, 'ATTR_REF_HEAD')) : $a))) { attrlist = block.$sub_attributes(attrlist)}; return $$($nesting, 'AttributeList').$new(attrlist).$parse(($truthy($a = opts['$[]']("positional_attributes")) ? $a : [])); }, $Processor_parse_attributes$14.$$arity = -3); return $send([["create_paragraph", "create_block", "paragraph"], ["create_open_block", "create_block", "open"], ["create_example_block", "create_block", "example"], ["create_pass_block", "create_block", "pass"], ["create_listing_block", "create_block", "listing"], ["create_literal_block", "create_block", "literal"], ["create_anchor", "create_inline", "anchor"], ["create_inline_pass", "create_inline", "quoted"]], 'each', [], ($Processor$15 = function(method_name, delegate_method_name, context){var self = $Processor$15.$$s || this, $$16; if (method_name == null) { method_name = nil; }; if (delegate_method_name == null) { delegate_method_name = nil; }; if (context == null) { context = nil; }; return $send(self, 'define_method', [method_name], ($$16 = function($a){var self = $$16.$$s || this, $post_args, args; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; args.$unshift(args.$shift(), context); return $send(self, 'send', [delegate_method_name].concat(Opal.to_a(args)));}, $$16.$$s = self, $$16.$$arity = -1, $$16));}, $Processor$15.$$s = self, $Processor$15.$$arity = 3, $Processor$15)); })($nesting[0], null, $nesting); (function($base, $parent_nesting) { var self = $module($base, 'ProcessorDsl'); var $nesting = [self].concat($parent_nesting), $ProcessorDsl_option$17, $ProcessorDsl_process$18, $ProcessorDsl_process_block_given$ques$20; Opal.def(self, '$option', $ProcessorDsl_option$17 = function $$option(key, value) { var self = this, $writer = nil; $writer = [key, value]; $send(self.$config(), '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)]; }, $ProcessorDsl_option$17.$$arity = 2); Opal.def(self, '$process', $ProcessorDsl_process$18 = function $$process($a) { var $iter = $ProcessorDsl_process$18.$$p, block = $iter || nil, $post_args, args, $b, $$19, self = this, context = nil; if (self.process_block == null) self.process_block = nil; if ($iter) $ProcessorDsl_process$18.$$p = null; if ($iter) $ProcessorDsl_process$18.$$p = null;; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; if ((block !== nil)) { if ($truthy(args['$empty?']())) { } else { self.$raise($$$('::', 'ArgumentError'), "" + "wrong number of arguments (given " + (args.$size()) + ", expected 0)") }; if ($truthy(($truthy($b = block.$binding()) ? self['$=='](block.$binding().$receiver()) : $b))) { } else { context = self; $send(block, 'define_singleton_method', ["call"], ($$19 = function($c){var self = $$19.$$s || this, $post_args, m_args; $post_args = Opal.slice.call(arguments, 0, arguments.length); m_args = $post_args;; return $send(context, 'instance_exec', Opal.to_a(m_args), block.$to_proc());}, $$19.$$s = self, $$19.$$arity = -1, $$19)); }; return (self.process_block = block); } else if ($truthy((($b = self['process_block'], $b != null && $b !== nil) ? 'instance-variable' : nil))) { return $send(self.process_block, 'call', Opal.to_a(args)) } else { return self.$raise($$$('::', 'NotImplementedError'), "" + (self.$class()) + " #" + ("process") + " method called before being registered") }; }, $ProcessorDsl_process$18.$$arity = -1); Opal.def(self, '$process_block_given?', $ProcessorDsl_process_block_given$ques$20 = function() { var $a, self = this; return (($a = self['process_block'], $a != null && $a !== nil) ? 'instance-variable' : nil) }, $ProcessorDsl_process_block_given$ques$20.$$arity = 0); })($nesting[0], $nesting); (function($base, $parent_nesting) { var self = $module($base, 'DocumentProcessorDsl'); var $nesting = [self].concat($parent_nesting), $DocumentProcessorDsl_prefer$21; self.$include($$($nesting, 'ProcessorDsl')); Opal.def(self, '$prefer', $DocumentProcessorDsl_prefer$21 = function $$prefer() { var self = this; return self.$option("position", ">>") }, $DocumentProcessorDsl_prefer$21.$$arity = 0); })($nesting[0], $nesting); (function($base, $parent_nesting) { var self = $module($base, 'SyntaxProcessorDsl'); var $nesting = [self].concat($parent_nesting), $SyntaxProcessorDsl_named$22, $SyntaxProcessorDsl_content_model$23, $SyntaxProcessorDsl_positional_attributes$24, $SyntaxProcessorDsl_default_attributes$25, $SyntaxProcessorDsl_resolve_attributes$26; self.$include($$($nesting, 'ProcessorDsl')); Opal.def(self, '$named', $SyntaxProcessorDsl_named$22 = function $$named(value) { var self = this; if ($truthy($$($nesting, 'Processor')['$==='](self))) { return (self.name = value) } else { return self.$option("name", value) } }, $SyntaxProcessorDsl_named$22.$$arity = 1); Opal.def(self, '$content_model', $SyntaxProcessorDsl_content_model$23 = function $$content_model(value) { var self = this; return self.$option("content_model", value) }, $SyntaxProcessorDsl_content_model$23.$$arity = 1); Opal.alias(self, "parse_content_as", "content_model"); Opal.def(self, '$positional_attributes', $SyntaxProcessorDsl_positional_attributes$24 = function $$positional_attributes($a) { var $post_args, value, self = this; $post_args = Opal.slice.call(arguments, 0, arguments.length); value = $post_args;; return self.$option("positional_attrs", value.$flatten()); }, $SyntaxProcessorDsl_positional_attributes$24.$$arity = -1); Opal.alias(self, "name_positional_attributes", "positional_attributes"); Opal.alias(self, "positional_attrs", "positional_attributes"); Opal.def(self, '$default_attributes', $SyntaxProcessorDsl_default_attributes$25 = function $$default_attributes(value) { var self = this; return self.$option("default_attrs", value) }, $SyntaxProcessorDsl_default_attributes$25.$$arity = 1); Opal.alias(self, "default_attrs", "default_attributes"); Opal.def(self, '$resolve_attributes', $SyntaxProcessorDsl_resolve_attributes$26 = function $$resolve_attributes($a) { var $post_args, args, $b, $$27, $$28, self = this, $case = nil, names = nil, defaults = nil; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; if ($truthy($rb_gt(args.$size(), 1))) { } else if ($truthy((args = args.$fetch(0, true))['$respond_to?']("to_sym"))) { args = [args]}; return (function() {$case = args; if (true['$===']($case)) { self.$option("positional_attrs", []); return self.$option("default_attrs", $hash2([], {}));} else if ($$$('::', 'Array')['$===']($case)) { $b = [[], $hash2([], {})], (names = $b[0]), (defaults = $b[1]), $b; $send(args, 'each', [], ($$27 = function(arg){var self = $$27.$$s || this, $c, $d, name = nil, _ = nil, value = nil, idx = nil, $writer = nil; if (arg == null) { arg = nil; }; if ($truthy((arg = arg.$to_s())['$include?']("="))) { $d = arg.$partition("="), $c = Opal.to_ary($d), (name = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (value = ($c[2] == null ? nil : $c[2])), $d; if ($truthy(name['$include?'](":"))) { $d = name.$partition(":"), $c = Opal.to_ary($d), (idx = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (name = ($c[2] == null ? nil : $c[2])), $d; idx = (function() {if (idx['$==']("@")) { return names.$size() } else { return idx.$to_i() }; return nil; })(); $writer = [idx, name]; $send(names, '[]=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];;}; $writer = [name, value]; $send(defaults, '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)];; } else if ($truthy(arg['$include?'](":"))) { $d = arg.$partition(":"), $c = Opal.to_ary($d), (idx = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (name = ($c[2] == null ? nil : $c[2])), $d; idx = (function() {if (idx['$==']("@")) { return names.$size() } else { return idx.$to_i() }; return nil; })(); $writer = [idx, name]; $send(names, '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)];; } else { return names['$<<'](arg) };}, $$27.$$s = self, $$27.$$arity = 1, $$27)); self.$option("positional_attrs", names.$compact()); return self.$option("default_attrs", defaults);} else if ($$$('::', 'Hash')['$===']($case)) { $b = [[], $hash2([], {})], (names = $b[0]), (defaults = $b[1]), $b; $send(args, 'each', [], ($$28 = function(key, val){var self = $$28.$$s || this, $c, $d, name = nil, idx = nil, _ = nil, $writer = nil; if (key == null) { key = nil; }; if (val == null) { val = nil; }; if ($truthy((name = key.$to_s())['$include?'](":"))) { $d = name.$partition(":"), $c = Opal.to_ary($d), (idx = ($c[0] == null ? nil : $c[0])), (_ = ($c[1] == null ? nil : $c[1])), (name = ($c[2] == null ? nil : $c[2])), $d; idx = (function() {if (idx['$==']("@")) { return names.$size() } else { return idx.$to_i() }; return nil; })(); $writer = [idx, name]; $send(names, '[]=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];;}; if ($truthy(val)) { $writer = [name, val]; $send(defaults, '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)]; } else { return nil };}, $$28.$$s = self, $$28.$$arity = 2, $$28)); self.$option("positional_attrs", names.$compact()); return self.$option("default_attrs", defaults);} else {return self.$raise($$$('::', 'ArgumentError'), "" + "unsupported attributes specification for macro: " + (args.$inspect()))}})(); }, $SyntaxProcessorDsl_resolve_attributes$26.$$arity = -1); Opal.alias(self, "resolves_attributes", "resolve_attributes"); })($nesting[0], $nesting); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Preprocessor'); var $nesting = [self].concat($parent_nesting), $Preprocessor_process$29; return (Opal.def(self, '$process', $Preprocessor_process$29 = function $$process(document, reader) { var self = this; return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Preprocessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") }, $Preprocessor_process$29.$$arity = 2), nil) && 'process' })($nesting[0], $$($nesting, 'Processor'), $nesting); Opal.const_set($$($nesting, 'Preprocessor'), 'DSL', $$($nesting, 'DocumentProcessorDsl')); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'TreeProcessor'); var $nesting = [self].concat($parent_nesting), $TreeProcessor_process$30; return (Opal.def(self, '$process', $TreeProcessor_process$30 = function $$process(document) { var self = this; return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'TreeProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") }, $TreeProcessor_process$30.$$arity = 1), nil) && 'process' })($nesting[0], $$($nesting, 'Processor'), $nesting); Opal.const_set($$($nesting, 'TreeProcessor'), 'DSL', $$($nesting, 'DocumentProcessorDsl')); Opal.const_set($nesting[0], 'Treeprocessor', $$($nesting, 'TreeProcessor')); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Postprocessor'); var $nesting = [self].concat($parent_nesting), $Postprocessor_process$31; return (Opal.def(self, '$process', $Postprocessor_process$31 = function $$process(document, output) { var self = this; return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Postprocessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") }, $Postprocessor_process$31.$$arity = 2), nil) && 'process' })($nesting[0], $$($nesting, 'Processor'), $nesting); Opal.const_set($$($nesting, 'Postprocessor'), 'DSL', $$($nesting, 'DocumentProcessorDsl')); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'IncludeProcessor'); var $nesting = [self].concat($parent_nesting), $IncludeProcessor_process$32, $IncludeProcessor_handles$ques$33; Opal.def(self, '$process', $IncludeProcessor_process$32 = function $$process(document, reader, target, attributes) { var self = this; return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'IncludeProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") }, $IncludeProcessor_process$32.$$arity = 4); return (Opal.def(self, '$handles?', $IncludeProcessor_handles$ques$33 = function(target) { var self = this; return true }, $IncludeProcessor_handles$ques$33.$$arity = 1), nil) && 'handles?'; })($nesting[0], $$($nesting, 'Processor'), $nesting); (function($base, $parent_nesting) { var self = $module($base, 'IncludeProcessorDsl'); var $nesting = [self].concat($parent_nesting), $IncludeProcessorDsl_handles$ques$34; self.$include($$($nesting, 'DocumentProcessorDsl')); Opal.def(self, '$handles?', $IncludeProcessorDsl_handles$ques$34 = function($a) { var $iter = $IncludeProcessorDsl_handles$ques$34.$$p, block = $iter || nil, $post_args, args, $b, self = this; if (self.handles_block == null) self.handles_block = nil; if ($iter) $IncludeProcessorDsl_handles$ques$34.$$p = null; if ($iter) $IncludeProcessorDsl_handles$ques$34.$$p = null;; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; if ((block !== nil)) { if ($truthy(args['$empty?']())) { } else { self.$raise($$$('::', 'ArgumentError'), "" + "wrong number of arguments (given " + (args.$size()) + ", expected 0)") }; return (self.handles_block = block); } else if ($truthy((($b = self['handles_block'], $b != null && $b !== nil) ? 'instance-variable' : nil))) { return self.handles_block.$call(args['$[]'](0)) } else { return true }; }, $IncludeProcessorDsl_handles$ques$34.$$arity = -1); })($nesting[0], $nesting); Opal.const_set($$($nesting, 'IncludeProcessor'), 'DSL', $$($nesting, 'IncludeProcessorDsl')); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'DocinfoProcessor'); var $nesting = [self].concat($parent_nesting), $DocinfoProcessor_initialize$35, $DocinfoProcessor_process$36; self.$$prototype.config = nil; Opal.def(self, '$initialize', $DocinfoProcessor_initialize$35 = function $$initialize(config) { var $a, $iter = $DocinfoProcessor_initialize$35.$$p, $yield = $iter || nil, self = this, $writer = nil; if ($iter) $DocinfoProcessor_initialize$35.$$p = null; if (config == null) { config = $hash2([], {}); }; $send(self, Opal.find_super_dispatcher(self, 'initialize', $DocinfoProcessor_initialize$35, false), [config], null); return ($truthy($a = self.config['$[]']("location")) ? $a : (($writer = ["location", "head"]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); }, $DocinfoProcessor_initialize$35.$$arity = -1); return (Opal.def(self, '$process', $DocinfoProcessor_process$36 = function $$process(document) { var self = this; return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'DocinfoProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") }, $DocinfoProcessor_process$36.$$arity = 1), nil) && 'process'; })($nesting[0], $$($nesting, 'Processor'), $nesting); (function($base, $parent_nesting) { var self = $module($base, 'DocinfoProcessorDsl'); var $nesting = [self].concat($parent_nesting), $DocinfoProcessorDsl_at_location$37; self.$include($$($nesting, 'DocumentProcessorDsl')); Opal.def(self, '$at_location', $DocinfoProcessorDsl_at_location$37 = function $$at_location(value) { var self = this; return self.$option("location", value) }, $DocinfoProcessorDsl_at_location$37.$$arity = 1); })($nesting[0], $nesting); Opal.const_set($$($nesting, 'DocinfoProcessor'), 'DSL', $$($nesting, 'DocinfoProcessorDsl')); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'BlockProcessor'); var $nesting = [self].concat($parent_nesting), $BlockProcessor_initialize$38, $BlockProcessor_process$39; self.$$prototype.config = nil; self.$attr_accessor("name"); Opal.def(self, '$initialize', $BlockProcessor_initialize$38 = function $$initialize(name, config) { var $a, $iter = $BlockProcessor_initialize$38.$$p, $yield = $iter || nil, self = this, $case = nil, $writer = nil; if ($iter) $BlockProcessor_initialize$38.$$p = null; if (name == null) { name = nil; }; if (config == null) { config = $hash2([], {}); }; $send(self, Opal.find_super_dispatcher(self, 'initialize', $BlockProcessor_initialize$38, false), [config], null); self.name = ($truthy($a = name) ? $a : self.config['$[]']("name")); $case = self.config['$[]']("contexts"); if ($$$('::', 'NilClass')['$===']($case)) {($truthy($a = self.config['$[]']("contexts")) ? $a : (($writer = ["contexts", ["open", "paragraph"].$to_set()]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))} else if ($$$('::', 'Symbol')['$===']($case)) { $writer = ["contexts", [self.config['$[]']("contexts")].$to_set()]; $send(self.config, '[]=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];} else { $writer = ["contexts", self.config['$[]']("contexts").$to_set()]; $send(self.config, '[]=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];}; return ($truthy($a = self.config['$[]']("content_model")) ? $a : (($writer = ["content_model", "compound"]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); }, $BlockProcessor_initialize$38.$$arity = -1); return (Opal.def(self, '$process', $BlockProcessor_process$39 = function $$process(parent, reader, attributes) { var self = this; return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'BlockProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") }, $BlockProcessor_process$39.$$arity = 3), nil) && 'process'; })($nesting[0], $$($nesting, 'Processor'), $nesting); (function($base, $parent_nesting) { var self = $module($base, 'BlockProcessorDsl'); var $nesting = [self].concat($parent_nesting), $BlockProcessorDsl_contexts$40; self.$include($$($nesting, 'SyntaxProcessorDsl')); Opal.def(self, '$contexts', $BlockProcessorDsl_contexts$40 = function $$contexts($a) { var $post_args, value, self = this; $post_args = Opal.slice.call(arguments, 0, arguments.length); value = $post_args;; return self.$option("contexts", value.$flatten().$to_set()); }, $BlockProcessorDsl_contexts$40.$$arity = -1); Opal.alias(self, "on_contexts", "contexts"); Opal.alias(self, "on_context", "contexts"); Opal.alias(self, "bind_to", "contexts"); })($nesting[0], $nesting); Opal.const_set($$($nesting, 'BlockProcessor'), 'DSL', $$($nesting, 'BlockProcessorDsl')); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'MacroProcessor'); var $nesting = [self].concat($parent_nesting), $MacroProcessor_initialize$41, $MacroProcessor_process$42; self.$$prototype.config = nil; self.$attr_accessor("name"); Opal.def(self, '$initialize', $MacroProcessor_initialize$41 = function $$initialize(name, config) { var $a, $iter = $MacroProcessor_initialize$41.$$p, $yield = $iter || nil, self = this, $writer = nil; if ($iter) $MacroProcessor_initialize$41.$$p = null; if (name == null) { name = nil; }; if (config == null) { config = $hash2([], {}); }; $send(self, Opal.find_super_dispatcher(self, 'initialize', $MacroProcessor_initialize$41, false), [config], null); self.name = ($truthy($a = name) ? $a : self.config['$[]']("name")); return ($truthy($a = self.config['$[]']("content_model")) ? $a : (($writer = ["content_model", "attributes"]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); }, $MacroProcessor_initialize$41.$$arity = -1); return (Opal.def(self, '$process', $MacroProcessor_process$42 = function $$process(parent, target, attributes) { var self = this; return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'MacroProcessor')) + " subclass " + (self.$class()) + " must implement the #" + ("process") + " method") }, $MacroProcessor_process$42.$$arity = 3), nil) && 'process'; })($nesting[0], $$($nesting, 'Processor'), $nesting); (function($base, $parent_nesting) { var self = $module($base, 'MacroProcessorDsl'); var $nesting = [self].concat($parent_nesting), $MacroProcessorDsl_resolve_attributes$43; self.$include($$($nesting, 'SyntaxProcessorDsl')); Opal.def(self, '$resolve_attributes', $MacroProcessorDsl_resolve_attributes$43 = function $$resolve_attributes($a) { var $post_args, args, $b, $iter = $MacroProcessorDsl_resolve_attributes$43.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; if ($iter) $MacroProcessorDsl_resolve_attributes$43.$$p = null; // Prepare super implicit arguments for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { $zuper[$zuper_i] = arguments[$zuper_i]; } $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; if ($truthy((($b = args.$size()['$=='](1)) ? args['$[]'](0)['$!']() : args.$size()['$=='](1)))) { return self.$option("content_model", "text") } else { $send(self, Opal.find_super_dispatcher(self, 'resolve_attributes', $MacroProcessorDsl_resolve_attributes$43, false), $zuper, $iter); return self.$option("content_model", "attributes"); }; }, $MacroProcessorDsl_resolve_attributes$43.$$arity = -1); Opal.alias(self, "resolves_attributes", "resolve_attributes"); })($nesting[0], $nesting); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'BlockMacroProcessor'); var $nesting = [self].concat($parent_nesting), $BlockMacroProcessor_name$44; self.$$prototype.name = nil; return (Opal.def(self, '$name', $BlockMacroProcessor_name$44 = function $$name() { var self = this; if ($truthy($$($nesting, 'MacroNameRx')['$match?'](self.name.$to_s()))) { } else { self.$raise($$$('::', 'ArgumentError'), "" + "invalid name for block macro: " + (self.name)) }; return self.name; }, $BlockMacroProcessor_name$44.$$arity = 0), nil) && 'name' })($nesting[0], $$($nesting, 'MacroProcessor'), $nesting); Opal.const_set($$($nesting, 'BlockMacroProcessor'), 'DSL', $$($nesting, 'MacroProcessorDsl')); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'InlineMacroProcessor'); var $nesting = [self].concat($parent_nesting), $InlineMacroProcessor_regexp$45, $InlineMacroProcessor_resolve_regexp$46; self.$$prototype.config = self.$$prototype.name = nil; (Opal.class_variable_set($nesting[0], '@@rx_cache', $hash2([], {}))); Opal.def(self, '$regexp', $InlineMacroProcessor_regexp$45 = function $$regexp() { var $a, self = this, $writer = nil; return ($truthy($a = self.config['$[]']("regexp")) ? $a : (($writer = ["regexp", self.$resolve_regexp(self.name.$to_s(), self.config['$[]']("format"))]), $send(self.config, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])) }, $InlineMacroProcessor_regexp$45.$$arity = 0); return (Opal.def(self, '$resolve_regexp', $InlineMacroProcessor_resolve_regexp$46 = function $$resolve_regexp(name, format) { var $a, $b, self = this, $writer = nil; if ($truthy($$($nesting, 'MacroNameRx')['$match?'](name))) { } else { self.$raise($$$('::', 'ArgumentError'), "" + "invalid name for inline macro: " + (name)) }; return ($truthy($a = (($b = $nesting[0].$$cvars['@@rx_cache']) == null ? nil : $b)['$[]']([name, format])) ? $a : (($writer = [[name, format], new RegExp("" + "\\\\?" + (name) + ":" + ((function() {if (format['$==']("short")) { return "(){0}" } else { return "(\\S+?)" }; return nil; })()) + "\\[(|" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\]")]), $send((($b = $nesting[0].$$cvars['@@rx_cache']) == null ? nil : $b), '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])); }, $InlineMacroProcessor_resolve_regexp$46.$$arity = 2), nil) && 'resolve_regexp'; })($nesting[0], $$($nesting, 'MacroProcessor'), $nesting); (function($base, $parent_nesting) { var self = $module($base, 'InlineMacroProcessorDsl'); var $nesting = [self].concat($parent_nesting), $InlineMacroProcessorDsl_format$47, $InlineMacroProcessorDsl_match$48; self.$include($$($nesting, 'MacroProcessorDsl')); Opal.def(self, '$format', $InlineMacroProcessorDsl_format$47 = function $$format(value) { var self = this; return self.$option("format", value) }, $InlineMacroProcessorDsl_format$47.$$arity = 1); Opal.alias(self, "match_format", "format"); Opal.alias(self, "using_format", "format"); Opal.def(self, '$match', $InlineMacroProcessorDsl_match$48 = function $$match(value) { var self = this; return self.$option("regexp", value) }, $InlineMacroProcessorDsl_match$48.$$arity = 1); })($nesting[0], $nesting); Opal.const_set($$($nesting, 'InlineMacroProcessor'), 'DSL', $$($nesting, 'InlineMacroProcessorDsl')); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Extension'); var $nesting = [self].concat($parent_nesting), $Extension_initialize$49; self.$attr_reader("kind"); self.$attr_reader("config"); self.$attr_reader("instance"); return (Opal.def(self, '$initialize', $Extension_initialize$49 = function $$initialize(kind, instance, config) { var self = this; self.kind = kind; self.instance = instance; return (self.config = config); }, $Extension_initialize$49.$$arity = 3), nil) && 'initialize'; })($nesting[0], null, $nesting); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'ProcessorExtension'); var $nesting = [self].concat($parent_nesting), $ProcessorExtension_initialize$50; self.$attr_reader("process_method"); return (Opal.def(self, '$initialize', $ProcessorExtension_initialize$50 = function $$initialize(kind, instance, process_method) { var $a, $iter = $ProcessorExtension_initialize$50.$$p, $yield = $iter || nil, self = this; if ($iter) $ProcessorExtension_initialize$50.$$p = null; if (process_method == null) { process_method = nil; }; $send(self, Opal.find_super_dispatcher(self, 'initialize', $ProcessorExtension_initialize$50, false), [kind, instance, instance.$config()], null); return (self.process_method = ($truthy($a = process_method) ? $a : instance.$method("process"))); }, $ProcessorExtension_initialize$50.$$arity = -3), nil) && 'initialize'; })($nesting[0], $$($nesting, 'Extension'), $nesting); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Group'); var $nesting = [self].concat($parent_nesting), $Group_activate$52; (function(self, $parent_nesting) { var $nesting = [self].concat($parent_nesting), $register$51; return (Opal.def(self, '$register', $register$51 = function $$register(name) { var self = this; if (name == null) { name = nil; }; return $$($nesting, 'Extensions').$register(name, self); }, $register$51.$$arity = -1), nil) && 'register' })(Opal.get_singleton_class(self), $nesting); return (Opal.def(self, '$activate', $Group_activate$52 = function $$activate(registry) { var self = this; return self.$raise($$$('::', 'NotImplementedError')) }, $Group_activate$52.$$arity = 1), nil) && 'activate'; })($nesting[0], null, $nesting); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Registry'); var $nesting = [self].concat($parent_nesting), $Registry_initialize$53, $Registry_activate$54, $Registry_preprocessor$56, $Registry_preprocessors$ques$57, $Registry_preprocessors$58, $Registry_tree_processor$59, $Registry_tree_processors$ques$60, $Registry_tree_processors$61, $Registry_postprocessor$62, $Registry_postprocessors$ques$63, $Registry_postprocessors$64, $Registry_include_processor$65, $Registry_include_processors$ques$66, $Registry_include_processors$67, $Registry_docinfo_processor$68, $Registry_docinfo_processors$ques$69, $Registry_docinfo_processors$71, $Registry_block$73, $Registry_blocks$ques$74, $Registry_registered_for_block$ques$75, $Registry_find_block_extension$76, $Registry_block_macro$77, $Registry_block_macros$ques$78, $Registry_registered_for_block_macro$ques$79, $Registry_find_block_macro_extension$80, $Registry_inline_macro$81, $Registry_inline_macros$ques$82, $Registry_registered_for_inline_macro$ques$83, $Registry_find_inline_macro_extension$84, $Registry_inline_macros$85, $Registry_prefer$86, $Registry_add_document_processor$87, $Registry_add_syntax_processor$89, $Registry_resolve_args$91, $Registry_as_symbol$92; self.$$prototype.groups = self.$$prototype.preprocessor_extensions = self.$$prototype.tree_processor_extensions = self.$$prototype.postprocessor_extensions = self.$$prototype.include_processor_extensions = self.$$prototype.docinfo_processor_extensions = self.$$prototype.block_extensions = self.$$prototype.block_macro_extensions = self.$$prototype.inline_macro_extensions = nil; self.$attr_reader("document"); self.$attr_reader("groups"); Opal.def(self, '$initialize', $Registry_initialize$53 = function $$initialize(groups) { var self = this; if (groups == null) { groups = $hash2([], {}); }; self.groups = groups; self.preprocessor_extensions = (self.tree_processor_extensions = (self.postprocessor_extensions = (self.include_processor_extensions = (self.docinfo_processor_extensions = (self.block_extensions = (self.block_macro_extensions = (self.inline_macro_extensions = nil))))))); return (self.document = nil); }, $Registry_initialize$53.$$arity = -1); Opal.def(self, '$activate', $Registry_activate$54 = function $$activate(document) { var $$55, self = this, ext_groups = nil; self.document = document; if ($truthy((ext_groups = $rb_plus($$($nesting, 'Extensions').$groups().$values(), self.groups.$values()))['$empty?']())) { } else { $send(ext_groups, 'each', [], ($$55 = function(group){var self = $$55.$$s || this, $case = nil; if (group == null) { group = nil; }; return (function() {$case = group; if ($$$('::', 'Proc')['$===']($case)) {return (function() {$case = group.$arity(); if ((0)['$===']($case) || (-1)['$===']($case)) {return $send(self, 'instance_exec', [], group.$to_proc())} else if ((1)['$===']($case)) {return group.$call(self)} else { return nil }})()} else if ($$$('::', 'Class')['$===']($case)) {return group.$new().$activate(self)} else {return group.$activate(self)}})();}, $$55.$$s = self, $$55.$$arity = 1, $$55)) }; return self; }, $Registry_activate$54.$$arity = 1); Opal.def(self, '$preprocessor', $Registry_preprocessor$56 = function $$preprocessor($a) { var $iter = $Registry_preprocessor$56.$$p, block = $iter || nil, $post_args, args, self = this; if ($iter) $Registry_preprocessor$56.$$p = null; if ($iter) $Registry_preprocessor$56.$$p = null;; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; return $send(self, 'add_document_processor', ["preprocessor", args], block.$to_proc()); }, $Registry_preprocessor$56.$$arity = -1); Opal.def(self, '$preprocessors?', $Registry_preprocessors$ques$57 = function() { var self = this; return self.preprocessor_extensions['$!']()['$!']() }, $Registry_preprocessors$ques$57.$$arity = 0); Opal.def(self, '$preprocessors', $Registry_preprocessors$58 = function $$preprocessors() { var self = this; return self.preprocessor_extensions }, $Registry_preprocessors$58.$$arity = 0); Opal.def(self, '$tree_processor', $Registry_tree_processor$59 = function $$tree_processor($a) { var $iter = $Registry_tree_processor$59.$$p, block = $iter || nil, $post_args, args, self = this; if ($iter) $Registry_tree_processor$59.$$p = null; if ($iter) $Registry_tree_processor$59.$$p = null;; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; return $send(self, 'add_document_processor', ["tree_processor", args], block.$to_proc()); }, $Registry_tree_processor$59.$$arity = -1); Opal.def(self, '$tree_processors?', $Registry_tree_processors$ques$60 = function() { var self = this; return self.tree_processor_extensions['$!']()['$!']() }, $Registry_tree_processors$ques$60.$$arity = 0); Opal.def(self, '$tree_processors', $Registry_tree_processors$61 = function $$tree_processors() { var self = this; return self.tree_processor_extensions }, $Registry_tree_processors$61.$$arity = 0); Opal.alias(self, "treeprocessor", "tree_processor"); Opal.alias(self, "treeprocessors?", "tree_processors?"); Opal.alias(self, "treeprocessors", "tree_processors"); Opal.def(self, '$postprocessor', $Registry_postprocessor$62 = function $$postprocessor($a) { var $iter = $Registry_postprocessor$62.$$p, block = $iter || nil, $post_args, args, self = this; if ($iter) $Registry_postprocessor$62.$$p = null; if ($iter) $Registry_postprocessor$62.$$p = null;; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; return $send(self, 'add_document_processor', ["postprocessor", args], block.$to_proc()); }, $Registry_postprocessor$62.$$arity = -1); Opal.def(self, '$postprocessors?', $Registry_postprocessors$ques$63 = function() { var self = this; return self.postprocessor_extensions['$!']()['$!']() }, $Registry_postprocessors$ques$63.$$arity = 0); Opal.def(self, '$postprocessors', $Registry_postprocessors$64 = function $$postprocessors() { var self = this; return self.postprocessor_extensions }, $Registry_postprocessors$64.$$arity = 0); Opal.def(self, '$include_processor', $Registry_include_processor$65 = function $$include_processor($a) { var $iter = $Registry_include_processor$65.$$p, block = $iter || nil, $post_args, args, self = this; if ($iter) $Registry_include_processor$65.$$p = null; if ($iter) $Registry_include_processor$65.$$p = null;; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; return $send(self, 'add_document_processor', ["include_processor", args], block.$to_proc()); }, $Registry_include_processor$65.$$arity = -1); Opal.def(self, '$include_processors?', $Registry_include_processors$ques$66 = function() { var self = this; return self.include_processor_extensions['$!']()['$!']() }, $Registry_include_processors$ques$66.$$arity = 0); Opal.def(self, '$include_processors', $Registry_include_processors$67 = function $$include_processors() { var self = this; return self.include_processor_extensions }, $Registry_include_processors$67.$$arity = 0); Opal.def(self, '$docinfo_processor', $Registry_docinfo_processor$68 = function $$docinfo_processor($a) { var $iter = $Registry_docinfo_processor$68.$$p, block = $iter || nil, $post_args, args, self = this; if ($iter) $Registry_docinfo_processor$68.$$p = null; if ($iter) $Registry_docinfo_processor$68.$$p = null;; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; return $send(self, 'add_document_processor', ["docinfo_processor", args], block.$to_proc()); }, $Registry_docinfo_processor$68.$$arity = -1); Opal.def(self, '$docinfo_processors?', $Registry_docinfo_processors$ques$69 = function(location) { var $$70, self = this; if (location == null) { location = nil; }; if ($truthy(self.docinfo_processor_extensions)) { if ($truthy(location)) { return $send(self.docinfo_processor_extensions, 'any?', [], ($$70 = function(ext){var self = $$70.$$s || this; if (ext == null) { ext = nil; }; return ext.$config()['$[]']("location")['$=='](location);}, $$70.$$s = self, $$70.$$arity = 1, $$70)) } else { return true } } else { return false }; }, $Registry_docinfo_processors$ques$69.$$arity = -1); Opal.def(self, '$docinfo_processors', $Registry_docinfo_processors$71 = function $$docinfo_processors(location) { var $$72, self = this; if (location == null) { location = nil; }; if ($truthy(self.docinfo_processor_extensions)) { if ($truthy(location)) { return $send(self.docinfo_processor_extensions, 'select', [], ($$72 = function(ext){var self = $$72.$$s || this; if (ext == null) { ext = nil; }; return ext.$config()['$[]']("location")['$=='](location);}, $$72.$$s = self, $$72.$$arity = 1, $$72)) } else { return self.docinfo_processor_extensions } } else { return nil }; }, $Registry_docinfo_processors$71.$$arity = -1); Opal.def(self, '$block', $Registry_block$73 = function $$block($a) { var $iter = $Registry_block$73.$$p, block = $iter || nil, $post_args, args, self = this; if ($iter) $Registry_block$73.$$p = null; if ($iter) $Registry_block$73.$$p = null;; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; return $send(self, 'add_syntax_processor', ["block", args], block.$to_proc()); }, $Registry_block$73.$$arity = -1); Opal.def(self, '$blocks?', $Registry_blocks$ques$74 = function() { var self = this; return self.block_extensions['$!']()['$!']() }, $Registry_blocks$ques$74.$$arity = 0); Opal.def(self, '$registered_for_block?', $Registry_registered_for_block$ques$75 = function(name, context) { var self = this, ext = nil; if ($truthy((ext = self.block_extensions['$[]'](name.$to_sym())))) { if ($truthy(ext.$config()['$[]']("contexts")['$include?'](context))) { return ext } else { return false } } else { return false } }, $Registry_registered_for_block$ques$75.$$arity = 2); Opal.def(self, '$find_block_extension', $Registry_find_block_extension$76 = function $$find_block_extension(name) { var self = this; return self.block_extensions['$[]'](name.$to_sym()) }, $Registry_find_block_extension$76.$$arity = 1); Opal.def(self, '$block_macro', $Registry_block_macro$77 = function $$block_macro($a) { var $iter = $Registry_block_macro$77.$$p, block = $iter || nil, $post_args, args, self = this; if ($iter) $Registry_block_macro$77.$$p = null; if ($iter) $Registry_block_macro$77.$$p = null;; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; return $send(self, 'add_syntax_processor', ["block_macro", args], block.$to_proc()); }, $Registry_block_macro$77.$$arity = -1); Opal.def(self, '$block_macros?', $Registry_block_macros$ques$78 = function() { var self = this; return self.block_macro_extensions['$!']()['$!']() }, $Registry_block_macros$ques$78.$$arity = 0); Opal.def(self, '$registered_for_block_macro?', $Registry_registered_for_block_macro$ques$79 = function(name) { var self = this, ext = nil; if ($truthy((ext = self.block_macro_extensions['$[]'](name.$to_sym())))) { return ext } else { return false } }, $Registry_registered_for_block_macro$ques$79.$$arity = 1); Opal.def(self, '$find_block_macro_extension', $Registry_find_block_macro_extension$80 = function $$find_block_macro_extension(name) { var self = this; return self.block_macro_extensions['$[]'](name.$to_sym()) }, $Registry_find_block_macro_extension$80.$$arity = 1); Opal.def(self, '$inline_macro', $Registry_inline_macro$81 = function $$inline_macro($a) { var $iter = $Registry_inline_macro$81.$$p, block = $iter || nil, $post_args, args, self = this; if ($iter) $Registry_inline_macro$81.$$p = null; if ($iter) $Registry_inline_macro$81.$$p = null;; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; return $send(self, 'add_syntax_processor', ["inline_macro", args], block.$to_proc()); }, $Registry_inline_macro$81.$$arity = -1); Opal.def(self, '$inline_macros?', $Registry_inline_macros$ques$82 = function() { var self = this; return self.inline_macro_extensions['$!']()['$!']() }, $Registry_inline_macros$ques$82.$$arity = 0); Opal.def(self, '$registered_for_inline_macro?', $Registry_registered_for_inline_macro$ques$83 = function(name) { var self = this, ext = nil; if ($truthy((ext = self.inline_macro_extensions['$[]'](name.$to_sym())))) { return ext } else { return false } }, $Registry_registered_for_inline_macro$ques$83.$$arity = 1); Opal.def(self, '$find_inline_macro_extension', $Registry_find_inline_macro_extension$84 = function $$find_inline_macro_extension(name) { var self = this; return self.inline_macro_extensions['$[]'](name.$to_sym()) }, $Registry_find_inline_macro_extension$84.$$arity = 1); Opal.def(self, '$inline_macros', $Registry_inline_macros$85 = function $$inline_macros() { var self = this; return self.inline_macro_extensions.$values() }, $Registry_inline_macros$85.$$arity = 0); Opal.def(self, '$prefer', $Registry_prefer$86 = function $$prefer($a) { var $iter = $Registry_prefer$86.$$p, block = $iter || nil, $post_args, args, self = this, extension = nil, arg0 = nil, extensions_store = nil; if ($iter) $Registry_prefer$86.$$p = null; if ($iter) $Registry_prefer$86.$$p = null;; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; extension = (function() {if ($truthy($$($nesting, 'ProcessorExtension')['$===']((arg0 = args.$shift())))) { return arg0 } else { return $send(self, 'send', [arg0].concat(Opal.to_a(args)), block.$to_proc()); }; return nil; })(); extensions_store = self.$instance_variable_get(((("" + "@") + (extension.$kind())) + "_extensions").$to_sym()); extensions_store.$unshift(extensions_store.$delete(extension)); return extension; }, $Registry_prefer$86.$$arity = -1); self.$private(); Opal.def(self, '$add_document_processor', $Registry_add_document_processor$87 = function $$add_document_processor(kind, args) { var $iter = $Registry_add_document_processor$87.$$p, block = $iter || nil, $$88, $a, $b, $c, self = this, kind_name = nil, kind_class_symbol = nil, kind_class = nil, kind_java_class = nil, kind_store = nil, extension = nil, config = nil, processor = nil, processor_class = nil, processor_instance = nil; if ($iter) $Registry_add_document_processor$87.$$p = null; if ($iter) $Registry_add_document_processor$87.$$p = null;; kind_name = kind.$to_s().$tr("_", " "); kind_class_symbol = $send(kind_name.$split(), 'map', [], ($$88 = function(it){var self = $$88.$$s || this; if (it == null) { it = nil; }; return it.$capitalize();}, $$88.$$s = self, $$88.$$arity = 1, $$88)).$join().$to_sym(); kind_class = $$($nesting, 'Extensions').$const_get(kind_class_symbol, false); kind_java_class = (function() {if ($truthy((($a = $$$('::', 'AsciidoctorJ', 'skip_raise')) ? 'constant' : nil))) { return $$$($$$('::', 'AsciidoctorJ'), 'Extensions').$const_get(kind_class_symbol, false); } else { return nil }; return nil; })(); kind_store = ($truthy($b = self.$instance_variable_get(((("" + "@") + (kind)) + "_extensions").$to_sym())) ? $b : self.$instance_variable_set(((("" + "@") + (kind)) + "_extensions").$to_sym(), [])); extension = (function() {if ((block !== nil)) { config = self.$resolve_args(args, 1); (processor = kind_class.$new(config)).$singleton_class().$enable_dsl(); if (block.$arity()['$=='](0)) { $send(processor, 'instance_exec', [], block.$to_proc()) } else { Opal.yield1(block, processor) }; if ($truthy(processor['$process_block_given?']())) { } else { self.$raise($$$('::', 'ArgumentError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location())) }; processor.$freeze(); return $$($nesting, 'ProcessorExtension').$new(kind, processor); } else { $c = self.$resolve_args(args, 2), $b = Opal.to_ary($c), (processor = ($b[0] == null ? nil : $b[0])), (config = ($b[1] == null ? nil : $b[1])), $c; if ($truthy((processor_class = $$($nesting, 'Helpers').$resolve_class(processor)))) { if ($truthy(($truthy($b = $rb_lt(processor_class, kind_class)) ? $b : ($truthy($c = kind_java_class) ? $rb_lt(processor_class, kind_java_class) : $c)))) { } else { self.$raise($$$('::', 'ArgumentError'), "" + "Invalid type for " + (kind_name) + " extension: " + (processor)) }; processor_instance = processor_class.$new(config); processor_instance.$freeze(); return $$($nesting, 'ProcessorExtension').$new(kind, processor_instance); } else if ($truthy(($truthy($b = kind_class['$==='](processor)) ? $b : ($truthy($c = kind_java_class) ? kind_java_class['$==='](processor) : $c)))) { processor.$update_config(config); processor.$freeze(); return $$($nesting, 'ProcessorExtension').$new(kind, processor); } else { return self.$raise($$$('::', 'ArgumentError'), "" + "Invalid arguments specified for registering " + (kind_name) + " extension: " + (args)) }; }; return nil; })(); if (extension.$config()['$[]']("position")['$=='](">>")) { kind_store.$unshift(extension); } else { kind_store['$<<'](extension); }; return extension; }, $Registry_add_document_processor$87.$$arity = 2); Opal.def(self, '$add_syntax_processor', $Registry_add_syntax_processor$89 = function $$add_syntax_processor(kind, args) { var $iter = $Registry_add_syntax_processor$89.$$p, block = $iter || nil, $$90, $a, $b, $c, self = this, kind_name = nil, kind_class_symbol = nil, kind_class = nil, kind_java_class = nil, kind_store = nil, name = nil, config = nil, processor = nil, $writer = nil, processor_class = nil, processor_instance = nil; if ($iter) $Registry_add_syntax_processor$89.$$p = null; if ($iter) $Registry_add_syntax_processor$89.$$p = null;; kind_name = kind.$to_s().$tr("_", " "); kind_class_symbol = $send(kind_name.$split(), 'map', [], ($$90 = function(it){var self = $$90.$$s || this; if (it == null) { it = nil; }; return it.$capitalize();}, $$90.$$s = self, $$90.$$arity = 1, $$90))['$<<']("Processor").$join().$to_sym(); kind_class = $$($nesting, 'Extensions').$const_get(kind_class_symbol, false); kind_java_class = (function() {if ($truthy((($a = $$$('::', 'AsciidoctorJ', 'skip_raise')) ? 'constant' : nil))) { return $$$($$$('::', 'AsciidoctorJ'), 'Extensions').$const_get(kind_class_symbol, false); } else { return nil }; return nil; })(); kind_store = ($truthy($b = self.$instance_variable_get(((("" + "@") + (kind)) + "_extensions").$to_sym())) ? $b : self.$instance_variable_set(((("" + "@") + (kind)) + "_extensions").$to_sym(), $hash2([], {}))); if ((block !== nil)) { $c = self.$resolve_args(args, 2), $b = Opal.to_ary($c), (name = ($b[0] == null ? nil : $b[0])), (config = ($b[1] == null ? nil : $b[1])), $c; (processor = kind_class.$new(self.$as_symbol(name), config)).$singleton_class().$enable_dsl(); if (block.$arity()['$=='](0)) { $send(processor, 'instance_exec', [], block.$to_proc()) } else { Opal.yield1(block, processor) }; if ($truthy((name = self.$as_symbol(processor.$name())))) { } else { self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension at " + (block.$source_location())) }; if ($truthy(processor['$process_block_given?']())) { } else { self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location())) }; processor.$freeze(); $writer = [name, $$($nesting, 'ProcessorExtension').$new(kind, processor)]; $send(kind_store, '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)];; } else { $c = self.$resolve_args(args, 3), $b = Opal.to_ary($c), (processor = ($b[0] == null ? nil : $b[0])), (name = ($b[1] == null ? nil : $b[1])), (config = ($b[2] == null ? nil : $b[2])), $c; if ($truthy((processor_class = $$($nesting, 'Helpers').$resolve_class(processor)))) { if ($truthy(($truthy($b = $rb_lt(processor_class, kind_class)) ? $b : ($truthy($c = kind_java_class) ? $rb_lt(processor_class, kind_java_class) : $c)))) { } else { self.$raise($$$('::', 'ArgumentError'), "" + "Class specified for " + (kind_name) + " extension does not inherit from " + (kind_class) + ": " + (processor)) }; processor_instance = processor_class.$new(self.$as_symbol(name), config); if ($truthy((name = self.$as_symbol(processor_instance.$name())))) { } else { self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension: " + (processor)) }; processor_instance.$freeze(); $writer = [name, $$($nesting, 'ProcessorExtension').$new(kind, processor_instance)]; $send(kind_store, '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)];; } else if ($truthy(($truthy($b = kind_class['$==='](processor)) ? $b : ($truthy($c = kind_java_class) ? kind_java_class['$==='](processor) : $c)))) { processor.$update_config(config); if ($truthy((name = (function() {if ($truthy(name)) { $writer = [self.$as_symbol(name)]; $send(processor, 'name=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)];; } else { return self.$as_symbol(processor.$name()); }; return nil; })()))) { } else { self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension: " + (processor)) }; processor.$freeze(); $writer = [name, $$($nesting, 'ProcessorExtension').$new(kind, processor)]; $send(kind_store, '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)];; } else { return self.$raise($$$('::', 'ArgumentError'), "" + "Invalid arguments specified for registering " + (kind_name) + " extension: " + (args)) }; }; }, $Registry_add_syntax_processor$89.$$arity = 2); Opal.def(self, '$resolve_args', $Registry_resolve_args$91 = function $$resolve_args(args, expect) { var self = this, opts = nil, missing = nil; opts = (function() {if ($truthy($$$('::', 'Hash')['$==='](args['$[]'](-1)))) { return args.$pop() } else { return $hash2([], {}) }; return nil; })(); if (expect['$=='](1)) { return opts}; if ($truthy($rb_gt((missing = $rb_minus($rb_minus(expect, 1), args.$size())), 0))) { args = $rb_plus(args, $$$('::', 'Array').$new(missing)) } else if ($truthy($rb_lt(missing, 0))) { args.$pop(missing['$-@']())}; args['$<<'](opts); return args; }, $Registry_resolve_args$91.$$arity = 2); return (Opal.def(self, '$as_symbol', $Registry_as_symbol$92 = function $$as_symbol(name) { var self = this; if ($truthy(name)) { return name.$to_sym() } else { return nil } }, $Registry_as_symbol$92.$$arity = 1), nil) && 'as_symbol'; })($nesting[0], null, $nesting); (function(self, $parent_nesting) { var $nesting = [self].concat($parent_nesting), $generate_name$93, $next_auto_id$94, $groups$95, $create$96, $register$97, $unregister_all$98, $unregister$99; Opal.def(self, '$generate_name', $generate_name$93 = function $$generate_name() { var self = this; return "" + "extgrp" + (self.$next_auto_id()) }, $generate_name$93.$$arity = 0); Opal.def(self, '$next_auto_id', $next_auto_id$94 = function $$next_auto_id() { var $a, self = this; if (self.auto_id == null) self.auto_id = nil; self.auto_id = ($truthy($a = self.auto_id) ? $a : -1); return (self.auto_id = $rb_plus(self.auto_id, 1)); }, $next_auto_id$94.$$arity = 0); Opal.def(self, '$groups', $groups$95 = function $$groups() { var $a, self = this; if (self.groups == null) self.groups = nil; return (self.groups = ($truthy($a = self.groups) ? $a : $hash2([], {}))) }, $groups$95.$$arity = 0); Opal.def(self, '$create', $create$96 = function $$create(name) { var $iter = $create$96.$$p, block = $iter || nil, $a, self = this; if ($iter) $create$96.$$p = null; if ($iter) $create$96.$$p = null;; if (name == null) { name = nil; }; if ((block !== nil)) { return $$($nesting, 'Registry').$new($hash(($truthy($a = name) ? $a : self.$generate_name()), block)) } else { return $$($nesting, 'Registry').$new() }; }, $create$96.$$arity = -1); Opal.def(self, '$register', $register$97 = function $$register($a) { var $iter = $register$97.$$p, block = $iter || nil, $post_args, args, $b, self = this, argc = nil, resolved_group = nil, group = nil, name = nil, $writer = nil; if ($iter) $register$97.$$p = null; if ($iter) $register$97.$$p = null;; $post_args = Opal.slice.call(arguments, 0, arguments.length); args = $post_args;; argc = args.$size(); if ((block !== nil)) { resolved_group = block } else if ($truthy((group = args.$pop()))) { resolved_group = ($truthy($b = $$($nesting, 'Helpers').$resolve_class(group)) ? $b : group) } else { self.$raise($$$('::', 'ArgumentError'), "Extension group to register not specified") }; name = ($truthy($b = args.$pop()) ? $b : self.$generate_name()); if ($truthy(args['$empty?']())) { } else { self.$raise($$$('::', 'ArgumentError'), "" + "Wrong number of arguments (" + (argc) + " for 1..2)") }; $writer = [name.$to_sym(), resolved_group]; $send(self.$groups(), '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)];; }, $register$97.$$arity = -1); Opal.def(self, '$unregister_all', $unregister_all$98 = function $$unregister_all() { var self = this; self.groups = $hash2([], {}); return nil; }, $unregister_all$98.$$arity = 0); return (Opal.def(self, '$unregister', $unregister$99 = function $$unregister($a) { var $post_args, names, $$100, self = this; $post_args = Opal.slice.call(arguments, 0, arguments.length); names = $post_args;; $send(names, 'each', [], ($$100 = function(group){var self = $$100.$$s || this; if (self.groups == null) self.groups = nil; if (group == null) { group = nil; }; return self.groups.$delete(group.$to_sym());}, $$100.$$s = self, $$100.$$arity = 1, $$100)); return nil; }, $unregister$99.$$arity = -1), nil) && 'unregister'; })(Opal.get_singleton_class(self), $nesting); })($nesting[0], $nesting) })($nesting[0], $nesting); }; /* Generated by Opal 0.11.99.dev */ Opal.modules["asciidoctor/js/asciidoctor_ext/stylesheet"] = function(Opal) { var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy; Opal.add_stubs(['$rstrip', '$read', '$join']); return (function($base, $parent_nesting) { var self = $module($base, 'Asciidoctor'); var $nesting = [self].concat($parent_nesting); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Stylesheets'); var $nesting = [self].concat($parent_nesting), $Stylesheets_primary_stylesheet_data$1; self.$$prototype.primary_stylesheet_data = nil; return (Opal.def(self, '$primary_stylesheet_data', $Stylesheets_primary_stylesheet_data$1 = function $$primary_stylesheet_data() { var $a, self = this; return (self.primary_stylesheet_data = ($truthy($a = self.primary_stylesheet_data) ? $a : $$$('::', 'IO').$read($$$('::', 'File').$join("css", "asciidoctor.css")).$rstrip())) }, $Stylesheets_primary_stylesheet_data$1.$$arity = 0), nil) && 'primary_stylesheet_data' })($nesting[0], null, $nesting) })($nesting[0], $nesting) }; /* Generated by Opal 0.11.99.dev */ Opal.modules["asciidoctor/js/asciidoctor_ext/document"] = function(Opal) { var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass; return (function($base, $parent_nesting) { var self = $module($base, 'Asciidoctor'); var $nesting = [self].concat($parent_nesting); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Document'); var $nesting = [self].concat($parent_nesting), $Document_fill_datetime_attributes$1; return (Opal.def(self, '$fill_datetime_attributes', $Document_fill_datetime_attributes$1 = function $$fill_datetime_attributes(attrs, input_mtime) { var self = this; var $truthy = Opal.truthy var $falsy = Opal.falsy var nil = Opal.nil var utc_offset var source_date_epoch var getYear = function (time, utc_offset) { return utc_offset === 0 ? time.getUTCFullYear() : time.getFullYear() } var getMonth = function (time, utc_offset) { return utc_offset === 0 ? time.getUTCMonth() : time.getMonth() } var getDay = function (time, utc_offset) { return utc_offset === 0 ? time.getUTCDate() : time.getDate() } var getHours = function (time, utc_offset) { return utc_offset === 0 ? time.getUTCHours() : time.getHours() } var now = new Date() // See https://reproducible-builds.org/specs/source-date-epoch/ if (Opal.const_get_qualified('::', 'ENV')['$key?']('SOURCE_DATE_EPOCH')) { now.setTime(parseInt(Opal.const_get_qualified('::', 'ENV')['$[]']('SOURCE_DATE_EPOCH')) * 1000) source_date_epoch = now utc_offset = 0 // utc } else { utc_offset = -now.getTimezoneOffset() / 60 // local date } // localdate and localyear if ($truthy((localdate = attrs['$[]']('localdate')))) { if ($falsy(localyear = attrs['$[]']('localyear'))) { localyear = localdate.indexOf('-') === 4 ? localdate.substring(0, 4) : nil attrs['$[]=']('localyear', localyear) } } else { var now_year = getYear(now, utc_offset).toString() var now_month = ('0' + (getMonth(now, utc_offset) + 1)).slice(-2) var now_day = ('0' + getDay(now, utc_offset)).slice(-2) localdate = now_year + '-' + now_month + '-' + now_day attrs['$[]=']('localdate', localdate) localyear = now_year attrs['$[]=']('localyear', now_year) } // localtime if ($falsy((localtime = attrs['$[]']('localtime')))) { var hours = ('0' + (getHours(now, utc_offset))).slice(-2) var minutes = ('0' + (now.getMinutes())).slice(-2) var seconds = ('0' + (now.getSeconds())).slice(-2) var utc_offset_format if (utc_offset === 0) { utc_offset_format = 'UTC' } else if (utc_offset > 0) { utc_offset_format = ('+0' + (utc_offset * 100)).slice(-5) } else { utc_offset_format = ('-0' + (-utc_offset * 100)).slice(-5) } localtime = hours + ':' + minutes + ':' + seconds + ' ' + utc_offset_format attrs['$[]=']('localtime', localtime) } // localdatetime if ($falsy((localdatetime = attrs['$[]']('localdatetime')))) { localdatetime = localdate + ' ' + localtime attrs['$[]=']('localdatetime', localdatetime) } // docdate, doctime and docdatetime should default to localdate, localtime and localdatetime if not otherwise set if ($truthy(source_date_epoch)) { input_mtime = source_date_epoch } else if ($truthy(input_mtime)) { utc_offset = -input_mtime.getTimezoneOffset() / 60 } else { input_mtime = now } // docdate and docyear if ($truthy(docdate = attrs['$[]']('docdate'))) { attrs['$[]=']('docyear', docdate.indexOf('-') === 4 ? docdate.substring(0, 4) : nil) } else { var mtime_year = getYear(input_mtime, utc_offset).toString() var mtime_month = ('0' + (getMonth(input_mtime, utc_offset) + 1)).slice(-2) var mtime_day = ('0' + (getDay(input_mtime, utc_offset))).slice(-2) docdate = mtime_year + '-' + mtime_month + '-' + mtime_day attrs['$[]=']('docdate', docdate) if ($falsy(attrs['$[]']('docyear'))) { attrs['$[]=']('docyear', mtime_year) } } // doctime if ($falsy(doctime = attrs['$[]']('doctime'))) { var mtime_hours = ('0' + (getHours(input_mtime, utc_offset))).slice(-2) var mtime_minutes = ('0' + (input_mtime.getMinutes())).slice(-2) var mtime_seconds = ('0' + (input_mtime.getSeconds())).slice(-2) if (utc_offset === 0) { utc_offset_format = 'UTC' } else if (utc_offset > 0) { utc_offset_format = ('+0' + (utc_offset * 100)).slice(-5) } else { utc_offset_format = ('-0' + (-utc_offset * 100)).slice(-5) } doctime = mtime_hours + ':' + mtime_minutes + ':' + mtime_seconds + ' ' + utc_offset_format attrs['$[]=']('doctime', doctime) } // docdatetime if ($falsy(attrs['$[]']('docdatetime'))) { attrs['$[]=']('docdatetime', docdate + ' ' + doctime) } return nil }, $Document_fill_datetime_attributes$1.$$arity = 2), nil) && 'fill_datetime_attributes' })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting) })($nesting[0], $nesting) }; /* Generated by Opal 0.11.99.dev */ Opal.modules["asciidoctor/js/asciidoctor_ext/substitutors"] = function(Opal) { var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; return (function($base, $parent_nesting) { var self = $module($base, 'Asciidoctor'); var $nesting = [self].concat($parent_nesting); (function($base, $parent_nesting) { var self = $module($base, 'Substitutors'); var $nesting = [self].concat($parent_nesting), $Substitutors_sub_placeholder$1; Opal.def(self, '$sub_placeholder', $Substitutors_sub_placeholder$1 = function $$sub_placeholder(format_string, replacement) { var self = this; return format_string.replace('%s', replacement); }, $Substitutors_sub_placeholder$1.$$arity = 2) })($nesting[0], $nesting) })($nesting[0], $nesting) }; /* Generated by Opal 0.11.99.dev */ Opal.modules["asciidoctor/js/asciidoctor_ext/parser"] = function(Opal) { var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy; return (function($base, $parent_nesting) { var self = $module($base, 'Asciidoctor'); var $nesting = [self].concat($parent_nesting); (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Parser'); var $nesting = [self].concat($parent_nesting), $Parser_uniform$ques$1, $Parser_uniform$ques$2; if ($truthy(String.prototype.repeat)) { return (Opal.defs(self, '$uniform?', $Parser_uniform$ques$1 = function(str, chr, len) { var self = this; return chr.repeat(len) === str; }, $Parser_uniform$ques$1.$$arity = 3), nil) && 'uniform?' } else { return (Opal.defs(self, '$uniform?', $Parser_uniform$ques$2 = function(str, chr, len) { var self = this; return Array.apply(null, { length: len }).map(function () { return chr }).join('') === str; }, $Parser_uniform$ques$2.$$arity = 3), nil) && 'uniform?' } })($nesting[0], null, $nesting) })($nesting[0], $nesting) }; /* Generated by Opal 0.11.99.dev */ Opal.modules["asciidoctor/js/asciidoctor_ext/syntax_highlighter"] = function(Opal) { var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy; Opal.add_stubs(['$key?', '$registry', '$[]', '$include?', '$include', '$empty?', '$debug', '$logger', '$join', '$keys']); return (function($base, $parent_nesting) { var self = $module($base, 'Asciidoctor'); var $nesting = [self].concat($parent_nesting); (function($base, $parent_nesting) { var self = $module($base, 'SyntaxHighlighter'); var $nesting = [self].concat($parent_nesting); (function($base, $parent_nesting) { var self = $module($base, 'Factory'); var $nesting = [self].concat($parent_nesting), $Factory_for$1; Opal.def(self, '$for', $Factory_for$1 = function(name) { var self = this; if ($truthy(self.$registry()['$key?'](name))) { return self.$registry()['$[]'](name) } else { if ($truthy(self['$include?']($$($nesting, 'Logging')))) { } else { self.$include($$($nesting, 'Logging')) }; if ($truthy(self.$registry()['$empty?']())) { self.$logger().$debug("no syntax highlighter available, functionality disabled.") } else { self.$logger().$debug("" + "syntax highlighter named '" + (name) + "' is not available, must be one of: '" + (self.$registry().$keys().$join("', '")) + "'.") }; return nil; } }, $Factory_for$1.$$arity = 1) })($nesting[0], $nesting) })($nesting[0], $nesting) })($nesting[0], $nesting) }; /* Generated by Opal 0.11.99.dev */ Opal.modules["asciidoctor/js/asciidoctor_ext"] = function(Opal) { var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; Opal.add_stubs(['$require']); self.$require("asciidoctor/js/asciidoctor_ext/stylesheet"); self.$require("asciidoctor/js/asciidoctor_ext/document"); self.$require("asciidoctor/js/asciidoctor_ext/substitutors"); self.$require("asciidoctor/js/asciidoctor_ext/parser"); self.$require("asciidoctor/js/asciidoctor_ext/syntax_highlighter"); // Load specific runtime self.$require("asciidoctor/js/asciidoctor_ext/browser"); ; }; /* Generated by Opal 0.11.99.dev */ Opal.modules["asciidoctor/js/opal_ext/logger"] = function(Opal) { function $rb_lt(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs); } var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy; Opal.add_stubs(['$chr', '$rjust', '$message_as_string', '$<', '$write', '$call', '$[]']); return (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Logger'); var $nesting = [self].concat($parent_nesting), $Logger_add$2; self.$$prototype.level = self.$$prototype.progname = self.$$prototype.pipe = self.$$prototype.formatter = nil; (function($base, $super, $parent_nesting) { var self = $klass($base, $super, 'Formatter'); var $nesting = [self].concat($parent_nesting), $Formatter_call$1; return (Opal.def(self, '$call', $Formatter_call$1 = function $$call(severity, time, progname, msg) { var self = this, time_format = nil; time_format = time.getFullYear() + '-' + ('0'+(time.getMonth()+1)).slice(-2) + '-' + ('0'+time.getDate()).slice(-2) + 'T' + ('0'+time.getHours()).slice(-2) + ':' + ('0'+time.getMinutes()).slice(-2) + ':' + ('0'+time.getSeconds()).slice(-2) + '.' + ('00' + new Date().getMilliseconds() * 1000).slice(-6); return "" + (severity.$chr()) + ", [" + (time_format) + "] " + (severity.$rjust(5)) + " -- " + (progname) + ": " + (self.$message_as_string(msg)); }, $Formatter_call$1.$$arity = 4), nil) && 'call' })($nesting[0], null, $nesting); return (Opal.def(self, '$add', $Logger_add$2 = function $$add(severity, message, progname) { var $iter = $Logger_add$2.$$p, block = $iter || nil, $a, self = this; if ($iter) $Logger_add$2.$$p = null; if ($iter) $Logger_add$2.$$p = null;; if (message == null) { message = nil; }; if (progname == null) { progname = nil; }; if ($truthy($rb_lt((severity = ($truthy($a = severity) ? $a : $$($nesting, 'UNKNOWN'))), self.level))) { return true}; progname = ($truthy($a = progname) ? $a : self.progname); if ($truthy(message)) { } else if ((block !== nil)) { message = Opal.yieldX(block, []) } else { message = progname; progname = self.progname; }; self.pipe.$write(self.formatter.$call(($truthy($a = $$($nesting, 'SEVERITY_LABELS')['$[]'](severity)) ? $a : "ANY"), new Date(), progname, message)); return true; }, $Logger_add$2.$$arity = -2), nil) && 'add'; })($nesting[0], null, $nesting) }; /* Generated by Opal 0.11.99.dev */ Opal.modules["asciidoctor/js/postscript"] = function(Opal) { var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; Opal.add_stubs(['$require']); self.$require("asciidoctor/converter/composite"); self.$require("asciidoctor/converter/html5"); self.$require("asciidoctor/extensions"); self.$require("asciidoctor/js/asciidoctor_ext"); return self.$require("asciidoctor/js/opal_ext/logger"); }; /* Generated by Opal 0.11.99.dev */ (function(Opal) { function $rb_minus(lhs, rhs) { return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs); } var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy; Opal.add_stubs(['$require', '$==', '$tap', '$each', '$constants', '$const_get', '$downcase', '$to_s', '$[]=', '$-', '$upcase', '$[]', '$values', '$new', '$attr_reader', '$instance_variable_set', '$send', '$singleton_class', '$<<', '$define', '$dirname', '$absolute_path', '$__dir__', '$join', '$home', '$pwd', '$to_set', '$chr', '$each_key', '$slice', '$length', '$merge', '$default=', '$drop', '$insert']); self.$require("set"); if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { self.$require("asciidoctor/js") } else { nil }; (function($base, $parent_nesting) { var self = $module($base, 'Asciidoctor'); var $nesting = [self].concat($parent_nesting), $a, $b, $Asciidoctor$7, $Asciidoctor$9, $Asciidoctor$11, $Asciidoctor$13, $writer = nil; Opal.const_set($nesting[0], 'RUBY_ENGINE_OPAL', Opal.const_set($nesting[0], 'RUBY_ENGINE', $$$('::', 'RUBY_ENGINE'))['$==']("opal")); (function($base, $parent_nesting) { var self = $module($base, 'SafeMode'); var $nesting = [self].concat($parent_nesting), $SafeMode$1, $SafeMode_value_for_name$3, $SafeMode_name_for_value$4, $SafeMode_names$5; Opal.const_set($nesting[0], 'UNSAFE', 0); Opal.const_set($nesting[0], 'SAFE', 1); Opal.const_set($nesting[0], 'SERVER', 10); Opal.const_set($nesting[0], 'SECURE', 20); self.names_by_value = $send($hash2([], {}), 'tap', [], ($SafeMode$1 = function(accum){var self = $SafeMode$1.$$s || this, $$2; if (accum == null) { accum = nil; }; return $send(self.$constants(false), 'each', [], ($$2 = function(sym){var self = $$2.$$s || this, $writer = nil; if (sym == null) { sym = nil; }; $writer = [self.$const_get(sym, false), sym.$to_s().$downcase()]; $send(accum, '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)];}, $$2.$$s = self, $$2.$$arity = 1, $$2));}, $SafeMode$1.$$s = self, $SafeMode$1.$$arity = 1, $SafeMode$1)); Opal.defs(self, '$value_for_name', $SafeMode_value_for_name$3 = function $$value_for_name(name) { var self = this; return self.$const_get(name.$upcase(), false) }, $SafeMode_value_for_name$3.$$arity = 1); Opal.defs(self, '$name_for_value', $SafeMode_name_for_value$4 = function $$name_for_value(value) { var self = this; if (self.names_by_value == null) self.names_by_value = nil; return self.names_by_value['$[]'](value) }, $SafeMode_name_for_value$4.$$arity = 1); Opal.defs(self, '$names', $SafeMode_names$5 = function $$names() { var self = this; if (self.names_by_value == null) self.names_by_value = nil; return self.names_by_value.$values() }, $SafeMode_names$5.$$arity = 0); })($nesting[0], $nesting); (function($base, $parent_nesting) { var self = $module($base, 'Compliance'); var $nesting = [self].concat($parent_nesting); self.keys = $$$('::', 'Set').$new(); (function(self, $parent_nesting) { var $nesting = [self].concat($parent_nesting), $define$6; self.$attr_reader("keys"); return (Opal.def(self, '$define', $define$6 = function $$define(key, value) { var self = this; if (self.keys == null) self.keys = nil; self.$instance_variable_set("" + "@" + (key), value); self.$singleton_class().$send("attr_accessor", key); self.keys['$<<'](key); return nil; }, $define$6.$$arity = 2), nil) && 'define'; })(Opal.get_singleton_class(self), $nesting); self.$define("block_terminates_paragraph", true); self.$define("strict_verbatim_paragraphs", true); self.$define("underline_style_section_titles", true); self.$define("unwrap_standalone_preamble", true); self.$define("attribute_missing", "skip"); self.$define("attribute_undefined", "drop-line"); self.$define("shorthand_property_syntax", true); self.$define("natural_xrefs", true); self.$define("unique_id_start_index", 2); self.$define("markdown_syntax", true); })($nesting[0], $nesting); if ($truthy((($a = $$($nesting, 'ROOT_DIR', 'skip_raise')) ? 'constant' : nil))) { } else { Opal.const_set($nesting[0], 'ROOT_DIR', $$$('::', 'File').$dirname($$$('::', 'File').$absolute_path(self.$__dir__()))) }; Opal.const_set($nesting[0], 'LIB_DIR', $$$('::', 'File').$join($$($nesting, 'ROOT_DIR'), "lib")); Opal.const_set($nesting[0], 'DATA_DIR', $$$('::', 'File').$join($$($nesting, 'ROOT_DIR'), "data")); Opal.const_set($nesting[0], 'USER_HOME', (function() { try { return $$$('::', 'Dir').$home() } catch ($err) { if (Opal.rescue($err, [$$($nesting, 'StandardError')])) { try { return ($truthy($b = $$$('::', 'ENV')['$[]']("HOME")) ? $b : $$$('::', 'Dir').$pwd()); } finally { Opal.pop_exception() } } else { throw $err; } }})()); Opal.const_set($nesting[0], 'LF', "\n"); Opal.const_set($nesting[0], 'NULL', "\u0000"); Opal.const_set($nesting[0], 'TAB', "\t"); Opal.const_set($nesting[0], 'MAX_INT', 9007199254740991); Opal.const_set($nesting[0], 'UTF_8', $$$($$$('::', 'Encoding'), 'UTF_8')); Opal.const_set($nesting[0], 'BOM_BYTES_UTF_8', [239, 187, 191]); Opal.const_set($nesting[0], 'BOM_BYTES_UTF_16LE', [255, 254]); Opal.const_set($nesting[0], 'BOM_BYTES_UTF_16BE', [254, 255]); Opal.const_set($nesting[0], 'FILE_READ_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { return "r" } else { return "rb:utf-8:utf-8" }; return nil; })()); Opal.const_set($nesting[0], 'URI_READ_MODE', $$($nesting, 'FILE_READ_MODE')); Opal.const_set($nesting[0], 'FILE_WRITE_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) { return "w" } else { return "w:utf-8" }; return nil; })()); Opal.const_set($nesting[0], 'DEFAULT_DOCTYPE', "article"); Opal.const_set($nesting[0], 'DEFAULT_BACKEND', "html5"); Opal.const_set($nesting[0], 'DEFAULT_STYLESHEET_KEYS', ["", "DEFAULT"].$to_set()); Opal.const_set($nesting[0], 'DEFAULT_STYLESHEET_NAME', "asciidoctor.css"); Opal.const_set($nesting[0], 'BACKEND_ALIASES', $hash2(["html", "docbook"], {"html": "html5", "docbook": "docbook5"})); Opal.const_set($nesting[0], 'DEFAULT_PAGE_WIDTHS', $hash2(["docbook"], {"docbook": 425})); Opal.const_set($nesting[0], 'DEFAULT_EXTENSIONS', $hash2(["html", "docbook", "pdf", "epub", "manpage", "asciidoc"], {"html": ".html", "docbook": ".xml", "pdf": ".pdf", "epub": ".epub", "manpage": ".man", "asciidoc": ".adoc"})); Opal.const_set($nesting[0], 'ASCIIDOC_EXTENSIONS', $hash2([".adoc", ".asciidoc", ".asc", ".ad", ".txt"], {".adoc": true, ".asciidoc": true, ".asc": true, ".ad": true, ".txt": true})); Opal.const_set($nesting[0], 'SETEXT_SECTION_LEVELS', $hash2(["=", "-", "~", "^", "+"], {"=": 0, "-": 1, "~": 2, "^": 3, "+": 4})); Opal.const_set($nesting[0], 'ADMONITION_STYLES', ["NOTE", "TIP", "IMPORTANT", "WARNING", "CAUTION"].$to_set()); Opal.const_set($nesting[0], 'ADMONITION_STYLE_HEADS', $send($$$('::', 'Set').$new(), 'tap', [], ($Asciidoctor$7 = function(accum){var self = $Asciidoctor$7.$$s || this, $$8; if (accum == null) { accum = nil; }; return $send($$($nesting, 'ADMONITION_STYLES'), 'each', [], ($$8 = function(s){var self = $$8.$$s || this; if (s == null) { s = nil; }; return accum['$<<'](s.$chr());}, $$8.$$s = self, $$8.$$arity = 1, $$8));}, $Asciidoctor$7.$$s = self, $Asciidoctor$7.$$arity = 1, $Asciidoctor$7))); Opal.const_set($nesting[0], 'PARAGRAPH_STYLES', ["comment", "example", "literal", "listing", "normal", "open", "pass", "quote", "sidebar", "source", "verse", "abstract", "partintro"].$to_set()); Opal.const_set($nesting[0], 'VERBATIM_STYLES', ["literal", "listing", "source", "verse"].$to_set()); Opal.const_set($nesting[0], 'DELIMITED_BLOCKS', $hash2(["--", "----", "....", "====", "****", "____", "++++", "|===", ",===", ":===", "!===", "////", "```"], {"--": ["open", ["comment", "example", "literal", "listing", "pass", "quote", "sidebar", "source", "verse", "admonition", "abstract", "partintro"].$to_set()], "----": ["listing", ["literal", "source"].$to_set()], "....": ["literal", ["listing", "source"].$to_set()], "====": ["example", ["admonition"].$to_set()], "****": ["sidebar", $$$('::', 'Set').$new()], "____": ["quote", ["verse"].$to_set()], "++++": ["pass", ["stem", "latexmath", "asciimath"].$to_set()], "|===": ["table", $$$('::', 'Set').$new()], ",===": ["table", $$$('::', 'Set').$new()], ":===": ["table", $$$('::', 'Set').$new()], "!===": ["table", $$$('::', 'Set').$new()], "////": ["comment", $$$('::', 'Set').$new()], "```": ["fenced_code", $$$('::', 'Set').$new()]})); Opal.const_set($nesting[0], 'DELIMITED_BLOCK_HEADS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$9 = function(accum){var self = $Asciidoctor$9.$$s || this, $$10; if (accum == null) { accum = nil; }; return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$10 = function(k){var self = $$10.$$s || this, $writer = nil; if (k == null) { k = nil; }; $writer = [k.$slice(0, 2), true]; $send(accum, '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)];}, $$10.$$s = self, $$10.$$arity = 1, $$10));}, $Asciidoctor$9.$$s = self, $Asciidoctor$9.$$arity = 1, $Asciidoctor$9))); Opal.const_set($nesting[0], 'DELIMITED_BLOCK_TAILS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$11 = function(accum){var self = $Asciidoctor$11.$$s || this, $$12; if (accum == null) { accum = nil; }; return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$12 = function(k){var self = $$12.$$s || this, $writer = nil; if (k == null) { k = nil; }; if (k.$length()['$=='](4)) { $writer = [k, k['$[]']($rb_minus(k.$length(), 1))]; $send(accum, '[]=', Opal.to_a($writer)); return $writer[$rb_minus($writer["length"], 1)]; } else { return nil };}, $$12.$$s = self, $$12.$$arity = 1, $$12));}, $Asciidoctor$11.$$s = self, $Asciidoctor$11.$$arity = 1, $Asciidoctor$11))); Opal.const_set($nesting[0], 'CAPTION_ATTR_NAMES', $hash2(["example", "figure", "listing", "table"], {"example": "example-caption", "figure": "figure-caption", "listing": "listing-caption", "table": "table-caption"})); Opal.const_set($nesting[0], 'LAYOUT_BREAK_CHARS', $hash2(["'", "<"], {"'": "thematic_break", "<": "page_break"})); Opal.const_set($nesting[0], 'MARKDOWN_THEMATIC_BREAK_CHARS', $hash2(["-", "*", "_"], {"-": "thematic_break", "*": "thematic_break", "_": "thematic_break"})); Opal.const_set($nesting[0], 'HYBRID_LAYOUT_BREAK_CHARS', $$($nesting, 'LAYOUT_BREAK_CHARS').$merge($$($nesting, 'MARKDOWN_THEMATIC_BREAK_CHARS'))); Opal.const_set($nesting[0], 'NESTABLE_LIST_CONTEXTS', ["ulist", "olist", "dlist"]); Opal.const_set($nesting[0], 'ORDERED_LIST_STYLES', ["arabic", "loweralpha", "lowerroman", "upperalpha", "upperroman"]); Opal.const_set($nesting[0], 'ORDERED_LIST_KEYWORDS', $hash2(["loweralpha", "lowerroman", "upperalpha", "upperroman"], {"loweralpha": "a", "lowerroman": "i", "upperalpha": "A", "upperroman": "I"})); Opal.const_set($nesting[0], 'ATTR_REF_HEAD', "{"); Opal.const_set($nesting[0], 'LIST_CONTINUATION', "+"); Opal.const_set($nesting[0], 'HARD_LINE_BREAK', " +"); Opal.const_set($nesting[0], 'LINE_CONTINUATION', " \\"); Opal.const_set($nesting[0], 'LINE_CONTINUATION_LEGACY', " +"); Opal.const_set($nesting[0], 'BLOCK_MATH_DELIMITERS', $hash2(["asciimath", "latexmath"], {"asciimath": ["\\$", "\\$"], "latexmath": ["\\[", "\\]"]})); Opal.const_set($nesting[0], 'INLINE_MATH_DELIMITERS', $hash2(["asciimath", "latexmath"], {"asciimath": ["\\$", "\\$"], "latexmath": ["\\(", "\\)"]})); $writer = ["asciimath"]; $send(Opal.const_set($nesting[0], 'STEM_TYPE_ALIASES', $hash2(["latexmath", "latex", "tex"], {"latexmath": "latexmath", "latex": "latexmath", "tex": "latexmath"})), 'default=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];; Opal.const_set($nesting[0], 'FONT_AWESOME_VERSION', "4.7.0"); Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.15.6"); Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.5"); Opal.const_set($nesting[0], 'FLEXIBLE_ATTRIBUTES', ["sectnums"]); Opal.const_set($nesting[0], 'INTRINSIC_ATTRIBUTES', $hash2(["startsb", "endsb", "vbar", "caret", "asterisk", "tilde", "plus", "backslash", "backtick", "blank", "empty", "sp", "two-colons", "two-semicolons", "nbsp", "deg", "zwsp", "quot", "apos", "lsquo", "rsquo", "ldquo", "rdquo", "wj", "brvbar", "pp", "cpp", "amp", "lt", "gt"], {"startsb": "[", "endsb": "]", "vbar": "|", "caret": "^", "asterisk": "*", "tilde": "~", "plus": "+", "backslash": "\\", "backtick": "`", "blank": "", "empty": "", "sp": " ", "two-colons": "::", "two-semicolons": ";;", "nbsp": " ", "deg": "°", "zwsp": "​", "quot": """, "apos": "'", "lsquo": "‘", "rsquo": "’", "ldquo": "“", "rdquo": "”", "wj": "⁠", "brvbar": "¦", "pp": "++", "cpp": "C++", "amp": "&", "lt": "<", "gt": ">"})); if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { } else { nil }; Opal.const_set($nesting[0], 'QUOTE_SUBS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$13 = function(accum){var self = $Asciidoctor$13.$$s || this, normal = nil, compat = nil; if (accum == null) { accum = nil; }; $writer = [false, (normal = [["strong", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?\\*\\*(" + ($$($nesting, 'CC_ALL')) + "+?)\\*\\*", 'm')], ["strong", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?\\*(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\*(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["double", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?\"`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)`\"(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["single", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:`}])(?:\\[([^\\]]+)\\])?'`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)`'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["monospaced", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?``(" + ($$($nesting, 'CC_ALL')) + "+?)``", 'm')], ["monospaced", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:\"'`}])(?:\\[([^\\]]+)\\])?`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)`(?![" + ($$($nesting, 'CC_WORD')) + "\"'`])", 'm')], ["emphasis", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?__(" + ($$($nesting, 'CC_ALL')) + "+?)__", 'm')], ["emphasis", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?_(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)_(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["mark", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?##(" + ($$($nesting, 'CC_ALL')) + "+?)##", 'm')], ["mark", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + "&;:}])(?:\\[([^\\]]+)\\])?#(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)#(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], ["superscript", "unconstrained", /\\?(?:\[([^\]]+)\])?\^(\S+?)\^/], ["subscript", "unconstrained", /\\?(?:\[([^\]]+)\])?~(\S+?)~/]])]; $send(accum, '[]=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];; $writer = [true, (compat = normal.$drop(0))]; $send(accum, '[]=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];; $writer = [2, ["double", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?``(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)''(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]]; $send(compat, '[]=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];; $writer = [3, ["single", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?`(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]]; $send(compat, '[]=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];; $writer = [4, ["monospaced", "unconstrained", new RegExp("" + "\\\\?(?:\\[([^\\]]+)\\])?\\+\\+(" + ($$($nesting, 'CC_ALL')) + "+?)\\+\\+", 'm')]]; $send(compat, '[]=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];; $writer = [5, ["monospaced", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]]; $send(compat, '[]=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)];; return compat.$insert(3, ["emphasis", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?'(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]);}, $Asciidoctor$13.$$s = self, $Asciidoctor$13.$$arity = 1, $Asciidoctor$13))); Opal.const_set($nesting[0], 'REPLACEMENTS', [[/\\?\(C\)/, "©", "none"], [/\\?\(R\)/, "®", "none"], [/\\?\(TM\)/, "™", "none"], [/(^|\n| |\\)--( |\n|$)/, " — ", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_WORD')) + ")\\\\?--(?=" + ($$($nesting, 'CG_WORD')) + ")"), "—​", "leading"], [/\\?\.\.\./, "…​", "none"], [/\\?`'/, "’", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_ALNUM')) + ")\\\\?'(?=" + ($$($nesting, 'CG_ALPHA')) + ")"), "’", "leading"], [/\\?->/, "→", "none"], [/\\?=>/, "⇒", "none"], [/\\?<-/, "←", "none"], [/\\?<=/, "⇐", "none"], [/\\?(&)amp;((?:[a-zA-Z][a-zA-Z]+\d{0,2}|#\d\d\d{0,4}|#x[\da-fA-F][\da-fA-F][\da-fA-F]{0,3});)/, "", "bounding"]]); if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { } else { nil }; if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { } else { nil }; })($nesting[0], $nesting); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/core_ext"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/helpers"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/logging"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/rx"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/substitutors"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/version"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/abstract_node"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/abstract_block"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/attribute_list"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/block"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/callouts"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/converter"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/document"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/inline"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/list"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/parser"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/path_resolver"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/reader"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/section"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/stylesheets"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/table"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/writer"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/load"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/convert"); if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) { self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/syntax_highlighter"); self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/timings"); return self.$require("asciidoctor/js/postscript"); } else { return nil }; })(Opal); /* global Opal */ /** * Convert a JSON to an (Opal) Hash. * @private */ var toHash = function (object) { return object && !object.$$is_hash ? Opal.hash2(Object.keys(object), object) : object } /** * Convert an (Opal) Hash to JSON. * @private */ var fromHash = function (hash) { var object = {} var data = hash.$$smap for (var key in data) { object[key] = data[key] } return object } var fromHashKeys = function (hash) { var object = {} var data = hash.$$keys for (var key in data) { object[key.toString()] = data[key].value } return object } /** * @private */ var prepareOptions = function (options) { options = toHash(options) if (options) { var attrs = options['$[]']('attributes') if (attrs && typeof attrs === 'object' && attrs.constructor.name === 'Object') { options = options.$dup() options['$[]=']('attributes', toHash(attrs)) } } return options } function initializeClass (superClass, className, functions, defaultFunctions, argProxyFunctions) { var scope = Opal.klass(Opal.Object, superClass, className, function () {}) var postConstructFunction var initializeFunction var constructorFunction var defaultFunctionsOverridden = {} for (var functionName in functions) { if (functions.hasOwnProperty(functionName)) { (function (functionName) { var userFunction = functions[functionName] if (functionName === 'postConstruct') { postConstructFunction = userFunction } else if (functionName === 'initialize') { initializeFunction = userFunction } else if (functionName === 'constructor') { constructorFunction = userFunction } else { if (defaultFunctions && defaultFunctions.hasOwnProperty(functionName)) { defaultFunctionsOverridden[functionName] = true } Opal.def(scope, '$' + functionName, function () { var args if (argProxyFunctions && argProxyFunctions.hasOwnProperty(functionName)) { args = argProxyFunctions[functionName](arguments) } else { args = arguments } return userFunction.apply(this, args) }) } }(functionName)) } } var initialize if (typeof constructorFunction === 'function') { initialize = function () { var args = Array.from(arguments) for (var i = 0; i < args.length; i++) { // convert all (Opal) Hash arguments to JSON. if (typeof args[i] === 'object' && '$$smap' in args[i]) { args[i] = fromHash(args[i]) } } args.unshift(null) var result = new (Function.prototype.bind.apply(constructorFunction, args)) // eslint-disable-line Object.assign(this, result) if (typeof postConstructFunction === 'function') { postConstructFunction.bind(this)() } } } else if (typeof initializeFunction === 'function') { initialize = function () { var args = Array.from(arguments) for (var i = 0; i < args.length; i++) { // convert all (Opal) Hash arguments to JSON. if (typeof args[i] === 'object' && '$$smap' in args[i]) { args[i] = fromHash(args[i]) } } initializeFunction.apply(this, args) if (typeof postConstructFunction === 'function') { postConstructFunction.bind(this)() } } } else { initialize = function () { Opal.send(this, Opal.find_super_dispatcher(this, 'initialize', initialize)) if (typeof postConstructFunction === 'function') { postConstructFunction.bind(this)() } } } Opal.def(scope, '$initialize', initialize) Opal.def(scope, 'super', function (func) { if (typeof func === 'function') { Opal.send(this, Opal.find_super_dispatcher(this, func.name, func)) } else { // Bind the initialize function to super(); var argumentsList = Array.from(arguments) for (var i = 0; i < argumentsList.length; i++) { // convert all (Opal) Hash arguments to JSON. if (typeof argumentsList[i] === 'object') { argumentsList[i] = toHash(argumentsList[i]) } } Opal.send(this, Opal.find_super_dispatcher(this, 'initialize', initialize), argumentsList) } }) if (defaultFunctions) { for (var defaultFunctionName in defaultFunctions) { if (defaultFunctions.hasOwnProperty(defaultFunctionName) && !defaultFunctionsOverridden.hasOwnProperty(defaultFunctionName)) { (function (defaultFunctionName) { var defaultFunction = defaultFunctions[defaultFunctionName] Opal.def(scope, '$' + defaultFunctionName, function () { return defaultFunction.apply(this, arguments) }) }(defaultFunctionName)) } } } return scope } // Asciidoctor API /** * @namespace * @description * The main application interface (API) for Asciidoctor. * This API provides methods to parse AsciiDoc content and convert it to various output formats using built-in or third-party converters. * * An AsciiDoc document can be as simple as a single line of content, * though it more commonly starts with a document header that declares the document title and document attribute definitions. * The document header is then followed by zero or more section titles, optionally nested, to organize the paragraphs, blocks, lists, etc. of the document. * * By default, the processor converts the AsciiDoc document to HTML 5 using a built-in converter. * However, this behavior can be changed by specifying a different backend (e.g., +docbook+). * A backend is a keyword for an output format (e.g., DocBook). * That keyword, in turn, is used to select a converter, which carries out the request to convert the document to that format. * * @example * asciidoctor.convertFile('document.adoc', { 'safe': 'safe' }) // Convert an AsciiDoc file * * asciidoctor.convert("I'm using *Asciidoctor* version {asciidoctor-version}.", { 'safe': 'safe' }) // Convert an AsciiDoc string * * const doc = asciidoctor.loadFile('document.adoc', { 'safe': 'safe' }) // Parse an AsciiDoc file into a document object * * const doc = asciidoctor.load("= Document Title\n\nfirst paragraph\n\nsecond paragraph", { 'safe': 'safe' }) // Parse an AsciiDoc string into a document object */ var Asciidoctor = Opal.Asciidoctor['$$class'] /** * Get Asciidoctor core version number. * * @memberof Asciidoctor * @returns {string} - returns the version number of Asciidoctor core. */ Asciidoctor.prototype.getCoreVersion = function () { return this.$$const.VERSION } /** * Get Asciidoctor.js runtime environment informations. * * @memberof Asciidoctor * @returns {Object} - returns the runtime environement including the ioModule, the platform, the engine and the framework. */ Asciidoctor.prototype.getRuntime = function () { return { ioModule: Opal.const_get_qualified('::', 'JAVASCRIPT_IO_MODULE'), platform: Opal.const_get_qualified('::', 'JAVASCRIPT_PLATFORM'), engine: Opal.const_get_qualified('::', 'JAVASCRIPT_ENGINE'), framework: Opal.const_get_qualified('::', 'JAVASCRIPT_FRAMEWORK') } } /** * Parse the AsciiDoc source input into an {@link Document} and convert it to the specified backend format. * * Accepts input as a Buffer or String. * * @param {string|Buffer} input - AsciiDoc input as String or Buffer * @param {Object} options - a JSON of options to control processing (default: {}) * @returns {string|Document} - returns the {@link Document} object if the converted String is written to a file, * otherwise the converted String * @memberof Asciidoctor * @example * var input = '= Hello, AsciiDoc!\n' + * 'Guillaume Grossetie \n\n' + * 'An introduction to http://asciidoc.org[AsciiDoc].\n\n' + * '== First Section\n\n' + * '* item 1\n' + * '* item 2\n'; * * var html = asciidoctor.convert(input); */ Asciidoctor.prototype.convert = function (input, options) { if (typeof input === 'object' && input.constructor.name === 'Buffer') { input = input.toString('utf8') } var result = this.$convert(input, prepareOptions(options)) return result === Opal.nil ? '' : result } /** * Parse the AsciiDoc source input into an {@link Document} and convert it to the specified backend format. * * @param {string} filename - source filename * @param {Object} options - a JSON of options to control processing (default: {}) * @returns {string|Document} - returns the {@link Document} object if the converted String is written to a file, * otherwise the converted String * @memberof Asciidoctor * @example * var html = asciidoctor.convertFile('./document.adoc'); */ Asciidoctor.prototype.convertFile = function (filename, options) { return this.$convert_file(filename, prepareOptions(options)) } /** * Parse the AsciiDoc source input into an {@link Document} * * Accepts input as a Buffer or String. * * @param {string|Buffer} input - AsciiDoc input as String or Buffer * @param {Object} options - a JSON of options to control processing (default: {}) * @returns {Document} - returns the {@link Document} object * @memberof Asciidoctor */ Asciidoctor.prototype.load = function (input, options) { if (typeof input === 'object' && input.constructor.name === 'Buffer') { input = input.toString('utf8') } return this.$load(input, prepareOptions(options)) } /** * Parse the contents of the AsciiDoc source file into an {@link Document} * * @param {string} filename - source filename * @param {Object} options - a JSON of options to control processing (default: {}) * @returns {Document} - returns the {@link Document} object * @memberof Asciidoctor */ Asciidoctor.prototype.loadFile = function (filename, options) { return this.$load_file(filename, prepareOptions(options)) } // AbstractBlock API /** * @namespace * @extends AbstractNode */ var AbstractBlock = Opal.Asciidoctor.AbstractBlock /** * Append a block to this block's list of child blocks. * * @memberof AbstractBlock * @returns {AbstractBlock} - the parent block to which this block was appended. * */ AbstractBlock.prototype.append = function (block) { this.$append(block) return this } /* * Apply the named inline substitutions to the specified text. * * If no substitutions are specified, the following substitutions are * applied: * * specialcharacters, quotes, attributes, replacements, macros, and post_replacements * @param {string} text - The text to substitute. * @param {Array} subs - A list named substitutions to apply to the text. * @memberof AbstractBlock * @returns {string} - returns the substituted text. */ AbstractBlock.prototype.applySubstitutions = function (text, subs) { return this.$apply_subs(text, subs) } /** * Get the String title of this Block with title substitions applied * * The following substitutions are applied to block and section titles: * * specialcharacters, quotes, replacements, macros, attributes and post_replacements * * @memberof AbstractBlock * @returns {string} - returns the converted String title for this Block, or undefined if the title is not set. * @example * block.title // "Foo 3^ # {two-colons} Bar(1)" * block.getTitle(); // "Foo 3^ # :: Bar(1)" */ AbstractBlock.prototype.getTitle = function () { var title = this.$title() return title === Opal.nil ? undefined : title } /** * Convenience method that returns the interpreted title of the Block * with the caption prepended. * Concatenates the value of this Block's caption instance variable and the * return value of this Block's title method. No space is added between the * two values. If the Block does not have a caption, the interpreted title is * returned. * * @memberof AbstractBlock * @returns {string} - the converted String title prefixed with the caption, or just the * converted String title if no caption is set */ AbstractBlock.prototype.getCaptionedTitle = function () { return this.$captioned_title() } /** * Get the style (block type qualifier) for this block. * @memberof AbstractBlock * @returns {string} - returns the style for this block */ AbstractBlock.prototype.getStyle = function () { return this.style } /** * Get the caption for this block. * @memberof AbstractBlock * @returns {string} - returns the caption for this block */ AbstractBlock.prototype.getCaption = function () { return this.$caption() } /** * Set the caption for this block. * @param {string} caption - Caption * @memberof AbstractBlock */ AbstractBlock.prototype.setCaption = function (caption) { this.caption = caption } /** * Get the level of this section or the section level in which this block resides. * @memberof AbstractBlock * @returns {number} - returns the level of this section */ AbstractBlock.prototype.getLevel = function () { return this.level } /** * Get the substitution keywords to be applied to the contents of this block. * * @memberof AbstractBlock * @returns {Array} - the list of {string} substitution keywords associated with this block. */ AbstractBlock.prototype.getSubstitutions = function () { return this.subs } /** * Check whether a given substitution keyword is present in the substitutions for this block. * * @memberof AbstractBlock * @returns {boolean} - whether the substitution is present on this block. */ AbstractBlock.prototype.hasSubstitution = function (substitution) { return this['$sub?'](substitution) } /** * Remove the specified substitution keyword from the list of substitutions for this block. * * @memberof AbstractBlock * @returns undefined */ AbstractBlock.prototype.removeSubstitution = function (substitution) { this.$remove_sub(substitution) } /** * Checks if the {@link AbstractBlock} contains any child blocks. * @memberof AbstractBlock * @returns {boolean} - whether the {@link AbstractBlock} has child blocks. */ AbstractBlock.prototype.hasBlocks = function () { return this.blocks.length > 0 } /** * Get the list of {@link AbstractBlock} sub-blocks for this block. * @memberof AbstractBlock * @returns {Array} - returns a list of {@link AbstractBlock} sub-blocks */ AbstractBlock.prototype.getBlocks = function () { return this.blocks } /** * Get the converted result of the child blocks by converting the children appropriate to content model that this block supports. * @memberof AbstractBlock * @returns {string} - returns the converted result of the child blocks */ AbstractBlock.prototype.getContent = function () { return this.$content() } /** * Get the converted content for this block. * If the block has child blocks, the content method should cause them to be converted * and returned as content that can be included in the parent block's template. * @memberof AbstractBlock * @returns {string} - returns the converted String content for this block */ AbstractBlock.prototype.convert = function () { return this.$convert() } /** * Query for all descendant block-level nodes in the document tree * that match the specified selector (context, style, id, and/or role). * If a function block is given, it's used as an additional filter. * If no selector or function block is supplied, all block-level nodes in the tree are returned. * @param {Object} [selector] * @param {function} [block] * @example * doc.findBy({'context': 'section'}); * // => { level: 0, title: "Hello, AsciiDoc!", blocks: 0 } * // => { level: 1, title: "First Section", blocks: 1 } * * doc.findBy({'context': 'section'}, function (section) { return section.getLevel() === 1; }); * // => { level: 1, title: "First Section", blocks: 1 } * * doc.findBy({'context': 'listing', 'style': 'source'}); * // => { context: :listing, content_model: :verbatim, style: "source", lines: 1 } * * @memberof AbstractBlock * @returns {Array} - returns a list of block-level nodes that match the filter or an empty list if no matches are found */ AbstractBlock.prototype.findBy = function (selector, block) { if (typeof block === 'undefined' && typeof selector === 'function') { return Opal.send(this, 'find_by', null, selector) } else if (typeof block === 'function') { return Opal.send(this, 'find_by', [toHash(selector)], block) } else { return this.$find_by(toHash(selector)) } } /** * Get the source line number where this block started. * @memberof AbstractBlock * @returns {number} - returns the source line number where this block started */ AbstractBlock.prototype.getLineNumber = function () { var lineno = this.$lineno() return lineno === Opal.nil ? undefined : lineno } /** * Check whether this block has any child Section objects. * Only applies to Document and Section instances. * @memberof AbstractBlock * @returns {boolean} - true if this block has child Section objects, otherwise false */ AbstractBlock.prototype.hasSections = function () { return this['$sections?']() } /** * Get the Array of child Section objects. * Only applies to Document and Section instances. * @memberof AbstractBlock * @returns {Array} - returns an {Array} of {@link Section} objects */ AbstractBlock.prototype.getSections = function () { return this.$sections() } /** * Get the numeral of this block (if section, relative to parent, otherwise absolute). * Only assigned to section if automatic section numbering is enabled. * Only assigned to formal block (block with title) if corresponding caption attribute is present. * If the section is an appendix, the numeral is a letter (starting with A). * @memberof AbstractBlock * @returns {string} - returns the numeral */ AbstractBlock.prototype.getNumeral = function () { return this.$numeral() } /** * Set the numeral of this block. * @memberof AbstractBlock */ AbstractBlock.prototype.setNumeral = function (value) { return this['$numeral='](value) } /** * A convenience method that checks whether the title of this block is defined. * * @returns a {boolean} indicating whether this block has a title. * @memberof AbstractBlock */ AbstractBlock.prototype.hasTitle = function () { return this['$title?']() } // Section API /** * @namespace * @extends AbstractBlock */ var Section = Opal.Asciidoctor.Section /** * Get the 0-based index order of this section within the parent block. * @memberof Section * @returns {number} */ Section.prototype.getIndex = function () { return this.index } /** * Set the 0-based index order of this section within the parent block. * @memberof Section */ Section.prototype.setIndex = function (value) { this.index = value } /** * Get the section name of this section. * @memberof Section * @returns {string} */ Section.prototype.getSectionName = function () { return this.sectname } /** * Set the section name of this section. * @memberof Section */ Section.prototype.setSectionName = function (value) { this.sectname = value } /** * Get the flag to indicate whether this is a special section or a child of one. * @memberof Section * @returns {boolean} */ Section.prototype.isSpecial = function () { return this.special } /** * Set the flag to indicate whether this is a special section or a child of one. * @memberof Section */ Section.prototype.setSpecial = function (value) { this.special = value } /** * Get the state of the numbered attribute at this section (need to preserve for creating TOC). * @memberof Section * @returns {boolean} */ Section.prototype.isNumbered = function () { return this.numbered } /** * Get the caption for this section (only relevant for appendices). * @memberof Section * @returns {string} */ Section.prototype.getCaption = function () { var value = this.caption return value === Opal.nil ? undefined : value } /** * Get the name of the Section (title) * @memberof Section * @returns {string} * @see {@link AbstractBlock#getTitle} */ Section.prototype.getName = function () { return this.getTitle() } /** * @namespace */ var Block = Opal.Asciidoctor.Block /** * Get the source of this block. * @memberof Block * @returns {string} - returns the String source of this block. */ Block.prototype.getSource = function () { return this.$source() } /** * Get the source lines of this block. * @memberof Block * @returns {Array} - returns the String {Array} of source lines for this block. */ Block.prototype.getSourceLines = function () { return this.lines } // AbstractNode API /** * @namespace */ var AbstractNode = Opal.Asciidoctor.AbstractNode /** * @memberof AbstractNode */ AbstractNode.prototype.getNodeName = function () { return this.node_name } /** * @memberof AbstractNode */ AbstractNode.prototype.getAttributes = function () { return fromHash(this.attributes) } /** * @memberof AbstractNode */ AbstractNode.prototype.getAttribute = function (name, defaultValue, inherit) { var value = this.$attr(name, defaultValue, inherit) return value === Opal.nil ? undefined : value } /** * Check whether the specified attribute is present on this node. * * @memberof AbstractNode * @returns {boolean} - true if the attribute is present, otherwise false */ AbstractNode.prototype.hasAttribute = function (name) { return name in this.attributes.$$smap } /** * @memberof AbstractNode */ AbstractNode.prototype.isAttribute = function (name, expectedValue, inherit) { var result = this['$attr?'](name, expectedValue, inherit) return result === Opal.nil ? false : result } /** * @memberof AbstractNode */ AbstractNode.prototype.setAttribute = function (name, value, overwrite) { if (typeof overwrite === 'undefined') overwrite = true return this.$set_attr(name, value, overwrite) } /** * Remove the attribute from the current node. * @param {string} name - The String attribute name to remove * @returns {string} - returns the previous {string} value, or undefined if the attribute was not present. * @memberof AbstractNode */ AbstractNode.prototype.removeAttribute = function (name) { var value = this.$remove_attr(name) return value === Opal.nil ? undefined : value } /** * Get the {@link Document} to which this node belongs. * * @memberof AbstractNode * @returns {Document} - returns the {@link Document} object to which this node belongs. */ AbstractNode.prototype.getDocument = function () { return this.document } /** * Get the {@link AbstractNode} to which this node is attached. * * @memberof AbstractNode * @returns {AbstractNode} - returns the {@link AbstractNode} object to which this node is attached, * or undefined if this node has no parent. */ AbstractNode.prototype.getParent = function () { var parent = this.parent return parent === Opal.nil ? undefined : parent } /** * @memberof AbstractNode */ AbstractNode.prototype.isInline = function () { return this['$inline?']() } /** * @memberof AbstractNode */ AbstractNode.prototype.isBlock = function () { return this['$block?']() } /** * @memberof AbstractNode */ AbstractNode.prototype.isRole = function (expected) { return this['$role?'](expected) } /** * @memberof AbstractNode */ AbstractNode.prototype.getRole = function () { return this.$role() } /** * @memberof AbstractNode */ AbstractNode.prototype.hasRole = function (name) { return this['$has_role?'](name) } /** * @memberof AbstractNode */ AbstractNode.prototype.getRoles = function () { return this.$roles() } /** * @memberof AbstractNode */ AbstractNode.prototype.addRole = function (name) { return this.$add_role(name) } /** * @memberof AbstractNode */ AbstractNode.prototype.removeRole = function (name) { return this.$remove_role(name) } /** * @memberof AbstractNode */ AbstractNode.prototype.isReftext = function () { return this['$reftext?']() } /** * @memberof AbstractNode */ AbstractNode.prototype.getReftext = function () { return this.$reftext() } /** * @memberof AbstractNode */ AbstractNode.prototype.getContext = function () { var context = this.context // Automatically convert Opal pseudo-symbol to String return typeof context === 'string' ? context : context.toString() } /** * @memberof AbstractNode */ AbstractNode.prototype.getId = function () { var id = this.id return id === Opal.nil ? undefined : id } /** * @memberof AbstractNode */ AbstractNode.prototype.isOption = function (name) { return this['$option?'](name) } /** * @memberof AbstractNode */ AbstractNode.prototype.setOption = function (name) { return this.$set_option(name) } /** * @memberof AbstractNode */ AbstractNode.prototype.getIconUri = function (name) { return this.$icon_uri(name) } /** * @memberof AbstractNode */ AbstractNode.prototype.getMediaUri = function (target, assetDirKey) { return this.$media_uri(target, assetDirKey) } /** * @memberof AbstractNode */ AbstractNode.prototype.getImageUri = function (targetImage, assetDirKey) { return this.$image_uri(targetImage, assetDirKey) } /** * @memberof AbstractNode */ AbstractNode.prototype.getConverter = function () { return this.$converter() } /** * @memberof AbstractNode */ AbstractNode.prototype.readContents = function (target, options) { return this.$read_contents(target, toHash(options)) } /** * Read the contents of the file at the specified path. * This method assumes that the path is safe to read. * It checks that the file is readable before attempting to read it * @param path - the {string} path from which to read the contents * @param options - a JSON {Object} of options to control processing (default: {}) * - warn_on_failure a {boolean} that controls whether a warning is issued if the file cannot be read (default: false) * - normalize a {boolean} that controls whether the lines are normalized and coerced to UTF-8 (default: false) * @returns the {string} content of the file at the specified path, or undefined if the file does not exist. * @memberof AbstractNode */ AbstractNode.prototype.readAsset = function (path, options) { var result = this.$read_asset(path, toHash(options)) return result === Opal.nil ? undefined : result } /** * @memberof AbstractNode */ AbstractNode.prototype.normalizeWebPath = function (target, start, preserveTargetUri) { return this.$normalize_web_path(target, start, preserveTargetUri) } /** * @memberof AbstractNode */ AbstractNode.prototype.normalizeSystemPath = function (target, start, jail, options) { return this.$normalize_system_path(target, start, jail, toHash(options)) } /** * @memberof AbstractNode */ AbstractNode.prototype.normalizeAssetPath = function (assetRef, assetName, autoCorrect) { return this.$normalize_asset_path(assetRef, assetName, autoCorrect) } // Document API /** * The {@link Document} class represents a parsed AsciiDoc document. * * Document is the root node of a parsed AsciiDoc document.
    * It provides an abstract syntax tree (AST) that represents the structure of the AsciiDoc document * from which the Document object was parsed. * * Although the constructor can be used to create an empty document object, * more commonly, you'll load the document object from AsciiDoc source * using the primary API methods on {@link Asciidoctor}. * When using one of these APIs, you almost always want to set the safe mode to 'safe' (or 'unsafe') * to enable all of Asciidoctor's features. * *
     *   var doc = Asciidoctor.load('= Hello, AsciiDoc!', { 'safe': 'safe' })
     *   // => Asciidoctor::Document { doctype: "article", doctitle: "Hello, AsciiDoc!", blocks: 0 }
     * 
    * * Instances of this class can be used to extract information from the document or alter its structure. * As such, the Document object is most often used in extensions and by integrations. * * The most basic usage of the Document object is to retrieve the document's title. * *
     *  var source = '= Document Title'
     *  var doc = asciidoctor.load(source, { 'safe': 'safe' })
     *  console.log(doc.getTitle()) // 'Document Title'
     * 
    * * You can also use the Document object to access document attributes defined in the header, such as the author and doctype. * @namespace * @extends AbstractBlock */ var Document = Opal.Asciidoctor.Document /** * Returns a JSON {Object} of references captured by the processor. * * @returns {Object} - returns a JSON {Object} of {AbstractNode} in the document. * @memberof Document */ Document.prototype.getRefs = function () { return fromHash(this.catalog.$$smap.refs) } /** * Returns an {Array} of Document/ImageReference} captured by the processor. * * @returns {Array} - returns an {Array} of {Document/ImageReference} in the document. * Will return an empty array if the option "catalog_assets: true" was not defined on the processor. * @memberof Document */ Document.prototype.getImages = function () { return this.catalog.$$smap.images } /** * Returns an {Array} of links captured by the processor. * * @returns {Array} - returns an {Array} of links in the document. * Will return an empty array if: * - the function was called before the document was converted * - the option "catalog_assets: true" was not defined on the processor * @memberof Document */ Document.prototype.getLinks = function () { return this.catalog.$$smap.links } /** * @returns {boolean} - returns true if the document has footnotes otherwise false * @memberof Document */ Document.prototype.hasFootnotes = function () { return this['$footnotes?']() } /** * Returns an {Array} of {Document/Footnote} captured by the processor. * * @returns {Array} - returns an {Array} of {Document/Footnote} in the document. * Will return an empty array if the function was called before the document was converted. * @memberof Document */ Document.prototype.getFootnotes = function () { return this.$footnotes() } /** * Returns the level-0 {Section} (i.e. the document title). * Only stores the title, not the header attributes. * * @returns {string} - returns the level-0 {Section}. * @memberof Document */ Document.prototype.getHeader = function () { return this.header } /** * @memberof Document */ Document.prototype.setAttribute = function (name, value) { return this.$set_attribute(name, value) } /** * @memberof Document */ Document.prototype.removeAttribute = function (name) { this.attributes.$delete(name) this.attribute_overrides.$delete(name) } /** * @memberof Document */ Document.prototype.convert = function (options) { var result = this.$convert(toHash(options)) return result === Opal.nil ? '' : result } /** * @memberof Document */ Document.prototype.write = function (output, target) { return this.$write(output, target) } /** * @returns {string} - returns the full name of the author as a String * @memberof Document */ Document.prototype.getAuthor = function () { return this.$author() } /** * @memberof Document */ Document.prototype.getSource = function () { return this.$source() } /** * @memberof Document */ Document.prototype.getSourceLines = function () { return this.$source_lines() } /** * @memberof Document */ Document.prototype.isNested = function () { return this['$nested?']() } /** * @memberof Document */ Document.prototype.isEmbedded = function () { return this['$embedded?']() } /** * @memberof Document */ Document.prototype.hasExtensions = function () { return this['$extensions?']() } /** * @memberof Document */ Document.prototype.getDoctype = function () { return this.doctype } /** * @memberof Document */ Document.prototype.getBackend = function () { return this.backend } /** * @memberof Document */ Document.prototype.isBasebackend = function (base) { return this['$basebackend?'](base) } /** * Get the title explicitly defined in the document attributes. * @returns {string} * @see {@link AbstractNode#getAttributes} * @memberof Document */ Document.prototype.getTitle = function () { var title = this.$title() return title === Opal.nil ? undefined : title } /** * @memberof Document */ Document.prototype.setTitle = function (title) { return this['$title='](title) } /** * @memberof Document * @returns {Document/Title} - returns a {@link Document/Title} */ Document.prototype.getDocumentTitle = function (options) { var doctitle = this.$doctitle(toHash(options)) return doctitle === Opal.nil ? undefined : doctitle } /** * @memberof Document * @see {@link Document#getDocumentTitle} */ Document.prototype.getDoctitle = Document.prototype.getDocumentTitle /** * Get the document catalog Hash. * @memberof Document */ Document.prototype.getCatalog = function () { return fromHash(this.catalog) } /** * @memberof Document */ Document.prototype.getReferences = Document.prototype.getCatalog /** * Get the document revision date from document header (document attribute revdate). * @memberof Document */ Document.prototype.getRevisionDate = function () { return this.getAttribute('revdate') } /** * @memberof Document * @see Document#getRevisionDate */ Document.prototype.getRevdate = function () { return this.getRevisionDate() } /** * Get the document revision number from document header (document attribute revnumber). * @memberof Document */ Document.prototype.getRevisionNumber = function () { return this.getAttribute('revnumber') } /** * Get the document revision remark from document header (document attribute revremark). * @memberof Document */ Document.prototype.getRevisionRemark = function () { return this.getAttribute('revremark') } /** * Assign a value to the specified attribute in the document header. * * The assignment will be visible when the header attributes are restored, * typically between processor phases (e.g., between parse and convert). * * @param {string} name - The {string} attribute name to assign * @param {Object} value - The {Object} value to assign to the attribute (default: '') * @param {boolean} overwrite - A {boolean} indicating whether to assign the attribute * if already present in the attributes Hash (default: true) * * @memberof Document * @returns {boolean} - returns true if the assignment was performed otherwise false */ Document.prototype.setHeaderAttribute = function (name, value, overwrite) { if (typeof overwrite === 'undefined') overwrite = true if (typeof value === 'undefined') value = '' return this.$set_header_attribute(name, value, overwrite) } /** * Convenience method to retrieve the authors of this document as an {Array} of {Document/Author} objects. * * This method is backed by the author-related attributes on the document. * * @memberof Document * @returns {Array} - returns an {Array} of {Document/Author} objects. */ Document.prototype.getAuthors = function () { return this.$authors() } // Document.Footnote API /** * @namespace * @module Document/Footnote */ var Footnote = Document.Footnote /** * @memberof Document/Footnote * @returns {number} - returns the footnote's index */ Footnote.prototype.getIndex = function () { var index = this.$$data.index return index === Opal.nil ? undefined : index } /** * @memberof Document/Footnote * @returns {string} - returns the footnote's id */ Footnote.prototype.getId = function () { var id = this.$$data.id return id === Opal.nil ? undefined : id } /** * @memberof Document/Footnote * @returns {string} - returns the footnote's text */ Footnote.prototype.getText = function () { var text = this.$$data.text return text === Opal.nil ? undefined : text } // Document.ImageReference API /** * @namespace * @module Document/ImageReference */ var ImageReference = Document.ImageReference /** * @memberof Document/ImageReference * @returns {string} - returns the image's target */ ImageReference.prototype.getTarget = function () { return this.$$data.target } /** * @memberof Document/ImageReference * @returns {string} - returns the image's directory (imagesdir attribute) */ ImageReference.prototype.getImagesDirectory = function () { var value = this.$$data.imagesdir return value === Opal.nil ? undefined : value } // Document.Author API /** * @namespace * @module Document/Author */ var Author = Document.Author /** * @memberof Document/Author * @returns {string} - returns the author's full name */ Author.prototype.getName = function () { var name = this.$$data.name return name === Opal.nil ? undefined : name } /** * @memberof Document/Author * @returns {string} - returns the author's first name */ Author.prototype.getFirstName = function () { var firstName = this.$$data.firstname return firstName === Opal.nil ? undefined : firstName } /** * @memberof Document/Author * @returns {string} - returns the author's middle name (or undefined if the author has no middle name) */ Author.prototype.getMiddleName = function () { var middleName = this.$$data.middlename return middleName === Opal.nil ? undefined : middleName } /** * @memberof Document/Author * @returns {string} - returns the author's last name */ Author.prototype.getLastName = function () { var lastName = this.$$data.lastname return lastName === Opal.nil ? undefined : lastName } /** * @memberof Document/Author * @returns {string} - returns the author's initials (by default based on the author's name) */ Author.prototype.getInitials = function () { var initials = this.$$data.initials return initials === Opal.nil ? undefined : initials } /** * @memberof Document/Author * @returns {string} - returns the author's email */ Author.prototype.getEmail = function () { var email = this.$$data.email return email === Opal.nil ? undefined : email } // private constructor Document.RevisionInfo = function (date, number, remark) { this.date = date this.number = number this.remark = remark } /** * @class * @namespace * @module Document/RevisionInfo */ var RevisionInfo = Document.RevisionInfo /** * Get the document revision date from document header (document attribute revdate). * @memberof Document/RevisionInfo */ RevisionInfo.prototype.getDate = function () { return this.date } /** * Get the document revision number from document header (document attribute revnumber). * @memberof Document/RevisionInfo */ RevisionInfo.prototype.getNumber = function () { return this.number } /** * Get the document revision remark from document header (document attribute revremark). * A short summary of changes in this document revision. * @memberof Document/RevisionInfo */ RevisionInfo.prototype.getRemark = function () { return this.remark } /** * @memberof Document/RevisionInfo * @returns {boolean} - returns true if the revision info is empty (ie. not defined), otherwise false */ RevisionInfo.prototype.isEmpty = function () { return this.date === undefined && this.number === undefined && this.remark === undefined } /** * @memberof Document * @returns {Document/RevisionInfo} - returns a {@link Document/RevisionInfo} */ Document.prototype.getRevisionInfo = function () { return new Document.RevisionInfo(this.getRevisionDate(), this.getRevisionNumber(), this.getRevisionRemark()) } /** * @memberof Document * @returns {boolean} - returns true if the document contains revision info, otherwise false */ Document.prototype.hasRevisionInfo = function () { var revisionInfo = this.getRevisionInfo() return !revisionInfo.isEmpty() } /** * @memberof Document */ Document.prototype.getNotitle = function () { return this.$notitle() } /** * @memberof Document */ Document.prototype.getNoheader = function () { return this.$noheader() } /** * @memberof Document */ Document.prototype.getNofooter = function () { return this.$nofooter() } /** * @memberof Document */ Document.prototype.hasHeader = function () { return this['$header?']() } /** * @memberof Document */ Document.prototype.deleteAttribute = function (name) { return this.$delete_attribute(name) } /** * @memberof Document */ Document.prototype.isAttributeLocked = function (name) { return this['$attribute_locked?'](name) } /** * @memberof Document */ Document.prototype.parse = function (data) { return this.$parse(data) } /** * @memberof Document */ Document.prototype.getDocinfo = function (docinfoLocation, suffix) { return this.$docinfo(docinfoLocation, suffix) } /** * @memberof Document */ Document.prototype.hasDocinfoProcessors = function (docinfoLocation) { return this['$docinfo_processors?'](docinfoLocation) } /** * @memberof Document */ Document.prototype.counterIncrement = function (counterName, block) { return this.$counter_increment(counterName, block) } /** * @memberof Document */ Document.prototype.counter = function (name, seed) { return this.$counter(name, seed) } /** * @memberof Document */ Document.prototype.getSafe = function () { return this.safe } /** * @memberof Document */ Document.prototype.getCompatMode = function () { return this.compat_mode } /** * @memberof Document */ Document.prototype.getSourcemap = function () { var sourcemap = this.sourcemap return sourcemap === Opal.nil ? false : sourcemap } /** * @memberof Document */ Document.prototype.getCounters = function () { return fromHash(this.counters) } /** * @memberof Document */ Document.prototype.getCallouts = function () { return this.$callouts() } /** * @memberof Document */ Document.prototype.getBaseDir = function () { return this.base_dir } /** * @memberof Document */ Document.prototype.getOptions = function () { return fromHash(this.options) } /** * @memberof Document */ Document.prototype.getOutfilesuffix = function () { return this.outfilesuffix } /** * @memberof Document */ Document.prototype.getParentDocument = function () { var parentDocument = this.parent_document return parentDocument === Opal.nil ? undefined : parentDocument } /** * @memberof Document */ Document.prototype.getReader = function () { return this.reader } /** * @memberof Document */ Document.prototype.getConverter = function () { return this.converter } /** * @memberof Document */ Document.prototype.getExtensions = function () { var extensions = this.extensions return extensions === Opal.nil ? undefined : extensions } // Document.Title API /** * @namespace * @module Document/Title */ var Title = Document.Title /** * @memberof Document/Title */ Title.prototype.getMain = function () { return this.main } /** * @memberof Document/Title */ Title.prototype.getCombined = function () { return this.combined } /** * @memberof Document/Title */ Title.prototype.getSubtitle = function () { var subtitle = this.subtitle return subtitle === Opal.nil ? undefined : subtitle } /** * @memberof Document/Title */ Title.prototype.isSanitized = function () { var sanitized = this['$sanitized?']() return sanitized === Opal.nil ? false : sanitized } /** * @memberof Document/Title */ Title.prototype.hasSubtitle = function () { return this['$subtitle?']() } // Inline API /** * @namespace * @extends AbstractNode */ var Inline = Opal.Asciidoctor.Inline /** * Create a new Inline element. * * @memberof Inline * @returns {Inline} - returns a new Inline element */ Inline.create = function (parent, context, text, opts) { return this.$new(parent, context, text, toHash(opts)) } /** * Get the converted content for this inline node. * * @memberof Inline * @returns {string} - returns the converted String content for this inline node */ Inline.prototype.convert = function () { return this.$convert() } /** * Get the converted String text of this Inline node, if applicable. * * @memberof Inline * @returns {string} - returns the converted String text for this Inline node, or undefined if not applicable for this node. */ Inline.prototype.getText = function () { var text = this.$text() return text === Opal.nil ? undefined : text } /** * Get the String sub-type (aka qualifier) of this Inline node. * * This value is used to distinguish different variations of the same node * category, such as different types of anchors. * * @memberof Inline * @returns {string} - returns the string sub-type of this Inline node. */ Inline.prototype.getType = function () { return this.$type() } /** * Get the primary String target of this Inline node. * * @memberof Inline * @returns {string} - returns the string target of this Inline node. */ Inline.prototype.getTarget = function () { var target = this.$target() return target === Opal.nil ? undefined : target } // List API /** @namespace */ var List = Opal.Asciidoctor.List /** * Checks if the {@link List} contains any child {@link ListItem}. * * @memberof List * @returns {boolean} - whether the {@link List} has child {@link ListItem}. */ List.prototype.hasItems = function () { return this['$items?']() } /** * Get the Array of {@link ListItem} nodes for this {@link List}. * * @memberof List * @returns {Array} - returns an Array of {@link ListItem} nodes. */ List.prototype.getItems = function () { return this.blocks } // ListItem API /** @namespace */ var ListItem = Opal.Asciidoctor.ListItem /** * Get the converted String text of this {@link ListItem} node. * * @memberof ListItem * @returns {string} - returns the converted String text for this {@link ListItem} node. */ ListItem.prototype.getText = function () { return this.$text() } /** * Set the String source text of this {@link ListItem} node. * * @memberof ListItem */ ListItem.prototype.setText = function (text) { return this['$text='](text) } /** * A convenience method that checks whether the text of this {@link ListItem} is not blank (i.e. not undefined or empty string). * * @memberof ListItem * @returns {boolean} - whether the text is not blank */ ListItem.prototype.hasText = function () { return this['$text?']() } /** * Get the {string} used to mark this {@link ListItem}. * * @memberof ListItem */ ListItem.prototype.getMarker = function () { return this.marker } /** * Set the {string} used to mark this {@link ListItem}. * * @param {string} marker - the {string} used to mark this {@link ListItem} * @memberof ListItem */ ListItem.prototype.setMarker = function (marker) { this.marker = marker } /** * Get the {@link List} to which this {@link ListItem} is attached. * * @memberof ListItem * @returns {List} - returns the {@link List} object to which this {@link ListItem} is attached, * or undefined if this node has no parent. */ ListItem.prototype.getList = function () { return this.$list() } /** * @memberof ListItem * @see {@link ListItem#getList} */ ListItem.prototype.getParent = ListItem.prototype.getList // Reader API /** @namespace */ var Reader = Opal.Asciidoctor.Reader /** * @memberof Reader */ Reader.prototype.pushInclude = function (data, file, path, lineno, attributes) { return this.$push_include(data, file, path, lineno, toHash(attributes)) } /** * Get the current location of the reader's cursor, which encapsulates the * file, dir, path, and lineno of the file being read. * * @memberof Reader */ Reader.prototype.getCursor = function () { return this.$cursor() } /** * Get the remaining unprocessed lines, without consuming them, as an {Array} of {string}. * * Lines will not be consumed from the Reader (ie. you will be able to read these lines again). * * @memberof Reader * @returns {Array} - returns the remaining unprocessed lines as an {Array} of {string}. */ Reader.prototype.getLines = function () { return this.$lines() } /** * Get the remaining unprocessed lines, without consuming them, as a {string}. * * Lines will not be consumed from the Reader (ie. you will be able to read these lines again). * * @memberof Reader * @returns {string} - returns the remaining unprocessed lines as a {string} (joined by linefeed characters). */ Reader.prototype.getString = function () { return this.$string() } /** * Check whether there are any lines left to read. * If a previous call to this method resulted in a value of false, immediately returned the cached value. * Otherwise, delegate to peekLine to determine if there is a next line available. * * @memberof Reader * @returns {boolean} - returns true if there are more lines, false if there are not. */ Reader.prototype.hasMoreLines = function () { return this['$has_more_lines?']() } /** * Check whether this reader is empty (contains no lines). * * @memberof Reader * @returns {boolean} - returns true if there are no more lines to peek, otherwise false. */ Reader.prototype.isEmpty = function () { return this['$empty?']() } /** * Peek at the next line. * Processes the line if not already marked as processed, but does not consume it (ie. you will be able to read this line again). * * This method will probe the reader for more lines. * If there is a next line that has not previously been visited, the line is passed to the Reader#processLine method to be initialized. * This call gives sub-classes the opportunity to do preprocessing. * If the return value of the Reader#processLine is undefined, the data is assumed to be changed and Reader#peekLine is invoked again to perform further processing. * * If hasMoreLines is called immediately before peekLine, the direct flag is implicitly true (since the line is flagged as visited). * * @param {boolean} direct - A {boolean} flag to bypasses the check for more lines and immediately returns the first element of the internal lines {Array}. (default: false) * @memberof Reader * @returns {string} - returns the next line as a {string} if there are lines remaining. */ Reader.prototype.peekLine = function (direct) { direct = direct || false var line = this['$peek_line'](direct) return line === Opal.nil ? undefined : line } /** * Consume, preprocess, and return the next line. * * Line will be consumed from the Reader (ie. you won't be able to read this line again). * * @memberof Reader * @returns {string} - returns the next line as a {string} if data is present. */ Reader.prototype.readLine = function () { var line = this['$read_line']() return line === Opal.nil ? undefined : line } /** * Consume, preprocess, and return the remaining lines. * * This method calls Reader#readLine repeatedly until all lines are consumed and returns the lines as an {Array} of {string}. * This method differs from Reader#getLines in that it processes each line in turn, hence triggering any preprocessors implemented in sub-classes. * * Lines will be consumed from the Reader (ie. you won't be able to read these lines again). * * @memberof Reader * @returns {Array} - returns the lines read as an {Array} of {string}. */ Reader.prototype.readLines = function () { return this['$read_lines']() } /** * Consume, preprocess, and return the remaining lines joined as a {string}. * * Delegates to Reader#readLines, then joins the result. * * Lines will be consumed from the Reader (ie. you won't be able to read these lines again). * * @memberof Reader * @returns {string} - returns the lines read joined as a {string} */ Reader.prototype.read = function () { return this['$read']() } // Cursor API /** @namespace */ var Cursor = Opal.Asciidoctor.Reader.Cursor /** * Get the file associated to the cursor. * @memberof Cursor */ Cursor.prototype.getFile = function () { var file = this.file return file === Opal.nil ? undefined : file } /** * Get the directory associated to the cursor. * @memberof Cursor * @returns {string} - returns the directory associated to the cursor */ Cursor.prototype.getDirectory = function () { var dir = this.dir return dir === Opal.nil ? undefined : dir } /** * Get the path associated to the cursor. * @memberof Cursor * @returns {string} - returns the path associated to the cursor (or '') */ Cursor.prototype.getPath = function () { var path = this.path return path === Opal.nil ? undefined : path } /** * Get the line number of the cursor. * @memberof Cursor * @returns {number} - returns the line number of the cursor */ Cursor.prototype.getLineNumber = function () { return this.lineno } // Logger API (available in Asciidoctor 1.5.7+) function initializeLoggerFormatterClass (className, functions) { var superclass = Opal.const_get_qualified(Opal.Logger, 'Formatter') return initializeClass(superclass, className, functions, {}, { 'call': function (args) { for (var i = 0; i < args.length; i++) { // convert all (Opal) Hash arguments to JSON. if (typeof args[i] === 'object' && '$$smap' in args[i]) { args[i] = fromHash(args[i]) } } return args } }) } function initializeLoggerClass (className, functions) { var superClass = Opal.const_get_qualified(Opal.Asciidoctor, 'Logger') return initializeClass(superClass, className, functions, {}, { 'add': function (args) { if (args.length >= 2 && typeof args[2] === 'object' && '$$smap' in args[2]) { var message = args[2] var messageObject = fromHash(message) messageObject.getText = function () { return this['text'] } messageObject.getSourceLocation = function () { return this['source_location'] } messageObject['$inspect'] = function () { var sourceLocation = this.getSourceLocation() if (sourceLocation) { return sourceLocation.getPath() + ': line ' + sourceLocation.getLineNumber() + ': ' + this.getText() } else { return this.getText() } } args[2] = messageObject } if (args.length >= 1) { args[1] = args[1] === Opal.nil ? undefined : args[1] } return args } }) } /** * @namespace */ var LoggerManager = Opal.const_get_qualified(Opal.Asciidoctor, 'LoggerManager', true) // Alias Opal.Asciidoctor.LoggerManager = LoggerManager LoggerManager.getLogger = function () { return this.$logger() } LoggerManager.setLogger = function (logger) { this.logger = logger } LoggerManager.newLogger = function (name, functions) { return initializeLoggerClass(name, functions).$new() } LoggerManager.newFormatter = function (name, functions) { return initializeLoggerFormatterClass(name, functions).$new() } /** * @namespace */ var LoggerSeverity = Opal.const_get_qualified(Opal.Logger, 'Severity', true) // Alias Opal.Asciidoctor.LoggerSeverity = LoggerSeverity LoggerSeverity.get = function (severity) { return LoggerSeverity.$constants()[severity] } /** * @namespace */ var LoggerFormatter = Opal.const_get_qualified(Opal.Logger, 'Formatter', true) // Alias Opal.Asciidoctor.LoggerFormatter = LoggerFormatter LoggerFormatter.prototype.call = function (severity, time, programName, message) { return this.$call(LoggerSeverity.get(severity), time, programName, message) } /** * @namespace */ var MemoryLogger = Opal.const_get_qualified(Opal.Asciidoctor, 'MemoryLogger', true) // Alias Opal.Asciidoctor.MemoryLogger = MemoryLogger MemoryLogger.create = function () { return this.$new() } MemoryLogger.prototype.getMessages = function () { var messages = this.messages var result = [] for (var i = 0; i < messages.length; i++) { var message = messages[i] var messageObject = fromHash(message) if (typeof messageObject.message === 'string') { messageObject.getText = function () { return this.message } } else { // also convert the message attribute messageObject.message = fromHash(messageObject.message) messageObject.getText = function () { return this.message['text'] } } messageObject.getSeverity = function () { return this.severity.toString() } messageObject.getSourceLocation = function () { return this.message['source_location'] } result.push(messageObject) } return result } var Logging = Opal.const_get_qualified(Opal.Asciidoctor, 'Logging', true) Opal.Asciidoctor.Logging = Logging Logging.getLogger = function () { return LoggerManager.$logger() } Logging.createLogMessage = function (text, context) { return Logging.prototype.$message_with_context(text, toHash(context)) } // alias Reader.prototype.getLogger = Logging.getLogger Reader.prototype.createLogMessage = Logging.createLogMessage AbstractNode.prototype.getLogger = Logging.getLogger AbstractNode.prototype.createLogMessage = Logging.createLogMessage /** * @namespace */ var Logger = Opal.const_get_qualified(Opal.Asciidoctor, 'Logger', true) // Alias Opal.Asciidoctor.Logger = Logger Logger.prototype.getMaxSeverity = function () { var result = this.max_severity return result === Opal.nil ? undefined : result } Logger.prototype.getFormatter = function () { return this.formatter } Logger.prototype.setFormatter = function (formatter) { this.formatter = formatter } Logger.prototype.getLevel = function () { return this.level } Logger.prototype.setLevel = function (level) { this.level = level } Logger.prototype.getProgramName = function () { return this.progname } Logger.prototype.setProgramName = function (programName) { this.progname = programName } var RubyLogger = Opal.const_get_qualified('::', 'Logger') var log = function (logger, level, message) { logger['$' + level](message) } RubyLogger.prototype.add = function (severity, message, programName) { var severityValue = typeof severity === 'string' ? LoggerSeverity[severity.toUpperCase()] : severity this['$add'](severityValue, message, programName) } RubyLogger.prototype.log = RubyLogger.prototype.add RubyLogger.prototype.debug = function (message) { log(this, 'debug', message) } RubyLogger.prototype.info = function (message) { log(this, 'info', message) } RubyLogger.prototype.warn = function (message) { log(this, 'warn', message) } RubyLogger.prototype.error = function (message) { log(this, 'error', message) } RubyLogger.prototype.fatal = function (message) { log(this, 'fatal', message) } RubyLogger.prototype.isDebugEnabled = function () { return this['$debug?']() } RubyLogger.prototype.isInfoEnabled = function () { return this['$info?']() } RubyLogger.prototype.isWarnEnabled = function () { return this['$warn?']() } RubyLogger.prototype.isErrorEnabled = function () { return this['$error?']() } RubyLogger.prototype.isFatalEnabled = function () { return this['$fatal?']() } /** * @namespace */ var NullLogger = Opal.const_get_qualified(Opal.Asciidoctor, 'NullLogger', true) // Alias Opal.Asciidoctor.NullLogger = NullLogger NullLogger.create = function () { return this.$new() } NullLogger.prototype.getMaxSeverity = function () { return this.max_severity } // Alias Opal.Asciidoctor.StopIteration = Opal.StopIteration /** * @namespace */ var Timings = Opal.const_get_qualified(Opal.Asciidoctor, 'Timings', true) // Alias Opal.Asciidoctor.Timings = Timings Timings.create = function () { return this.$new() } Timings.prototype.printReport = function (to, subject) { var outputFunction if (to) { if (typeof to['$add'] === 'function') { outputFunction = function (message) { to['$add'](1, message) } } else if (typeof to.log === 'function') { outputFunction = to.log } else if (typeof to.write === 'function') { outputFunction = function (message) { to.write(message, 'utf-8') } } else { throw new Error('The output should be a Stream (with a write function), an object with a log function or a Ruby Logger (with a add function)') } } else { outputFunction = function (message) { Opal.gvars.stdout['$write'](message) } } if (subject) { outputFunction('Input file: ' + subject) } outputFunction(' Time to read and parse source: ' + this.$read_parse().toFixed(2)) outputFunction(' Time to convert document: ' + this.$convert().toFixed(2)) outputFunction(' Total time (read, parse and convert): ' + this.$read_parse_convert().toFixed(2)) } /** * @namespace * @description * This API is experimental and subject to change. * * A pluggable adapter for integrating a syntax (aka code) highlighter into AsciiDoc processing. * * There are two types of syntax highlighter adapters. The first performs syntax highlighting during the convert phase. * This adapter type must define a "handlesHighlighting" method that returns true. * The companion "highlight" method will then be called to handle the "specialcharacters" substitution for source blocks. * * The second assumes syntax highlighting is performed on the client (e.g., when the HTML document is loaded). * This adapter type must define a "hasDocinfo" method that returns true. * The companion "docinfo" method will then be called to insert markup into the output document. * The docinfo functionality is available to both adapter types. * * Asciidoctor.js provides several a built-in adapter for highlight.js. * Additional adapters can be registered using SyntaxHighlighter.register. */ var SyntaxHighlighter = Opal.const_get_qualified(Opal.Asciidoctor, 'SyntaxHighlighter', true) // Alias Opal.Asciidoctor.SyntaxHighlighter = SyntaxHighlighter /** * Associates the syntax highlighter class or object with the specified names. * * @description This API is experimental and subject to change. * * @memberof SyntaxHighlighter * @param {string|Array} names - A {string} name or an {Array} of {string} names * @param functions - A {SyntaxHighlighter} Class or Object instance */ SyntaxHighlighter.register = function (names, functions) { var name = typeof names === 'string' ? names : names[0] if (typeof functions === 'function') { var classObject = functions var prototype = classObject.prototype var properties = Object.getOwnPropertyNames(prototype) functions = {} for (var propertyIdx in properties) { var propertyName = properties[propertyIdx] functions[propertyName] = prototype[propertyName] } } var scope = initializeClass(SyntaxHighlighterBase, name, functions, {}, { 'format': function (args) { if (args.length >= 2 && typeof args[2] === 'object' && '$$smap' in args[2]) { args[2] = fromHash(args[2]) } if (args.length >= 1) { args[1] = args[1] === Opal.nil ? undefined : args[1] } return args }, 'highlight': function (args) { if (args.length >= 3 && typeof args[3] === 'object' && '$$smap' in args[3]) { var opts = args[3] opts = fromHash(opts) for (var key in opts) { var value = opts[key] if (key === 'callouts') { var callouts = fromHashKeys(value) for (var idx in callouts) { var callout = callouts[idx] for (var i = 0; i < callout.length; i++) { var items = callout[i] for (var j = 0; j < items.length; j++) { items[j] = items[j] === Opal.nil ? undefined : items[j] } } } opts[key] = callouts } else { opts[key] = value === Opal.nil ? undefined : value } } args[3] = opts } if (args.length >= 2) { args[2] = args[2] === Opal.nil ? undefined : args[2] } return args } }) for (var functionName in functions) { if (functions.hasOwnProperty(functionName)) { (function (functionName) { var userFunction = functions[functionName] if (functionName === 'handlesHighlighting') { Opal.def(scope, '$highlight?', function () { return userFunction.call() }) } else if (functionName === 'hasDocinfo') { Opal.def(scope, '$docinfo?', function (location) { return userFunction.apply(this, [location]) }) } }(functionName)) } } Opal.def(scope, '$name', function () { return name }) SyntaxHighlighter['$register'](scope, names) return scope } /** * Retrieves the syntax highlighter class or object registered for the specified name. * * @description This API is experimental and subject to change. * * @memberof SyntaxHighlighter * @param {string} name - The {string} name of the syntax highlighter to retrieve. * @returns the {SyntaxHighlighter} Class or Object instance registered for this name. */ SyntaxHighlighter.for = function (name) { var result = SyntaxHighlighter.$for(name) return result === Opal.nil ? undefined : result } /** * @namespace */ var SyntaxHighlighterBase = Opal.const_get_qualified(SyntaxHighlighter, 'Base', true) // Alias Opal.Asciidoctor.SyntaxHighlighterBase = SyntaxHighlighterBase /** * Statically register the current class in the registry for the specified names. * * @description This API is experimental and subject to change. * * @memberof SyntaxHighlighterBase * @param {string|Array} names - A {string} name or an {Array} of {string} names */ SyntaxHighlighterBase.prototype.registerFor = function (names) { SyntaxHighlighter['$register'](this, names) } /* global Opal, fromHash, toHash, initializeClass */ // Extensions API /** * @private */ var toBlock = function (block) { // arity is a mandatory field block.$$arity = block.length return block } var registerExtension = function (registry, type, processor, name) { if (typeof processor === 'object' || processor.$$is_class) { // processor is an instance or a class return registry['$' + type](processor, name) } else { // processor is a function/lambda return Opal.send(registry, type, name && [name], toBlock(processor)) } } /** * @namespace * @description * Extensions provide a way to participate in the parsing and converting * phases of the AsciiDoc processor or extend the AsciiDoc syntax. * * The various extensions participate in AsciiDoc processing as follows: * * 1. After the source lines are normalized, {{@link Extensions/Preprocessor}}s modify or replace * the source lines before parsing begins. {{@link Extensions/IncludeProcessor}}s are used to * process include directives for targets which they claim to handle. * 2. The Parser parses the block-level content into an abstract syntax tree. * Custom blocks and block macros are processed by associated {{@link Extensions/BlockProcessor}}s * and {{@link Extensions/BlockMacroProcessor}}s, respectively. * 3. {{@link Extensions/TreeProcessor}}s are run on the abstract syntax tree. * 4. Conversion of the document begins, at which point inline markup is processed * and converted. Custom inline macros are processed by associated {InlineMacroProcessor}s. * 5. {{@link Extensions/Postprocessor}}s modify or replace the converted document. * 6. The output is written to the output stream. * * Extensions may be registered globally using the {Extensions.register} method * or added to a custom {Registry} instance and passed as an option to a single * Asciidoctor processor. * * @example * Opal.Asciidoctor.Extensions.register(function () { * this.block(function () { * var self = this; * self.named('shout'); * self.onContext('paragraph'); * self.process(function (parent, reader) { * var lines = reader.getLines().map(function (l) { return l.toUpperCase(); }); * return self.createBlock(parent, 'paragraph', lines); * }); * }); * }); */ var Extensions = Opal.const_get_qualified(Opal.Asciidoctor, 'Extensions') // Alias Opal.Asciidoctor.Extensions = Extensions /** * Create a new {@link Extensions/Registry}. * @param {string} name * @param {function} block * @memberof Extensions * @returns {Extensions/Registry} - returns a {@link Extensions/Registry} */ Extensions.create = function (name, block) { if (typeof name === 'function' && typeof block === 'undefined') { return Opal.send(this, 'create', null, toBlock(name)) } else if (typeof block === 'function') { return Opal.send(this, 'create', [name], toBlock(block)) } else { return this.$create() } } /** * @memberof Extensions */ Extensions.register = function (name, block) { if (typeof name === 'function' && typeof block === 'undefined') { return Opal.send(this, 'register', null, toBlock(name)) } else { return Opal.send(this, 'register', [name], toBlock(block)) } } /** * Get statically-registerd extension groups. * @memberof Extensions */ Extensions.getGroups = function () { return fromHash(this.$groups()) } /** * Unregister all statically-registered extension groups. * @memberof Extensions */ Extensions.unregisterAll = function () { this.$unregister_all() } /** * Unregister the specified statically-registered extension groups. * * NOTE Opal cannot delete an entry from a Hash that is indexed by symbol, so * we have to resort to using low-level operations in this method. * * @memberof Extensions */ Extensions.unregister = function () { var names = Array.prototype.concat.apply([], arguments) var groups = this.$groups() var groupNameIdx = {} for (var i = 0, groupSymbolNames = groups.$$keys; i < groupSymbolNames.length; i++) { var groupSymbolName = groupSymbolNames[i] groupNameIdx[groupSymbolName.toString()] = groupSymbolName } for (var j = 0; j < names.length; j++) { var groupStringName = names[j] if (groupStringName in groupNameIdx) Opal.hash_delete(groups, groupNameIdx[groupStringName]) } } /** * @namespace * @module Extensions/Registry */ var Registry = Extensions.Registry /** * @memberof Extensions/Registry */ Registry.prototype.getGroups = Extensions.getGroups /** * @memberof Extensions/Registry */ Registry.prototype.unregisterAll = function () { this.groups = Opal.hash() } /** * @memberof Extensions/Registry */ Registry.prototype.unregister = Extensions.unregister /** * @memberof Extensions/Registry */ Registry.prototype.prefer = function (name, processor) { if (arguments.length === 1) { processor = name name = null } if (typeof processor === 'object' || processor.$$is_class) { // processor is an instance or a class return this['$prefer'](name, processor) } else { // processor is a function/lambda return Opal.send(this, 'prefer', name && [name], toBlock(processor)) } } /** * @memberof Extensions/Registry */ Registry.prototype.block = function (name, processor) { if (arguments.length === 1) { processor = name name = null } return registerExtension(this, 'block', processor, name) } /** * @memberof Extensions/Registry */ Registry.prototype.inlineMacro = function (name, processor) { if (arguments.length === 1) { processor = name name = null } return registerExtension(this, 'inline_macro', processor, name) } /** * @memberof Extensions/Registry */ Registry.prototype.includeProcessor = function (name, processor) { if (arguments.length === 1) { processor = name name = null } return registerExtension(this, 'include_processor', processor, name) } /** * @memberof Extensions/Registry */ Registry.prototype.blockMacro = function (name, processor) { if (arguments.length === 1) { processor = name name = null } return registerExtension(this, 'block_macro', processor, name) } /** * @memberof Extensions/Registry */ Registry.prototype.treeProcessor = function (name, processor) { if (arguments.length === 1) { processor = name name = null } return registerExtension(this, 'tree_processor', processor, name) } /** * @memberof Extensions/Registry */ Registry.prototype.postprocessor = function (name, processor) { if (arguments.length === 1) { processor = name name = null } return registerExtension(this, 'postprocessor', processor, name) } /** * @memberof Extensions/Registry */ Registry.prototype.preprocessor = function (name, processor) { if (arguments.length === 1) { processor = name name = null } return registerExtension(this, 'preprocessor', processor, name) } /** * @memberof Extensions/Registry */ Registry.prototype.docinfoProcessor = function (name, processor) { if (arguments.length === 1) { processor = name name = null } return registerExtension(this, 'docinfo_processor', processor, name) } /** * Checks whether any {{@link Extensions/Preprocessor}} extensions have been registered. * * @memberof Extensions/Registry * @returns a {boolean} indicating whether any {{@link Extensions/Preprocessor}} extensions are registered. */ Registry.prototype.hasPreprocessors = function () { return this['$preprocessors?']() } /** * Checks whether any {{@link Extensions/TreeProcessor}} extensions have been registered. * * @memberof Extensions/Registry * @returns a {boolean} indicating whether any {{@link Extensions/TreeProcessor}} extensions are registered. */ Registry.prototype.hasTreeProcessors = function () { return this['$tree_processors?']() } /** * Checks whether any {{@link Extensions/IncludeProcessor}} extensions have been registered. * * @memberof Extensions/Registry * @returns a {boolean} indicating whether any {{@link Extensions/IncludeProcessor}} extensions are registered. */ Registry.prototype.hasIncludeProcessors = function () { return this['$include_processors?']() } /** * Checks whether any {{@link Extensions/Postprocessor}} extensions have been registered. * * @memberof Extensions/Registry * @returns a {boolean} indicating whether any {{@link Extensions/Postprocessor}} extensions are registered. */ Registry.prototype.hasPostprocessors = function () { return this['$postprocessors?']() } /** * Checks whether any {{@link Extensions/DocinfoProcessor}} extensions have been registered. * * @memberof Extensions/Registry * @param location - A {string} for selecting docinfo extensions at a given location (head or footer) (default: undefined) * @returns a {boolean} indicating whether any {{@link Extensions/DocinfoProcessor}} extensions are registered. */ Registry.prototype.hasDocinfoProcessors = function (location) { return this['$docinfo_processors?'](location) } /** * Checks whether any {{@link Extensions/BlockProcessor}} extensions have been registered. * * @memberof Extensions/Registry * @returns a {boolean} indicating whether any {{@link Extensions/BlockProcessor}} extensions are registered. */ Registry.prototype.hasBlocks = function () { return this['$blocks?']() } /** * Checks whether any {{@link Extensions/BlockMacroProcessor}} extensions have been registered. * * @memberof Extensions/Registry * @returns a {boolean} indicating whether any {{@link Extensions/BlockMacroProcessor}} extensions are registered. */ Registry.prototype.hasBlockMacros = function () { return this['$block_macros?']() } /** * Checks whether any {{@link Extensions/InlineMacroProcessor}} extensions have been registered. * * @memberof Extensions/Registry * @returns a {boolean} indicating whether any {{@link Extensions/InlineMacroProcessor}} extensions are registered. */ Registry.prototype.hasInlineMacros = function () { return this['$inline_macros?']() } /** * Retrieves the Extension proxy objects for all the {{@link Extensions/Preprocessor}} instances stored in this registry. * * @memberof Extensions/Registry * @returns an {array} of Extension proxy objects. */ Registry.prototype.getPreprocessors = function () { return this['$preprocessors']() } /** * Retrieves the Extension proxy objects for all the {{@link Extensions/TreeProcessor}} instances stored in this registry. * * @memberof Extensions/Registry * @returns an {array} of Extension proxy objects. */ Registry.prototype.getTreeProcessors = function () { return this['$tree_processors']() } /** * Retrieves the Extension proxy objects for all the {{@link Extensions/IncludeProcessor}} instances stored in this registry. * * @memberof Extensions/Registry * @returns an {array} of Extension proxy objects. */ Registry.prototype.getIncludeProcessors = function () { return this['$include_processors']() } /** * Retrieves the Extension proxy objects for all the {{@link Extensions/Postprocessor}} instances stored in this registry. * * @memberof Extensions/Registry * @returns an {array} of Extension proxy objects. */ Registry.prototype.getPostprocessors = function () { return this['$postprocessors']() } /** * Retrieves the Extension proxy objects for all the {{@link Extensions/DocinfoProcessor}} instances stored in this registry. * * @memberof Extensions/Registry * @param location - A {string} for selecting docinfo extensions at a given location (head or footer) (default: undefined) * @returns an {array} of Extension proxy objects. */ Registry.prototype.getDocinfoProcessors = function (location) { return this['$docinfo_processors'](location) } /** * Retrieves the Extension proxy objects for all the {{@link Extensions/BlockProcessor}} instances stored in this registry. * * @memberof Extensions/Registry * @returns an {array} of Extension proxy objects. */ Registry.prototype.getBlocks = function () { return this.block_extensions['$values']() } /** * Retrieves the Extension proxy objects for all the {{@link Extensions/BlockMacroProcessor}} instances stored in this registry. * * @memberof Extensions/Registry * @returns an {array} of Extension proxy objects. */ Registry.prototype.getBlockMacros = function () { return this.block_macro_extensions['$values']() } /** * Retrieves the Extension proxy objects for all the {{@link Extensions/InlineMacroProcessor}} instances stored in this registry. * * @memberof Extensions/Registry * @returns an {array} of Extension proxy objects. */ Registry.prototype.getInlineMacros = function () { return this['$inline_macros']() } /** * Get any {{@link Extensions/InlineMacroProcessor}} extensions are registered to handle the specified inline macro name. * * @param name - the {string} inline macro name * @memberof Extensions/Registry * @returns the Extension proxy object for the {{@link Extensions/InlineMacroProcessor}} that matches the inline macro name or undefined if no match is found. */ Registry.prototype.getInlineMacroFor = function (name) { var result = this['$registered_for_inline_macro?'](name) return result === false ? undefined : result } /** * Get any {{@link Extensions/BlockProcessor}} extensions are registered to handle the specified block name appearing on the specified context. * @param name - the {string} block name * @param context - the context of the block: paragraph, open... (optional) * @memberof Extensions/Registry * @returns the Extension proxy object for the {{@link Extensions/BlockProcessor}} that matches the block name and context or undefined if no match is found. */ Registry.prototype.getBlockFor = function (name, context) { if (typeof context === 'undefined') { var ext = this['$find_block_extension'](name) return ext === Opal.nil ? undefined : ext } var result = this['$registered_for_block?'](name, context) return result === false ? undefined : result } /** * Get any {{@link Extensions/BlockMacroProcessor}} extensions are registered to handle the specified macro name. * * @param name - the {string} macro name * @memberof Extensions/Registry * @returns the Extension proxy object for the {{@link Extensions/BlockMacroProcessor}} that matches the macro name or undefined if no match is found. */ Registry.prototype.getBlockMacroFor = function (name) { var result = this['$registered_for_block_macro?'](name) return result === false ? undefined : result } /** * @namespace * @module Extensions/Processor */ var Processor = Extensions.Processor /** * The extension will be added to the beginning of the list for that extension type. (default is append). * @memberof Extensions/Processor * @deprecated Please use the prefer function on the {@link Extensions/Registry}, * the {@link Extensions/IncludeProcessor}, * the {@link Extensions/TreeProcessor}, * the {@link Extensions/Postprocessor}, * the {@link Extensions/Preprocessor} * or the {@link Extensions/DocinfoProcessor} */ Processor.prototype.prepend = function () { this.$option('position', '>>') } /** * @memberof Extensions/Processor */ Processor.prototype.process = function (block) { var handler = { apply: function (target, thisArg, argumentsList) { for (var i = 0; i < argumentsList.length; i++) { // convert all (Opal) Hash arguments to JSON. if (typeof argumentsList[i] === 'object' && '$$smap' in argumentsList[i]) { argumentsList[i] = fromHash(argumentsList[i]) } } return target.apply(thisArg, argumentsList) } } var blockProxy = new Proxy(block, handler) return Opal.send(this, 'process', null, toBlock(blockProxy)) } /** * @memberof Extensions/Processor */ Processor.prototype.named = function (name) { return this.$named(name) } /** * @memberof Extensions/Processor */ Processor.prototype.createBlock = function (parent, context, source, attrs, opts) { return this.$create_block(parent, context, source, toHash(attrs), toHash(opts)) } /** * Creates a list block node and links it to the specified parent. * * @param parent - The parent Block (Block, Section, or Document) of this new list block. * @param {string} context - The list context (e.g., ulist, olist, colist, dlist) * @param {Object} attrs - An object of attributes to set on this list block * * @memberof Extensions/Processor */ Processor.prototype.createList = function (parent, context, attrs) { return this.$create_list(parent, context, toHash(attrs)) } /** * Creates a list item node and links it to the specified parent. * * @param parent - The parent List of this new list item block. * @param {string} text - The text of the list item. * * @memberof Extensions/Processor */ Processor.prototype.createListItem = function (parent, text) { return this.$create_list_item(parent, text) } /** * @memberof Extensions/Processor */ Processor.prototype.createImageBlock = function (parent, attrs, opts) { return this.$create_image_block(parent, toHash(attrs), toHash(opts)) } /** * @memberof Extensions/Processor */ Processor.prototype.createInline = function (parent, context, text, opts) { if (opts && opts.attributes) { opts.attributes = toHash(opts.attributes) } return this.$create_inline(parent, context, text, toHash(opts)) } /** * @memberof Extensions/Processor */ Processor.prototype.parseContent = function (parent, content, attrs) { return this.$parse_content(parent, content, attrs) } /** * @memberof Extensions/Processor */ Processor.prototype.positionalAttributes = function (value) { return this.$positional_attrs(value) } /** * @memberof Extensions/Processor */ Processor.prototype.resolvesAttributes = function (args) { return this.$resolves_attributes(args) } /** * @namespace * @module Extensions/BlockProcessor */ var BlockProcessor = Extensions.BlockProcessor /** * @memberof Extensions/BlockProcessor */ BlockProcessor.prototype.onContext = function (context) { return this.$on_context(context) } /** * @memberof Extensions/BlockProcessor */ BlockProcessor.prototype.onContexts = function () { return this.$on_contexts(Array.prototype.slice.call(arguments)) } /** * @memberof Extensions/BlockProcessor */ BlockProcessor.prototype.getName = function () { var name = this.name return name === Opal.nil ? undefined : name } /** * @memberof Extensions/BlockProcessor */ BlockProcessor.prototype.parseContentAs = function (value) { this.$parse_content_as(value) } /** * @namespace * @module Extensions/BlockMacroProcessor */ var BlockMacroProcessor = Extensions.BlockMacroProcessor /** * @memberof Extensions/BlockMacroProcessor */ BlockMacroProcessor.prototype.getName = function () { var name = this.name return name === Opal.nil ? undefined : name } /** * @memberof Extensions/BlockMacroProcessor */ BlockMacroProcessor.prototype.parseContentAs = function (value) { this.$parse_content_as(value) } /** * @namespace * @module Extensions/InlineMacroProcessor */ var InlineMacroProcessor = Extensions.InlineMacroProcessor /** * @memberof Extensions/InlineMacroProcessor */ InlineMacroProcessor.prototype.getName = function () { var name = this.name return name === Opal.nil ? undefined : name } /** * @memberof Extensions/InlineMacroProcessor */ InlineMacroProcessor.prototype.parseContentAs = function (value) { this.$parse_content_as(value) } /** * @memberof Extensions/InlineMacroProcessor */ InlineMacroProcessor.prototype.matchFormat = function (value) { this.$match_format(value) } /** * @namespace * @module Extensions/IncludeProcessor */ var IncludeProcessor = Extensions.IncludeProcessor /** * @memberof Extensions/IncludeProcessor */ IncludeProcessor.prototype.handles = function (block) { return Opal.send(this, 'handles?', null, toBlock(block)) } /** * @memberof Extensions/IncludeProcessor */ IncludeProcessor.prototype.prefer = function () { this.$prefer() } /** * @namespace * @module Extensions/TreeProcessor */ var TreeProcessor = Extensions.TreeProcessor /** * @memberof Extensions/TreeProcessor */ TreeProcessor.prototype.prefer = function () { this.$prefer() } /** * @namespace * @module Extensions/Postprocessor */ var Postprocessor = Extensions.Postprocessor /** * @memberof Extensions/Postprocessor */ Postprocessor.prototype.prefer = function () { this.$prefer() } /** * @namespace * @module Extensions/Preprocessor */ var Preprocessor = Extensions.Preprocessor /** * @memberof Extensions/Preprocessor */ Preprocessor.prototype.prefer = function () { this.$prefer() } /** * @namespace * @module Extensions/DocinfoProcessor */ var DocinfoProcessor = Extensions.DocinfoProcessor /** * @memberof Extensions/DocinfoProcessor */ DocinfoProcessor.prototype.prefer = function () { this.$prefer() } /** * @memberof Extensions/DocinfoProcessor */ DocinfoProcessor.prototype.atLocation = function (value) { this.$at_location(value) } function initializeProcessorClass (superclassName, className, functions) { var superClass = Opal.const_get_qualified(Extensions, superclassName) return initializeClass(superClass, className, functions, { 'handles?': function () { return true } }) } // Postprocessor /** * Create a postprocessor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.createPostprocessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return initializeProcessorClass('Postprocessor', name, functions) } /** * Create and instantiate a postprocessor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.newPostprocessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return this.createPostprocessor(name, functions).$new() } // Preprocessor /** * Create a preprocessor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.createPreprocessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return initializeProcessorClass('Preprocessor', name, functions) } /** * Create and instantiate a preprocessor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.newPreprocessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return this.createPreprocessor(name, functions).$new() } // Tree Processor /** * Create a tree processor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.createTreeProcessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return initializeProcessorClass('TreeProcessor', name, functions) } /** * Create and instantiate a tree processor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.newTreeProcessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return this.createTreeProcessor(name, functions).$new() } // Include Processor /** * Create an include processor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.createIncludeProcessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return initializeProcessorClass('IncludeProcessor', name, functions) } /** * Create and instantiate an include processor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.newIncludeProcessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return this.createIncludeProcessor(name, functions).$new() } // Docinfo Processor /** * Create a Docinfo processor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.createDocinfoProcessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return initializeProcessorClass('DocinfoProcessor', name, functions) } /** * Create and instantiate a Docinfo processor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.newDocinfoProcessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return this.createDocinfoProcessor(name, functions).$new() } // Block Processor /** * Create a block processor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.createBlockProcessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return initializeProcessorClass('BlockProcessor', name, functions) } /** * Create and instantiate a block processor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.newBlockProcessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return this.createBlockProcessor(name, functions).$new() } // Inline Macro Processor /** * Create an inline macro processor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.createInlineMacroProcessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return initializeProcessorClass('InlineMacroProcessor', name, functions) } /** * Create and instantiate an inline macro processor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.newInlineMacroProcessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return this.createInlineMacroProcessor(name, functions).$new() } // Block Macro Processor /** * Create a block macro processor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.createBlockMacroProcessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return initializeProcessorClass('BlockMacroProcessor', name, functions) } /** * Create and instantiate a block macro processor * @description this API is experimental and subject to change * @memberof Extensions */ Extensions.newBlockMacroProcessor = function (name, functions) { if (arguments.length === 1) { functions = name name = null } return this.createBlockMacroProcessor(name, functions).$new() } // Converter API /** * @namespace * @module Converter */ var Converter = Opal.const_get_qualified(Opal.Asciidoctor, 'Converter') // Alias Opal.Asciidoctor.Converter = Converter /** * Convert the specified node. * * @param {AbstractNode} node - the AbstractNode to convert * @param {string} transform - an optional String transform that hints at * which transformation should be applied to this node. * @param {Object} opts - a JSON of options that provide additional hints about * how to convert the node (default: {}) * @returns the {Object} result of the conversion, typically a {string}. * @memberof Converter */ Converter.prototype.convert = function (node, transform, opts) { return this.$convert(node, transform, toHash(opts)) } /** * Create an instance of the converter bound to the specified backend. * * @param {string} backend - look for a converter bound to this keyword. * @param {Object} opts - a JSON of options to pass to the converter (default: {}) * @returns {Converter} - a converter instance for converting nodes in an Asciidoctor AST. * @memberof Converter/Factory */ Converter.create = function (backend, opts) { return this.$create(backend, toHash(opts)) } // Converter Factory API /** * @namespace * @module Converter/Factory */ var ConverterFactory = Opal.Asciidoctor.Converter.Factory // Alias Opal.Asciidoctor.ConverterFactory = ConverterFactory /** * Register a custom converter in the global converter factory to handle conversion to the specified backends. * If the backend value is an asterisk, the converter is used to handle any backend that does not have an explicit converter. * * @param converter - The Converter instance to register * @param backends {Array} - A {string} {Array} of backend names that this converter should be registered to handle (optional, default: ['*']) * @return {*} - Returns nothing * @memberof Converter/Factory */ ConverterFactory.register = function (converter, backends) { if (typeof converter === 'object' && typeof converter.$convert === 'undefined' && typeof converter.convert === 'function') { Opal.def(converter, '$convert', converter.convert) } var args = [converter].concat(backends) return Converter.$register.apply(Converter, args) } /** * Retrieves the singleton instance of the converter factory. * * @param {boolean} initialize - instantiate the singleton if it has not yet * been instantiated. If this value is false and the singleton has not yet been * instantiated, this method returns a fresh instance. * @returns {Converter/Factory} an instance of the converter factory. * @memberof Converter/Factory */ ConverterFactory.getDefault = function (initialize) { return this.$default(initialize) } /** * Create an instance of the converter bound to the specified backend. * * @param {string} backend - look for a converter bound to this keyword. * @param {Object} opts - a JSON of options to pass to the converter (default: {}) * @returns {Converter} - a converter instance for converting nodes in an Asciidoctor AST. * @memberof Converter/Factory */ ConverterFactory.prototype.create = function (backend, opts) { return this.$create(backend, toHash(opts)) } // Built-in converter /** * @namespace * @module Converter/Html5Converter */ var Html5Converter = Opal.Asciidoctor.Converter.Html5Converter // Alias Opal.Asciidoctor.Html5Converter = Html5Converter Html5Converter.create = function () { return this.$new() } Html5Converter.prototype.convert = function (node, transform, opts) { return this.$convert(node, transform, opts) } var ASCIIDOCTOR_JS_VERSION = '2.0.3'; /** * Get Asciidoctor.js version number. * * @memberof Asciidoctor * @returns {string} - returns the version number of Asciidoctor.js. */ Opal.Asciidoctor.prototype.getVersion = function () { return ASCIIDOCTOR_JS_VERSION } return Opal.Asciidoctor })) /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27), __webpack_require__(3), __webpack_require__(3848).Buffer, __webpack_require__(64)(module))) /***/ }), /* 3848 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ /* eslint-disable no-proto */ var base64 = __webpack_require__(3849) var ieee754 = __webpack_require__(3850) var isArray = __webpack_require__(3851) exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer exports.INSPECT_MAX_BYTES = 50 /** * If `Buffer.TYPED_ARRAY_SUPPORT`: * === true Use Uint8Array implementation (fastest) * === false Use Object implementation (most compatible, even IE6) * * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, * Opera 11.6+, iOS 4.2+. * * Due to various browser bugs, sometimes the Object implementation will be used even * when the browser supports typed arrays. * * Note: * * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. * * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. * * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of * incorrect length in some situations. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they * get the Object implementation, which is slower but behaves correctly. */ Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport() /* * Export kMaxLength after typed array support is determined. */ exports.kMaxLength = kMaxLength() function typedArraySupport () { try { var arr = new Uint8Array(1) arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} return arr.foo() === 42 && // typed array instances can be augmented typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` } catch (e) { return false } } function kMaxLength () { return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff } function createBuffer (that, length) { if (kMaxLength() < length) { throw new RangeError('Invalid typed array length') } if (Buffer.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = new Uint8Array(length) that.__proto__ = Buffer.prototype } else { // Fallback: Return an object instance of the Buffer class if (that === null) { that = new Buffer(length) } that.length = length } return that } /** * The Buffer constructor returns instances of `Uint8Array` that have their * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of * `Uint8Array`, so the returned instances will have all the node `Buffer` methods * and the `Uint8Array` methods. Square bracket notation works as expected -- it * returns a single octet. * * The `Uint8Array` prototype remains unmodified. */ function Buffer (arg, encodingOrOffset, length) { if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { return new Buffer(arg, encodingOrOffset, length) } // Common case. if (typeof arg === 'number') { if (typeof encodingOrOffset === 'string') { throw new Error( 'If encoding is specified then the first argument must be a string' ) } return allocUnsafe(this, arg) } return from(this, arg, encodingOrOffset, length) } Buffer.poolSize = 8192 // not used by this implementation // TODO: Legacy, not needed anymore. Remove in next major version. Buffer._augment = function (arr) { arr.__proto__ = Buffer.prototype return arr } function from (that, value, encodingOrOffset, length) { if (typeof value === 'number') { throw new TypeError('"value" argument must not be a number') } if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { return fromArrayBuffer(that, value, encodingOrOffset, length) } if (typeof value === 'string') { return fromString(that, value, encodingOrOffset) } return fromObject(that, value) } /** * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError * if value is a number. * Buffer.from(str[, encoding]) * Buffer.from(array) * Buffer.from(buffer) * Buffer.from(arrayBuffer[, byteOffset[, length]]) **/ Buffer.from = function (value, encodingOrOffset, length) { return from(null, value, encodingOrOffset, length) } if (Buffer.TYPED_ARRAY_SUPPORT) { Buffer.prototype.__proto__ = Uint8Array.prototype Buffer.__proto__ = Uint8Array if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) { // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 Object.defineProperty(Buffer, Symbol.species, { value: null, configurable: true }) } } function assertSize (size) { if (typeof size !== 'number') { throw new TypeError('"size" argument must be a number') } else if (size < 0) { throw new RangeError('"size" argument must not be negative') } } function alloc (that, size, fill, encoding) { assertSize(size) if (size <= 0) { return createBuffer(that, size) } if (fill !== undefined) { // Only pay attention to encoding if it's a string. This // prevents accidentally sending in a number that would // be interpretted as a start offset. return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill) } return createBuffer(that, size) } /** * Creates a new filled Buffer instance. * alloc(size[, fill[, encoding]]) **/ Buffer.alloc = function (size, fill, encoding) { return alloc(null, size, fill, encoding) } function allocUnsafe (that, size) { assertSize(size) that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) if (!Buffer.TYPED_ARRAY_SUPPORT) { for (var i = 0; i < size; ++i) { that[i] = 0 } } return that } /** * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. * */ Buffer.allocUnsafe = function (size) { return allocUnsafe(null, size) } /** * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. */ Buffer.allocUnsafeSlow = function (size) { return allocUnsafe(null, size) } function fromString (that, string, encoding) { if (typeof encoding !== 'string' || encoding === '') { encoding = 'utf8' } if (!Buffer.isEncoding(encoding)) { throw new TypeError('"encoding" must be a valid string encoding') } var length = byteLength(string, encoding) | 0 that = createBuffer(that, length) var actual = that.write(string, encoding) if (actual !== length) { // Writing a hex string, for example, that contains invalid characters will // cause everything after the first invalid character to be ignored. (e.g. // 'abxxcd' will be treated as 'ab') that = that.slice(0, actual) } return that } function fromArrayLike (that, array) { var length = array.length < 0 ? 0 : checked(array.length) | 0 that = createBuffer(that, length) for (var i = 0; i < length; i += 1) { that[i] = array[i] & 255 } return that } function fromArrayBuffer (that, array, byteOffset, length) { array.byteLength // this throws if `array` is not a valid ArrayBuffer if (byteOffset < 0 || array.byteLength < byteOffset) { throw new RangeError('\'offset\' is out of bounds') } if (array.byteLength < byteOffset + (length || 0)) { throw new RangeError('\'length\' is out of bounds') } if (byteOffset === undefined && length === undefined) { array = new Uint8Array(array) } else if (length === undefined) { array = new Uint8Array(array, byteOffset) } else { array = new Uint8Array(array, byteOffset, length) } if (Buffer.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = array that.__proto__ = Buffer.prototype } else { // Fallback: Return an object instance of the Buffer class that = fromArrayLike(that, array) } return that } function fromObject (that, obj) { if (Buffer.isBuffer(obj)) { var len = checked(obj.length) | 0 that = createBuffer(that, len) if (that.length === 0) { return that } obj.copy(that, 0, 0, len) return that } if (obj) { if ((typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer) || 'length' in obj) { if (typeof obj.length !== 'number' || isnan(obj.length)) { return createBuffer(that, 0) } return fromArrayLike(that, obj) } if (obj.type === 'Buffer' && isArray(obj.data)) { return fromArrayLike(that, obj.data) } } throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') } function checked (length) { // Note: cannot use `length < kMaxLength()` here because that fails when // length is NaN (which is otherwise coerced to zero.) if (length >= kMaxLength()) { throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes') } return length | 0 } function SlowBuffer (length) { if (+length != length) { // eslint-disable-line eqeqeq length = 0 } return Buffer.alloc(+length) } Buffer.isBuffer = function isBuffer (b) { return !!(b != null && b._isBuffer) } Buffer.compare = function compare (a, b) { if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { throw new TypeError('Arguments must be Buffers') } if (a === b) return 0 var x = a.length var y = b.length for (var i = 0, len = Math.min(x, y); i < len; ++i) { if (a[i] !== b[i]) { x = a[i] y = b[i] break } } if (x < y) return -1 if (y < x) return 1 return 0 } Buffer.isEncoding = function isEncoding (encoding) { switch (String(encoding).toLowerCase()) { case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'latin1': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return true default: return false } } Buffer.concat = function concat (list, length) { if (!isArray(list)) { throw new TypeError('"list" argument must be an Array of Buffers') } if (list.length === 0) { return Buffer.alloc(0) } var i if (length === undefined) { length = 0 for (i = 0; i < list.length; ++i) { length += list[i].length } } var buffer = Buffer.allocUnsafe(length) var pos = 0 for (i = 0; i < list.length; ++i) { var buf = list[i] if (!Buffer.isBuffer(buf)) { throw new TypeError('"list" argument must be an Array of Buffers') } buf.copy(buffer, pos) pos += buf.length } return buffer } function byteLength (string, encoding) { if (Buffer.isBuffer(string)) { return string.length } if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { return string.byteLength } if (typeof string !== 'string') { string = '' + string } var len = string.length if (len === 0) return 0 // Use a for loop to avoid recursion var loweredCase = false for (;;) { switch (encoding) { case 'ascii': case 'latin1': case 'binary': return len case 'utf8': case 'utf-8': case undefined: return utf8ToBytes(string).length case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return len * 2 case 'hex': return len >>> 1 case 'base64': return base64ToBytes(string).length default: if (loweredCase) return utf8ToBytes(string).length // assume utf8 encoding = ('' + encoding).toLowerCase() loweredCase = true } } } Buffer.byteLength = byteLength function slowToString (encoding, start, end) { var loweredCase = false // No need to verify that "this.length <= MAX_UINT32" since it's a read-only // property of a typed array. // This behaves neither like String nor Uint8Array in that we set start/end // to their upper/lower bounds if the value passed is out of range. // undefined is handled specially as per ECMA-262 6th Edition, // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. if (start === undefined || start < 0) { start = 0 } // Return early if start > this.length. Done here to prevent potential uint32 // coercion fail below. if (start > this.length) { return '' } if (end === undefined || end > this.length) { end = this.length } if (end <= 0) { return '' } // Force coersion to uint32. This will also coerce falsey/NaN values to 0. end >>>= 0 start >>>= 0 if (end <= start) { return '' } if (!encoding) encoding = 'utf8' while (true) { switch (encoding) { case 'hex': return hexSlice(this, start, end) case 'utf8': case 'utf-8': return utf8Slice(this, start, end) case 'ascii': return asciiSlice(this, start, end) case 'latin1': case 'binary': return latin1Slice(this, start, end) case 'base64': return base64Slice(this, start, end) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return utf16leSlice(this, start, end) default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) encoding = (encoding + '').toLowerCase() loweredCase = true } } } // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect // Buffer instances. Buffer.prototype._isBuffer = true function swap (b, n, m) { var i = b[n] b[n] = b[m] b[m] = i } Buffer.prototype.swap16 = function swap16 () { var len = this.length if (len % 2 !== 0) { throw new RangeError('Buffer size must be a multiple of 16-bits') } for (var i = 0; i < len; i += 2) { swap(this, i, i + 1) } return this } Buffer.prototype.swap32 = function swap32 () { var len = this.length if (len % 4 !== 0) { throw new RangeError('Buffer size must be a multiple of 32-bits') } for (var i = 0; i < len; i += 4) { swap(this, i, i + 3) swap(this, i + 1, i + 2) } return this } Buffer.prototype.swap64 = function swap64 () { var len = this.length if (len % 8 !== 0) { throw new RangeError('Buffer size must be a multiple of 64-bits') } for (var i = 0; i < len; i += 8) { swap(this, i, i + 7) swap(this, i + 1, i + 6) swap(this, i + 2, i + 5) swap(this, i + 3, i + 4) } return this } Buffer.prototype.toString = function toString () { var length = this.length | 0 if (length === 0) return '' if (arguments.length === 0) return utf8Slice(this, 0, length) return slowToString.apply(this, arguments) } Buffer.prototype.equals = function equals (b) { if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') if (this === b) return true return Buffer.compare(this, b) === 0 } Buffer.prototype.inspect = function inspect () { var str = '' var max = exports.INSPECT_MAX_BYTES if (this.length > 0) { str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') if (this.length > max) str += ' ... ' } return '' } Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { if (!Buffer.isBuffer(target)) { throw new TypeError('Argument must be a Buffer') } if (start === undefined) { start = 0 } if (end === undefined) { end = target ? target.length : 0 } if (thisStart === undefined) { thisStart = 0 } if (thisEnd === undefined) { thisEnd = this.length } if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { throw new RangeError('out of range index') } if (thisStart >= thisEnd && start >= end) { return 0 } if (thisStart >= thisEnd) { return -1 } if (start >= end) { return 1 } start >>>= 0 end >>>= 0 thisStart >>>= 0 thisEnd >>>= 0 if (this === target) return 0 var x = thisEnd - thisStart var y = end - start var len = Math.min(x, y) var thisCopy = this.slice(thisStart, thisEnd) var targetCopy = target.slice(start, end) for (var i = 0; i < len; ++i) { if (thisCopy[i] !== targetCopy[i]) { x = thisCopy[i] y = targetCopy[i] break } } if (x < y) return -1 if (y < x) return 1 return 0 } // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, // OR the last index of `val` in `buffer` at offset <= `byteOffset`. // // Arguments: // - buffer - a Buffer to search // - val - a string, Buffer, or number // - byteOffset - an index into `buffer`; will be clamped to an int32 // - encoding - an optional encoding, relevant is val is a string // - dir - true for indexOf, false for lastIndexOf function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { // Empty buffer means no match if (buffer.length === 0) return -1 // Normalize byteOffset if (typeof byteOffset === 'string') { encoding = byteOffset byteOffset = 0 } else if (byteOffset > 0x7fffffff) { byteOffset = 0x7fffffff } else if (byteOffset < -0x80000000) { byteOffset = -0x80000000 } byteOffset = +byteOffset // Coerce to Number. if (isNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : (buffer.length - 1) } // Normalize byteOffset: negative offsets start from the end of the buffer if (byteOffset < 0) byteOffset = buffer.length + byteOffset if (byteOffset >= buffer.length) { if (dir) return -1 else byteOffset = buffer.length - 1 } else if (byteOffset < 0) { if (dir) byteOffset = 0 else return -1 } // Normalize val if (typeof val === 'string') { val = Buffer.from(val, encoding) } // Finally, search either indexOf (if dir is true) or lastIndexOf if (Buffer.isBuffer(val)) { // Special case: looking for empty string/buffer always fails if (val.length === 0) { return -1 } return arrayIndexOf(buffer, val, byteOffset, encoding, dir) } else if (typeof val === 'number') { val = val & 0xFF // Search for a byte value [0-255] if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') { if (dir) { return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) } else { return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) } } return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) } throw new TypeError('val must be string, number or Buffer') } function arrayIndexOf (arr, val, byteOffset, encoding, dir) { var indexSize = 1 var arrLength = arr.length var valLength = val.length if (encoding !== undefined) { encoding = String(encoding).toLowerCase() if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { if (arr.length < 2 || val.length < 2) { return -1 } indexSize = 2 arrLength /= 2 valLength /= 2 byteOffset /= 2 } } function read (buf, i) { if (indexSize === 1) { return buf[i] } else { return buf.readUInt16BE(i * indexSize) } } var i if (dir) { var foundIndex = -1 for (i = byteOffset; i < arrLength; i++) { if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { if (foundIndex === -1) foundIndex = i if (i - foundIndex + 1 === valLength) return foundIndex * indexSize } else { if (foundIndex !== -1) i -= i - foundIndex foundIndex = -1 } } } else { if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength for (i = byteOffset; i >= 0; i--) { var found = true for (var j = 0; j < valLength; j++) { if (read(arr, i + j) !== read(val, j)) { found = false break } } if (found) return i } } return -1 } Buffer.prototype.includes = function includes (val, byteOffset, encoding) { return this.indexOf(val, byteOffset, encoding) !== -1 } Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, true) } Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, false) } function hexWrite (buf, string, offset, length) { offset = Number(offset) || 0 var remaining = buf.length - offset if (!length) { length = remaining } else { length = Number(length) if (length > remaining) { length = remaining } } // must be an even number of digits var strLen = string.length if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') if (length > strLen / 2) { length = strLen / 2 } for (var i = 0; i < length; ++i) { var parsed = parseInt(string.substr(i * 2, 2), 16) if (isNaN(parsed)) return i buf[offset + i] = parsed } return i } function utf8Write (buf, string, offset, length) { return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) } function asciiWrite (buf, string, offset, length) { return blitBuffer(asciiToBytes(string), buf, offset, length) } function latin1Write (buf, string, offset, length) { return asciiWrite(buf, string, offset, length) } function base64Write (buf, string, offset, length) { return blitBuffer(base64ToBytes(string), buf, offset, length) } function ucs2Write (buf, string, offset, length) { return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) } Buffer.prototype.write = function write (string, offset, length, encoding) { // Buffer#write(string) if (offset === undefined) { encoding = 'utf8' length = this.length offset = 0 // Buffer#write(string, encoding) } else if (length === undefined && typeof offset === 'string') { encoding = offset length = this.length offset = 0 // Buffer#write(string, offset[, length][, encoding]) } else if (isFinite(offset)) { offset = offset | 0 if (isFinite(length)) { length = length | 0 if (encoding === undefined) encoding = 'utf8' } else { encoding = length length = undefined } // legacy write(string, encoding, offset, length) - remove in v0.13 } else { throw new Error( 'Buffer.write(string, encoding, offset[, length]) is no longer supported' ) } var remaining = this.length - offset if (length === undefined || length > remaining) length = remaining if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { throw new RangeError('Attempt to write outside buffer bounds') } if (!encoding) encoding = 'utf8' var loweredCase = false for (;;) { switch (encoding) { case 'hex': return hexWrite(this, string, offset, length) case 'utf8': case 'utf-8': return utf8Write(this, string, offset, length) case 'ascii': return asciiWrite(this, string, offset, length) case 'latin1': case 'binary': return latin1Write(this, string, offset, length) case 'base64': // Warning: maxLength not taken into account in base64Write return base64Write(this, string, offset, length) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return ucs2Write(this, string, offset, length) default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) encoding = ('' + encoding).toLowerCase() loweredCase = true } } } Buffer.prototype.toJSON = function toJSON () { return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) } } function base64Slice (buf, start, end) { if (start === 0 && end === buf.length) { return base64.fromByteArray(buf) } else { return base64.fromByteArray(buf.slice(start, end)) } } function utf8Slice (buf, start, end) { end = Math.min(buf.length, end) var res = [] var i = start while (i < end) { var firstByte = buf[i] var codePoint = null var bytesPerSequence = (firstByte > 0xEF) ? 4 : (firstByte > 0xDF) ? 3 : (firstByte > 0xBF) ? 2 : 1 if (i + bytesPerSequence <= end) { var secondByte, thirdByte, fourthByte, tempCodePoint switch (bytesPerSequence) { case 1: if (firstByte < 0x80) { codePoint = firstByte } break case 2: secondByte = buf[i + 1] if ((secondByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) if (tempCodePoint > 0x7F) { codePoint = tempCodePoint } } break case 3: secondByte = buf[i + 1] thirdByte = buf[i + 2] if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { codePoint = tempCodePoint } } break case 4: secondByte = buf[i + 1] thirdByte = buf[i + 2] fourthByte = buf[i + 3] if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { codePoint = tempCodePoint } } } } if (codePoint === null) { // we did not generate a valid codePoint so insert a // replacement char (U+FFFD) and advance only 1 byte codePoint = 0xFFFD bytesPerSequence = 1 } else if (codePoint > 0xFFFF) { // encode to utf16 (surrogate pair dance) codePoint -= 0x10000 res.push(codePoint >>> 10 & 0x3FF | 0xD800) codePoint = 0xDC00 | codePoint & 0x3FF } res.push(codePoint) i += bytesPerSequence } return decodeCodePointsArray(res) } // Based on http://stackoverflow.com/a/22747272/680742, the browser with // the lowest limit is Chrome, with 0x10000 args. // We go 1 magnitude less, for safety var MAX_ARGUMENTS_LENGTH = 0x1000 function decodeCodePointsArray (codePoints) { var len = codePoints.length if (len <= MAX_ARGUMENTS_LENGTH) { return String.fromCharCode.apply(String, codePoints) // avoid extra slice() } // Decode in chunks to avoid "call stack size exceeded". var res = '' var i = 0 while (i < len) { res += String.fromCharCode.apply( String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) ) } return res } function asciiSlice (buf, start, end) { var ret = '' end = Math.min(buf.length, end) for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i] & 0x7F) } return ret } function latin1Slice (buf, start, end) { var ret = '' end = Math.min(buf.length, end) for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i]) } return ret } function hexSlice (buf, start, end) { var len = buf.length if (!start || start < 0) start = 0 if (!end || end < 0 || end > len) end = len var out = '' for (var i = start; i < end; ++i) { out += toHex(buf[i]) } return out } function utf16leSlice (buf, start, end) { var bytes = buf.slice(start, end) var res = '' for (var i = 0; i < bytes.length; i += 2) { res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) } return res } Buffer.prototype.slice = function slice (start, end) { var len = this.length start = ~~start end = end === undefined ? len : ~~end if (start < 0) { start += len if (start < 0) start = 0 } else if (start > len) { start = len } if (end < 0) { end += len if (end < 0) end = 0 } else if (end > len) { end = len } if (end < start) end = start var newBuf if (Buffer.TYPED_ARRAY_SUPPORT) { newBuf = this.subarray(start, end) newBuf.__proto__ = Buffer.prototype } else { var sliceLen = end - start newBuf = new Buffer(sliceLen, undefined) for (var i = 0; i < sliceLen; ++i) { newBuf[i] = this[i + start] } } return newBuf } /* * Need to make sure that buffer isn't trying to write out of bounds. */ function checkOffset (offset, ext, length) { if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') } Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) checkOffset(offset, byteLength, this.length) var val = this[offset] var mul = 1 var i = 0 while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul } return val } Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) { checkOffset(offset, byteLength, this.length) } var val = this[offset + --byteLength] var mul = 1 while (byteLength > 0 && (mul *= 0x100)) { val += this[offset + --byteLength] * mul } return val } Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { if (!noAssert) checkOffset(offset, 1, this.length) return this[offset] } Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) return this[offset] | (this[offset + 1] << 8) } Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) return (this[offset] << 8) | this[offset + 1] } Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return ((this[offset]) | (this[offset + 1] << 8) | (this[offset + 2] << 16)) + (this[offset + 3] * 0x1000000) } Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset] * 0x1000000) + ((this[offset + 1] << 16) | (this[offset + 2] << 8) | this[offset + 3]) } Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) checkOffset(offset, byteLength, this.length) var val = this[offset] var mul = 1 var i = 0 while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul } mul *= 0x80 if (val >= mul) val -= Math.pow(2, 8 * byteLength) return val } Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) checkOffset(offset, byteLength, this.length) var i = byteLength var mul = 1 var val = this[offset + --i] while (i > 0 && (mul *= 0x100)) { val += this[offset + --i] * mul } mul *= 0x80 if (val >= mul) val -= Math.pow(2, 8 * byteLength) return val } Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { if (!noAssert) checkOffset(offset, 1, this.length) if (!(this[offset] & 0x80)) return (this[offset]) return ((0xff - this[offset] + 1) * -1) } Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) var val = this[offset] | (this[offset + 1] << 8) return (val & 0x8000) ? val | 0xFFFF0000 : val } Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) var val = this[offset + 1] | (this[offset] << 8) return (val & 0x8000) ? val | 0xFFFF0000 : val } Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset]) | (this[offset + 1] << 8) | (this[offset + 2] << 16) | (this[offset + 3] << 24) } Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset] << 24) | (this[offset + 1] << 16) | (this[offset + 2] << 8) | (this[offset + 3]) } Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return ieee754.read(this, offset, true, 23, 4) } Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return ieee754.read(this, offset, false, 23, 4) } Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { if (!noAssert) checkOffset(offset, 8, this.length) return ieee754.read(this, offset, true, 52, 8) } Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { if (!noAssert) checkOffset(offset, 8, this.length) return ieee754.read(this, offset, false, 52, 8) } function checkInt (buf, value, offset, ext, max, min) { if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') if (offset + ext > buf.length) throw new RangeError('Index out of range') } Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1 checkInt(this, value, offset, byteLength, maxBytes, 0) } var mul = 1 var i = 0 this[offset] = value & 0xFF while (++i < byteLength && (mul *= 0x100)) { this[offset + i] = (value / mul) & 0xFF } return offset + byteLength } Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1 checkInt(this, value, offset, byteLength, maxBytes, 0) } var i = byteLength - 1 var mul = 1 this[offset + i] = value & 0xFF while (--i >= 0 && (mul *= 0x100)) { this[offset + i] = (value / mul) & 0xFF } return offset + byteLength } Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) this[offset] = (value & 0xff) return offset + 1 } function objectWriteUInt16 (buf, value, offset, littleEndian) { if (value < 0) value = 0xffff + value + 1 for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> (littleEndian ? i : 1 - i) * 8 } } Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff) this[offset + 1] = (value >>> 8) } else { objectWriteUInt16(this, value, offset, true) } return offset + 2 } Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8) this[offset + 1] = (value & 0xff) } else { objectWriteUInt16(this, value, offset, false) } return offset + 2 } function objectWriteUInt32 (buf, value, offset, littleEndian) { if (value < 0) value = 0xffffffff + value + 1 for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff } } Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset + 3] = (value >>> 24) this[offset + 2] = (value >>> 16) this[offset + 1] = (value >>> 8) this[offset] = (value & 0xff) } else { objectWriteUInt32(this, value, offset, true) } return offset + 4 } Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24) this[offset + 1] = (value >>> 16) this[offset + 2] = (value >>> 8) this[offset + 3] = (value & 0xff) } else { objectWriteUInt32(this, value, offset, false) } return offset + 4 } Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1) checkInt(this, value, offset, byteLength, limit - 1, -limit) } var i = 0 var mul = 1 var sub = 0 this[offset] = value & 0xFF while (++i < byteLength && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { sub = 1 } this[offset + i] = ((value / mul) >> 0) - sub & 0xFF } return offset + byteLength } Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1) checkInt(this, value, offset, byteLength, limit - 1, -limit) } var i = byteLength - 1 var mul = 1 var sub = 0 this[offset + i] = value & 0xFF while (--i >= 0 && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { sub = 1 } this[offset + i] = ((value / mul) >> 0) - sub & 0xFF } return offset + byteLength } Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) if (value < 0) value = 0xff + value + 1 this[offset] = (value & 0xff) return offset + 1 } Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff) this[offset + 1] = (value >>> 8) } else { objectWriteUInt16(this, value, offset, true) } return offset + 2 } Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8) this[offset + 1] = (value & 0xff) } else { objectWriteUInt16(this, value, offset, false) } return offset + 2 } Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff) this[offset + 1] = (value >>> 8) this[offset + 2] = (value >>> 16) this[offset + 3] = (value >>> 24) } else { objectWriteUInt32(this, value, offset, true) } return offset + 4 } Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) if (value < 0) value = 0xffffffff + value + 1 if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24) this[offset + 1] = (value >>> 16) this[offset + 2] = (value >>> 8) this[offset + 3] = (value & 0xff) } else { objectWriteUInt32(this, value, offset, false) } return offset + 4 } function checkIEEE754 (buf, value, offset, ext, max, min) { if (offset + ext > buf.length) throw new RangeError('Index out of range') if (offset < 0) throw new RangeError('Index out of range') } function writeFloat (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) } ieee754.write(buf, value, offset, littleEndian, 23, 4) return offset + 4 } Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { return writeFloat(this, value, offset, true, noAssert) } Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { return writeFloat(this, value, offset, false, noAssert) } function writeDouble (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) } ieee754.write(buf, value, offset, littleEndian, 52, 8) return offset + 8 } Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { return writeDouble(this, value, offset, true, noAssert) } Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { return writeDouble(this, value, offset, false, noAssert) } // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) Buffer.prototype.copy = function copy (target, targetStart, start, end) { if (!start) start = 0 if (!end && end !== 0) end = this.length if (targetStart >= target.length) targetStart = target.length if (!targetStart) targetStart = 0 if (end > 0 && end < start) end = start // Copy 0 bytes; we're done if (end === start) return 0 if (target.length === 0 || this.length === 0) return 0 // Fatal error conditions if (targetStart < 0) { throw new RangeError('targetStart out of bounds') } if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') if (end < 0) throw new RangeError('sourceEnd out of bounds') // Are we oob? if (end > this.length) end = this.length if (target.length - targetStart < end - start) { end = target.length - targetStart + start } var len = end - start var i if (this === target && start < targetStart && targetStart < end) { // descending copy from end for (i = len - 1; i >= 0; --i) { target[i + targetStart] = this[i + start] } } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { // ascending copy from start for (i = 0; i < len; ++i) { target[i + targetStart] = this[i + start] } } else { Uint8Array.prototype.set.call( target, this.subarray(start, start + len), targetStart ) } return len } // Usage: // buffer.fill(number[, offset[, end]]) // buffer.fill(buffer[, offset[, end]]) // buffer.fill(string[, offset[, end]][, encoding]) Buffer.prototype.fill = function fill (val, start, end, encoding) { // Handle string cases: if (typeof val === 'string') { if (typeof start === 'string') { encoding = start start = 0 end = this.length } else if (typeof end === 'string') { encoding = end end = this.length } if (val.length === 1) { var code = val.charCodeAt(0) if (code < 256) { val = code } } if (encoding !== undefined && typeof encoding !== 'string') { throw new TypeError('encoding must be a string') } if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { throw new TypeError('Unknown encoding: ' + encoding) } } else if (typeof val === 'number') { val = val & 255 } // Invalid ranges are not set to a default, so can range check early. if (start < 0 || this.length < start || this.length < end) { throw new RangeError('Out of range index') } if (end <= start) { return this } start = start >>> 0 end = end === undefined ? this.length : end >>> 0 if (!val) val = 0 var i if (typeof val === 'number') { for (i = start; i < end; ++i) { this[i] = val } } else { var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString()) var len = bytes.length for (i = 0; i < end - start; ++i) { this[i + start] = bytes[i % len] } } return this } // HELPER FUNCTIONS // ================ var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g function base64clean (str) { // Node strips out invalid characters like \n and \t from the string, base64-js does not str = stringtrim(str).replace(INVALID_BASE64_RE, '') // Node converts strings with length < 2 to '' if (str.length < 2) return '' // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not while (str.length % 4 !== 0) { str = str + '=' } return str } function stringtrim (str) { if (str.trim) return str.trim() return str.replace(/^\s+|\s+$/g, '') } function toHex (n) { if (n < 16) return '0' + n.toString(16) return n.toString(16) } function utf8ToBytes (string, units) { units = units || Infinity var codePoint var length = string.length var leadSurrogate = null var bytes = [] for (var i = 0; i < length; ++i) { codePoint = string.charCodeAt(i) // is surrogate component if (codePoint > 0xD7FF && codePoint < 0xE000) { // last char was a lead if (!leadSurrogate) { // no lead yet if (codePoint > 0xDBFF) { // unexpected trail if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) continue } else if (i + 1 === length) { // unpaired lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) continue } // valid lead leadSurrogate = codePoint continue } // 2 leads in a row if (codePoint < 0xDC00) { if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) leadSurrogate = codePoint continue } // valid surrogate pair codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 } else if (leadSurrogate) { // valid bmp char, but last char was a lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) } leadSurrogate = null // encode utf8 if (codePoint < 0x80) { if ((units -= 1) < 0) break bytes.push(codePoint) } else if (codePoint < 0x800) { if ((units -= 2) < 0) break bytes.push( codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80 ) } else if (codePoint < 0x10000) { if ((units -= 3) < 0) break bytes.push( codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 ) } else if (codePoint < 0x110000) { if ((units -= 4) < 0) break bytes.push( codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 ) } else { throw new Error('Invalid code point') } } return bytes } function asciiToBytes (str) { var byteArray = [] for (var i = 0; i < str.length; ++i) { // Node's code seems to be doing this and not & 0x7F.. byteArray.push(str.charCodeAt(i) & 0xFF) } return byteArray } function utf16leToBytes (str, units) { var c, hi, lo var byteArray = [] for (var i = 0; i < str.length; ++i) { if ((units -= 2) < 0) break c = str.charCodeAt(i) hi = c >> 8 lo = c % 256 byteArray.push(lo) byteArray.push(hi) } return byteArray } function base64ToBytes (str) { return base64.toByteArray(base64clean(str)) } function blitBuffer (src, dst, offset, length) { for (var i = 0; i < length; ++i) { if ((i + offset >= dst.length) || (i >= src.length)) break dst[i + offset] = src[i] } return i } function isnan (val) { return val !== val // eslint-disable-line no-self-compare } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27))) /***/ }), /* 3849 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.byteLength = byteLength exports.toByteArray = toByteArray exports.fromByteArray = fromByteArray var lookup = [] var revLookup = [] var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' for (var i = 0, len = code.length; i < len; ++i) { lookup[i] = code[i] revLookup[code.charCodeAt(i)] = i } // Support decoding URL-safe base64 strings, as Node.js does. // See: https://en.wikipedia.org/wiki/Base64#URL_applications revLookup['-'.charCodeAt(0)] = 62 revLookup['_'.charCodeAt(0)] = 63 function getLens (b64) { var len = b64.length if (len % 4 > 0) { throw new Error('Invalid string. Length must be a multiple of 4') } // Trim off extra bytes after placeholder bytes are found // See: https://github.com/beatgammit/base64-js/issues/42 var validLen = b64.indexOf('=') if (validLen === -1) validLen = len var placeHoldersLen = validLen === len ? 0 : 4 - (validLen % 4) return [validLen, placeHoldersLen] } // base64 is 4/3 + up to two characters of the original data function byteLength (b64) { var lens = getLens(b64) var validLen = lens[0] var placeHoldersLen = lens[1] return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen } function _byteLength (b64, validLen, placeHoldersLen) { return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen } function toByteArray (b64) { var tmp var lens = getLens(b64) var validLen = lens[0] var placeHoldersLen = lens[1] var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) var curByte = 0 // if there are placeholders, only get up to the last complete 4 chars var len = placeHoldersLen > 0 ? validLen - 4 : validLen var i for (i = 0; i < len; i += 4) { tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] arr[curByte++] = (tmp >> 16) & 0xFF arr[curByte++] = (tmp >> 8) & 0xFF arr[curByte++] = tmp & 0xFF } if (placeHoldersLen === 2) { tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) arr[curByte++] = tmp & 0xFF } if (placeHoldersLen === 1) { tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) arr[curByte++] = (tmp >> 8) & 0xFF arr[curByte++] = tmp & 0xFF } return arr } function tripletToBase64 (num) { return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] } function encodeChunk (uint8, start, end) { var tmp var output = [] for (var i = start; i < end; i += 3) { tmp = ((uint8[i] << 16) & 0xFF0000) + ((uint8[i + 1] << 8) & 0xFF00) + (uint8[i + 2] & 0xFF) output.push(tripletToBase64(tmp)) } return output.join('') } function fromByteArray (uint8) { var tmp var len = uint8.length var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes var parts = [] var maxChunkLength = 16383 // must be multiple of 3 // go through the array every three bytes, we'll deal with trailing stuff later for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { parts.push(encodeChunk( uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) )) } // pad the end with zeros, but make sure to not forget the extra bytes if (extraBytes === 1) { tmp = uint8[len - 1] parts.push( lookup[tmp >> 2] + lookup[(tmp << 4) & 0x3F] + '==' ) } else if (extraBytes === 2) { tmp = (uint8[len - 2] << 8) + uint8[len - 1] parts.push( lookup[tmp >> 10] + lookup[(tmp >> 4) & 0x3F] + lookup[(tmp << 2) & 0x3F] + '=' ) } return parts.join('') } /***/ }), /* 3850 */ /***/ (function(module, exports) { exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = (nBytes * 8) - mLen - 1 var eMax = (1 << eLen) - 1 var eBias = eMax >> 1 var nBits = -7 var i = isLE ? (nBytes - 1) : 0 var d = isLE ? -1 : 1 var s = buffer[offset + i] i += d e = s & ((1 << (-nBits)) - 1) s >>= (-nBits) nBits += eLen for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} m = e & ((1 << (-nBits)) - 1) e >>= (-nBits) nBits += mLen for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} if (e === 0) { e = 1 - eBias } else if (e === eMax) { return m ? NaN : ((s ? -1 : 1) * Infinity) } else { m = m + Math.pow(2, mLen) e = e - eBias } return (s ? -1 : 1) * m * Math.pow(2, e - mLen) } exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { var e, m, c var eLen = (nBytes * 8) - mLen - 1 var eMax = (1 << eLen) - 1 var eBias = eMax >> 1 var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) var i = isLE ? 0 : (nBytes - 1) var d = isLE ? 1 : -1 var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 value = Math.abs(value) if (isNaN(value) || value === Infinity) { m = isNaN(value) ? 1 : 0 e = eMax } else { e = Math.floor(Math.log(value) / Math.LN2) if (value * (c = Math.pow(2, -e)) < 1) { e-- c *= 2 } if (e + eBias >= 1) { value += rt / c } else { value += rt * Math.pow(2, 1 - eBias) } if (value * c >= 2) { e++ c /= 2 } if (e + eBias >= eMax) { m = 0 e = eMax } else if (e + eBias >= 1) { m = ((value * c) - 1) * Math.pow(2, mLen) e = e + eBias } else { m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) e = 0 } } for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} e = (e << mLen) | m eLen += mLen for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} buffer[offset + i - d] |= s * 128 } /***/ }), /* 3851 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; /***/ }), /* 3852 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactComponents = __webpack_require__(1062); var _Menu = __webpack_require__(3853); var _Menu2 = _interopRequireDefault(_Menu); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * Copyright (C) 2006-2021 Talend Inc. - www.talend.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ var Menu = function (_React$Component) { _inherits(Menu, _React$Component); function Menu(props) { _classCallCheck(this, Menu); var _this = _possibleConstructorReturn(this, (Menu.__proto__ || Object.getPrototypeOf(Menu)).call(this, props)); _this.onSelect = _this.onSelect.bind(_this); _this.onToggle = _this.onToggle.bind(_this); _this.onSwitch = _this.onSwitch.bind(_this); _this.noOp = function () {}; return _this; } _createClass(Menu, [{ key: 'componentDidMount', value: function componentDidMount() { this.props.getComponentsList(); } }, { key: 'onToggle', value: function onToggle(event, node) { this.props.toggleComponent(node); } }, { key: 'onSelect', value: function onSelect(event, node) { if (node.$$type === 'component' && node.selected) { return; } this.props.selectComponent(node); } }, { key: 'onSwitch', value: function onSwitch() { this.props.getComponentsList({ configuration: !this.props.configurationSelected }); } }, { key: 'render', value: function render() { if (this.props.isLoading) { return _react2.default.createElement(_reactComponents.CircularProgress, { light: true }); } return _react2.default.createElement( 'div', { className: _Menu2.default.menu }, this.props.error && _react2.default.createElement( 'p', null, this.props.error ), _react2.default.createElement( 'div', { className: _Menu2.default.TreeViewHeader }, _react2.default.createElement( 'div', null, 'Components' ), _react2.default.createElement(_reactComponents.Toggle, { id: 'index-switch', onChange: this.onSwitch, checked: this.props.configurationSelected }), _react2.default.createElement( 'div', null, 'Configurations' ) ), _react2.default.createElement(_reactComponents.TreeView, { id: 'menu', noHeader: true, className: _Menu2.default.menu, structure: this.props.categories || [], selectedId: this.props.selectedId, onSelect: this.onSelect, onToggle: this.onToggle, onToggleAllSiblings: this.noOp }), _react2.default.createElement( _reactComponents.Modal, { show: this.props.displayDocumentation, onHide: this.props.onDocumentationModalClose, bsSize: 'lg' }, _react2.default.createElement( _reactComponents.Modal.Header, { closeButton: true }, 'Documentation' ), _react2.default.createElement( _reactComponents.Modal.Body, null, _react2.default.createElement('div', { dangerouslySetInnerHTML: { __html: this.props.documentation } }) ) ) ); } }]); return Menu; }(_react2.default.Component); exports.default = Menu; /***/ }), /* 3853 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"menu":"Menu__menu___2w9pn","TreeViewHeader":"Menu__TreeViewHeader___3-lqA"}; /***/ }), /* 3854 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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; }; /** * Copyright (C) 2006-2021 Talend Inc. - www.talend.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ var _reactCmf = __webpack_require__(263); var _redux = __webpack_require__(181); var _get = __webpack_require__(203); var _get2 = _interopRequireDefault(_get); var _actions = __webpack_require__(1541); var _Detail = __webpack_require__(3855); var _Detail2 = _interopRequireDefault(_Detail); var _Detail3 = __webpack_require__(4328); var _Detail4 = _interopRequireDefault(_Detail3); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function mapStateToProps(state) { return _extends({ definitionURL: (0, _get2.default)(state, 'app.componentsList.selectedNode.$$detail') }, (state.app || {}).component || {}); } function mapDispatchToProps(dispatch) { return { backToComponentEdit: (0, _redux.bindActionCreators)(_actions.backToComponentEdit, dispatch), onChange: (0, _redux.bindActionCreators)(_actions.onComponentPropertiesChange, dispatch), onErrors: (0, _redux.bindActionCreators)(_actions.onComponentErrorsChange, dispatch), onNotification: (0, _redux.bindActionCreators)(_actions.onNotification, dispatch) }; } _Detail4.default.displayName = 'Detail'; _Detail4.default.sagas = { 'Detail::start': _Detail2.default }; exports.default = (0, _reactCmf.cmfConnect)({ mapStateToProps: mapStateToProps, mapDispatchToProps: mapDispatchToProps })(_Detail4.default); /***/ }), /* 3855 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = start; var _effects = __webpack_require__(157); var _ComponentForm = __webpack_require__(870); var _ComponentForm2 = _interopRequireDefault(_ComponentForm); var _constants = __webpack_require__(224); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _marked = /*#__PURE__*/regeneratorRuntime.mark(doSubmit), _marked2 = /*#__PURE__*/regeneratorRuntime.mark(start); /** * Copyright (C) 2006-2021 Talend Inc. - www.talend.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ function doSubmit(_ref) { var properties = _ref.properties, componentId = _ref.componentId; return regeneratorRuntime.wrap(function doSubmit$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: if (!(componentId === 'detail-form')) { _context.next = 3; break; } _context.next = 3; return (0, _effects.put)({ type: _constants.SUBMIT_COMPONENT, properties: properties }); case 3: case 'end': return _context.stop(); } } }, _marked, this); } function start() { return regeneratorRuntime.wrap(function start$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: _context2.next = 2; return (0, _effects.takeLatest)(_ComponentForm2.default.ON_SUBMIT, doSubmit); case 2: case 'end': return _context2.stop(); } } }, _marked2, this); } /***/ }), /* 3856 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactIs = __webpack_require__(47); var assign = __webpack_require__(70); var ReactPropTypesSecret = __webpack_require__(871); var checkPropTypes = __webpack_require__(3857); var has = Function.call.bind(Object.prototype.hasOwnProperty); var printWarning = function() {}; if (process.env.NODE_ENV !== 'production') { printWarning = function(text) { var message = 'Warning: ' + text; if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; } function emptyFunctionThatReturnsNull() { return null; } module.exports = function(isValidElement, throwOnDirectAccess) { /* global Symbol */ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. /** * Returns the iterator method function contained on the iterable object. * * Be sure to invoke the function with the iterable as context: * * var iteratorFn = getIteratorFn(myIterable); * if (iteratorFn) { * var iterator = iteratorFn.call(myIterable); * ... * } * * @param {?object} maybeIterable * @return {?function} */ function getIteratorFn(maybeIterable) { var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); if (typeof iteratorFn === 'function') { return iteratorFn; } } /** * Collection of methods that allow declaration and validation of props that are * supplied to React components. Example usage: * * var Props = require('ReactPropTypes'); * var MyArticle = React.createClass({ * propTypes: { * // An optional string prop named "description". * description: Props.string, * * // A required enum prop named "category". * category: Props.oneOf(['News','Photos']).isRequired, * * // A prop named "dialog" that requires an instance of Dialog. * dialog: Props.instanceOf(Dialog).isRequired * }, * render: function() { ... } * }); * * A more formal specification of how these methods are used: * * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) * decl := ReactPropTypes.{type}(.isRequired)? * * Each and every declaration produces a function with the same signature. This * allows the creation of custom validation functions. For example: * * var MyLink = React.createClass({ * propTypes: { * // An optional string or URI prop named "href". * href: function(props, propName, componentName) { * var propValue = props[propName]; * if (propValue != null && typeof propValue !== 'string' && * !(propValue instanceof URI)) { * return new Error( * 'Expected a string or an URI for ' + propName + ' in ' + * componentName * ); * } * } * }, * render: function() {...} * }); * * @internal */ var ANONYMOUS = '<>'; // Important! // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. var ReactPropTypes = { array: createPrimitiveTypeChecker('array'), bool: createPrimitiveTypeChecker('boolean'), func: createPrimitiveTypeChecker('function'), number: createPrimitiveTypeChecker('number'), object: createPrimitiveTypeChecker('object'), string: createPrimitiveTypeChecker('string'), symbol: createPrimitiveTypeChecker('symbol'), any: createAnyTypeChecker(), arrayOf: createArrayOfTypeChecker, element: createElementTypeChecker(), elementType: createElementTypeTypeChecker(), instanceOf: createInstanceTypeChecker, node: createNodeChecker(), objectOf: createObjectOfTypeChecker, oneOf: createEnumTypeChecker, oneOfType: createUnionTypeChecker, shape: createShapeTypeChecker, exact: createStrictShapeTypeChecker, }; /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ /*eslint-disable no-self-compare*/ function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } } /*eslint-enable no-self-compare*/ /** * We use an Error-like object for backward compatibility as people may call * PropTypes directly and inspect their output. However, we don't use real * Errors anymore. We don't inspect their stack anyway, and creating them * is prohibitively expensive if they are created too often, such as what * happens in oneOfType() for any type before the one that matched. */ function PropTypeError(message) { this.message = message; this.stack = ''; } // Make `instanceof Error` still work for returned errors. PropTypeError.prototype = Error.prototype; function createChainableTypeChecker(validate) { if (process.env.NODE_ENV !== 'production') { var manualPropTypeCallCache = {}; var manualPropTypeWarningCount = 0; } function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { componentName = componentName || ANONYMOUS; propFullName = propFullName || propName; if (secret !== ReactPropTypesSecret) { if (throwOnDirectAccess) { // New behavior only for users of `prop-types` package var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') { // Old behavior for people using React.PropTypes var cacheKey = componentName + ':' + propName; if ( !manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors manualPropTypeWarningCount < 3 ) { printWarning( 'You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' ); manualPropTypeCallCache[cacheKey] = true; manualPropTypeWarningCount++; } } } if (props[propName] == null) { if (isRequired) { if (props[propName] === null) { return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); } return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); } return null; } else { return validate(props, propName, componentName, location, propFullName); } } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; } function createPrimitiveTypeChecker(expectedType) { function validate(props, propName, componentName, location, propFullName, secret) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== expectedType) { // `propValue` being instance of, say, date/regexp, pass the 'object' // check, but we can offer a more precise error message here rather than // 'of type `object`'. var preciseType = getPreciseType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); } return null; } return createChainableTypeChecker(validate); } function createAnyTypeChecker() { return createChainableTypeChecker(emptyFunctionThatReturnsNull); } function createArrayOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); } var propValue = props[propName]; if (!Array.isArray(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); } for (var i = 0; i < propValue.length; i++) { var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); if (error instanceof Error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createElementTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!isValidElement(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); } return null; } return createChainableTypeChecker(validate); } function createElementTypeTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!ReactIs.isValidElementType(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); } return null; } return createChainableTypeChecker(validate); } function createInstanceTypeChecker(expectedClass) { function validate(props, propName, componentName, location, propFullName) { if (!(props[propName] instanceof expectedClass)) { var expectedClassName = expectedClass.name || ANONYMOUS; var actualClassName = getClassName(props[propName]); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); } return null; } return createChainableTypeChecker(validate); } function createEnumTypeChecker(expectedValues) { if (!Array.isArray(expectedValues)) { if (process.env.NODE_ENV !== 'production') { if (arguments.length > 1) { printWarning( 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' ); } else { printWarning('Invalid argument supplied to oneOf, expected an array.'); } } return emptyFunctionThatReturnsNull; } function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; for (var i = 0; i < expectedValues.length; i++) { if (is(propValue, expectedValues[i])) { return null; } } var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { var type = getPreciseType(value); if (type === 'symbol') { return String(value); } return value; }); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); } return createChainableTypeChecker(validate); } function createObjectOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); } var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); } for (var key in propValue) { if (has(propValue, key)) { var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error instanceof Error) { return error; } } } return null; } return createChainableTypeChecker(validate); } function createUnionTypeChecker(arrayOfTypeCheckers) { if (!Array.isArray(arrayOfTypeCheckers)) { process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; return emptyFunctionThatReturnsNull; } for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (typeof checker !== 'function') { printWarning( 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' ); return emptyFunctionThatReturnsNull; } } function validate(props, propName, componentName, location, propFullName) { for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { return null; } } return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } return createChainableTypeChecker(validate); } function createNodeChecker() { function validate(props, propName, componentName, location, propFullName) { if (!isNode(props[propName])) { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); } return null; } return createChainableTypeChecker(validate); } function createShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } for (var key in shapeTypes) { var checker = shapeTypes[key]; if (!checker) { continue; } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createStrictShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } // We need to check all keys in case some are required but missing from // props. var allKeys = assign({}, props[propName], shapeTypes); for (var key in allKeys) { var checker = shapeTypes[key]; if (!checker) { return new PropTypeError( 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') ); } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function isNode(propValue) { switch (typeof propValue) { case 'number': case 'string': case 'undefined': return true; case 'boolean': return !propValue; case 'object': if (Array.isArray(propValue)) { return propValue.every(isNode); } if (propValue === null || isValidElement(propValue)) { return true; } var iteratorFn = getIteratorFn(propValue); if (iteratorFn) { var iterator = iteratorFn.call(propValue); var step; if (iteratorFn !== propValue.entries) { while (!(step = iterator.next()).done) { if (!isNode(step.value)) { return false; } } } else { // Iterator will provide entry [k,v] tuples rather than values. while (!(step = iterator.next()).done) { var entry = step.value; if (entry) { if (!isNode(entry[1])) { return false; } } } } } else { return false; } return true; default: return false; } } function isSymbol(propType, propValue) { // Native Symbol. if (propType === 'symbol') { return true; } // falsy value can't be a Symbol if (!propValue) { return false; } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' if (propValue['@@toStringTag'] === 'Symbol') { return true; } // Fallback for non-spec compliant Symbols which are polyfilled. if (typeof Symbol === 'function' && propValue instanceof Symbol) { return true; } return false; } // Equivalent of `typeof` but with special handling for array and regexp. function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return 'object'; } if (isSymbol(propType, propValue)) { return 'symbol'; } return propType; } // This handles more types than `getPropType`. Only used for error messages. // See `createPrimitiveTypeChecker`. function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; } // Returns a string that is postfixed to a warning about an invalid type. // For example, "undefined" or "of type array" function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } } // Returns class name of the object, if any. function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; } ReactPropTypes.checkPropTypes = checkPropTypes; ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3857 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var printWarning = function() {}; if (process.env.NODE_ENV !== 'production') { var ReactPropTypesSecret = __webpack_require__(871); var loggedTypeFailures = {}; var has = Function.call.bind(Object.prototype.hasOwnProperty); printWarning = function(text) { var message = 'Warning: ' + text; if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; } /** * Assert that the values match with the type specs. * Error messages are memorized and will only be shown once. * * @param {object} typeSpecs Map of name to a ReactPropType * @param {object} values Runtime values that need to be type-checked * @param {string} location e.g. "prop", "context", "child context" * @param {string} componentName Name of the component for error messages. * @param {?Function} getStack Returns the component stack. * @private */ function checkPropTypes(typeSpecs, values, location, componentName, getStack) { if (process.env.NODE_ENV !== 'production') { for (var typeSpecName in typeSpecs) { if (has(typeSpecs, typeSpecName)) { var error; // Prop type validation may throw. In case they do, we don't want to // fail the render phase where it didn't fail before. So we log it. // After these have been cleaned up, we'll let them throw. try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. if (typeof typeSpecs[typeSpecName] !== 'function') { var err = Error( (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' ); err.name = 'Invariant Violation'; throw err; } error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); } catch (ex) { error = ex; } if (error && !(error instanceof Error)) { printWarning( (componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).' ); } if (error instanceof Error && !(error.message in loggedTypeFailures)) { // Only monitor this failure once because there tends to be a lot of the // same error. loggedTypeFailures[error.message] = true; var stack = getStack ? getStack() : ''; printWarning( 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') ); } } } } } /** * Resets warning cache when testing. * * @private */ checkPropTypes.resetWarningCache = function() { if (process.env.NODE_ENV !== 'production') { loggedTypeFailures = {}; } } module.exports = checkPropTypes; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3858 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = __webpack_require__(871); function emptyFunction() {} function emptyFunctionWithReset() {} emptyFunctionWithReset.resetWarningCache = emptyFunction; module.exports = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; }; shim.isRequired = shim; function getShim() { return shim; }; // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, elementType: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim, checkPropTypes: emptyFunctionWithReset, resetWarningCache: emptyFunction }; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /* 3859 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "I18N_DOMAIN_FORMS", { enumerable: true, get: function get() { return _constants.I18N_DOMAIN_FORMS; } }); exports["default"] = void 0; var _deprecated = _interopRequireDefault(__webpack_require__(3860)); var _rhf = _interopRequireDefault(__webpack_require__(4018)); var _UIForm = _interopRequireDefault(__webpack_require__(1604)); var _widgets = _interopRequireDefault(__webpack_require__(4182)); var _constants = __webpack_require__(73); var _FormSkeleton = _interopRequireDefault(__webpack_require__(1639)); var _FormSwitcher = _interopRequireDefault(__webpack_require__(4186)); var _validate = _interopRequireDefault(__webpack_require__(4187)); var _translate = _interopRequireDefault(__webpack_require__(116)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var Form = _FormSwitcher["default"]; Form.constants = { I18N_DOMAIN_FORMS: _constants.I18N_DOMAIN_FORMS }; Form.utils = { translate: _translate["default"], validate: _validate["default"] }; Form.Skeleton = _FormSkeleton["default"]; Form.deprecated = _deprecated["default"]; Form.rhf = _rhf["default"]; Form.UIForm = _UIForm["default"]; Form.widgets = _widgets["default"]; var _default = Form; // FIXME remove for 6.0 exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 3860 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "customWidgets", { enumerable: true, get: function get() { return _Form.customWidgets; } }); Object.defineProperty(exports, "renderActionIcon", { enumerable: true, get: function get() { return _Form.renderActionIcon; } }); Object.defineProperty(exports, "renderActions", { enumerable: true, get: function get() { return _Form.renderActions; } }); Object.defineProperty(exports, "DataPropTypes", { enumerable: true, get: function get() { return _Form.DataPropTypes; } }); Object.defineProperty(exports, "ActionsPropTypes", { enumerable: true, get: function get() { return _Form.ActionsPropTypes; } }); exports["default"] = void 0; var _fields = _interopRequireDefault(__webpack_require__(3861)); var _templates = _interopRequireDefault(__webpack_require__(3888)); var _widgets = _interopRequireDefault(__webpack_require__(3890)); var _Form = _interopRequireWildcard(__webpack_require__(1597)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } _Form["default"].fields = _fields["default"]; _Form["default"].templates = _templates["default"]; _Form["default"].widgets = _widgets["default"]; var _default = _Form["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 3861 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ArrayField = _interopRequireDefault(__webpack_require__(1543)); var _BooleanField = _interopRequireDefault(__webpack_require__(1552)); var _CollapsibleFieldset = _interopRequireDefault(__webpack_require__(3887)); var _ObjectField = _interopRequireDefault(__webpack_require__(536)); var _StringField = _interopRequireDefault(__webpack_require__(1554)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = { ArrayField: _ArrayField["default"], BooleanField: _BooleanField["default"], CollapsibleFieldset: _CollapsibleFieldset["default"], ObjectField: _ObjectField["default"], StringField: _StringField["default"] }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 3862 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactIs = __webpack_require__(47); var assign = __webpack_require__(70); var ReactPropTypesSecret = __webpack_require__(872); var checkPropTypes = __webpack_require__(3863); var has = Function.call.bind(Object.prototype.hasOwnProperty); var printWarning = function() {}; if (process.env.NODE_ENV !== 'production') { printWarning = function(text) { var message = 'Warning: ' + text; if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; } function emptyFunctionThatReturnsNull() { return null; } module.exports = function(isValidElement, throwOnDirectAccess) { /* global Symbol */ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. /** * Returns the iterator method function contained on the iterable object. * * Be sure to invoke the function with the iterable as context: * * var iteratorFn = getIteratorFn(myIterable); * if (iteratorFn) { * var iterator = iteratorFn.call(myIterable); * ... * } * * @param {?object} maybeIterable * @return {?function} */ function getIteratorFn(maybeIterable) { var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); if (typeof iteratorFn === 'function') { return iteratorFn; } } /** * Collection of methods that allow declaration and validation of props that are * supplied to React components. Example usage: * * var Props = require('ReactPropTypes'); * var MyArticle = React.createClass({ * propTypes: { * // An optional string prop named "description". * description: Props.string, * * // A required enum prop named "category". * category: Props.oneOf(['News','Photos']).isRequired, * * // A prop named "dialog" that requires an instance of Dialog. * dialog: Props.instanceOf(Dialog).isRequired * }, * render: function() { ... } * }); * * A more formal specification of how these methods are used: * * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) * decl := ReactPropTypes.{type}(.isRequired)? * * Each and every declaration produces a function with the same signature. This * allows the creation of custom validation functions. For example: * * var MyLink = React.createClass({ * propTypes: { * // An optional string or URI prop named "href". * href: function(props, propName, componentName) { * var propValue = props[propName]; * if (propValue != null && typeof propValue !== 'string' && * !(propValue instanceof URI)) { * return new Error( * 'Expected a string or an URI for ' + propName + ' in ' + * componentName * ); * } * } * }, * render: function() {...} * }); * * @internal */ var ANONYMOUS = '<>'; // Important! // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. var ReactPropTypes = { array: createPrimitiveTypeChecker('array'), bool: createPrimitiveTypeChecker('boolean'), func: createPrimitiveTypeChecker('function'), number: createPrimitiveTypeChecker('number'), object: createPrimitiveTypeChecker('object'), string: createPrimitiveTypeChecker('string'), symbol: createPrimitiveTypeChecker('symbol'), any: createAnyTypeChecker(), arrayOf: createArrayOfTypeChecker, element: createElementTypeChecker(), elementType: createElementTypeTypeChecker(), instanceOf: createInstanceTypeChecker, node: createNodeChecker(), objectOf: createObjectOfTypeChecker, oneOf: createEnumTypeChecker, oneOfType: createUnionTypeChecker, shape: createShapeTypeChecker, exact: createStrictShapeTypeChecker, }; /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ /*eslint-disable no-self-compare*/ function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } } /*eslint-enable no-self-compare*/ /** * We use an Error-like object for backward compatibility as people may call * PropTypes directly and inspect their output. However, we don't use real * Errors anymore. We don't inspect their stack anyway, and creating them * is prohibitively expensive if they are created too often, such as what * happens in oneOfType() for any type before the one that matched. */ function PropTypeError(message) { this.message = message; this.stack = ''; } // Make `instanceof Error` still work for returned errors. PropTypeError.prototype = Error.prototype; function createChainableTypeChecker(validate) { if (process.env.NODE_ENV !== 'production') { var manualPropTypeCallCache = {}; var manualPropTypeWarningCount = 0; } function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { componentName = componentName || ANONYMOUS; propFullName = propFullName || propName; if (secret !== ReactPropTypesSecret) { if (throwOnDirectAccess) { // New behavior only for users of `prop-types` package var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') { // Old behavior for people using React.PropTypes var cacheKey = componentName + ':' + propName; if ( !manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors manualPropTypeWarningCount < 3 ) { printWarning( 'You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' ); manualPropTypeCallCache[cacheKey] = true; manualPropTypeWarningCount++; } } } if (props[propName] == null) { if (isRequired) { if (props[propName] === null) { return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); } return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); } return null; } else { return validate(props, propName, componentName, location, propFullName); } } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; } function createPrimitiveTypeChecker(expectedType) { function validate(props, propName, componentName, location, propFullName, secret) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== expectedType) { // `propValue` being instance of, say, date/regexp, pass the 'object' // check, but we can offer a more precise error message here rather than // 'of type `object`'. var preciseType = getPreciseType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); } return null; } return createChainableTypeChecker(validate); } function createAnyTypeChecker() { return createChainableTypeChecker(emptyFunctionThatReturnsNull); } function createArrayOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); } var propValue = props[propName]; if (!Array.isArray(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); } for (var i = 0; i < propValue.length; i++) { var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); if (error instanceof Error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createElementTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!isValidElement(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); } return null; } return createChainableTypeChecker(validate); } function createElementTypeTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!ReactIs.isValidElementType(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); } return null; } return createChainableTypeChecker(validate); } function createInstanceTypeChecker(expectedClass) { function validate(props, propName, componentName, location, propFullName) { if (!(props[propName] instanceof expectedClass)) { var expectedClassName = expectedClass.name || ANONYMOUS; var actualClassName = getClassName(props[propName]); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); } return null; } return createChainableTypeChecker(validate); } function createEnumTypeChecker(expectedValues) { if (!Array.isArray(expectedValues)) { if (process.env.NODE_ENV !== 'production') { if (arguments.length > 1) { printWarning( 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' ); } else { printWarning('Invalid argument supplied to oneOf, expected an array.'); } } return emptyFunctionThatReturnsNull; } function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; for (var i = 0; i < expectedValues.length; i++) { if (is(propValue, expectedValues[i])) { return null; } } var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { var type = getPreciseType(value); if (type === 'symbol') { return String(value); } return value; }); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); } return createChainableTypeChecker(validate); } function createObjectOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); } var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); } for (var key in propValue) { if (has(propValue, key)) { var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error instanceof Error) { return error; } } } return null; } return createChainableTypeChecker(validate); } function createUnionTypeChecker(arrayOfTypeCheckers) { if (!Array.isArray(arrayOfTypeCheckers)) { process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; return emptyFunctionThatReturnsNull; } for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (typeof checker !== 'function') { printWarning( 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' ); return emptyFunctionThatReturnsNull; } } function validate(props, propName, componentName, location, propFullName) { for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { return null; } } return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } return createChainableTypeChecker(validate); } function createNodeChecker() { function validate(props, propName, componentName, location, propFullName) { if (!isNode(props[propName])) { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); } return null; } return createChainableTypeChecker(validate); } function createShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } for (var key in shapeTypes) { var checker = shapeTypes[key]; if (!checker) { continue; } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createStrictShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } // We need to check all keys in case some are required but missing from // props. var allKeys = assign({}, props[propName], shapeTypes); for (var key in allKeys) { var checker = shapeTypes[key]; if (!checker) { return new PropTypeError( 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') ); } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function isNode(propValue) { switch (typeof propValue) { case 'number': case 'string': case 'undefined': return true; case 'boolean': return !propValue; case 'object': if (Array.isArray(propValue)) { return propValue.every(isNode); } if (propValue === null || isValidElement(propValue)) { return true; } var iteratorFn = getIteratorFn(propValue); if (iteratorFn) { var iterator = iteratorFn.call(propValue); var step; if (iteratorFn !== propValue.entries) { while (!(step = iterator.next()).done) { if (!isNode(step.value)) { return false; } } } else { // Iterator will provide entry [k,v] tuples rather than values. while (!(step = iterator.next()).done) { var entry = step.value; if (entry) { if (!isNode(entry[1])) { return false; } } } } } else { return false; } return true; default: return false; } } function isSymbol(propType, propValue) { // Native Symbol. if (propType === 'symbol') { return true; } // falsy value can't be a Symbol if (!propValue) { return false; } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' if (propValue['@@toStringTag'] === 'Symbol') { return true; } // Fallback for non-spec compliant Symbols which are polyfilled. if (typeof Symbol === 'function' && propValue instanceof Symbol) { return true; } return false; } // Equivalent of `typeof` but with special handling for array and regexp. function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return 'object'; } if (isSymbol(propType, propValue)) { return 'symbol'; } return propType; } // This handles more types than `getPropType`. Only used for error messages. // See `createPrimitiveTypeChecker`. function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; } // Returns a string that is postfixed to a warning about an invalid type. // For example, "undefined" or "of type array" function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } } // Returns class name of the object, if any. function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; } ReactPropTypes.checkPropTypes = checkPropTypes; ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3863 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var printWarning = function() {}; if (process.env.NODE_ENV !== 'production') { var ReactPropTypesSecret = __webpack_require__(872); var loggedTypeFailures = {}; var has = Function.call.bind(Object.prototype.hasOwnProperty); printWarning = function(text) { var message = 'Warning: ' + text; if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; } /** * Assert that the values match with the type specs. * Error messages are memorized and will only be shown once. * * @param {object} typeSpecs Map of name to a ReactPropType * @param {object} values Runtime values that need to be type-checked * @param {string} location e.g. "prop", "context", "child context" * @param {string} componentName Name of the component for error messages. * @param {?Function} getStack Returns the component stack. * @private */ function checkPropTypes(typeSpecs, values, location, componentName, getStack) { if (process.env.NODE_ENV !== 'production') { for (var typeSpecName in typeSpecs) { if (has(typeSpecs, typeSpecName)) { var error; // Prop type validation may throw. In case they do, we don't want to // fail the render phase where it didn't fail before. So we log it. // After these have been cleaned up, we'll let them throw. try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. if (typeof typeSpecs[typeSpecName] !== 'function') { var err = Error( (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' ); err.name = 'Invariant Violation'; throw err; } error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); } catch (ex) { error = ex; } if (error && !(error instanceof Error)) { printWarning( (componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).' ); } if (error instanceof Error && !(error.message in loggedTypeFailures)) { // Only monitor this failure once because there tends to be a lot of the // same error. loggedTypeFailures[error.message] = true; var stack = getStack ? getStack() : ''; printWarning( 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') ); } } } } } /** * Resets warning cache when testing. * * @private */ checkPropTypes.resetWarningCache = function() { if (process.env.NODE_ENV !== 'production') { loggedTypeFailures = {}; } } module.exports = checkPropTypes; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3864 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = __webpack_require__(872); function emptyFunction() {} function emptyFunctionWithReset() {} emptyFunctionWithReset.resetWarningCache = emptyFunction; module.exports = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; }; shim.isRequired = shim; function getShim() { return shim; }; // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, elementType: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim, checkPropTypes: emptyFunctionWithReset, resetWarningCache: emptyFunction }; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /* 3865 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _ArrayField = __webpack_require__(3866); var _ArrayField2 = _interopRequireDefault(_ArrayField); var _BooleanField = __webpack_require__(3867); var _BooleanField2 = _interopRequireDefault(_BooleanField); var _DescriptionField = __webpack_require__(1546); var _DescriptionField2 = _interopRequireDefault(_DescriptionField); var _NumberField = __webpack_require__(3868); var _NumberField2 = _interopRequireDefault(_NumberField); var _ObjectField = __webpack_require__(3869); var _ObjectField2 = _interopRequireDefault(_ObjectField); var _SchemaField = __webpack_require__(1547); var _SchemaField2 = _interopRequireDefault(_SchemaField); var _StringField = __webpack_require__(3870); var _StringField2 = _interopRequireDefault(_StringField); var _TitleField = __webpack_require__(1548); var _TitleField2 = _interopRequireDefault(_TitleField); var _UnsupportedField = __webpack_require__(535); var _UnsupportedField2 = _interopRequireDefault(_UnsupportedField); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = { ArrayField: _ArrayField2.default, BooleanField: _BooleanField2.default, DescriptionField: _DescriptionField2.default, NumberField: _NumberField2.default, ObjectField: _ObjectField2.default, SchemaField: _SchemaField2.default, StringField: _StringField2.default, TitleField: _TitleField2.default, UnsupportedField: _UnsupportedField2.default }; /***/ }), /* 3866 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _UnsupportedField = __webpack_require__(535); var _UnsupportedField2 = _interopRequireDefault(_UnsupportedField); var _utils = __webpack_require__(66); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function ArrayFieldTitle(_ref) { var TitleField = _ref.TitleField, idSchema = _ref.idSchema, title = _ref.title, required = _ref.required; if (!title) { // See #312: Ensure compatibility with old versions of React. return _react2.default.createElement("div", null); } var id = idSchema.$id + "__title"; return _react2.default.createElement(TitleField, { id: id, title: title, required: required }); } function ArrayFieldDescription(_ref2) { var DescriptionField = _ref2.DescriptionField, idSchema = _ref2.idSchema, description = _ref2.description; if (!description) { // See #312: Ensure compatibility with old versions of React. return _react2.default.createElement("div", null); } var id = idSchema.$id + "__description"; return _react2.default.createElement(DescriptionField, { id: id, description: description }); } function IconBtn(props) { var _props$type = props.type, type = _props$type === undefined ? "default" : _props$type, icon = props.icon, className = props.className, otherProps = _objectWithoutProperties(props, ["type", "icon", "className"]); return _react2.default.createElement( "button", _extends({ type: "button", className: "btn btn-" + type + " " + className }, otherProps), _react2.default.createElement("i", { className: "glyphicon glyphicon-" + icon }) ); } // Used in the two templates function DefaultArrayItem(props) { var btnStyle = { flex: 1, paddingLeft: 6, paddingRight: 6, fontWeight: "bold" }; return _react2.default.createElement( "div", { key: props.index, className: props.className }, _react2.default.createElement( "div", { className: props.hasToolbar ? "col-xs-9" : "col-xs-12" }, props.children ), props.hasToolbar && _react2.default.createElement( "div", { className: "col-xs-3 array-item-toolbox" }, _react2.default.createElement( "div", { className: "btn-group", style: { display: "flex", justifyContent: "space-around" } }, (props.hasMoveUp || props.hasMoveDown) && _react2.default.createElement(IconBtn, { icon: "arrow-up", className: "array-item-move-up", tabIndex: "-1", style: btnStyle, disabled: props.disabled || props.readonly || !props.hasMoveUp, onClick: props.onReorderClick(props.index, props.index - 1) }), (props.hasMoveUp || props.hasMoveDown) && _react2.default.createElement(IconBtn, { icon: "arrow-down", className: "array-item-move-down", tabIndex: "-1", style: btnStyle, disabled: props.disabled || props.readonly || !props.hasMoveDown, onClick: props.onReorderClick(props.index, props.index + 1) }), props.hasRemove && _react2.default.createElement(IconBtn, { type: "danger", icon: "remove", className: "array-item-remove", tabIndex: "-1", style: btnStyle, disabled: props.disabled || props.readonly, onClick: props.onDropIndexClick(props.index) }) ) ) ); } function DefaultFixedArrayFieldTemplate(props) { return _react2.default.createElement( "fieldset", { className: props.className }, _react2.default.createElement(ArrayFieldTitle, { key: "array-field-title-" + props.idSchema.$id, TitleField: props.TitleField, idSchema: props.idSchema, title: props.uiSchema["ui:title"] || props.title, required: props.required }), (props.uiSchema["ui:description"] || props.schema.description) && _react2.default.createElement( "div", { className: "field-description", key: "field-description-" + props.idSchema.$id }, props.uiSchema["ui:description"] || props.schema.description ), _react2.default.createElement( "div", { className: "row array-item-list", key: "array-item-list-" + props.idSchema.$id }, props.items && props.items.map(DefaultArrayItem) ), props.canAdd && _react2.default.createElement(AddButton, { onClick: props.onAddClick, disabled: props.disabled || props.readonly }) ); } function DefaultNormalArrayFieldTemplate(props) { return _react2.default.createElement( "fieldset", { className: props.className }, _react2.default.createElement(ArrayFieldTitle, { key: "array-field-title-" + props.idSchema.$id, TitleField: props.TitleField, idSchema: props.idSchema, title: props.uiSchema["ui:title"] || props.title, required: props.required }), (props.uiSchema["ui:description"] || props.schema.description) && _react2.default.createElement(ArrayFieldDescription, { key: "array-field-description-" + props.idSchema.$id, DescriptionField: props.DescriptionField, idSchema: props.idSchema, description: props.uiSchema["ui:description"] || props.schema.description }), _react2.default.createElement( "div", { className: "row array-item-list", key: "array-item-list-" + props.idSchema.$id }, props.items && props.items.map(function (p) { return DefaultArrayItem(p); }) ), props.canAdd && _react2.default.createElement(AddButton, { onClick: props.onAddClick, disabled: props.disabled || props.readonly }) ); } var ArrayField = function (_Component) { _inherits(ArrayField, _Component); function ArrayField() { var _ref3; var _temp, _this, _ret; _classCallCheck(this, ArrayField); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref3 = ArrayField.__proto__ || Object.getPrototypeOf(ArrayField)).call.apply(_ref3, [this].concat(args))), _this), _this.onAddClick = function (event) { event.preventDefault(); var _this$props = _this.props, schema = _this$props.schema, formData = _this$props.formData, _this$props$registry = _this$props.registry, registry = _this$props$registry === undefined ? (0, _utils.getDefaultRegistry)() : _this$props$registry; var definitions = registry.definitions; var itemSchema = schema.items; if ((0, _utils.isFixedItems)(schema) && (0, _utils.allowAdditionalItems)(schema)) { itemSchema = schema.additionalItems; } _this.props.onChange([].concat(_toConsumableArray(formData), [(0, _utils.getDefaultFormState)(itemSchema, undefined, definitions)]), { validate: false }); }, _this.onDropIndexClick = function (index) { return function (event) { if (event) { event.preventDefault(); } var _this$props2 = _this.props, formData = _this$props2.formData, onChange = _this$props2.onChange; // refs #195: revalidate to ensure properly reindexing errors onChange(formData.filter(function (_, i) { return i !== index; }), { validate: true }); }; }, _this.onReorderClick = function (index, newIndex) { return function (event) { if (event) { event.preventDefault(); event.target.blur(); } var _this$props3 = _this.props, formData = _this$props3.formData, onChange = _this$props3.onChange; onChange(formData.map(function (item, i) { if (i === newIndex) { return formData[index]; } else if (i === index) { return formData[newIndex]; } else { return item; } }), { validate: true }); }; }, _this.onChangeForIndex = function (index) { return function (value) { var _this$props4 = _this.props, formData = _this$props4.formData, onChange = _this$props4.onChange; var newFormData = formData.map(function (item, i) { // We need to treat undefined items as nulls to have validation. // See https://github.com/tdegrunt/jsonschema/issues/206 var jsonValue = typeof value === "undefined" ? null : value; return index === i ? jsonValue : item; }); onChange(newFormData, { validate: false }); }; }, _this.onSelectChange = function (value) { _this.props.onChange(value, { validate: false }); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(ArrayField, [{ key: "isItemRequired", value: function isItemRequired(itemSchema) { if (Array.isArray(itemSchema.type)) { // While we don't yet support composite/nullable jsonschema types, it's // future-proof to check for requirement against these. return !itemSchema.type.includes("null"); } // All non-null array item types are inherently required by design return itemSchema.type !== "null"; } }, { key: "canAddItem", value: function canAddItem(formItems) { var _props = this.props, schema = _props.schema, uiSchema = _props.uiSchema; var _getUiOptions = (0, _utils.getUiOptions)(uiSchema), addable = _getUiOptions.addable; if (addable !== false) { // if ui:options.addable was not explicitly set to false, we can add // another item if we have not exceeded maxItems yet if (schema.maxItems !== undefined) { addable = formItems.length < schema.maxItems; } else { addable = true; } } return addable; } }, { key: "render", value: function render() { var _props2 = this.props, schema = _props2.schema, uiSchema = _props2.uiSchema, idSchema = _props2.idSchema, _props2$registry = _props2.registry, registry = _props2$registry === undefined ? (0, _utils.getDefaultRegistry)() : _props2$registry; var definitions = registry.definitions; if (!schema.hasOwnProperty("items")) { return _react2.default.createElement(_UnsupportedField2.default, { schema: schema, idSchema: idSchema, reason: "Missing items definition" }); } if ((0, _utils.isFixedItems)(schema)) { return this.renderFixedArray(); } if ((0, _utils.isFilesArray)(schema, uiSchema, definitions)) { return this.renderFiles(); } if ((0, _utils.isMultiSelect)(schema, definitions)) { return this.renderMultiSelect(); } return this.renderNormalArray(); } }, { key: "renderNormalArray", value: function renderNormalArray() { var _this2 = this; var _props3 = this.props, schema = _props3.schema, uiSchema = _props3.uiSchema, formData = _props3.formData, errorSchema = _props3.errorSchema, idSchema = _props3.idSchema, name = _props3.name, required = _props3.required, disabled = _props3.disabled, readonly = _props3.readonly, autofocus = _props3.autofocus, _props3$registry = _props3.registry, registry = _props3$registry === undefined ? (0, _utils.getDefaultRegistry)() : _props3$registry, formContext = _props3.formContext, onBlur = _props3.onBlur, onFocus = _props3.onFocus; var title = schema.title === undefined ? name : schema.title; var ArrayFieldTemplate = registry.ArrayFieldTemplate, definitions = registry.definitions, fields = registry.fields; var TitleField = fields.TitleField, DescriptionField = fields.DescriptionField; var itemsSchema = (0, _utils.retrieveSchema)(schema.items, definitions); var arrayProps = { canAdd: this.canAddItem(formData), items: formData.map(function (item, index) { var itemErrorSchema = errorSchema ? errorSchema[index] : undefined; var itemIdPrefix = idSchema.$id + "_" + index; var itemIdSchema = (0, _utils.toIdSchema)(itemsSchema, itemIdPrefix, definitions); return _this2.renderArrayFieldItem({ index: index, canMoveUp: index > 0, canMoveDown: index < formData.length - 1, itemSchema: itemsSchema, itemIdSchema: itemIdSchema, itemErrorSchema: itemErrorSchema, itemData: formData[index], itemUiSchema: uiSchema.items, autofocus: autofocus && index === 0, onBlur: onBlur, onFocus: onFocus }); }), className: "field field-array field-array-of-" + itemsSchema.type, DescriptionField: DescriptionField, disabled: disabled, idSchema: idSchema, uiSchema: uiSchema, onAddClick: this.onAddClick, readonly: readonly, required: required, schema: schema, title: title, TitleField: TitleField, formContext: formContext, formData: formData }; // Check if a custom render function was passed in var Component = ArrayFieldTemplate || DefaultNormalArrayFieldTemplate; return _react2.default.createElement(Component, arrayProps); } }, { key: "renderMultiSelect", value: function renderMultiSelect() { var _props4 = this.props, schema = _props4.schema, idSchema = _props4.idSchema, uiSchema = _props4.uiSchema, disabled = _props4.disabled, readonly = _props4.readonly, autofocus = _props4.autofocus, onBlur = _props4.onBlur, onFocus = _props4.onFocus, _props4$registry = _props4.registry, registry = _props4$registry === undefined ? (0, _utils.getDefaultRegistry)() : _props4$registry; var items = this.props.formData; var widgets = registry.widgets, definitions = registry.definitions, formContext = registry.formContext; var itemsSchema = (0, _utils.retrieveSchema)(schema.items, definitions); var enumOptions = (0, _utils.optionsList)(itemsSchema); var _getUiOptions$enumOpt = _extends({}, (0, _utils.getUiOptions)(uiSchema), { enumOptions: enumOptions }), _getUiOptions$enumOpt2 = _getUiOptions$enumOpt.widget, widget = _getUiOptions$enumOpt2 === undefined ? "select" : _getUiOptions$enumOpt2, options = _objectWithoutProperties(_getUiOptions$enumOpt, ["widget"]); var Widget = (0, _utils.getWidget)(schema, widget, widgets); return _react2.default.createElement(Widget, { id: idSchema && idSchema.$id, multiple: true, onChange: this.onSelectChange, onBlur: onBlur, onFocus: onFocus, options: options, schema: schema, value: items, disabled: disabled, readonly: readonly, formContext: formContext, autofocus: autofocus }); } }, { key: "renderFiles", value: function renderFiles() { var _props5 = this.props, schema = _props5.schema, uiSchema = _props5.uiSchema, idSchema = _props5.idSchema, name = _props5.name, disabled = _props5.disabled, readonly = _props5.readonly, autofocus = _props5.autofocus, onBlur = _props5.onBlur, onFocus = _props5.onFocus, _props5$registry = _props5.registry, registry = _props5$registry === undefined ? (0, _utils.getDefaultRegistry)() : _props5$registry; var title = schema.title || name; var items = this.props.formData; var widgets = registry.widgets, formContext = registry.formContext; var _getUiOptions2 = (0, _utils.getUiOptions)(uiSchema), _getUiOptions2$widget = _getUiOptions2.widget, widget = _getUiOptions2$widget === undefined ? "files" : _getUiOptions2$widget, options = _objectWithoutProperties(_getUiOptions2, ["widget"]); var Widget = (0, _utils.getWidget)(schema, widget, widgets); return _react2.default.createElement(Widget, { options: options, id: idSchema && idSchema.$id, multiple: true, onChange: this.onSelectChange, onBlur: onBlur, onFocus: onFocus, schema: schema, title: title, value: items, disabled: disabled, readonly: readonly, formContext: formContext, autofocus: autofocus }); } }, { key: "renderFixedArray", value: function renderFixedArray() { var _this3 = this; var _props6 = this.props, schema = _props6.schema, uiSchema = _props6.uiSchema, errorSchema = _props6.errorSchema, idSchema = _props6.idSchema, name = _props6.name, required = _props6.required, disabled = _props6.disabled, readonly = _props6.readonly, autofocus = _props6.autofocus, _props6$registry = _props6.registry, registry = _props6$registry === undefined ? (0, _utils.getDefaultRegistry)() : _props6$registry, onBlur = _props6.onBlur, onFocus = _props6.onFocus; var title = schema.title || name; var items = this.props.formData; var ArrayFieldTemplate = registry.ArrayFieldTemplate, definitions = registry.definitions, fields = registry.fields; var TitleField = fields.TitleField; var itemSchemas = schema.items.map(function (item) { return (0, _utils.retrieveSchema)(item, definitions); }); var additionalSchema = (0, _utils.allowAdditionalItems)(schema) ? (0, _utils.retrieveSchema)(schema.additionalItems, definitions) : null; if (!items || items.length < itemSchemas.length) { // to make sure at least all fixed items are generated items = items || []; items = items.concat(new Array(itemSchemas.length - items.length)); } // These are the props passed into the render function var arrayProps = { canAdd: this.canAddItem(items) && additionalSchema, className: "field field-array field-array-fixed-items", disabled: disabled, idSchema: idSchema, items: items.map(function (item, index) { var additional = index >= itemSchemas.length; var itemSchema = additional ? additionalSchema : itemSchemas[index]; var itemIdPrefix = idSchema.$id + "_" + index; var itemIdSchema = (0, _utils.toIdSchema)(itemSchema, itemIdPrefix, definitions); var itemUiSchema = additional ? uiSchema.additionalItems || {} : Array.isArray(uiSchema.items) ? uiSchema.items[index] : uiSchema.items || {}; var itemErrorSchema = errorSchema ? errorSchema[index] : undefined; return _this3.renderArrayFieldItem({ index: index, canRemove: additional, canMoveUp: index >= itemSchemas.length + 1, canMoveDown: additional && index < items.length - 1, itemSchema: itemSchema, itemData: item, itemUiSchema: itemUiSchema, itemIdSchema: itemIdSchema, itemErrorSchema: itemErrorSchema, autofocus: autofocus && index === 0, onBlur: onBlur, onFocus: onFocus }); }), onAddClick: this.onAddClick, readonly: readonly, required: required, schema: schema, uiSchema: uiSchema, title: title, TitleField: TitleField }; // Check if a custom template template was passed in var Template = ArrayFieldTemplate || DefaultFixedArrayFieldTemplate; return _react2.default.createElement(Template, arrayProps); } }, { key: "renderArrayFieldItem", value: function renderArrayFieldItem(props) { var index = props.index, _props$canRemove = props.canRemove, canRemove = _props$canRemove === undefined ? true : _props$canRemove, _props$canMoveUp = props.canMoveUp, canMoveUp = _props$canMoveUp === undefined ? true : _props$canMoveUp, _props$canMoveDown = props.canMoveDown, canMoveDown = _props$canMoveDown === undefined ? true : _props$canMoveDown, itemSchema = props.itemSchema, itemData = props.itemData, itemUiSchema = props.itemUiSchema, itemIdSchema = props.itemIdSchema, itemErrorSchema = props.itemErrorSchema, autofocus = props.autofocus, onBlur = props.onBlur, onFocus = props.onFocus; var _props7 = this.props, disabled = _props7.disabled, readonly = _props7.readonly, uiSchema = _props7.uiSchema, _props7$registry = _props7.registry, registry = _props7$registry === undefined ? (0, _utils.getDefaultRegistry)() : _props7$registry; var SchemaField = registry.fields.SchemaField; var _orderable$removable$ = _extends({ orderable: true, removable: true }, uiSchema["ui:options"]), orderable = _orderable$removable$.orderable, removable = _orderable$removable$.removable; var has = { moveUp: orderable && canMoveUp, moveDown: orderable && canMoveDown, remove: removable && canRemove }; has.toolbar = Object.keys(has).some(function (key) { return has[key]; }); return { children: _react2.default.createElement(SchemaField, { schema: itemSchema, uiSchema: itemUiSchema, formData: itemData, errorSchema: itemErrorSchema, idSchema: itemIdSchema, required: this.isItemRequired(itemSchema), onChange: this.onChangeForIndex(index), onBlur: onBlur, onFocus: onFocus, registry: this.props.registry, disabled: this.props.disabled, readonly: this.props.readonly, autofocus: autofocus }), className: "array-item", disabled: disabled, hasToolbar: has.toolbar, hasMoveUp: has.moveUp, hasMoveDown: has.moveDown, hasRemove: has.remove, index: index, onDropIndexClick: this.onDropIndexClick, onReorderClick: this.onReorderClick, readonly: readonly }; } }, { key: "itemTitle", get: function get() { var schema = this.props.schema; return schema.items.title || schema.items.description || "Item"; } }]); return ArrayField; }(_react.Component); ArrayField.defaultProps = { uiSchema: {}, formData: [], idSchema: {}, required: false, disabled: false, readonly: false, autofocus: false }; function AddButton(_ref4) { var onClick = _ref4.onClick, disabled = _ref4.disabled; return _react2.default.createElement( "div", { className: "row" }, _react2.default.createElement( "p", { className: "col-xs-3 col-xs-offset-9 array-item-add text-right" }, _react2.default.createElement(IconBtn, { type: "info", icon: "plus", className: "btn-add col-xs-12", tabIndex: "0", onClick: onClick, disabled: disabled }) ) ); } if (process.env.NODE_ENV !== "production") { ArrayField.propTypes = { schema: _propTypes2.default.object.isRequired, uiSchema: _propTypes2.default.shape({ "ui:options": _propTypes2.default.shape({ addable: _propTypes2.default.bool, orderable: _propTypes2.default.bool, removable: _propTypes2.default.bool }) }), idSchema: _propTypes2.default.object, errorSchema: _propTypes2.default.object, onChange: _propTypes2.default.func.isRequired, onBlur: _propTypes2.default.func, onFocus: _propTypes2.default.func, formData: _propTypes2.default.array, required: _propTypes2.default.bool, disabled: _propTypes2.default.bool, readonly: _propTypes2.default.bool, autofocus: _propTypes2.default.bool, registry: _propTypes2.default.shape({ widgets: _propTypes2.default.objectOf(_propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.object])).isRequired, fields: _propTypes2.default.objectOf(_propTypes2.default.func).isRequired, definitions: _propTypes2.default.object.isRequired, formContext: _propTypes2.default.object.isRequired }) }; } exports.default = ArrayField; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3867 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _utils = __webpack_require__(66); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function BooleanField(props) { var schema = props.schema, name = props.name, uiSchema = props.uiSchema, idSchema = props.idSchema, formData = props.formData, _props$registry = props.registry, registry = _props$registry === undefined ? (0, _utils.getDefaultRegistry)() : _props$registry, required = props.required, disabled = props.disabled, readonly = props.readonly, autofocus = props.autofocus, onChange = props.onChange; var title = schema.title; var widgets = registry.widgets, formContext = registry.formContext; var _getUiOptions = (0, _utils.getUiOptions)(uiSchema), _getUiOptions$widget = _getUiOptions.widget, widget = _getUiOptions$widget === undefined ? "checkbox" : _getUiOptions$widget, options = _objectWithoutProperties(_getUiOptions, ["widget"]); var Widget = (0, _utils.getWidget)(schema, widget, widgets); var enumOptions = (0, _utils.optionsList)({ enum: [true, false], enumNames: schema.enumNames || ["yes", "no"] }); return _react2.default.createElement(Widget, { options: _extends({}, options, { enumOptions: enumOptions }), schema: schema, id: idSchema && idSchema.$id, onChange: onChange, label: title === undefined ? name : title, value: formData, required: required, disabled: disabled, readonly: readonly, registry: registry, formContext: formContext, autofocus: autofocus }); } if (process.env.NODE_ENV !== "production") { BooleanField.propTypes = { schema: _propTypes2.default.object.isRequired, uiSchema: _propTypes2.default.object, idSchema: _propTypes2.default.object, onChange: _propTypes2.default.func.isRequired, formData: _propTypes2.default.bool, required: _propTypes2.default.bool, disabled: _propTypes2.default.bool, readonly: _propTypes2.default.bool, autofocus: _propTypes2.default.bool, registry: _propTypes2.default.shape({ widgets: _propTypes2.default.objectOf(_propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.object])).isRequired, fields: _propTypes2.default.objectOf(_propTypes2.default.func).isRequired, definitions: _propTypes2.default.object.isRequired, formContext: _propTypes2.default.object.isRequired }) }; } BooleanField.defaultProps = { uiSchema: {}, disabled: false, readonly: false, autofocus: false }; exports.default = BooleanField; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3868 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _utils = __webpack_require__(66); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function NumberField(props) { var StringField = props.registry.fields.StringField; return _react2.default.createElement(StringField, _extends({}, props, { onChange: function onChange(value) { return props.onChange((0, _utils.asNumber)(value)); } })); } if (process.env.NODE_ENV !== "production") { NumberField.propTypes = { schema: _propTypes2.default.object.isRequired, uiSchema: _propTypes2.default.object, idSchema: _propTypes2.default.object, onChange: _propTypes2.default.func.isRequired, formData: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), required: _propTypes2.default.bool, formContext: _propTypes2.default.object.isRequired }; } NumberField.defaultProps = { uiSchema: {} }; exports.default = NumberField; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3869 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _utils = __webpack_require__(66); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function DefaultObjectFieldTemplate(props) { var TitleField = props.TitleField, DescriptionField = props.DescriptionField; return _react2.default.createElement( "fieldset", null, (props.uiSchema["ui:title"] || props.title) && _react2.default.createElement(TitleField, { id: props.idSchema.$id + "__title", title: props.title || props.uiSchema["ui:title"], required: props.required, formContext: props.formContext }), props.description && _react2.default.createElement(DescriptionField, { id: props.idSchema.$id + "__description", description: props.description, formContext: props.formContext }), props.properties.map(function (prop) { return prop.content; }) ); } var ObjectField = function (_Component) { _inherits(ObjectField, _Component); function ObjectField() { var _ref; var _temp, _this, _ret; _classCallCheck(this, ObjectField); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ObjectField.__proto__ || Object.getPrototypeOf(ObjectField)).call.apply(_ref, [this].concat(args))), _this), _this.onPropertyChange = function (name) { return function (value, options) { var newFormData = _extends({}, _this.props.formData, _defineProperty({}, name, value)); _this.props.onChange(newFormData, options); }; }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(ObjectField, [{ key: "isRequired", value: function isRequired(name) { var schema = this.props.schema; return Array.isArray(schema.required) && schema.required.indexOf(name) !== -1; } }, { key: "render", value: function render() { var _this2 = this; var _props = this.props, uiSchema = _props.uiSchema, formData = _props.formData, errorSchema = _props.errorSchema, idSchema = _props.idSchema, name = _props.name, required = _props.required, disabled = _props.disabled, readonly = _props.readonly, onBlur = _props.onBlur, onFocus = _props.onFocus, _props$registry = _props.registry, registry = _props$registry === undefined ? (0, _utils.getDefaultRegistry)() : _props$registry; var definitions = registry.definitions, fields = registry.fields, formContext = registry.formContext; var SchemaField = fields.SchemaField, TitleField = fields.TitleField, DescriptionField = fields.DescriptionField; var schema = (0, _utils.retrieveSchema)(this.props.schema, definitions); var title = schema.title === undefined ? name : schema.title; var description = uiSchema["ui:description"] || schema.description; var orderedProperties = void 0; try { var properties = Object.keys(schema.properties); orderedProperties = (0, _utils.orderProperties)(properties, uiSchema["ui:order"]); } catch (err) { return _react2.default.createElement( "div", null, _react2.default.createElement( "p", { className: "config-error", style: { color: "red" } }, "Invalid ", name || "root", " object field configuration:", _react2.default.createElement( "em", null, err.message ), "." ), _react2.default.createElement( "pre", null, JSON.stringify(schema) ) ); } var Template = registry.ObjectFieldTemplate || DefaultObjectFieldTemplate; var templateProps = { title: uiSchema["ui:title"] || title, description: description, TitleField: TitleField, DescriptionField: DescriptionField, properties: orderedProperties.map(function (name) { return { content: _react2.default.createElement(SchemaField, { key: name, name: name, required: _this2.isRequired(name), schema: schema.properties[name], uiSchema: uiSchema[name], errorSchema: errorSchema[name], idSchema: idSchema[name], formData: formData[name], onChange: _this2.onPropertyChange(name), onBlur: onBlur, onFocus: onFocus, registry: registry, disabled: disabled, readonly: readonly }), name: name, readonly: readonly, disabled: disabled, required: required }; }), required: required, idSchema: idSchema, uiSchema: uiSchema, schema: schema, formData: formData, formContext: formContext }; return _react2.default.createElement(Template, templateProps); } }]); return ObjectField; }(_react.Component); ObjectField.defaultProps = { uiSchema: {}, formData: {}, errorSchema: {}, idSchema: {}, required: false, disabled: false, readonly: false }; if (process.env.NODE_ENV !== "production") { ObjectField.propTypes = { schema: _propTypes2.default.object.isRequired, uiSchema: _propTypes2.default.object, errorSchema: _propTypes2.default.object, idSchema: _propTypes2.default.object, onChange: _propTypes2.default.func.isRequired, formData: _propTypes2.default.object, required: _propTypes2.default.bool, disabled: _propTypes2.default.bool, readonly: _propTypes2.default.bool, registry: _propTypes2.default.shape({ widgets: _propTypes2.default.objectOf(_propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.object])).isRequired, fields: _propTypes2.default.objectOf(_propTypes2.default.func).isRequired, definitions: _propTypes2.default.object.isRequired, formContext: _propTypes2.default.object.isRequired }) }; } exports.default = ObjectField; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3870 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _utils = __webpack_require__(66); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function StringField(props) { var schema = props.schema, name = props.name, uiSchema = props.uiSchema, idSchema = props.idSchema, formData = props.formData, required = props.required, disabled = props.disabled, readonly = props.readonly, autofocus = props.autofocus, onChange = props.onChange, onBlur = props.onBlur, onFocus = props.onFocus, _props$registry = props.registry, registry = _props$registry === undefined ? (0, _utils.getDefaultRegistry)() : _props$registry; var title = schema.title, format = schema.format; var widgets = registry.widgets, formContext = registry.formContext; var enumOptions = (0, _utils.isSelect)(schema) && (0, _utils.optionsList)(schema); var defaultWidget = format || (enumOptions ? "select" : "text"); var _getUiOptions = (0, _utils.getUiOptions)(uiSchema), _getUiOptions$widget = _getUiOptions.widget, widget = _getUiOptions$widget === undefined ? defaultWidget : _getUiOptions$widget, _getUiOptions$placeho = _getUiOptions.placeholder, placeholder = _getUiOptions$placeho === undefined ? "" : _getUiOptions$placeho, options = _objectWithoutProperties(_getUiOptions, ["widget", "placeholder"]); var Widget = (0, _utils.getWidget)(schema, widget, widgets); return _react2.default.createElement(Widget, { options: _extends({}, options, { enumOptions: enumOptions }), schema: schema, id: idSchema && idSchema.$id, label: title === undefined ? name : title, value: formData, onChange: onChange, onBlur: onBlur, onFocus: onFocus, required: required, disabled: disabled, readonly: readonly, formContext: formContext, autofocus: autofocus, registry: registry, placeholder: placeholder }); } if (process.env.NODE_ENV !== "production") { StringField.propTypes = { schema: _propTypes2.default.object.isRequired, uiSchema: _propTypes2.default.object.isRequired, idSchema: _propTypes2.default.object, onChange: _propTypes2.default.func.isRequired, onBlur: _propTypes2.default.func, onFocus: _propTypes2.default.func, formData: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]), registry: _propTypes2.default.shape({ widgets: _propTypes2.default.objectOf(_propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.object])).isRequired, fields: _propTypes2.default.objectOf(_propTypes2.default.func).isRequired, definitions: _propTypes2.default.object.isRequired, formContext: _propTypes2.default.object.isRequired }), formContext: _propTypes2.default.object.isRequired, required: _propTypes2.default.bool, disabled: _propTypes2.default.bool, readonly: _propTypes2.default.bool, autofocus: _propTypes2.default.bool }; } StringField.defaultProps = { uiSchema: {}, disabled: false, readonly: false, autofocus: false }; exports.default = StringField; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3871 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _AltDateWidget = __webpack_require__(3872); var _AltDateWidget2 = _interopRequireDefault(_AltDateWidget); var _AltDateTimeWidget = __webpack_require__(3873); var _AltDateTimeWidget2 = _interopRequireDefault(_AltDateTimeWidget); var _BaseInput = __webpack_require__(3874); var _BaseInput2 = _interopRequireDefault(_BaseInput); var _CheckboxWidget = __webpack_require__(3875); var _CheckboxWidget2 = _interopRequireDefault(_CheckboxWidget); var _CheckboxesWidget = __webpack_require__(3876); var _CheckboxesWidget2 = _interopRequireDefault(_CheckboxesWidget); var _ColorWidget = __webpack_require__(3877); var _ColorWidget2 = _interopRequireDefault(_ColorWidget); var _DateWidget = __webpack_require__(3878); var _DateWidget2 = _interopRequireDefault(_DateWidget); var _DateTimeWidget = __webpack_require__(3879); var _DateTimeWidget2 = _interopRequireDefault(_DateTimeWidget); var _EmailWidget = __webpack_require__(3880); var _EmailWidget2 = _interopRequireDefault(_EmailWidget); var _FileWidget = __webpack_require__(3881); var _FileWidget2 = _interopRequireDefault(_FileWidget); var _HiddenWidget = __webpack_require__(3882); var _HiddenWidget2 = _interopRequireDefault(_HiddenWidget); var _PasswordWidget = __webpack_require__(3883); var _PasswordWidget2 = _interopRequireDefault(_PasswordWidget); var _RadioWidget = __webpack_require__(1549); var _RadioWidget2 = _interopRequireDefault(_RadioWidget); var _RangeWidget = __webpack_require__(3884); var _RangeWidget2 = _interopRequireDefault(_RangeWidget); var _SelectWidget = __webpack_require__(873); var _SelectWidget2 = _interopRequireDefault(_SelectWidget); var _TextareaWidget = __webpack_require__(1550); var _TextareaWidget2 = _interopRequireDefault(_TextareaWidget); var _TextWidget = __webpack_require__(1551); var _TextWidget2 = _interopRequireDefault(_TextWidget); var _URLWidget = __webpack_require__(3885); var _URLWidget2 = _interopRequireDefault(_URLWidget); var _UpDownWidget = __webpack_require__(3886); var _UpDownWidget2 = _interopRequireDefault(_UpDownWidget); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = { BaseInput: _BaseInput2.default, PasswordWidget: _PasswordWidget2.default, RadioWidget: _RadioWidget2.default, UpDownWidget: _UpDownWidget2.default, RangeWidget: _RangeWidget2.default, SelectWidget: _SelectWidget2.default, TextWidget: _TextWidget2.default, DateWidget: _DateWidget2.default, DateTimeWidget: _DateTimeWidget2.default, AltDateWidget: _AltDateWidget2.default, AltDateTimeWidget: _AltDateTimeWidget2.default, EmailWidget: _EmailWidget2.default, URLWidget: _URLWidget2.default, TextareaWidget: _TextareaWidget2.default, HiddenWidget: _HiddenWidget2.default, ColorWidget: _ColorWidget2.default, FileWidget: _FileWidget2.default, CheckboxWidget: _CheckboxWidget2.default, CheckboxesWidget: _CheckboxesWidget2.default }; /***/ }), /* 3872 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _utils = __webpack_require__(66); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function rangeOptions(start, stop) { var options = []; for (var i = start; i <= stop; i++) { options.push({ value: i, label: (0, _utils.pad)(i, 2) }); } return options; } function readyForChange(state) { return Object.keys(state).every(function (key) { return state[key] !== -1; }); } function DateElement(props) { var type = props.type, range = props.range, value = props.value, select = props.select, rootId = props.rootId, disabled = props.disabled, readonly = props.readonly, autofocus = props.autofocus, registry = props.registry, onBlur = props.onBlur; var id = rootId + "_" + type; var SelectWidget = registry.widgets.SelectWidget; return _react2.default.createElement(SelectWidget, { schema: { type: "integer" }, id: id, className: "form-control", options: { enumOptions: rangeOptions(range[0], range[1]) }, placeholder: type, value: value, disabled: disabled, readonly: readonly, autofocus: autofocus, onChange: function onChange(value) { return select(type, value); }, onBlur: onBlur }); } var AltDateWidget = function (_Component) { _inherits(AltDateWidget, _Component); function AltDateWidget(props) { _classCallCheck(this, AltDateWidget); var _this = _possibleConstructorReturn(this, (AltDateWidget.__proto__ || Object.getPrototypeOf(AltDateWidget)).call(this, props)); _this.onChange = function (property, value) { _this.setState(_defineProperty({}, property, typeof value === "undefined" ? -1 : value), function () { // Only propagate to parent state if we have a complete date{time} if (readyForChange(_this.state)) { _this.props.onChange((0, _utils.toDateString)(_this.state, _this.props.time)); } }); }; _this.setNow = function (event) { event.preventDefault(); var _this$props = _this.props, time = _this$props.time, disabled = _this$props.disabled, readonly = _this$props.readonly, onChange = _this$props.onChange; if (disabled || readonly) { return; } var nowDateObj = (0, _utils.parseDateString)(new Date().toJSON(), time); _this.setState(nowDateObj, function () { return onChange((0, _utils.toDateString)(_this.state, time)); }); }; _this.clear = function (event) { event.preventDefault(); var _this$props2 = _this.props, time = _this$props2.time, disabled = _this$props2.disabled, readonly = _this$props2.readonly, onChange = _this$props2.onChange; if (disabled || readonly) { return; } _this.setState((0, _utils.parseDateString)("", time), function () { return onChange(undefined); }); }; _this.state = (0, _utils.parseDateString)(props.value, props.time); return _this; } _createClass(AltDateWidget, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState((0, _utils.parseDateString)(nextProps.value, nextProps.time)); } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState) { return (0, _utils.shouldRender)(this, nextProps, nextState); } }, { key: "render", value: function render() { var _this2 = this; var _props = this.props, id = _props.id, disabled = _props.disabled, readonly = _props.readonly, autofocus = _props.autofocus, registry = _props.registry, onBlur = _props.onBlur; return _react2.default.createElement( "ul", { className: "list-inline" }, this.dateElementProps.map(function (elemProps, i) { return _react2.default.createElement( "li", { key: i }, _react2.default.createElement(DateElement, _extends({ rootId: id, select: _this2.onChange }, elemProps, { disabled: disabled, readonly: readonly, registry: registry, onBlur: onBlur, autofocus: autofocus && i === 0 })) ); }), _react2.default.createElement( "li", null, _react2.default.createElement( "a", { href: "#", className: "btn btn-info btn-now", onClick: this.setNow }, "Now" ) ), _react2.default.createElement( "li", null, _react2.default.createElement( "a", { href: "#", className: "btn btn-warning btn-clear", onClick: this.clear }, "Clear" ) ) ); } }, { key: "dateElementProps", get: function get() { var time = this.props.time; var _state = this.state, year = _state.year, month = _state.month, day = _state.day, hour = _state.hour, minute = _state.minute, second = _state.second; var data = [{ type: "year", range: [1900, 2020], value: year }, { type: "month", range: [1, 12], value: month }, { type: "day", range: [1, 31], value: day }]; if (time) { data.push({ type: "hour", range: [0, 23], value: hour }, { type: "minute", range: [0, 59], value: minute }, { type: "second", range: [0, 59], value: second }); } return data; } }]); return AltDateWidget; }(_react.Component); AltDateWidget.defaultProps = { time: false, disabled: false, readonly: false, autofocus: false }; if (process.env.NODE_ENV !== "production") { AltDateWidget.propTypes = { schema: _propTypes2.default.object.isRequired, id: _propTypes2.default.string.isRequired, value: _propTypes2.default.string, required: _propTypes2.default.bool, disabled: _propTypes2.default.bool, readonly: _propTypes2.default.bool, autofocus: _propTypes2.default.bool, onChange: _propTypes2.default.func, onBlur: _propTypes2.default.func, time: _propTypes2.default.bool }; } exports.default = AltDateWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3873 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function AltDateTimeWidget(props) { var AltDateWidget = props.registry.widgets.AltDateWidget; return _react2.default.createElement(AltDateWidget, _extends({ time: true }, props)); } if (process.env.NODE_ENV !== "production") { AltDateTimeWidget.propTypes = { schema: _propTypes2.default.object.isRequired, id: _propTypes2.default.string.isRequired, value: _propTypes2.default.string, required: _propTypes2.default.bool, onChange: _propTypes2.default.func }; } exports.default = AltDateTimeWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3874 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function BaseInput(props) { // Note: since React 15.2.0 we can't forward unknown element attributes, so we // exclude the "options" and "schema" ones here. var value = props.value, readonly = props.readonly, disabled = props.disabled, autofocus = props.autofocus, onBlur = props.onBlur, onFocus = props.onFocus, options = props.options, schema = props.schema, formContext = props.formContext, registry = props.registry, inputProps = _objectWithoutProperties(props, ["value", "readonly", "disabled", "autofocus", "onBlur", "onFocus", "options", "schema", "formContext", "registry"]); inputProps.type = options.inputType || inputProps.type || "text"; var _onChange = function _onChange(_ref) { var value = _ref.target.value; return props.onChange(value === "" ? options.emptyValue : value); }; return _react2.default.createElement("input", _extends({ className: "form-control", readOnly: readonly, disabled: disabled, autoFocus: autofocus, value: value == null ? "" : value }, inputProps, { onChange: _onChange, onBlur: onBlur && function (event) { return onBlur(inputProps.id, event.target.value); }, onFocus: onFocus && function (event) { return onFocus(inputProps.id, event.target.value); } })); } BaseInput.defaultProps = { type: "text", required: false, disabled: false, readonly: false, autofocus: false }; if (process.env.NODE_ENV !== "production") { BaseInput.propTypes = { id: _propTypes2.default.string.isRequired, placeholder: _propTypes2.default.string, value: _propTypes2.default.any, required: _propTypes2.default.bool, disabled: _propTypes2.default.bool, readonly: _propTypes2.default.bool, autofocus: _propTypes2.default.bool, onChange: _propTypes2.default.func, onBlur: _propTypes2.default.func, onFocus: _propTypes2.default.func }; } exports.default = BaseInput; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3875 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _DescriptionField = __webpack_require__(1546); var _DescriptionField2 = _interopRequireDefault(_DescriptionField); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function CheckboxWidget(props) { var schema = props.schema, id = props.id, value = props.value, required = props.required, disabled = props.disabled, readonly = props.readonly, label = props.label, autofocus = props.autofocus, _onChange = props.onChange; return _react2.default.createElement( "div", { className: "checkbox " + (disabled || readonly ? "disabled" : "") }, schema.description && _react2.default.createElement(_DescriptionField2.default, { description: schema.description }), _react2.default.createElement( "label", null, _react2.default.createElement("input", { type: "checkbox", id: id, checked: typeof value === "undefined" ? false : value, required: required, disabled: disabled || readonly, autoFocus: autofocus, onChange: function onChange(event) { return _onChange(event.target.checked); } }), _react2.default.createElement( "span", null, label ) ) ); } CheckboxWidget.defaultProps = { autofocus: false }; if (process.env.NODE_ENV !== "production") { CheckboxWidget.propTypes = { schema: _propTypes2.default.object.isRequired, id: _propTypes2.default.string.isRequired, value: _propTypes2.default.bool, required: _propTypes2.default.bool, disabled: _propTypes2.default.bool, readonly: _propTypes2.default.bool, autofocus: _propTypes2.default.bool, onChange: _propTypes2.default.func }; } exports.default = CheckboxWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3876 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function selectValue(value, selected, all) { var at = all.indexOf(value); var updated = selected.slice(0, at).concat(value, selected.slice(at)); // As inserting values at predefined index positions doesn't work with empty // arrays, we need to reorder the updated selection to match the initial order return updated.sort(function (a, b) { return all.indexOf(a) > all.indexOf(b); }); } function deselectValue(value, selected) { return selected.filter(function (v) { return v !== value; }); } function CheckboxesWidget(props) { var id = props.id, disabled = props.disabled, options = props.options, value = props.value, autofocus = props.autofocus, readonly = props.readonly, _onChange = props.onChange; var enumOptions = options.enumOptions, inline = options.inline; return _react2.default.createElement( "div", { className: "checkboxes", id: id }, enumOptions.map(function (option, index) { var checked = value.indexOf(option.value) !== -1; var disabledCls = disabled || readonly ? "disabled" : ""; var checkbox = _react2.default.createElement( "span", null, _react2.default.createElement("input", { type: "checkbox", id: id + "_" + index, checked: checked, disabled: disabled || readonly, autoFocus: autofocus && index === 0, onChange: function onChange(event) { var all = enumOptions.map(function (_ref) { var value = _ref.value; return value; }); if (event.target.checked) { _onChange(selectValue(option.value, value, all)); } else { _onChange(deselectValue(option.value, value)); } } }), _react2.default.createElement( "span", null, option.label ) ); return inline ? _react2.default.createElement( "label", { key: index, className: "checkbox-inline " + disabledCls }, checkbox ) : _react2.default.createElement( "div", { key: index, className: "checkbox " + disabledCls }, _react2.default.createElement( "label", null, checkbox ) ); }) ); } CheckboxesWidget.defaultProps = { autofocus: false, options: { inline: false } }; if (process.env.NODE_ENV !== "production") { CheckboxesWidget.propTypes = { schema: _propTypes2.default.object.isRequired, id: _propTypes2.default.string.isRequired, options: _propTypes2.default.shape({ enumOptions: _propTypes2.default.array, inline: _propTypes2.default.bool }).isRequired, value: _propTypes2.default.any, required: _propTypes2.default.bool, readonly: _propTypes2.default.bool, disabled: _propTypes2.default.bool, multiple: _propTypes2.default.bool, autofocus: _propTypes2.default.bool, onChange: _propTypes2.default.func }; } exports.default = CheckboxesWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3877 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function ColorWidget(props) { var disabled = props.disabled, readonly = props.readonly, BaseInput = props.registry.widgets.BaseInput; return _react2.default.createElement(BaseInput, _extends({ type: "color" }, props, { disabled: disabled || readonly })); } if (process.env.NODE_ENV !== "production") { ColorWidget.propTypes = { schema: _propTypes2.default.object.isRequired, id: _propTypes2.default.string.isRequired, value: _propTypes2.default.string, required: _propTypes2.default.bool, disabled: _propTypes2.default.bool, readonly: _propTypes2.default.bool, autofocus: _propTypes2.default.bool, onChange: _propTypes2.default.func }; } exports.default = ColorWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3878 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function DateWidget(props) { var _onChange = props.onChange, BaseInput = props.registry.widgets.BaseInput; return _react2.default.createElement(BaseInput, _extends({ type: "date" }, props, { onChange: function onChange(value) { return _onChange(value || undefined); } })); } if (process.env.NODE_ENV !== "production") { DateWidget.propTypes = { value: _propTypes2.default.string }; } exports.default = DateWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3879 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function fromJSONDate(jsonDate) { return jsonDate ? jsonDate.slice(0, 19) : ""; } function toJSONDate(dateString) { if (dateString) { return new Date(dateString).toJSON(); } } function DateTimeWidget(props) { var value = props.value, _onChange = props.onChange, BaseInput = props.registry.widgets.BaseInput; return _react2.default.createElement(BaseInput, _extends({ type: "datetime-local" }, props, { value: fromJSONDate(value), onChange: function onChange(value) { return _onChange(toJSONDate(value)); } })); } if (process.env.NODE_ENV !== "production") { DateTimeWidget.propTypes = { value: _propTypes2.default.string }; } exports.default = DateTimeWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3880 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function EmailWidget(props) { var BaseInput = props.registry.widgets.BaseInput; return _react2.default.createElement(BaseInput, _extends({ type: "email" }, props)); } if (process.env.NODE_ENV !== "production") { EmailWidget.propTypes = { value: _propTypes2.default.string }; } exports.default = EmailWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3881 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _utils = __webpack_require__(66); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function addNameToDataURL(dataURL, name) { return dataURL.replace(";base64", ";name=" + name + ";base64"); } function processFile(file) { var name = file.name, size = file.size, type = file.type; return new Promise(function (resolve, reject) { var reader = new window.FileReader(); reader.onload = function (event) { resolve({ dataURL: addNameToDataURL(event.target.result, name), name: name, size: size, type: type }); }; reader.readAsDataURL(file); }); } function processFiles(files) { return Promise.all([].map.call(files, processFile)); } function FilesInfo(props) { var filesInfo = props.filesInfo; if (filesInfo.length === 0) { return null; } return _react2.default.createElement( "ul", { className: "file-info" }, filesInfo.map(function (fileInfo, key) { var name = fileInfo.name, size = fileInfo.size, type = fileInfo.type; return _react2.default.createElement( "li", { key: key }, _react2.default.createElement( "strong", null, name ), " (", type, ", ", size, " bytes)" ); }) ); } function extractFileInfo(dataURLs) { return dataURLs.filter(function (dataURL) { return typeof dataURL !== "undefined"; }).map(function (dataURL) { var _dataURItoBlob = (0, _utils.dataURItoBlob)(dataURL), blob = _dataURItoBlob.blob, name = _dataURItoBlob.name; return { name: name, size: blob.size, type: blob.type }; }); } var FileWidget = function (_Component) { _inherits(FileWidget, _Component); function FileWidget(props) { _classCallCheck(this, FileWidget); var _this = _possibleConstructorReturn(this, (FileWidget.__proto__ || Object.getPrototypeOf(FileWidget)).call(this, props)); _this.defaultProps = { multiple: false }; _this.onChange = function (event) { var _this$props = _this.props, multiple = _this$props.multiple, onChange = _this$props.onChange; processFiles(event.target.files).then(function (filesInfo) { var state = { values: filesInfo.map(function (fileInfo) { return fileInfo.dataURL; }), filesInfo: filesInfo }; (0, _utils.setState)(_this, state, function () { if (multiple) { onChange(state.values); } else { onChange(state.values[0]); } }); }); }; var value = props.value; var values = Array.isArray(value) ? value : [value]; _this.state = { values: values, filesInfo: extractFileInfo(values) }; return _this; } _createClass(FileWidget, [{ key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState) { return (0, _utils.shouldRender)(this, nextProps, nextState); } }, { key: "render", value: function render() { var _this2 = this; var _props = this.props, multiple = _props.multiple, id = _props.id, readonly = _props.readonly, disabled = _props.disabled, autofocus = _props.autofocus; var filesInfo = this.state.filesInfo; return _react2.default.createElement( "div", null, _react2.default.createElement( "p", null, _react2.default.createElement("input", { ref: function ref(_ref) { return _this2.inputRef = _ref; }, id: id, type: "file", disabled: readonly || disabled, onChange: this.onChange, defaultValue: "", autoFocus: autofocus, multiple: multiple }) ), _react2.default.createElement(FilesInfo, { filesInfo: filesInfo }) ); } }]); return FileWidget; }(_react.Component); FileWidget.defaultProps = { autofocus: false }; if (process.env.NODE_ENV !== "production") { FileWidget.propTypes = { multiple: _propTypes2.default.bool, value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.arrayOf(_propTypes2.default.string)]), autofocus: _propTypes2.default.bool }; } exports.default = FileWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3882 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function HiddenWidget(_ref) { var id = _ref.id, value = _ref.value; return _react2.default.createElement("input", { type: "hidden", id: id, value: typeof value === "undefined" ? "" : value }); } if (process.env.NODE_ENV !== "production") { HiddenWidget.propTypes = { id: _propTypes2.default.string.isRequired, value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number, _propTypes2.default.bool]) }; } exports.default = HiddenWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3883 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function PasswordWidget(props) { var BaseInput = props.registry.widgets.BaseInput; return _react2.default.createElement(BaseInput, _extends({ type: "password" }, props)); } if (process.env.NODE_ENV !== "production") { PasswordWidget.propTypes = { value: _propTypes2.default.string }; } exports.default = PasswordWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3884 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _utils = __webpack_require__(66); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function RangeWidget(props) { var schema = props.schema, value = props.value, BaseInput = props.registry.widgets.BaseInput; return _react2.default.createElement( "div", { className: "field-range-wrapper" }, _react2.default.createElement(BaseInput, _extends({ type: "range" }, props, (0, _utils.rangeSpec)(schema))), _react2.default.createElement( "span", { className: "range-view" }, value ) ); } if (process.env.NODE_ENV !== "production") { RangeWidget.propTypes = { value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]) }; } exports.default = RangeWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3885 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function URLWidget(props) { var BaseInput = props.registry.widgets.BaseInput; return _react2.default.createElement(BaseInput, _extends({ type: "url" }, props)); } if (process.env.NODE_ENV !== "production") { URLWidget.propTypes = { value: _propTypes2.default.string }; } exports.default = URLWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3886 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); 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; }; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(11); var _propTypes2 = _interopRequireDefault(_propTypes); var _utils = __webpack_require__(66); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function UpDownWidget(props) { var BaseInput = props.registry.widgets.BaseInput; return _react2.default.createElement(BaseInput, _extends({ type: "number" }, props, (0, _utils.rangeSpec)(props.schema))); } if (process.env.NODE_ENV !== "production") { UpDownWidget.propTypes = { value: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]) }; } exports.default = UpDownWidget; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3887 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _Icon = _interopRequireDefault(__webpack_require__(19)); var _utils = __webpack_require__(66); var _ArrayFieldTemplate = _interopRequireDefault(__webpack_require__(1553)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function createCollapsibleFieldset(title) { var CollapsibleFieldset = /*#__PURE__*/function (_React$Component) { _inherits(CollapsibleFieldset, _React$Component); var _super = _createSuper(CollapsibleFieldset); function CollapsibleFieldset(props) { var _this; _classCallCheck(this, CollapsibleFieldset); _this = _super.call(this, props); _defineProperty(_assertThisInitialized(_this), "onPropertyChange", function (name) { return function (value, options) { var newFormData = _objectSpread(_objectSpread({}, _this.props.formData), {}, _defineProperty({}, name, value)); _this.props.onChange(newFormData, options); }; }); _this.toggle = _this.toggle.bind(_assertThisInitialized(_this)); _this.state = { toggled: false }; return _this; } _createClass(CollapsibleFieldset, [{ key: "isRequired", value: function isRequired(name) { var schema = this.props.schema; return Array.isArray(schema.required) && schema.required.indexOf(name) !== -1; } }, { key: "toggle", value: function toggle(event) { event.stopPropagation(); event.preventDefault(); var newFormData = _objectSpread(_objectSpread({}, this.props.formData), {}, { isClosed: !this.props.formData.isClosed }); this.props.onChange(newFormData); } }, { key: "render", value: function render() { var _this2 = this; var _this$props = this.props, uiSchema = _this$props.uiSchema, formData = _this$props.formData, errorSchema = _this$props.errorSchema, idSchema = _this$props.idSchema, name = _this$props.name, required = _this$props.required, disabled = _this$props.disabled, readonly = _this$props.readonly, onBlur = _this$props.onBlur, registry = _this$props.registry; var definitions = registry.definitions, fields = registry.fields, formContext = registry.formContext; var SchemaField = fields.SchemaField, TitleField = fields.TitleField, DescriptionField = fields.DescriptionField; var schema = (0, _utils.retrieveSchema)(this.props.schema, definitions); var orderedProperties; try { var properties = Object.keys(schema.properties); orderedProperties = (0, _utils.orderProperties)(properties, uiSchema['ui:order']); } catch (err) { return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", { className: "config-error", style: { color: 'red' } }, "Invalid ", name || 'root', " object field configuration:", /*#__PURE__*/_react["default"].createElement("em", null, err.message), "."), /*#__PURE__*/_react["default"].createElement("pre", null, JSON.stringify(schema))); } var iconTransform = !formData.isClosed ? 'flip-vertical' : ''; return /*#__PURE__*/_react["default"].createElement("fieldset", { className: "".concat(_ArrayFieldTemplate["default"].collapsible) }, /*#__PURE__*/_react["default"].createElement("div", { onDoubleClick: this.toggle, id: "".concat(idSchema.$id, "__title_bar"), role: "button" }, title && /*#__PURE__*/_react["default"].createElement("div", { onClick: this.toggle, id: "".concat(idSchema.$id, "__title_wrapper"), role: "button" }, /*#__PURE__*/_react["default"].createElement(TitleField, { id: "".concat(idSchema.$id, "__title"), title: title(formData, uiSchema), required: required, formContext: formContext }), /*#__PURE__*/_react["default"].createElement("button", { onClick: this.toggle, id: "".concat(idSchema.$id, "__collapse"), title: "Collapse", type: "button", className: "toggle" }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], { name: "talend-caret-down", transform: iconTransform })))), (uiSchema['ui:description'] || schema.description) && /*#__PURE__*/_react["default"].createElement(DescriptionField, { id: "".concat(idSchema.$id, "__description"), description: uiSchema['ui:description'] || schema.description, formContext: formContext }), orderedProperties.map(function (fieldName, index) { if (fieldName !== 'isClosed') { return /*#__PURE__*/_react["default"].createElement(SchemaField, { key: index, name: fieldName, required: _this2.isRequired(fieldName), schema: schema.properties[fieldName], uiSchema: uiSchema[fieldName], errorSchema: errorSchema[fieldName], idSchema: idSchema[fieldName], formData: formData[fieldName], onChange: _this2.onPropertyChange(fieldName), onBlur: onBlur, registry: registry, disabled: disabled, readonly: readonly }); } return null; })); } }]); return CollapsibleFieldset; }(_react["default"].Component); _defineProperty(CollapsibleFieldset, "defaultProps", { uiSchema: {}, formData: {}, errorSchema: {}, idSchema: {}, required: false, disabled: false, readonly: false }); if (process.env.NODE_ENV !== 'production') { CollapsibleFieldset.propTypes = { schema: _propTypes["default"].object.isRequired, // eslint-disable-line react/forbid-prop-types uiSchema: _propTypes["default"].object, // eslint-disable-line react/forbid-prop-types errorSchema: _propTypes["default"].object, // eslint-disable-line react/forbid-prop-types idSchema: _propTypes["default"].object, // eslint-disable-line react/forbid-prop-types formData: _propTypes["default"].object, // eslint-disable-line react/forbid-prop-types onChange: _propTypes["default"].func.isRequired, onBlur: _propTypes["default"].func, required: _propTypes["default"].bool, disabled: _propTypes["default"].bool, name: _propTypes["default"].string, readonly: _propTypes["default"].bool, registry: _propTypes["default"].shape({ widgets: _propTypes["default"].objectOf(_propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].object])).isRequired, fields: _propTypes["default"].objectOf(_propTypes["default"].func).isRequired, definitions: _propTypes["default"].object.isRequired, formContext: _propTypes["default"].object.isRequired }) }; } return CollapsibleFieldset; } var _default = createCollapsibleFieldset; exports["default"] = _default; //# sourceMappingURL=CollapsibleFieldset.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3888 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ArrayFieldTemplate = _interopRequireDefault(__webpack_require__(3889)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(1555)); var _LabelTemplate = _interopRequireDefault(__webpack_require__(1556)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = { ArrayFieldTemplate: _ArrayFieldTemplate["default"], FieldTemplate: _FieldTemplate["default"], LabelTemplate: _LabelTemplate["default"] }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 3889 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _Icon = _interopRequireDefault(__webpack_require__(19)); var _IconsProvider = _interopRequireDefault(__webpack_require__(698)); var _reactI18next = __webpack_require__(10); var _constants = __webpack_require__(73); __webpack_require__(116); var _ArrayFieldTemplate = _interopRequireDefault(__webpack_require__(1553)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function FieldTemplate(_ref) { var element = _ref.element, index = _ref.index, cantDelete = _ref.cantDelete, t = _ref.t; var elementClasses = (0, _classnames["default"])(_ArrayFieldTemplate["default"].element, element.itemData.isClosed && _ArrayFieldTemplate["default"].closed); return /*#__PURE__*/_react["default"].createElement("div", { className: (0, _classnames["default"])(_ArrayFieldTemplate["default"].arrayElement, 'arrayElement', "arrayElement-".concat(index)) }, /*#__PURE__*/_react["default"].createElement("div", { className: _ArrayFieldTemplate["default"].control }, /*#__PURE__*/_react["default"].createElement("button", { type: "button", name: "btn-move-element-up-".concat(element.index), disabled: !element.hasMoveUp, onClick: element.onReorderClick(element.index, element.index - 1), title: t('ARRAY_FIELD_TEMPLATE_ACTION_MOVE_UP', { defaultValue: 'Move Up' }) }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], { name: "talend-arrow-left", transform: "rotate-90" })), /*#__PURE__*/_react["default"].createElement("button", { type: "button", name: "btn-move-element-down-".concat(element.index), disabled: !element.hasMoveDown, onClick: element.onReorderClick(element.index, element.index + 1), title: t('ARRAY_FIELD_TEMPLATE_ACTION_MOVE_DOWN', { defaultValue: 'Move Down' }) }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], { name: "talend-arrow-left", transform: "rotate-270" }))), /*#__PURE__*/_react["default"].createElement("div", { className: elementClasses }, element.children), /*#__PURE__*/_react["default"].createElement("div", { className: _ArrayFieldTemplate["default"].control }, /*#__PURE__*/_react["default"].createElement("button", { type: "button", name: "btn-delete-element-".concat(element.index), disabled: cantDelete, className: _ArrayFieldTemplate["default"]["delete"], onClick: element.onDropIndexClick(element.index), title: t('ARRAY_FIELD_TEMPLATE_ACTION_DELETE', { defaultValue: 'Delete' }) }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], { name: "talend-cross" })))); } if (process.env.NODE_ENV !== 'production') { FieldTemplate.propTypes = { element: _propTypes["default"].object.isRequired, // eslint-disable-line react/forbid-prop-types index: _propTypes["default"].number.isRequired, cantDelete: _propTypes["default"].bool.isRequired, t: _propTypes["default"].func.isRequired }; } function ArrayFieldTemplate(props) { var items = props.items, canAdd = props.canAdd, onAddClick = props.onAddClick, minItems = props.minItems, maxItems = props.maxItems, title = props.title, t = props.t; var addBtnClass = (0, _classnames["default"])(_ArrayFieldTemplate["default"].addBtn, 'btn', 'btn-info'); return /*#__PURE__*/_react["default"].createElement("fieldset", { className: "".concat(_ArrayFieldTemplate["default"].ArrayFieldTemplate, " ArrayFieldTemplate"), "data-content": title }, title && /*#__PURE__*/_react["default"].createElement("legend", null, title), /*#__PURE__*/_react["default"].createElement(_IconsProvider["default"], null), canAdd && /*#__PURE__*/_react["default"].createElement("button", { className: addBtnClass, type: "button", name: "btn-new-element", disabled: items.length >= maxItems, onClick: onAddClick }, t('ARRAY_FIELD_TEMPLATE_ACTION_NEW_ELEMENT', { defaultValue: 'NEW {{element}}', element: props.type })), items && items.map(function (element, index) { return /*#__PURE__*/_react["default"].createElement(FieldTemplate, { key: index, index: index, element: element, cantDelete: items.length <= minItems, t: t }); })); } if (process.env.NODE_ENV !== 'production') { ArrayFieldTemplate.propTypes = { type: _propTypes["default"].string.isRequired, title: _propTypes["default"].string, items: _propTypes["default"].arrayOf(_propTypes["default"].object).isRequired, canAdd: _propTypes["default"].func.isRequired, onAddClick: _propTypes["default"].func.isRequired, minItems: _propTypes["default"].number.isRequired, maxItems: _propTypes["default"].number.isRequired, t: _propTypes["default"].func.isRequired }; } var _default = (0, _reactI18next.withTranslation)(_constants.I18N_DOMAIN_FORMS)(ArrayFieldTemplate); exports["default"] = _default; //# sourceMappingURL=ArrayFieldTemplate.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3890 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _CodeWidget = _interopRequireDefault(__webpack_require__(1557)); var _ColumnsWidget = _interopRequireDefault(__webpack_require__(1558)); var _DatalistWidget = _interopRequireDefault(__webpack_require__(1559)); var _EnumerationWidget = _interopRequireDefault(__webpack_require__(3929)); var _KeyValueWidget = _interopRequireDefault(__webpack_require__(1569)); var _ListViewWidget = _interopRequireDefault(__webpack_require__(3933)); var _MultiSelectTagWidget = _interopRequireDefault(__webpack_require__(3936)); var _RadioOrSelectWidget = _interopRequireDefault(__webpack_require__(3938)); var _TabsWidget = _interopRequireDefault(__webpack_require__(1572)); var _ToggleWidget = _interopRequireDefault(__webpack_require__(1596)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = { CodeWidget: _CodeWidget["default"], ColumnsWidget: _ColumnsWidget["default"], DatalistWidget: _DatalistWidget["default"], EnumerationWidget: _EnumerationWidget["default"], KeyValueWidget: _KeyValueWidget["default"], ListViewWidget: _ListViewWidget["default"], MultiSelectTagWidget: _MultiSelectTagWidget["default"], RadioOrSelectWidget: _RadioOrSelectWidget["default"], TabsWidget: _TabsWidget["default"], ToggleWidget: _ToggleWidget["default"] }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 3891 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _TextareaWidget = _interopRequireDefault(__webpack_require__(1550)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var CodeWidget; // eslint-disable-line import/no-mutable-exports try { // eslint-disable-next-line import/no-extraneous-dependencies, global-require var AceEditor = __webpack_require__(635)["default"]; var SET_OPTIONS = { enableBasicAutocompletion: true, enableLiveAutocompletion: true, enableSnippets: true }; var AceCodeWidget = /*#__PURE__*/function (_React$Component) { _inherits(AceCodeWidget, _React$Component); var _super = _createSuper(AceCodeWidget); function AceCodeWidget(props) { var _this; _classCallCheck(this, AceCodeWidget); _this = _super.call(this, props); _this.onChange = _this.onChange.bind(_assertThisInitialized(_this)); _this.onLoad = _this.onLoad.bind(_assertThisInitialized(_this)); return _this; } _createClass(AceCodeWidget, [{ key: "onChange", value: function onChange(value) { if (this.props.onChange) { this.props.onChange(value); } } }, { key: "onLoad", value: function onLoad(event) { if (this.props.formContext.codeWidgetOnLoad) { this.props.formContext.codeWidgetOnLoad(event.env.editor); } } }, { key: "render", value: function render() { var _this$props = this.props, id = _this$props.id, options = _this$props.options, value = _this$props.value, disabled = _this$props.disabled, readonly = _this$props.readonly, autofocus = _this$props.autofocus; // allow override using var contextProps = this.props.formContext && this.props.formContext.codeWidgetProps; var setOptions = SET_OPTIONS; if (contextProps && contextProps.setOptions) { setOptions = _objectSpread(_objectSpread({}, SET_OPTIONS), contextProps.setOptions); delete contextProps.setOptions; } return /*#__PURE__*/_react["default"].createElement(AceEditor, _extends({ className: "tf-widget-code form-control", focus: autofocus || false, name: id, width: "auto", mode: options && options.language, onLoad: this.onLoad, onChange: this.onChange, readOnly: readonly, disabled: disabled, setOptions: setOptions, enableSnippets: true, value: value, theme: "chrome", showGutter: false, showPrintMargin: false }, contextProps, options)); } }]); return AceCodeWidget; }(_react["default"].Component); _defineProperty(AceCodeWidget, "displayName", 'AceCodeWidget'); if (process.env.NODE_ENV !== 'production') { AceCodeWidget.propTypes = { onChange: _propTypes["default"].func, formContext: _propTypes["default"].shape({ codeWidgetProps: _propTypes["default"].object, codeWidgetOnLoad: _propTypes["default"].func }), id: _propTypes["default"].string, options: _propTypes["default"].shape({ language: _propTypes["default"].string }), value: _propTypes["default"].string, disabled: _propTypes["default"].bool, readonly: _propTypes["default"].bool, autofocus: _propTypes["default"].bool }; } CodeWidget = AceCodeWidget; } catch (error) { // Fallback to TextareaWidget // eslint-disable-next-line react/no-multi-comp var TextareaCodeWidget = /*#__PURE__*/function (_React$PureComponent) { _inherits(TextareaCodeWidget, _React$PureComponent); var _super2 = _createSuper(TextareaCodeWidget); function TextareaCodeWidget() { var _this2; _classCallCheck(this, TextareaCodeWidget); _this2 = _super2.call(this); // eslint-disable-next-line no-console console.warn('CodeWidget react-ace not found, fallback to TextareaWidget', _TextareaWidget["default"]); return _this2; } _createClass(TextareaCodeWidget, [{ key: "render", value: function render() { return /*#__PURE__*/_react["default"].createElement(_TextareaWidget["default"], this.props); } }]); return TextareaCodeWidget; }(_react["default"].PureComponent); TextareaCodeWidget.displayName = 'TextareaCodeWidget'; CodeWidget = _TextareaWidget["default"]; } var _default = CodeWidget; exports["default"] = _default; //# sourceMappingURL=CodeWidget.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3892 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _SchemaField = _interopRequireDefault(__webpack_require__(1547)); var _TitleField = _interopRequireDefault(__webpack_require__(1548)); var _ObjectField = _interopRequireDefault(__webpack_require__(536)); var _ColumnsWidget = _interopRequireDefault(__webpack_require__(3893)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function getColumnRenderer(type) { if (type !== 'object') { return _SchemaField["default"]; } return _ObjectField["default"]; } function Column(props) { var Renderer = getColumnRenderer(props.schema.type); return /*#__PURE__*/_react["default"].createElement("div", { className: "".concat(props.className, " ").concat(_ColumnsWidget["default"].column) }, /*#__PURE__*/_react["default"].createElement(Renderer, { schema: props.schema, formData: props.formData, uiSchema: props.uiSchema[props.columnKey], onChange: props.onChange, onBlur: props.onBlur, registry: props.registry, readonly: props.uiSchema['ui:readonly'] })); } if (process.env.NODE_ENV !== 'production') { Column.propTypes = { className: _propTypes["default"].string, columnKey: _propTypes["default"].string.isRequired, schema: _propTypes["default"].object.isRequired, formData: _propTypes["default"].object.isRequired, uiSchema: _propTypes["default"].object.isRequired, onChange: _propTypes["default"].func.isRequired, onBlur: _propTypes["default"].func.isRequired, registry: _SchemaField["default"].propTypes.registry }; } var ColumnsWidget = /*#__PURE__*/function (_React$Component) { _inherits(ColumnsWidget, _React$Component); var _super = _createSuper(ColumnsWidget); function ColumnsWidget(props) { var _this; _classCallCheck(this, ColumnsWidget); _this = _super.call(this, props); _this.onColumnChange = _this.onColumnChange.bind(_assertThisInitialized(_this)); return _this; } _createClass(ColumnsWidget, [{ key: "onColumnChange", value: function onColumnChange(key) { var _this2 = this; return function (value) { _this2.props.onChange(_objectSpread(_objectSpread({}, _this2.props.formData), {}, _defineProperty({}, key, value))); }; } }, { key: "render", value: function render() { var _this3 = this; var _this$props = this.props, name = _this$props.name, schema = _this$props.schema, formData = _this$props.formData, onBlur = _this$props.onBlur, props = _objectWithoutProperties(_this$props, ["name", "schema", "formData", "onBlur"]); return /*#__PURE__*/_react["default"].createElement("div", { className: "tf-widget-columns ".concat(_ColumnsWidget["default"].columns) }, (schema.title || name) && /*#__PURE__*/_react["default"].createElement(_TitleField["default"], { id: "".concat(name, "__title"), title: schema.title || name }), schema.properties ? Object.keys(schema.properties).map(function (key) { return /*#__PURE__*/_react["default"].createElement(Column, _extends({}, props, { key: key, columnKey: key, schema: schema.properties[key], formData: formData[key], onChange: _this3.onColumnChange(key), onBlur: onBlur, className: "tf-column-".concat(key) })); }) : null); } }]); return ColumnsWidget; }(_react["default"].Component); exports["default"] = ColumnsWidget; if (process.env.NODE_ENV !== 'production') { ColumnsWidget.propTypes = { name: _propTypes["default"].string, schema: _propTypes["default"].object.isRequired, formData: _propTypes["default"].object.isRequired, onChange: _propTypes["default"].func.isRequired, onBlur: _propTypes["default"].func.isRequired }; } //# sourceMappingURL=ColumnsWidget.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3893 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"columns":"ColumnsWidget__columns___2m381","column":"ColumnsWidget__column___eDdYX"}; /***/ }), /* 3894 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports.escapeRegexCharacters = escapeRegexCharacters; exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _FormControl = _interopRequireDefault(__webpack_require__(3895)); var _Emphasis = _interopRequireDefault(__webpack_require__(712)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _get = _interopRequireDefault(__webpack_require__(208)); var _reactAutowhatever = _interopRequireDefault(__webpack_require__(1178)); var _keycode = _interopRequireDefault(__webpack_require__(34)); var _DatalistWidget = _interopRequireDefault(__webpack_require__(3928)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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; }; return _extends.apply(this, arguments); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /** * Escape regexp special chars */ function escapeRegexCharacters(str) { return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } /** * Render the datalist suggestion items container * @param props */ function DefaultRenderDatalistItemContainer(_ref) { var containerProps = _ref.containerProps, rest = _objectWithoutProperties(_ref, ["containerProps"]); return /*#__PURE__*/_react["default"].createElement("div", _extends({}, containerProps, rest)); } DefaultRenderDatalistItemContainer.propTypes = { containerProps: _propTypes["default"].object }; /** * Render an empty container */ function DefaultRenderNoMatch() { return /*#__PURE__*/_react["default"].createElement("div", { className: "".concat(_DatalistWidget["default"]['items-container'], " ").concat(_DatalistWidget["default"]['no-result']) }, /*#__PURE__*/_react["default"].createElement("span", null, "No match.")); } /** * Convert a datalist item as a value/label pair if needed */ function getValueLabelPair(item) { if (_typeof(item) === 'object') { return _defineProperty({}, item.value, item.label); } return _defineProperty({}, item, item); } /** * Returns the value/label map from given items */ function getItemsMap(items) { if (!items || !items.length) { return {}; } return items.reduce(function (a, b) { return _extends(a, getValueLabelPair(b)); }, {}); } var dontBlur = false; function itemsContainerClickHandler() { dontBlur = true; setTimeout(function () { dontBlur = false; }); } function renderSectionTitle(section) { return /*#__PURE__*/_react["default"].createElement("div", { className: _DatalistWidget["default"].title }, section.title); } function getSectionItems(section) { return section.items; } /** * Render a typeahead for filtering among a list * @param props */ var DatalistWidget = /*#__PURE__*/function (_React$Component) { _inherits(DatalistWidget, _React$Component); var _super = _createSuper(DatalistWidget); function DatalistWidget(props) { var _this; _classCallCheck(this, DatalistWidget); _this = _super.call(this, props); var value = props.value || ''; _this.state = { value: value, lastKnownValue: value, initialItems: [], items: [], itemIndex: null, noMatch: false, itemsMap: getItemsMap(_this.getItems()), hasFocus: false }; _this.inputProps = { placeholder: props.placeholder, required: props.required, onBlur: function onBlur(event) { return _this.onBlur(event); }, onFocus: function onFocus() { _this.setState({ hasFocus: true }); _this.initSuggestions(_this.state.value); }, onChange: function onChange(event) { return _this.updateSuggestions(event.target.value); }, onKeyDown: function onKeyDown(event, payload) { return _this.onKeyDown(event, payload); } }; _this.itemProps = { onMouseEnter: function onMouseEnter(event, _ref4) { var sectionIndex = _ref4.sectionIndex, itemIndex = _ref4.itemIndex; return _this.focusOnItem(sectionIndex, itemIndex); }, onMouseLeave: function onMouseLeave() { return _this.focusOnItem(); }, onMouseDown: function onMouseDown(event, _ref5) { var sectionIndex = _ref5.sectionIndex, itemIndex = _ref5.itemIndex; return _this.selectItem(sectionIndex, itemIndex); } }; _this.renderDatalistItem = _this.renderDatalistItem.bind(_assertThisInitialized(_this)); _this.renderDatalistInput = _this.renderDatalistInput.bind(_assertThisInitialized(_this)); _this.getDropdownItems = _this.getDropdownItems.bind(_assertThisInitialized(_this)); _this.style = { container: (0, _classnames["default"])('form-control', _DatalistWidget["default"]['tf-typeahead-container'], 'tf-typeahead-container'), containerOpen: _DatalistWidget["default"]['container-open'], highlight: _DatalistWidget["default"]['highlight-match'], input: _DatalistWidget["default"]['typeahead-input'], itemHighlighted: _DatalistWidget["default"]['item-highlighted'], itemsContainer: _DatalistWidget["default"]['items-container'], itemsList: _DatalistWidget["default"].items }; return _this; } _createClass(DatalistWidget, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (nextProps.value !== this.props.value) { this.setValue(nextProps.value); } } }, { key: "onBlur", value: function onBlur(event) { if (dontBlur) { return; } this.setState({ hasFocus: false }); var inputLabel = event.target.value; var _this$props = this.props, options = _this$props.options, onChange = _this$props.onChange; var _this$state = this.state, value = _this$state.value, lastKnownValue = _this$state.lastKnownValue; var inputValue = this.getValue(inputLabel); var isIncluded = this.isPartOfItems(value); if (this.reference && this.reference.itemsContainer) { this.reference.itemsContainer.removeEventListener('mousedown', itemsContainerClickHandler); } if (options.restricted && !isIncluded) { this.resetValue(); if (inputLabel !== this.getLabel(lastKnownValue)) { onChange(undefined); } } else if (!options.restricted || options.restricted && isIncluded) { this.setValue(inputValue); if (inputLabel !== this.getLabel(lastKnownValue)) { onChange(inputValue); } this.resetSuggestions(); } } }, { key: "onKeyDown", value: function onKeyDown(event, _ref6) { var newHighlightedSectionIndex = _ref6.newHighlightedSectionIndex, newHighlightedItemIndex = _ref6.newHighlightedItemIndex, highlightedSectionIndex = _ref6.highlightedSectionIndex, highlightedItemIndex = _ref6.highlightedItemIndex; switch (event.which) { case _keycode["default"].codes.esc: this.resetValue(); event.preventDefault(); break; case _keycode["default"].codes.enter: // could be null in case of no match if (highlightedItemIndex !== null) { this.selectItem(highlightedSectionIndex, highlightedItemIndex); } event.preventDefault(); break; case _keycode["default"].codes.up: case _keycode["default"].codes.down: event.preventDefault(); this.focusOnItem(newHighlightedSectionIndex, newHighlightedItemIndex); break; default: break; } } }, { key: "getLabel", value: function getLabel(value) { var itemsMap = this.state.itemsMap; var hasItems = itemsMap && Object.keys(itemsMap).length; if (hasItems && Object.prototype.hasOwnProperty.call(itemsMap, value)) { return itemsMap[value]; } return value != null ? value : ''; } }, { key: "getValue", value: function getValue(item) { var itemsMap = this.state.itemsMap; var key = Object.keys(itemsMap).find(function (k) { return itemsMap[k] === item; }); if (key != null) { return key; } if (item != null && item.length) { return item; } return undefined; } /** * Filter suggestions * @param suggestions * @param value */ }, { key: "getMatchingSuggestions", value: function getMatchingSuggestions() { var suggestions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var value = arguments.length > 1 ? arguments[1] : undefined; if (!value) { return suggestions; } var escapedValue = escapeRegexCharacters(this.getLabel(value).trim()); var regex = new RegExp(escapedValue, 'i'); return suggestions.filter(function (item) { return regex.test(item.label); }); } }, { key: "setValue", value: function setValue(value) { this.setState({ value: value, lastKnownValue: value }); } }, { key: "getItems", value: function getItems() { var _this$props2 = this.props, options = _this$props2.options, schema = _this$props2.schema, formContext = _this$props2.formContext; if (options && options.enumOptions && options.groupBy) { return options.enumOptions.map(function (item) { return _objectSpread({ value: item.value }, item.label); }); } else if (options && options.enumOptions) { return options.enumOptions; } else if (schema && schema["enum"]) { return schema["enum"].map(function (item) { return { label: item, value: item }; }); } else if (formContext && formContext.fetchItems) { return formContext.fetchItems(schema.title).map(function (item) { return typeof item === 'string' ? { value: item, label: item } : item; }); } return []; } }, { key: "getDropdownItems", value: function getDropdownItems(suggestions) { // options with categories if (this.props.options && this.props.options.groupBy) { var category = this.props.options.groupBy; var categoryMap = suggestions.reduce(function (acc, cur) { var obj = {}; obj[cur[category]] = acc[cur[category]] || []; obj[cur[category]].push({ text: cur.label, value: cur.value }); return _objectSpread(_objectSpread({}, acc), obj); }, {}); return Object.keys(categoryMap).map(function (key) { return { title: key, items: categoryMap[key] }; }); } else if (this.props.options && this.props.options.enumOptions) { return suggestions.map(function (s) { return s.value; }); } else if (this.props.schema && this.props.schema["enum"]) { return suggestions.map(function (s) { return s.value; }); } else if (this.props.formContext && this.props.formContext.fetchItems) { return suggestions.map(function (s) { return s.value; }); } return suggestions; } }, { key: "getSelectedItem", value: function getSelectedItem(sectionIndex, itemIndex) { if (sectionIndex != null) { return this.state.items[sectionIndex].items[itemIndex].value; } return this.state.items[itemIndex]; } }, { key: "isPartOfItems", value: function isPartOfItems(value) { var _this$state2 = this.state, initialItems = _this$state2.initialItems, itemsMap = _this$state2.itemsMap; return initialItems.includes(value) || initialItems.find(function (item) { return item.value === value; }) || Object.keys(itemsMap).some(function (k) { return itemsMap[k] === value; }); } }, { key: "resetValue", value: function resetValue() { this.setValue(''); this.resetSuggestions(); } }, { key: "initSuggestions", value: function initSuggestions(value) { var items = this.getItems(); var itemsMap = getItemsMap(items); var keys = Object.keys(itemsMap); var suggestions = this.getMatchingSuggestions(items, value); if (this.reference && this.reference.itemsContainer) { this.reference.itemsContainer.addEventListener('mousedown', itemsContainerClickHandler); } this.setState({ value: value, initialItems: items, items: this.getDropdownItems(suggestions), sectionIndex: null, itemIndex: null, noMatch: value && keys && !keys.length, itemsMap: itemsMap }); } }, { key: "updateSuggestions", value: function updateSuggestions(value) { var suggestions = this.getMatchingSuggestions(this.state.initialItems, value); if (!value && suggestions && suggestions.length === 0) { suggestions = this.state.initialItems; } this.setState({ value: value, items: this.getDropdownItems(suggestions), sectionIndex: null, itemIndex: null, noMatch: value && suggestions && !suggestions.length }); } }, { key: "resetSuggestions", value: function resetSuggestions() { this.setState({ items: [], sectionIndex: null, itemIndex: null, noMatch: false }); } }, { key: "focusOnItem", value: function focusOnItem(sectionIndex, itemIndex) { this.setState({ sectionIndex: sectionIndex, itemIndex: itemIndex }); } }, { key: "selectItem", value: function selectItem(sectionIndex, itemIndex) { var selectedItem = this.getSelectedItem(sectionIndex, itemIndex); if (selectedItem && selectedItem !== this.state.value) { this.setValue(selectedItem); this.resetSuggestions(); this.props.onChange(selectedItem); } } /** * Render the datalist suggestion item * @param item * @param value */ }, { key: "renderDatalistItem", value: function renderDatalistItem(item, _ref7) { var value = _ref7.value; if (!item) { return null; } return /*#__PURE__*/_react["default"].createElement("div", { className: (0, _classnames["default"])(_DatalistWidget["default"].item, 'datalist-item') }, /*#__PURE__*/_react["default"].createElement(_Emphasis["default"], { value: this.getLabel(value), text: this.getLabel(item) })); } /** * Render the datalist input * @param props */ }, { key: "renderDatalistInput", value: function renderDatalistInput(props) { return /*#__PURE__*/_react["default"].createElement("div", { className: _DatalistWidget["default"]['typeahead-input-icon'] }, /*#__PURE__*/_react["default"].createElement(_FormControl["default"], _extends({}, props, { value: this.getLabel(props.value) })), /*#__PURE__*/_react["default"].createElement("div", { className: _DatalistWidget["default"]['dropdown-toggle'] }, /*#__PURE__*/_react["default"].createElement("span", { className: "caret" }))); } }, { key: "render", value: function render() { var _this2 = this; var renderItemsContainer; var value = this.state.value; var renderItemData = { value: value }; var renderNoMatch = this.props.renderNoMatch || DefaultRenderNoMatch; this.inputProps.value = value; if (this.state.noMatch) { renderItemsContainer = renderNoMatch; } else if ((0, _get["default"])(this.state, 'initialItems.length') === 0 && this.state.hasFocus && this.props.renderEmptyList) { renderItemsContainer = this.props.renderEmptyList; } else if (this.props.renderItemsContainer) { renderItemsContainer = this.props.renderItemsContainer; } else { renderItemsContainer = DefaultRenderDatalistItemContainer; } var props = { id: this.props.id, items: this.state.items, renderItem: this.renderDatalistItem, inputProps: this.inputProps, theme: this.style, renderItemData: renderItemData, renderInputComponent: this.renderDatalistInput, renderItemsContainer: renderItemsContainer, itemProps: this.itemProps, highlightedItemIndex: this.state.itemIndex, ref: function ref(_ref8) { _this2.reference = _ref8; } }; var propsWithCategory = _objectSpread(_objectSpread({}, props), {}, { multiSection: true, renderSectionTitle: renderSectionTitle, getSectionItems: getSectionItems, renderItem: function renderItem(item, filter) { return _this2.renderDatalistItem(item.text, filter); }, highlightedSectionIndex: this.state.sectionIndex }); if (this.props.options && this.props.options.groupBy) { return /*#__PURE__*/_react["default"].createElement(_reactAutowhatever["default"], propsWithCategory); } return /*#__PURE__*/_react["default"].createElement(_reactAutowhatever["default"], props); } }]); return DatalistWidget; }(_react["default"].Component); _defineProperty(DatalistWidget, "itemContainerStyle", _DatalistWidget["default"]['items-container']); _defineProperty(DatalistWidget, "noResultStyle", _DatalistWidget["default"]['no-result']); _defineProperty(DatalistWidget, "emptyStyle", _DatalistWidget["default"].empty); DatalistWidget.defaultProps = { options: {}, formContext: {} }; if (process.env.NODE_ENV !== 'production') { DatalistWidget.propTypes = { id: _propTypes["default"].string, value: _propTypes["default"].string, required: _propTypes["default"].bool, onChange: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ title: _propTypes["default"].string.isRequired, "enum": _propTypes["default"].arrayOf(_propTypes["default"].string) }).isRequired, formContext: _propTypes["default"].shape({ fetchItems: _propTypes["default"].func }), options: _propTypes["default"].shape({ enumOptions: _propTypes["default"].array, // Is the field value restricted to the suggestion list restricted: _propTypes["default"].bool, groupBy: _propTypes["default"].string }), renderItemsContainer: _propTypes["default"].func, renderEmptyList: _propTypes["default"].func, renderNoMatch: _propTypes["default"].func, placeholder: _propTypes["default"].string }; } var _default = DatalistWidget; exports["default"] = _default; //# sourceMappingURL=DatalistWidget.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3895 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { var _interopRequireDefault = __webpack_require__(21); exports.__esModule = true; exports.default = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(24)); var _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(30)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(23)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _elementType = _interopRequireDefault(__webpack_require__(16)); var _warning = _interopRequireDefault(__webpack_require__(29)); var _FormControlFeedback = _interopRequireDefault(__webpack_require__(3896)); var _FormControlStatic = _interopRequireDefault(__webpack_require__(3898)); var _bootstrapUtils = __webpack_require__(537); var _StyleConfig = __webpack_require__(1560); var propTypes = { componentClass: _elementType.default, /** * Only relevant if `componentClass` is `'input'`. */ type: _propTypes.default.string, /** * Uses `controlId` from `` if not explicitly specified. */ id: _propTypes.default.string, /** * Attaches a ref to the `` element. Only functions can be used here. * * ```js * { this.input = ref; }} /> * ``` */ inputRef: _propTypes.default.func }; var defaultProps = { componentClass: 'input' }; var contextTypes = { $bs_formGroup: _propTypes.default.object }; var FormControl = /*#__PURE__*/ function (_React$Component) { (0, _inheritsLoose2.default)(FormControl, _React$Component); function FormControl() { return _React$Component.apply(this, arguments) || this; } var _proto = FormControl.prototype; _proto.render = function render() { var formGroup = this.context.$bs_formGroup; var controlId = formGroup && formGroup.controlId; var _this$props = this.props, Component = _this$props.componentClass, type = _this$props.type, _this$props$id = _this$props.id, id = _this$props$id === void 0 ? controlId : _this$props$id, inputRef = _this$props.inputRef, className = _this$props.className, bsSize = _this$props.bsSize, props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, ["componentClass", "type", "id", "inputRef", "className", "bsSize"]); var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; process.env.NODE_ENV !== "production" ? (0, _warning.default)(controlId == null || id === controlId, '`controlId` is ignored on `` when `id` is specified.') : void 0; // input[type="file"] should not have .form-control. var classes; if (type !== 'file') { classes = (0, _bootstrapUtils.getClassSet)(bsProps); } // If user provides a size, make sure to append it to classes as input- // e.g. if bsSize is small, it will append input-sm if (bsSize) { var size = _StyleConfig.SIZE_MAP[bsSize] || bsSize; classes[(0, _bootstrapUtils.prefix)({ bsClass: 'input' }, size)] = true; } return _react.default.createElement(Component, (0, _extends2.default)({}, elementProps, { type: type, id: id, ref: inputRef, className: (0, _classnames.default)(className, classes) })); }; return FormControl; }(_react.default.Component); FormControl.propTypes = propTypes; FormControl.defaultProps = defaultProps; FormControl.contextTypes = contextTypes; FormControl.Feedback = _FormControlFeedback.default; FormControl.Static = _FormControlStatic.default; var _default = (0, _bootstrapUtils.bsClass)('form-control', (0, _bootstrapUtils.bsSizes)([_StyleConfig.Size.SMALL, _StyleConfig.Size.LARGE], FormControl)); exports.default = _default; module.exports = exports["default"]; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3896 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(21); exports.__esModule = true; exports.default = void 0; var _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(30)); var _extends2 = _interopRequireDefault(__webpack_require__(24)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(23)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _Glyphicon = _interopRequireDefault(__webpack_require__(3897)); var _bootstrapUtils = __webpack_require__(537); var defaultProps = { bsRole: 'feedback' }; var contextTypes = { $bs_formGroup: _propTypes.default.object }; var FormControlFeedback = /*#__PURE__*/ function (_React$Component) { (0, _inheritsLoose2.default)(FormControlFeedback, _React$Component); function FormControlFeedback() { return _React$Component.apply(this, arguments) || this; } var _proto = FormControlFeedback.prototype; _proto.getGlyph = function getGlyph(validationState) { switch (validationState) { case 'success': return 'ok'; case 'warning': return 'warning-sign'; case 'error': return 'remove'; default: return null; } }; _proto.renderDefaultFeedback = function renderDefaultFeedback(formGroup, className, classes, elementProps) { var glyph = this.getGlyph(formGroup && formGroup.validationState); if (!glyph) { return null; } return _react.default.createElement(_Glyphicon.default, (0, _extends2.default)({}, elementProps, { glyph: glyph, className: (0, _classnames.default)(className, classes) })); }; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, children = _this$props.children, props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, ["className", "children"]); var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = (0, _bootstrapUtils.getClassSet)(bsProps); if (!children) { return this.renderDefaultFeedback(this.context.$bs_formGroup, className, classes, elementProps); } var child = _react.default.Children.only(children); return _react.default.cloneElement(child, (0, _extends2.default)({}, elementProps, { className: (0, _classnames.default)(child.props.className, className, classes) })); }; return FormControlFeedback; }(_react.default.Component); FormControlFeedback.defaultProps = defaultProps; FormControlFeedback.contextTypes = contextTypes; var _default = (0, _bootstrapUtils.bsClass)('form-control-feedback', FormControlFeedback); exports.default = _default; module.exports = exports["default"]; /***/ }), /* 3897 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(21); exports.__esModule = true; exports.default = void 0; var _extends3 = _interopRequireDefault(__webpack_require__(24)); var _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(30)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(23)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _bootstrapUtils = __webpack_require__(537); var propTypes = { /** * An icon name without "glyphicon-" prefix. See e.g. http://getbootstrap.com/components/#glyphicons */ glyph: _propTypes.default.string.isRequired }; var Glyphicon = /*#__PURE__*/ function (_React$Component) { (0, _inheritsLoose2.default)(Glyphicon, _React$Component); function Glyphicon() { return _React$Component.apply(this, arguments) || this; } var _proto = Glyphicon.prototype; _proto.render = function render() { var _extends2; var _this$props = this.props, glyph = _this$props.glyph, className = _this$props.className, props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, ["glyph", "className"]); var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = (0, _extends3.default)({}, (0, _bootstrapUtils.getClassSet)(bsProps), (_extends2 = {}, _extends2[(0, _bootstrapUtils.prefix)(bsProps, glyph)] = true, _extends2)); return _react.default.createElement("span", (0, _extends3.default)({}, elementProps, { className: (0, _classnames.default)(className, classes) })); }; return Glyphicon; }(_react.default.Component); Glyphicon.propTypes = propTypes; var _default = (0, _bootstrapUtils.bsClass)('glyphicon', Glyphicon); exports.default = _default; module.exports = exports["default"]; /***/ }), /* 3898 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(21); exports.__esModule = true; exports.default = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(24)); var _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(30)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(23)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _react = _interopRequireDefault(__webpack_require__(0)); var _elementType = _interopRequireDefault(__webpack_require__(16)); var _bootstrapUtils = __webpack_require__(537); var propTypes = { componentClass: _elementType.default }; var defaultProps = { componentClass: 'p' }; var FormControlStatic = /*#__PURE__*/ function (_React$Component) { (0, _inheritsLoose2.default)(FormControlStatic, _React$Component); function FormControlStatic() { return _React$Component.apply(this, arguments) || this; } var _proto = FormControlStatic.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, className = _this$props.className, props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, ["componentClass", "className"]); var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = (0, _bootstrapUtils.getClassSet)(bsProps); return _react.default.createElement(Component, (0, _extends2.default)({}, elementProps, { className: (0, _classnames.default)(className, classes) })); }; return FormControlStatic; }(_react.default.Component); FormControlStatic.propTypes = propTypes; FormControlStatic.defaultProps = defaultProps; var _default = (0, _bootstrapUtils.bsClass)('form-control-static', FormControlStatic); exports.default = _default; module.exports = exports["default"]; /***/ }), /* 3899 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(173), isSymbol = __webpack_require__(875); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /* 3900 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(393); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /* 3901 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /* 3902 */ /***/ (function(module, exports, __webpack_require__) { var memoizeCapped = __webpack_require__(3903); /** Used to match property names within property paths. */ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (string.charCodeAt(0) === 46 /* . */) { result.push(''); } string.replace(rePropName, function(match, number, quote, subString) { result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); module.exports = stringToPath; /***/ }), /* 3903 */ /***/ (function(module, exports, __webpack_require__) { var memoize = __webpack_require__(3904); /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } module.exports = memoizeCapped; /***/ }), /* 3904 */ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(1563); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }), /* 3905 */ /***/ (function(module, exports, __webpack_require__) { var Hash = __webpack_require__(3906), ListCache = __webpack_require__(540), Map = __webpack_require__(876); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear; /***/ }), /* 3906 */ /***/ (function(module, exports, __webpack_require__) { var hashClear = __webpack_require__(3907), hashDelete = __webpack_require__(3912), hashGet = __webpack_require__(3913), hashHas = __webpack_require__(3914), hashSet = __webpack_require__(3915); /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; module.exports = Hash; /***/ }), /* 3907 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(539); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } module.exports = hashClear; /***/ }), /* 3908 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(1564), isMasked = __webpack_require__(3909), isObject = __webpack_require__(394), toSource = __webpack_require__(1565); /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } module.exports = baseIsNative; /***/ }), /* 3909 */ /***/ (function(module, exports, __webpack_require__) { var coreJsData = __webpack_require__(3910); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } module.exports = isMasked; /***/ }), /* 3910 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(152); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; /***/ }), /* 3911 */ /***/ (function(module, exports) { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }), /* 3912 */ /***/ (function(module, exports) { /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } module.exports = hashDelete; /***/ }), /* 3913 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(539); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; /***/ }), /* 3914 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(539); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; /***/ }), /* 3915 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(539); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } module.exports = hashSet; /***/ }), /* 3916 */ /***/ (function(module, exports) { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }), /* 3917 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(541); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }), /* 3918 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(541); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listCacheGet; /***/ }), /* 3919 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(541); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } module.exports = listCacheHas; /***/ }), /* 3920 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(541); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }), /* 3921 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(542); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } module.exports = mapCacheDelete; /***/ }), /* 3922 */ /***/ (function(module, exports) { /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } module.exports = isKeyable; /***/ }), /* 3923 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(542); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } module.exports = mapCacheGet; /***/ }), /* 3924 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(542); /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } module.exports = mapCacheHas; /***/ }), /* 3925 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(542); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } module.exports = mapCacheSet; /***/ }), /* 3926 */ /***/ (function(module, exports, __webpack_require__) { var baseToString = __webpack_require__(3927); /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } module.exports = toString; /***/ }), /* 3927 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(393), arrayMap = __webpack_require__(1567), isArray = __webpack_require__(173), isSymbol = __webpack_require__(875); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = baseToString; /***/ }), /* 3928 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tf-typeahead-container":"DatalistWidget__tf-typeahead-container___2ja7i","typeahead-input-icon":"DatalistWidget__typeahead-input-icon___3R3S0","items-container":"DatalistWidget__items-container___baB6w","empty":"DatalistWidget__empty___38mex","no-result":"DatalistWidget__no-result___2yVJz","container-open":"DatalistWidget__container-open___2e_Uz","title":"DatalistWidget__title___1uKu4","items":"DatalistWidget__items___g3cWU","item":"DatalistWidget__item___3qiSv","item-highlighted":"DatalistWidget__item-highlighted___1A9-8","highlight-match":"DatalistWidget__highlight-match___3QCGI","dropdown-toggle":"DatalistWidget__dropdown-toggle___382ws"}; /***/ }), /* 3929 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _EnumerationWidget = _interopRequireDefault(__webpack_require__(1568)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _EnumerationWidget["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 3930 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.manageCtrlKey = manageCtrlKey; exports.manageShiftKey = manageShiftKey; exports.deleteSelectedItems = deleteSelectedItems; exports.resetItems = resetItems; function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } // private function selectAllBetween(min, max, items) { return items.map(function (item, index) { if (index >= min && index <= max) { return _objectSpread(_objectSpread({}, item), {}, { isSelected: true }); } return _objectSpread(_objectSpread({}, item), {}, { isSelected: false }); }); } function manageCtrlKey(indexSelected, items) { var itemsList = _toConsumableArray(items); var itemSelected = itemsList[indexSelected] && itemsList[indexSelected].isSelected; if (itemSelected) { itemsList[indexSelected].isSelected = false; } else { itemsList[indexSelected].isSelected = true; } return itemsList; } function manageShiftKey(indexSelected, items) { var itemSelected = items[indexSelected].isSelected && items[indexSelected].isSelected === true; var firstIndex = 0; var lastIndex = 0; // get first item selected items.find(function (item, index) { if (item.isSelected) { firstIndex = index; return true; } return false; }); // get last item selected var itemsReversed = _toConsumableArray(items).reverse(); itemsReversed.find(function (item, index) { if (item.isSelected && item.isSelected === true) { lastIndex = items.length - index - 1; return true; } return false; }); if (itemSelected) { return selectAllBetween(firstIndex, indexSelected, items); } if (indexSelected < firstIndex) { return selectAllBetween(indexSelected, lastIndex, items); } else if (indexSelected > lastIndex) { return selectAllBetween(firstIndex, indexSelected, items); } return undefined; } function deleteSelectedItems(items) { return items.filter(function (item) { return !item.isSelected; }); } /** * Need to reset items in their default mode to prevent multiple edition * @param items */ function resetItems(items) { return items.map(function (currentItem) { return _objectSpread(_objectSpread({}, currentItem), {}, { displayMode: 'DISPLAY_MODE_DEFAULT' }); }); } //# sourceMappingURL=utils.js.map /***/ }), /* 3931 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _TextWidget = _interopRequireDefault(__webpack_require__(1551)); var _SelectWidget = _interopRequireDefault(__webpack_require__(873)); var _utils = __webpack_require__(66); var _KeyValueWidget = _interopRequireDefault(__webpack_require__(3932)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function toKeyValue(formData) { if (formData) { return formData.split('='); } return ['', '']; } function toKey(formData) { return toKeyValue(formData)[0]; } function toValue(formData) { return toKeyValue(formData)[1]; } function Key(_ref) { var schema = _ref.schema, data = _ref.data, _onChange = _ref.onChange, internalProps = _objectWithoutProperties(_ref, ["schema", "data", "onChange"]); if (schema.properties && Array.isArray(schema.properties.key["enum"])) { var options = (0, _utils.optionsList)(schema.properties.key); return /*#__PURE__*/_react["default"].createElement(_SelectWidget["default"], _extends({}, internalProps, { schema: schema.properties.key, options: { enumOptions: options }, value: data.key, onChange: function onChange(change) { return _onChange({ key: change, value: data.value }); } })); } return /*#__PURE__*/_react["default"].createElement(_TextWidget["default"], _extends({}, internalProps, { value: toKey(data), onChange: function onChange(change) { return _onChange("".concat(change, "=").concat(toValue(data))); } })); } function Value(_ref2) { var schema = _ref2.schema, data = _ref2.data, _onChange2 = _ref2.onChange, internalProps = _objectWithoutProperties(_ref2, ["schema", "data", "onChange"]); if (schema.properties && Array.isArray(schema.properties.key["enum"])) { return /*#__PURE__*/_react["default"].createElement(_TextWidget["default"], _extends({}, internalProps, { value: data.value, onChange: function onChange(change) { return _onChange2({ key: data.key, value: change }); } })); } return /*#__PURE__*/_react["default"].createElement(_TextWidget["default"], _extends({}, internalProps, { value: toValue(data), onChange: function onChange(change) { return _onChange2("".concat(toKey(data), "=").concat(change)); } })); } function KeyValueWidget(_ref3) { var schema = _ref3.schema, value = _ref3.value, formData = _ref3.formData, onChange = _ref3.onChange, internalProps = _objectWithoutProperties(_ref3, ["schema", "value", "formData", "onChange"]); return /*#__PURE__*/_react["default"].createElement("dl", { className: _KeyValueWidget["default"]['key-value'] }, /*#__PURE__*/_react["default"].createElement("dt", null, /*#__PURE__*/_react["default"].createElement(Key, _extends({}, internalProps, { schema: schema, data: value || formData, onChange: onChange }))), /*#__PURE__*/_react["default"].createElement("dd", null, /*#__PURE__*/_react["default"].createElement(Value, _extends({}, internalProps, { schema: schema, data: value || formData, onChange: onChange })))); } if (process.env.NODE_ENV !== 'production') { Key.propTypes = { schema: _propTypes["default"].object, data: _propTypes["default"].shape({ key: _propTypes["default"].string }), onChange: _propTypes["default"].func }; Value.propTypes = { schema: _propTypes["default"].object, data: _propTypes["default"].shape({ value: _propTypes["default"].string }), onChange: _propTypes["default"].func }; KeyValueWidget.propTypes = { schema: _propTypes["default"].object, formData: _propTypes["default"].object, value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]), onChange: _propTypes["default"].func }; } var _default = KeyValueWidget; exports["default"] = _default; //# sourceMappingURL=KeyValueWidget.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3932 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"key-value":"KeyValueWidget__key-value___3oFt4"}; /***/ }), /* 3933 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ListViewWidget = _interopRequireDefault(__webpack_require__(1570)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _ListViewWidget["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 3934 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.abort = exports.search = void 0; var search = { disabled: false, icon: 'talend-search', id: 'search' }; exports.search = search; var abort = { icon: 'talend-cross', id: 'abort' }; exports.abort = abort; //# sourceMappingURL=ListViewWidget.actions.js.map /***/ }), /* 3935 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.onSearchHandler = onSearchHandler; exports.onInputChange = onInputChange; exports.onToggleAll = onToggleAll; exports.onItemChange = onItemChange; exports.onAbortHandler = onAbortHandler; exports.onAddKeyDown = onAddKeyDown; var _keycode = _interopRequireDefault(__webpack_require__(34)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var DISPLAY_MODE_DEFAULT = 'DISPLAY_MODE_DEFAULT'; var LISTVIEW_SEARCH_ACTION = 'LISTVIEW_SEARCH_ACTION'; function onSearchHandler() { this.setState({ headerInput: this.searchInputsActions, searchCriteria: this.state.loadingSearchCriteria, loadingSearchCriteria: '' }); } function onInputChange(event, value) { var _this = this; if (this.timerSearch !== null) { clearTimeout(this.timerSearch); } this.timerSearch = setTimeout(function () { _this.timerSearch = null; if (_this.callActionHandler(LISTVIEW_SEARCH_ACTION, value.value, onSearchHandler.bind(_this))) { _this.setState({ loadingSearchCriteria: value.value, headerInput: _this.loadingInputsActions }); } else { var searchCriteria = value.value; var newDisplayedItems = _this.state.items.filter(function (item) { return item.label.toLowerCase().includes(searchCriteria.toLowerCase()); }); var toggleAllChecked = !!newDisplayedItems.length && newDisplayedItems.length === newDisplayedItems.filter(function (i) { return i.checked; }).length; _this.setState({ toggleAllChecked: toggleAllChecked, searchCriteria: searchCriteria, displayedItems: newDisplayedItems }); } }, 400); } function onToggleAll() { var checked = !this.state.toggleAllChecked; var items = this.state.items; var displayedItems = this.state.displayedItems; var newItems = items.map(function (item) { var displayedItem = displayedItems.find(function (i) { return i.index === item.index; }); if (displayedItem) { return _objectSpread(_objectSpread({}, displayedItem), {}, { checked: checked }); } return item; }); var newDisplayedItems = this.state.displayedItems.map(function (displayedItem) { return _objectSpread(_objectSpread({}, displayedItem), {}, { checked: checked }); }); this.setState({ toggleAllChecked: checked, items: newItems, displayedItems: newDisplayedItems }, this.setFormData.bind(this)); } function onItemChange(event, item) { function itemUpdater(current) { if (current.index === item.index) { return _objectSpread(_objectSpread({}, current), {}, { checked: event.target.checked }); } return current; } var newDisplayedItems = this.state.displayedItems.map(itemUpdater); this.setState({ toggleAllChecked: newDisplayedItems.length === newDisplayedItems.filter(function (i) { return i.checked; }).length, items: this.state.items.map(itemUpdater), displayedItems: newDisplayedItems }, this.setFormData.bind(this)); } function onAbortHandler() { var items = this.state.items; this.setState({ displayMode: DISPLAY_MODE_DEFAULT, toggleAllChecked: items.length === items.filter(function (i) { return i.checked; }).length, searchCriteria: null, displayedItems: items }, this.setFormData.bind(this)); } function onAddKeyDown(event) { if (event.keyCode === (0, _keycode["default"])('enter')) { event.stopPropagation(); event.preventDefault(); } if (event.keyCode === (0, _keycode["default"])('escape')) { event.stopPropagation(); event.preventDefault(); onAbortHandler.call(this); } } //# sourceMappingURL=ListViewWidget.handlers.js.map /***/ }), /* 3936 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _MultiSelectTagWidget = _interopRequireDefault(__webpack_require__(1571)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _MultiSelectTagWidget["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 3937 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"dropdown-toggle":"MultiSelectTagWidget__dropdown-toggle___3UANO","wrapper":"MultiSelectTagWidget__wrapper___umuL3","typeahead":"MultiSelectTagWidget__typeahead___1UJSW","items-container":"MultiSelectTagWidget__items-container___3FS8T","section-title":"MultiSelectTagWidget__section-title___12UuW","readonly":"MultiSelectTagWidget__readonly___21ylV"}; /***/ }), /* 3938 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _RadioWidget = _interopRequireDefault(__webpack_require__(1549)); var _SelectWidget = _interopRequireDefault(__webpack_require__(873)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var MAX_TO_RADIO = 2; /** * Render Radio or Select by choices length * @param props * @returns {*} Radio inputs if choices length is gte to 2 or Select * @constructor */ function RadioOrSelectWidget(props) { if (props.options && props.options.enumOptions) { if (props.options.enumOptions.length <= MAX_TO_RADIO) { return /*#__PURE__*/_react["default"].createElement(_RadioWidget["default"], props); } } return /*#__PURE__*/_react["default"].createElement(_SelectWidget["default"], props); } if (process.env.NODE_ENV !== 'production') { RadioOrSelectWidget.propTypes = { options: _propTypes["default"].shape({ enumOptions: _propTypes["default"].array }) }; } var _default = RadioOrSelectWidget; exports["default"] = _default; //# sourceMappingURL=RadioOrSelectWidget.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 3939 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PanelGroup__ = __webpack_require__(1574); var Accordion = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Accordion, _React$Component); function Accordion() { return _React$Component.apply(this, arguments) || this; } var _proto = Accordion.prototype; _proto.render = function render() { return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__PanelGroup__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, this.props, { accordion: true }), this.props.children); }; return Accordion; }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component); /* harmony default export */ __webpack_exports__["a"] = (Accordion); /***/ }), /* 3940 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values__ = __webpack_require__(88); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__ = __webpack_require__(79); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__CloseButton__ = __webpack_require__(878); var propTypes = { onDismiss: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, closeLabel: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string }; var defaultProps = { closeLabel: 'Close alert' }; var Alert = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Alert, _React$Component); function Alert() { return _React$Component.apply(this, arguments) || this; } var _proto = Alert.prototype; _proto.render = function render() { var _extends2; var _this$props = this.props, onDismiss = _this$props.onDismiss, closeLabel = _this$props.closeLabel, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["onDismiss", "closeLabel", "className", "children"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var dismissable = !!onDismiss; var classes = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["getClassSet"])(bsProps), (_extends2 = {}, _extends2[Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'dismissable')] = dismissable, _extends2)); return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { role: "alert", className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, classes) }), dismissable && __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__CloseButton__["a" /* default */], { onClick: onDismiss, label: closeLabel }), children); }; return Alert; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); Alert.propTypes = propTypes; Alert.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsStyles"])(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values___default()(__WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__["d" /* State */]), __WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__["d" /* State */].INFO, Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('alert', Alert))); /***/ }), /* 3941 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(13); // TODO: `pullRight` doesn't belong here. There's no special handling here. var propTypes = { pullRight: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool }; var defaultProps = { pullRight: false }; var Badge = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Badge, _React$Component); function Badge() { return _React$Component.apply(this, arguments) || this; } var _proto = Badge.prototype; _proto.hasContent = function hasContent(children) { var result = false; __WEBPACK_IMPORTED_MODULE_4_react___default.a.Children.forEach(children, function (child) { if (result) { return; } if (child || child === 0) { result = true; } }); return result; }; _proto.render = function render() { var _this$props = this.props, pullRight = _this$props.pullRight, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["pullRight", "className", "children"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps), { 'pull-right': pullRight, // Hack for collapsing on IE8. hidden: !this.hasContent(children) }); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) }), children); }; return Badge; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Badge.propTypes = propTypes; Badge.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('badge', Badge)); /***/ }), /* 3942 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__BreadcrumbItem__ = __webpack_require__(1576); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(13); var Breadcrumb = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Breadcrumb, _React$Component); function Breadcrumb() { return _React$Component.apply(this, arguments) || this; } var _proto = Breadcrumb.prototype; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("ol", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { role: "navigation", "aria-label": "breadcrumbs", className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return Breadcrumb; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Breadcrumb.Item = __WEBPACK_IMPORTED_MODULE_5__BreadcrumbItem__["a" /* default */]; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('breadcrumb', Breadcrumb)); /***/ }), /* 3943 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__ = __webpack_require__(13); var ButtonToolbar = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ButtonToolbar, _React$Component); function ButtonToolbar() { return _React$Component.apply(this, arguments) || this; } var _proto = ButtonToolbar.prototype; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { role: "toolbar", className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return ButtonToolbar; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["bsClass"])('btn-toolbar', ButtonToolbar)); /***/ }), /* 3944 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__CarouselCaption__ = __webpack_require__(3945); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__CarouselItem__ = __webpack_require__(1577); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Glyphicon__ = __webpack_require__(880); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__SafeAnchor__ = __webpack_require__(132); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_ValidComponentChildren__ = __webpack_require__(95); // TODO: `slide` should be `animate`. // TODO: Use uncontrollable. var propTypes = { slide: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, indicators: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * The amount of time to delay between automatically cycling an item. * If `null`, carousel will not automatically cycle. */ interval: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, controls: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, pauseOnHover: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, wrap: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * Callback fired when the active item changes. * * ```js * (eventKey: any, ?event: Object) => any * ``` * * If this callback takes two or more arguments, the second argument will * be a persisted event object with `direction` set to the direction of the * transition. */ onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, onSlideEnd: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, activeIndex: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, defaultActiveIndex: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, direction: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['prev', 'next']), prevIcon: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node, /** * Label shown to screen readers only, can be used to show the previous element * in the carousel. * Set to null to deactivate. */ prevLabel: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, nextIcon: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node, /** * Label shown to screen readers only, can be used to show the next element * in the carousel. * Set to null to deactivate. */ nextLabel: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string }; var defaultProps = { slide: true, interval: 5000, pauseOnHover: true, wrap: true, indicators: true, controls: true, prevIcon: __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Glyphicon__["a" /* default */], { glyph: "chevron-left" }), prevLabel: 'Previous', nextIcon: __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Glyphicon__["a" /* default */], { glyph: "chevron-right" }), nextLabel: 'Next' }; var Carousel = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Carousel, _React$Component); function Carousel(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; _this.handleMouseOver = _this.handleMouseOver.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleMouseOut = _this.handleMouseOut.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handlePrev = _this.handlePrev.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleNext = _this.handleNext.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleItemAnimateOutEnd = _this.handleItemAnimateOutEnd.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); var defaultActiveIndex = props.defaultActiveIndex; _this.state = { activeIndex: defaultActiveIndex != null ? defaultActiveIndex : 0, previousActiveIndex: null, direction: null }; _this.isUnmounted = false; return _this; } var _proto = Carousel.prototype; _proto.componentDidMount = function componentDidMount() { this.waitForNext(); }; _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var activeIndex = this.getActiveIndex(); if (nextProps.activeIndex != null && nextProps.activeIndex !== activeIndex) { clearTimeout(this.timeout); this.setState({ previousActiveIndex: activeIndex, direction: nextProps.direction != null ? nextProps.direction : this.getDirection(activeIndex, nextProps.activeIndex) }); } if (nextProps.activeIndex == null && this.state.activeIndex >= nextProps.children.length) { this.setState({ activeIndex: 0, previousActiveIndex: null, direction: null }); } }; _proto.componentWillUnmount = function componentWillUnmount() { clearTimeout(this.timeout); this.isUnmounted = true; }; _proto.getActiveIndex = function getActiveIndex() { var activeIndexProp = this.props.activeIndex; return activeIndexProp != null ? activeIndexProp : this.state.activeIndex; }; _proto.getDirection = function getDirection(prevIndex, index) { if (prevIndex === index) { return null; } return prevIndex > index ? 'prev' : 'next'; }; _proto.handleItemAnimateOutEnd = function handleItemAnimateOutEnd() { var _this2 = this; this.setState({ previousActiveIndex: null, direction: null }, function () { _this2.waitForNext(); if (_this2.props.onSlideEnd) { _this2.props.onSlideEnd(); } }); }; _proto.handleMouseOut = function handleMouseOut() { if (this.isPaused) { this.play(); } }; _proto.handleMouseOver = function handleMouseOver() { if (this.props.pauseOnHover) { this.pause(); } }; _proto.handleNext = function handleNext(e) { var index = this.getActiveIndex() + 1; var count = __WEBPACK_IMPORTED_MODULE_12__utils_ValidComponentChildren__["a" /* default */].count(this.props.children); if (index > count - 1) { if (!this.props.wrap) { return; } index = 0; } this.select(index, e, 'next'); }; _proto.handlePrev = function handlePrev(e) { var index = this.getActiveIndex() - 1; if (index < 0) { if (!this.props.wrap) { return; } index = __WEBPACK_IMPORTED_MODULE_12__utils_ValidComponentChildren__["a" /* default */].count(this.props.children) - 1; } this.select(index, e, 'prev'); }; // This might be a public API. _proto.pause = function pause() { this.isPaused = true; clearTimeout(this.timeout); }; // This might be a public API. _proto.play = function play() { this.isPaused = false; this.waitForNext(); }; _proto.select = function select(index, e, direction) { clearTimeout(this.timeout); // TODO: Is this necessary? Seems like the only risk is if the component // unmounts while handleItemAnimateOutEnd fires. if (this.isUnmounted) { return; } var previousActiveIndex = this.props.slide ? this.getActiveIndex() : null; direction = direction || this.getDirection(previousActiveIndex, index); var onSelect = this.props.onSelect; if (onSelect) { if (onSelect.length > 1) { // React SyntheticEvents are pooled, so we need to remove this event // from the pool to add a custom property. To avoid unnecessarily // removing objects from the pool, only do this when the listener // actually wants the event. if (e) { e.persist(); e.direction = direction; } else { e = { direction: direction }; } onSelect(index, e); } else { onSelect(index); } } if (this.props.activeIndex == null && index !== previousActiveIndex) { if (this.state.previousActiveIndex != null) { // If currently animating don't activate the new index. // TODO: look into queueing this canceled call and // animating after the current animation has ended. return; } this.setState({ activeIndex: index, previousActiveIndex: previousActiveIndex, direction: direction }); } }; _proto.waitForNext = function waitForNext() { var _this$props = this.props, slide = _this$props.slide, interval = _this$props.interval, activeIndexProp = _this$props.activeIndex; if (!this.isPaused && slide && interval && activeIndexProp == null) { this.timeout = setTimeout(this.handleNext, interval); } }; _proto.renderControls = function renderControls(properties) { var wrap = properties.wrap, children = properties.children, activeIndex = properties.activeIndex, prevIcon = properties.prevIcon, nextIcon = properties.nextIcon, bsProps = properties.bsProps, prevLabel = properties.prevLabel, nextLabel = properties.nextLabel; var controlClassName = Object(__WEBPACK_IMPORTED_MODULE_11__utils_bootstrapUtils__["prefix"])(bsProps, 'control'); var count = __WEBPACK_IMPORTED_MODULE_12__utils_ValidComponentChildren__["a" /* default */].count(children); return [(wrap || activeIndex !== 0) && __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__SafeAnchor__["a" /* default */], { key: "prev", className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(controlClassName, 'left'), onClick: this.handlePrev }, prevIcon, prevLabel && __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("span", { className: "sr-only" }, prevLabel)), (wrap || activeIndex !== count - 1) && __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__SafeAnchor__["a" /* default */], { key: "next", className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(controlClassName, 'right'), onClick: this.handleNext }, nextIcon, nextLabel && __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("span", { className: "sr-only" }, nextLabel))]; }; _proto.renderIndicators = function renderIndicators(children, activeIndex, bsProps) { var _this3 = this; var indicators = []; __WEBPACK_IMPORTED_MODULE_12__utils_ValidComponentChildren__["a" /* default */].forEach(children, function (child, index) { indicators.push(__WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("li", { key: index, className: index === activeIndex ? 'active' : null, onClick: function onClick(e) { return _this3.select(index, e); } }), // Force whitespace between indicator elements. Bootstrap requires // this for correct spacing of elements. ' '); }); return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("ol", { className: Object(__WEBPACK_IMPORTED_MODULE_11__utils_bootstrapUtils__["prefix"])(bsProps, 'indicators') }, indicators); }; _proto.render = function render() { var _this4 = this; var _this$props2 = this.props, slide = _this$props2.slide, indicators = _this$props2.indicators, controls = _this$props2.controls, wrap = _this$props2.wrap, prevIcon = _this$props2.prevIcon, prevLabel = _this$props2.prevLabel, nextIcon = _this$props2.nextIcon, nextLabel = _this$props2.nextLabel, className = _this$props2.className, children = _this$props2.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props2, ["slide", "indicators", "controls", "wrap", "prevIcon", "prevLabel", "nextIcon", "nextLabel", "className", "children"]); var _this$state = this.state, previousActiveIndex = _this$state.previousActiveIndex, direction = _this$state.direction; var _splitBsPropsAndOmit = Object(__WEBPACK_IMPORTED_MODULE_11__utils_bootstrapUtils__["splitBsPropsAndOmit"])(props, ['interval', 'pauseOnHover', 'onSelect', 'onSlideEnd', 'activeIndex', // Accessed via this.getActiveIndex(). 'defaultActiveIndex', 'direction']), bsProps = _splitBsPropsAndOmit[0], elementProps = _splitBsPropsAndOmit[1]; var activeIndex = this.getActiveIndex(); var classes = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_11__utils_bootstrapUtils__["getClassSet"])(bsProps), { slide: slide }); return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, classes), onMouseOver: this.handleMouseOver, onMouseOut: this.handleMouseOut }), indicators && this.renderIndicators(children, activeIndex, bsProps), __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("div", { className: Object(__WEBPACK_IMPORTED_MODULE_11__utils_bootstrapUtils__["prefix"])(bsProps, 'inner') }, __WEBPACK_IMPORTED_MODULE_12__utils_ValidComponentChildren__["a" /* default */].map(children, function (child, index) { var active = index === activeIndex; var previousActive = slide && index === previousActiveIndex; return Object(__WEBPACK_IMPORTED_MODULE_5_react__["cloneElement"])(child, { active: active, index: index, animateOut: previousActive, animateIn: active && previousActiveIndex != null && slide, direction: direction, onAnimateOutEnd: previousActive ? _this4.handleItemAnimateOutEnd : null }); })), controls && this.renderControls({ wrap: wrap, children: children, activeIndex: activeIndex, prevIcon: prevIcon, prevLabel: prevLabel, nextIcon: nextIcon, nextLabel: nextLabel, bsProps: bsProps })); }; return Carousel; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); Carousel.propTypes = propTypes; Carousel.defaultProps = defaultProps; Carousel.Caption = __WEBPACK_IMPORTED_MODULE_7__CarouselCaption__["a" /* default */]; Carousel.Item = __WEBPACK_IMPORTED_MODULE_8__CarouselItem__["a" /* default */]; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_11__utils_bootstrapUtils__["bsClass"])('carousel', Carousel)); /***/ }), /* 3945 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'div' }; var CarouselCaption = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(CarouselCaption, _React$Component); function CarouselCaption() { return _React$Component.apply(this, arguments) || this; } var _proto = CarouselCaption.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return CarouselCaption; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); CarouselCaption.propTypes = propTypes; CarouselCaption.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('carousel-caption', CarouselCaption)); /***/ }), /* 3946 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_warning__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); /* eslint-disable jsx-a11y/label-has-for */ var propTypes = { inline: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, disabled: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, title: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, /** * Only valid if `inline` is not set. */ validationState: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOf(['success', 'warning', 'error', null]), /** * Attaches a ref to the `` element. Only functions can be used here. * * ```js * { this.input = ref; }} /> * ``` */ inputRef: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func }; var defaultProps = { inline: false, disabled: false, title: '' }; var Checkbox = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Checkbox, _React$Component); function Checkbox() { return _React$Component.apply(this, arguments) || this; } var _proto = Checkbox.prototype; _proto.render = function render() { var _this$props = this.props, inline = _this$props.inline, disabled = _this$props.disabled, validationState = _this$props.validationState, inputRef = _this$props.inputRef, className = _this$props.className, style = _this$props.style, title = _this$props.title, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["inline", "disabled", "validationState", "inputRef", "className", "style", "title", "children"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var input = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("input", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { ref: inputRef, type: "checkbox", disabled: disabled })); if (inline) { var _classes2; var _classes = (_classes2 = {}, _classes2[Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'inline')] = true, _classes2.disabled = disabled, _classes2); // Use a warning here instead of in propTypes to get better-looking // generated documentation. process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_6_warning___default()(!validationState, '`validationState` is ignored on ``. To display ' + 'validation state on an inline checkbox, set `validationState` on a ' + 'parent `` or other element instead.') : void 0; return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("label", { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, _classes), style: style, title: title }, input, children); } var classes = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["getClassSet"])(bsProps), { disabled: disabled }); if (validationState) { classes["has-" + validationState] = true; } return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes), style: style }, __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("label", { title: title }, input, children)); }; return Checkbox; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Checkbox.propTypes = propTypes; Checkbox.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('checkbox', Checkbox)); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 3947 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_capitalize__ = __webpack_require__(1578); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__ = __webpack_require__(79); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default.a, /** * Apply clearfix * * on Extra small devices Phones * * adds class `visible-xs-block` */ visibleXsBlock: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Apply clearfix * * on Small devices Tablets * * adds class `visible-sm-block` */ visibleSmBlock: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Apply clearfix * * on Medium devices Desktops * * adds class `visible-md-block` */ visibleMdBlock: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Apply clearfix * * on Large devices Desktops * * adds class `visible-lg-block` */ visibleLgBlock: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool }; var defaultProps = { componentClass: 'div' }; var Clearfix = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Clearfix, _React$Component); function Clearfix() { return _React$Component.apply(this, arguments) || this; } var _proto = Clearfix.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["getClassSet"])(bsProps); __WEBPACK_IMPORTED_MODULE_9__utils_StyleConfig__["a" /* DEVICE_SIZES */].forEach(function (size) { var propName = "visible" + Object(__WEBPACK_IMPORTED_MODULE_8__utils_capitalize__["a" /* default */])(size) + "Block"; if (elementProps[propName]) { classes["visible-" + size + "-block"] = true; } delete elementProps[propName]; }); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return Clearfix; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Clearfix.propTypes = propTypes; Clearfix.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('clearfix', Clearfix)); /***/ }), /* 3948 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_warning__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { /** * Uses `controlId` from `` if not explicitly specified. */ htmlFor: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, srOnly: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool }; var defaultProps = { srOnly: false }; var contextTypes = { $bs_formGroup: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object }; var ControlLabel = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ControlLabel, _React$Component); function ControlLabel() { return _React$Component.apply(this, arguments) || this; } var _proto = ControlLabel.prototype; _proto.render = function render() { var formGroup = this.context.$bs_formGroup; var controlId = formGroup && formGroup.controlId; var _this$props = this.props, _this$props$htmlFor = _this$props.htmlFor, htmlFor = _this$props$htmlFor === void 0 ? controlId : _this$props$htmlFor, srOnly = _this$props.srOnly, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["htmlFor", "srOnly", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_6_warning___default()(controlId == null || htmlFor === controlId, '`controlId` is ignored on `` when `htmlFor` is specified.') : void 0; var classes = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["getClassSet"])(bsProps), { 'sr-only': srOnly }); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("label", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { htmlFor: htmlFor, className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return ControlLabel; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); ControlLabel.propTypes = propTypes; ControlLabel.defaultProps = defaultProps; ControlLabel.contextTypes = contextTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('control-label', ControlLabel)); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 3949 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__ = __webpack_require__(79); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default.a, /** * The number of columns you wish to span * * for Extra small devices Phones (<768px) * * class-prefix `col-xs-` */ xs: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * The number of columns you wish to span * * for Small devices Tablets (≥768px) * * class-prefix `col-sm-` */ sm: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * The number of columns you wish to span * * for Medium devices Desktops (≥992px) * * class-prefix `col-md-` */ md: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * The number of columns you wish to span * * for Large devices Desktops (≥1200px) * * class-prefix `col-lg-` */ lg: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Hide column * * on Extra small devices Phones * * adds class `hidden-xs` */ xsHidden: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Hide column * * on Small devices Tablets * * adds class `hidden-sm` */ smHidden: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Hide column * * on Medium devices Desktops * * adds class `hidden-md` */ mdHidden: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Hide column * * on Large devices Desktops * * adds class `hidden-lg` */ lgHidden: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Move columns to the right * * for Extra small devices Phones * * class-prefix `col-xs-offset-` */ xsOffset: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Move columns to the right * * for Small devices Tablets * * class-prefix `col-sm-offset-` */ smOffset: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Move columns to the right * * for Medium devices Desktops * * class-prefix `col-md-offset-` */ mdOffset: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Move columns to the right * * for Large devices Desktops * * class-prefix `col-lg-offset-` */ lgOffset: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Change the order of grid columns to the right * * for Extra small devices Phones * * class-prefix `col-xs-push-` */ xsPush: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Change the order of grid columns to the right * * for Small devices Tablets * * class-prefix `col-sm-push-` */ smPush: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Change the order of grid columns to the right * * for Medium devices Desktops * * class-prefix `col-md-push-` */ mdPush: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Change the order of grid columns to the right * * for Large devices Desktops * * class-prefix `col-lg-push-` */ lgPush: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Change the order of grid columns to the left * * for Extra small devices Phones * * class-prefix `col-xs-pull-` */ xsPull: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Change the order of grid columns to the left * * for Small devices Tablets * * class-prefix `col-sm-pull-` */ smPull: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Change the order of grid columns to the left * * for Medium devices Desktops * * class-prefix `col-md-pull-` */ mdPull: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, /** * Change the order of grid columns to the left * * for Large devices Desktops * * class-prefix `col-lg-pull-` */ lgPull: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number }; var defaultProps = { componentClass: 'div' }; var Col = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Col, _React$Component); function Col() { return _React$Component.apply(this, arguments) || this; } var _proto = Col.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = []; __WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__["a" /* DEVICE_SIZES */].forEach(function (size) { function popProp(propSuffix, modifier) { var propName = "" + size + propSuffix; var propValue = elementProps[propName]; if (propValue != null) { classes.push(Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, "" + size + modifier + "-" + propValue)); } delete elementProps[propName]; } popProp('', ''); popProp('Offset', '-offset'); popProp('Push', '-push'); popProp('Pull', '-pull'); var hiddenPropName = size + "Hidden"; if (elementProps[hiddenPropName]) { classes.push("hidden-" + size); } delete elementProps[hiddenPropName]; }); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return Col; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Col.propTypes = propTypes; Col.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('col', Col)); /***/ }), /* 3950 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_array_from__ = __webpack_require__(1082); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_array_from___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_array_from__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_esm_assertThisInitialized__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_keycode__ = __webpack_require__(34); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_keycode___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_keycode__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_dom__ = __webpack_require__(18); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react_dom__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react_overlays_lib_RootCloseWrapper__ = __webpack_require__(658); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_react_overlays_lib_RootCloseWrapper___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_react_overlays_lib_RootCloseWrapper__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_createChainedFunction__ = __webpack_require__(69); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utils_ValidComponentChildren__ = __webpack_require__(95); var propTypes = { open: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, pullRight: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool, onClose: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, labelledBy: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number]), onSelect: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func, rootCloseEvent: __WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.oneOf(['click', 'mousedown']) }; var defaultProps = { bsRole: 'menu', pullRight: false }; var DropdownMenu = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(DropdownMenu, _React$Component); function DropdownMenu(props) { var _this; _this = _React$Component.call(this, props) || this; _this.handleRootClose = _this.handleRootClose.bind(Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleKeyDown = _this.handleKeyDown.bind(Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); return _this; } var _proto = DropdownMenu.prototype; _proto.getFocusableMenuItems = function getFocusableMenuItems() { var node = __WEBPACK_IMPORTED_MODULE_9_react_dom___default.a.findDOMNode(this); if (!node) { return []; } return __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_array_from___default()(node.querySelectorAll('[tabIndex="-1"]')); }; _proto.getItemsAndActiveIndex = function getItemsAndActiveIndex() { var items = this.getFocusableMenuItems(); var activeIndex = items.indexOf(document.activeElement); return { items: items, activeIndex: activeIndex }; }; _proto.focusNext = function focusNext() { var _this$getItemsAndActi = this.getItemsAndActiveIndex(), items = _this$getItemsAndActi.items, activeIndex = _this$getItemsAndActi.activeIndex; if (items.length === 0) { return; } var nextIndex = activeIndex === items.length - 1 ? 0 : activeIndex + 1; items[nextIndex].focus(); }; _proto.focusPrevious = function focusPrevious() { var _this$getItemsAndActi2 = this.getItemsAndActiveIndex(), items = _this$getItemsAndActi2.items, activeIndex = _this$getItemsAndActi2.activeIndex; if (items.length === 0) { return; } var prevIndex = activeIndex === 0 ? items.length - 1 : activeIndex - 1; items[prevIndex].focus(); }; _proto.handleKeyDown = function handleKeyDown(event) { switch (event.keyCode) { case __WEBPACK_IMPORTED_MODULE_6_keycode___default.a.codes.down: this.focusNext(); event.preventDefault(); break; case __WEBPACK_IMPORTED_MODULE_6_keycode___default.a.codes.up: this.focusPrevious(); event.preventDefault(); break; case __WEBPACK_IMPORTED_MODULE_6_keycode___default.a.codes.esc: case __WEBPACK_IMPORTED_MODULE_6_keycode___default.a.codes.tab: this.props.onClose(event, { source: 'keydown' }); break; default: } }; _proto.handleRootClose = function handleRootClose(event) { this.props.onClose(event, { source: 'rootClose' }); }; _proto.render = function render() { var _extends2, _this2 = this; var _this$props = this.props, open = _this$props.open, pullRight = _this$props.pullRight, labelledBy = _this$props.labelledBy, onSelect = _this$props.onSelect, className = _this$props.className, rootCloseEvent = _this$props.rootCloseEvent, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["open", "pullRight", "labelledBy", "onSelect", "className", "rootCloseEvent", "children"]); var _splitBsPropsAndOmit = Object(__WEBPACK_IMPORTED_MODULE_11__utils_bootstrapUtils__["splitBsPropsAndOmit"])(props, ['onClose']), bsProps = _splitBsPropsAndOmit[0], elementProps = _splitBsPropsAndOmit[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_11__utils_bootstrapUtils__["getClassSet"])(bsProps), (_extends2 = {}, _extends2[Object(__WEBPACK_IMPORTED_MODULE_11__utils_bootstrapUtils__["prefix"])(bsProps, 'right')] = pullRight, _extends2)); return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_react_overlays_lib_RootCloseWrapper___default.a, { disabled: !open, onRootClose: this.handleRootClose, event: rootCloseEvent }, __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("ul", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { role: "menu", className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()(className, classes), "aria-labelledby": labelledBy }), __WEBPACK_IMPORTED_MODULE_13__utils_ValidComponentChildren__["a" /* default */].map(children, function (child) { return __WEBPACK_IMPORTED_MODULE_7_react___default.a.cloneElement(child, { onKeyDown: Object(__WEBPACK_IMPORTED_MODULE_12__utils_createChainedFunction__["a" /* default */])(child.props.onKeyDown, _this2.handleKeyDown), onSelect: Object(__WEBPACK_IMPORTED_MODULE_12__utils_createChainedFunction__["a" /* default */])(child.props.onSelect, onSelect) }); }))); }; return DropdownMenu; }(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component); DropdownMenu.propTypes = propTypes; DropdownMenu.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_11__utils_bootstrapUtils__["bsClass"])('dropdown-menu', DropdownMenu)); /***/ }), /* 3951 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Dropdown__ = __webpack_require__(543); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_splitComponentProps__ = __webpack_require__(544); var propTypes = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, __WEBPACK_IMPORTED_MODULE_5__Dropdown__["a" /* default */].propTypes, { // Toggle props. bsStyle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, bsSize: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, title: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.node.isRequired, noCaret: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, // Override generated docs from . /** * @private */ children: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.node }); var DropdownButton = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(DropdownButton, _React$Component); function DropdownButton() { return _React$Component.apply(this, arguments) || this; } var _proto = DropdownButton.prototype; _proto.render = function render() { var _this$props = this.props, bsSize = _this$props.bsSize, bsStyle = _this$props.bsStyle, title = _this$props.title, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["bsSize", "bsStyle", "title", "children"]); var _splitComponentProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_splitComponentProps__["a" /* default */])(props, __WEBPACK_IMPORTED_MODULE_5__Dropdown__["a" /* default */].ControlledComponent), dropdownProps = _splitComponentProps[0], toggleProps = _splitComponentProps[1]; return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__Dropdown__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, dropdownProps, { bsSize: bsSize, bsStyle: bsStyle }), __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__Dropdown__["a" /* default */].Toggle, Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, toggleProps, { bsSize: bsSize, bsStyle: bsStyle }), title), __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__Dropdown__["a" /* default */].Menu, null, children)); }; return DropdownButton; }(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component); DropdownButton.propTypes = propTypes; /* harmony default export */ __webpack_exports__["a"] = (DropdownButton); /***/ }), /* 3952 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { horizontal: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, inline: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, componentClass: __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default.a }; var defaultProps = { horizontal: false, inline: false, componentClass: 'form' }; var Form = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Form, _React$Component); function Form() { return _React$Component.apply(this, arguments) || this; } var _proto = Form.prototype; _proto.render = function render() { var _this$props = this.props, horizontal = _this$props.horizontal, inline = _this$props.inline, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["horizontal", "inline", "componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = []; if (horizontal) { classes.push(Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'horizontal')); } if (inline) { classes.push(Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'inline')); } return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return Form; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Form.propTypes = propTypes; Form.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('form', Form)); /***/ }), /* 3953 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_warning__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__FormControlFeedback__ = __webpack_require__(3954); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__FormControlStatic__ = __webpack_require__(3955); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__ = __webpack_require__(79); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default.a, /** * Only relevant if `componentClass` is `'input'`. */ type: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, /** * Uses `controlId` from `` if not explicitly specified. */ id: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, /** * Attaches a ref to the `` element. Only functions can be used here. * * ```js * { this.input = ref; }} /> * ``` */ inputRef: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func }; var defaultProps = { componentClass: 'input' }; var contextTypes = { $bs_formGroup: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object }; var FormControl = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(FormControl, _React$Component); function FormControl() { return _React$Component.apply(this, arguments) || this; } var _proto = FormControl.prototype; _proto.render = function render() { var formGroup = this.context.$bs_formGroup; var controlId = formGroup && formGroup.controlId; var _this$props = this.props, Component = _this$props.componentClass, type = _this$props.type, _this$props$id = _this$props.id, id = _this$props$id === void 0 ? controlId : _this$props$id, inputRef = _this$props.inputRef, className = _this$props.className, bsSize = _this$props.bsSize, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "type", "id", "inputRef", "className", "bsSize"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_7_warning___default()(controlId == null || id === controlId, '`controlId` is ignored on `` when `id` is specified.') : void 0; // input[type="file"] should not have .form-control. var classes; if (type !== 'file') { classes = Object(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["getClassSet"])(bsProps); } // If user provides a size, make sure to append it to classes as input- // e.g. if bsSize is small, it will append input-sm if (bsSize) { var size = __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__["b" /* SIZE_MAP */][bsSize] || bsSize; classes[Object(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["prefix"])({ bsClass: 'input' }, size)] = true; } return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { type: type, id: id, ref: inputRef, className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return FormControl; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); FormControl.propTypes = propTypes; FormControl.defaultProps = defaultProps; FormControl.contextTypes = contextTypes; FormControl.Feedback = __WEBPACK_IMPORTED_MODULE_8__FormControlFeedback__["a" /* default */]; FormControl.Static = __WEBPACK_IMPORTED_MODULE_9__FormControlStatic__["a" /* default */]; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["bsClass"])('form-control', Object(__WEBPACK_IMPORTED_MODULE_10__utils_bootstrapUtils__["bsSizes"])([__WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__["c" /* Size */].SMALL, __WEBPACK_IMPORTED_MODULE_11__utils_StyleConfig__["c" /* Size */].LARGE], FormControl))); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 3954 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Glyphicon__ = __webpack_require__(880); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); var defaultProps = { bsRole: 'feedback' }; var contextTypes = { $bs_formGroup: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object }; var FormControlFeedback = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(FormControlFeedback, _React$Component); function FormControlFeedback() { return _React$Component.apply(this, arguments) || this; } var _proto = FormControlFeedback.prototype; _proto.getGlyph = function getGlyph(validationState) { switch (validationState) { case 'success': return 'ok'; case 'warning': return 'warning-sign'; case 'error': return 'remove'; default: return null; } }; _proto.renderDefaultFeedback = function renderDefaultFeedback(formGroup, className, classes, elementProps) { var glyph = this.getGlyph(formGroup && formGroup.validationState); if (!glyph) { return null; } return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__Glyphicon__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { glyph: glyph, className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["className", "children"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["getClassSet"])(bsProps); if (!children) { return this.renderDefaultFeedback(this.context.$bs_formGroup, className, classes, elementProps); } var child = __WEBPACK_IMPORTED_MODULE_4_react___default.a.Children.only(children); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.cloneElement(child, Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(child.props.className, className, classes) })); }; return FormControlFeedback; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); FormControlFeedback.defaultProps = defaultProps; FormControlFeedback.contextTypes = contextTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('form-control-feedback', FormControlFeedback)); /***/ }), /* 3955 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'p' }; var FormControlStatic = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(FormControlStatic, _React$Component); function FormControlStatic() { return _React$Component.apply(this, arguments) || this; } var _proto = FormControlStatic.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return FormControlStatic; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); FormControlStatic.propTypes = propTypes; FormControlStatic.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('form-control-static', FormControlStatic)); /***/ }), /* 3956 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_StyleConfig__ = __webpack_require__(79); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__ = __webpack_require__(95); var propTypes = { /** * Sets `id` on `` and `htmlFor` on ``. */ controlId: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, validationState: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOf(['success', 'warning', 'error', null]) }; var childContextTypes = { $bs_formGroup: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object.isRequired }; var FormGroup = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(FormGroup, _React$Component); function FormGroup() { return _React$Component.apply(this, arguments) || this; } var _proto = FormGroup.prototype; _proto.getChildContext = function getChildContext() { var _this$props = this.props, controlId = _this$props.controlId, validationState = _this$props.validationState; return { $bs_formGroup: { controlId: controlId, validationState: validationState } }; }; _proto.hasFeedback = function hasFeedback(children) { var _this = this; return __WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__["a" /* default */].some(children, function (child) { return child.props.bsRole === 'feedback' || child.props.children && _this.hasFeedback(child.props.children); }); }; _proto.render = function render() { var _this$props2 = this.props, validationState = _this$props2.validationState, className = _this$props2.className, children = _this$props2.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props2, ["validationState", "className", "children"]); var _splitBsPropsAndOmit = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsPropsAndOmit"])(props, ['controlId']), bsProps = _splitBsPropsAndOmit[0], elementProps = _splitBsPropsAndOmit[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps), { 'has-feedback': this.hasFeedback(children) }); if (validationState) { classes["has-" + validationState] = true; } return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) }), children); }; return FormGroup; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); FormGroup.propTypes = propTypes; FormGroup.childContextTypes = childContextTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('form-group', Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsSizes"])([__WEBPACK_IMPORTED_MODULE_7__utils_StyleConfig__["c" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_7__utils_StyleConfig__["c" /* Size */].SMALL], FormGroup))); /***/ }), /* 3957 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__ = __webpack_require__(13); var HelpBlock = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(HelpBlock, _React$Component); function HelpBlock() { return _React$Component.apply(this, arguments) || this; } var _proto = HelpBlock.prototype; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return HelpBlock; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["bsClass"])('help-block', HelpBlock)); /***/ }), /* 3958 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { /** * Sets image as responsive image */ responsive: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Sets image shape as rounded */ rounded: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Sets image shape as circle */ circle: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * Sets image shape as thumbnail */ thumbnail: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool }; var defaultProps = { responsive: false, rounded: false, circle: false, thumbnail: false }; var Image = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Image, _React$Component); function Image() { return _React$Component.apply(this, arguments) || this; } var _proto = Image.prototype; _proto.render = function render() { var _classes; var _this$props = this.props, responsive = _this$props.responsive, rounded = _this$props.rounded, circle = _this$props.circle, thumbnail = _this$props.thumbnail, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["responsive", "rounded", "circle", "thumbnail", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = (_classes = {}, _classes[Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps, 'responsive')] = responsive, _classes[Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps, 'rounded')] = rounded, _classes[Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps, 'circle')] = circle, _classes[Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps, 'thumbnail')] = thumbnail, _classes); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("img", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return Image; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Image.propTypes = propTypes; Image.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('img', Image)); /***/ }), /* 3959 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InputGroupAddon__ = __webpack_require__(3960); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__InputGroupButton__ = __webpack_require__(3961); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__ = __webpack_require__(79); var InputGroup = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(InputGroup, _React$Component); function InputGroup() { return _React$Component.apply(this, arguments) || this; } var _proto = InputGroup.prototype; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return InputGroup; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); InputGroup.Addon = __WEBPACK_IMPORTED_MODULE_5__InputGroupAddon__["a" /* default */]; InputGroup.Button = __WEBPACK_IMPORTED_MODULE_6__InputGroupButton__["a" /* default */]; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('input-group', Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsSizes"])([__WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__["c" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_8__utils_StyleConfig__["c" /* Size */].SMALL], InputGroup))); /***/ }), /* 3960 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__ = __webpack_require__(13); var InputGroupAddon = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(InputGroupAddon, _React$Component); function InputGroupAddon() { return _React$Component.apply(this, arguments) || this; } var _proto = InputGroupAddon.prototype; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return InputGroupAddon; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["bsClass"])('input-group-addon', InputGroupAddon)); /***/ }), /* 3961 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__ = __webpack_require__(13); var InputGroupButton = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(InputGroupButton, _React$Component); function InputGroupButton() { return _React$Component.apply(this, arguments) || this; } var _proto = InputGroupButton.prototype; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return InputGroupButton; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["bsClass"])('input-group-btn', InputGroupButton)); /***/ }), /* 3962 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'div' }; var Jumbotron = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Jumbotron, _React$Component); function Jumbotron() { return _React$Component.apply(this, arguments) || this; } var _proto = Jumbotron.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, classes) })); }; return Jumbotron; }(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component); Jumbotron.propTypes = propTypes; Jumbotron.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('jumbotron', Jumbotron)); /***/ }), /* 3963 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values__ = __webpack_require__(88); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_StyleConfig__ = __webpack_require__(79); var Label = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Label, _React$Component); function Label() { return _React$Component.apply(this, arguments) || this; } var _proto = Label.prototype; _proto.hasContent = function hasContent(children) { var result = false; __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.forEach(children, function (child) { if (result) { return; } if (child || child === 0) { result = true; } }); return result; }; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["className", "children"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps), { // Hack for collapsing on IE8. hidden: !this.hasContent(children) }); return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("span", Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, classes) }), children); }; return Label; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('label', Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsStyles"])(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_values___default()(__WEBPACK_IMPORTED_MODULE_7__utils_StyleConfig__["d" /* State */]).concat([__WEBPACK_IMPORTED_MODULE_7__utils_StyleConfig__["e" /* Style */].DEFAULT, __WEBPACK_IMPORTED_MODULE_7__utils_StyleConfig__["e" /* Style */].PRIMARY]), __WEBPACK_IMPORTED_MODULE_7__utils_StyleConfig__["e" /* Style */].DEFAULT, Label))); /***/ }), /* 3964 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ListGroupItem__ = __webpack_require__(1581); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__ = __webpack_require__(95); var propTypes = { /** * You can use a custom element type for this component. * * If not specified, it will be treated as `'li'` if every child is a * non-actionable ``, and `'div'` otherwise. */ componentClass: __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default.a }; function getDefaultComponent(children) { if (!children) { // FIXME: This is the old behavior. Is this right? return 'div'; } if (__WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__["a" /* default */].some(children, function (child) { return child.type !== __WEBPACK_IMPORTED_MODULE_6__ListGroupItem__["a" /* default */] || child.props.href || child.props.onClick; })) { return 'div'; } return 'ul'; } var ListGroup = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ListGroup, _React$Component); function ListGroup() { return _React$Component.apply(this, arguments) || this; } var _proto = ListGroup.prototype; _proto.render = function render() { var _this$props = this.props, children = _this$props.children, _this$props$component = _this$props.componentClass, Component = _this$props$component === void 0 ? getDefaultComponent(children) : _this$props$component, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["children", "componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["getClassSet"])(bsProps); var useListItem = Component === 'ul' && __WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__["a" /* default */].every(children, function (child) { return child.type === __WEBPACK_IMPORTED_MODULE_6__ListGroupItem__["a" /* default */]; }); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) }), useListItem ? __WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__["a" /* default */].map(children, function (child) { return Object(__WEBPACK_IMPORTED_MODULE_4_react__["cloneElement"])(child, { listItem: true }); }) : children); }; return ListGroup; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); ListGroup.propTypes = propTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('list-group', ListGroup)); /***/ }), /* 3965 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Media__ = __webpack_require__(546); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { /** * Align the media to the top, middle, or bottom of the media object. */ align: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOf(['top', 'middle', 'bottom']), componentClass: __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'div' }; var MediaBody = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(MediaBody, _React$Component); function MediaBody() { return _React$Component.apply(this, arguments) || this; } var _proto = MediaBody.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, align = _this$props.align, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "align", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["getClassSet"])(bsProps); if (align) { // The class is e.g. `media-top`, not `media-left-top`. classes[Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["prefix"])(__WEBPACK_IMPORTED_MODULE_7__Media__["a" /* default */].defaultProps, align)] = true; } return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return MediaBody; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); MediaBody.propTypes = propTypes; MediaBody.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_8__utils_bootstrapUtils__["bsClass"])('media-body', MediaBody)); /***/ }), /* 3966 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_elementType___default.a }; var defaultProps = { componentClass: 'h4' }; var MediaHeading = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(MediaHeading, _React$Component); function MediaHeading() { return _React$Component.apply(this, arguments) || this; } var _proto = MediaHeading.prototype; _proto.render = function render() { var _this$props = this.props, Component = _this$props.componentClass, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["componentClass", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return MediaHeading; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); MediaHeading.propTypes = propTypes; MediaHeading.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('media-heading', MediaHeading)); /***/ }), /* 3967 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Media__ = __webpack_require__(546); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { /** * Align the media to the top, middle, or bottom of the media object. */ align: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOf(['top', 'middle', 'bottom']) }; var MediaLeft = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(MediaLeft, _React$Component); function MediaLeft() { return _React$Component.apply(this, arguments) || this; } var _proto = MediaLeft.prototype; _proto.render = function render() { var _this$props = this.props, align = _this$props.align, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["align", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["getClassSet"])(bsProps); if (align) { // The class is e.g. `media-top`, not `media-left-top`. classes[Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(__WEBPACK_IMPORTED_MODULE_6__Media__["a" /* default */].defaultProps, align)] = true; } return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return MediaLeft; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); MediaLeft.propTypes = propTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('media-left', MediaLeft)); /***/ }), /* 3968 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__ = __webpack_require__(13); var MediaList = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(MediaList, _React$Component); function MediaList() { return _React$Component.apply(this, arguments) || this; } var _proto = MediaList.prototype; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("ul", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return MediaList; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["bsClass"])('media-list', MediaList)); /***/ }), /* 3969 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__ = __webpack_require__(13); var MediaListItem = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(MediaListItem, _React$Component); function MediaListItem() { return _React$Component.apply(this, arguments) || this; } var _proto = MediaListItem.prototype; _proto.render = function render() { var _this$props = this.props, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["getClassSet"])(bsProps); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("li", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return MediaListItem; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["bsClass"])('media', MediaListItem)); /***/ }), /* 3970 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Media__ = __webpack_require__(546); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { /** * Align the media to the top, middle, or bottom of the media object. */ align: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOf(['top', 'middle', 'bottom']) }; var MediaRight = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(MediaRight, _React$Component); function MediaRight() { return _React$Component.apply(this, arguments) || this; } var _proto = MediaRight.prototype; _proto.render = function render() { var _this$props = this.props, align = _this$props.align, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["align", "className"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["getClassSet"])(bsProps); if (align) { // The class is e.g. `media-top`, not `media-right-top`. classes[Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(__WEBPACK_IMPORTED_MODULE_6__Media__["a" /* default */].defaultProps, align)] = true; } return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return MediaRight; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); MediaRight.propTypes = propTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('media-right', MediaRight)); /***/ }), /* 3971 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_all__ = __webpack_require__(159); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_all___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_all__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__SafeAnchor__ = __webpack_require__(132); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__ = __webpack_require__(69); var propTypes = { /** * Highlight the menu item as active. */ active: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * Disable the menu item, making it unselectable. */ disabled: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * Styles the menu item as a horizontal rule, providing visual separation between * groups of menu items. */ divider: __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_all___default()(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, function (_ref) { var divider = _ref.divider, children = _ref.children; return divider && children ? new Error('Children will not be rendered for dividers') : null; }), /** * Value passed to the `onSelect` handler, useful for identifying the selected menu item. */ eventKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any, /** * Styles the menu item as a header label, useful for describing a group of menu items. */ header: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * HTML `href` attribute corresponding to `a.href`. */ href: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, /** * Callback fired when the menu item is clicked. */ onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, /** * Callback fired when the menu item is selected. * * ```js * (eventKey: any, event: Object) => any * ``` */ onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func }; var defaultProps = { divider: false, disabled: false, header: false }; var MenuItem = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(MenuItem, _React$Component); function MenuItem(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; _this.handleClick = _this.handleClick.bind(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); return _this; } var _proto = MenuItem.prototype; _proto.handleClick = function handleClick(event) { var _this$props = this.props, href = _this$props.href, disabled = _this$props.disabled, onSelect = _this$props.onSelect, eventKey = _this$props.eventKey; if (!href || disabled) { event.preventDefault(); } if (disabled) { return; } if (onSelect) { onSelect(eventKey, event); } }; _proto.render = function render() { var _this$props2 = this.props, active = _this$props2.active, disabled = _this$props2.disabled, divider = _this$props2.divider, header = _this$props2.header, onClick = _this$props2.onClick, className = _this$props2.className, style = _this$props2.style, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props2, ["active", "disabled", "divider", "header", "onClick", "className", "style"]); var _splitBsPropsAndOmit = Object(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["splitBsPropsAndOmit"])(props, ['eventKey', 'onSelect']), bsProps = _splitBsPropsAndOmit[0], elementProps = _splitBsPropsAndOmit[1]; if (divider) { // Forcibly blank out the children; separators shouldn't render any. elementProps.children = undefined; return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("li", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { role: "separator", className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, 'divider'), style: style })); } if (header) { return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("li", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { role: "heading", className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, Object(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["prefix"])(bsProps, 'header')), style: style })); } return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("li", { role: "presentation", className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, { active: active, disabled: disabled }), style: style }, __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__SafeAnchor__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { role: "menuitem", tabIndex: "-1", onClick: Object(__WEBPACK_IMPORTED_MODULE_10__utils_createChainedFunction__["a" /* default */])(onClick, this.handleClick) }))); }; return MenuItem; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); MenuItem.propTypes = propTypes; MenuItem.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["bsClass"])('dropdown', MenuItem)); /***/ }), /* 3972 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_assertThisInitialized__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_events__ = __webpack_require__(661); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_events___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_dom_helpers_events__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_dom_helpers_ownerDocument__ = __webpack_require__(188); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_dom_helpers_ownerDocument___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_dom_helpers_ownerDocument__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_dom_helpers_util_inDOM__ = __webpack_require__(142); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_dom_helpers_util_inDOM___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_dom_helpers_util_inDOM__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_dom_helpers_util_scrollbarSize__ = __webpack_require__(278); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_dom_helpers_util_scrollbarSize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_dom_helpers_util_scrollbarSize__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_react_dom__ = __webpack_require__(18); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_react_dom__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react_overlays_lib_Modal__ = __webpack_require__(662); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react_overlays_lib_Modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_react_overlays_lib_Modal__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_react_overlays_lib_utils_isOverflowing__ = __webpack_require__(451); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_react_overlays_lib_utils_isOverflowing___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_react_overlays_lib_utils_isOverflowing__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__Fade__ = __webpack_require__(545); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__ModalBody__ = __webpack_require__(1582); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__ModalDialog__ = __webpack_require__(1583); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__ModalFooter__ = __webpack_require__(1584); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__ModalHeader__ = __webpack_require__(1585); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__ModalTitle__ = __webpack_require__(1586); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__utils_createChainedFunction__ = __webpack_require__(69); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__utils_splitComponentProps__ = __webpack_require__(544); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__utils_StyleConfig__ = __webpack_require__(79); var propTypes = Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, __WEBPACK_IMPORTED_MODULE_12_react_overlays_lib_Modal___default.a.propTypes, __WEBPACK_IMPORTED_MODULE_17__ModalDialog__["a" /* default */].propTypes, { /** * Include a backdrop component. Specify 'static' for a backdrop that doesn't * trigger an "onHide" when clicked. */ backdrop: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.oneOf(['static', true, false]), /** * Add an optional extra class name to .modal-backdrop * It could end up looking like class="modal-backdrop foo-modal-backdrop in". */ backdropClassName: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.string, /** * Close the modal when escape key is pressed */ keyboard: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.bool, /** * Open and close the Modal with a slide and fade animation. */ animation: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.bool, /** * A Component type that provides the modal content Markup. This is a useful * prop when you want to use your own styles and markup to create a custom * modal component. */ dialogComponentClass: __WEBPACK_IMPORTED_MODULE_14_prop_types_extra_lib_elementType___default.a, /** * When `true` The modal will automatically shift focus to itself when it * opens, and replace it to the last focused element when it closes. * Generally this should never be set to false as it makes the Modal less * accessible to assistive technologies, like screen-readers. */ autoFocus: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.bool, /** * When `true` The modal will prevent focus from leaving the Modal while * open. Consider leaving the default value here, as it is necessary to make * the Modal work well with assistive technologies, such as screen readers. */ enforceFocus: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.bool, /** * When `true` The modal will restore focus to previously focused element once * modal is hidden */ restoreFocus: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.bool, /** * When `true` The modal will show itself. */ show: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.bool, /** * A callback fired when the header closeButton or non-static backdrop is * clicked. Required if either are specified. */ onHide: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func, /** * Callback fired before the Modal transitions in */ onEnter: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func, /** * Callback fired as the Modal begins to transition in */ onEntering: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func, /** * Callback fired after the Modal finishes transitioning in */ onEntered: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func, /** * Callback fired right before the Modal transitions out */ onExit: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func, /** * Callback fired as the Modal begins to transition out */ onExiting: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func, /** * Callback fired after the Modal finishes transitioning out */ onExited: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func, /** * @private */ container: __WEBPACK_IMPORTED_MODULE_12_react_overlays_lib_Modal___default.a.propTypes.container }); var defaultProps = Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, __WEBPACK_IMPORTED_MODULE_12_react_overlays_lib_Modal___default.a.defaultProps, { animation: true, dialogComponentClass: __WEBPACK_IMPORTED_MODULE_17__ModalDialog__["a" /* default */] }); var childContextTypes = { $bs_modal: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.shape({ onHide: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func }) }; /* eslint-disable no-use-before-define, react/no-multi-comp */ function DialogTransition(props) { return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__Fade__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { timeout: Modal.TRANSITION_DURATION })); } function BackdropTransition(props) { return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__Fade__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { timeout: Modal.BACKDROP_TRANSITION_DURATION })); } /* eslint-enable no-use-before-define */ var Modal = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Modal, _React$Component); function Modal(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; _this.handleEntering = _this.handleEntering.bind(Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleExited = _this.handleExited.bind(Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleWindowResize = _this.handleWindowResize.bind(Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.handleDialogClick = _this.handleDialogClick.bind(Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.setModalRef = _this.setModalRef.bind(Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_assertThisInitialized__["a" /* default */])(_this))); _this.state = { style: {} }; return _this; } var _proto = Modal.prototype; _proto.getChildContext = function getChildContext() { return { $bs_modal: { onHide: this.props.onHide } }; }; _proto.componentWillUnmount = function componentWillUnmount() { // Clean up the listener if we need to. this.handleExited(); }; _proto.setModalRef = function setModalRef(ref) { this._modal = ref; }; _proto.handleDialogClick = function handleDialogClick(e) { if (e.target !== e.currentTarget) { return; } this.props.onHide(); }; _proto.handleEntering = function handleEntering() { // FIXME: This should work even when animation is disabled. __WEBPACK_IMPORTED_MODULE_5_dom_helpers_events___default.a.on(window, 'resize', this.handleWindowResize); this.updateStyle(); }; _proto.handleExited = function handleExited() { // FIXME: This should work even when animation is disabled. __WEBPACK_IMPORTED_MODULE_5_dom_helpers_events___default.a.off(window, 'resize', this.handleWindowResize); }; _proto.handleWindowResize = function handleWindowResize() { this.updateStyle(); }; _proto.updateStyle = function updateStyle() { if (!__WEBPACK_IMPORTED_MODULE_7_dom_helpers_util_inDOM___default.a) { return; } var dialogNode = this._modal.getDialogElement(); var dialogHeight = dialogNode.scrollHeight; var document = __WEBPACK_IMPORTED_MODULE_6_dom_helpers_ownerDocument___default()(dialogNode); var bodyIsOverflowing = __WEBPACK_IMPORTED_MODULE_13_react_overlays_lib_utils_isOverflowing___default()(__WEBPACK_IMPORTED_MODULE_11_react_dom___default.a.findDOMNode(this.props.container || document.body)); var modalIsOverflowing = dialogHeight > document.documentElement.clientHeight; this.setState({ style: { paddingRight: bodyIsOverflowing && !modalIsOverflowing ? __WEBPACK_IMPORTED_MODULE_8_dom_helpers_util_scrollbarSize___default()() : undefined, paddingLeft: !bodyIsOverflowing && modalIsOverflowing ? __WEBPACK_IMPORTED_MODULE_8_dom_helpers_util_scrollbarSize___default()() : undefined } }); }; _proto.render = function render() { var _this$props = this.props, backdrop = _this$props.backdrop, backdropClassName = _this$props.backdropClassName, animation = _this$props.animation, show = _this$props.show, Dialog = _this$props.dialogComponentClass, className = _this$props.className, style = _this$props.style, children = _this$props.children, onEntering = _this$props.onEntering, onExited = _this$props.onExited, props = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["backdrop", "backdropClassName", "animation", "show", "dialogComponentClass", "className", "style", "children", "onEntering", "onExited"]); var _splitComponentProps = Object(__WEBPACK_IMPORTED_MODULE_23__utils_splitComponentProps__["a" /* default */])(props, __WEBPACK_IMPORTED_MODULE_12_react_overlays_lib_Modal___default.a), baseModalProps = _splitComponentProps[0], dialogProps = _splitComponentProps[1]; var inClassName = show && !animation && 'in'; return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12_react_overlays_lib_Modal___default.a, Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, baseModalProps, { ref: this.setModalRef, show: show, containerClassName: Object(__WEBPACK_IMPORTED_MODULE_21__utils_bootstrapUtils__["prefix"])(props, 'open'), transition: animation ? DialogTransition : undefined, backdrop: backdrop, backdropTransition: animation ? BackdropTransition : undefined, backdropClassName: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(Object(__WEBPACK_IMPORTED_MODULE_21__utils_bootstrapUtils__["prefix"])(props, 'backdrop'), backdropClassName, inClassName), onEntering: Object(__WEBPACK_IMPORTED_MODULE_22__utils_createChainedFunction__["a" /* default */])(onEntering, this.handleEntering), onExited: Object(__WEBPACK_IMPORTED_MODULE_22__utils_createChainedFunction__["a" /* default */])(onExited, this.handleExited) }), __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(Dialog, Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, dialogProps, { style: Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, this.state.style, style), className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, inClassName), onClick: backdrop === true ? this.handleDialogClick : null }), children)); }; return Modal; }(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component); Modal.propTypes = propTypes; Modal.defaultProps = defaultProps; Modal.childContextTypes = childContextTypes; Modal.Body = __WEBPACK_IMPORTED_MODULE_16__ModalBody__["a" /* default */]; Modal.Header = __WEBPACK_IMPORTED_MODULE_19__ModalHeader__["a" /* default */]; Modal.Title = __WEBPACK_IMPORTED_MODULE_20__ModalTitle__["a" /* default */]; Modal.Footer = __WEBPACK_IMPORTED_MODULE_18__ModalFooter__["a" /* default */]; Modal.Dialog = __WEBPACK_IMPORTED_MODULE_17__ModalDialog__["a" /* default */]; Modal.TRANSITION_DURATION = 300; Modal.BACKDROP_TRANSITION_DURATION = 150; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_21__utils_bootstrapUtils__["bsClass"])('modal', Object(__WEBPACK_IMPORTED_MODULE_21__utils_bootstrapUtils__["bsSizes"])([__WEBPACK_IMPORTED_MODULE_24__utils_StyleConfig__["c" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_24__utils_StyleConfig__["c" /* Size */].SMALL], Modal))); /***/ }), /* 3973 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_assertThisInitialized__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_uncontrollable__ = __webpack_require__(75); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_uncontrollable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_uncontrollable__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Grid__ = __webpack_require__(1580); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__NavbarBrand__ = __webpack_require__(1588); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__NavbarCollapse__ = __webpack_require__(3974); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__NavbarHeader__ = __webpack_require__(3975); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__NavbarToggle__ = __webpack_require__(3976); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__utils_StyleConfig__ = __webpack_require__(79); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__utils_createChainedFunction__ = __webpack_require__(69); // TODO: Remove this pragma once we upgrade eslint-config-airbnb. /* eslint-disable react/no-multi-comp */ var propTypes = { /** * Create a fixed navbar along the top of the screen, that scrolls with the * page */ fixedTop: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * Create a fixed navbar along the bottom of the screen, that scrolls with * the page */ fixedBottom: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * Create a full-width navbar that scrolls away with the page */ staticTop: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * An alternative dark visual style for the Navbar */ inverse: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * Allow the Navbar to fluidly adjust to the page or container width, instead * of at the predefined screen breakpoints */ fluid: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * Set a custom element for this component. */ componentClass: __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default.a, /** * A callback fired when the `` body collapses or expands. Fired when * a `` is clicked and called with the new `expanded` * boolean value. * * @controllable expanded */ onToggle: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, /** * A callback fired when a descendant of a child `