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

META-INF.resources.main-8514146b6acc9e5dacd8.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-2024 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-2024 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$19.$$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', '$sprintf', '$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: " + (self.$sprintf("%05.5f", self.$read_parse().$to_f()))); to.$puts("" + " Time to convert document: " + (self.$sprintf("%05.5f", self.$convert().$to_f()))); return to.$puts("" + " Total time (read, parse and convert): " + (self.$sprintf("%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_contents', '$syntax_highlighter', '$size', '$docinfo', '$id', '$sections?', '$doctype', '$role?', '$role', '$join', '$noheader', '$convert', '$converter', '$generate_manname_section', '$header?', '$notitle', '$title', '$header', '$each', '$authors', '$>', '$name', '$email', '$sub_macros', '$+', '$downcase', '$concat', '$content', '$footnotes?', '$!', '$footnotes', '$index', '$text', '$nofooter', '$docinfo?', '$[]=', '$delete_at', '$inspect', '$!=', '$to_i', '$attributes', '$document', '$sections', '$level', '$caption', '$captioned_title', '$numbered', '$<=', '$<', '$sectname', '$sectnum', '$convert_outline', '$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', '$columns', '$to_h', '$rows', '$colspan', '$rowspan', '$unshift', '$shift', '$split', '$pop', '$nil_or_empty?', '$type', '$catalog', '$get_root_document', '$xreftext', '$target', '$reftext', '$chop', '$sub', '$match', '$private', '$upcase', '$nested?', '$parent_document', '$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$55, $Html5Converter_convert_inline_kbd$56, $Html5Converter_convert_inline_menu$57, $Html5Converter_convert_inline_quoted$58, $Html5Converter_read_svg_contents$59, $Html5Converter_append_boolean_attribute$61, $Html5Converter_append_link_constraint_attrs$62, $Html5Converter_encode_attribute_value$63, $Html5Converter_generate_manname_section$64, $Html5Converter_get_root_document$65, $Html5Converter_method_missing$66, $Html5Converter_respond_to_missing$ques$67, $writer = nil; self.$$prototype.void_element_slash = self.$$prototype.xml_mode = self.$$prototype.refs = self.$$prototype.resolving_xref = 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\b[^>]*|\/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')) + "*?(?=])")); Opal.const_set($nesting[0], 'SvgStartTagRx', /^]*)?>/); } 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, $case = nil, $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; }; return (function() {$case = transform; if ("inline_quoted"['$===']($case)) {return self.$convert_inline_quoted(node)} else if ("paragraph"['$===']($case)) {return self.$convert_paragraph(node)} else if ("inline_anchor"['$===']($case)) {return self.$convert_inline_anchor(node)} else if ("section"['$===']($case)) {return self.$convert_section(node)} else if ("listing"['$===']($case)) {return self.$convert_listing(node)} else if ("literal"['$===']($case)) {return self.$convert_literal(node)} else if ("ulist"['$===']($case)) {return self.$convert_ulist(node)} else if ("olist"['$===']($case)) {return self.$convert_olist(node)} else if ("dlist"['$===']($case)) {return self.$convert_dlist(node)} else if ("admonition"['$===']($case)) {return self.$convert_admonition(node)} else if ("colist"['$===']($case)) {return self.$convert_colist(node)} else if ("embedded"['$===']($case)) {return self.$convert_embedded(node)} else if ("example"['$===']($case)) {return self.$convert_example(node)} else if ("floating_title"['$===']($case)) {return self.$convert_floating_title(node)} else if ("image"['$===']($case)) {return self.$convert_image(node)} else if ("inline_break"['$===']($case)) {return self.$convert_inline_break(node)} else if ("inline_button"['$===']($case)) {return self.$convert_inline_button(node)} else if ("inline_callout"['$===']($case)) {return self.$convert_inline_callout(node)} else if ("inline_footnote"['$===']($case)) {return self.$convert_inline_footnote(node)} else if ("inline_image"['$===']($case)) {return self.$convert_inline_image(node)} else if ("inline_indexterm"['$===']($case)) {return self.$convert_inline_indexterm(node)} else if ("inline_kbd"['$===']($case)) {return self.$convert_inline_kbd(node)} else if ("inline_menu"['$===']($case)) {return self.$convert_inline_menu(node)} else if ("open"['$===']($case)) {return self.$convert_open(node)} else if ("page_break"['$===']($case)) {return self.$convert_page_break(node)} else if ("preamble"['$===']($case)) {return self.$convert_preamble(node)} else if ("quote"['$===']($case)) {return self.$convert_quote(node)} else if ("sidebar"['$===']($case)) {return self.$convert_sidebar(node)} else if ("stem"['$===']($case)) {return self.$convert_stem(node)} else if ("table"['$===']($case)) {return self.$convert_table(node)} else if ("thematic_break"['$===']($case)) {return self.$convert_thematic_break(node)} else if ("verse"['$===']($case)) {return self.$convert_verse(node)} else if ("video"['$===']($case)) {return self.$convert_video(node)} else if ("document"['$===']($case)) {return self.$convert_document(node)} else if ("toc"['$===']($case)) {return self.$convert_toc(node)} else if ("pass"['$===']($case)) {return self.$convert_pass(node)} else if ("audio"['$===']($case)) {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, max_width_attr = 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, syntax_hl_docinfo_head_idx = nil, docinfo_content = nil, id_attr = nil, sectioned = nil, classes = nil, details = nil, idx = nil, $writer = 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"); max_width_attr = (function() {if ($truthy(node['$attr?']("max-width"))) { return "" + " style=\"max-width: " + (node.$attr("max-width")) + ";\"" } else { return "" }; return nil; })(); 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((syntax_hl = node.$syntax_highlighter()))) { result['$<<']((syntax_hl_docinfo_head_idx = result.$size()))}; if ($truthy((docinfo_content = node.$docinfo())['$empty?']())) { } else { result['$<<'](docinfo_content) }; result['$<<'](""); id_attr = (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())}; 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" + (node.$converter().$convert(node, "outline")) + "\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" + (node.$converter().$convert(node, "outline")) + "\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(syntax_hl)) { if ($truthy(syntax_hl['$docinfo?']("head"))) { $writer = [syntax_hl_docinfo_head_idx, syntax_hl.$docinfo("head", node, $hash2(["cdn_base_url", "linkcss", "self_closing_tag_slash"], {"cdn_base_url": cdn_base_url, "linkcss": linkcss, "self_closing_tag_slash": slash}))]; $send(result, '[]=', Opal.to_a($writer)); $writer[$rb_minus($writer["length"], 1)]; } else { result.$delete_at(syntax_hl_docinfo_head_idx) }; if ($truthy(syntax_hl['$docinfo?']("footer"))) { 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" + (node.$converter().$convert(node, "outline")) + "\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, $case = 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))) { $case = node.$sectname(); if ("chapter"['$===']($case)) {title = "" + ((function() {if ($truthy((signifier = doc_attrs['$[]']("chapter-signifier")))) { return "" + (signifier) + " " } else { return "" }; return nil; })()) + (node.$sectnum()) + " " + (node.$title())} else if ("part"['$===']($case)) {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, $case = nil, classes = 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; })(); $case = node.$style(); if ("qanda"['$===']($case)) {classes = ["qlist", "qanda", node.$role()]} else if ("horizontal"['$===']($case)) {classes = ["hdlist", node.$role()]} else {classes = ["dlist", node.$style(), node.$role()]}; class_attribute = "" + " class=\"" + (classes.$compact().$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)) { } else { return nil; }; result['$<<']("
"); if ($truthy(dd['$text?']())) { result['$<<']("" + "

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

")}; if ($truthy(dd['$blocks?']())) { result['$<<'](dd.$content())}; return result['$<<']("
");}, $$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, self = this, target = nil, width_attr = nil, height_attr = 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 = node['$attr?']("format", "svg")) ? $b : target['$include?'](".svg"))) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $a))) { if ($truthy(node['$option?']("inline"))) { img = ($truthy($a = self.$read_svg_contents(node, target)) ? $a : "" + "" + (node.$alt()) + "") } else if ($truthy(node['$option?']("interactive"))) { fallback = (function() {if ($truthy(node['$attr?']("fallback"))) { return "" + "\""" } else { return "" + "" + (node.$alt()) + "" }; return nil; })(); img = "" + "" + (fallback) + ""; } else { img = "" + "\""" } } else { img = "" + "\""" }; 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, $rb_minus((($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$count($$($nesting, 'LF')), 1))) + ($$($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" + (doc.$converter().$convert(doc, "outline")) + "\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, frame = nil, classes = nil, stripes = nil, style_attribute = nil, autowidth = nil, tablewidth = nil, role = nil, class_attribute = nil, slash = nil; result = []; id_attribute = (function() {if ($truthy(node.$id())) { return "" + " id=\"" + (node.$id()) + "\"" } else { return "" }; return nil; })(); if ((frame = node.$attr("frame", "all", "table-frame"))['$==']("topbot")) { frame = "ends"}; classes = ["tableblock", "" + "frame-" + (frame), "" + "grid-" + (node.$attr("grid", "all", "table-grid"))]; if ($truthy((stripes = node.$attr("stripes", nil, "table-stripes")))) { classes['$<<']("" + "stripes-" + (stripes))}; style_attribute = ""; 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 { style_attribute = "" + " style=\"width: " + (tablewidth) + "%;\"" }; if ($truthy(node['$attr?']("float"))) { classes['$<<'](node.$attr("float"))}; if ($truthy((role = node.$role()))) { classes['$<<'](role)}; class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\""; 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" + (doc.$converter().$convert(doc, "outline", $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, target = nil, hash = nil, hash_param = 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, 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 = ["?"]; $b = node.$attr("target").$split("/", 2), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (hash = ($a[1] == null ? nil : $a[1])), $b; hash_param = (function() {if ($truthy((hash = ($truthy($a = hash) ? $a : node.$attr("hash"))))) { return "" + (($truthy($a = delimiter.$pop()) ? $a : "&")) + "h=" + (hash) } else { return "" }; return nil; })(); 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=" + (target) + "," + (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, $b, self = this, $case = nil, path = nil, attrs = nil, text = nil, ref = nil, refid = nil, top = nil, outer = 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 if ($truthy($$($nesting, 'AbstractNode')['$===']((ref = ($truthy($a = (self.refs = ($truthy($b = self.refs) ? $b : node.$document().$catalog()['$[]']("refs")))['$[]']((refid = node.$attributes()['$[]']("refid")))) ? $a : (function() {if ($truthy(refid['$nil_or_empty?']())) { return (top = self.$get_root_document(node)); } else { return nil }; return nil; })()))))) { if ($truthy(($truthy($a = (self.resolving_xref = ($truthy($b = self.resolving_xref) ? $b : (outer = true)))) ? outer : $a))) { if ($truthy((text = ref.$xreftext(node.$attr("xrefstyle", nil, true))))) { if ($truthy(text['$include?']("" + (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, guard = 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 if ($truthy($$$('::', 'Array')['$===']((guard = node.$attributes()['$[]']("guard"))))) { return "" + "<!--(" + (node.$text()) + ")-->" } else { return "" + (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, self = this, target = nil, type = nil, icons = nil, i_class_attr_val = nil, attrs = nil, img = nil, fallback = nil, class_attr_val = nil, role = nil; target = node.$target(); if ((type = ($truthy($a = node.$type()) ? $a : "image"))['$==']("icon")) { if ((icons = node.$document().$attr("icons"))['$==']("font")) { i_class_attr_val = "" + "fa fa-" + (target); if ($truthy(node['$attr?']("size"))) { i_class_attr_val = "" + (i_class_attr_val) + " fa-" + (node.$attr("size"))}; if ($truthy(node['$attr?']("flip"))) { i_class_attr_val = "" + (i_class_attr_val) + " fa-flip-" + (node.$attr("flip")) } else if ($truthy(node['$attr?']("rotate"))) { i_class_attr_val = "" + (i_class_attr_val) + " fa-rotate-" + (node.$attr("rotate"))}; attrs = (function() {if ($truthy(node['$attr?']("title"))) { return "" + " title=\"" + (node.$attr("title")) + "\"" } else { return "" }; return nil; })(); img = "" + ""; } else if ($truthy(icons)) { attrs = (function() {if ($truthy(node['$attr?']("width"))) { return "" + " width=\"" + (node.$attr("width")) + "\"" } else { return "" }; return nil; })(); if ($truthy(node['$attr?']("height"))) { attrs = "" + (attrs) + " height=\"" + (node.$attr("height")) + "\""}; if ($truthy(node['$attr?']("title"))) { attrs = "" + (attrs) + " title=\"" + (node.$attr("title")) + "\""}; img = "" + "\"""; } else { img = "" + "[" + (node.$alt()) + "]" } } else { attrs = (function() {if ($truthy(node['$attr?']("width"))) { return "" + " width=\"" + (node.$attr("width")) + "\"" } else { return "" }; return nil; })(); if ($truthy(node['$attr?']("height"))) { attrs = "" + (attrs) + " height=\"" + (node.$attr("height")) + "\""}; if ($truthy(node['$attr?']("title"))) { attrs = "" + (attrs) + " title=\"" + (node.$attr("title")) + "\""}; if ($truthy(($truthy($a = ($truthy($b = node['$attr?']("format", "svg")) ? $b : target['$include?'](".svg"))) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $a))) { if ($truthy(node['$option?']("inline"))) { img = ($truthy($a = self.$read_svg_contents(node, target)) ? $a : "" + "" + (node.$alt()) + "") } else if ($truthy(node['$option?']("interactive"))) { fallback = (function() {if ($truthy(node['$attr?']("fallback"))) { return "" + "\""" } else { return "" + "" + (node.$alt()) + "" }; return nil; })(); img = "" + "" + (fallback) + ""; } else { img = "" + "\""" } } else { img = "" + "\""" }; }; if ($truthy(node['$attr?']("link"))) { img = "" + "" + (img) + ""}; class_attr_val = type; if ($truthy((role = node.$role()))) { class_attr_val = (function() {if ($truthy(node['$attr?']("float"))) { return "" + (class_attr_val) + " " + (node.$attr("float")) + " " + (role) } else { return "" + (class_attr_val) + " " + (role) }; return nil; })() } else if ($truthy(node['$attr?']("float"))) { class_attr_val = "" + (class_attr_val) + " " + (node.$attr("float"))}; return "" + "" + (img) + ""; }, $Html5Converter_convert_inline_image$54.$$arity = 1); Opal.def(self, '$convert_inline_indexterm', $Html5Converter_convert_inline_indexterm$55 = function $$convert_inline_indexterm(node) { var self = this; if (node.$type()['$==']("visible")) { return node.$text() } else { return "" } }, $Html5Converter_convert_inline_indexterm$55.$$arity = 1); Opal.def(self, '$convert_inline_kbd', $Html5Converter_convert_inline_kbd$56 = 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$56.$$arity = 1); Opal.def(self, '$convert_inline_menu', $Html5Converter_convert_inline_menu$57 = 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$57.$$arity = 1); Opal.def(self, '$convert_inline_quoted', $Html5Converter_convert_inline_quoted$58 = 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$58.$$arity = 1); Opal.def(self, '$read_svg_contents', $Html5Converter_read_svg_contents$59 = function $$read_svg_contents(node, target) { var $$60, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil, start_tag_match = nil; if ($truthy((svg = node.$read_contents(target, $hash2(["start", "normalize", "label", "warn_if_empty"], {"start": node.$document().$attr("imagesdir"), "normalize": true, "label": "SVG", "warn_if_empty": true}))))) { if ($truthy(svg['$empty?']())) { return nil}; if ($truthy(svg['$start_with?']("");}, $$60.$$s = self, $$60.$$arity = 1, $$60)); 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$59.$$arity = 2); self.$private(); Opal.def(self, '$append_boolean_attribute', $Html5Converter_append_boolean_attribute$61 = function $$append_boolean_attribute(name, xml) { var self = this; if ($truthy(xml)) { return "" + " " + (name) + "=\"" + (name) + "\"" } else { return "" + " " + (name) } }, $Html5Converter_append_boolean_attribute$61.$$arity = 2); Opal.def(self, '$append_link_constraint_attrs', $Html5Converter_append_link_constraint_attrs$62 = 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$62.$$arity = -2); Opal.def(self, '$encode_attribute_value', $Html5Converter_encode_attribute_value$63 = function $$encode_attribute_value(val) { var self = this; if ($truthy(val['$include?']("\""))) { return val.$gsub("\"", """); } else { return val } }, $Html5Converter_encode_attribute_value$63.$$arity = 1); Opal.def(self, '$generate_manname_section', $Html5Converter_generate_manname_section$64 = 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("mannames").$join(", ")) + " - " + (node.$attr("manpurpose")) + "

    \n" + "
    "; }, $Html5Converter_generate_manname_section$64.$$arity = 1); Opal.def(self, '$get_root_document', $Html5Converter_get_root_document$65 = function $$get_root_document(node) { var $a, self = this; while ($truthy((node = node.$document())['$nested?']())) { node = node.$parent_document() }; return node; }, $Html5Converter_get_root_document$65.$$arity = 1); Opal.def(self, '$method_missing', $Html5Converter_method_missing$66 = function $$method_missing(id, $a) { var $post_args, args, $b, $iter = $Html5Converter_method_missing$66.$$p, $yield = $iter || nil, self = this, name = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; if ($iter) $Html5Converter_method_missing$66.$$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); args = $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(args))); } else { return $send(self, Opal.find_super_dispatcher(self, 'method_missing', $Html5Converter_method_missing$66, false), $zuper, $iter) }; }, $Html5Converter_method_missing$66.$$arity = -2); return (Opal.def(self, '$respond_to_missing?', $Html5Converter_respond_to_missing$ques$67 = function(id, $a) { var $post_args, options, $b, self = this, name = nil; $post_args = Opal.slice.call(arguments, 1, arguments.length); options = $post_args;; return ($truthy($b = (name = id.$to_s())['$start_with?']("convert_")['$!']()) ? self['$handles?'](name) : $b); }, $Html5Converter_respond_to_missing$ques$67.$$arity = -2), nil) && 'respond_to_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, config = nil, processor = nil, extension = 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(), [])); 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(); extension = $$($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(); extension = $$($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(); extension = $$($nesting, 'ProcessorExtension').$new(kind, processor); } else { self.$raise($$$('::', 'ArgumentError'), "" + "Invalid arguments specified for registering " + (kind_name) + " extension: " + (args)) }; }; 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 localdate var localyear var localtime var localdatetime var docdate var doctime 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) 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) } 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, $truthy = Opal.truthy, $hash2 = Opal.hash2; Opal.add_stubs(['$require', '$==', '$to_h', '$sort', '$map', '$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', '$tap', '$each', '$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$2, $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($send(self.$constants(false), 'map', [], ($SafeMode$1 = function(sym){var self = $SafeMode$1.$$s || this; if (sym == null) { sym = nil; }; return [self.$const_get(sym), sym.$to_s().$downcase()];}, $SafeMode$1.$$s = self, $SafeMode$1.$$arity = 1, $SafeMode$1)), 'sort', [], ($SafeMode$2 = function($mlhs_tmp1, $mlhs_tmp2){var self = $SafeMode$2.$$s || this, $a, $b, a = nil, b = nil; if ($mlhs_tmp1 == null) { $mlhs_tmp1 = nil; }; if ($mlhs_tmp2 == null) { $mlhs_tmp2 = nil; }; $b = $mlhs_tmp1, $a = Opal.to_ary($b), (a = ($a[0] == null ? nil : $a[0])), $b; $b = $mlhs_tmp2, $a = Opal.to_ary($b), (b = ($a[0] == null ? nil : $a[0])), $b; return a['$<=>'](b);}, $SafeMode$2.$$s = self, $SafeMode$2.$$arity = 2, $SafeMode$2.$$has_top_level_mlhs_arg = true, $SafeMode$2)).$to_h(); 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_ATTRIBUTE_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.18.3"); Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.9"); Opal.const_set($nesting[0], 'DEFAULT_ATTRIBUTES', $hash2(["appendix-caption", "appendix-refsig", "caution-caption", "chapter-refsig", "example-caption", "figure-caption", "important-caption", "last-update-label", "note-caption", "part-refsig", "prewrap", "sectids", "section-refsig", "table-caption", "tip-caption", "toc-placement", "toc-title", "untitled-label", "version-label", "warning-caption"], {"appendix-caption": "Appendix", "appendix-refsig": "Appendix", "caution-caption": "Caution", "chapter-refsig": "Chapter", "example-caption": "Example", "figure-caption": "Figure", "important-caption": "Important", "last-update-label": "Last updated", "note-caption": "Note", "part-refsig": "Part", "prewrap": "", "sectids": "", "section-refsig": "Section", "table-caption": "Table", "tip-caption": "Tip", "toc-placement": "auto", "toc-title": "Table of Contents", "untitled-label": "Untitled", "version-label": "Version", "warning-caption": "Warning"})); 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 = {} if (hash) { var stringMap = hash.$$smap for (var stringMapKey in stringMap) { var stringMapValue = stringMap[stringMapKey] object[stringMapKey] = stringMapValue === Opal.nil ? undefined : stringMapValue } var numericMap = hash.$$map if (numericMap) { var positional = [] for (var numericMapKey in numericMap) { var entry = numericMap[numericMapKey] var numericMapValue = entry.value var index = entry.key - 1 positional[index] = numericMapValue === Opal.nil ? undefined : numericMapValue } if (positional.length > 0) { object.$positional = positional } } } return object } var fromHashKeys = function (hash) { var object = {} if (hash) { var data = hash.$$keys for (var key in data) { var value = data[key].value object[key.toString()] = value === Opal.nil ? undefined : 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 (Object.prototype.hasOwnProperty.call(functions, 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 && Object.prototype.hasOwnProperty.call(defaultFunctions, functionName)) { defaultFunctionsOverridden[functionName] = true } Opal.def(scope, '$' + functionName, function () { var args if (argProxyFunctions && Object.prototype.hasOwnProperty.call(argProxyFunctions, 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 (Object.prototype.hasOwnProperty.call(defaultFunctions, defaultFunctionName) && !Object.prototype.hasOwnProperty.call(defaultFunctionsOverridden, 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. * * @returns {string} - the version number of Asciidoctor core. * @memberof Asciidoctor */ Asciidoctor.prototype.getCoreVersion = function () { return this.$$const.VERSION } /** * Get Asciidoctor.js runtime environment information. * * @returns {Object} - the runtime environment including the ioModule, the platform, the engine and the framework. * @memberof Asciidoctor */ 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} - the {@link Document} object if the converted String is written to a file, * otherwise the converted String * @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); * @memberof Asciidoctor */ 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} - the {@link Document} object if the converted String is written to a file, * otherwise the converted String * @example * var html = asciidoctor.convertFile('./document.adoc'); * @memberof Asciidoctor */ 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} - 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} - 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. * @param {AbstractBlock} block - the block to append * @returns {AbstractBlock} - the parent block to which this block was appended. * @memberof AbstractBlock */ AbstractBlock.prototype.append = function (block) { this.$append(block) return this } /** * 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 * * @returns {string} - 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)" * @memberof AbstractBlock */ AbstractBlock.prototype.getTitle = function () { var title = this.$title() return title === Opal.nil ? undefined : title } /** * Set the String block title. * * @param {string} title - The block title * @returns {string} - the new String title assigned to this Block. * @memberof AbstractBlock */ AbstractBlock.prototype.setTitle = function (title) { title = typeof title === 'undefined' ? Opal.nil : title return this['$title='](title) } /** * Generate and assign caption to block if not already assigned. * * If the block has a title and a caption prefix is available for this block, * then build a caption from this information, assign it a number and store it * to the caption attribute on the block. * * If a caption has already been assigned to this block, do nothing. * * The parts of a complete caption are: ` . ` * This partial caption represents the part the precedes the title. * * @param {string} value - the String caption to assign to this block or nil to use document attribute. * @param {string} captionContext - the String context to use when resolving caption-related attributes. * If not provided, the name of the context for this block is used. Only certain contexts allow the caption to be looked up. * * @memberof AbstractBlock */ AbstractBlock.prototype.assignCaption = function (value, captionContext) { value = typeof value === 'undefined' ? Opal.nil : value captionContext = typeof captionContext === 'undefined' ? null : captionContext this.$assign_caption(value, captionContext) } /** * 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. * * @returns {string} - the converted String title prefixed with the caption, or just the converted String title if no caption is set * @memberof AbstractBlock */ AbstractBlock.prototype.getCaptionedTitle = function () { return this.$captioned_title() } /** * Get the style (block type qualifier) for this block. * * @returns {string} - the style for this block * @memberof AbstractBlock */ AbstractBlock.prototype.getStyle = function () { var style = this.style return style === Opal.nil ? undefined : style } /** * Set the style for this block. * * @param {string} style - Style * @memberof AbstractBlock */ AbstractBlock.prototype.setStyle = function (style) { this.style = style } /** * Get the location in the AsciiDoc source where this block begins. * * @returns {string} - the style for this block * @memberof AbstractBlock */ AbstractBlock.prototype.getSourceLocation = function () { var sourceLocation = this.source_location if (sourceLocation === Opal.nil) { return undefined } sourceLocation.getFile = function () { var file = this.file return file === Opal.nil ? undefined : file } sourceLocation.getDirectory = function () { var dir = this.dir return dir === Opal.nil ? undefined : dir } sourceLocation.getPath = function () { var path = this.path return path === Opal.nil ? undefined : path } sourceLocation.getLineNumber = function () { var lineno = this.lineno return lineno === Opal.nil ? undefined : lineno } return sourceLocation } /** * Get the caption for this block. * * @returns {string} - the caption for this block * @memberof AbstractBlock */ AbstractBlock.prototype.getCaption = function () { var caption = this.$caption() return caption === Opal.nil ? undefined : caption } /** * Set the caption for this block. * * @param {string} caption - Caption * @memberof AbstractBlock */ AbstractBlock.prototype.setCaption = function (caption) { this.caption = typeof caption === 'undefined' ? Opal.nil : caption } /** * Get the level of this section or the section level in which this block resides. * * @returns {number} - the level (Integer) of this section * @memberof AbstractBlock */ AbstractBlock.prototype.getLevel = function () { var level = this.level return level === Opal.nil ? undefined : level } /** * Get the substitution keywords to be applied to the contents of this block. * * @returns {Array<string>} - the list of {string} substitution keywords associated with this block. * @memberof AbstractBlock */ AbstractBlock.prototype.getSubstitutions = function () { return this.subs } /** * Check whether a given substitution keyword is present in the substitutions for this block. * * @returns {boolean} - whether the substitution is present on this block. * @memberof AbstractBlock */ AbstractBlock.prototype.hasSubstitution = function (substitution) { return this['$sub?'](substitution) } /** * Remove the specified substitution keyword from the list of substitutions for this block. * * @memberof AbstractBlock */ AbstractBlock.prototype.removeSubstitution = function (substitution) { this.$remove_sub(substitution) } /** * Checks if the {@link AbstractBlock} contains any child blocks. * * @returns {boolean} - whether the {@link AbstractBlock} has child blocks. * @memberof AbstractBlock */ AbstractBlock.prototype.hasBlocks = function () { return this.blocks.length > 0 } /** * Get the list of {@link AbstractBlock} sub-blocks for this block. * * @returns {Array<AbstractBlock>} - a list of {@link AbstractBlock} sub-blocks * @memberof AbstractBlock */ 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. * * @returns {string} - the converted result of the child blocks * @memberof AbstractBlock */ 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. * * @returns {string} - the converted String content for this block * @memberof AbstractBlock */ 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 } * * @returns {Array<AbstractBlock>} - a list of block-level nodes that match the filter or an empty list if no matches are found * @memberof AbstractBlock */ 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. * @returns {number} - the source line number where this block started * @memberof AbstractBlock */ 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. * @returns {boolean} - true if this block has child Section objects, otherwise false * @memberof AbstractBlock */ AbstractBlock.prototype.hasSections = function () { // REMIND: call directly the underlying method "$sections?" // once https://github.com/asciidoctor/asciidoctor/pull/3591 is merged and a new version is released. // return this['$sections?']() return this.next_section_index !== Opal.nil && this.next_section_index > 0 } /** * Get the Array of child Section objects. * Only applies to Document and Section instances. * @memberof AbstractBlock * @returns {Array<Section>} - 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). * @returns {string} - the numeral * @memberof AbstractBlock */ AbstractBlock.prototype.getNumeral = function () { return this.$numeral() } /** * Set the numeral of this block. * @param {string} value - The numeral value * @memberof AbstractBlock */ AbstractBlock.prototype.setNumeral = function (value) { this['$numeral='](value) } /** * A convenience method that checks whether the title of this block is defined. * * @returns {boolean} - a {boolean} indicating whether this block has a title. * @memberof AbstractBlock */ AbstractBlock.prototype.hasTitle = function () { return this['$title?']() } /** * Returns the converted alt text for this block image. * @returns {string} - the {string} value of the alt attribute with XML special character and replacement substitutions applied. * @memberof AbstractBlock */ AbstractBlock.prototype.getAlt = function () { return this.$alt() } // Section API /** * @description * Methods for managing sections of AsciiDoc content in a document. * * @example * <pre> * section = asciidoctor.Section.create() * section.setTitle('Section 1') * section.setId('sect1') * section.getBlocks().length // 0 * section.getId() // "sect1" * section.append(newBlock) * section.getBlocks().length // 1 * </pre> * @namespace * @extends AbstractBlock */ var Section = Opal.Asciidoctor.Section /** * Create a {Section} object. * @param {AbstractBlock} [parent] - The parent AbstractBlock. If set, must be a Document or Section object (default: undefined) * @param {number} [level] - The Integer level of this section (default: 1 more than parent level or 1 if parent not defined) * @param {boolean} [numbered] - A Boolean indicating whether numbering is enabled for this Section (default: false) * @param {Object} [opts] - An optional JSON of options (default: {}) * @returns {Section} - a new {Section} object * @memberof Section */ Section.create = function (parent, level, numbered, opts) { if (opts && opts.attributes) { opts.attributes = toHash(opts.attributes) } return this.$new(parent, level, numbered, toHash(opts)) } /** * Set the level of this section or the section level in which this block resides. * @param {number} level - Level (Integer) * @memberof AbstractBlock */ Section.prototype.setLevel = function (level) { this.level = level } /** * Get the 0-based index order of this section within the parent block. * @returns {number} * @memberof Section */ Section.prototype.getIndex = function () { return this.index } /** * Set the 0-based index order of this section within the parent block. * @param {string} index - The index order of this section * @memberof Section */ Section.prototype.setIndex = function (index) { this.index = index } /** * Get the section name of this section. * @returns {string|undefined} * @memberof Section */ Section.prototype.getSectionName = function () { var sectname = this.sectname return sectname === Opal.nil ? undefined : sectname } /** * Set the section name of this section. * @param {string} value - The section name * @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. * @returns {boolean} * @memberof Section */ Section.prototype.isSpecial = function () { return this.special } /** * Set the flag to indicate whether this is a special section or a child of one. * @param {boolean} value - A flag to indicated if this is a special section * @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). * @returns {boolean} * @memberof Section */ Section.prototype.isNumbered = function () { return this.numbered } /** * Get the caption for this section (only relevant for appendices). * @returns {string} * @memberof Section */ Section.prototype.getCaption = function () { var value = this.caption return value === Opal.nil ? undefined : value } /** * Get the name of the Section (title) * @returns {string} * @see {@link AbstractBlock#getTitle} * @memberof Section */ Section.prototype.getName = function () { return this.getTitle() } /** * @description * Methods for managing AsciiDoc content blocks. * * @example * block = asciidoctor.Block.create(parent, 'paragraph', {source: '_This_ is a <test>'}) * block.getContent() * // "<em>This</em> is a <test>" * * @namespace * @extends AbstractBlock */ var Block = Opal.Asciidoctor.Block /** * Create a {Block} object. * @param {AbstractBlock} parent - The parent {AbstractBlock} with a compound content model to which this {Block} will be appended. * @param {string} context - The context name for the type of content (e.g., "paragraph"). * @param {Object} [opts] - a JSON of options to customize block initialization: (default: {}) * @param {string} opts.content_model - indicates whether blocks can be nested in this {Block} ("compound"), * otherwise how the lines should be processed ("simple", "verbatim", "raw", "empty"). (default: "simple") * @param {Object} opts.attributes - a JSON of attributes (key/value pairs) to assign to this {Block}. (default: {}) * @param {string|Array<string>} opts.source - a String or {Array} of raw source for this {Block}. (default: undefined) * * IMPORTANT: If you don't specify the `subs` option, you must explicitly call the `commit_subs` method to resolve and assign the substitutions * to this block (which are resolved from the `subs` attribute, if specified, or the default substitutions based on this block's context). * If you want to use the default subs for a block, pass the option `subs: "default"`. * You can override the default subs using the `default_subs` option. * * @returns {Block} - a new {Block} object * @memberof Block */ Block.create = function (parent, context, opts) { if (opts && opts.attributes) { opts.attributes = toHash(opts.attributes) } return this.$new(parent, context, toHash(opts)) } /** * Get the source of this block. * @returns {string} - the String source of this block. * @memberof Block */ Block.prototype.getSource = function () { return this.$source() } /** * Get the source lines of this block. * @returns {Array<string>} - the String {Array} of source lines for this block. * @memberof Block */ Block.prototype.getSourceLines = function () { return this.lines } // AbstractNode API /** * @namespace * @description * An abstract base class that provides state and methods for managing a node of AsciiDoc content. * The state and methods on this class are common to all content segments in an AsciiDoc document. */ var AbstractNode = Opal.Asciidoctor.AbstractNode /** * Apply the specified substitutions to the text. * If no substitutions are specified, the following substitutions are applied: * <code>specialcharacters</code>, <code>quotes</code>, <code>attributes</code>, <code>replacements</code>, <code>macros</code>, and <code>post_replacements</code>. * * @param {string|Array<string>} text - The String or String Array of text to process; must not be undefined. * @param {Array<string>} [subs] - The substitutions to perform; must be an Array or undefined. * @returns {string|Array<string>} - a String or String Array to match the type of the text argument with substitutions applied. * @memberof AbstractNode */ AbstractNode.prototype.applySubstitutions = function (text, subs) { return this.$apply_subs(text, subs) } /** * Resolve the list of comma-delimited subs against the possible options. * * @param {string} subs - The comma-delimited String of substitution names or aliases. * @param {string} [type] - A String representing the context for which the subs are being resolved (default: 'block'). * @param {Array<string>} [defaults] - An Array of substitutions to start with when computing incremental substitutions (default: undefined). * @param {string} [subject] - The String to use in log messages to communicate the subject for which subs are being resolved (default: undefined) * * @returns {Array<string>} - An Array of Strings representing the substitution operation or nothing if no subs are found. * @memberof AbstractNode */ AbstractNode.prototype.resolveSubstitutions = function (subs, type, defaults, subject) { if (typeof type === 'undefined') { type = 'block' } if (typeof defaults === 'undefined') { defaults = Opal.nil } if (typeof subject === 'undefined') { subject = Opal.nil } const value = this.$resolve_subs(subs, type, defaults, subject) return value === Opal.nil ? undefined : value } /** * Call {@link AbstractNode#resolveSubstitutions} for the 'block' type. * * @see {@link AbstractNode#resolveSubstitutions} */ AbstractNode.prototype.resolveBlockSubstitutions = function (subs, defaults, subject) { return this.resolveSubstitutions(subs, 'block', defaults, subject) } /** * Call {@link AbstractNode#resolveSubstitutions} for the 'inline' type with the subject set as passthrough macro. * * @see {@link AbstractNode#resolveSubstitutions} */ AbstractNode.prototype.resolvePassSubstitutions = function (subs) { return this.resolveSubstitutions(subs, 'inline', undefined, 'passthrough macro') } /** * @returns {string} - the String name of this node * @memberof AbstractNode */ AbstractNode.prototype.getNodeName = function () { return this.node_name } /** * @returns {Object} - the JSON of attributes for this node * @memberof AbstractNode */ AbstractNode.prototype.getAttributes = function () { return fromHash(this.attributes) } /** * Get the value of the specified attribute. * If the attribute is not found on this node, fallback_name is set, and this node is not the Document node, get the value of the specified attribute from the Document node. * * Look for the specified attribute in the attributes on this node and return the value of the attribute, if found. * Otherwise, if fallback_name is set (default: same as name) and this node is not the Document node, look for that attribute on the Document node and return its value, if found. * Otherwise, return the default value (default: undefined). * * @param {string} name - The String of the attribute to resolve. * @param {*} [defaultValue] - The {Object} value to return if the attribute is not found (default: undefined). * @param {string} [fallbackName] - The String of the attribute to resolve on the Document if the attribute is not found on this node (default: same as name). * * @returns {*} - the {Object} value (typically a String) of the attribute or defaultValue if the attribute is not found. * @memberof AbstractNode */ AbstractNode.prototype.getAttribute = function (name, defaultValue, fallbackName) { var value = this.$attr(name, defaultValue, fallbackName) return value === Opal.nil ? undefined : value } /** * Check whether the specified attribute is present on this node. * * @param {string} name - The String of the attribute to resolve. * @returns {boolean} - true if the attribute is present, otherwise false * @memberof AbstractNode */ AbstractNode.prototype.hasAttribute = function (name) { return name in this.attributes.$$smap } /** * Check if the specified attribute is defined using the same logic as {AbstractNode#getAttribute}, optionally performing acomparison with the expected value if specified. * * Look for the specified attribute in the attributes on this node. * If not found, fallback_name is specified (default: same as name), and this node is not the Document node, look for that attribute on the Document node. * In either case, if the attribute is found, and the comparison value is truthy, return whether the two values match. * Otherwise, return whether the attribute was found. * * @param {string} name - The String name of the attribute to resolve. * @param {*} [expectedValue] - The expected Object value of the attribute (default: undefined). * @param {string} fallbackName - The String of the attribute to resolve on the Document if the attribute is not found on this node (default: same as name). * * @returns {boolean} - a Boolean indicating whether the attribute exists and, if a truthy comparison value is specified, whether the value of the attribute matches the comparison value. * @memberof AbstractNode */ AbstractNode.prototype.isAttribute = function (name, expectedValue, fallbackName) { var result = this['$attr?'](name, expectedValue, fallbackName) return result === Opal.nil ? false : result } /** * Assign the value to the attribute name for the current node. * * @param {string} name - The String attribute name to assign * @param {*} value - The Object value to assign to the attribute (default: '') * @param {boolean} overwrite - A Boolean indicating whether to assign the attribute if currently present in the attributes JSON (default: true) * * @returns {boolean} - a Boolean indicating whether the assignment was performed * @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} - 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. * * @returns {Document} - the {@link Document} object to which this node belongs. * @memberof AbstractNode */ AbstractNode.prototype.getDocument = function () { return this.document } /** * Get the {@link AbstractNode} to which this node is attached. * * @memberof AbstractNode * @returns {AbstractNode} - 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 } /** * @returns {boolean} - true if this {AbstractNode} is an instance of {Inline} * @memberof AbstractNode */ AbstractNode.prototype.isInline = function () { return this['$inline?']() } /** * @returns {boolean} - true if this {AbstractNode} is an instance of {Block} * @memberof AbstractNode */ AbstractNode.prototype.isBlock = function () { return this['$block?']() } /** * Checks if the role attribute is set on this node and, if an expected value is given, whether the space-separated role matches that value. * * @param {string} expectedValue - The expected String value of the role (optional, default: undefined) * * @returns {boolean} - a Boolean indicating whether the role attribute is set on this node and, if an expected value is given, whether the space-separated role matches that value. * @memberof AbstractNode */ AbstractNode.prototype.isRole = function (expectedValue) { return this['$role?'](expectedValue) } /** * Retrieves the space-separated String role for this node. * * @returns {string} - the role as a space-separated String. * @memberof AbstractNode */ AbstractNode.prototype.getRole = function () { return this.$role() } /** * Checks if the specified role is present in the list of roles for this node. * * @param {string} name - The String name of the role to find. * * @returns {boolean} - a Boolean indicating whether this node has the specified role. * @memberof AbstractNode */ AbstractNode.prototype.hasRole = function (name) { return this['$has_role?'](name) } /** * Retrieves the String role names for this node as an Array. * * @returns {Array<string>} - the role names as a String {Array}, which is empty if the role attribute is absent on this node. * @memberof AbstractNode */ AbstractNode.prototype.getRoles = function () { return this.$roles() } /** * Adds the given role directly to this node. * * @param {string} name - The name of the role to add * * @returns {boolean} - a Boolean indicating whether the role was added. * @memberof AbstractNode */ AbstractNode.prototype.addRole = function (name) { return this.$add_role(name) } /** * Public: Removes the given role directly from this node. * * @param {string} name - The name of the role to remove * * @returns {boolean} - a Boolean indicating whether the role was removed. * @memberof AbstractNode */ AbstractNode.prototype.removeRole = function (name) { return this.$remove_role(name) } /** * A convenience method that checks if the reftext attribute is defined. * @returns {boolean} - A Boolean indicating whether the reftext attribute is defined * @memberof AbstractNode */ AbstractNode.prototype.isReftext = function () { return this['$reftext?']() } /** * A convenience method that returns the value of the reftext attribute with substitutions applied. * @returns {string|undefined} - the value of the reftext attribute with substitutions applied. * @memberof AbstractNode */ AbstractNode.prototype.getReftext = function () { var reftext = this.$reftext() return reftext === Opal.nil ? undefined : reftext } /** * @returns {string} - Get the context name for this node * @memberof AbstractNode */ AbstractNode.prototype.getContext = function () { var context = this.context // Automatically convert Opal pseudo-symbol to String return typeof context === 'string' ? context : context.toString() } /** * @returns {string} - the String id of this node * @memberof AbstractNode */ AbstractNode.prototype.getId = function () { var id = this.id return id === Opal.nil ? undefined : id } /** * @param {string} id - the String id of this node * @memberof AbstractNode */ AbstractNode.prototype.setId = function (id) { this.id = id } /** * A convenience method to check if the specified option attribute is enabled on the current node. * Check if the option is enabled. This method simply checks to see if the <name>-option attribute is defined on the current node. * * @param {string} name - the String name of the option * * @return {boolean} - a Boolean indicating whether the option has been specified * @memberof AbstractNode */ AbstractNode.prototype.isOption = function (name) { return this['$option?'](name) } /** * Set the specified option on this node. * This method sets the specified option on this node by setting the <name>-option attribute. * * @param {string} name - the String name of the option * * @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) } /** * Get the {Converter} instance being used to convert the current {Document}. * @returns {Object} * @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 {Object} options - a JSON {Object} of options to control processing (default: {}) * @param {boolean} options.warn_on_failure - a {boolean} that controls whether a warning is issued if the file cannot be read (default: false) * @param {boolean} options.normalize - a {boolean} that controls whether the lines are normalized and coerced to UTF-8 (default: false) * * @returns {string} - 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.<br/> * 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. * * <pre> * var doc = Asciidoctor.load('= Hello, AsciiDoc!', { 'safe': 'safe' }) * // => Asciidoctor::Document { doctype: "article", doctitle: "Hello, AsciiDoc!", blocks: 0 } * </pre> * * 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. * * <pre> * var source = '= Document Title' * var doc = asciidoctor.load(source, { 'safe': 'safe' }) * console.log(doc.getTitle()) // 'Document Title' * </pre> * * 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} - 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<ImageReference>} - 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<string>} - 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} - 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<Footnote>} - 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} - 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) } /** * Convert the AsciiDoc document using the templates loaded by the Converter. * If a "template_dir" is not specified, or a template is missing, the converter will fall back to using the appropriate built-in template. * * @param {Object} [options] - a JSON of options to control processing (default: {}) * * @returns {string} * @memberof Document */ Document.prototype.convert = function (options) { var result = this.$convert(toHash(options)) return result === Opal.nil ? '' : result } /** * Write the output to the specified file. * * If the converter responds to "write", delegate the work of writing the file to that method. * Otherwise, write the output the specified file. * * @param {string} output * @param {string} target * * @memberof Document */ Document.prototype.write = function (output, target) { return this.$write(output, target) } /** * @returns {string} - the full name of the author as a String * @memberof Document */ Document.prototype.getAuthor = function () { return this.$author() } /** * @returns {string} * @memberof Document */ Document.prototype.getSource = function () { return this.$source() } /** * @returns {Array<string>} * @memberof Document */ Document.prototype.getSourceLines = function () { return this.$source_lines() } /** * @returns {boolean} * @memberof Document */ Document.prototype.isNested = function () { return this['$nested?']() } /** * @returns {boolean} * @memberof Document */ Document.prototype.isEmbedded = function () { return this['$embedded?']() } /** * @returns {boolean} * @memberof Document */ Document.prototype.hasExtensions = function () { return this['$extensions?']() } /** * Get the value of the doctype attribute for this document. * @returns {string} * @memberof Document */ Document.prototype.getDoctype = function () { return this.doctype } /** * Get the value of the backend attribute for this document. * @returns {string} * @memberof Document */ Document.prototype.getBackend = function () { return this.backend } /** * @returns {boolean} * @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 } /** * Set the title on the document header * * Set the title of the document header to the specified value. * If the header does not exist, it is first created. * * @param {string} title - the String title to assign as the title of the document header * * @returns {string} - the new String title assigned to the document header * @memberof Document */ Document.prototype.setTitle = function (title) { return this['$title='](title) } /** * @returns {Document/Title} - a {@link Document/Title} * @memberof Document */ Document.prototype.getDocumentTitle = function (options) { var doctitle = this.$doctitle(toHash(options)) return doctitle === Opal.nil ? undefined : doctitle } /** * @see {@link Document#getDocumentTitle} * @memberof Document */ Document.prototype.getDoctitle = Document.prototype.getDocumentTitle /** * Get the document catalog JSON object. * @returns {Object} * @memberof Document */ Document.prototype.getCatalog = function () { return fromHash(this.catalog) } /** * * @returns {Object} * @see Document#getCatalog * @memberof Document */ Document.prototype.getReferences = Document.prototype.getCatalog /** * Get the document revision date from document header (document attribute <code>revdate</code>). * @returns {string} * @memberof Document */ Document.prototype.getRevisionDate = function () { return this.getAttribute('revdate') } /** * @see Document#getRevisionDate * @returns {string} * @memberof Document */ Document.prototype.getRevdate = function () { return this.getRevisionDate() } /** * Get the document revision number from document header (document attribute <code>revnumber</code>). * @returns {string} * @memberof Document */ Document.prototype.getRevisionNumber = function () { return this.getAttribute('revnumber') } /** * Get the document revision remark from document header (document attribute <code>revremark</code>). * @returns {string} * @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) * * @returns {boolean} - true if the assignment was performed otherwise false * @memberof Document */ 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. * * @returns {Array<Author>} - an {Array} of {Document/Author} objects. * @memberof Document */ Document.prototype.getAuthors = function () { return this.$authors() } // Document.Footnote API /** * @namespace * @module Document/Footnote */ var Footnote = Document.Footnote /** * @returns {number} - the footnote's index * @memberof Document/Footnote */ Footnote.prototype.getIndex = function () { var index = this.$$data.index return index === Opal.nil ? undefined : index } /** * @returns {number} - the footnote's id * @memberof Document/Footnote */ Footnote.prototype.getId = function () { var id = this.$$data.id return id === Opal.nil ? undefined : id } /** * @returns {string} - the footnote's text * @memberof Document/Footnote */ Footnote.prototype.getText = function () { var text = this.$$data.text return text === Opal.nil ? undefined : text } // Document.ImageReference API /** * @class * @module Document/ImageReference */ var ImageReference = Document.ImageReference /** * @returns {string} - the image's target * @memberof Document/ImageReference */ ImageReference.prototype.getTarget = function () { return this.$$data.target } /** * @returns {string} - the image's directory (imagesdir attribute) * @memberof Document/ImageReference */ ImageReference.prototype.getImagesDirectory = function () { var value = this.$$data.imagesdir return value === Opal.nil ? undefined : value } // Document.Author API /** * The Author class represents information about an author extracted from document attributes. * @namespace * @module Document/Author */ var Author = Document.Author /** * @returns {string} - the author's full name * @memberof Document/Author */ Author.prototype.getName = function () { var name = this.$$data.name return name === Opal.nil ? undefined : name } /** * @returns {string} - the author's first name * @memberof Document/Author */ Author.prototype.getFirstName = function () { var firstName = this.$$data.firstname return firstName === Opal.nil ? undefined : firstName } /** * @returns {string} - the author's middle name (or undefined if the author has no middle name) * @memberof Document/Author */ Author.prototype.getMiddleName = function () { var middleName = this.$$data.middlename return middleName === Opal.nil ? undefined : middleName } /** * @returns {string} - the author's last name * @memberof Document/Author */ Author.prototype.getLastName = function () { var lastName = this.$$data.lastname return lastName === Opal.nil ? undefined : lastName } /** * @returns {string} - the author's initials (by default based on the author's name) * @memberof Document/Author */ Author.prototype.getInitials = function () { var initials = this.$$data.initials return initials === Opal.nil ? undefined : initials } /** * @returns {string} - the author's email * @memberof Document/Author */ 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 <code>revdate</code>). * @returns {string} * @memberof Document/RevisionInfo */ RevisionInfo.prototype.getDate = function () { return this.date } /** * Get the document revision number from document header (document attribute <code>revnumber</code>). * @returns {string} * @memberof Document/RevisionInfo */ RevisionInfo.prototype.getNumber = function () { return this.number } /** * Get the document revision remark from document header (document attribute <code>revremark</code>). * A short summary of changes in this document revision. * @returns {string} * @memberof Document/RevisionInfo */ RevisionInfo.prototype.getRemark = function () { return this.remark } /** * @returns {boolean} - true if the revision info is empty (ie. not defined), otherwise false * @memberof Document/RevisionInfo */ RevisionInfo.prototype.isEmpty = function () { return this.date === undefined && this.number === undefined && this.remark === undefined } // SafeMode API /** * @namespace */ var SafeMode = Opal.Asciidoctor.SafeMode /** * @param {string} name - the name of the security level * @returns {number} - the integer value of the corresponding security level */ SafeMode.getValueForName = function (name) { return this.$value_for_name(name) } /** * @param {number} value - the integer value of the security level * @returns {string} - the name of the corresponding security level */ SafeMode.getNameForValue = function (value) { var name = this.$name_for_value(value) return name === Opal.nil ? undefined : name } /** * @returns {Array<string>} - the String {Array} of security levels */ SafeMode.getNames = function () { return this.$names() } // Callouts API /** * Maintains a catalog of callouts and their associations. * @namespace */ var Callouts = Opal.Asciidoctor.Callouts /** * Create a new Callouts. * @returns {Callouts} - a new Callouts * @memberof Callouts */ Callouts.create = function () { return this.$new() } /** * Register a new callout for the given list item ordinal. * Generates a unique id for this callout based on the index of the next callout list in the document and the index of this callout since the end of the last callout list. * * @param {number} ordinal - the Integer ordinal (1-based) of the list item to which this callout is to be associated * @returns {string} - The unique String id of this callout * @example * callouts = asciidoctor.Callouts.create() * callouts.register(1) * // => "CO1-1" * callouts.nextList() * callouts.register(2) * // => "CO2-1" * @memberof Callouts */ Callouts.prototype.register = function (ordinal) { return this.$register(ordinal) } /** * Get the next callout index in the document. * * Reads the next callout index in the document and advances the pointer. * This method is used during conversion to retrieve the unique id of the callout that was generated during parsing. * * @returns {string} - The unique String id of the next callout in the document * @memberof Callouts */ Callouts.prototype.readNextId = function () { return this.$read_next_id() } /** * et a space-separated list of callout ids for the specified list item. * @param {number} ordinal - the Integer ordinal (1-based) of the list item for which to retrieve the callouts * @returns {string} - a space-separated String of callout ids associated with the specified list item * @memberof Callouts */ Callouts.prototype.getCalloutIds = function (ordinal) { return this.$callout_ids(ordinal) } /** * @memberof Callouts */ Callouts.prototype.getLists = function () { var lists = this.lists if (lists && lists.length > 0) { for (var i = 0; i < lists.length; i++) { var list = lists[i] if (list && list.length > 0) { for (var j = 0; j < list.length; j++) { if (typeof list[j] === 'object' && '$$smap' in list[j]) { list[j] = fromHash(list[j]) } } } } } return lists } /** * @memberof Callouts */ Callouts.prototype.getListIndex = function () { return this.list_index } /** * The current list for which callouts are being collected. * @returns {Array} - The Array of callouts at the position of the list index pointer * @memberof Callouts */ Callouts.prototype.getCurrentList = function () { var currentList = this.$current_list() if (currentList && currentList.length > 0) { for (var i = 0; i < currentList.length; i++) { if (typeof currentList[i] === 'object' && '$$smap' in currentList[i]) { currentList[i] = fromHash(currentList[i]) } } } return currentList } /** * Advance to the next callout list in the document. * @memberof Callouts */ Callouts.prototype.nextList = function () { return this.$nextList() } /** * Rewind the list index pointer, intended to be used when switching from the parsing to conversion phase. * @memberof Callouts */ Callouts.prototype.rewind = function () { return this.$rewind() } /** * @returns {Document/RevisionInfo} - a {@link Document/RevisionInfo} * @memberof Document */ Document.prototype.getRevisionInfo = function () { return new Document.RevisionInfo(this.getRevisionDate(), this.getRevisionNumber(), this.getRevisionRemark()) } /** * @returns {boolean} - true if the document contains revision info, otherwise false * @memberof Document */ Document.prototype.hasRevisionInfo = function () { var revisionInfo = this.getRevisionInfo() return !revisionInfo.isEmpty() } /** * @returns {boolean} * @memberof Document */ Document.prototype.getNotitle = function () { return this.$notitle() } /** * @returns {boolean} * @memberof Document */ Document.prototype.getNoheader = function () { return this.$noheader() } /** * @returns {boolean} * @memberof Document */ Document.prototype.getNofooter = function () { return this.$nofooter() } /** * @returns {boolean} * @memberof Document */ Document.prototype.hasHeader = function () { return this['$header?']() } /** * Replay attribute assignments at the block level. * * <i>This method belongs to an internal API that deals with how attributes are managed by the processor.</i> * If you understand why this group of methods are necessary, and what they do, feel free to use them. * <strong>However, keep in mind they are subject to change at any time.</strong> * * @param {Object} blockAttributes - A JSON of attributes * @memberof Document */ Document.prototype.playbackAttributes = function (blockAttributes) { blockAttributes = toHash(blockAttributes) if (blockAttributes) { var attrEntries = blockAttributes['$[]']('attribute_entries') if (attrEntries && Array.isArray(attrEntries)) { var result = [] for (var i = 0; i < attrEntries.length; i++) { var attrEntryObject = attrEntries[i] if (attrEntryObject && typeof attrEntryObject === 'object' && attrEntryObject.constructor.name === 'Object') { attrEntryObject.$name = function () { return this.name } attrEntryObject.$value = function () { return this.value } attrEntryObject.$negate = function () { return this.negate } } result.push(attrEntryObject) } blockAttributes['$[]=']('attribute_entries', result) } } this.$playback_attributes(blockAttributes) } /** * Delete the specified attribute from the document if the name is not locked. * If the attribute is locked, false is returned. * Otherwise, the attribute is deleted. * * @param {string} name - the String attribute name * * @returns {boolean} - true if the attribute was deleted, false if it was not because it's locked * @memberof Document */ Document.prototype.deleteAttribute = function (name) { return this.$delete_attribute(name) } /** * Determine if the attribute has been locked by being assigned in document options. * * @param {string} key - The attribute key to check * * @returns {boolean} - true if the attribute is locked, false otherwise * @memberof Document */ Document.prototype.isAttributeLocked = function (key) { return this['$attribute_locked?'](key) } /** * Restore the attributes to the previously saved state (attributes in header). * * @memberof Document */ Document.prototype.restoreAttributes = function () { return this.$restore_attributes() } /** * Parse the AsciiDoc source stored in the {Reader} into an abstract syntax tree. * * If the data parameter is not nil, create a new {PreprocessorReader} and assigned it to the reader property of this object. * Otherwise, continue with the reader that was created when the {Document} was instantiated. * Pass the reader to {Parser.parse} to parse the source data into an abstract syntax tree. * * If parsing has already been performed, this method returns without performing any processing. * * @param {string|Array<string>} [data] - The optional replacement AsciiDoc source data as a String or String Array. (default: undefined) * * @returns {Document} - this {Document} * @memberof Document */ Document.prototype.parse = function (data) { return this.$parse(data) } /** * @memberof Document */ Document.prototype.getDocinfo = function (docinfoLocation, suffix) { return this.$docinfo(docinfoLocation, suffix) } /** * @param {string} [docinfoLocation] - A {string} for checking docinfo extensions at a given location (head or footer) (default: head) * @returns {boolean} * @memberof Document */ Document.prototype.hasDocinfoProcessors = function (docinfoLocation) { return this['$docinfo_processors?'](docinfoLocation) } /** * Increment the specified counter and store it in the block's attributes. * * @param {string} counterName - the String name of the counter attribute * @param {Block} block - the {Block} on which to save the counter * * @returns {number} - the next number in the sequence for the specified counter * @memberof Document */ Document.prototype.incrementAndStoreCounter = function (counterName, block) { return this.$increment_and_store_counter(counterName, block) } /** * @deprecated Please use {Document#incrementAndStoreCounter} method. * @memberof Document */ Document.prototype.counterIncrement = Document.prototype.incrementAndStoreCounter /** * Get the named counter and take the next number in the sequence. * * @param {string} name - the String name of the counter * @param {string|number} seed - the initial value as a String or Integer * * @returns {number} the next number in the sequence for the specified counter * @memberof Document */ Document.prototype.counter = function (name, seed) { return this.$counter(name, seed) } /** * A read-only integer value indicating the level of security that should be enforced while processing this document. * The value must be set in the Document constructor using the "safe" option. * * A value of 0 (UNSAFE) disables any of the security features enforced by Asciidoctor. * * A value of 1 (SAFE) closely parallels safe mode in AsciiDoc. * In particular, it prevents access to files which reside outside of the parent directory of the source file and disables any macro other than the include directive. * * A value of 10 (SERVER) disallows the document from setting attributes that would affect the conversion of the document, * in addition to all the security features of SafeMode.SAFE. * For instance, this level forbids changing the backend or source-highlighter using an attribute defined in the source document header. * This is the most fundamental level of security for server deployments (hence the name). * * A value of 20 (SECURE) disallows the document from attempting to read files from the file system and including the contents of them into the document, * in addition to all the security features of SafeMode.SECURE. * In particular, it disallows use of the include::[] directive and the embedding of binary content (data uri), stylesheets and JavaScripts referenced by the document. * (Asciidoctor and trusted extensions may still be allowed to embed trusted content into the document). * * Since Asciidoctor is aiming for wide adoption, 20 (SECURE) is the default value and is recommended for server deployments. * * A value of 100 (PARANOID) is planned to disallow the use of passthrough macros and prevents the document from setting any known attributes, * in addition to all the security features of SafeMode.SECURE. * Please note that this level is not currently implemented (and therefore not enforced)! * * @returns {number} - An integer value indicating the level of security * @memberof Document */ Document.prototype.getSafe = function () { return this.safe } /** * Get the Boolean AsciiDoc compatibility mode. * Enabling this attribute activates the following syntax changes: * * * single quotes as constrained emphasis formatting marks * * single backticks parsed as inline literal, formatted as monospace * * single plus parsed as constrained, monospaced inline formatting * * double plus parsed as constrained, monospaced inline formatting * * @returns {boolean} * @memberof Document */ Document.prototype.getCompatMode = function () { return this.compat_mode } /** * Get the Boolean flag that indicates whether source map information should be tracked by the parser. * @returns {boolean} * @memberof Document */ Document.prototype.getSourcemap = function () { var sourcemap = this.sourcemap return sourcemap === Opal.nil ? false : sourcemap } /** * Set the Boolean flag that indicates whether source map information should be tracked by the parser. * @param {boolean} value * @memberof Document */ Document.prototype.setSourcemap = function (value) { this.sourcemap = value } /** * Get the JSON of document counters. * @returns {Object} * @memberof Document */ Document.prototype.getCounters = function () { return fromHash(this.counters) } /** * @returns {Object} * @memberof Document */ Document.prototype.getCallouts = function () { return this.$callouts() } /** * Get the String base directory for converting this document. * * Defaults to directory of the source file. * If the source is a string, defaults to the current directory. * @returns {string} * @memberof Document */ Document.prototype.getBaseDir = function () { return this.base_dir } /** * Get the JSON of resolved options used to initialize this {Document}. * @returns {Object} * @memberof Document */ Document.prototype.getOptions = function () { return fromHash(this.options) } /** * Get the outfilesuffix defined at the end of the header. * @returns {string} * @memberof Document */ Document.prototype.getOutfilesuffix = function () { return this.outfilesuffix } /** * Get a reference to the parent Document of this nested document. * @returns {Document|undefined} * @memberof Document */ Document.prototype.getParentDocument = function () { var parentDocument = this.parent_document return parentDocument === Opal.nil ? undefined : parentDocument } /** * Get the {Reader} associated with this document. * @returns {Object} * @memberof Document */ Document.prototype.getReader = function () { return this.reader } /** * Get the {Converter} instance being used to convert the current {Document}. * @returns {Object} * @memberof Document */ Document.prototype.getConverter = function () { return this.converter } /** * Get the activated {Extensions.Registry} associated with this document. * @returns {Extensions/Registry} * @memberof Document */ Document.prototype.getExtensions = function () { var extensions = this.extensions return extensions === Opal.nil ? undefined : extensions } // Document.Title API /** * A partitioned title (i.e., title & subtitle). * @namespace * @module Document/Title */ var Title = Document.Title /** * @returns {string} * @memberof Document/Title */ Title.prototype.getMain = function () { return this.main } /** * @returns {string} * @memberof Document/Title */ Title.prototype.getCombined = function () { return this.combined } /** * @returns {string} * @memberof Document/Title */ Title.prototype.getSubtitle = function () { var subtitle = this.subtitle return subtitle === Opal.nil ? undefined : subtitle } /** * @returns {boolean} * @memberof Document/Title */ Title.prototype.isSanitized = function () { var sanitized = this['$sanitized?']() return sanitized === Opal.nil ? false : sanitized } /** * @returns {boolean} * @memberof Document/Title */ Title.prototype.hasSubtitle = function () { return this['$subtitle?']() } // Inline API /** * Methods for managing inline elements in AsciiDoc block. * @namespace * @extends AbstractNode */ var Inline = Opal.Asciidoctor.Inline /** * Create a new Inline element. * @param {AbstractBlock} parent * @param {string} context * @param {string|undefined} text * @param {Object|undefined} opts * @returns {Inline} - a new Inline element * @memberof Inline */ Inline.create = function (parent, context, text, opts) { return this.$new(parent, context, text, prepareOptions(opts)) } /** * Get the converted content for this inline node. * * @returns {string} - the converted String content for this inline node * @memberof Inline */ Inline.prototype.convert = function () { return this.$convert() } /** * Get the converted String text of this Inline node, if applicable. * * @returns {string|undefined} - the converted String text for this Inline node, or undefined if not applicable for this node. * @memberof Inline */ 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. * * @returns {string} - the string sub-type of this Inline node. * @memberof Inline */ Inline.prototype.getType = function () { return this.$type() } /** * Get the primary String target of this Inline node. * * @returns {string|undefined} - the string target of this Inline node. * @memberof Inline */ Inline.prototype.getTarget = function () { var target = this.$target() return target === Opal.nil ? undefined : target } /** * Returns the converted alt text for this inline image. * * @returns {string} - the String value of the alt attribute. * @memberof Inline */ Inline.prototype.getAlt = function () { return this.$alt() } // List API /** * Methods for managing AsciiDoc lists (ordered, unordered and description lists). * @namespace * @extends AbstractBlock */ 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}. * * @returns {Array<ListItem>} - an Array of {@link ListItem} nodes. * @memberof List */ List.prototype.getItems = function () { return this.blocks } // ListItem API /** * Methods for managing items for AsciiDoc olists, ulist, and dlists. * * In a description list (dlist), each item is a tuple that consists of a 2-item Array of ListItem terms and a ListItem description (i.e., [[term, term, ...], desc]. * If a description is not set, then the second entry in the tuple is nil. * @namespace * @extends AbstractBlock */ var ListItem = Opal.Asciidoctor.ListItem /** * Get the converted String text of this {@link ListItem} node. * * @returns {string} - the converted String text for this {@link ListItem} node. * @memberof ListItem */ ListItem.prototype.getText = function () { return this.$text() } /** * Set the String source text of this {@link ListItem} node. * * @returns {string} - the new String text assigned to this {@link ListItem} * @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). * * @returns {boolean} - whether the text is not blank * @memberof ListItem */ ListItem.prototype.hasText = function () { return this['$text?']() } /** * Get the {string} used to mark this {@link ListItem}. * * @returns {string} * @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. * * @returns {List} - the {@link List} object to which this {@link ListItem} is attached, * or undefined if this node has no parent. * @memberof ListItem */ ListItem.prototype.getList = function () { return this.$list() } /** * @see {@link ListItem#getList} * @memberof ListItem */ ListItem.prototype.getParent = ListItem.prototype.getList // Reader API /** @namespace */ var Reader = Opal.Asciidoctor.Reader /** * Push source onto the front of the reader and switch the context based on the file, document-relative path and line information given. * * This method is typically used in an IncludeProcessor to add source read from the target specified. * * @param {string} data * @param {string|undefined} file * @param {string|undefined} path * @param {number} lineno - The line number * @param {Object} attributes - a JSON of attributes * @returns {Reader} - this {Reader} object. * @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. * * @returns {Cursor} * @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). * * @returns {Array<string>} - the remaining unprocessed lines as an {Array} of {string}. * @memberof Reader */ 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). * * @returns {string} - the remaining unprocessed lines as a {string} (joined by linefeed characters). * @memberof Reader */ 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. * * @returns {boolean} - true if there are more lines, false if there are not. * @memberof Reader */ Reader.prototype.hasMoreLines = function () { return this['$has_more_lines?']() } /** * Check whether this reader is empty (contains no lines). * * @returns {boolean} - true if there are no more lines to peek, otherwise false. * @memberof Reader */ 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) * @returns {string} - the next line as a {string} if there are lines remaining. * @memberof Reader */ 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). * * @returns {string} - the next line as a {string} if data is present. * @memberof Reader */ 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). * * @returns {Array<string>} - the lines read as an {Array} of {string}. * @memberof Reader */ 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). * * @returns {string} - the lines read joined as a {string} * @memberof Reader */ Reader.prototype.read = function () { return this.$read() } /** * Advance to the next line by discarding the line at the front of the stack. * * @returns {boolean} - a Boolean indicating whether there was a line to discard. * @memberof Reader */ Reader.prototype.advance = function () { return this.$advance() } // Cursor API /** @namespace */ var Cursor = Opal.Asciidoctor.Reader.Cursor /** * Get the file associated to the cursor. * @returns {string|undefined} * @memberof Cursor */ Cursor.prototype.getFile = function () { var file = this.file return file === Opal.nil ? undefined : file } /** * Get the directory associated to the cursor. * @returns {string|undefined} - the directory associated to the cursor * @memberof Cursor */ Cursor.prototype.getDirectory = function () { var dir = this.dir return dir === Opal.nil ? undefined : dir } /** * Get the path associated to the cursor. * @returns {string|undefined} - the path associated to the cursor (or '<stdin>') * @memberof Cursor */ Cursor.prototype.getPath = function () { var path = this.path return path === Opal.nil ? undefined : path } /** * Get the line number of the cursor. * @returns {number|undefined} - the line number of the cursor * @memberof 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 /** * @memberof LoggerManager */ LoggerManager.getLogger = function () { return this.$logger() } /** * @memberof LoggerManager */ LoggerManager.setLogger = function (logger) { this['$logger='](logger) } /** * @memberof LoggerManager */ LoggerManager.newLogger = function (name, functions) { return initializeLoggerClass(name, functions).$new() } /** * @memberof LoggerManager */ 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 /** * @memberof 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 /** * @memberof 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 /** * Create a new MemoryLogger. * @returns {MemoryLogger} - a MemoryLogger * @memberof MemoryLogger */ MemoryLogger.create = function () { return this.$new() } /** * @returns {Array<Object>} - a list of messages * @memberof MemoryLogger */ 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 /** * @memberof Reader */ Reader.prototype.getLogger = Logging.getLogger /** * @memberof Reader */ Reader.prototype.createLogMessage = Logging.createLogMessage /** * @memberof AbstractNode */ AbstractNode.prototype.getLogger = Logging.getLogger /** * @memberof AbstractNode */ AbstractNode.prototype.createLogMessage = Logging.createLogMessage /** * @namespace */ var Logger = Opal.const_get_qualified(Opal.Asciidoctor, 'Logger', true) // Alias Opal.Asciidoctor.Logger = Logger /** * @returns {number|undefined} - the maximum severity * @memberof Logger */ Logger.prototype.getMaxSeverity = function () { var result = this.max_severity return result === Opal.nil ? undefined : result } /** * @returns {LoggerFormatter} - the formatter * @memberof Logger */ Logger.prototype.getFormatter = function () { return this.formatter } /** * @param {LoggerFormatter} formatter - the formatter * @memberof Logger */ Logger.prototype.setFormatter = function (formatter) { this.formatter = formatter } /** * @returns {number} - the logging severity threshold * @memberof Logger */ Logger.prototype.getLevel = function () { return this.level } /** * @param {number} level - the logging severity threshold * @memberof Logger */ Logger.prototype.setLevel = function (level) { this.level = level } /** * @returns {string} - the program name * @memberof Logger */ Logger.prototype.getProgramName = function () { return this.progname } /** * @param {string} programName - the program name * @memberof Logger */ 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 /** * Create a new NullLogger. * @returns {NullLogger} - a NullLogger * @memberof NullLogger */ NullLogger.create = function () { return this.$new() } /** * @returns {number|undefined} - the maximum severity * @memberof NullLogger */ 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 /** * Create a new Timings. * @returns {Timings} - a Timings * @memberof Timings */ Timings.create = function () { return this.$new() } /** * Print a report to the specified output. * The report will include: * - the time to read and parse source * - the time to convert document * - the total time (read, parse and convert) * @param {RubyLogger|console|Object} [to] - an optional output (by default stdout) * @param {string} [subject] - an optional subject (usually the file name) * @memberof Timings */ 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. * * @param {string|Array} names - A {string} name or an {Array} of {string} names * @param functions - A list of functions representing a {SyntaxHighlighter} or a {SyntaxHighlighter} class to instantiate * @memberof SyntaxHighlighter */ 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 (Object.prototype.hasOwnProperty.call(functions, 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. * * @param {string} name - The {string} name of the syntax highlighter to retrieve. * @returns {SyntaxHighlighter} - the {SyntaxHighlighter} registered for this name. * @memberof SyntaxHighlighter */ SyntaxHighlighter.get = function (name) { var result = SyntaxHighlighter.$for(name) return result === Opal.nil ? undefined : result } /** * @deprecated Please use {SyntaxHighlighter#get} method as "for" is a reserved keyword. */ SyntaxHighlighter.for = SyntaxHighlighter.get /** * @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. * * @param {string|Array<string>} names - A {string} name or an {Array} of {string} names * @memberof SyntaxHighlighterBase */ SyntaxHighlighterBase.prototype.registerFor = function (names) { SyntaxHighlighter.$register(this, names) } // Table API /** * Methods for managing AsciiDoc tables. * @namespace * @extends AbstractBlock */ var Table = Opal.Asciidoctor.Table /** * Create a new Table element. * @param {AbstractBlock} parent * @param {Object|undefined} attributes * @returns {Table} - a new {Table} object */ Table.create = function (parent, attributes) { return this.$new(parent, toHash(attributes)) } /** * Get the caption of the table. * @returns {string} * @memberof Table */ Table.prototype.getCaption = function () { return this.caption } /** * Get the rows of this table. * @returns {Table.Rows} - an {Table.Rows} object with the members "head", "body" and "foot" * @memberof Table */ Table.prototype.getRows = function () { return this.rows } /** * Get the columns of this table. * @returns {Array<Column>} * @memberof Table */ Table.prototype.getColumns = function () { return this.columns } /** * Get the head rows of this table. * @returns {Array<Array<Cell>>} - an Array of Array of Cell * @memberof Table */ Table.prototype.getHeadRows = function () { return this.rows.head } /** * Check if the table has a head rows. * @returns {boolean} * @memberof Table */ Table.prototype.hasHeadRows = function () { return this.rows !== Opal.nil && this.rows.head.length > 0 } /** * Get the body rows of this table. * @returns {Array<Array<Cell>>} - an Array of Array of Cell * @memberof Table */ Table.prototype.getBodyRows = function () { return this.rows.body } /** * Check if the table has a body rows. * @returns {boolean} */ Table.prototype.hasBodyRows = function () { return this.rows !== Opal.nil && this.rows.body.length > 0 } /** * Get the foot rows of this table. * @returns {Array<Array<Cell>>} - an Array of Array of Cell * @memberof Table */ Table.prototype.getFootRows = function () { return this.rows.foot } /** * Check if the table has a foot rows. * @returns {boolean} */ Table.prototype.hasFootRows = function () { return this.rows !== Opal.nil && this.rows.foot.length > 0 } /** * Check if the table has a header option set. * @returns {boolean} * @memberof Table */ Table.prototype.hasHeaderOption = function () { return this.has_header_option } /** * Check if the table has the footer option set. * @returns {boolean} * @memberof Table */ Table.prototype.hasFooterOption = function () { var footerOption = this.getAttributes()['footer-option'] return footerOption === '' } /** * Check if the table has the autowidth option set. * @returns {boolean} * @memberof Table */ Table.prototype.hasAutowidthOption = function () { var autowidthOption = this.getAttributes()['autowidth-option'] return autowidthOption === '' } /** * Get the number of rows in the table. * Please note that the header and footer rows are also counted. * @returns {number|undefined} * @memberof Table */ Table.prototype.getRowCount = function () { return this.getAttribute('rowcount') } /** * Set the number of rows in the table. * Please note that the header and footer rows are also counted. * @param {number} value - the value * @memberof Table */ Table.prototype.setRowCount = function (value) { this.setAttribute('rowcount', value) } /** * Get the number of columns in the table. * @returns {number|undefined} * @memberof Table */ Table.prototype.getColumnCount = function () { return this.getAttribute('colcount') } /** * Set the number of columns in the table. * @param {number} value - the value * @memberof Table */ Table.prototype.setColumnCount = function (value) { this.setAttribute('colcount', value) } // Rows /** * @namespace */ var Rows = Opal.Asciidoctor.Table.Rows /** * Create a new Rows element. * @param {array<array<Cell>>} head * @param {array<array<Cell>>} foot * @param {array<array<Cell>>} body * @returns Rows */ Rows.create = function (head, foot, body) { return this.$new(head, foot, body) } /** * Get head rows. * @returns {array<array<Cell>>} */ Rows.prototype.getHead = function () { return this.head } /** * Get foot rows. * @returns {array<array<Cell>>} */ Rows.prototype.getFoot = function () { return this.foot } /** * Get body rows. * @returns {array<array<Cell>>} */ Rows.prototype.getBody = function () { return this.body } /** * Retrieve the rows grouped by section as a nested Array. * * Creates a 2-dimensional array of two element entries. * The first element is the section name as a string. * The second element is the Array of rows in that section. * The entries are in document order (head, foot, body). * @returns {[[string, array<array<Cell>>], [string, array<array<Cell>>], [string, array<array<Cell>>]]} */ Rows.prototype.bySection = function () { return [['head', this.head], ['body', this.body], ['foot', this.foot]] } // Table Column /** * Methods to manage the columns of an AsciiDoc table. * In particular, it keeps track of the column specs. * @namespace * @extends AbstractNode */ var Column = Opal.Asciidoctor.Table.Column /** * Create a new Column element. * @param {Table} table * @param {number} index * @param {Object|undefined} attributes * @returns Column */ Column.create = function (table, index, attributes) { return this.$new(table, index, toHash(attributes)) } /** * Get the column number of this cell. * @returns {number|undefined} * @memberof Column */ Column.prototype.getColumnNumber = function () { return this.getAttribute('colnumber') } /** * Get the width of this cell. * @returns {string|undefined} * @memberof Column */ Column.prototype.getWidth = function () { return this.getAttribute('width') } /** * Get the horizontal align of this cell. * @returns {string|undefined} * @memberof Column */ Column.prototype.getHorizontalAlign = function () { return this.getAttribute('halign') } /** * Get the vertical align of this cell. * @returns {string|undefined} * @memberof Column */ Column.prototype.getVerticalAlign = function () { return this.getAttribute('valign') } /** * Get the style of this cell. * @returns {string} * @memberof Column */ Column.prototype.getStyle = function () { var style = this.style return style === Opal.nil ? undefined : style } // Table Cell /** * Methods for managing the cells in an AsciiDoc table. * @namespace * @extends AbstractBlock */ var Cell = Opal.Asciidoctor.Table.Cell /** * Create a new Cell element * @param {Column} column * @param {string} cellText * @param {Object|undefined} attributes * @param {Object|undefined} opts * @returns {Cell} */ Cell.create = function (column, cellText, attributes, opts) { return this.$new(column, cellText, toHash(attributes), toHash(opts)) } /** * Get the column span of this {@link Cell} node. * @returns {number} - An Integer of the number of columns this cell will span (default: undefined) * @memberof Cell */ Cell.prototype.getColumnSpan = function () { var colspan = this.colspan return colspan === Opal.nil ? undefined : colspan } /** * Set the column span of this {@link Cell} node. * @param {number} value * @returns {number} - The new colspan value * @memberof Cell */ Cell.prototype.setColumnSpan = function (value) { return this['$colspan='](value) } /** * Get the row span of this {@link Cell} node * @returns {number|undefined} - An Integer of the number of rows this cell will span (default: undefined) * @memberof Cell */ Cell.prototype.getRowSpan = function () { var rowspan = this.rowspan return rowspan === Opal.nil ? undefined : rowspan } /** * Set the row span of this {@link Cell} node * @param {number} value * @returns {number} - The new rowspan value * @memberof Cell */ Cell.prototype.setRowSpan = function (value) { return this['$rowspan='](value) } /** * Get the content of the cell. * This method should not be used for cells in the head row or that have the literal style. * @returns {string} * @memberof Cell */ Cell.prototype.getContent = function () { return this.$content() } /** * Get the text of the cell. * @returns {string} * @memberof Cell */ Cell.prototype.getText = function () { return this.$text() } /** * Get the source of the cell. * @returns {string} * @memberof Cell */ Cell.prototype.getSource = function () { return this.$source() } /** * Get the lines of the cell. * @returns {Array<string>} * @memberof Cell */ Cell.prototype.getLines = function () { return this.$lines() } /** * Get the line number of the cell. * @returns {number|undefined} * @memberof Cell */ Cell.prototype.getLineNumber = function () { var lineno = this.$lineno() return lineno === Opal.nil ? undefined : lineno } /** * Get the source file of the cell. * @returns {string|undefined} * @memberof Cell */ Cell.prototype.getFile = function () { var file = this.$file() return file === Opal.nil ? undefined : file } /** * Get the style of the cell. * @returns {string|undefined} * @memberof Cell */ Cell.prototype.getStyle = function () { var style = this.$style() return style === Opal.nil ? undefined : style } /** * Get the column of this cell. * @returns {Column|undefined} * @memberof Cell */ Cell.prototype.getColumn = function () { var column = this.$column() return column === Opal.nil ? undefined : column } /** * Get the width of this cell. * @returns {string|undefined} * @memberof Cell */ Cell.prototype.getWidth = function () { return this.getAttribute('width') } /** * Get the column width in percentage of this cell. * @returns {string|undefined} * @memberof Cell */ Cell.prototype.getColumnPercentageWidth = function () { return this.getAttribute('colpcwidth') } /** * Get the nested {Document} of this cell when style is 'asciidoc'. * @returns {Document|undefined} - the nested {Document} * @memberof Cell */ Cell.prototype.getInnerDocument = function () { var innerDocument = this.inner_document return innerDocument === Opal.nil ? undefined : innerDocument } // Templates /** * @description * This API is experimental and subject to change. * * Please note that this API is currently only available in a Node environment. * We recommend to use a custom converter if you are running in the browser. * * @namespace * @module Converter/TemplateConverter */ var TemplateConverter = Opal.Asciidoctor.Converter.TemplateConverter if (TemplateConverter) { // Alias Opal.Asciidoctor.TemplateConverter = TemplateConverter /** * Create a new TemplateConverter. * @param {string} backend - the backend name * @param templateDirectories - a list of template directories * @param {Object} opts - a JSON of options * @param {string} opts.template_engine - the name of the template engine * @param {Object} [opts.template_cache] - an optional template cache * @param {Object} [opts.template_cache.scans] - a JSON of template objects keyed by template name keyed by path patterns * @param {Object} [opts.template_cache.templates] - a JSON of template objects keyed by file paths * @returns {TemplateConverter} * @memberof Converter/TemplateConverter */ TemplateConverter.create = function (backend, templateDirectories, opts) { if (opts && opts.template_cache) { opts.template_cache = toHash(opts.template_cache) } this.$new(backend, templateDirectories, toHash(opts)) } /** * @returns {Object} - The global cache * @memberof Converter/TemplateConverter */ TemplateConverter.getCache = function () { var caches = fromHash(this.caches) if (caches) { if (caches.scans) { caches.scans = fromHash(caches.scans) for (var key in caches.scans) { caches.scans[key] = fromHash(caches.scans[key]) } } if (caches.templates) { caches.templates = fromHash(caches.templates) } } return caches } /** * Clear the global cache. * @memberof Converter/TemplateConverter */ TemplateConverter.clearCache = function () { this.$clear_caches() } /** * Convert an {AbstractNode} to the backend format using the named template. * * Looks for a template that matches the value of the template name or, * if the template name is not specified, the value of the {@see AbstractNode.getNodeName} function. * * @param {AbstractNode} node - the AbstractNode to convert * @param {string} templateName - the {string} name of the template to use, or the node name of the node if a template name is not specified. (optional, default: undefined) * @param {Object} opts - an optional JSON that is passed as local variables to the template. (optional, default: undefined) * @returns {string} - The {string} result from rendering the template * @memberof Converter/TemplateConverter */ TemplateConverter.prototype.convert = function (node, templateName, opts) { return this.$convert(node, templateName, toHash(opts)) } /** * Checks whether there is a template registered with the specified name. * * @param {string} name - the {string} template name * @returns {boolean} - a {boolean} that indicates whether a template is registered for the specified template name. * @memberof Converter/TemplateConverter */ TemplateConverter.prototype.handles = function (name) { return this['$handles?'](name) } /** * Retrieves the templates that this converter manages. * * @returns {Object} - a JSON of template objects keyed by template name * @memberof Converter/TemplateConverter */ TemplateConverter.prototype.getTemplates = function () { return fromHash(this.$templates()) } /** * Registers a template with this converter. * * @param {string} name - the {string} template name * @param {Object} template - the template object to register * @returns {Object} - the template object * @memberof Converter/TemplateConverter */ TemplateConverter.prototype.register = function (name, template) { return this.$register(name, template) } /** * @namespace * @description * This API is experimental and subject to change. * * Please note that this API is currently only available in a Node environment. * We recommend to use a custom converter if you are running in the browser. * * A pluggable adapter for integrating a template engine into the built-in template converter. */ var TemplateEngine = {} TemplateEngine.registry = {} // Alias Opal.Asciidoctor.TemplateEngine = TemplateEngine /** * Register a template engine adapter for the given names. * @param {string|Array} names - a {string} name or an {Array} of {string} names * @param {Object} templateEngineAdapter - a template engine adapter instance * @example * const fs = require('fs') * class DotTemplateEngineAdapter { * constructor () { * this.doT = require('dot') * } * compile (file, _) { * const templateFn = this.doT.template(fs.readFileSync(file, 'utf8')) * return { * render: templateFn * } * } * } * asciidoctor.TemplateEngine.register('dot, new DotTemplateEngineAdapter()) * @memberof TemplateEngine */ TemplateEngine.register = function (names, templateEngineAdapter) { if (typeof names === 'string') { this.registry[names] = templateEngineAdapter } else { // array for (var i = 0; i < names.length; i++) { var name = names[i] this.registry[name] = templateEngineAdapter } } } } /* 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 * 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-registered 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 <code>prefer</pre> 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)) } /** * @param {string} name * @memberof Extensions/Processor */ Processor.prototype.named = function (name) { return this.$named(name) } /** * Creates a block and links it to the specified parent. * * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. * @param {string} context * @param {string|Array<string>} source * @param {Object|undefined} attrs - A JSON of attributes * @param {Object|undefined} opts - A JSON of options * @return {Block} * @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 * @returns {List} * @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 {List} parent - The parent {List} of this new list item block. * @param {string} text - The text of the list item. * @returns {ListItem} * @memberof Extensions/Processor */ Processor.prototype.createListItem = function (parent, text) { return this.$create_list_item(parent, text) } /** * Creates an image block node and links it to the specified parent. * @param {Block|Section|Document} parent - The parent Block of this new image block. * @param {Object} attrs - A JSON of attributes * @param {string} attrs.target - the target attribute to set the source of the image. * @param {string} attrs.alt - the alt attribute to specify an alternative text for the image. * @param {Object} opts - A JSON of options * @returns {Block} * @memberof Extensions/Processor */ Processor.prototype.createImageBlock = function (parent, attrs, opts) { return this.$create_image_block(parent, toHash(attrs), toHash(opts)) } /** * Creates a paragraph block and links it to the specified parent. * * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. * @param {string|Array<string>} source - The source * @param {Object|undefined} attrs - An object of attributes to set on this block * @param {Object|undefined} opts - An object of options to set on this block * @returns {Block} - a paragraph {Block} * @memberof Extensions/Processor */ Processor.prototype.createParagraph = function (parent, source, attrs, opts) { return this.$create_paragraph(parent, source, toHash(attrs), toHash(opts)) } /** * Creates an open block and links it to the specified parent. * * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. * @param {string|Array<string>} source - The source * @param {Object|undefined} attrs - An object of attributes to set on this block * @param {Object|undefined} opts - An object of options to set on this block * @returns {Block} - an open {Block} * @memberof Extensions/Processor */ Processor.prototype.createOpenBlock = function (parent, source, attrs, opts) { return this.$create_open_block(parent, source, toHash(attrs), toHash(opts)) } /** * Creates an example block and links it to the specified parent. * * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. * @param {string|Array<string>} source - The source * @param {Object|undefined} attrs - An object of attributes to set on this block * @param {Object|undefined} opts - An object of options to set on this block * @returns {Block} - an example {Block} * @memberof Extensions/Processor */ Processor.prototype.createExampleBlock = function (parent, source, attrs, opts) { return this.$create_example_block(parent, source, toHash(attrs), toHash(opts)) } /** * Creates a literal block and links it to the specified parent. * * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. * @param {string|Array<string>} source - The source * @param {Object|undefined} attrs - An object of attributes to set on this block * @param {Object|undefined} opts - An object of options to set on this block * @returns {Block} - a literal {Block} * @memberof Extensions/Processor */ Processor.prototype.createPassBlock = function (parent, source, attrs, opts) { return this.$create_pass_block(parent, source, toHash(attrs), toHash(opts)) } /** * Creates a listing block and links it to the specified parent. * * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. * @param {string|Array<string>} source - The source * @param {Object|undefined} attrs - An object of attributes to set on this block * @param {Object|undefined} opts - An object of options to set on this block * @returns {Block} - a listing {Block} * @memberof Extensions/Processor */ Processor.prototype.createListingBlock = function (parent, source, attrs, opts) { return this.$create_listing_block(parent, source, toHash(attrs), toHash(opts)) } /** * Creates a literal block and links it to the specified parent. * * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. * @param {string|Array<string>} source - The source * @param {Object|undefined} attrs - An object of attributes to set on this block * @param {Object|undefined} opts - An object of options to set on this block * @returns {Block} - a literal {Block} * @memberof Extensions/Processor */ Processor.prototype.createLiteralBlock = function (parent, source, attrs, opts) { return this.$create_literal_block(parent, source, toHash(attrs), toHash(opts)) } /** * Creates an inline anchor and links it to the specified parent. * * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. * @param {string} text - The text * @param {Object|undefined} opts - An object of options to set on this block * @returns {Inline} - an {Inline} anchor * @memberof Extensions/Processor */ Processor.prototype.createAnchor = function (parent, text, opts) { if (opts && opts.attributes) { opts.attributes = toHash(opts.attributes) } return this.$create_anchor(parent, text, toHash(opts)) } /** * Creates an inline pass and links it to the specified parent. * * @param {Block|Section|Document} parent - The parent Block (Block, Section, or Document) of this new block. * @param {string} text - The text * @param {Object|undefined} opts - An object of options to set on this block * @returns {Inline} - an {Inline} pass * @memberof Extensions/Processor */ Processor.prototype.createInlinePass = function (parent, text, opts) { if (opts && opts.attributes) { opts.attributes = toHash(opts.attributes) } return this.$create_inline_pass(parent, text, toHash(opts)) } /** * Creates an inline node and links it to the specified parent. * * @param {Block|Section|Document} parent - The parent Block of this new inline node. * @param {string} context - The context name * @param {string} text - The text * @param {Object|undefined} opts - A JSON of options * @returns {Inline} - an {Inline} node * @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)) } /** * Parses blocks in the content and attaches the block to the parent. * @param {AbstractBlock} parent - the parent block * @param {string|Array<string>} content - the content * @param {Object|undefined} attrs - an object of attributes * @returns {AbstractNode} - The parent node into which the blocks are parsed. * @memberof Extensions/Processor */ Processor.prototype.parseContent = function (parent, content, attrs) { return this.$parse_content(parent, content, attrs) } /** * Parses the attrlist String into a JSON of attributes * @param {AbstractBlock} block - the current AbstractBlock or the parent AbstractBlock if there is no current block (used for applying subs) * @param {string} attrlist - the list of attributes as a String * @param {Object|undefined} opts - an optional JSON of options to control processing: * - positional_attributes: an Array of attribute names to map positional arguments to (optional, default: []) * - sub_attributes: enables attribute substitution on the attrlist argument (optional, default: false) * * @returns - a JSON of parsed attributes * @memberof Extensions/Processor */ Processor.prototype.parseAttributes = function (block, attrlist, opts) { if (opts && opts.attributes) { opts.attributes = toHash(opts.attributes) } return fromHash(this.$parse_attributes(block, attrlist, toHash(opts))) } /** * @param {string|Array<string>} value - Name of a positional attribute or an Array of positional attribute names * @memberof Extensions/Processor */ Processor.prototype.positionalAttributes = function (value) { return this.$positional_attrs(value) } /** * Specify how to resolve attributes. * * @param {string|Array<string>|Object|boolean} [value] - A specification to resolve attributes. * @memberof Extensions/Processor */ Processor.prototype.resolveAttributes = function (value) { if (typeof value === 'object' && !Array.isArray(value)) { return this.$resolves_attributes(toHash(value)) } if (arguments.length > 1) { return this.$resolves_attributes(Array.prototype.slice.call(arguments)) } if (typeof value === 'undefined') { // Convert to nil otherwise an exception is thrown at: // https://github.com/asciidoctor/asciidoctor/blob/0bcb4addc17b307f62975aad203fb556a1bcd8a5/lib/asciidoctor/extensions.rb#L583 // // if args.size == 1 && !args[0] // // In the above Ruby code, args[0] is undefined and Opal will try to call the function "!" on an undefined object. return this.$resolves_attributes(Opal.nil) } return this.$resolves_attributes(value) } /** * @deprecated Please use the <code>resolveAttributes</pre> function on the {@link Extensions/Processor}. * @memberof Extensions/Processor * @see {Processor#resolveAttributes} */ Processor.prototype.resolvesAttributes = Processor.prototype.resolveAttributes /** * Get the configuration JSON for this processor instance. * @memberof Extensions/Processor */ Processor.prototype.getConfig = function () { return fromHash(this.config) } /** * @memberof Extensions/Processor */ Processor.prototype.option = function (key, value) { this.$option(key, value) } /** * @namespace * @module Extensions/BlockProcessor */ var BlockProcessor = Extensions.BlockProcessor /** * @param {Object} value - a JSON of default values for attributes * @memberof Extensions/BlockProcessor */ BlockProcessor.prototype.defaultAttributes = function (value) { this.$default_attributes(toHash(value)) } /** * @param {string} context - A context name * @memberof Extensions/BlockProcessor */ BlockProcessor.prototype.onContext = function (context) { return this.$on_context(context) } /** * @param {...string} contexts - A list of context names * @memberof Extensions/BlockProcessor */ BlockProcessor.prototype.onContexts = function (contexts) { return this.$on_contexts(Array.prototype.slice.call(arguments)) } /** * @returns {string} * @memberof Extensions/BlockProcessor */ BlockProcessor.prototype.getName = function () { var name = this.name return name === Opal.nil ? undefined : name } /** * @param {string} value * @memberof Extensions/BlockProcessor */ BlockProcessor.prototype.parseContentAs = function (value) { this.$parse_content_as(value) } /** * @namespace * @module Extensions/BlockMacroProcessor */ var BlockMacroProcessor = Extensions.BlockMacroProcessor /** * @param {Object} value - a JSON of default values for attributes * @memberof Extensions/BlockMacroProcessor */ BlockMacroProcessor.prototype.defaultAttributes = function (value) { this.$default_attributes(toHash(value)) } /** * @returns {string} - the block macro name * @memberof Extensions/BlockMacroProcessor */ BlockMacroProcessor.prototype.getName = function () { var name = this.name return name === Opal.nil ? undefined : name } /** * @param {string} value * @memberof Extensions/BlockMacroProcessor */ BlockMacroProcessor.prototype.parseContentAs = function (value) { this.$parse_content_as(value) } /** * @namespace * @module Extensions/InlineMacroProcessor */ var InlineMacroProcessor = Extensions.InlineMacroProcessor /** * @param {Object} value - a JSON of default values for attributes * @memberof Extensions/InlineMacroProcessor */ InlineMacroProcessor.prototype.defaultAttributes = function (value) { this.$default_attributes(toHash(value)) } /** * @returns {string} - the inline macro name * @memberof Extensions/InlineMacroProcessor */ InlineMacroProcessor.prototype.getName = function () { var name = this.name return name === Opal.nil ? undefined : name } /** * @param {string} value * @memberof Extensions/InlineMacroProcessor */ InlineMacroProcessor.prototype.parseContentAs = function (value) { this.$parse_content_as(value) } /** * @param {string} value * @memberof Extensions/InlineMacroProcessor */ InlineMacroProcessor.prototype.matchFormat = function (value) { this.$match_format(value) } /** * @param {RegExp} value * @memberof Extensions/InlineMacroProcessor */ InlineMacroProcessor.prototype.match = function (value) { this.$match(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() } /** * @param {string} value - The docinfo location ("head", "header" or "footer") * @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 */ Converter.create = function (backend, opts) { return this.$create(backend, toHash(opts)) } // Converter Factory API /** * @namespace * @module Converter/Factory */ var ConverterFactory = Opal.Asciidoctor.Converter.Factory var ConverterBase = Opal.Asciidoctor.Converter.Base // Alias Opal.Asciidoctor.ConverterFactory = ConverterFactory var ConverterBackendTraits = Opal.Asciidoctor.Converter.BackendTraits // Alias Opal.Asciidoctor.ConverterBackendTraits = ConverterBackendTraits /** * 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) { var object var buildBackendTraitsFromObject = function (obj) { return Object.assign({}, obj.basebackend ? { basebackend: obj.basebackend } : {}, obj.outfilesuffix ? { outfilesuffix: obj.outfilesuffix } : {}, obj.filetype ? { filetype: obj.filetype } : {}, obj.htmlsyntax ? { htmlsyntax: obj.htmlsyntax } : {}, obj.supports_templates ? { supports_templates: obj.supports_templates } : {} ) } var assignBackendTraitsToInstance = function (obj, instance) { if (obj.backend_traits) { instance.backend_traits = toHash(obj.backend_traits) } else if (obj.backendTraits) { instance.backend_traits = toHash(obj.backendTraits) } else if (obj.basebackend || obj.outfilesuffix || obj.filetype || obj.htmlsyntax || obj.supports_templates) { instance.backend_traits = toHash(buildBackendTraitsFromObject(obj)) } } var bridgeHandlesMethodToInstance = function (obj, instance) { bridgeMethodToInstance(obj, instance, '$handles?', 'handles', function () { return true }) } var bridgeComposedMethodToInstance = function (obj, instance) { bridgeMethodToInstance(obj, instance, '$composed', 'composed') } var bridgeEqEqMethodToInstance = function (obj, instance) { bridgeMethodToInstance(obj, instance, '$==', '==', function (other) { return instance === other }) } var bridgeSendMethodToInstance = function (obj, instance) { bridgeMethodToInstance(obj, instance, '$send', 'send', function (symbol) { var args = Array.prototype.slice.call(arguments, 1) var func = instance['$' + symbol] if (func) { return func.apply(instance, args) } throw new Error(`undefined method \`${symbol}\` for \`${instance.toString()}\``) }) } var bridgeMethodToInstance = function (obj, instance, methodName, functionName, defaultImplementation) { if (typeof obj[methodName] === 'undefined') { if (typeof obj[functionName] === 'function') { instance[methodName] = obj[functionName] } else if (defaultImplementation) { instance[methodName] = defaultImplementation } } } var addRespondToMethod = function (instance) { if (typeof instance['$respond_to?'] !== 'function') { instance['$respond_to?'] = function (name) { return typeof this[name] === 'function' } } } if (typeof converter === 'function') { // Class object = initializeClass(ConverterBase, converter.constructor.name, { initialize: function (backend, opts) { var self = this var result = new converter(backend, opts) // eslint-disable-line Object.assign(this, result) assignBackendTraitsToInstance(result, self) var propertyNames = Object.getOwnPropertyNames(converter.prototype) for (var i = 0; i < propertyNames.length; i++) { var propertyName = propertyNames[i] if (propertyName !== 'constructor') { self[propertyName] = result[propertyName] } } if (typeof result.$convert === 'undefined' && typeof result.convert === 'function') { self.$convert = result.convert } bridgeHandlesMethodToInstance(result, self) bridgeComposedMethodToInstance(result, self) addRespondToMethod(self) self.super(backend, opts) } }) object.$extend(ConverterBackendTraits) } else if (typeof converter === 'object') { // Instance if (typeof converter.$convert === 'undefined' && typeof converter.convert === 'function') { converter.$convert = converter.convert } assignBackendTraitsToInstance(converter, converter) if (converter.backend_traits) { // "extends" ConverterBackendTraits var converterBackendTraitsFunctionNames = [ 'basebackend', 'filetype', 'htmlsyntax', 'outfilesuffix', 'supports_templates', 'supports_templates?', 'init_backend_traits', 'backend_traits' ] for (var functionName of converterBackendTraitsFunctionNames) { converter['$' + functionName] = ConverterBackendTraits.prototype['$' + functionName] } converter.$$meta = ConverterBackendTraits } bridgeHandlesMethodToInstance(converter, converter) bridgeComposedMethodToInstance(converter, converter) bridgeEqEqMethodToInstance(converter, converter) bridgeSendMethodToInstance(converter, converter) addRespondToMethod(converter) object = converter } var args = [object].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)) } /** * Get the converter registry. * @returns the registry of converter instances or classes keyed by backend name * @memberof Converter/Factory */ ConverterFactory.getRegistry = function () { return fromHash(Converter.$registry()) } /** * Lookup the custom converter registered with this factory to handle the specified backend. * * @param {string} backend - The {string} backend name. * @returns the {Converter} class or instance registered to convert the specified backend or undefined if no match is found. * @memberof Converter/Factory */ ConverterFactory.for = function (backend) { const converter = Converter.$for(backend) return converter === Opal.nil ? undefined : converter } /* * Unregister any custom converter classes that are registered with this factory. * Intended for testing only! */ ConverterFactory.unregisterAll = function () { var internalRegistry = Converter.DefaultFactory.$$cvars['@@registry'] Converter.DefaultFactory.$$cvars['@@registry'] = toHash({ html5: internalRegistry['$[]']('html5') }) } // Built-in converter /** * @namespace * @module Converter/Html5Converter */ var Html5Converter = Opal.Asciidoctor.Converter.Html5Converter // Alias Opal.Asciidoctor.Html5Converter = Html5Converter /** * Create a new Html5Converter. * @returns {Html5Converter} - a Html5Converter * @memberof Converter/Html5Converter */ Html5Converter.create = function () { return this.$new() } /** * Converts an {AbstractNode} using the given transform. * This method must be implemented by a concrete converter class. * * @param {AbstractNode} node - The concrete instance of AbstractNode to convert. * @param {string} [transform] - An optional String transform that hints at which transformation should be applied to this node. * If a transform is not given, the transform is often derived from the value of the {AbstractNode#getNodeName} property. (optional, default: undefined) * @param {Object} [opts]- An optional JSON of options hints about how to convert the node. (optional, default: undefined) * * @returns {string} - the String result. * @memberof Converter/Html5Converter */ Html5Converter.prototype.convert = function (node, transform, opts) { return this.$convert(node, transform, opts) } var ASCIIDOCTOR_JS_VERSION = '2.2.6'; /** * 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 <feross@feross.org> <http://feross.org> * @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 ' + str + '>' } 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-2024 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-2024 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-2024 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 = '<<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 = '<<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 `<FormGroup>` if not explicitly specified. */ id: _propTypes.default.string, /** * Attaches a ref to the `<input>` element. Only functions can be used here. * * ```js * <FormControl inputRef={ref => { 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 `<FormControl>` 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 `<input>` element. Only functions can be used here. * * ```js * <Checkbox inputRef={ref => { 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 `<Checkbox inline>`. To display ' + 'validation state on an inline checkbox, set `validationState` on a ' + 'parent `<FormGroup>` 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 `<FormGroup>` 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 `<ControlLabel>` 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 <Dropdown>. /** * @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 `<FormGroup>` if not explicitly specified. */ id: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, /** * Attaches a ref to the `<input>` element. Only functions can be used here. * * ```js * <FormControl inputRef={ref => { 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 `<FormControl>` 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 `<FormControl>` and `htmlFor` on `<FormGroup.Label>`. */ 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 `<ListGroupItem>`, 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 `<Navbar>` body collapses or expands. Fired when * a `<Navbar.Toggle>` 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 `<Nav>` is selected. Should * be used to execute complex closing or other miscellaneous actions desired * after selecting a descendant of `<Nav>`. Does nothing if no `<Nav>` or `<Nav>` * descendants exist. The callback is called with an eventKey, which is a * prop from the selected `<Nav>` descendant, and an event. * * ```js * function ( * Any eventKey, * SyntheticEvent event? * ) * ``` * * For basic closing behavior after all `<Nav>` descendant onSelect events in * mobile viewports, try using collapseOnSelect. * * Note: If you are manually closing the navbar using this `OnSelect` prop, * ensure that you are setting `expanded` to false and not *toggling* between * true and false. */ onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, /** * Sets `expanded` to `false` after the onSelect event of a descendant of a * child `<Nav>`. Does nothing if no `<Nav>` or `<Nav>` descendants exist. * * The onSelect callback should be used instead for more complex operations * that need to be executed after the `select` event of `<Nav>` descendants. */ collapseOnSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, /** * Explicitly set the visiblity of the navbar body * * @controllable onToggle */ expanded: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, role: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string }; var defaultProps = { componentClass: 'nav', fixedTop: false, fixedBottom: false, staticTop: false, inverse: false, fluid: false, collapseOnSelect: false }; var childContextTypes = { $bs_navbar: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({ bsClass: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, expanded: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, onToggle: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired, onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func }) }; var Navbar = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Navbar, _React$Component); function Navbar(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; _this.handleToggle = _this.handleToggle.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.handleCollapse = _this.handleCollapse.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 = Navbar.prototype; _proto.getChildContext = function getChildContext() { var _this$props = this.props, bsClass = _this$props.bsClass, expanded = _this$props.expanded, onSelect = _this$props.onSelect, collapseOnSelect = _this$props.collapseOnSelect; return { $bs_navbar: { bsClass: bsClass, expanded: expanded, onToggle: this.handleToggle, onSelect: Object(__WEBPACK_IMPORTED_MODULE_16__utils_createChainedFunction__["a" /* default */])(onSelect, collapseOnSelect ? this.handleCollapse : null) } }; }; _proto.handleCollapse = function handleCollapse() { var _this$props2 = this.props, onToggle = _this$props2.onToggle, expanded = _this$props2.expanded; if (expanded) { onToggle(false); } }; _proto.handleToggle = function handleToggle() { var _this$props3 = this.props, onToggle = _this$props3.onToggle, expanded = _this$props3.expanded; onToggle(!expanded); }; _proto.render = function render() { var _extends2; var _this$props4 = this.props, Component = _this$props4.componentClass, fixedTop = _this$props4.fixedTop, fixedBottom = _this$props4.fixedBottom, staticTop = _this$props4.staticTop, inverse = _this$props4.inverse, fluid = _this$props4.fluid, className = _this$props4.className, children = _this$props4.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props4, ["componentClass", "fixedTop", "fixedBottom", "staticTop", "inverse", "fluid", "className", "children"]); var _splitBsPropsAndOmit = Object(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["splitBsPropsAndOmit"])(props, ['expanded', 'onToggle', 'onSelect', 'collapseOnSelect']), bsProps = _splitBsPropsAndOmit[0], elementProps = _splitBsPropsAndOmit[1]; // will result in some false positives but that seems better // than false negatives. strict `undefined` check allows explicit // "nulling" of the role if the user really doesn't want one if (elementProps.role === undefined && Component !== 'nav') { elementProps.role = 'navigation'; } if (inverse) { bsProps.bsStyle = __WEBPACK_IMPORTED_MODULE_15__utils_StyleConfig__["e" /* Style */].INVERSE; } var classes = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, Object(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["getClassSet"])(bsProps), (_extends2 = {}, _extends2[Object(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["prefix"])(bsProps, 'fixed-top')] = fixedTop, _extends2[Object(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["prefix"])(bsProps, 'fixed-bottom')] = fixedBottom, _extends2[Object(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["prefix"])(bsProps, 'static-top')] = staticTop, _extends2)); 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, classes) }), __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__Grid__["a" /* default */], { fluid: fluid }, children)); }; return Navbar; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); Navbar.propTypes = propTypes; Navbar.defaultProps = defaultProps; Navbar.childContextTypes = childContextTypes; Object(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["bsClass"])('navbar', Navbar); var UncontrollableNavbar = __WEBPACK_IMPORTED_MODULE_8_uncontrollable___default()(Navbar, { expanded: 'onToggle' }); function createSimpleWrapper(tag, suffix, displayName) { var Wrapper = function Wrapper(_ref, _ref2) { var Component = _ref.componentClass, className = _ref.className, pullRight = _ref.pullRight, pullLeft = _ref.pullLeft, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref, ["componentClass", "className", "pullRight", "pullLeft"]); var _ref2$$bs_navbar = _ref2.$bs_navbar, navbarProps = _ref2$$bs_navbar === void 0 ? { bsClass: 'navbar' } : _ref2$$bs_navbar; return __WEBPACK_IMPORTED_MODULE_5_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, Object(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["prefix"])(navbarProps, suffix), pullRight && Object(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["prefix"])(navbarProps, 'right'), pullLeft && Object(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["prefix"])(navbarProps, 'left')) })); }; Wrapper.displayName = displayName; Wrapper.propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default.a, pullRight: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, pullLeft: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool }; Wrapper.defaultProps = { componentClass: tag, pullRight: false, pullLeft: false }; Wrapper.contextTypes = { $bs_navbar: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({ bsClass: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string }) }; return Wrapper; } UncontrollableNavbar.Brand = __WEBPACK_IMPORTED_MODULE_10__NavbarBrand__["a" /* default */]; UncontrollableNavbar.Header = __WEBPACK_IMPORTED_MODULE_12__NavbarHeader__["a" /* default */]; UncontrollableNavbar.Toggle = __WEBPACK_IMPORTED_MODULE_13__NavbarToggle__["a" /* default */]; UncontrollableNavbar.Collapse = __WEBPACK_IMPORTED_MODULE_11__NavbarCollapse__["a" /* default */]; UncontrollableNavbar.Form = createSimpleWrapper('div', 'form', 'NavbarForm'); UncontrollableNavbar.Text = createSimpleWrapper('p', 'text', 'NavbarText'); UncontrollableNavbar.Link = createSimpleWrapper('a', 'link', 'NavbarLink'); // Set bsStyles here so they can be overridden. /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_14__utils_bootstrapUtils__["bsStyles"])([__WEBPACK_IMPORTED_MODULE_15__utils_StyleConfig__["e" /* Style */].DEFAULT, __WEBPACK_IMPORTED_MODULE_15__utils_StyleConfig__["e" /* Style */].INVERSE], __WEBPACK_IMPORTED_MODULE_15__utils_StyleConfig__["e" /* Style */].DEFAULT, UncontrollableNavbar)); /***/ }), /* 3974 */ /***/ (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__(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__Collapse__ = __webpack_require__(881); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(13); var contextTypes = { $bs_navbar: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ bsClass: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, expanded: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool }) }; var NavbarCollapse = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(NavbarCollapse, _React$Component); function NavbarCollapse() { return _React$Component.apply(this, arguments) || this; } var _proto = NavbarCollapse.prototype; _proto.render = function render() { var _this$props = this.props, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["children"]); var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' }; var bsClassName = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(navbarProps, 'collapse'); return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__Collapse__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({ in: navbarProps.expanded }, props), __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("div", { className: bsClassName }, children)); }; return NavbarCollapse; }(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component); NavbarCollapse.contextTypes = contextTypes; /* harmony default export */ __webpack_exports__["a"] = (NavbarCollapse); /***/ }), /* 3975 */ /***/ (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 contextTypes = { $bs_navbar: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.shape({ bsClass: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string }) }; var NavbarHeader = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(NavbarHeader, _React$Component); function NavbarHeader() { return _React$Component.apply(this, arguments) || this; } var _proto = NavbarHeader.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 navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' }; var bsClassName = Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(navbarProps, 'header'); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, bsClassName) })); }; return NavbarHeader; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); NavbarHeader.contextTypes = contextTypes; /* harmony default export */ __webpack_exports__["a"] = (NavbarHeader); /***/ }), /* 3976 */ /***/ (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_createChainedFunction__ = __webpack_require__(69); var propTypes = { onClick: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, /** * The toggle content, if left empty it will render the default toggle (seen above). */ children: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node }; var contextTypes = { $bs_navbar: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.shape({ bsClass: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, expanded: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, onToggle: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func.isRequired }) }; var NavbarToggle = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(NavbarToggle, _React$Component); function NavbarToggle() { return _React$Component.apply(this, arguments) || this; } var _proto = NavbarToggle.prototype; _proto.render = function render() { var _this$props = this.props, onClick = _this$props.onClick, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["onClick", "className", "children"]); var navbarProps = this.context.$bs_navbar || { bsClass: 'navbar' }; var buttonProps = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({ type: 'button' }, props, { onClick: Object(__WEBPACK_IMPORTED_MODULE_7__utils_createChainedFunction__["a" /* default */])(onClick, navbarProps.onToggle), className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(navbarProps, 'toggle'), !navbarProps.expanded && 'collapsed') }); if (children) { return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("button", buttonProps, children); } return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("button", buttonProps, __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span", { className: "sr-only" }, "Toggle navigation"), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span", { className: "icon-bar" }), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span", { className: "icon-bar" }), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span", { className: "icon-bar" })); }; return NavbarToggle; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); NavbarToggle.propTypes = propTypes; NavbarToggle.contextTypes = contextTypes; /* harmony default export */ __webpack_exports__["a"] = (NavbarToggle); /***/ }), /* 3977 */ /***/ (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_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__Dropdown__ = __webpack_require__(543); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_splitComponentProps__ = __webpack_require__(544); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__ = __webpack_require__(95); var propTypes = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, __WEBPACK_IMPORTED_MODULE_6__Dropdown__["a" /* default */].propTypes, { // Toggle props. title: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node.isRequired, noCaret: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, active: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, activeKey: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any, activeHref: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, // Override generated docs from <Dropdown>. /** * @private */ children: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node }); var NavDropdown = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(NavDropdown, _React$Component); function NavDropdown() { return _React$Component.apply(this, arguments) || this; } var _proto = NavDropdown.prototype; _proto.isActive = function isActive(_ref, activeKey, activeHref) { var _this = this; var props = _ref.props; if (props.active || activeKey != null && props.eventKey === activeKey || activeHref && props.href === activeHref) { return true; } if (__WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__["a" /* default */].some(props.children, function (child) { return _this.isActive(child, activeKey, activeHref); })) { return true; } return props.active; }; _proto.render = function render() { var _this2 = this; var _this$props = this.props, title = _this$props.title, activeKey = _this$props.activeKey, activeHref = _this$props.activeHref, className = _this$props.className, style = _this$props.style, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["title", "activeKey", "activeHref", "className", "style", "children"]); var active = this.isActive(this, activeKey, activeHref); delete props.active; // Accessed via this.isActive(). delete props.eventKey; // Accessed via this.isActive(). var _splitComponentProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_splitComponentProps__["a" /* default */])(props, __WEBPACK_IMPORTED_MODULE_6__Dropdown__["a" /* default */].ControlledComponent), dropdownProps = _splitComponentProps[0], toggleProps = _splitComponentProps[1]; // Unlike for the other dropdowns, styling needs to go to the `<Dropdown>` // rather than the `<Dropdown.Toggle>`. return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__Dropdown__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, dropdownProps, { componentClass: "li", className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, { active: active }), style: style }), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__Dropdown__["a" /* default */].Toggle, Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, toggleProps, { useAnchor: true }), title), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__Dropdown__["a" /* default */].Menu, null, __WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__["a" /* default */].map(children, function (child) { return __WEBPACK_IMPORTED_MODULE_4_react___default.a.cloneElement(child, { active: _this2.isActive(child, activeKey, activeHref) }); }))); }; return NavDropdown; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); NavDropdown.propTypes = propTypes; /* harmony default export */ __webpack_exports__["a"] = (NavDropdown); /***/ }), /* 3978 */ /***/ (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_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__babel_runtime_corejs2_core_js_array_is_array__ = __webpack_require__(667); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_core_js_array_is_array___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_core_js_array_is_array__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_query_contains__ = __webpack_require__(161); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_dom_helpers_query_contains___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_dom_helpers_query_contains__); /* 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_dom__ = __webpack_require__(18); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react_dom__); /* 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__Overlay__ = __webpack_require__(1590); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__ = __webpack_require__(69); /** * Check if value one is inside or equal to the of value * * @param {string} one * @param {string|array} of * @returns {boolean} */ function isOneOf(one, of) { if (__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_core_js_array_is_array___default()(of)) { return of.indexOf(one) >= 0; } return one === of; } var triggerType = __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf(['click', 'hover', 'focus']); var propTypes = Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, __WEBPACK_IMPORTED_MODULE_10__Overlay__["a" /* default */].propTypes, { /** * Specify which action or actions trigger Overlay visibility */ trigger: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([triggerType, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.arrayOf(triggerType)]), /** * A millisecond delay amount to show and hide the Overlay once triggered */ delay: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, /** * A millisecond delay amount before showing the Overlay once triggered. */ delayShow: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, /** * A millisecond delay amount before hiding the Overlay once triggered. */ delayHide: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.number, // FIXME: This should be `defaultShow`. /** * The initial visibility state of the Overlay. For more nuanced visibility * control, consider using the Overlay component directly. */ defaultOverlayShown: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, /** * An element or text to overlay next to the target. */ overlay: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node.isRequired, /** * @private */ onBlur: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * @private */ onClick: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * @private */ onFocus: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * @private */ onMouseOut: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, /** * @private */ onMouseOver: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, // Overridden props from `<Overlay>`. /** * @private */ target: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf([null]), /** * @private */ onHide: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf([null]), /** * @private */ show: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOf([null]) }); var defaultProps = { defaultOverlayShown: false, trigger: ['hover', 'focus'] }; var OverlayTrigger = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(OverlayTrigger, _React$Component); function OverlayTrigger(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; _this.handleToggle = _this.handleToggle.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.handleDelayedShow = _this.handleDelayedShow.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.handleDelayedHide = _this.handleDelayedHide.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.handleHide = _this.handleHide.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.handleMouseOver = function (e) { return _this.handleMouseOverOut(_this.handleDelayedShow, e, 'fromElement'); }; _this.handleMouseOut = function (e) { return _this.handleMouseOverOut(_this.handleDelayedHide, e, 'toElement'); }; _this._mountNode = null; _this.state = { show: props.defaultOverlayShown }; return _this; } var _proto = OverlayTrigger.prototype; _proto.componentDidMount = function componentDidMount() { this._mountNode = document.createElement('div'); this.renderOverlay(); }; _proto.componentDidUpdate = function componentDidUpdate() { this.renderOverlay(); }; _proto.componentWillUnmount = function componentWillUnmount() { __WEBPACK_IMPORTED_MODULE_8_react_dom___default.a.unmountComponentAtNode(this._mountNode); this._mountNode = null; clearTimeout(this._hoverShowDelay); clearTimeout(this._hoverHideDelay); }; _proto.handleDelayedHide = function handleDelayedHide() { var _this2 = this; if (this._hoverShowDelay != null) { clearTimeout(this._hoverShowDelay); this._hoverShowDelay = null; return; } if (!this.state.show || this._hoverHideDelay != null) { return; } var delay = this.props.delayHide != null ? this.props.delayHide : this.props.delay; if (!delay) { this.hide(); return; } this._hoverHideDelay = setTimeout(function () { _this2._hoverHideDelay = null; _this2.hide(); }, delay); }; _proto.handleDelayedShow = function handleDelayedShow() { var _this3 = this; if (this._hoverHideDelay != null) { clearTimeout(this._hoverHideDelay); this._hoverHideDelay = null; return; } if (this.state.show || this._hoverShowDelay != null) { return; } var delay = this.props.delayShow != null ? this.props.delayShow : this.props.delay; if (!delay) { this.show(); return; } this._hoverShowDelay = setTimeout(function () { _this3._hoverShowDelay = null; _this3.show(); }, delay); }; _proto.handleHide = function handleHide() { this.hide(); }; // Simple implementation of mouseEnter and mouseLeave. // React's built version is broken: https://github.com/facebook/react/issues/4251 // for cases when the trigger is disabled and mouseOut/Over can cause flicker // moving from one child element to another. _proto.handleMouseOverOut = function handleMouseOverOut(handler, e, relatedNative) { var target = e.currentTarget; var related = e.relatedTarget || e.nativeEvent[relatedNative]; if ((!related || related !== target) && !__WEBPACK_IMPORTED_MODULE_5_dom_helpers_query_contains___default()(target, related)) { handler(e); } }; _proto.handleToggle = function handleToggle() { if (this.state.show) { this.hide(); } else { this.show(); } }; _proto.hide = function hide() { this.setState({ show: false }); }; _proto.makeOverlay = function makeOverlay(overlay, props) { return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__Overlay__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { show: this.state.show, onHide: this.handleHide, target: this }), overlay); }; _proto.show = function show() { this.setState({ show: true }); }; _proto.renderOverlay = function renderOverlay() { __WEBPACK_IMPORTED_MODULE_8_react_dom___default.a.unstable_renderSubtreeIntoContainer(this, this._overlay, this._mountNode); }; _proto.render = function render() { var _this$props = this.props, trigger = _this$props.trigger, overlay = _this$props.overlay, children = _this$props.children, onBlur = _this$props.onBlur, onClick = _this$props.onClick, onFocus = _this$props.onFocus, onMouseOut = _this$props.onMouseOut, onMouseOver = _this$props.onMouseOver, props = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["trigger", "overlay", "children", "onBlur", "onClick", "onFocus", "onMouseOut", "onMouseOver"]); delete props.delay; delete props.delayShow; delete props.delayHide; delete props.defaultOverlayShown; var child = __WEBPACK_IMPORTED_MODULE_6_react___default.a.Children.only(children); var childProps = child.props; var triggerProps = {}; if (this.state.show) { triggerProps['aria-describedby'] = overlay.props.id; } // FIXME: The logic here for passing through handlers on this component is // inconsistent. We shouldn't be passing any of these props through. triggerProps.onClick = Object(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__["a" /* default */])(childProps.onClick, onClick); if (isOneOf('click', trigger)) { triggerProps.onClick = Object(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__["a" /* default */])(triggerProps.onClick, this.handleToggle); } if (isOneOf('hover', trigger)) { process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_9_warning___default()(!(trigger === 'hover'), '[react-bootstrap] Specifying only the `"hover"` trigger limits the ' + 'visibility of the overlay to just mouse users. Consider also ' + 'including the `"focus"` trigger so that touch and keyboard only ' + 'users can see the overlay as well.') : void 0; triggerProps.onMouseOver = Object(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__["a" /* default */])(childProps.onMouseOver, onMouseOver, this.handleMouseOver); triggerProps.onMouseOut = Object(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__["a" /* default */])(childProps.onMouseOut, onMouseOut, this.handleMouseOut); } if (isOneOf('focus', trigger)) { triggerProps.onFocus = Object(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__["a" /* default */])(childProps.onFocus, onFocus, this.handleDelayedShow); triggerProps.onBlur = Object(__WEBPACK_IMPORTED_MODULE_11__utils_createChainedFunction__["a" /* default */])(childProps.onBlur, onBlur, this.handleDelayedHide); } this._overlay = this.makeOverlay(overlay, props); return Object(__WEBPACK_IMPORTED_MODULE_6_react__["cloneElement"])(child, triggerProps); }; return OverlayTrigger; }(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component); OverlayTrigger.propTypes = propTypes; OverlayTrigger.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (OverlayTrigger); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 3979 */ /***/ (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 PageHeader = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(PageHeader, _React$Component); function PageHeader() { return _React$Component.apply(this, arguments) || this; } var _proto = PageHeader.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"]); 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, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) }), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("h1", null, children)); }; return PageHeader; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["bsClass"])('page-header', PageHeader)); /***/ }), /* 3980 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PagerItem__ = __webpack_require__(1591); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_deprecationWarning__ = __webpack_require__(3981); /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__utils_deprecationWarning__["a" /* default */].wrapper(__WEBPACK_IMPORTED_MODULE_0__PagerItem__["a" /* default */], '`<PageItem>`', '`<Pager.Item>`')); /***/ }), /* 3981 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export _resetWarned */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_warning__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_warning__); var warned = {}; function deprecationWarning(oldname, newname, link) { var message; if (typeof oldname === 'object') { message = oldname.message; } else { message = oldname + " is deprecated. Use " + newname + " instead."; if (link) { message += "\nYou can read more about it at " + link; } } if (warned[message]) { return; } process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_1_warning___default()(false, message) : void 0; warned[message] = true; } deprecationWarning.wrapper = function (Component) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return ( /*#__PURE__*/ function (_Component) { Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(DeprecatedComponent, _Component); function DeprecatedComponent() { return _Component.apply(this, arguments) || this; } var _proto = DeprecatedComponent.prototype; _proto.componentWillMount = function componentWillMount() { deprecationWarning.apply(void 0, args); if (_Component.prototype.componentWillMount) { var _Component$prototype$; for (var _len2 = arguments.length, methodArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { methodArgs[_key2] = arguments[_key2]; } (_Component$prototype$ = _Component.prototype.componentWillMount).call.apply(_Component$prototype$, [this].concat(methodArgs)); } }; return DeprecatedComponent; }(Component) ); }; /* harmony default export */ __webpack_exports__["a"] = (deprecationWarning); function _resetWarned() { warned = {}; } /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 3982 */ /***/ (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__PagerItem__ = __webpack_require__(1591); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_createChainedFunction__ = __webpack_require__(69); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_ValidComponentChildren__ = __webpack_require__(95); var propTypes = { onSelect: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func }; var Pager = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Pager, _React$Component); function Pager() { return _React$Component.apply(this, arguments) || this; } var _proto = Pager.prototype; _proto.render = function render() { var _this$props = this.props, onSelect = _this$props.onSelect, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["onSelect", "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); 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) }), __WEBPACK_IMPORTED_MODULE_9__utils_ValidComponentChildren__["a" /* default */].map(children, function (child) { return Object(__WEBPACK_IMPORTED_MODULE_4_react__["cloneElement"])(child, { onSelect: Object(__WEBPACK_IMPORTED_MODULE_8__utils_createChainedFunction__["a" /* default */])(child.props.onSelect, onSelect) }); })); }; return Pager; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Pager.propTypes = propTypes; Pager.Item = __WEBPACK_IMPORTED_MODULE_6__PagerItem__["a" /* default */]; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('pager', Pager)); /***/ }), /* 3983 */ /***/ (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__PaginationItem__ = __webpack_require__(3984); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__ = __webpack_require__(13); var Pagination = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Pagination, _React$Component); function Pagination() { return _React$Component.apply(this, arguments) || this; } var _proto = Pagination.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"]); 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("ul", 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 Pagination; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('pagination', Pagination); Pagination.First = __WEBPACK_IMPORTED_MODULE_5__PaginationItem__["b" /* First */]; Pagination.Prev = __WEBPACK_IMPORTED_MODULE_5__PaginationItem__["e" /* Prev */]; Pagination.Ellipsis = __WEBPACK_IMPORTED_MODULE_5__PaginationItem__["a" /* Ellipsis */]; Pagination.Item = __WEBPACK_IMPORTED_MODULE_5__PaginationItem__["f" /* default */]; Pagination.Next = __WEBPACK_IMPORTED_MODULE_5__PaginationItem__["d" /* Next */]; Pagination.Last = __WEBPACK_IMPORTED_MODULE_5__PaginationItem__["c" /* Last */]; /* harmony default export */ __webpack_exports__["a"] = (Pagination); /***/ }), /* 3984 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["f"] = PaginationItem; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return First; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return Prev; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Ellipsis; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return Next; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return Last; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(4); /* 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_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__(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_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__SafeAnchor__ = __webpack_require__(132); /* eslint-disable react/no-multi-comp */ var propTypes = { eventKey: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any, className: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, onSelect: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, disabled: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, active: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, activeLabel: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string.isRequired }; var defaultProps = { active: false, disabled: false, activeLabel: '(current)' }; function PaginationItem(_ref) { var active = _ref.active, disabled = _ref.disabled, className = _ref.className, style = _ref.style, activeLabel = _ref.activeLabel, children = _ref.children, props = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref, ["active", "disabled", "className", "style", "activeLabel", "children"]); var Component = active || disabled ? 'span' : __WEBPACK_IMPORTED_MODULE_6__SafeAnchor__["a" /* default */]; return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("li", { style: style, className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, { active: active, disabled: disabled }) }, __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(Component, Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({ disabled: disabled }, props), children, active && __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("span", { className: "sr-only" }, activeLabel))); } PaginationItem.propTypes = propTypes; PaginationItem.defaultProps = defaultProps; function createButton(name, defaultValue, label) { var _class, _temp; if (label === void 0) { label = name; } return _temp = _class = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(_class, _React$Component); function _class() { return _React$Component.apply(this, arguments) || this; } var _proto = _class.prototype; _proto.render = function render() { var _this$props = this.props, disabled = _this$props.disabled, children = _this$props.children, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["disabled", "children", "className"]); var Component = disabled ? 'span' : __WEBPACK_IMPORTED_MODULE_6__SafeAnchor__["a" /* default */]; return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("li", Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({ "aria-label": label, className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, { disabled: disabled }) }, props), __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(Component, null, children || defaultValue)); }; return _class; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component), _class.displayName = name, _class.propTypes = { disabled: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool }, _temp; } var First = createButton('First', "\xAB"); var Prev = createButton('Prev', "\u2039"); var Ellipsis = createButton('Ellipsis', "\u2026", 'More'); var Next = createButton('Next', "\u203A"); var Last = createButton('Last', "\xBB"); /***/ }), /* 3985 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign__ = __webpack_require__(440); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_object_values__ = __webpack_require__(88); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_object_values___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_object_values__); /* 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_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__ = __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_uncontrollable__ = __webpack_require__(75); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_uncontrollable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_uncontrollable__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_warning__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__ = __webpack_require__(79); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__PanelBody__ = __webpack_require__(3986); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__PanelHeading__ = __webpack_require__(3987); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PanelTitle__ = __webpack_require__(3988); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__PanelFooter__ = __webpack_require__(3989); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__PanelToggle__ = __webpack_require__(1593); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__PanelCollapse__ = __webpack_require__(1592); var has = Object.prototype.hasOwnProperty; var defaultGetId = function defaultGetId(id, type) { return id ? id + "--" + type : null; }; var propTypes = { /** * Controls the collapsed/expanded state ofthe Panel. Requires * a `Panel.Collapse` or `<Panel.Body collapsible>` child component * in order to actually animate out or in. * * @controllable onToggle */ expanded: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * A callback fired when the collapse state changes. * * @controllable expanded */ onToggle: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, eventKey: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any, /** * An HTML `id` attribute uniquely identifying the Panel component. */ id: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string }; var contextTypes = { $bs_panelGroup: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.shape({ getId: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, activeKey: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any, onToggle: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func }) }; var childContextTypes = { $bs_panel: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.shape({ headingId: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, bodyId: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, bsClass: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, onToggle: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, expanded: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool }) }; var Panel = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Panel, _React$Component); function Panel() { 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.handleToggle = function (e) { var panelGroup = _this.context.$bs_panelGroup; var expanded = !_this.getExpanded(); if (panelGroup && panelGroup.onToggle) { panelGroup.onToggle(_this.props.eventKey, expanded, e); } else { _this.props.onToggle(expanded, e); } }; return _this; } var _proto = Panel.prototype; _proto.getChildContext = function getChildContext() { var _this$props = this.props, eventKey = _this$props.eventKey, id = _this$props.id; var idKey = eventKey == null ? id : eventKey; var ids; if (idKey !== null) { var panelGroup = this.context.$bs_panelGroup; var getId = panelGroup && panelGroup.getId || defaultGetId; ids = { headingId: getId(idKey, 'heading'), bodyId: getId(idKey, 'body') }; } return { $bs_panel: Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, ids, { bsClass: this.props.bsClass, expanded: this.getExpanded(), onToggle: this.handleToggle }) }; }; _proto.getExpanded = function getExpanded() { var panelGroup = this.context.$bs_panelGroup; if (panelGroup && has.call(panelGroup, 'activeKey')) { process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_8_warning___default()(this.props.expanded == null, 'Specifying `<Panel>` `expanded` in the context of an accordion ' + '`<PanelGroup>` is not supported. Set `activeKey` on the ' + '`<PanelGroup>` instead.') : void 0; return panelGroup.activeKey === this.props.eventKey; } return !!this.props.expanded; }; _proto.render = function render() { var _this$props2 = this.props, className = _this$props2.className, children = _this$props2.children; var _splitBsPropsAndOmit = Object(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["splitBsPropsAndOmit"])(this.props, ['onToggle', 'eventKey', 'expanded']), bsProps = _splitBsPropsAndOmit[0], props = _splitBsPropsAndOmit[1]; return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, Object(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["getClassSet"])(bsProps)) }), children); }; return Panel; }(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component); Panel.propTypes = propTypes; Panel.contextTypes = contextTypes; Panel.childContextTypes = childContextTypes; var UncontrolledPanel = __WEBPACK_IMPORTED_MODULE_7_uncontrollable___default()(Object(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["bsClass"])('panel', Object(__WEBPACK_IMPORTED_MODULE_9__utils_bootstrapUtils__["bsStyles"])(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_object_values___default()(__WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__["d" /* State */]).concat([__WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__["e" /* Style */].DEFAULT, __WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__["e" /* Style */].PRIMARY]), __WEBPACK_IMPORTED_MODULE_10__utils_StyleConfig__["e" /* Style */].DEFAULT, Panel)), { expanded: 'onToggle' }); __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign___default()(UncontrolledPanel, { Heading: __WEBPACK_IMPORTED_MODULE_12__PanelHeading__["a" /* default */], Title: __WEBPACK_IMPORTED_MODULE_13__PanelTitle__["a" /* default */], Body: __WEBPACK_IMPORTED_MODULE_11__PanelBody__["a" /* default */], Footer: __WEBPACK_IMPORTED_MODULE_14__PanelFooter__["a" /* default */], Toggle: __WEBPACK_IMPORTED_MODULE_15__PanelToggle__["a" /* default */], Collapse: __WEBPACK_IMPORTED_MODULE_16__PanelCollapse__["a" /* default */] }); /* harmony default export */ __webpack_exports__["a"] = (UncontrolledPanel); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 3986 */ /***/ (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_prop_types__ = __webpack_require__(7); /* 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_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__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__PanelCollapse__ = __webpack_require__(1592); var propTypes = { /** * A convenience prop that renders a Collapse component around the Body for * situations when the parent Panel only contains a single Panel.Body child. * * renders: * ```jsx * <Panel.Collapse> * <Panel.Body /> * </Panel.Collapse> * ``` */ collapsible: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool.isRequired }; var defaultProps = { collapsible: false }; var contextTypes = { $bs_panel: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.shape({ bsClass: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string }) }; var PanelBody = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(PanelBody, _React$Component); function PanelBody() { return _React$Component.apply(this, arguments) || this; } var _proto = PanelBody.prototype; _proto.render = function render() { var _this$props = this.props, children = _this$props.children, className = _this$props.className, collapsible = _this$props.collapsible; var _ref = this.context.$bs_panel || {}, _bsClass = _ref.bsClass; var _splitBsPropsAndOmit = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["splitBsPropsAndOmit"])(this.props, ['collapsible']), bsProps = _splitBsPropsAndOmit[0], elementProps = _splitBsPropsAndOmit[1]; bsProps.bsClass = _bsClass || bsProps.bsClass; var body = __WEBPACK_IMPORTED_MODULE_3_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, Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["prefix"])(bsProps, 'body')) }), children); if (collapsible) { body = __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__PanelCollapse__["a" /* default */], null, body); } return body; }; return PanelBody; }(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component); PanelBody.propTypes = propTypes; PanelBody.defaultProps = defaultProps; PanelBody.contextTypes = contextTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["bsClass"])('panel', PanelBody)); /***/ }), /* 3987 */ /***/ (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_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_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_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_react_prop_types_lib_elementType__ = __webpack_require__(279); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_prop_types_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_6_react_prop_types_lib_elementType___default.a }; var defaultProps = { componentClass: 'div' }; var contextTypes = { $bs_panel: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({ headingId: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, bsClass: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string }) }; var PanelHeading = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(PanelHeading, _React$Component); function PanelHeading() { return _React$Component.apply(this, arguments) || this; } var _proto = PanelHeading.prototype; _proto.render = function render() { var _this$props = this.props, children = _this$props.children, className = _this$props.className, Component = _this$props.componentClass, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["children", "className", "componentClass"]); var _ref = this.context.$bs_panel || {}, headingId = _ref.headingId, _bsClass = _ref.bsClass; var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; bsProps.bsClass = _bsClass || bsProps.bsClass; if (headingId) { elementProps.role = elementProps.role || 'tab'; elementProps.id = headingId; } 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_5_classnames___default()(className, Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'heading')) }), children); }; return PanelHeading; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); PanelHeading.propTypes = propTypes; PanelHeading.defaultProps = defaultProps; PanelHeading.contextTypes = contextTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('panel', PanelHeading)); /***/ }), /* 3988 */ /***/ (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__(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_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_react_prop_types_lib_elementType__ = __webpack_require__(279); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_prop_types_lib_elementType___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_prop_types_lib_elementType__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__PanelToggle__ = __webpack_require__(1593); var propTypes = { componentClass: __WEBPACK_IMPORTED_MODULE_6_react_prop_types_lib_elementType___default.a, /** * A convenience prop that renders the Panel.Title as a panel collapse toggle component * for the common use-case. */ toggle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool }; var contextTypes = { $bs_panel: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({ bsClass: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string }) }; var defaultProps = { componentClass: 'div' }; var PanelTitle = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(PanelTitle, _React$Component); function PanelTitle() { return _React$Component.apply(this, arguments) || this; } var _proto = PanelTitle.prototype; _proto.render = function render() { var _this$props = this.props, children = _this$props.children, className = _this$props.className, toggle = _this$props.toggle, Component = _this$props.componentClass, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["children", "className", "toggle", "componentClass"]); var _ref = this.context.$bs_panel || {}, _bsClass = _ref.bsClass; var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; bsProps.bsClass = _bsClass || bsProps.bsClass; if (toggle) { children = __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__PanelToggle__["a" /* default */], null, children); } 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_3_classnames___default()(className, Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'title')) }), children); }; return PanelTitle; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); PanelTitle.propTypes = propTypes; PanelTitle.defaultProps = defaultProps; PanelTitle.contextTypes = contextTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('panel', PanelTitle)); /***/ }), /* 3989 */ /***/ (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_prop_types__ = __webpack_require__(7); /* 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_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__utils_bootstrapUtils__ = __webpack_require__(13); var contextTypes = { $bs_panel: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.shape({ bsClass: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string }) }; var PanelFooter = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(PanelFooter, _React$Component); function PanelFooter() { return _React$Component.apply(this, arguments) || this; } var _proto = PanelFooter.prototype; _proto.render = function render() { var _this$props = this.props, children = _this$props.children, className = _this$props.className; var _ref = this.context.$bs_panel || {}, _bsClass = _ref.bsClass; var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["splitBsProps"])(this.props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; bsProps.bsClass = _bsClass || bsProps.bsClass; return __WEBPACK_IMPORTED_MODULE_3_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, Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["prefix"])(bsProps, 'footer')) }), children); }; return PanelFooter; }(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component); PanelFooter.contextTypes = contextTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["bsClass"])('panel', PanelFooter)); /***/ }), /* 3990 */ /***/ (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_isRequiredForA11y__ = __webpack_require__(162); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_isRequiredForA11y___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_isRequiredForA11y__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { /** * An html id attribute, necessary for accessibility * @type {string} * @required */ id: __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_isRequiredForA11y___default()(__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])), /** * Sets the direction the Popover is positioned towards. */ placement: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOf(['top', 'right', 'bottom', 'left']), /** * The "top" position value for the Popover. */ positionTop: __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]), /** * The "left" position value for the Popover. */ positionLeft: __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]), /** * The "top" position value for the Popover arrow. */ arrowOffsetTop: __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]), /** * The "left" position value for the Popover arrow. */ arrowOffsetLeft: __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]), /** * Title content */ title: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node }; var defaultProps = { placement: 'right' }; var Popover = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Popover, _React$Component); function Popover() { return _React$Component.apply(this, arguments) || this; } var _proto = Popover.prototype; _proto.render = function render() { var _extends2; var _this$props = this.props, placement = _this$props.placement, positionTop = _this$props.positionTop, positionLeft = _this$props.positionLeft, arrowOffsetTop = _this$props.arrowOffsetTop, arrowOffsetLeft = _this$props.arrowOffsetLeft, title = _this$props.title, 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, ["placement", "positionTop", "positionLeft", "arrowOffsetTop", "arrowOffsetLeft", "title", "className", "style", "children"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__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_7__utils_bootstrapUtils__["getClassSet"])(bsProps), (_extends2 = {}, _extends2[placement] = true, _extends2)); var outerStyle = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({ display: 'block', top: positionTop, left: positionLeft }, style); var arrowStyle = { top: arrowOffsetTop, left: arrowOffsetLeft }; 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: "tooltip", className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes), style: outerStyle }), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", { className: "arrow", style: arrowStyle }), title && __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("h3", { className: Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'title') }, title), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", { className: Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'content') }, children)); }; return Popover; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Popover.propTypes = propTypes; Popover.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('popover', Popover)); /***/ }), /* 3991 */ /***/ (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__utils_ValidComponentChildren__ = __webpack_require__(95); var ROUND_PRECISION = 1000; /** * Validate that children, if any, are instances of `<ProgressBar>`. */ function onlyProgressBar(props, propName, componentName) { var children = props[propName]; if (!children) { return null; } var error = null; __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.forEach(children, function (child) { if (error) { return; } /** * Compare types in a way that works with libraries that patch and proxy * components like react-hot-loader. * * see https://github.com/gaearon/react-hot-loader#checking-element-types */ var element = __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(ProgressBar, null); if (child.type === element.type) return; var childIdentifier = __WEBPACK_IMPORTED_MODULE_5_react___default.a.isValidElement(child) ? child.type.displayName || child.type.name || child.type : child; error = new Error("Children of " + componentName + " can contain only ProgressBar " + ("components. Found " + childIdentifier + ".")); }); return error; } var propTypes = { min: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, now: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, max: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, label: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node, srOnly: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, striped: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, active: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, children: onlyProgressBar, /** * @private */ isChild: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool }; var defaultProps = { min: 0, max: 100, active: false, isChild: false, srOnly: false, striped: false }; function getPercentage(now, min, max) { var percentage = (now - min) / (max - min) * 100; return Math.round(percentage * ROUND_PRECISION) / ROUND_PRECISION; } var ProgressBar = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ProgressBar, _React$Component); function ProgressBar() { return _React$Component.apply(this, arguments) || this; } var _proto = ProgressBar.prototype; _proto.renderProgressBar = function renderProgressBar(_ref) { var _extends2; var min = _ref.min, now = _ref.now, max = _ref.max, label = _ref.label, srOnly = _ref.srOnly, striped = _ref.striped, active = _ref.active, className = _ref.className, style = _ref.style, props = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref, ["min", "now", "max", "label", "srOnly", "striped", "active", "className", "style"]); 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), (_extends2 = { active: active }, _extends2[Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'striped')] = active || striped, _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: "progressbar", className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, classes), style: Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({ width: getPercentage(now, min, max) + "%" }, style), "aria-valuenow": now, "aria-valuemin": min, "aria-valuemax": max }), srOnly ? __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("span", { className: "sr-only" }, label) : label); }; _proto.render = function render() { var _this$props = this.props, isChild = _this$props.isChild, props = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["isChild"]); if (isChild) { return this.renderProgressBar(props); } var min = props.min, now = props.now, max = props.max, label = props.label, srOnly = props.srOnly, striped = props.striped, active = props.active, bsClass = props.bsClass, bsStyle = props.bsStyle, className = props.className, children = props.children, wrapperProps = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(props, ["min", "now", "max", "label", "srOnly", "striped", "active", "bsClass", "bsStyle", "className", "children"]); return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("div", Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, wrapperProps, { className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()(className, 'progress') }), children ? __WEBPACK_IMPORTED_MODULE_9__utils_ValidComponentChildren__["a" /* default */].map(children, function (child) { return Object(__WEBPACK_IMPORTED_MODULE_5_react__["cloneElement"])(child, { isChild: true }); }) : this.renderProgressBar({ min: min, now: now, max: max, label: label, srOnly: srOnly, striped: striped, active: active, bsClass: bsClass, bsStyle: bsStyle })); }; return ProgressBar; }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component); ProgressBar.propTypes = propTypes; ProgressBar.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('progress-bar', 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 */]), ProgressBar))); /***/ }), /* 3992 */ /***/ (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 `<input>` element. Only functions can be used here. * * ```js * <Radio inputRef={ref => { this.input = ref; }} /> * ``` */ inputRef: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func }; var defaultProps = { inline: false, disabled: false, title: '' }; var Radio = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Radio, _React$Component); function Radio() { return _React$Component.apply(this, arguments) || this; } var _proto = Radio.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: "radio", 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 `<Radio inline>`. To display ' + 'validation state on an inline radio, set `validationState` on a ' + 'parent `<FormGroup>` 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 Radio; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Radio.propTypes = propTypes; Radio.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('radio', Radio)); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 3993 */ /***/ (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); // TODO: This should probably take a single `aspectRatio` prop. var propTypes = { /** * This component requires a single child element */ children: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.element.isRequired, /** * 16by9 aspect ratio */ a16by9: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, /** * 4by3 aspect ratio */ a4by3: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool }; var defaultProps = { a16by9: false, a4by3: false }; var ResponsiveEmbed = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ResponsiveEmbed, _React$Component); function ResponsiveEmbed() { return _React$Component.apply(this, arguments) || this; } var _proto = ResponsiveEmbed.prototype; _proto.render = function render() { var _extends2; var _this$props = this.props, a16by9 = _this$props.a16by9, a4by3 = _this$props.a4by3, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["a16by9", "a4by3", "className", "children"]); 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()(a16by9 || a4by3, 'Either `a16by9` or `a4by3` must be set.') : void 0; process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_6_warning___default()(!(a16by9 && a4by3), 'Only one of `a16by9` or `a4by3` can be set.') : 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), (_extends2 = {}, _extends2[Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, '16by9')] = a16by9, _extends2[Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, '4by3')] = a4by3, _extends2)); return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(classes) }, Object(__WEBPACK_IMPORTED_MODULE_4_react__["cloneElement"])(children, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'item')) }))); }; return ResponsiveEmbed; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); ResponsiveEmbed.propTypes = propTypes; ResponsiveEmbed.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('embed-responsive', ResponsiveEmbed)); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 3994 */ /***/ (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 Row = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Row, _React$Component); function Row() { return _React$Component.apply(this, arguments) || this; } var _proto = Row.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 Row; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Row.propTypes = propTypes; Row.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('row', Row)); /***/ }), /* 3995 */ /***/ (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__Button__ = __webpack_require__(395); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Dropdown__ = __webpack_require__(543); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__SplitToggle__ = __webpack_require__(3996); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_splitComponentProps__ = __webpack_require__(544); var propTypes = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, __WEBPACK_IMPORTED_MODULE_6__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, href: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, onClick: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, /** * The content of the split button. */ title: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.node.isRequired, /** * Accessible label for the toggle; the value of `title` if not specified. */ toggleLabel: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, // Override generated docs from <Dropdown>. /** * @private */ children: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.node }); var SplitButton = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(SplitButton, _React$Component); function SplitButton() { return _React$Component.apply(this, arguments) || this; } var _proto = SplitButton.prototype; _proto.render = function render() { var _this$props = this.props, bsSize = _this$props.bsSize, bsStyle = _this$props.bsStyle, title = _this$props.title, toggleLabel = _this$props.toggleLabel, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["bsSize", "bsStyle", "title", "toggleLabel", "children"]); var _splitComponentProps = Object(__WEBPACK_IMPORTED_MODULE_8__utils_splitComponentProps__["a" /* default */])(props, __WEBPACK_IMPORTED_MODULE_6__Dropdown__["a" /* default */].ControlledComponent), dropdownProps = _splitComponentProps[0], buttonProps = _splitComponentProps[1]; return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__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__Button__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, buttonProps, { disabled: props.disabled, bsSize: bsSize, bsStyle: bsStyle }), title), __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__SplitToggle__["a" /* default */], { "aria-label": toggleLabel || title, bsSize: bsSize, bsStyle: bsStyle }), __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__Dropdown__["a" /* default */].Menu, null, children)); }; return SplitButton; }(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component); SplitButton.propTypes = propTypes; SplitButton.Toggle = __WEBPACK_IMPORTED_MODULE_7__SplitToggle__["a" /* default */]; /* harmony default export */ __webpack_exports__["a"] = (SplitButton); /***/ }), /* 3996 */ /***/ (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__DropdownToggle__ = __webpack_require__(1579); var SplitToggle = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(SplitToggle, _React$Component); function SplitToggle() { return _React$Component.apply(this, arguments) || this; } var _proto = SplitToggle.prototype; _proto.render = function render() { return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__DropdownToggle__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, this.props, { useAnchor: false, noCaret: false })); }; return SplitToggle; }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component); SplitToggle.defaultProps = __WEBPACK_IMPORTED_MODULE_3__DropdownToggle__["a" /* default */].defaultProps; /* harmony default export */ __webpack_exports__["a"] = (SplitToggle); /***/ }), /* 3997 */ /***/ (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__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(5); /* 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__TabContainer__ = __webpack_require__(882); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__TabContent__ = __webpack_require__(883); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__TabPane__ = __webpack_require__(1594); var propTypes = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, __WEBPACK_IMPORTED_MODULE_6__TabPane__["a" /* default */].propTypes, { disabled: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool, title: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node, /** * tabClassName is used as className for the associated NavItem */ tabClassName: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string }); var Tab = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Tab, _React$Component); function Tab() { return _React$Component.apply(this, arguments) || this; } var _proto = Tab.prototype; _proto.render = function render() { var props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, this.props); // These props are for the parent `<Tabs>` rather than the `<TabPane>`. delete props.title; delete props.disabled; delete props.tabClassName; return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__TabPane__["a" /* default */], props); }; return Tab; }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component); Tab.propTypes = propTypes; Tab.Container = __WEBPACK_IMPORTED_MODULE_4__TabContainer__["a" /* default */]; Tab.Content = __WEBPACK_IMPORTED_MODULE_5__TabContent__["a" /* default */]; Tab.Pane = __WEBPACK_IMPORTED_MODULE_6__TabPane__["a" /* default */]; /* harmony default export */ __webpack_exports__["a"] = (Tab); /***/ }), /* 3998 */ /***/ (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 = { striped: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, bordered: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, condensed: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, hover: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, responsive: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool }; var defaultProps = { bordered: false, condensed: false, hover: false, responsive: false, striped: false }; var Table = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Table, _React$Component); function Table() { return _React$Component.apply(this, arguments) || this; } var _proto = Table.prototype; _proto.render = function render() { var _extends2; var _this$props = this.props, striped = _this$props.striped, bordered = _this$props.bordered, condensed = _this$props.condensed, hover = _this$props.hover, responsive = _this$props.responsive, className = _this$props.className, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["striped", "bordered", "condensed", "hover", "responsive", "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, 'striped')] = striped, _extends2[Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps, 'bordered')] = bordered, _extends2[Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps, 'condensed')] = condensed, _extends2[Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps, 'hover')] = hover, _extends2)); var table = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("table", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, elementProps, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); if (responsive) { return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", { className: Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["prefix"])(bsProps, 'responsive') }, table); } return table; }; return Table; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Table.propTypes = propTypes; Table.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__utils_bootstrapUtils__["bsClass"])('table', Table)); /***/ }), /* 3999 */ /***/ (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__(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_prop_types_extra_lib_isRequiredForA11y__ = __webpack_require__(162); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_isRequiredForA11y___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_isRequiredForA11y__); /* 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_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__Nav__ = __webpack_require__(1587); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__NavItem__ = __webpack_require__(1589); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__TabContainer__ = __webpack_require__(882); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__TabContent__ = __webpack_require__(883); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utils_ValidComponentChildren__ = __webpack_require__(95); var TabContainer = __WEBPACK_IMPORTED_MODULE_10__TabContainer__["a" /* default */].ControlledComponent; var propTypes = { /** * Mark the Tab with a matching `eventKey` as active. * * @controllable onSelect */ activeKey: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any, /** * Navigation style */ bsStyle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf(['tabs', 'pills']), /** * Sets a default animation strategy. Use `false` to disable, `true` * to enable the default `<Fade>` animation, or a react-transition-group * v2 `<Transition/>` component. */ animation: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_7_prop_types_extra_lib_elementType___default.a]), id: __WEBPACK_IMPORTED_MODULE_5_prop_types_extra_lib_isRequiredForA11y___default()(__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])), /** * Callback fired when a Tab is selected. * * ```js * function ( * Any eventKey, * SyntheticEvent event? * ) * ``` * * @controllable activeKey */ onSelect: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func, /** * Wait until the first "enter" transition to mount tabs (add them to the DOM) */ mountOnEnter: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool, /** * Unmount tabs (remove it from the DOM) when it is no longer visible */ unmountOnExit: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool }; var defaultProps = { bsStyle: 'tabs', animation: true, mountOnEnter: false, unmountOnExit: false }; function getDefaultActiveKey(children) { var defaultActiveKey; __WEBPACK_IMPORTED_MODULE_13__utils_ValidComponentChildren__["a" /* default */].forEach(children, function (child) { if (defaultActiveKey == null) { defaultActiveKey = child.props.eventKey; } }); return defaultActiveKey; } var Tabs = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Tabs, _React$Component); function Tabs() { return _React$Component.apply(this, arguments) || this; } var _proto = Tabs.prototype; _proto.renderTab = function renderTab(child) { var _child$props = child.props, title = _child$props.title, eventKey = _child$props.eventKey, disabled = _child$props.disabled, tabClassName = _child$props.tabClassName; if (title == null) { return null; } return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__NavItem__["a" /* default */], { eventKey: eventKey, disabled: disabled, className: tabClassName }, title); }; _proto.render = function render() { var _this$props = this.props, id = _this$props.id, onSelect = _this$props.onSelect, animation = _this$props.animation, mountOnEnter = _this$props.mountOnEnter, unmountOnExit = _this$props.unmountOnExit, bsClass = _this$props.bsClass, className = _this$props.className, style = _this$props.style, children = _this$props.children, _this$props$activeKey = _this$props.activeKey, activeKey = _this$props$activeKey === void 0 ? getDefaultActiveKey(children) : _this$props$activeKey, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["id", "onSelect", "animation", "mountOnEnter", "unmountOnExit", "bsClass", "className", "style", "children", "activeKey"]); return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(TabContainer, { id: id, activeKey: activeKey, onSelect: onSelect, className: className, style: style }, __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("div", null, __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__Nav__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { role: "tablist" }), __WEBPACK_IMPORTED_MODULE_13__utils_ValidComponentChildren__["a" /* default */].map(children, this.renderTab)), __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__TabContent__["a" /* default */], { bsClass: bsClass, animation: animation, mountOnEnter: mountOnEnter, unmountOnExit: unmountOnExit }, children))); }; return Tabs; }(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component); Tabs.propTypes = propTypes; Tabs.defaultProps = defaultProps; Object(__WEBPACK_IMPORTED_MODULE_12__utils_bootstrapUtils__["bsClass"])('tab', Tabs); /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_6_uncontrollable___default()(Tabs, { activeKey: 'onSelect' })); /***/ }), /* 4000 */ /***/ (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__SafeAnchor__ = __webpack_require__(132); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); /* eslint-disable jsx-a11y/alt-text */ var propTypes = { /** * src property that is passed down to the image inside this component */ src: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, /** * alt property that is passed down to the image inside this component */ alt: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, /** * href property that is passed down to the image inside this component */ href: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, /** * onError callback that is passed down to the image inside this component */ onError: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, /** * onLoad callback that is passed down to the image inside this component */ onLoad: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func }; var Thumbnail = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Thumbnail, _React$Component); function Thumbnail() { return _React$Component.apply(this, arguments) || this; } var _proto = Thumbnail.prototype; _proto.render = function render() { var _this$props = this.props, src = _this$props.src, alt = _this$props.alt, onError = _this$props.onError, onLoad = _this$props.onLoad, className = _this$props.className, children = _this$props.children, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props, ["src", "alt", "onError", "onLoad", "className", "children"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["splitBsProps"])(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var Component = elementProps.href ? __WEBPACK_IMPORTED_MODULE_6__SafeAnchor__["a" /* default */] : 'div'; var classes = Object(__WEBPACK_IMPORTED_MODULE_7__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) }), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("img", { src: src, alt: alt, onError: onError, onLoad: onLoad }), children && __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", { className: "caption" }, children)); }; return Thumbnail; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Thumbnail.propTypes = propTypes; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('thumbnail', Thumbnail)); /***/ }), /* 4001 */ /***/ (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_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_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_invariant__ = __webpack_require__(874); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_invariant__); /* 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_createChainedFunction__ = __webpack_require__(69); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__ = __webpack_require__(95); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ButtonGroup__ = __webpack_require__(879); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ToggleButton__ = __webpack_require__(1595); var propTypes = { /** * An HTML `<input>` name for each child button. * * __Required if `type` is set to `'radio'`__ */ name: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, /** * The value, or array of values, of the active (pressed) buttons * * @controllable onChange */ value: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.any, /** * Callback fired when a button is pressed, depending on whether the `type` * is `'radio'` or `'checkbox'`, `onChange` will be called with the value or * array of active values * * @controllable values */ onChange: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, /** * The input `type` of the rendered buttons, determines the toggle behavior * of the buttons */ type: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf(['checkbox', 'radio']).isRequired }; var defaultProps = { type: 'radio' }; var ToggleButtonGroup = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(ToggleButtonGroup, _React$Component); function ToggleButtonGroup() { return _React$Component.apply(this, arguments) || this; } var _proto = ToggleButtonGroup.prototype; _proto.getValues = function getValues() { var value = this.props.value; return value == null ? [] : [].concat(value); }; _proto.handleToggle = function handleToggle(value) { var _this$props = this.props, type = _this$props.type, onChange = _this$props.onChange; var values = this.getValues(); var isActive = values.indexOf(value) !== -1; if (type === 'radio') { if (!isActive) { onChange(value); } return; } if (isActive) { onChange(values.filter(function (n) { return n !== value; })); } else { onChange(values.concat([value])); } }; _proto.render = function render() { var _this = this; var _this$props2 = this.props, children = _this$props2.children, type = _this$props2.type, name = _this$props2.name, props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_this$props2, ["children", "type", "name"]); var values = this.getValues(); !(type !== 'radio' || !!name) ? process.env.NODE_ENV !== "production" ? __WEBPACK_IMPORTED_MODULE_5_invariant___default()(false, 'A `name` is required to group the toggle buttons when the `type` ' + 'is set to "radio"') : __WEBPACK_IMPORTED_MODULE_5_invariant___default()(false) : void 0; delete props.onChange; delete props.value; // the data attribute is required b/c twbs css uses it in the selector return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__ButtonGroup__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, props, { "data-toggle": "buttons" }), __WEBPACK_IMPORTED_MODULE_8__utils_ValidComponentChildren__["a" /* default */].map(children, function (child) { var _child$props = child.props, value = _child$props.value, onChange = _child$props.onChange; var handler = function handler() { return _this.handleToggle(value); }; return __WEBPACK_IMPORTED_MODULE_4_react___default.a.cloneElement(child, { type: type, name: child.name || name, checked: values.indexOf(value) !== -1, onChange: Object(__WEBPACK_IMPORTED_MODULE_7__utils_createChainedFunction__["a" /* default */])(onChange, handler) }); })); }; return ToggleButtonGroup; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); ToggleButtonGroup.propTypes = propTypes; ToggleButtonGroup.defaultProps = defaultProps; var UncontrolledToggleButtonGroup = __WEBPACK_IMPORTED_MODULE_6_uncontrollable___default()(ToggleButtonGroup, { value: 'onChange' }); UncontrolledToggleButtonGroup.Button = __WEBPACK_IMPORTED_MODULE_10__ToggleButton__["a" /* default */]; /* harmony default export */ __webpack_exports__["a"] = (UncontrolledToggleButtonGroup); /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) /***/ }), /* 4002 */ /***/ (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_isRequiredForA11y__ = __webpack_require__(162); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_isRequiredForA11y___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_isRequiredForA11y__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__ = __webpack_require__(13); var propTypes = { /** * An html id attribute, necessary for accessibility * @type {string|number} * @required */ id: __WEBPACK_IMPORTED_MODULE_6_prop_types_extra_lib_isRequiredForA11y___default()(__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])), /** * Sets the direction the Tooltip is positioned towards. */ placement: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOf(['top', 'right', 'bottom', 'left']), /** * The "top" position value for the Tooltip. */ positionTop: __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]), /** * The "left" position value for the Tooltip. */ positionLeft: __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]), /** * The "top" position value for the Tooltip arrow. */ arrowOffsetTop: __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]), /** * The "left" position value for the Tooltip arrow. */ arrowOffsetLeft: __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]) }; var defaultProps = { placement: 'right' }; var Tooltip = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Tooltip, _React$Component); function Tooltip() { return _React$Component.apply(this, arguments) || this; } var _proto = Tooltip.prototype; _proto.render = function render() { var _extends2; var _this$props = this.props, placement = _this$props.placement, positionTop = _this$props.positionTop, positionLeft = _this$props.positionLeft, arrowOffsetTop = _this$props.arrowOffsetTop, arrowOffsetLeft = _this$props.arrowOffsetLeft, 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, ["placement", "positionTop", "positionLeft", "arrowOffsetTop", "arrowOffsetLeft", "className", "style", "children"]); var _splitBsProps = Object(__WEBPACK_IMPORTED_MODULE_7__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_7__utils_bootstrapUtils__["getClassSet"])(bsProps), (_extends2 = {}, _extends2[placement] = true, _extends2)); var outerStyle = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({ top: positionTop, left: positionLeft }, style); var arrowStyle = { top: arrowOffsetTop, left: arrowOffsetLeft }; 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: "tooltip", className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes), style: outerStyle }), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", { className: Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'arrow'), style: arrowStyle }), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("div", { className: Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["prefix"])(bsProps, 'inner') }, children)); }; return Tooltip; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Tooltip.propTypes = propTypes; Tooltip.defaultProps = defaultProps; /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_7__utils_bootstrapUtils__["bsClass"])('tooltip', Tooltip)); /***/ }), /* 4003 */ /***/ (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); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_StyleConfig__ = __webpack_require__(79); var Well = /*#__PURE__*/ function (_React$Component) { Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Well, _React$Component); function Well() { return _React$Component.apply(this, arguments) || this; } var _proto = Well.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, { className: __WEBPACK_IMPORTED_MODULE_3_classnames___default()(className, classes) })); }; return Well; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["bsClass"])('well', Object(__WEBPACK_IMPORTED_MODULE_5__utils_bootstrapUtils__["bsSizes"])([__WEBPACK_IMPORTED_MODULE_6__utils_StyleConfig__["c" /* Size */].LARGE, __WEBPACK_IMPORTED_MODULE_6__utils_StyleConfig__["c" /* Size */].SMALL], Well))); /***/ }), /* 4004 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__bootstrapUtils__ = __webpack_require__(13); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "bootstrapUtils", function() { return __WEBPACK_IMPORTED_MODULE_0__bootstrapUtils__; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createChainedFunction__ = __webpack_require__(69); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createChainedFunction", function() { return __WEBPACK_IMPORTED_MODULE_1__createChainedFunction__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ValidComponentChildren__ = __webpack_require__(95); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ValidComponentChildren", function() { return __WEBPACK_IMPORTED_MODULE_2__ValidComponentChildren__["a"]; }); /***/ }), /* 4005 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _Form = __webpack_require__(4006); var _Form2 = _interopRequireDefault(_Form); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _Form2.default; /***/ }), /* 4006 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { 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; }; 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 _ErrorList = __webpack_require__(4007); var _ErrorList2 = _interopRequireDefault(_ErrorList); var _utils = __webpack_require__(66); var _validate = __webpack_require__(4008); var _validate2 = _interopRequireDefault(_validate); 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 Form = function (_Component) { _inherits(Form, _Component); function Form(props) { _classCallCheck(this, Form); var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props)); _this.onChange = function (formData) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { validate: false }; var mustValidate = !_this.props.noValidate && (_this.props.liveValidate || options.validate); var state = { formData: formData }; if (mustValidate) { var _this$validate = _this.validate(formData), errors = _this$validate.errors, errorSchema = _this$validate.errorSchema; state = _extends({}, state, { errors: errors, errorSchema: errorSchema }); } (0, _utils.setState)(_this, state, function () { if (_this.props.onChange) { _this.props.onChange(_this.state); } }); }; _this.onBlur = function () { if (_this.props.onBlur) { var _this$props; (_this$props = _this.props).onBlur.apply(_this$props, arguments); } }; _this.onFocus = function () { if (_this.props.onFocus) { var _this$props2; (_this$props2 = _this.props).onFocus.apply(_this$props2, arguments); } }; _this.onSubmit = function (event) { event.preventDefault(); if (!_this.props.noValidate) { var _ret = function () { var _this$validate2 = _this.validate(_this.state.formData), errors = _this$validate2.errors, errorSchema = _this$validate2.errorSchema; if (Object.keys(errors).length > 0) { (0, _utils.setState)(_this, { errors: errors, errorSchema: errorSchema }, function () { if (_this.props.onError) { _this.props.onError(errors); } else { console.error("Form validation failed", errors); } }); return { v: void 0 }; } }(); if ((typeof _ret === "undefined" ? "undefined" : _typeof(_ret)) === "object") return _ret.v; } if (_this.props.onSubmit) { _this.props.onSubmit(_extends({}, _this.state, { status: "submitted" })); } _this.setState({ errors: [], errorSchema: {} }); }; _this.state = _this.getStateFromProps(props); return _this; } _createClass(Form, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { this.setState(this.getStateFromProps(nextProps)); } }, { key: "getStateFromProps", value: function getStateFromProps(props) { var state = this.state || {}; var schema = "schema" in props ? props.schema : this.props.schema; var uiSchema = "uiSchema" in props ? props.uiSchema : this.props.uiSchema; var edit = typeof props.formData !== "undefined"; var liveValidate = props.liveValidate || this.props.liveValidate; var mustValidate = edit && !props.noValidate && liveValidate; var definitions = schema.definitions; var formData = (0, _utils.getDefaultFormState)(schema, props.formData, definitions); var _ref = mustValidate ? this.validate(formData, schema) : { errors: state.errors || [], errorSchema: state.errorSchema || {} }, errors = _ref.errors, errorSchema = _ref.errorSchema; var idSchema = (0, _utils.toIdSchema)(schema, uiSchema["ui:rootFieldId"], definitions); return { schema: schema, uiSchema: uiSchema, idSchema: idSchema, formData: formData, edit: edit, errors: errors, errorSchema: errorSchema }; } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState) { return (0, _utils.shouldRender)(this, nextProps, nextState); } }, { key: "validate", value: function validate(formData, schema) { var _props = this.props, validate = _props.validate, transformErrors = _props.transformErrors; return (0, _validate2.default)(formData, schema || this.props.schema, validate, transformErrors); } }, { key: "renderErrors", value: function renderErrors() { var _state = this.state, errors = _state.errors, errorSchema = _state.errorSchema, schema = _state.schema, uiSchema = _state.uiSchema; var _props2 = this.props, ErrorList = _props2.ErrorList, showErrorList = _props2.showErrorList, formContext = _props2.formContext; if (errors.length && showErrorList != false) { return _react2.default.createElement(ErrorList, { errors: errors, errorSchema: errorSchema, schema: schema, uiSchema: uiSchema, formContext: formContext }); } return null; } }, { key: "getRegistry", value: function getRegistry() { // For BC, accept passed SchemaField and TitleField props and pass them to // the "fields" registry one. var _getDefaultRegistry = (0, _utils.getDefaultRegistry)(), fields = _getDefaultRegistry.fields, widgets = _getDefaultRegistry.widgets; return { fields: _extends({}, fields, this.props.fields), widgets: _extends({}, widgets, this.props.widgets), ArrayFieldTemplate: this.props.ArrayFieldTemplate, ObjectFieldTemplate: this.props.ObjectFieldTemplate, FieldTemplate: this.props.FieldTemplate, definitions: this.props.schema.definitions || {}, formContext: this.props.formContext || {} }; } }, { key: "render", value: function render() { var _props3 = this.props, children = _props3.children, safeRenderCompletion = _props3.safeRenderCompletion, id = _props3.id, className = _props3.className, name = _props3.name, method = _props3.method, target = _props3.target, action = _props3.action, autocomplete = _props3.autocomplete, enctype = _props3.enctype, acceptcharset = _props3.acceptcharset, noHtml5Validate = _props3.noHtml5Validate; var _state2 = this.state, schema = _state2.schema, uiSchema = _state2.uiSchema, formData = _state2.formData, errorSchema = _state2.errorSchema, idSchema = _state2.idSchema; var registry = this.getRegistry(); var _SchemaField = registry.fields.SchemaField; return _react2.default.createElement( "form", { className: className ? className : "rjsf", id: id, name: name, method: method, target: target, action: action, autoComplete: autocomplete, encType: enctype, acceptCharset: acceptcharset, noValidate: noHtml5Validate, onSubmit: this.onSubmit }, this.renderErrors(), _react2.default.createElement(_SchemaField, { schema: schema, uiSchema: uiSchema, errorSchema: errorSchema, idSchema: idSchema, formData: formData, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, registry: registry, safeRenderCompletion: safeRenderCompletion }), children ? children : _react2.default.createElement( "p", null, _react2.default.createElement( "button", { type: "submit", className: "btn btn-info" }, "Submit" ) ) ); } }]); return Form; }(_react.Component); Form.defaultProps = { uiSchema: {}, noValidate: false, liveValidate: false, safeRenderCompletion: false, noHtml5Validate: false, ErrorList: _ErrorList2.default }; exports.default = Form; if (process.env.NODE_ENV !== "production") { Form.propTypes = { schema: _propTypes2.default.object.isRequired, uiSchema: _propTypes2.default.object, formData: _propTypes2.default.any, widgets: _propTypes2.default.objectOf(_propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.object])), fields: _propTypes2.default.objectOf(_propTypes2.default.func), ArrayFieldTemplate: _propTypes2.default.func, ObjectFieldTemplate: _propTypes2.default.func, FieldTemplate: _propTypes2.default.func, ErrorList: _propTypes2.default.func, onChange: _propTypes2.default.func, onError: _propTypes2.default.func, showErrorList: _propTypes2.default.bool, onSubmit: _propTypes2.default.func, id: _propTypes2.default.string, className: _propTypes2.default.string, name: _propTypes2.default.string, method: _propTypes2.default.string, target: _propTypes2.default.string, action: _propTypes2.default.string, autocomplete: _propTypes2.default.string, enctype: _propTypes2.default.string, acceptcharset: _propTypes2.default.string, noValidate: _propTypes2.default.bool, noHtml5Validate: _propTypes2.default.bool, liveValidate: _propTypes2.default.bool, validate: _propTypes2.default.func, transformErrors: _propTypes2.default.func, safeRenderCompletion: _propTypes2.default.bool, formContext: _propTypes2.default.object }; } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4007 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = ErrorList; var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function ErrorList(props) { var errors = props.errors; return _react2.default.createElement( "div", { className: "panel panel-danger errors" }, _react2.default.createElement( "div", { className: "panel-heading" }, _react2.default.createElement( "h3", { className: "panel-title" }, "Errors" ) ), _react2.default.createElement( "ul", { className: "list-group" }, errors.map(function (error, i) { return _react2.default.createElement( "li", { key: i, className: "list-group-item text-danger" }, error.stack ); }) ) ); } /***/ }), /* 4008 */ /***/ (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; }; exports.toErrorList = toErrorList; exports.default = validateFormData; var _lodash = __webpack_require__(4009); var _lodash2 = _interopRequireDefault(_lodash); var _jsonschema = __webpack_require__(4010); 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 toErrorSchema(errors) { // Transforms a jsonschema validation errors list: // [ // {property: "instance.level1.level2[2].level3", message: "err a"}, // {property: "instance.level1.level2[2].level3", message: "err b"}, // {property: "instance.level1.level2[4].level3", message: "err b"}, // ] // Into an error tree: // { // level1: { // level2: { // 2: {level3: {errors: ["err a", "err b"]}}, // 4: {level3: {errors: ["err b"]}}, // } // } // }; if (!errors.length) { return {}; } return errors.reduce(function (errorSchema, error) { var property = error.property, message = error.message; var path = (0, _lodash2.default)(property); var parent = errorSchema; var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = path.slice(1)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var segment = _step.value; if (!(segment in parent)) { parent[segment] = {}; } parent = parent[segment]; } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator.return) { _iterator.return(); } } finally { if (_didIteratorError) { throw _iteratorError; } } } if (Array.isArray(parent.__errors)) { // We store the list of errors for this node in a property named __errors // to avoid name collision with a possible sub schema field named // "errors" (see `validate.createErrorHandler`). parent.__errors = parent.__errors.concat(message); } else { parent.__errors = [message]; } return errorSchema; }, {}); } function toErrorList(errorSchema) { var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "root"; // XXX: We should transform fieldName as a full field path string. var errorList = []; if ("__errors" in errorSchema) { errorList = errorList.concat(errorSchema.__errors.map(function (stack) { return { stack: fieldName + ": " + stack }; })); } return Object.keys(errorSchema).reduce(function (acc, key) { if (key !== "__errors") { acc = acc.concat(toErrorList(errorSchema[key], key)); } return acc; }, errorList); } function createErrorHandler(formData) { var handler = { // We store the list of errors for this node in a property named __errors // to avoid name collision with a possible sub schema field named // "errors" (see `utils.toErrorSchema`). __errors: [], addError: function addError(message) { this.__errors.push(message); } }; if ((0, _utils.isObject)(formData)) { return Object.keys(formData).reduce(function (acc, key) { return _extends({}, acc, _defineProperty({}, key, createErrorHandler(formData[key]))); }, handler); } if (Array.isArray(formData)) { return formData.reduce(function (acc, value, key) { return _extends({}, acc, _defineProperty({}, key, createErrorHandler(value))); }, handler); } return handler; } function unwrapErrorHandler(errorHandler) { return Object.keys(errorHandler).reduce(function (acc, key) { if (key === "addError") { return acc; } else if (key === "__errors") { return _extends({}, acc, _defineProperty({}, key, errorHandler[key])); } return _extends({}, acc, _defineProperty({}, key, unwrapErrorHandler(errorHandler[key]))); }, {}); } /** * This function processes the formData with a user `validate` contributed * function, which receives the form data and an `errorHandler` object that * will be used to add custom validation errors for each field. */ function validateFormData(formData, schema, customValidate, transformErrors) { var _jsonValidate = (0, _jsonschema.validate)(formData, schema), errors = _jsonValidate.errors; if (typeof transformErrors === "function") { errors = transformErrors(errors); } var errorSchema = toErrorSchema(errors); if (typeof customValidate !== "function") { return { errors: errors, errorSchema: errorSchema }; } var errorHandler = customValidate(formData, createErrorHandler(formData)); var userErrorSchema = unwrapErrorHandler(errorHandler); var newErrorSchema = (0, _utils.mergeObjects)(errorSchema, userErrorSchema, true); // XXX: The errors list produced is not fully compliant with the format // exposed by the jsonschema lib, which contains full field paths and other // properties. var newErrors = toErrorList(newErrorSchema); return { errors: newErrors, errorSchema: newErrorSchema }; } /***/ }), /* 4009 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** * lodash (Custom Build) <https://lodash.com/> * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors <https://jquery.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** `Object#toString` result references. */ var funcTag = '[object Function]', genTag = '[object GeneratorFunction]', symbolTag = '[object Symbol]'; /** Used to match property names within property paths. */ var reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** 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')(); /** * 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 ? array.length : 0, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } /** * 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]; } /** * Checks if `value` is a host object in IE < 9. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a host object, else `false`. */ function isHostObject(value) { // Many host objects are `Object` objects that can coerce to strings // despite having improperly defined `toString` methods. var result = false; if (value != null && typeof value.toString != 'function') { try { result = !!(value + ''); } catch (e) {} } 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 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 decompiled source of functions. */ var funcToString = funcProto.toString; /** 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 objectToString = 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 Symbol = root.Symbol, splice = arrayProto.splice; /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'), nativeCreate = getNative(Object, 'create'); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries ? entries.length : 0; 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) : {}; } /** * 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) { return this.has(key) && delete this.__data__[key]; } /** * 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__; 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 ? entries.length : 0; 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__ = []; } /** * 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); } 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) { 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 ? entries.length : 0; 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.__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) { return getMapData(this, key)['delete'](key); } /** * 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) { getMapData(this, key).set(key, value); 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; /** * 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 `_.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) || isHostObject(value)) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } /** * 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 (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } /** * 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; } /** * 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; } /** * 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); } /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoize(function(string) { string = toString(string); var result = []; if (reLeadingDot.test(string)) { result.push(''); } string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); /** * 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; } /** * Converts `func` to its source code. * * @private * @param {Function} func The function to process. * @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 ''; } /** * 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 `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 && 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); return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Assign cache to `_.memoize`. memoize.Cache = MapCache; /** * 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 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 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) { // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** * 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 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 process. * @returns {string} Returns the string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } /** * Converts `value` to a property path array. * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {*} value The value to convert. * @returns {Array} Returns the new property path array. * @example * * _.toPath('a.b.c'); * // => ['a', 'b', 'c'] * * _.toPath('a[0].b.c'); * // => ['a', '0', 'b', 'c'] */ function toPath(value) { if (isArray(value)) { return arrayMap(value, toKey); } return isSymbol(value) ? [value] : copyArray(stringToPath(value)); } module.exports = toPath; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27))) /***/ }), /* 4010 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Validator = module.exports.Validator = __webpack_require__(4011); module.exports.ValidatorResult = __webpack_require__(319).ValidatorResult; module.exports.ValidationError = __webpack_require__(319).ValidationError; module.exports.SchemaError = __webpack_require__(319).SchemaError; module.exports.SchemaScanResult = __webpack_require__(885).SchemaScanResult; module.exports.scan = __webpack_require__(885).scan; module.exports.validate = function (instance, schema, options) { var v = new Validator(); return v.validate(instance, schema, options); }; /***/ }), /* 4011 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var urilib = __webpack_require__(884); var attribute = __webpack_require__(4017); var helpers = __webpack_require__(319); var scanSchema = __webpack_require__(885).scan; var ValidatorResult = helpers.ValidatorResult; var SchemaError = helpers.SchemaError; var SchemaContext = helpers.SchemaContext; //var anonymousBase = 'vnd.jsonschema:///'; var anonymousBase = '/'; /** * Creates a new Validator object * @name Validator * @constructor */ var Validator = function Validator () { // Allow a validator instance to override global custom formats or to have their // own custom formats. this.customFormats = Object.create(Validator.prototype.customFormats); this.schemas = {}; this.unresolvedRefs = []; // Use Object.create to make this extensible without Validator instances stepping on each other's toes. this.types = Object.create(types); this.attributes = Object.create(attribute.validators); }; // Allow formats to be registered globally. Validator.prototype.customFormats = {}; // Hint at the presence of a property Validator.prototype.schemas = null; Validator.prototype.types = null; Validator.prototype.attributes = null; Validator.prototype.unresolvedRefs = null; /** * Adds a schema with a certain urn to the Validator instance. * @param schema * @param urn * @return {Object} */ Validator.prototype.addSchema = function addSchema (schema, base) { var self = this; if (!schema) { return null; } var scan = scanSchema(base||anonymousBase, schema); var ourUri = base || schema.id; for(var uri in scan.id){ this.schemas[uri] = scan.id[uri]; } for(var uri in scan.ref){ this.unresolvedRefs.push(uri); } this.unresolvedRefs = this.unresolvedRefs.filter(function(uri){ return typeof self.schemas[uri]==='undefined'; }); return this.schemas[ourUri]; }; Validator.prototype.addSubSchemaArray = function addSubSchemaArray(baseuri, schemas) { if(!Array.isArray(schemas)) return; for(var i=0; i<schemas.length; i++){ this.addSubSchema(baseuri, schemas[i]); } }; Validator.prototype.addSubSchemaObject = function addSubSchemaArray(baseuri, schemas) { if(!schemas || typeof schemas!='object') return; for(var p in schemas){ this.addSubSchema(baseuri, schemas[p]); } }; /** * Sets all the schemas of the Validator instance. * @param schemas */ Validator.prototype.setSchemas = function setSchemas (schemas) { this.schemas = schemas; }; /** * Returns the schema of a certain urn * @param urn */ Validator.prototype.getSchema = function getSchema (urn) { return this.schemas[urn]; }; /** * Validates instance against the provided schema * @param instance * @param schema * @param [options] * @param [ctx] * @return {Array} */ Validator.prototype.validate = function validate (instance, schema, options, ctx) { if((typeof schema !== 'boolean' && typeof schema !== 'object') || schema === null){ throw new SchemaError('Expected `schema` to be an object or boolean'); } if (!options) { options = {}; } var propertyName = options.propertyName || 'instance'; // This will work so long as the function at uri.resolve() will resolve a relative URI to a relative URI var base = urilib.resolve(options.base||anonymousBase, schema.id||''); if(!ctx){ ctx = new SchemaContext(schema, options, propertyName, base, Object.create(this.schemas)); if (!ctx.schemas[base]) { ctx.schemas[base] = schema; } var found = scanSchema(base, schema); for(var n in found.id){ var sch = found.id[n]; ctx.schemas[n] = sch; } } var result = this.validateSchema(instance, schema, options, ctx); if (!result) { throw new Error('Result undefined'); } return result; }; /** * @param Object schema * @return mixed schema uri or false */ function shouldResolve(schema) { var ref = (typeof schema === 'string') ? schema : schema.$ref; if (typeof ref=='string') return ref; return false; } /** * Validates an instance against the schema (the actual work horse) * @param instance * @param schema * @param options * @param ctx * @private * @return {ValidatorResult} */ Validator.prototype.validateSchema = function validateSchema (instance, schema, options, ctx) { var result = new ValidatorResult(instance, schema, options, ctx); // Support for the true/false schemas if(typeof schema==='boolean') { if(schema===true){ // `true` is always valid schema = {}; }else if(schema===false){ // `false` is always invalid schema = {type: []}; } }else if(!schema){ // This might be a string throw new Error("schema is undefined"); } if (schema['extends']) { if (Array.isArray(schema['extends'])) { var schemaobj = {schema: schema, ctx: ctx}; schema['extends'].forEach(this.schemaTraverser.bind(this, schemaobj)); schema = schemaobj.schema; schemaobj.schema = null; schemaobj.ctx = null; schemaobj = null; } else { schema = helpers.deepMerge(schema, this.superResolve(schema['extends'], ctx)); } } // If passed a string argument, load that schema URI var switchSchema = shouldResolve(schema); if (switchSchema) { var resolved = this.resolve(schema, switchSchema, ctx); var subctx = new SchemaContext(resolved.subschema, options, ctx.propertyPath, resolved.switchSchema, ctx.schemas); return this.validateSchema(instance, resolved.subschema, options, subctx); } var skipAttributes = options && options.skipAttributes || []; // Validate each schema attribute against the instance for (var key in schema) { if (!attribute.ignoreProperties[key] && skipAttributes.indexOf(key) < 0) { var validatorErr = null; var validator = this.attributes[key]; if (validator) { validatorErr = validator.call(this, instance, schema, options, ctx); } else if (options.allowUnknownAttributes === false) { // This represents an error with the schema itself, not an invalid instance throw new SchemaError("Unsupported attribute: " + key, schema); } if (validatorErr) { result.importErrors(validatorErr); } } } if (typeof options.rewrite == 'function') { var value = options.rewrite.call(this, instance, schema, options, ctx); result.instance = value; } return result; }; /** * @private * @param Object schema * @param SchemaContext ctx * @returns Object schema or resolved schema */ Validator.prototype.schemaTraverser = function schemaTraverser (schemaobj, s) { schemaobj.schema = helpers.deepMerge(schemaobj.schema, this.superResolve(s, schemaobj.ctx)); }; /** * @private * @param Object schema * @param SchemaContext ctx * @returns Object schema or resolved schema */ Validator.prototype.superResolve = function superResolve (schema, ctx) { var ref = shouldResolve(schema); if(ref) { return this.resolve(schema, ref, ctx).subschema; } return schema; }; /** * @private * @param Object schema * @param Object switchSchema * @param SchemaContext ctx * @return Object resolved schemas {subschema:String, switchSchema: String} * @throws SchemaError */ Validator.prototype.resolve = function resolve (schema, switchSchema, ctx) { switchSchema = ctx.resolve(switchSchema); // First see if the schema exists under the provided URI if (ctx.schemas[switchSchema]) { return {subschema: ctx.schemas[switchSchema], switchSchema: switchSchema}; } // Else try walking the property pointer var parsed = urilib.parse(switchSchema); var fragment = parsed && parsed.hash; var document = fragment && fragment.length && switchSchema.substr(0, switchSchema.length - fragment.length); if (!document || !ctx.schemas[document]) { throw new SchemaError("no such schema <" + switchSchema + ">", schema); } var subschema = helpers.objectGetPath(ctx.schemas[document], fragment.substr(1)); if(subschema===undefined){ throw new SchemaError("no such schema " + fragment + " located in <" + document + ">", schema); } return {subschema: subschema, switchSchema: switchSchema}; }; /** * Tests whether the instance if of a certain type. * @private * @param instance * @param schema * @param options * @param ctx * @param type * @return {boolean} */ Validator.prototype.testType = function validateType (instance, schema, options, ctx, type) { if (typeof this.types[type] == 'function') { return this.types[type].call(this, instance); } if (type && typeof type == 'object') { var res = this.validateSchema(instance, type, options, ctx); return res === undefined || !(res && res.errors.length); } // Undefined or properties not on the list are acceptable, same as not being defined return true; }; var types = Validator.prototype.types = {}; types.string = function testString (instance) { return typeof instance == 'string'; }; types.number = function testNumber (instance) { // isFinite returns false for NaN, Infinity, and -Infinity return typeof instance == 'number' && isFinite(instance); }; types.integer = function testInteger (instance) { return (typeof instance == 'number') && instance % 1 === 0; }; types.boolean = function testBoolean (instance) { return typeof instance == 'boolean'; }; types.array = function testArray (instance) { return Array.isArray(instance); }; types['null'] = function testNull (instance) { return instance === null; }; types.date = function testDate (instance) { return instance instanceof Date; }; types.any = function testAny (instance) { return true; }; types.object = function testObject (instance) { // TODO: fix this - see #15 return instance && (typeof instance === 'object') && !(Array.isArray(instance)) && !(instance instanceof Date); }; module.exports = Validator; /***/ }), /* 4012 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { /** Detect free variables */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; var freeModule = typeof module == 'object' && module && !module.nodeType && module; var freeGlobal = typeof global == 'object' && global; if ( freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal ) { root = freeGlobal; } /** * The `punycode` object. * @name punycode * @type Object */ var punycode, /** Highest positive signed 32-bit float value */ maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 /** Bootstring parameters */ base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, // 0x80 delimiter = '-', // '\x2D' /** Regular expressions */ regexPunycode = /^xn--/, regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators /** Error messages */ errors = { 'overflow': 'Overflow: input needs wider integers to process', 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', 'invalid-input': 'Invalid input' }, /** Convenience shortcuts */ baseMinusTMin = base - tMin, floor = Math.floor, stringFromCharCode = String.fromCharCode, /** Temporary variable */ key; /*--------------------------------------------------------------------------*/ /** * A generic error utility function. * @private * @param {String} type The error type. * @returns {Error} Throws a `RangeError` with the applicable error message. */ function error(type) { throw new RangeError(errors[type]); } /** * A generic `Array#map` utility function. * @private * @param {Array} array The array to iterate over. * @param {Function} callback The function that gets called for every array * item. * @returns {Array} A new array of values returned by the callback function. */ function map(array, fn) { var length = array.length; var result = []; while (length--) { result[length] = fn(array[length]); } return result; } /** * A simple `Array#map`-like wrapper to work with domain name strings or email * addresses. * @private * @param {String} domain The domain name or email address. * @param {Function} callback The function that gets called for every * character. * @returns {Array} A new string of characters returned by the callback * function. */ function mapDomain(string, fn) { var parts = string.split('@'); var result = ''; if (parts.length > 1) { // In email addresses, only the domain name should be punycoded. Leave // the local part (i.e. everything up to `@`) intact. result = parts[0] + '@'; string = parts[1]; } // Avoid `split(regex)` for IE8 compatibility. See #17. string = string.replace(regexSeparators, '\x2E'); var labels = string.split('.'); var encoded = map(labels, fn).join('.'); return result + encoded; } /** * Creates an array containing the numeric code points of each Unicode * character in the string. While JavaScript uses UCS-2 internally, * this function will convert a pair of surrogate halves (each of which * UCS-2 exposes as separate characters) into a single code point, * matching UTF-16. * @see `punycode.ucs2.encode` * @see <https://mathiasbynens.be/notes/javascript-encoding> * @memberOf punycode.ucs2 * @name decode * @param {String} string The Unicode input string (UCS-2). * @returns {Array} The new array of code points. */ function ucs2decode(string) { var output = [], counter = 0, length = string.length, value, extra; while (counter < length) { value = string.charCodeAt(counter++); if (value >= 0xD800 && value <= 0xDBFF && counter < length) { // high surrogate, and there is a next character extra = string.charCodeAt(counter++); if ((extra & 0xFC00) == 0xDC00) { // low surrogate output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); } else { // unmatched surrogate; only append this code unit, in case the next // code unit is the high surrogate of a surrogate pair output.push(value); counter--; } } else { output.push(value); } } return output; } /** * Creates a string based on an array of numeric code points. * @see `punycode.ucs2.decode` * @memberOf punycode.ucs2 * @name encode * @param {Array} codePoints The array of numeric code points. * @returns {String} The new Unicode string (UCS-2). */ function ucs2encode(array) { return map(array, function(value) { var output = ''; if (value > 0xFFFF) { value -= 0x10000; output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); value = 0xDC00 | value & 0x3FF; } output += stringFromCharCode(value); return output; }).join(''); } /** * Converts a basic code point into a digit/integer. * @see `digitToBasic()` * @private * @param {Number} codePoint The basic numeric code point value. * @returns {Number} The numeric value of a basic code point (for use in * representing integers) in the range `0` to `base - 1`, or `base` if * the code point does not represent a value. */ function basicToDigit(codePoint) { if (codePoint - 48 < 10) { return codePoint - 22; } if (codePoint - 65 < 26) { return codePoint - 65; } if (codePoint - 97 < 26) { return codePoint - 97; } return base; } /** * Converts a digit/integer into a basic code point. * @see `basicToDigit()` * @private * @param {Number} digit The numeric value of a basic code point. * @returns {Number} The basic code point whose value (when used for * representing integers) is `digit`, which needs to be in the range * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is * used; else, the lowercase form is used. The behavior is undefined * if `flag` is non-zero and `digit` has no uppercase form. */ function digitToBasic(digit, flag) { // 0..25 map to ASCII a..z or A..Z // 26..35 map to ASCII 0..9 return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); } /** * Bias adaptation function as per section 3.4 of RFC 3492. * https://tools.ietf.org/html/rfc3492#section-3.4 * @private */ function adapt(delta, numPoints, firstTime) { var k = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { delta = floor(delta / baseMinusTMin); } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); } /** * Converts a Punycode string of ASCII-only symbols to a string of Unicode * symbols. * @memberOf punycode * @param {String} input The Punycode string of ASCII-only symbols. * @returns {String} The resulting string of Unicode symbols. */ function decode(input) { // Don't use UCS-2 var output = [], inputLength = input.length, out, i = 0, n = initialN, bias = initialBias, basic, j, index, oldi, w, k, digit, t, /** Cached calculation results */ baseMinusT; // Handle the basic code points: let `basic` be the number of input code // points before the last delimiter, or `0` if there is none, then copy // the first basic code points to the output. basic = input.lastIndexOf(delimiter); if (basic < 0) { basic = 0; } for (j = 0; j < basic; ++j) { // if it's not a basic code point if (input.charCodeAt(j) >= 0x80) { error('not-basic'); } output.push(input.charCodeAt(j)); } // Main decoding loop: start just after the last delimiter if any basic code // points were copied; start at the beginning otherwise. for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { // `index` is the index of the next character to be consumed. // Decode a generalized variable-length integer into `delta`, // which gets added to `i`. The overflow checking is easier // if we increase `i` as we go, then subtract off its starting // value at the end to obtain `delta`. for (oldi = i, w = 1, k = base; /* no condition */; k += base) { if (index >= inputLength) { error('invalid-input'); } digit = basicToDigit(input.charCodeAt(index++)); if (digit >= base || digit > floor((maxInt - i) / w)) { error('overflow'); } i += digit * w; t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); if (digit < t) { break; } baseMinusT = base - t; if (w > floor(maxInt / baseMinusT)) { error('overflow'); } w *= baseMinusT; } out = output.length + 1; bias = adapt(i - oldi, out, oldi == 0); // `i` was supposed to wrap around from `out` to `0`, // incrementing `n` each time, so we'll fix that now: if (floor(i / out) > maxInt - n) { error('overflow'); } n += floor(i / out); i %= out; // Insert `n` at position `i` of the output output.splice(i++, 0, n); } return ucs2encode(output); } /** * Converts a string of Unicode symbols (e.g. a domain name label) to a * Punycode string of ASCII-only symbols. * @memberOf punycode * @param {String} input The string of Unicode symbols. * @returns {String} The resulting Punycode string of ASCII-only symbols. */ function encode(input) { var n, delta, handledCPCount, basicLength, bias, j, m, q, k, t, currentValue, output = [], /** `inputLength` will hold the number of code points in `input`. */ inputLength, /** Cached calculation results */ handledCPCountPlusOne, baseMinusT, qMinusT; // Convert the input in UCS-2 to Unicode input = ucs2decode(input); // Cache the length inputLength = input.length; // Initialize the state n = initialN; delta = 0; bias = initialBias; // Handle the basic code points for (j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue < 0x80) { output.push(stringFromCharCode(currentValue)); } } handledCPCount = basicLength = output.length; // `handledCPCount` is the number of code points that have been handled; // `basicLength` is the number of basic code points. // Finish the basic string - if it is not empty - with a delimiter if (basicLength) { output.push(delimiter); } // Main encoding loop: while (handledCPCount < inputLength) { // All non-basic code points < n have been handled already. Find the next // larger one: for (m = maxInt, j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue >= n && currentValue < m) { m = currentValue; } } // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, // but guard against overflow handledCPCountPlusOne = handledCPCount + 1; if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { error('overflow'); } delta += (m - n) * handledCPCountPlusOne; n = m; for (j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue < n && ++delta > maxInt) { error('overflow'); } if (currentValue == n) { // Represent delta as a generalized variable-length integer for (q = delta, k = base; /* no condition */; k += base) { t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); if (q < t) { break; } qMinusT = q - t; baseMinusT = base - t; output.push( stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) ); q = floor(qMinusT / baseMinusT); } output.push(stringFromCharCode(digitToBasic(q, 0))); bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); delta = 0; ++handledCPCount; } } ++delta; ++n; } return output.join(''); } /** * Converts a Punycode string representing a domain name or an email address * to Unicode. Only the Punycoded parts of the input will be converted, i.e. * it doesn't matter if you call it on a string that has already been * converted to Unicode. * @memberOf punycode * @param {String} input The Punycoded domain name or email address to * convert to Unicode. * @returns {String} The Unicode representation of the given Punycode * string. */ function toUnicode(input) { return mapDomain(input, function(string) { return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; }); } /** * Converts a Unicode string representing a domain name or an email address to * Punycode. Only the non-ASCII parts of the domain name will be converted, * i.e. it doesn't matter if you call it with a domain that's already in * ASCII. * @memberOf punycode * @param {String} input The domain name or email address to convert, as a * Unicode string. * @returns {String} The Punycode representation of the given domain name or * email address. */ function toASCII(input) { return mapDomain(input, function(string) { return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; }); } /*--------------------------------------------------------------------------*/ /** Define the public API */ punycode = { /** * A string representing the current Punycode.js version number. * @memberOf punycode * @type String */ 'version': '1.4.1', /** * An object of methods to convert from JavaScript's internal character * representation (UCS-2) to Unicode code points, and back. * @see <https://mathiasbynens.be/notes/javascript-encoding> * @memberOf punycode * @type Object */ 'ucs2': { 'decode': ucs2decode, 'encode': ucs2encode }, 'decode': decode, 'encode': encode, 'toASCII': toASCII, 'toUnicode': toUnicode }; /** Expose `punycode` */ // Some AMD build optimizers, like r.js, check for specific condition patterns // like the following: if ( true ) { !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { return punycode; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (freeExports && freeModule) { if (module.exports == freeExports) { // in Node.js, io.js, or RingoJS v0.8.0+ freeModule.exports = punycode; } else { // in Narwhal or RingoJS v0.7.0- for (key in punycode) { punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); } } } else { // in Rhino or a web browser root.punycode = punycode; } }(this)); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(64)(module), __webpack_require__(27))) /***/ }), /* 4013 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = { isString: function(arg) { return typeof(arg) === 'string'; }, isObject: function(arg) { return typeof(arg) === 'object' && arg !== null; }, isNull: function(arg) { return arg === null; }, isNullOrUndefined: function(arg) { return arg == null; } }; /***/ }), /* 4014 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.decode = exports.parse = __webpack_require__(4015); exports.encode = exports.stringify = __webpack_require__(4016); /***/ }), /* 4015 */ /***/ (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. // If obj.hasOwnProperty has been overridden, then calling // obj.hasOwnProperty(prop) will break. // See: https://github.com/joyent/node/issues/1707 function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } module.exports = function(qs, sep, eq, options) { sep = sep || '&'; eq = eq || '='; var obj = {}; if (typeof qs !== 'string' || qs.length === 0) { return obj; } var regexp = /\+/g; qs = qs.split(sep); var maxKeys = 1000; if (options && typeof options.maxKeys === 'number') { maxKeys = options.maxKeys; } var len = qs.length; // maxKeys <= 0 means that we should not limit keys count if (maxKeys > 0 && len > maxKeys) { len = maxKeys; } for (var i = 0; i < len; ++i) { var x = qs[i].replace(regexp, '%20'), idx = x.indexOf(eq), kstr, vstr, k, v; if (idx >= 0) { kstr = x.substr(0, idx); vstr = x.substr(idx + 1); } else { kstr = x; vstr = ''; } k = decodeURIComponent(kstr); v = decodeURIComponent(vstr); if (!hasOwnProperty(obj, k)) { obj[k] = v; } else if (isArray(obj[k])) { obj[k].push(v); } else { obj[k] = [obj[k], v]; } } return obj; }; var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; /***/ }), /* 4016 */ /***/ (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 stringifyPrimitive = function(v) { switch (typeof v) { case 'string': return v; case 'boolean': return v ? 'true' : 'false'; case 'number': return isFinite(v) ? v : ''; default: return ''; } }; module.exports = function(obj, sep, eq, name) { sep = sep || '&'; eq = eq || '='; if (obj === null) { obj = undefined; } if (typeof obj === 'object') { return map(objectKeys(obj), function(k) { var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; if (isArray(obj[k])) { return map(obj[k], function(v) { return ks + encodeURIComponent(stringifyPrimitive(v)); }).join(sep); } else { return ks + encodeURIComponent(stringifyPrimitive(obj[k])); } }).join(sep); } if (!name) return ''; return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); }; var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; function map (xs, f) { if (xs.map) return xs.map(f); var res = []; for (var i = 0; i < xs.length; i++) { res.push(f(xs[i], i)); } return res; } var objectKeys = Object.keys || function (obj) { var res = []; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); } return res; }; /***/ }), /* 4017 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var helpers = __webpack_require__(319); /** @type ValidatorResult */ var ValidatorResult = helpers.ValidatorResult; /** @type SchemaError */ var SchemaError = helpers.SchemaError; var attribute = {}; attribute.ignoreProperties = { // informative properties 'id': true, 'default': true, 'description': true, 'title': true, // arguments to other properties 'exclusiveMinimum': true, 'exclusiveMaximum': true, 'additionalItems': true, // special-handled properties '$schema': true, '$ref': true, 'extends': true, }; /** * @name validators */ var validators = attribute.validators = {}; /** * Validates whether the instance if of a certain type * @param instance * @param schema * @param options * @param ctx * @return {ValidatorResult|null} */ validators.type = function validateType (instance, schema, options, ctx) { // Ignore undefined instances if (instance === undefined) { return null; } var result = new ValidatorResult(instance, schema, options, ctx); var types = Array.isArray(schema.type) ? schema.type : [schema.type]; if (!types.some(this.testType.bind(this, instance, schema, options, ctx))) { var list = types.map(function (v) { return v.id && ('<' + v.id + '>') || (v+''); }); result.addError({ name: 'type', argument: list, message: "is not of a type(s) " + list, }); } return result; }; function testSchemaNoThrow(instance, options, ctx, callback, schema){ var throwError = options.throwError; options.throwError = false; var res = this.validateSchema(instance, schema, options, ctx); options.throwError = throwError; if (!res.valid && callback instanceof Function) { callback(res); } return res.valid; } /** * Validates whether the instance matches some of the given schemas * @param instance * @param schema * @param options * @param ctx * @return {ValidatorResult|null} */ validators.anyOf = function validateAnyOf (instance, schema, options, ctx) { // Ignore undefined instances if (instance === undefined) { return null; } var result = new ValidatorResult(instance, schema, options, ctx); var inner = new ValidatorResult(instance, schema, options, ctx); if (!Array.isArray(schema.anyOf)){ throw new SchemaError("anyOf must be an array"); } if (!schema.anyOf.some( testSchemaNoThrow.bind( this, instance, options, ctx, function(res){inner.importErrors(res);} ))) { var list = schema.anyOf.map(function (v, i) { return (v.id && ('<' + v.id + '>')) || (v.title && JSON.stringify(v.title)) || (v['$ref'] && ('<' + v['$ref'] + '>')) || '[subschema '+i+']'; }); if (options.nestedErrors) { result.importErrors(inner); } result.addError({ name: 'anyOf', argument: list, message: "is not any of " + list.join(','), }); } return result; }; /** * Validates whether the instance matches every given schema * @param instance * @param schema * @param options * @param ctx * @return {String|null} */ validators.allOf = function validateAllOf (instance, schema, options, ctx) { // Ignore undefined instances if (instance === undefined) { return null; } if (!Array.isArray(schema.allOf)){ throw new SchemaError("allOf must be an array"); } var result = new ValidatorResult(instance, schema, options, ctx); var self = this; schema.allOf.forEach(function(v, i){ var valid = self.validateSchema(instance, v, options, ctx); if(!valid.valid){ var msg = (v.id && ('<' + v.id + '>')) || (v.title && JSON.stringify(v.title)) || (v['$ref'] && ('<' + v['$ref'] + '>')) || '[subschema '+i+']'; result.addError({ name: 'allOf', argument: { id: msg, length: valid.errors.length, valid: valid }, message: 'does not match allOf schema ' + msg + ' with ' + valid.errors.length + ' error[s]:', }); result.importErrors(valid); } }); return result; }; /** * Validates whether the instance matches exactly one of the given schemas * @param instance * @param schema * @param options * @param ctx * @return {String|null} */ validators.oneOf = function validateOneOf (instance, schema, options, ctx) { // Ignore undefined instances if (instance === undefined) { return null; } if (!Array.isArray(schema.oneOf)){ throw new SchemaError("oneOf must be an array"); } var result = new ValidatorResult(instance, schema, options, ctx); var inner = new ValidatorResult(instance, schema, options, ctx); var count = schema.oneOf.filter( testSchemaNoThrow.bind( this, instance, options, ctx, function(res) {inner.importErrors(res);} ) ).length; var list = schema.oneOf.map(function (v, i) { return (v.id && ('<' + v.id + '>')) || (v.title && JSON.stringify(v.title)) || (v['$ref'] && ('<' + v['$ref'] + '>')) || '[subschema '+i+']'; }); if (count!==1) { if (options.nestedErrors) { result.importErrors(inner); } result.addError({ name: 'oneOf', argument: list, message: "is not exactly one from " + list.join(','), }); } return result; }; function getEnumerableProperty(object, key){ // Determine if `key` shows up in `for(var key in object)` // First test Object.hasOwnProperty.call as an optimization: that guarantees it does if(Object.hasOwnProperty.call(object, key)) return object[key]; // Test `key in object` as an optimization; false means it won't if(!(key in object)) return; while(object = Object.getPrototypeOf(object)){ if(Object.propertyIsEnumerable.call(object, key)) return object[key]; } } /** * Validates properties * @param instance * @param schema * @param options * @param ctx * @return {String|null|ValidatorResult} */ validators.properties = function validateProperties (instance, schema, options, ctx) { if(!this.types.object(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); var properties = schema.properties || {}; for (var property in properties) { if (typeof options.preValidateProperty == 'function') { options.preValidateProperty(instance, property, properties[property], options, ctx); } var prop = getEnumerableProperty(instance, property); var res = this.validateSchema(prop, properties[property], options, ctx.makeChild(properties[property], property)); if(res.instance !== result.instance[property]) result.instance[property] = res.instance; result.importErrors(res); } return result; }; /** * Test a specific property within in instance against the additionalProperties schema attribute * This ignores properties with definitions in the properties schema attribute, but no other attributes. * If too many more types of property-existence tests pop up they may need their own class of tests (like `type` has) * @private * @return {boolean} */ function testAdditionalProperty (instance, schema, options, ctx, property, result) { if(!this.types.object(instance)) return; if (schema.properties && schema.properties[property] !== undefined) { return; } if (schema.additionalProperties === false) { result.addError({ name: 'additionalProperties', argument: property, message: "additionalProperty " + JSON.stringify(property) + " exists in instance when not allowed", }); } else { var additionalProperties = schema.additionalProperties || {}; if (typeof options.preValidateProperty == 'function') { options.preValidateProperty(instance, property, additionalProperties, options, ctx); } var res = this.validateSchema(instance[property], additionalProperties, options, ctx.makeChild(additionalProperties, property)); if(res.instance !== result.instance[property]) result.instance[property] = res.instance; result.importErrors(res); } } /** * Validates patternProperties * @param instance * @param schema * @param options * @param ctx * @return {String|null|ValidatorResult} */ validators.patternProperties = function validatePatternProperties (instance, schema, options, ctx) { if(!this.types.object(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); var patternProperties = schema.patternProperties || {}; for (var property in instance) { var test = true; for (var pattern in patternProperties) { var expr = new RegExp(pattern, 'u'); if (!expr.test(property)) { continue; } test = false; if (typeof options.preValidateProperty == 'function') { options.preValidateProperty(instance, property, patternProperties[pattern], options, ctx); } var res = this.validateSchema(instance[property], patternProperties[pattern], options, ctx.makeChild(patternProperties[pattern], property)); if(res.instance !== result.instance[property]) result.instance[property] = res.instance; result.importErrors(res); } if (test) { testAdditionalProperty.call(this, instance, schema, options, ctx, property, result); } } return result; }; /** * Validates additionalProperties * @param instance * @param schema * @param options * @param ctx * @return {String|null|ValidatorResult} */ validators.additionalProperties = function validateAdditionalProperties (instance, schema, options, ctx) { if(!this.types.object(instance)) return; // if patternProperties is defined then we'll test when that one is called instead if (schema.patternProperties) { return null; } var result = new ValidatorResult(instance, schema, options, ctx); for (var property in instance) { testAdditionalProperty.call(this, instance, schema, options, ctx, property, result); } return result; }; /** * Validates whether the instance value is at least of a certain length, when the instance value is a string. * @param instance * @param schema * @return {String|null} */ validators.minProperties = function validateMinProperties (instance, schema, options, ctx) { if (!this.types.object(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); var keys = Object.keys(instance); if (!(keys.length >= schema.minProperties)) { result.addError({ name: 'minProperties', argument: schema.minProperties, message: "does not meet minimum property length of " + schema.minProperties, }); } return result; }; /** * Validates whether the instance value is at most of a certain length, when the instance value is a string. * @param instance * @param schema * @return {String|null} */ validators.maxProperties = function validateMaxProperties (instance, schema, options, ctx) { if (!this.types.object(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); var keys = Object.keys(instance); if (!(keys.length <= schema.maxProperties)) { result.addError({ name: 'maxProperties', argument: schema.maxProperties, message: "does not meet maximum property length of " + schema.maxProperties, }); } return result; }; /** * Validates items when instance is an array * @param instance * @param schema * @param options * @param ctx * @return {String|null|ValidatorResult} */ validators.items = function validateItems (instance, schema, options, ctx) { var self = this; if (!this.types.array(instance)) return; if (!schema.items) return; var result = new ValidatorResult(instance, schema, options, ctx); instance.every(function (value, i) { var items = Array.isArray(schema.items) ? (schema.items[i] || schema.additionalItems) : schema.items; if (items === undefined) { return true; } if (items === false) { result.addError({ name: 'items', message: "additionalItems not permitted", }); return false; } var res = self.validateSchema(value, items, options, ctx.makeChild(items, i)); if(res.instance !== result.instance[i]) result.instance[i] = res.instance; result.importErrors(res); return true; }); return result; }; /** * Validates minimum and exclusiveMinimum when the type of the instance value is a number. * @param instance * @param schema * @return {String|null} */ validators.minimum = function validateMinimum (instance, schema, options, ctx) { if (!this.types.number(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); var valid = true; if (schema.exclusiveMinimum && schema.exclusiveMinimum === true) { valid = instance > schema.minimum; } else { valid = instance >= schema.minimum; } if (!valid) { result.addError({ name: 'minimum', argument: schema.minimum, message: "must have a minimum value of " + schema.minimum, }); } return result; }; /** * Validates maximum and exclusiveMaximum when the type of the instance value is a number. * @param instance * @param schema * @return {String|null} */ validators.maximum = function validateMaximum (instance, schema, options, ctx) { if (!this.types.number(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); var valid; if (schema.exclusiveMaximum && schema.exclusiveMaximum === true) { valid = instance < schema.maximum; } else { valid = instance <= schema.maximum; } if (!valid) { result.addError({ name: 'maximum', argument: schema.maximum, message: "must have a maximum value of " + schema.maximum, }); } return result; }; /** * Perform validation for multipleOf and divisibleBy, which are essentially the same. * @param instance * @param schema * @param validationType * @param errorMessage * @returns {String|null} */ var validateMultipleOfOrDivisbleBy = function validateMultipleOfOrDivisbleBy (instance, schema, options, ctx, validationType, errorMessage) { if (!this.types.number(instance)) return; var validationArgument = schema[validationType]; if (validationArgument == 0) { throw new SchemaError(validationType + " cannot be zero"); } var result = new ValidatorResult(instance, schema, options, ctx); var instanceDecimals = helpers.getDecimalPlaces(instance); var divisorDecimals = helpers.getDecimalPlaces(validationArgument); var maxDecimals = Math.max(instanceDecimals , divisorDecimals); var multiplier = Math.pow(10, maxDecimals); if (Math.round(instance * multiplier) % Math.round(validationArgument * multiplier) !== 0) { result.addError({ name: validationType, argument: validationArgument, message: errorMessage + JSON.stringify(validationArgument), }); } return result; }; /** * Validates divisibleBy when the type of the instance value is a number. * @param instance * @param schema * @return {String|null} */ validators.multipleOf = function validateMultipleOf (instance, schema, options, ctx) { return validateMultipleOfOrDivisbleBy.call(this, instance, schema, options, ctx, "multipleOf", "is not a multiple of (divisible by) "); }; /** * Validates multipleOf when the type of the instance value is a number. * @param instance * @param schema * @return {String|null} */ validators.divisibleBy = function validateDivisibleBy (instance, schema, options, ctx) { return validateMultipleOfOrDivisbleBy.call(this, instance, schema, options, ctx, "divisibleBy", "is not divisible by (multiple of) "); }; /** * Validates whether the instance value is present. * @param instance * @param schema * @return {String|null} */ validators.required = function validateRequired (instance, schema, options, ctx) { var result = new ValidatorResult(instance, schema, options, ctx); if (instance === undefined && schema.required === true) { // A boolean form is implemented for reverse-compatibility with schemas written against older drafts result.addError({ name: 'required', message: "is required", }); } else if (this.types.object(instance) && Array.isArray(schema.required)) { schema.required.forEach(function(n){ if(getEnumerableProperty(instance, n)===undefined){ result.addError({ name: 'required', argument: n, message: "requires property " + JSON.stringify(n), }); } }); } return result; }; /** * Validates whether the instance value matches the regular expression, when the instance value is a string. * @param instance * @param schema * @return {String|null} */ validators.pattern = function validatePattern (instance, schema, options, ctx) { if (!this.types.string(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); var regexp = new RegExp(schema.pattern, 'u'); if (!instance.match(regexp)) { result.addError({ name: 'pattern', argument: schema.pattern, message: "does not match pattern " + JSON.stringify(schema.pattern.toString()), }); } return result; }; /** * Validates whether the instance value is of a certain defined format or a custom * format. * The following formats are supported for string types: * - date-time * - date * - time * - ip-address * - ipv6 * - uri * - color * - host-name * - alpha * - alpha-numeric * - utc-millisec * @param instance * @param schema * @param [options] * @param [ctx] * @return {String|null} */ validators.format = function validateFormat (instance, schema, options, ctx) { if (instance===undefined) return; var result = new ValidatorResult(instance, schema, options, ctx); if (!result.disableFormat && !helpers.isFormat(instance, schema.format, this)) { result.addError({ name: 'format', argument: schema.format, message: "does not conform to the " + JSON.stringify(schema.format) + " format", }); } return result; }; /** * Validates whether the instance value is at least of a certain length, when the instance value is a string. * @param instance * @param schema * @return {String|null} */ validators.minLength = function validateMinLength (instance, schema, options, ctx) { if (!this.types.string(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); var hsp = instance.match(/[\uDC00-\uDFFF]/g); var length = instance.length - (hsp ? hsp.length : 0); if (!(length >= schema.minLength)) { result.addError({ name: 'minLength', argument: schema.minLength, message: "does not meet minimum length of " + schema.minLength, }); } return result; }; /** * Validates whether the instance value is at most of a certain length, when the instance value is a string. * @param instance * @param schema * @return {String|null} */ validators.maxLength = function validateMaxLength (instance, schema, options, ctx) { if (!this.types.string(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); // TODO if this was already computed in "minLength", use that value instead of re-computing var hsp = instance.match(/[\uDC00-\uDFFF]/g); var length = instance.length - (hsp ? hsp.length : 0); if (!(length <= schema.maxLength)) { result.addError({ name: 'maxLength', argument: schema.maxLength, message: "does not meet maximum length of " + schema.maxLength, }); } return result; }; /** * Validates whether instance contains at least a minimum number of items, when the instance is an Array. * @param instance * @param schema * @return {String|null} */ validators.minItems = function validateMinItems (instance, schema, options, ctx) { if (!this.types.array(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); if (!(instance.length >= schema.minItems)) { result.addError({ name: 'minItems', argument: schema.minItems, message: "does not meet minimum length of " + schema.minItems, }); } return result; }; /** * Validates whether instance contains no more than a maximum number of items, when the instance is an Array. * @param instance * @param schema * @return {String|null} */ validators.maxItems = function validateMaxItems (instance, schema, options, ctx) { if (!this.types.array(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); if (!(instance.length <= schema.maxItems)) { result.addError({ name: 'maxItems', argument: schema.maxItems, message: "does not meet maximum length of " + schema.maxItems, }); } return result; }; /** * Deep compares arrays for duplicates * @param v * @param i * @param a * @private * @return {boolean} */ function testArrays (v, i, a) { var j, len = a.length; for (j = i + 1, len; j < len; j++) { if (helpers.deepCompareStrict(v, a[j])) { return false; } } return true; } /** * Validates whether there are no duplicates, when the instance is an Array. * @param instance * @return {String|null} */ validators.uniqueItems = function validateUniqueItems (instance, schema, options, ctx) { if (schema.uniqueItems!==true) return; if (!this.types.array(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); if (!instance.every(testArrays)) { result.addError({ name: 'uniqueItems', message: "contains duplicate item", }); } return result; }; /** * Validate for the presence of dependency properties, if the instance is an object. * @param instance * @param schema * @param options * @param ctx * @return {null|ValidatorResult} */ validators.dependencies = function validateDependencies (instance, schema, options, ctx) { if (!this.types.object(instance)) return; var result = new ValidatorResult(instance, schema, options, ctx); for (var property in schema.dependencies) { if (instance[property] === undefined) { continue; } var dep = schema.dependencies[property]; var childContext = ctx.makeChild(dep, property); if (typeof dep == 'string') { dep = [dep]; } if (Array.isArray(dep)) { dep.forEach(function (prop) { if (instance[prop] === undefined) { result.addError({ // FIXME there's two different "dependencies" errors here with slightly different outputs // Can we make these the same? Or should we create different error types? name: 'dependencies', argument: childContext.propertyPath, message: "property " + prop + " not found, required by " + childContext.propertyPath, }); } }); } else { var res = this.validateSchema(instance, dep, options, childContext); if(result.instance !== res.instance) result.instance = res.instance; if (res && res.errors.length) { result.addError({ name: 'dependencies', argument: childContext.propertyPath, message: "does not meet dependency required by " + childContext.propertyPath, }); result.importErrors(res); } } } return result; }; /** * Validates whether the instance value is one of the enumerated values. * * @param instance * @param schema * @return {ValidatorResult|null} */ validators['enum'] = function validateEnum (instance, schema, options, ctx) { if (instance === undefined) { return null; } if (!Array.isArray(schema['enum'])) { throw new SchemaError("enum expects an array", schema); } var result = new ValidatorResult(instance, schema, options, ctx); if (!schema['enum'].some(helpers.deepCompareStrict.bind(null, instance))) { result.addError({ name: 'enum', argument: schema['enum'], message: "is not one of enum values: " + schema['enum'].map(String).join(','), }); } return result; }; /** * Validates whether the instance exactly matches a given value * * @param instance * @param schema * @return {ValidatorResult|null} */ validators['const'] = function validateEnum (instance, schema, options, ctx) { if (instance === undefined) { return null; } var result = new ValidatorResult(instance, schema, options, ctx); if (!helpers.deepCompareStrict(schema['const'], instance)) { result.addError({ name: 'const', argument: schema['const'], message: "does not exactly match expected constant: " + schema['const'], }); } return result; }; /** * Validates whether the instance if of a prohibited type. * @param instance * @param schema * @param options * @param ctx * @return {null|ValidatorResult} */ validators.not = validators.disallow = function validateNot (instance, schema, options, ctx) { var self = this; if(instance===undefined) return null; var result = new ValidatorResult(instance, schema, options, ctx); var notTypes = schema.not || schema.disallow; if(!notTypes) return null; if(!Array.isArray(notTypes)) notTypes=[notTypes]; notTypes.forEach(function (type) { if (self.testType(instance, schema, options, ctx, type)) { var schemaId = type && type.id && ('<' + type.id + '>') || type; result.addError({ name: 'not', argument: schemaId, message: "is of prohibited type " + schemaId, }); } }); return result; }; module.exports = attribute; /***/ }), /* 4018 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Input = _interopRequireDefault(__webpack_require__(4019)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = { Input: _Input["default"] }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4019 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _RHFInput = _interopRequireDefault(__webpack_require__(4020)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _RHFInput["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4020 */ /***/ (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 _reactHookForm = __webpack_require__(4021); var _get2 = _interopRequireDefault(__webpack_require__(208)); var _Input = _interopRequireDefault(__webpack_require__(1598)); 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 RHFInput(props) { var _get; var _props$rules = props.rules, rules = _props$rules === void 0 ? {} : _props$rules, rest = _objectWithoutProperties(props, ["rules"]); var _useFormContext = (0, _reactHookForm.useFormContext)(), errors = _useFormContext.errors, register = _useFormContext.register; var error = (_get = (0, _get2["default"])(errors, rest.name)) === null || _get === void 0 ? void 0 : _get.message; return /*#__PURE__*/_react["default"].createElement(_Input["default"], _extends({}, rest, { ref: register(rules), error: error })); } if (process.env.NODE_ENV !== 'production') { RHFInput.propTypes = { rules: _propTypes["default"].object }; } var _default = RHFInput; exports["default"] = _default; //# sourceMappingURL=RHFInput.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4021 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global, process) { Object.defineProperty(exports, '__esModule', { value: true }); var React = __webpack_require__(0); var fails = function (exec) { try { return !!exec(); } catch (error) { return true; } }; var toString = {}.toString; var classofRaw = function (it) { return toString.call(it).slice(8, -1); }; var split = ''.split; // fallback for non-array-like ES3 and non-enumerable old V8 strings var indexedObject = 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 classofRaw(it) == 'String' ? split.call(it, '') : Object(it); } : Object; // `RequireObjectCoercible` abstract operation // https://tc39.github.io/ecma262/#sec-requireobjectcoercible var requireObjectCoercible = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; // toObject with fallback for non-array-like ES3 strings var toIndexedObject = function (it) { return indexedObject(requireObjectCoercible(it)); }; var iterators = {}; var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } var check = function (it) { return it && it.Math == Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global_1 = // eslint-disable-next-line no-undef check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func Function('return this')(); // Thank's IE8 for his funny defineProperty var descriptors = !fails(function () { return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; }); var isObject = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; var document$1 = global_1.document; // typeof document.createElement is 'object' in old IE var EXISTS = isObject(document$1) && isObject(document$1.createElement); var documentCreateElement = function (it) { return EXISTS ? document$1.createElement(it) : {}; }; // Thank's IE8 for his funny defineProperty var ie8DomDefine = !descriptors && !fails(function () { return Object.defineProperty(documentCreateElement('div'), 'a', { get: function () { return 7; } }).a != 7; }); var anObject = function (it) { if (!isObject(it)) { throw TypeError(String(it) + ' is not an object'); } return it; }; // `ToPrimitive` abstract operation // https://tc39.github.io/ecma262/#sec-toprimitive // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string var toPrimitive = function (input, PREFERRED_STRING) { if (!isObject(input)) return input; var fn, val; if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; throw TypeError("Can't convert object to primitive value"); }; var nativeDefineProperty = Object.defineProperty; // `Object.defineProperty` method // https://tc39.github.io/ecma262/#sec-object.defineproperty var f = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (ie8DomDefine) 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; }; var objectDefineProperty = { f: f }; var createPropertyDescriptor = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; var createNonEnumerableProperty = descriptors ? function (object, key, value) { return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; var setGlobal = function (key, value) { try { createNonEnumerableProperty(global_1, key, value); } catch (error) { global_1[key] = value; } return value; }; var SHARED = '__core-js_shared__'; var store = global_1[SHARED] || setGlobal(SHARED, {}); var sharedStore = store; var functionToString = Function.toString; // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper if (typeof sharedStore.inspectSource != 'function') { sharedStore.inspectSource = function (it) { return functionToString.call(it); }; } var inspectSource = sharedStore.inspectSource; var WeakMap = global_1.WeakMap; var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); var hasOwnProperty = {}.hasOwnProperty; var has = function (it, key) { return hasOwnProperty.call(it, key); }; var isPure = true; var shared = createCommonjsModule(function (module) { (module.exports = function (key, value) { return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); })('versions', []).push({ version: '3.6.4', mode: 'pure' , copyright: '© 2020 Denis Pushkarev (zloirock.ru)' }); }); var id = 0; var postfix = Math.random(); var uid = function (key) { return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); }; var keys = shared('keys'); var sharedKey = function (key) { return keys[key] || (keys[key] = uid(key)); }; var hiddenKeys = {}; var WeakMap$1 = global_1.WeakMap; var set, get, has$1; var enforce = function (it) { return has$1(it) ? get(it) : set(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject(it) || (state = get(it)).type !== TYPE) { throw TypeError('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (nativeWeakMap) { var store$1 = new WeakMap$1(); var wmget = store$1.get; var wmhas = store$1.has; var wmset = store$1.set; set = function (it, metadata) { wmset.call(store$1, it, metadata); return metadata; }; get = function (it) { return wmget.call(store$1, it) || {}; }; has$1 = function (it) { return wmhas.call(store$1, it); }; } else { var STATE = sharedKey('state'); hiddenKeys[STATE] = true; set = function (it, metadata) { createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function (it) { return has(it, STATE) ? it[STATE] : {}; }; has$1 = function (it) { return has(it, STATE); }; } var internalState = { set: set, get: get, has: has$1, enforce: enforce, getterFor: getterFor }; var nativePropertyIsEnumerable = {}.propertyIsEnumerable; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable var f$1 = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor(this, V); return !!descriptor && descriptor.enumerable; } : nativePropertyIsEnumerable; var objectPropertyIsEnumerable = { f: f$1 }; var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor var f$2 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPrimitive(P, true); if (ie8DomDefine) try { return nativeGetOwnPropertyDescriptor(O, P); } catch (error) { /* empty */ } if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); }; var objectGetOwnPropertyDescriptor = { f: f$2 }; var replacement = /#|\.prototype\./; var isForced = function (feature, detection) { var value = data[normalize(feature)]; return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == 'function' ? fails(detection) : !!detection; }; var normalize = isForced.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced.data = {}; var NATIVE = isForced.NATIVE = 'N'; var POLYFILL = isForced.POLYFILL = 'P'; var isForced_1 = isForced; var path = {}; var aFunction = function (it) { if (typeof it != 'function') { throw TypeError(String(it) + ' is not a function'); } return it; }; // optional / simple context binding var functionBindContext = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 0: return function () { return fn.call(that); }; 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); }; }; var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; var wrapConstructor = function (NativeConstructor) { var Wrapper = function (a, b, c) { if (this instanceof NativeConstructor) { switch (arguments.length) { case 0: return new NativeConstructor(); case 1: return new NativeConstructor(a); case 2: return new NativeConstructor(a, b); } return new NativeConstructor(a, b, c); } return NativeConstructor.apply(this, arguments); }; Wrapper.prototype = NativeConstructor.prototype; return Wrapper; }; /* 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 */ var _export = function (options, source) { var TARGET = options.target; var GLOBAL = options.global; var STATIC = options.stat; var PROTO = options.proto; var nativeSource = GLOBAL ? global_1 : STATIC ? global_1[TARGET] : (global_1[TARGET] || {}).prototype; var target = GLOBAL ? path : path[TARGET] || (path[TARGET] = {}); var targetPrototype = target.prototype; var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE; var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor; for (key in source) { FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contains in native USE_NATIVE = !FORCED && nativeSource && has(nativeSource, key); targetProperty = target[key]; if (USE_NATIVE) if (options.noTargetGet) { descriptor = getOwnPropertyDescriptor$1(nativeSource, key); nativeProperty = descriptor && descriptor.value; } else nativeProperty = nativeSource[key]; // export native or implementation sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key]; if (USE_NATIVE && typeof targetProperty === typeof sourceProperty) continue; // bind timers to global for call from export context if (options.bind && USE_NATIVE) resultProperty = functionBindContext(sourceProperty, global_1); // wrap global constructors for prevent changs in this version else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty); // make static versions for prototype methods else if (PROTO && typeof sourceProperty == 'function') resultProperty = functionBindContext(Function.call, sourceProperty); // default case else resultProperty = sourceProperty; // add a flag to not completely full polyfills if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty(resultProperty, 'sham', true); } target[key] = resultProperty; if (PROTO) { VIRTUAL_PROTOTYPE = TARGET + 'Prototype'; if (!has(path, VIRTUAL_PROTOTYPE)) { createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {}); } // export virtual prototype methods path[VIRTUAL_PROTOTYPE][key] = sourceProperty; // export real prototype methods if (options.real && targetPrototype && !targetPrototype[key]) { createNonEnumerableProperty(targetPrototype, key, sourceProperty); } } } }; // `ToObject` abstract operation // https://tc39.github.io/ecma262/#sec-toobject var toObject = function (argument) { return Object(requireObjectCoercible(argument)); }; var correctPrototypeGetter = !fails(function () { function F() { /* empty */ } F.prototype.constructor = null; return Object.getPrototypeOf(new F()) !== F.prototype; }); var IE_PROTO = sharedKey('IE_PROTO'); var ObjectPrototype = Object.prototype; // `Object.getPrototypeOf` method // https://tc39.github.io/ecma262/#sec-object.getprototypeof var objectGetPrototypeOf = correctPrototypeGetter ? 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 ? ObjectPrototype : null; }; var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { // Chrome 38 Symbol has incorrect toString conversion // eslint-disable-next-line no-undef return !String(Symbol()); }); var useSymbolAsUid = nativeSymbol // eslint-disable-next-line no-undef && !Symbol.sham // eslint-disable-next-line no-undef && typeof Symbol.iterator == 'symbol'; var WellKnownSymbolsStore = shared('wks'); var Symbol$1 = global_1.Symbol; var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; var wellKnownSymbol = function (name) { if (!has(WellKnownSymbolsStore, name)) { if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name]; else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); } return WellKnownSymbolsStore[name]; }; var ITERATOR = wellKnownSymbol('iterator'); var BUGGY_SAFARI_ITERATORS = false; // `%IteratorPrototype%` object // https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; if ([].keys) { arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next` if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; else { PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)); if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; } } if (IteratorPrototype == undefined) IteratorPrototype = {}; var iteratorsCore = { IteratorPrototype: IteratorPrototype, BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS }; var ceil = Math.ceil; var floor = Math.floor; // `ToInteger` abstract operation // https://tc39.github.io/ecma262/#sec-tointeger var toInteger = function (argument) { return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); }; var min = Math.min; // `ToLength` abstract operation // https://tc39.github.io/ecma262/#sec-tolength var toLength = function (argument) { return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; var max = Math.max; var min$1 = Math.min; // Helper for a popular repeating case of the spec: // Let integer be ? ToInteger(index). // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). var toAbsoluteIndex = function (index, length) { var integer = toInteger(index); return integer < 0 ? max(integer + length, 0) : min$1(integer, length); }; // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($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) && O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; var arrayIncludes = { // `Array.prototype.includes` method // https://tc39.github.io/ecma262/#sec-array.prototype.includes includes: createMethod(true), // `Array.prototype.indexOf` method // https://tc39.github.io/ecma262/#sec-array.prototype.indexof indexOf: createMethod(false) }; var indexOf = arrayIncludes.indexOf; var objectKeysInternal = function (object, names) { var O = toIndexedObject(object); var i = 0; var result = []; var key; for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~indexOf(result, key) || result.push(key); } return result; }; // IE8- don't enum bug keys var enumBugKeys = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; // `Object.keys` method // https://tc39.github.io/ecma262/#sec-object.keys var objectKeys = Object.keys || function keys(O) { return objectKeysInternal(O, enumBugKeys); }; // `Object.defineProperties` method // https://tc39.github.io/ecma262/#sec-object.defineproperties var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = objectKeys(Properties); var length = keys.length; var index = 0; var key; while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]); return O; }; var aFunction$1 = function (variable) { return typeof variable == 'function' ? variable : undefined; }; var getBuiltIn = function (namespace, method) { return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace]) : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; }; var html = getBuiltIn('document', 'documentElement'); var GT = '>'; var LT = '<'; var PROTOTYPE = 'prototype'; var SCRIPT = 'script'; var IE_PROTO$1 = sharedKey('IE_PROTO'); var EmptyConstructor = function () { /* empty */ }; var scriptTag = function (content) { return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; }; // Create object with fake `null` prototype: use ActiveX Object with cleared prototype var NullProtoObjectViaActiveX = function (activeXDocument) { activeXDocument.write(scriptTag('')); activeXDocument.close(); var temp = activeXDocument.parentWindow.Object; activeXDocument = null; // avoid memory leak return temp; }; // Create object with fake `null` prototype: use iframe Object with cleared prototype var NullProtoObjectViaIFrame = function () { // Thrash, waste and sodomy: IE GC bug var iframe = documentCreateElement('iframe'); var JS = 'java' + SCRIPT + ':'; var iframeDocument; iframe.style.display = 'none'; html.appendChild(iframe); // https://github.com/zloirock/core-js/issues/475 iframe.src = String(JS); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(scriptTag('document.F=Object')); iframeDocument.close(); return iframeDocument.F; }; // Check for document.domain and active x support // No need to use active x approach when document.domain is not set // see https://github.com/es-shims/es5-shim/issues/150 // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 // avoid IE GC bug var activeXDocument; var NullProtoObject = function () { try { /* global ActiveXObject */ activeXDocument = document.domain && new ActiveXObject('htmlfile'); } catch (error) { /* ignore */ } NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); var length = enumBugKeys.length; while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; return NullProtoObject(); }; hiddenKeys[IE_PROTO$1] = true; // `Object.create` method // https://tc39.github.io/ecma262/#sec-object.create var objectCreate = Object.create || function create(O, Properties) { var result; if (O !== null) { EmptyConstructor[PROTOTYPE] = anObject(O); result = new EmptyConstructor(); EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO$1] = O; } else result = NullProtoObject(); return Properties === undefined ? result : objectDefineProperties(result, Properties); }; var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG] = 'z'; var toStringTagSupport = String(test) === '[object z]'; var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); // ES3 wrong here var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (error) { /* empty */ } }; // getting tag from ES6+ `Object.prototype.toString` var classof = toStringTagSupport ? classofRaw : function (it) { var O, tag, result; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; }; // `Object.prototype.toString` method implementation // https://tc39.github.io/ecma262/#sec-object.prototype.tostring var objectToString = toStringTagSupport ? {}.toString : function toString() { return '[object ' + classof(this) + ']'; }; var defineProperty = objectDefineProperty.f; var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag'); var setToStringTag = function (it, TAG, STATIC, SET_METHOD) { if (it) { var target = STATIC ? it : it.prototype; if (!has(target, TO_STRING_TAG$2)) { defineProperty(target, TO_STRING_TAG$2, { configurable: true, value: TAG }); } if (SET_METHOD && !toStringTagSupport) { createNonEnumerableProperty(target, 'toString', objectToString); } } }; var IteratorPrototype$1 = iteratorsCore.IteratorPrototype; var returnThis = function () { return this; }; var createIteratorConstructor = function (IteratorConstructor, NAME, next) { var TO_STRING_TAG = NAME + ' Iterator'; IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) }); setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); iterators[TO_STRING_TAG] = returnThis; return IteratorConstructor; }; var aPossiblePrototype = function (it) { if (!isObject(it) && it !== null) { throw TypeError("Can't set " + String(it) + ' as a prototype'); } return it; }; // `Object.setPrototypeOf` method // https://tc39.github.io/ecma262/#sec-object.setprototypeof // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () { var CORRECT_SETTER = false; var test = {}; var setter; try { setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; setter.call(test, []); CORRECT_SETTER = test instanceof Array; } catch (error) { /* empty */ } return function setPrototypeOf(O, proto) { anObject(O); aPossiblePrototype(proto); if (CORRECT_SETTER) setter.call(O, proto); else O.__proto__ = proto; return O; }; }() : undefined); var redefine = function (target, key, value, options) { if (options && options.enumerable) target[key] = value; else createNonEnumerableProperty(target, key, value); }; var IteratorPrototype$2 = iteratorsCore.IteratorPrototype; var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS; var ITERATOR$1 = wellKnownSymbol('iterator'); var KEYS = 'keys'; var VALUES = 'values'; var ENTRIES = 'entries'; var returnThis$1 = function () { return this; }; var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { createIteratorConstructor(IteratorConstructor, NAME, next); var getIterationMethod = function (KIND) { if (KIND === DEFAULT && defaultIterator) return defaultIterator; if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND]; switch (KIND) { case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; } return function () { return new IteratorConstructor(this); }; }; var TO_STRING_TAG = NAME + ' Iterator'; var INCORRECT_VALUES_NAME = false; var IterablePrototype = Iterable.prototype; var nativeIterator = IterablePrototype[ITERATOR$1] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT]; var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT); var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; var CurrentIteratorPrototype, methods, KEY; // fix native if (anyNativeIterator) { CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable())); if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); iterators[TO_STRING_TAG] = returnThis$1; } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { INCORRECT_VALUES_NAME = true; defaultIterator = function values() { return nativeIterator.call(this); }; } // define iterator if (( FORCED) && IterablePrototype[ITERATOR$1] !== defaultIterator) { createNonEnumerableProperty(IterablePrototype, ITERATOR$1, defaultIterator); } iterators[NAME] = defaultIterator; // export additional methods if (DEFAULT) { methods = { values: getIterationMethod(VALUES), keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), entries: getIterationMethod(ENTRIES) }; if (FORCED) for (KEY in methods) { if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { redefine(IterablePrototype, KEY, methods[KEY]); } } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods); } return methods; }; var ARRAY_ITERATOR = 'Array Iterator'; var setInternalState = internalState.set; var getInternalState = internalState.getterFor(ARRAY_ITERATOR); // `Array.prototype.entries` method // https://tc39.github.io/ecma262/#sec-array.prototype.entries // `Array.prototype.keys` method // https://tc39.github.io/ecma262/#sec-array.prototype.keys // `Array.prototype.values` method // https://tc39.github.io/ecma262/#sec-array.prototype.values // `Array.prototype[@@iterator]` method // https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator // `CreateArrayIterator` internal method // https://tc39.github.io/ecma262/#sec-createarrayiterator var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) { setInternalState(this, { type: ARRAY_ITERATOR, target: toIndexedObject(iterated), // target index: 0, // next index kind: kind // kind }); // `%ArrayIteratorPrototype%.next` method // https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next }, function () { var state = getInternalState(this); var target = state.target; var kind = state.kind; var index = state.index++; if (!target || index >= target.length) { state.target = undefined; return { value: undefined, done: true }; } if (kind == 'keys') return { value: index, done: false }; if (kind == 'values') return { value: target[index], done: false }; return { value: [index, target[index]], done: false }; }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% // https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject // https://tc39.github.io/ecma262/#sec-createmappedargumentsobject iterators.Arguments = iterators.Array; // iterable DOM collections // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods var domIterables = { CSSRuleList: 0, CSSStyleDeclaration: 0, CSSValueList: 0, ClientRectList: 0, DOMRectList: 0, DOMStringList: 0, DOMTokenList: 1, DataTransferItemList: 0, FileList: 0, HTMLAllCollection: 0, HTMLCollection: 0, HTMLFormElement: 0, HTMLSelectElement: 0, MediaList: 0, MimeTypeArray: 0, NamedNodeMap: 0, NodeList: 1, PaintRequestList: 0, Plugin: 0, PluginArray: 0, SVGLengthList: 0, SVGNumberList: 0, SVGPathSegList: 0, SVGPointList: 0, SVGStringList: 0, SVGTransformList: 0, SourceBufferList: 0, StyleSheetList: 0, TextTrackCueList: 0, TextTrackList: 0, TouchList: 0 }; var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag'); for (var COLLECTION_NAME in domIterables) { var Collection = global_1[COLLECTION_NAME]; var CollectionPrototype = Collection && Collection.prototype; if (CollectionPrototype && classof(CollectionPrototype) !== TO_STRING_TAG$3) { createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$3, COLLECTION_NAME); } iterators[COLLECTION_NAME] = iterators.Array; } var entryVirtual = function (CONSTRUCTOR) { return path[CONSTRUCTOR + 'Prototype']; }; var values = entryVirtual('Array').values; var values$1 = values; var ArrayPrototype = Array.prototype; var DOMIterables = { DOMTokenList: true, NodeList: true }; var values_1 = function (it) { var own = it.values; return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.values) // eslint-disable-next-line no-prototype-builtins || DOMIterables.hasOwnProperty(classof(it)) ? values$1 : own; }; var values$2 = values_1; // `IsArray` abstract operation // https://tc39.github.io/ecma262/#sec-isarray var isArray = Array.isArray || function isArray(arg) { return classofRaw(arg) == 'Array'; }; var SPECIES = wellKnownSymbol('species'); // `ArraySpeciesCreate` abstract operation // https://tc39.github.io/ecma262/#sec-arrayspeciescreate var arraySpeciesCreate = function (originalArray, length) { var C; if (isArray(originalArray)) { C = originalArray.constructor; // cross-realm fallback if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; else if (isObject(C)) { C = C[SPECIES]; if (C === null) C = undefined; } } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); }; var push = [].push; // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation var createMethod$1 = function (TYPE) { 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; return function ($this, callbackfn, that, specificCreate) { var O = toObject($this); var self = indexedObject(O); var boundFunction = functionBindContext(callbackfn, that, 3); var length = toLength(self.length); var index = 0; var create = specificCreate || arraySpeciesCreate; var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; var value, result; for (;length > index; index++) if (NO_HOLES || index in self) { value = self[index]; result = boundFunction(value, index, O); if (TYPE) { if (IS_MAP) target[index] = result; // map else if (result) switch (TYPE) { case 3: return true; // some case 5: return value; // find case 6: return index; // findIndex case 2: push.call(target, value); // filter } else if (IS_EVERY) return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; }; var arrayIteration = { // `Array.prototype.forEach` method // https://tc39.github.io/ecma262/#sec-array.prototype.foreach forEach: createMethod$1(0), // `Array.prototype.map` method // https://tc39.github.io/ecma262/#sec-array.prototype.map map: createMethod$1(1), // `Array.prototype.filter` method // https://tc39.github.io/ecma262/#sec-array.prototype.filter filter: createMethod$1(2), // `Array.prototype.some` method // https://tc39.github.io/ecma262/#sec-array.prototype.some some: createMethod$1(3), // `Array.prototype.every` method // https://tc39.github.io/ecma262/#sec-array.prototype.every every: createMethod$1(4), // `Array.prototype.find` method // https://tc39.github.io/ecma262/#sec-array.prototype.find find: createMethod$1(5), // `Array.prototype.findIndex` method // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex findIndex: createMethod$1(6) }; var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; var process$1 = global_1.process; var versions = process$1 && process$1.versions; var v8 = versions && versions.v8; var match, version; if (v8) { match = v8.split('.'); version = match[0] + match[1]; } else if (engineUserAgent) { match = engineUserAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = engineUserAgent.match(/Chrome\/(\d+)/); if (match) version = match[1]; } } var engineV8Version = version && +version; var SPECIES$1 = wellKnownSymbol('species'); var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/677 return engineV8Version >= 51 || !fails(function () { var array = []; var constructor = array.constructor = {}; constructor[SPECIES$1] = function () { return { foo: 1 }; }; return array[METHOD_NAME](Boolean).foo !== 1; }); }; var defineProperty$1 = Object.defineProperty; var cache = {}; var thrower = function (it) { throw it; }; var arrayMethodUsesToLength = 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$1(O, 1, { enumerable: true, get: thrower }); else O[1] = 1; method.call(O, argument0, argument1); }); }; var $filter = arrayIteration.filter; var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); // Edge 14- issue var USES_TO_LENGTH = arrayMethodUsesToLength('filter'); // `Array.prototype.filter` method // https://tc39.github.io/ecma262/#sec-array.prototype.filter // with adding support of @@species _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, { filter: function filter(callbackfn /* , thisArg */) { return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); var filter = entryVirtual('Array').filter; var ArrayPrototype$1 = Array.prototype; var filter_1 = function (it) { var own = it.filter; return it === ArrayPrototype$1 || (it instanceof Array && own === ArrayPrototype$1.filter) ? filter : own; }; var filter$1 = filter_1; var filter$2 = filter$1; var $find = arrayIteration.find; var FIND = 'find'; var SKIPS_HOLES = true; var USES_TO_LENGTH$1 = arrayMethodUsesToLength(FIND); // Shouldn't skip holes if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); // `Array.prototype.find` method // https://tc39.github.io/ecma262/#sec-array.prototype.find _export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH$1 }, { find: function find(callbackfn /* , that = undefined */) { return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); var find = entryVirtual('Array').find; var ArrayPrototype$2 = Array.prototype; var find_1 = function (it) { var own = it.find; return it === ArrayPrototype$2 || (it instanceof Array && own === ArrayPrototype$2.find) ? find : own; }; var find$1 = find_1; var find$2 = find$1; // `Array.prototype.{ reduce, reduceRight }` methods implementation var createMethod$2 = function (IS_RIGHT) { return function (that, callbackfn, argumentsLength, memo) { aFunction(callbackfn); var O = toObject(that); var self = indexedObject(O); var length = toLength(O.length); var index = IS_RIGHT ? length - 1 : 0; var i = IS_RIGHT ? -1 : 1; if (argumentsLength < 2) while (true) { if (index in self) { memo = self[index]; index += i; break; } index += i; if (IS_RIGHT ? index < 0 : length <= index) { throw TypeError('Reduce of empty array with no initial value'); } } for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) { memo = callbackfn(memo, self[index], index, O); } return memo; }; }; var arrayReduce = { // `Array.prototype.reduce` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduce left: createMethod$2(false), // `Array.prototype.reduceRight` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright right: createMethod$2(true) }; var arrayMethodIsStrict = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !!method && fails(function () { // eslint-disable-next-line no-useless-call,no-throw-literal method.call(null, argument || function () { throw 1; }, 1); }); }; var $reduce = arrayReduce.left; var STRICT_METHOD = arrayMethodIsStrict('reduce'); var USES_TO_LENGTH$2 = arrayMethodUsesToLength('reduce', { 1: 0 }); // `Array.prototype.reduce` method // https://tc39.github.io/ecma262/#sec-array.prototype.reduce _export({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH$2 }, { reduce: function reduce(callbackfn /* , initialValue */) { return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined); } }); var reduce = entryVirtual('Array').reduce; var ArrayPrototype$3 = Array.prototype; var reduce_1 = function (it) { var own = it.reduce; return it === ArrayPrototype$3 || (it instanceof Array && own === ArrayPrototype$3.reduce) ? reduce : own; }; var reduce$1 = reduce_1; var reduce$2 = reduce$1; var propertyIsEnumerable = objectPropertyIsEnumerable.f; // `Object.{ entries, values }` methods implementation var createMethod$3 = function (TO_ENTRIES) { return function (it) { var O = toIndexedObject(it); var keys = objectKeys(O); var length = keys.length; var i = 0; var result = []; var key; while (length > i) { key = keys[i++]; if (!descriptors || propertyIsEnumerable.call(O, key)) { result.push(TO_ENTRIES ? [key, O[key]] : O[key]); } } return result; }; }; var objectToArray = { // `Object.entries` method // https://tc39.github.io/ecma262/#sec-object.entries entries: createMethod$3(true), // `Object.values` method // https://tc39.github.io/ecma262/#sec-object.values values: createMethod$3(false) }; var $values = objectToArray.values; // `Object.values` method // https://tc39.github.io/ecma262/#sec-object.values _export({ target: 'Object', stat: true }, { values: function values(O) { return $values(O); } }); var values$3 = path.Object.values; var values$4 = values$3; var values$5 = values$4; var $every = arrayIteration.every; var STRICT_METHOD$1 = arrayMethodIsStrict('every'); var USES_TO_LENGTH$3 = arrayMethodUsesToLength('every'); // `Array.prototype.every` method // https://tc39.github.io/ecma262/#sec-array.prototype.every _export({ target: 'Array', proto: true, forced: !STRICT_METHOD$1 || !USES_TO_LENGTH$3 }, { every: function every(callbackfn /* , thisArg */) { return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); var every = entryVirtual('Array').every; var ArrayPrototype$4 = Array.prototype; var every_1 = function (it) { var own = it.every; return it === ArrayPrototype$4 || (it instanceof Array && own === ArrayPrototype$4.every) ? every : own; }; var every$1 = every_1; var every$2 = every$1; var $map = arrayIteration.map; var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('map'); // FF49- issue var USES_TO_LENGTH$4 = arrayMethodUsesToLength('map'); // `Array.prototype.map` method // https://tc39.github.io/ecma262/#sec-array.prototype.map // with adding support of @@species _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$4 }, { map: function map(callbackfn /* , thisArg */) { return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); var map = entryVirtual('Array').map; var ArrayPrototype$5 = Array.prototype; var map_1 = function (it) { var own = it.map; return it === ArrayPrototype$5 || (it instanceof Array && own === ArrayPrototype$5.map) ? map : own; }; var map$1 = map_1; var map$2 = map$1; // `String.prototype.{ codePointAt, at }` methods implementation var createMethod$4 = function (CONVERT_TO_STRING) { return function ($this, pos) { var S = String(requireObjectCoercible($this)); var position = toInteger(pos); var size = S.length; var first, second; if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; first = S.charCodeAt(position); return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? S.charAt(position) : first : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; }; }; var stringMultibyte = { // `String.prototype.codePointAt` method // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat codeAt: createMethod$4(false), // `String.prototype.at` method // https://github.com/mathiasbynens/String.prototype.at charAt: createMethod$4(true) }; var charAt = stringMultibyte.charAt; var STRING_ITERATOR = 'String Iterator'; var setInternalState$1 = internalState.set; var getInternalState$1 = internalState.getterFor(STRING_ITERATOR); // `String.prototype[@@iterator]` method // https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator defineIterator(String, 'String', function (iterated) { setInternalState$1(this, { type: STRING_ITERATOR, string: String(iterated), index: 0 }); // `%StringIteratorPrototype%.next` method // https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next }, function next() { var state = getInternalState$1(this); var string = state.string; var index = state.index; var point; if (index >= string.length) return { value: undefined, done: true }; point = charAt(string, index); state.index += point.length; return { value: point, done: false }; }); var nativePromiseConstructor = global_1.Promise; var redefineAll = function (target, src, options) { for (var key in src) { if (options && options.unsafe && target[key]) target[key] = src[key]; else redefine(target, key, src[key], options); } return target; }; var SPECIES$2 = wellKnownSymbol('species'); var setSpecies = function (CONSTRUCTOR_NAME) { var Constructor = getBuiltIn(CONSTRUCTOR_NAME); var defineProperty = objectDefineProperty.f; if (descriptors && Constructor && !Constructor[SPECIES$2]) { defineProperty(Constructor, SPECIES$2, { configurable: true, get: function () { return this; } }); } }; var anInstance = function (it, Constructor, name) { if (!(it instanceof Constructor)) { throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation'); } return it; }; var ITERATOR$2 = wellKnownSymbol('iterator'); var ArrayPrototype$6 = Array.prototype; // check on default Array iterator var isArrayIteratorMethod = function (it) { return it !== undefined && (iterators.Array === it || ArrayPrototype$6[ITERATOR$2] === it); }; var ITERATOR$3 = wellKnownSymbol('iterator'); var getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR$3] || it['@@iterator'] || iterators[classof(it)]; }; // call something on iterator step with safe closing on error var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) { try { return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (error) { var returnMethod = iterator['return']; if (returnMethod !== undefined) anObject(returnMethod.call(iterator)); throw error; } }; var iterate_1 = createCommonjsModule(function (module) { var Result = function (stopped, result) { this.stopped = stopped; this.result = result; }; var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) { var boundFunction = functionBindContext(fn, that, AS_ENTRIES ? 2 : 1); var iterator, iterFn, index, length, result, next, step; if (IS_ITERATOR) { iterator = iterable; } else { iterFn = getIteratorMethod(iterable); if (typeof iterFn != 'function') throw TypeError('Target is not iterable'); // optimisation for array iterators if (isArrayIteratorMethod(iterFn)) { for (index = 0, length = toLength(iterable.length); length > index; index++) { result = AS_ENTRIES ? boundFunction(anObject(step = iterable[index])[0], step[1]) : boundFunction(iterable[index]); if (result && result instanceof Result) return result; } return new Result(false); } iterator = iterFn.call(iterable); } next = iterator.next; while (!(step = next.call(iterator)).done) { result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES); if (typeof result == 'object' && result && result instanceof Result) return result; } return new Result(false); }; iterate.stop = function (result) { return new Result(true, result); }; }); var ITERATOR$4 = wellKnownSymbol('iterator'); var SAFE_CLOSING = false; try { var called = 0; var iteratorWithReturn = { next: function () { return { done: !!called++ }; }, 'return': function () { SAFE_CLOSING = true; } }; iteratorWithReturn[ITERATOR$4] = function () { return this; }; // eslint-disable-next-line no-throw-literal Array.from(iteratorWithReturn, function () { throw 2; }); } catch (error) { /* empty */ } var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) { if (!SKIP_CLOSING && !SAFE_CLOSING) return false; var ITERATION_SUPPORT = false; try { var object = {}; object[ITERATOR$4] = function () { return { next: function () { return { done: ITERATION_SUPPORT = true }; } }; }; exec(object); } catch (error) { /* empty */ } return ITERATION_SUPPORT; }; var SPECIES$3 = wellKnownSymbol('species'); // `SpeciesConstructor` abstract operation // https://tc39.github.io/ecma262/#sec-speciesconstructor var speciesConstructor = function (O, defaultConstructor) { var C = anObject(O).constructor; var S; return C === undefined || (S = anObject(C)[SPECIES$3]) == undefined ? defaultConstructor : aFunction(S); }; var engineIsIos = /(iphone|ipod|ipad).*applewebkit/i.test(engineUserAgent); var location = global_1.location; var set$1 = global_1.setImmediate; var clear = global_1.clearImmediate; var process$2 = global_1.process; var MessageChannel = global_1.MessageChannel; var Dispatch = global_1.Dispatch; var counter = 0; var queue = {}; var ONREADYSTATECHANGE = 'onreadystatechange'; var defer, channel, port; var run = function (id) { // eslint-disable-next-line no-prototype-builtins if (queue.hasOwnProperty(id)) { var fn = queue[id]; delete queue[id]; fn(); } }; var runner = function (id) { return function () { run(id); }; }; var listener = function (event) { run(event.data); }; var post = function (id) { // old engines have not location.origin global_1.postMessage(id + '', location.protocol + '//' + location.host); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if (!set$1 || !clear) { set$1 = 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 (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args); }; defer(counter); return counter; }; clear = function clearImmediate(id) { delete queue[id]; }; // Node.js 0.8- if (classofRaw(process$2) == 'process') { defer = function (id) { process$2.nextTick(runner(id)); }; // Sphere (JS game engine) Dispatch API } else if (Dispatch && Dispatch.now) { defer = function (id) { Dispatch.now(runner(id)); }; // Browsers with MessageChannel, includes WebWorkers // except iOS - https://github.com/zloirock/core-js/issues/624 } else if (MessageChannel && !engineIsIos) { channel = new MessageChannel(); port = channel.port2; channel.port1.onmessage = listener; defer = functionBindContext(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if (global_1.addEventListener && typeof postMessage == 'function' && !global_1.importScripts && !fails(post)) { defer = post; global_1.addEventListener('message', listener, false); // IE8- } else if (ONREADYSTATECHANGE in documentCreateElement('script')) { defer = function (id) { html.appendChild(documentCreateElement('script'))[ONREADYSTATECHANGE] = function () { html.removeChild(this); run(id); }; }; // Rest old browsers } else { defer = function (id) { setTimeout(runner(id), 0); }; } } var task = { set: set$1, clear: clear }; var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f; var macrotask = task.set; var MutationObserver$1 = global_1.MutationObserver || global_1.WebKitMutationObserver; var process$3 = global_1.process; var Promise$1 = global_1.Promise; var IS_NODE = classofRaw(process$3) == 'process'; // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask` var queueMicrotaskDescriptor = getOwnPropertyDescriptor$2(global_1, 'queueMicrotask'); var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value; var flush, head, last, notify, toggle, node, promise, then; // modern engines have queueMicrotask method if (!queueMicrotask) { flush = function () { var parent, fn; if (IS_NODE && (parent = process$3.domain)) parent.exit(); while (head) { fn = head.fn; head = head.next; try { fn(); } catch (error) { if (head) notify(); else last = undefined; throw error; } } last = undefined; if (parent) parent.enter(); }; // Node.js if (IS_NODE) { notify = function () { process$3.nextTick(flush); }; // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339 } else if (MutationObserver$1 && !engineIsIos) { toggle = true; node = document.createTextNode(''); new MutationObserver$1(flush).observe(node, { characterData: true }); notify = function () { node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if (Promise$1 && Promise$1.resolve) { // Promise.resolve without an argument throws an error in LG WebOS 2 promise = Promise$1.resolve(undefined); then = promise.then; notify = function () { then.call(promise, 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_1, flush); }; } } var microtask = queueMicrotask || function (fn) { var task = { fn: fn, next: undefined }; if (last) last.next = task; if (!head) { head = task; notify(); } last = task; }; var PromiseCapability = function (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); }; // 25.4.1.5 NewPromiseCapability(C) var f$3 = function (C) { return new PromiseCapability(C); }; var newPromiseCapability = { f: f$3 }; var promiseResolve = 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; }; var hostReportErrors = function (a, b) { var console = global_1.console; if (console && console.error) { arguments.length === 1 ? console.error(a) : console.error(a, b); } }; var perform = function (exec) { try { return { error: false, value: exec() }; } catch (error) { return { error: true, value: error }; } }; var task$1 = task.set; var SPECIES$4 = wellKnownSymbol('species'); var PROMISE = 'Promise'; var getInternalState$2 = internalState.get; var setInternalState$2 = internalState.set; var getInternalPromiseState = internalState.getterFor(PROMISE); var PromiseConstructor = nativePromiseConstructor; var TypeError$1 = global_1.TypeError; var document$2 = global_1.document; var process$4 = global_1.process; var $fetch = getBuiltIn('fetch'); var newPromiseCapability$1 = newPromiseCapability.f; var newGenericPromiseCapability = newPromiseCapability$1; var IS_NODE$1 = classofRaw(process$4) == 'process'; var DISPATCH_EVENT = !!(document$2 && document$2.createEvent && global_1.dispatchEvent); var UNHANDLED_REJECTION = 'unhandledrejection'; var REJECTION_HANDLED = 'rejectionhandled'; var PENDING = 0; var FULFILLED = 1; var REJECTED = 2; var HANDLED = 1; var UNHANDLED = 2; var Internal, OwnPromiseCapability, PromiseWrapper; var FORCED = isForced_1(PROMISE, function () { var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor); if (!GLOBAL_CORE_JS_PROMISE) { // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 // We can't detect it synchronously, so just check versions if (engineV8Version === 66) return true; // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test if (!IS_NODE$1 && typeof PromiseRejectionEvent != 'function') return true; } // We need Promise#finally in the pure version for preventing prototype pollution if ( !PromiseConstructor.prototype['finally']) return true; // We can't use @@species feature detection in V8 since it causes // deoptimization and performance degradation // https://github.com/zloirock/core-js/issues/679 if (engineV8Version >= 51 && /native code/.test(PromiseConstructor)) return false; // Detect correctness of subclassing with @@species support var promise = PromiseConstructor.resolve(1); var FakePromise = function (exec) { exec(function () { /* empty */ }, function () { /* empty */ }); }; var constructor = promise.constructor = {}; constructor[SPECIES$4] = FakePromise; return !(promise.then(function () { /* empty */ }) instanceof FakePromise); }); var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) { PromiseConstructor.all(iterable)['catch'](function () { /* empty */ }); }); // helpers var isThenable = function (it) { var then; return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; var notify$1 = function (promise, state, isReject) { if (state.notified) return; state.notified = true; var chain = state.reactions; microtask(function () { var value = state.value; var ok = state.state == FULFILLED; var index = 0; // variable length - can't use forEach while (chain.length > index) { var reaction = chain[index++]; var handler = ok ? reaction.ok : reaction.fail; var resolve = reaction.resolve; var reject = reaction.reject; var domain = reaction.domain; var result, then, exited; try { if (handler) { if (!ok) { if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state); state.rejection = HANDLED; } if (handler === true) result = value; else { if (domain) domain.enter(); result = handler(value); // can throw if (domain) { domain.exit(); exited = true; } } if (result === reaction.promise) { reject(TypeError$1('Promise-chain cycle')); } else if (then = isThenable(result)) { then.call(result, resolve, reject); } else resolve(result); } else reject(value); } catch (error) { if (domain && !exited) domain.exit(); reject(error); } } state.reactions = []; state.notified = false; if (isReject && !state.rejection) onUnhandled(promise, state); }); }; var dispatchEvent = function (name, promise, reason) { var event, handler; if (DISPATCH_EVENT) { event = document$2.createEvent('Event'); event.promise = promise; event.reason = reason; event.initEvent(name, false, true); global_1.dispatchEvent(event); } else event = { promise: promise, reason: reason }; if (handler = global_1['on' + name]) handler(event); else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason); }; var onUnhandled = function (promise, state) { task$1.call(global_1, function () { var value = state.value; var IS_UNHANDLED = isUnhandled(state); var result; if (IS_UNHANDLED) { result = perform(function () { if (IS_NODE$1) { process$4.emit('unhandledRejection', value, promise); } else dispatchEvent(UNHANDLED_REJECTION, promise, value); }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should state.rejection = IS_NODE$1 || isUnhandled(state) ? UNHANDLED : HANDLED; if (result.error) throw result.value; } }); }; var isUnhandled = function (state) { return state.rejection !== HANDLED && !state.parent; }; var onHandleUnhandled = function (promise, state) { task$1.call(global_1, function () { if (IS_NODE$1) { process$4.emit('rejectionHandled', promise); } else dispatchEvent(REJECTION_HANDLED, promise, state.value); }); }; var bind = function (fn, promise, state, unwrap) { return function (value) { fn(promise, state, value, unwrap); }; }; var internalReject = function (promise, state, value, unwrap) { if (state.done) return; state.done = true; if (unwrap) state = unwrap; state.value = value; state.state = REJECTED; notify$1(promise, state, true); }; var internalResolve = function (promise, state, value, unwrap) { if (state.done) return; state.done = true; if (unwrap) state = unwrap; try { if (promise === value) throw TypeError$1("Promise can't be resolved itself"); var then = isThenable(value); if (then) { microtask(function () { var wrapper = { done: false }; try { then.call(value, bind(internalResolve, promise, wrapper, state), bind(internalReject, promise, wrapper, state) ); } catch (error) { internalReject(promise, wrapper, error, state); } }); } else { state.value = value; state.state = FULFILLED; notify$1(promise, state, false); } } catch (error) { internalReject(promise, { done: false }, error, state); } }; // constructor polyfill if (FORCED) { // 25.4.3.1 Promise(executor) PromiseConstructor = function Promise(executor) { anInstance(this, PromiseConstructor, PROMISE); aFunction(executor); Internal.call(this); var state = getInternalState$2(this); try { executor(bind(internalResolve, this, state), bind(internalReject, this, state)); } catch (error) { internalReject(this, state, error); } }; // eslint-disable-next-line no-unused-vars Internal = function Promise(executor) { setInternalState$2(this, { type: PROMISE, done: false, notified: false, parent: false, reactions: [], rejection: false, state: PENDING, value: undefined }); }; Internal.prototype = redefineAll(PromiseConstructor.prototype, { // `Promise.prototype.then` method // https://tc39.github.io/ecma262/#sec-promise.prototype.then then: function then(onFulfilled, onRejected) { var state = getInternalPromiseState(this); var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; reaction.fail = typeof onRejected == 'function' && onRejected; reaction.domain = IS_NODE$1 ? process$4.domain : undefined; state.parent = true; state.reactions.push(reaction); if (state.state != PENDING) notify$1(this, state, false); return reaction.promise; }, // `Promise.prototype.catch` method // https://tc39.github.io/ecma262/#sec-promise.prototype.catch 'catch': function (onRejected) { return this.then(undefined, onRejected); } }); OwnPromiseCapability = function () { var promise = new Internal(); var state = getInternalState$2(promise); this.promise = promise; this.resolve = bind(internalResolve, promise, state); this.reject = bind(internalReject, promise, state); }; newPromiseCapability.f = newPromiseCapability$1 = function (C) { return C === PromiseConstructor || C === PromiseWrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); }; } _export({ global: true, wrap: true, forced: FORCED }, { Promise: PromiseConstructor }); setToStringTag(PromiseConstructor, PROMISE, false, true); setSpecies(PROMISE); PromiseWrapper = getBuiltIn(PROMISE); // statics _export({ target: PROMISE, stat: true, forced: FORCED }, { // `Promise.reject` method // https://tc39.github.io/ecma262/#sec-promise.reject reject: function reject(r) { var capability = newPromiseCapability$1(this); capability.reject.call(undefined, r); return capability.promise; } }); _export({ target: PROMISE, stat: true, forced: isPure }, { // `Promise.resolve` method // https://tc39.github.io/ecma262/#sec-promise.resolve resolve: function resolve(x) { return promiseResolve( this === PromiseWrapper ? PromiseConstructor : this, x); } }); _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, { // `Promise.all` method // https://tc39.github.io/ecma262/#sec-promise.all all: function all(iterable) { var C = this; var capability = newPromiseCapability$1(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var $promiseResolve = aFunction(C.resolve); var values = []; var counter = 0; var remaining = 1; iterate_1(iterable, function (promise) { var index = counter++; var alreadyCalled = false; values.push(undefined); remaining++; $promiseResolve.call(C, promise).then(function (value) { if (alreadyCalled) return; alreadyCalled = true; values[index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if (result.error) reject(result.value); return capability.promise; }, // `Promise.race` method // https://tc39.github.io/ecma262/#sec-promise.race race: function race(iterable) { var C = this; var capability = newPromiseCapability$1(C); var reject = capability.reject; var result = perform(function () { var $promiseResolve = aFunction(C.resolve); iterate_1(iterable, function (promise) { $promiseResolve.call(C, promise).then(capability.resolve, reject); }); }); if (result.error) reject(result.value); return capability.promise; } }); // `Promise.allSettled` method // https://github.com/tc39/proposal-promise-allSettled _export({ target: 'Promise', stat: true }, { allSettled: function allSettled(iterable) { var C = this; var capability = newPromiseCapability.f(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var promiseResolve = aFunction(C.resolve); var values = []; var counter = 0; var remaining = 1; iterate_1(iterable, function (promise) { var index = counter++; var alreadyCalled = false; values.push(undefined); remaining++; promiseResolve.call(C, promise).then(function (value) { if (alreadyCalled) return; alreadyCalled = true; values[index] = { status: 'fulfilled', value: value }; --remaining || resolve(values); }, function (e) { if (alreadyCalled) return; alreadyCalled = true; values[index] = { status: 'rejected', reason: e }; --remaining || resolve(values); }); }); --remaining || resolve(values); }); if (result.error) reject(result.value); return capability.promise; } }); // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829 var NON_GENERIC = !!nativePromiseConstructor && fails(function () { nativePromiseConstructor.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ }); }); // `Promise.prototype.finally` method // https://tc39.github.io/ecma262/#sec-promise.prototype.finally _export({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, { 'finally': function (onFinally) { var C = speciesConstructor(this, getBuiltIn('Promise')); var isFunction = typeof onFinally == 'function'; return this.then( isFunction ? function (x) { return promiseResolve(C, onFinally()).then(function () { return x; }); } : onFinally, isFunction ? function (e) { return promiseResolve(C, onFinally()).then(function () { throw e; }); } : onFinally ); } }); var promise$1 = path.Promise; var promise$2 = promise$1; var promise$3 = promise$2; var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); }); // `Object.keys` method // https://tc39.github.io/ecma262/#sec-object.keys _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { keys: function keys(it) { return objectKeys(toObject(it)); } }); var keys$1 = path.Object.keys; var keys$2 = keys$1; var keys$3 = keys$2; var $includes = arrayIncludes.includes; var USES_TO_LENGTH$5 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 }); // `Array.prototype.includes` method // https://tc39.github.io/ecma262/#sec-array.prototype.includes _export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$5 }, { includes: function includes(el /* , fromIndex = 0 */) { return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); var includes = entryVirtual('Array').includes; var MATCH = wellKnownSymbol('match'); // `IsRegExp` abstract operation // https://tc39.github.io/ecma262/#sec-isregexp var isRegexp = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp'); }; var notARegexp = function (it) { if (isRegexp(it)) { throw TypeError("The method doesn't accept regular expressions"); } return it; }; var MATCH$1 = wellKnownSymbol('match'); var correctIsRegexpLogic = function (METHOD_NAME) { var regexp = /./; try { '/./'[METHOD_NAME](regexp); } catch (e) { try { regexp[MATCH$1] = false; return '/./'[METHOD_NAME](regexp); } catch (f) { /* empty */ } } return false; }; // `String.prototype.includes` method // https://tc39.github.io/ecma262/#sec-string.prototype.includes _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, { includes: function includes(searchString /* , position = 0 */) { return !!~String(requireObjectCoercible(this)) .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined); } }); var includes$1 = entryVirtual('String').includes; var ArrayPrototype$7 = Array.prototype; var StringPrototype = String.prototype; var includes$2 = function (it) { var own = it.includes; if (it === ArrayPrototype$7 || (it instanceof Array && own === ArrayPrototype$7.includes)) return includes; if (typeof it === 'string' || it === StringPrototype || (it instanceof String && own === StringPrototype.includes)) { return includes$1; } return own; }; var includes$3 = includes$2; var includes$4 = includes$3; var $forEach = arrayIteration.forEach; var STRICT_METHOD$2 = arrayMethodIsStrict('forEach'); var USES_TO_LENGTH$6 = arrayMethodUsesToLength('forEach'); // `Array.prototype.forEach` method implementation // https://tc39.github.io/ecma262/#sec-array.prototype.foreach var arrayForEach = (!STRICT_METHOD$2 || !USES_TO_LENGTH$6) ? function forEach(callbackfn /* , thisArg */) { return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } : [].forEach; // `Array.prototype.forEach` method // https://tc39.github.io/ecma262/#sec-array.prototype.foreach _export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, { forEach: arrayForEach }); var forEach = entryVirtual('Array').forEach; var forEach$1 = forEach; var ArrayPrototype$8 = Array.prototype; var DOMIterables$1 = { DOMTokenList: true, NodeList: true }; var forEach_1 = function (it) { var own = it.forEach; return it === ArrayPrototype$8 || (it instanceof Array && own === ArrayPrototype$8.forEach) // eslint-disable-next-line no-prototype-builtins || DOMIterables$1.hasOwnProperty(classof(it)) ? forEach$1 : own; }; var forEach$2 = forEach_1; var freezing = !fails(function () { return Object.isExtensible(Object.preventExtensions({})); }); var internalMetadata = createCommonjsModule(function (module) { var defineProperty = objectDefineProperty.f; var METADATA = uid('meta'); var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var setMetadata = function (it) { defineProperty(it, METADATA, { value: { objectID: 'O' + ++id, // object ID weakData: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return a primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, METADATA)) { // 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 setMetadata(it); // return object ID } return it[METADATA].objectID; }; var getWeakData = function (it, create) { if (!has(it, METADATA)) { // 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 setMetadata(it); // return the store of weak collections IDs } return it[METADATA].weakData; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (freezing && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it); return it; }; var meta = module.exports = { REQUIRED: false, fastKey: fastKey, getWeakData: getWeakData, onFreeze: onFreeze }; hiddenKeys[METADATA] = true; }); var internalMetadata_1 = internalMetadata.REQUIRED; var internalMetadata_2 = internalMetadata.fastKey; var internalMetadata_3 = internalMetadata.getWeakData; var internalMetadata_4 = internalMetadata.onFreeze; var defineProperty$2 = objectDefineProperty.f; var forEach$3 = arrayIteration.forEach; var setInternalState$3 = internalState.set; var internalStateGetterFor = internalState.getterFor; var collection = function (CONSTRUCTOR_NAME, wrapper, common) { var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1; var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1; var ADDER = IS_MAP ? 'set' : 'add'; var NativeConstructor = global_1[CONSTRUCTOR_NAME]; var NativePrototype = NativeConstructor && NativeConstructor.prototype; var exported = {}; var Constructor; if (!descriptors || typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () { new NativeConstructor().entries().next(); })) ) { // create collection constructor Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER); internalMetadata.REQUIRED = true; } else { Constructor = wrapper(function (target, iterable) { setInternalState$3(anInstance(target, Constructor, CONSTRUCTOR_NAME), { type: CONSTRUCTOR_NAME, collection: new NativeConstructor() }); if (iterable != undefined) iterate_1(iterable, target[ADDER], target, IS_MAP); }); var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); forEach$3(['add', 'clear', 'delete', 'forEach', 'get', 'has', 'set', 'keys', 'values', 'entries'], function (KEY) { var IS_ADDER = KEY == 'add' || KEY == 'set'; if (KEY in NativePrototype && !(IS_WEAK && KEY == 'clear')) { createNonEnumerableProperty(Constructor.prototype, KEY, function (a, b) { var collection = getInternalState(this).collection; if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; var result = collection[KEY](a === 0 ? 0 : a, b); return IS_ADDER ? this : result; }); } }); IS_WEAK || defineProperty$2(Constructor.prototype, 'size', { configurable: true, get: function () { return getInternalState(this).collection.size; } }); } setToStringTag(Constructor, CONSTRUCTOR_NAME, false, true); exported[CONSTRUCTOR_NAME] = Constructor; _export({ global: true, forced: true }, exported); if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP); return Constructor; }; var defineProperty$3 = objectDefineProperty.f; var fastKey = internalMetadata.fastKey; var setInternalState$4 = internalState.set; var internalStateGetterFor$1 = internalState.getterFor; var collectionStrong = { getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) { var C = wrapper(function (that, iterable) { anInstance(that, C, CONSTRUCTOR_NAME); setInternalState$4(that, { type: CONSTRUCTOR_NAME, index: objectCreate(null), first: undefined, last: undefined, size: 0 }); if (!descriptors) that.size = 0; if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP); }); var getInternalState = internalStateGetterFor$1(CONSTRUCTOR_NAME); var define = function (that, key, value) { var state = getInternalState(that); var entry = getEntry(that, key); var previous, index; // change existing entry if (entry) { entry.value = value; // create new entry } else { state.last = entry = { index: index = fastKey(key, true), key: key, value: value, previous: previous = state.last, next: undefined, removed: false }; if (!state.first) state.first = entry; if (previous) previous.next = entry; if (descriptors) state.size++; else that.size++; // add to index if (index !== 'F') state.index[index] = entry; } return that; }; var getEntry = function (that, key) { var state = getInternalState(that); // fast case var index = fastKey(key); var entry; if (index !== 'F') return state.index[index]; // frozen object case for (entry = state.first; entry; entry = entry.next) { if (entry.key == key) return entry; } }; redefineAll(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear() { var that = this; var state = getInternalState(that); var data = state.index; var entry = state.first; while (entry) { entry.removed = true; if (entry.previous) entry.previous = entry.previous.next = undefined; delete data[entry.index]; entry = entry.next; } state.first = state.last = undefined; if (descriptors) state.size = 0; else that.size = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function (key) { var that = this; var state = getInternalState(that); var entry = getEntry(that, key); if (entry) { var next = entry.next; var prev = entry.previous; delete state.index[entry.index]; entry.removed = true; if (prev) prev.next = next; if (next) next.previous = prev; if (state.first == entry) state.first = next; if (state.last == entry) state.last = prev; if (descriptors) state.size--; else 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 */) { var state = getInternalState(this); var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var entry; while (entry = entry ? entry.next : state.first) { boundFunction(entry.value, entry.key, this); // revert to the last existing entry while (entry && entry.removed) entry = entry.previous; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key) { return !!getEntry(this, key); } }); redefineAll(C.prototype, IS_MAP ? { // 23.1.3.6 Map.prototype.get(key) get: function get(key) { var entry = getEntry(this, key); return entry && entry.value; }, // 23.1.3.9 Map.prototype.set(key, value) set: function set(key, value) { return define(this, key === 0 ? 0 : key, value); } } : { // 23.2.3.1 Set.prototype.add(value) add: function add(value) { return define(this, value = value === 0 ? 0 : value, value); } }); if (descriptors) defineProperty$3(C.prototype, 'size', { get: function () { return getInternalState(this).size; } }); return C; }, setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) { var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator'; var getInternalCollectionState = internalStateGetterFor$1(CONSTRUCTOR_NAME); var getInternalIteratorState = internalStateGetterFor$1(ITERATOR_NAME); // 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 defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) { setInternalState$4(this, { type: ITERATOR_NAME, target: iterated, state: getInternalCollectionState(iterated), kind: kind, last: undefined }); }, function () { var state = getInternalIteratorState(this); var kind = state.kind; var entry = state.last; // revert to the last existing entry while (entry && entry.removed) entry = entry.previous; // get next entry if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) { // or finish the iteration state.target = undefined; return { value: undefined, done: true }; } // return step by kind if (kind == 'keys') return { value: entry.key, done: false }; if (kind == 'values') return { value: entry.value, done: false }; return { value: [entry.key, entry.value], done: false }; }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2 setSpecies(CONSTRUCTOR_NAME); } }; // `Set` constructor // https://tc39.github.io/ecma262/#sec-set-objects var es_set = collection('Set', function (init) { return function Set() { return init(this, arguments.length ? arguments[0] : undefined); }; }, collectionStrong); var set$2 = path.Set; var set$3 = set$2; var set$4 = set$3; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ 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 __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 __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; } var isNullOrUndefined = (function (value) { return value == null; }); // `Array.isArray` method // https://tc39.github.io/ecma262/#sec-array.isarray _export({ target: 'Array', stat: true }, { isArray: isArray }); var isArray$1 = path.Array.isArray; var isArray$2 = isArray$1; var isArray$3 = isArray$2; var isArray$4 = (function (value) { return isArray$3(value); }); var isObjectType = function (value) { return typeof value === 'object'; }; var isObject$1 = (function (value) { return !isNullOrUndefined(value) && !isArray$4(value) && isObjectType(value); }); var isHTMLElement = (function (value) { return isObject$1(value) && value.nodeType === Node.ELEMENT_NODE; }); var VALIDATION_MODE = { onBlur: 'onBlur', onChange: 'onChange', onSubmit: 'onSubmit' }; var VALUE = 'value'; var UNDEFINED = 'undefined'; var EVENTS = { BLUR: 'blur', CHANGE: 'change', INPUT: 'input' }; var SELECT = 'select'; var INPUT_VALIDATION_RULES = { max: 'max', min: 'min', maxLength: 'maxLength', minLength: 'minLength', pattern: 'pattern', required: 'required', validate: 'validate' }; var REGEX_IS_DEEP_PROP = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; var REGEX_IS_PLAIN_PROP = /^\w*$/; var REGEX_PROP_NAME = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; var REGEX_ESCAPE_CHAR = /\\(\\)?/g; var REGEX_ARRAY_FIELD_INDEX = /[\d+]/g; function attachEventListeners(_a) { var ref = _a.field.ref, handleChange = _a.handleChange, isRadioOrCheckbox = _a.isRadioOrCheckbox; if (isHTMLElement(ref) && handleChange) { ref.addEventListener(isRadioOrCheckbox ? EVENTS.CHANGE : EVENTS.INPUT, handleChange); ref.addEventListener(EVENTS.BLUR, handleChange); } } var $entries = objectToArray.entries; // `Object.entries` method // https://tc39.github.io/ecma262/#sec-object.entries _export({ target: 'Object', stat: true }, { entries: function entries(O) { return $entries(O); } }); var entries = path.Object.entries; var entries$1 = entries; var entries$2 = entries$1; var isKey = (function (value) { return !isArray$4(value) && (REGEX_IS_PLAIN_PROP.test(value) || !REGEX_IS_DEEP_PROP.test(value)); }); var stringToPath = (function (string) { var result = []; string.replace(REGEX_PROP_NAME, function (match, number, quote, string) { result.push(quote ? string.replace(REGEX_ESCAPE_CHAR, '$1') : number || match); }); return result; }); function set$5(object, path, value) { var index = -1; var tempPath = isKey(path) ? [path] : stringToPath(path); var length = tempPath.length; var lastIndex = length - 1; while (++index < length) { var key = tempPath[index]; var newValue = value; if (index !== lastIndex) { var objValue = object[key]; newValue = isObject$1(objValue) || isArray$4(objValue) ? objValue : !isNaN(+tempPath[index + 1]) ? [] : {}; } object[key] = newValue; object = object[key]; } return object; } var transformToNestObject = (function (data) { var _context; return reduce$2(_context = entries$2(data)).call(_context, function (previous, _a) { var _b; var _c = __read(_a, 2), key = _c[0], value = _c[1]; if (!isKey(key)) { set$5(previous, key, value); return previous; } return __assign(__assign({}, previous), (_b = {}, _b[key] = value, _b)); }, {}); }); var isUndefined = (function (val) { return val === undefined; }); var get$1 = (function (obj, path, defaultValue) { var _context, _context2; var result = reduce$2(_context = filter$2(_context2 = path.split(/[,[\].]+?/)).call(_context2, Boolean)).call(_context, function (result, key) { return isNullOrUndefined(result) ? result : result[key]; }, obj); return isUndefined(result) || result === obj ? isUndefined(obj[path]) ? defaultValue : obj[path] : result; }); var focusOnErrorField = (function (fields, fieldErrors) { for (var key in fields) { if (get$1(fieldErrors, key)) { var field = fields[key]; if (field) { if (field.ref.focus) { field.ref.focus(); break; } else if (field.options) { field.options[0].ref.focus(); break; } } } } }); var removeAllEventListeners = (function (ref, validateWithStateUpdate) { if (isHTMLElement(ref) && ref.removeEventListener) { ref.removeEventListener(EVENTS.INPUT, validateWithStateUpdate); ref.removeEventListener(EVENTS.CHANGE, validateWithStateUpdate); ref.removeEventListener(EVENTS.BLUR, validateWithStateUpdate); } }); var isRadioInput = (function (element) { return element.type === 'radio'; }); var isCheckBoxInput = (function (element) { return element.type === 'checkbox'; }); function isDetached(element) { if (!element) { return true; } if (!(element instanceof HTMLElement) || element.nodeType === Node.DOCUMENT_NODE) { return false; } return isDetached(element.parentNode); } var createProperty = function (object, key, value) { var propertyKey = toPrimitive(key); if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); else object[propertyKey] = value; }; var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('slice'); var USES_TO_LENGTH$7 = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 }); var SPECIES$5 = wellKnownSymbol('species'); var nativeSlice = [].slice; var max$1 = Math.max; // `Array.prototype.slice` method // https://tc39.github.io/ecma262/#sec-array.prototype.slice // fallback for not array-like ES3 strings and DOM objects _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$7 }, { slice: function slice(start, end) { var O = toIndexedObject(this); var length = toLength(O.length); var k = toAbsoluteIndex(start, length); var fin = toAbsoluteIndex(end === undefined ? length : end, length); // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible var Constructor, result, n; if (isArray(O)) { Constructor = O.constructor; // cross-realm fallback if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) { Constructor = undefined; } else if (isObject(Constructor)) { Constructor = Constructor[SPECIES$5]; if (Constructor === null) Constructor = undefined; } if (Constructor === Array || Constructor === undefined) { return nativeSlice.call(O, k, fin); } } result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0)); for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); result.length = n; return result; } }); var slice = entryVirtual('Array').slice; var ArrayPrototype$9 = Array.prototype; var slice_1 = function (it) { var own = it.slice; return it === ArrayPrototype$9 || (it instanceof Array && own === ArrayPrototype$9.slice) ? slice : own; }; var slice$1 = slice_1; var slice$2 = slice$1; var isEmptyObject = (function (value) { return isObject$1(value) && !keys$3(value).length; }); function castPath(value) { return isArray$4(value) ? value : stringToPath(value); } function baseGet(object, path) { var updatePath = isKey(path) ? [path] : castPath(path); var length = path.length; var index = 0; while (index < length) { object = isUndefined(object) ? index++ : object[updatePath[index++]]; } return index == length ? object : undefined; } function baseSlice(array, start, end) { var index = -1; var length = array.length; if (start < 0) { start = -start > length ? 0 : length + start; } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : end - start; var result = Array(length); while (++index < length) { result[index] = array[index + start]; } return result; } function parent(object, path) { return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); } function baseUnset(object, path) { var updatePath = isKey(path) ? [path] : castPath(path); var childObject = parent(object, updatePath); var key = updatePath[updatePath.length - 1]; var result = !(childObject != null) || delete childObject[key]; var previousObjRef = undefined; for (var k = 0; k < slice$2(updatePath).call(updatePath, 0, -1).length; k++) { var index = -1; var objectRef = undefined; var currentPaths = slice$2(updatePath).call(updatePath, 0, -(k + 1)); var currentPathsLength = currentPaths.length - 1; if (k > 0) { previousObjRef = object; } while (++index < currentPaths.length) { var item = currentPaths[index]; objectRef = objectRef ? objectRef[item] : object[item]; if (currentPathsLength === index) { if (isObject$1(objectRef) && isEmptyObject(objectRef) || isArray$4(objectRef) && !filter$2(objectRef).call(objectRef, function (data) { return isObject$1(data) && !isEmptyObject(data); }).length) { previousObjRef ? delete previousObjRef[item] : delete object[item]; } } previousObjRef = objectRef; } } return result; } function unset(object, paths) { forEach$2(paths).call(paths, function (path) { baseUnset(object, path); }); return object; } var isSameRef = function (fieldValue, ref) { return fieldValue && fieldValue.ref === ref; }; function findRemovedFieldAndRemoveListener(fields, handleChange, field, forceDelete) { var ref = field.ref, _a = field.ref, name = _a.name, type = _a.type, mutationWatcher = field.mutationWatcher; var fieldValue = fields[name]; if (!type) { delete fields[name]; return; } if ((isRadioInput(ref) || isCheckBoxInput(ref)) && fieldValue) { var options_1 = fieldValue.options; if (isArray$4(options_1) && options_1.length) { var _context; forEach$2(_context = filter$2(options_1).call(options_1, Boolean)).call(_context, function (option, index) { var ref = option.ref, mutationWatcher = option.mutationWatcher; if (ref && isDetached(ref) && isSameRef(option, ref) || forceDelete) { removeAllEventListeners(ref, handleChange); if (mutationWatcher) { mutationWatcher.disconnect(); } unset(options_1, ["[" + index + "]"]); } }); if (options_1 && !filter$2(options_1).call(options_1, Boolean).length) { delete fields[name]; } } else { delete fields[name]; } } else if (isDetached(ref) && isSameRef(fieldValue, ref) || forceDelete) { removeAllEventListeners(ref, handleChange); if (mutationWatcher) { mutationWatcher.disconnect(); } delete fields[name]; } } var nativeStartsWith = ''.startsWith; var min$2 = Math.min; var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic('startsWith'); // `String.prototype.startsWith` method // https://tc39.github.io/ecma262/#sec-string.prototype.startswith _export({ target: 'String', proto: true, forced: !CORRECT_IS_REGEXP_LOGIC }, { startsWith: function startsWith(searchString /* , position = 0 */) { var that = String(requireObjectCoercible(this)); notARegexp(searchString); var index = toLength(min$2(arguments.length > 1 ? arguments[1] : undefined, that.length)); var search = String(searchString); return nativeStartsWith ? nativeStartsWith.call(that, search, index) : that.slice(index, index + search.length) === search; } }); var startsWith = entryVirtual('String').startsWith; var StringPrototype$1 = String.prototype; var startsWith_1 = function (it) { var own = it.startsWith; return typeof it === 'string' || it === StringPrototype$1 || (it instanceof String && own === StringPrototype$1.startsWith) ? startsWith : own; }; var startsWith$1 = startsWith_1; var startsWith$2 = startsWith$1; var defaultReturn = { isValid: false, value: '' }; var getRadioValue = (function (options) { return isArray$4(options) ? reduce$2(options).call(options, function (previous, option) { return option && option.ref.checked ? { isValid: true, value: option.ref.value } : previous; }, defaultReturn) : defaultReturn; }); var getMultipleSelectValue = (function (options) { var _context, _context2; return map$2(_context = filter$2(_context2 = __spread(options)).call(_context2, function (_a) { var selected = _a.selected; return selected; })).call(_context, function (_a) { var value = _a.value; return value; }); }); var isFileInput = (function (element) { return element.type === 'file'; }); var isMultipleSelect = (function (element) { return element.type === SELECT + "-multiple"; }); var isEmptyString = (function (value) { return value === ''; }); var defaultResult = { value: false, isValid: false }; var validResult = { value: true, isValid: true }; var getCheckboxValue = (function (options) { if (isArray$4(options)) { if (options.length > 1) { var _context; var values = map$2(_context = filter$2(options).call(options, function (option) { return option && option.ref.checked; })).call(_context, function (_a) { var value = _a.ref.value; return value; }); return { value: values, isValid: !!values.length }; } var _a = options[0].ref, checked = _a.checked, value = _a.value, attributes = _a.attributes; return checked ? attributes && !isUndefined(attributes.value) ? isUndefined(value) || isEmptyString(value) ? validResult : { value: value, isValid: true } : validResult : defaultResult; } return defaultResult; }); function getFieldValue(fields, ref) { var name = ref.name, value = ref.value; var field = fields[name]; if (isFileInput(ref)) { return ref.files; } if (isRadioInput(ref)) { return field ? getRadioValue(field.options).value : ''; } if (isMultipleSelect(ref)) { return getMultipleSelectValue(ref.options); } if (isCheckBoxInput(ref)) { return field ? getCheckboxValue(field.options).value : false; } return value; } var isString = (function (value) { return typeof value === 'string'; }); var getFieldsValues = (function (fields, search) { var output = {}; var _loop_1 = function (name_1) { if (isUndefined(search) || (isString(search) ? startsWith$2(name_1).call(name_1, search) : isArray$4(search) ? find$2(search).call(search, function (data) { return startsWith$2(name_1).call(name_1, data); }) : search && search.nest)) { output[name_1] = getFieldValue(fields, fields[name_1].ref); } }; for (var name_1 in fields) { _loop_1(name_1); } return output; }); var compareObject = (function (objectA, objectB) { if (objectA === void 0) { objectA = {}; } if (objectB === void 0) { objectB = {}; } var objectAKeys = keys$3(objectA); var objectBKeys = keys$3(objectB); return objectAKeys.length === objectBKeys.length && every$2(objectAKeys).call(objectAKeys, function (key) { return objectB[key] && objectB[key] === objectA[key]; }); }); var isSameError = (function (error, _a) { var type = _a.type, types = _a.types, message = _a.message; return isObject$1(error) && error.type === type && error.message === message && compareObject(error.types, types); }); function shouldRenderBasedOnError(_a) { var errors = _a.errors, name = _a.name, error = _a.error, validFields = _a.validFields, fieldsWithValidation = _a.fieldsWithValidation; var isFieldValid = isEmptyObject(error); var isFormValid = isEmptyObject(errors); var currentFieldError = get$1(error, name); var existFieldError = get$1(errors, name); if (isFieldValid && validFields.has(name) || existFieldError && existFieldError.isManual) { return false; } if (isFormValid !== isFieldValid || !isFormValid && !existFieldError || isFieldValid && fieldsWithValidation.has(name) && !validFields.has(name)) { return true; } return currentFieldError && !isSameError(existFieldError, currentFieldError); } // a string of all valid unicode whitespaces // eslint-disable-next-line max-len var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; var whitespace = '[' + whitespaces + ']'; var ltrim = RegExp('^' + whitespace + whitespace + '*'); var rtrim = RegExp(whitespace + whitespace + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation var createMethod$5 = function (TYPE) { return function ($this) { var string = String(requireObjectCoercible($this)); if (TYPE & 1) string = string.replace(ltrim, ''); if (TYPE & 2) string = string.replace(rtrim, ''); return string; }; }; var stringTrim = { // `String.prototype.{ trimLeft, trimStart }` methods // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart start: createMethod$5(1), // `String.prototype.{ trimRight, trimEnd }` methods // https://tc39.github.io/ecma262/#sec-string.prototype.trimend end: createMethod$5(2), // `String.prototype.trim` method // https://tc39.github.io/ecma262/#sec-string.prototype.trim trim: createMethod$5(3) }; var trim = stringTrim.trim; var $parseFloat = global_1.parseFloat; var FORCED$1 = 1 / $parseFloat(whitespaces + '-0') !== -Infinity; // `parseFloat` method // https://tc39.github.io/ecma262/#sec-parsefloat-string var numberParseFloat = FORCED$1 ? function parseFloat(string) { var trimmedString = trim(String(string)); var result = $parseFloat(trimmedString); return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result; } : $parseFloat; // `parseFloat` method // https://tc39.github.io/ecma262/#sec-parsefloat-string _export({ global: true, forced: parseFloat != numberParseFloat }, { parseFloat: numberParseFloat }); var _parseFloat = path.parseFloat; var _parseFloat$1 = _parseFloat; var _parseFloat$2 = _parseFloat$1; var slice$3 = [].slice; var factories = {}; var construct = function (C, argsLength, args) { if (!(argsLength in factories)) { for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']'; // eslint-disable-next-line no-new-func factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')'); } return factories[argsLength](C, args); }; // `Function.prototype.bind` method implementation // https://tc39.github.io/ecma262/#sec-function.prototype.bind var functionBind = Function.bind || function bind(that /* , ...args */) { var fn = aFunction(this); var partArgs = slice$3.call(arguments, 1); var boundFunction = function bound(/* args... */) { var args = partArgs.concat(slice$3.call(arguments)); return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args); }; if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype; return boundFunction; }; // `Function.prototype.bind` method // https://tc39.github.io/ecma262/#sec-function.prototype.bind _export({ target: 'Function', proto: true }, { bind: functionBind }); var bind$1 = entryVirtual('Function').bind; var FunctionPrototype = Function.prototype; var bind_1 = function (it) { var own = it.bind; return it === FunctionPrototype || (it instanceof Function && own === FunctionPrototype.bind) ? bind$1 : own; }; var bind$2 = bind_1; var bind$3 = bind$2; var isRegex = (function (value) { return value instanceof RegExp; }); var getValueAndMessage = (function (validationData) { var isValueMessage = function (value) { return isObject$1(value) && !isRegex(value); }; return isValueMessage(validationData) ? validationData : { value: validationData, message: '' }; }); var isFunction = (function (value) { return typeof value === 'function'; }); var isBoolean = (function (value) { return typeof value === 'boolean'; }); var isMessage = (function (value) { return isString(value) || isObject$1(value) && React.isValidElement(value); }); function getValidateError(result, ref, type) { if (type === void 0) { type = 'validate'; } if (isMessage(result) || isBoolean(result) && !result) { return { type: type, message: isMessage(result) ? result : '', ref: ref }; } } var appendErrors = (function (name, validateAllFieldCriteria, errors, type, message) { var _a; if (validateAllFieldCriteria) { var error = errors[name]; return __assign(__assign({}, error), { types: __assign(__assign({}, error && error.types ? error.types : {}), (_a = {}, _a[type] = message || true, _a)) }); } return {}; }); var validateField = (function (fieldsRef, validateAllFieldCriteria, _a) { var ref = _a.ref, _b = _a.ref, type = _b.type, value = _b.value, name = _b.name, options = _a.options, required = _a.required, maxLength = _a.maxLength, minLength = _a.minLength, min = _a.min, max = _a.max, pattern = _a.pattern, validate = _a.validate; return __awaiter(void 0, void 0, void 0, function () { var fields, error, isRadio, isCheckBox, isRadioOrCheckbox, isEmpty, appendErrorsCurry, getMinMaxMessage, _c, requiredValue, requiredMessage, exceedMax, exceedMin, _d, maxValue, maxMessage, _e, minValue, minMessage, valueNumber, valueDate, _f, maxLengthValue, maxLengthMessage, _g, minLengthValue, minLengthMessage, inputLength, exceedMax, exceedMin, _h, patternValue, patternMessage, fieldValue, validateRef, result, validateError, validationResult, _j, _k, _l, key, validateFunction, validateResult, validateError, e_1_1; var e_1, _m; var _o; return __generator(this, function (_p) { switch (_p.label) { case 0: fields = fieldsRef.current; error = {}; isRadio = isRadioInput(ref); isCheckBox = isCheckBoxInput(ref); isRadioOrCheckbox = isRadio || isCheckBox; isEmpty = isEmptyString(value); appendErrorsCurry = bind$3(appendErrors).call(appendErrors, null, name, validateAllFieldCriteria, error); getMinMaxMessage = function (exceedMax, maxLengthMessage, minLengthMessage, maxType, minType) { if (maxType === void 0) { maxType = INPUT_VALIDATION_RULES.maxLength; } if (minType === void 0) { minType = INPUT_VALIDATION_RULES.minLength; } var message = exceedMax ? maxLengthMessage : minLengthMessage; error[name] = __assign({ type: exceedMax ? maxType : minType, message: message, ref: ref }, exceedMax ? appendErrorsCurry(maxType, message) : appendErrorsCurry(minType, message)); if (!validateAllFieldCriteria) { return error; } }; if (required && (!isRadio && !isCheckBox && (isEmpty || isNullOrUndefined(value)) || isBoolean(value) && !value || isCheckBox && !getCheckboxValue(options).isValid || isRadio && !getRadioValue(options).isValid)) { _c = isMessage(required) ? { value: !!required, message: required } : getValueAndMessage(required), requiredValue = _c.value, requiredMessage = _c.message; if (requiredValue) { error[name] = __assign({ type: INPUT_VALIDATION_RULES.required, message: requiredMessage, ref: isRadioOrCheckbox ? (_o = fields[name].options) === null || _o === void 0 ? void 0 : _o[0].ref : ref }, appendErrorsCurry(INPUT_VALIDATION_RULES.required, requiredMessage)); if (!validateAllFieldCriteria) { return [2 /*return*/ , error]; } } } if (!isNullOrUndefined(min) || !isNullOrUndefined(max)) { exceedMax = void 0; exceedMin = void 0; _d = getValueAndMessage(max), maxValue = _d.value, maxMessage = _d.message; _e = getValueAndMessage(min), minValue = _e.value, minMessage = _e.message; if (type === 'number' || !type && !isNaN(value)) { valueNumber = ref.valueAsNumber || _parseFloat$2(value); if (!isNullOrUndefined(maxValue)) { exceedMax = valueNumber > maxValue; } if (!isNullOrUndefined(minValue)) { exceedMin = valueNumber < minValue; } } else { valueDate = ref.valueAsDate || new Date(value); if (isString(maxValue)) { exceedMax = valueDate > new Date(maxValue); } if (isString(minValue)) { exceedMin = valueDate < new Date(minValue); } } if (exceedMax || exceedMin) { getMinMaxMessage(!!exceedMax, maxMessage, minMessage, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min); if (!validateAllFieldCriteria) { return [2 /*return*/ , error]; } } } if (isString(value) && !isEmpty && (maxLength || minLength)) { _f = getValueAndMessage(maxLength), maxLengthValue = _f.value, maxLengthMessage = _f.message; _g = getValueAndMessage(minLength), minLengthValue = _g.value, minLengthMessage = _g.message; inputLength = value.toString().length; exceedMax = !isNullOrUndefined(maxLengthValue) && inputLength > maxLengthValue; exceedMin = !isNullOrUndefined(minLengthValue) && inputLength < minLengthValue; if (exceedMax || exceedMin) { getMinMaxMessage(!!exceedMax, maxLengthMessage, minLengthMessage); if (!validateAllFieldCriteria) { return [2 /*return*/ , error]; } } } if (pattern && !isEmpty) { _h = getValueAndMessage(pattern), patternValue = _h.value, patternMessage = _h.message; if (isRegex(patternValue) && !patternValue.test(value)) { error[name] = __assign({ type: INPUT_VALIDATION_RULES.pattern, message: patternMessage, ref: ref }, appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, patternMessage)); if (!validateAllFieldCriteria) { return [2 /*return*/ , error]; } } } if (!validate) return [3 /*break*/ , 11]; fieldValue = getFieldValue(fields, ref); validateRef = isRadioOrCheckbox && options ? options[0].ref : ref; if (!isFunction(validate)) return [3 /*break*/ , 2]; return [4 /*yield*/ , validate(fieldValue)]; case 1: result = _p.sent(); validateError = getValidateError(result, validateRef); if (validateError) { error[name] = __assign(__assign({}, validateError), appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message)); if (!validateAllFieldCriteria) { return [2 /*return*/ , error]; } } return [3 /*break*/ , 11]; case 2: if (!isObject$1(validate)) return [3 /*break*/ , 11]; validationResult = {}; _p.label = 3; case 3: _p.trys.push([3, 8, 9, 10]); _j = __values(entries$2(validate)), _k = _j.next(); _p.label = 4; case 4: if (!!_k.done) return [3 /*break*/ , 7]; _l = __read(_k.value, 2), key = _l[0], validateFunction = _l[1]; if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) { return [3 /*break*/ , 7]; } return [4 /*yield*/ , validateFunction(fieldValue)]; case 5: validateResult = _p.sent(); validateError = getValidateError(validateResult, validateRef, key); if (validateError) { validationResult = __assign(__assign({}, validateError), appendErrorsCurry(key, validateError.message)); if (validateAllFieldCriteria) { error[name] = validationResult; } } _p.label = 6; case 6: _k = _j.next(); return [3 /*break*/ , 4]; case 7: return [3 /*break*/ , 10]; case 8: e_1_1 = _p.sent(); e_1 = { error: e_1_1 }; return [3 /*break*/ , 10]; case 9: try { if (_k && !_k.done && (_m = _j.return)) _m.call(_j); } finally { if (e_1) throw e_1.error; } return [7 /*endfinally*/ ]; case 10: if (!isEmptyObject(validationResult)) { error[name] = __assign({ ref: validateRef }, validationResult); if (!validateAllFieldCriteria) { return [2 /*return*/ , error]; } } _p.label = 11; case 11: return [2 /*return*/ , error]; } }); }); }); var parseErrorSchema = function (error, validateAllFieldCriteria) { var _context; var _a; return isArray$4(error.inner) ? reduce$2(_context = error.inner).call(_context, function (previous, _a) { var _b, _c, _d; var path = _a.path, message = _a.message, type = _a.type; return __assign(__assign({}, previous), path ? previous[path] && validateAllFieldCriteria ? (_b = {}, _b[path] = appendErrors(path, validateAllFieldCriteria, previous, type, message), _b) : (_c = {}, _c[path] = previous[path] || __assign({ message: message, type: type }, validateAllFieldCriteria ? { types: (_d = {}, _d[type] = message || true, _d) } : {}), _c) : {}); }, {}) : (_a = {}, _a[error.path] = { message: error.message, type: error.type }, _a); }; function validateWithSchema(validationSchema, validateAllFieldCriteria, data, validationResolver, context) { return __awaiter(this, void 0, void 0, function () { var _a, e_1; return __generator(this, function (_b) { switch (_b.label) { case 0: if (validationResolver) { return [2 /*return*/ , validationResolver(data, context)]; } _b.label = 1; case 1: _b.trys.push([1, 3,, 4]); _a = {}; return [4 /*yield*/ , validationSchema.validate(data, { abortEarly: false, context: context })]; case 2: return [2 /*return*/ , (_a.values = _b.sent(), _a.errors = {}, _a)]; case 3: e_1 = _b.sent(); return [2 /*return*/ , { values: {}, errors: transformToNestObject(parseErrorSchema(e_1, validateAllFieldCriteria)) }]; case 4: return [2 /*return*/ ]; } }); }); } // `FlattenIntoArray` abstract operation // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) { var targetIndex = start; var sourceIndex = 0; var mapFn = mapper ? functionBindContext(mapper, thisArg, 3) : false; var element; while (sourceIndex < sourceLen) { if (sourceIndex in source) { element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; if (depth > 0 && isArray(element)) { targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; } else { if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length'); target[targetIndex] = element; } targetIndex++; } sourceIndex++; } return targetIndex; }; var flattenIntoArray_1 = flattenIntoArray; // `Array.prototype.flat` method // https://github.com/tc39/proposal-flatMap _export({ target: 'Array', proto: true }, { flat: function flat(/* depthArg = 1 */) { var depthArg = arguments.length ? arguments[0] : undefined; var O = toObject(this); var sourceLen = toLength(O.length); var A = arraySpeciesCreate(O, 0); A.length = flattenIntoArray_1(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); return A; } }); var flat = entryVirtual('Array').flat; var ArrayPrototype$a = Array.prototype; var flat_1 = function (it) { var own = it.flat; return it === ArrayPrototype$a || (it instanceof Array && own === ArrayPrototype$a.flat) ? flat : own; }; var flat$1 = flat_1; var flat$2 = flat$1; var isPrimitive = (function (value) { return isNullOrUndefined(value) || !isObjectType(value); }); var getPath = function (path, values) { var _context; var getInnerPath = function (value, key, isObject) { var pathWithIndex = isObject ? path + "." + key : path + "[" + key + "]"; return isPrimitive(value) ? pathWithIndex : getPath(pathWithIndex, value); }; return isArray$4(values) ? map$2(values).call(values, function (value, key) { return getInnerPath(value, key); }) : map$2(_context = entries$2(values)).call(_context, function (_a) { var _b = __read(_a, 2), key = _b[0], value = _b[1]; return getInnerPath(value, key, true); }); }; var getPath$1 = (function (parentPath, value) { var _context2; return flat$2(_context2 = getPath(parentPath, value)).call(_context2, Infinity); }); var assignWatchFields = (function (fieldValues, fieldName, watchFields, inputValue, isSingleField) { var value; watchFields.add(fieldName); if (isEmptyObject(fieldValues)) { value = undefined; } else if (!isUndefined(fieldValues[fieldName])) { value = fieldValues[fieldName]; watchFields.add(fieldName); } else { value = get$1(transformToNestObject(fieldValues), fieldName); if (!isUndefined(value)) { var _context; forEach$2(_context = getPath$1(fieldName, value)).call(_context, function (name) { return watchFields.add(name); }); } } return isUndefined(value) ? isSingleField ? inputValue : get$1(inputValue, fieldName) : value; }); var skipValidation = (function (_a) { var isOnChange = _a.isOnChange, hasError = _a.hasError, isBlurEvent = _a.isBlurEvent, isOnSubmit = _a.isOnSubmit, isReValidateOnSubmit = _a.isReValidateOnSubmit, isOnBlur = _a.isOnBlur, isReValidateOnBlur = _a.isReValidateOnBlur, isSubmitted = _a.isSubmitted; return isOnChange && isBlurEvent || isOnSubmit && isReValidateOnSubmit || isOnSubmit && !isSubmitted || isOnBlur && !isBlurEvent && !hasError || isReValidateOnBlur && !isBlurEvent && hasError || isReValidateOnSubmit && isSubmitted; }); var $indexOf = arrayIncludes.indexOf; var nativeIndexOf = [].indexOf; var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0; var STRICT_METHOD$3 = arrayMethodIsStrict('indexOf'); var USES_TO_LENGTH$8 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 }); // `Array.prototype.indexOf` method // https://tc39.github.io/ecma262/#sec-array.prototype.indexof _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$3 || !USES_TO_LENGTH$8 }, { indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { return NEGATIVE_ZERO // convert -0 to +0 ? nativeIndexOf.apply(this, arguments) || 0 : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined); } }); var indexOf$1 = entryVirtual('Array').indexOf; var ArrayPrototype$b = Array.prototype; var indexOf_1 = function (it) { var own = it.indexOf; return it === ArrayPrototype$b || (it instanceof Array && own === ArrayPrototype$b.indexOf) ? indexOf$1 : own; }; var indexOf$2 = indexOf_1; var indexOf$3 = indexOf$2; var getFieldArrayParentName = (function (name) { return name.substring(0, indexOf$3(name).call(name, '[')); }); var getFieldValueByName = (function (fields, name) { var results = transformToNestObject(getFieldsValues(fields)); return name ? get$1(results, name, results) : results; }); function getIsFieldsDifferent(referenceArray, differenceArray) { var isMatch = false; if (!isArray$4(referenceArray) || !isArray$4(differenceArray) || referenceArray.length !== differenceArray.length) { return true; } for (var i = 0; i < referenceArray.length; i++) { if (isMatch) { break; } var dataA = referenceArray[i]; var dataB = differenceArray[i]; if (isUndefined(dataB) || keys$3(dataA).length !== keys$3(dataB).length) { isMatch = true; break; } for (var key in dataA) { if (dataA[key] !== dataB[key]) { isMatch = true; break; } } } return isMatch; } var $some = arrayIteration.some; var STRICT_METHOD$4 = arrayMethodIsStrict('some'); var USES_TO_LENGTH$9 = arrayMethodUsesToLength('some'); // `Array.prototype.some` method // https://tc39.github.io/ecma262/#sec-array.prototype.some _export({ target: 'Array', proto: true, forced: !STRICT_METHOD$4 || !USES_TO_LENGTH$9 }, { some: function some(callbackfn /* , thisArg */) { return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); var some = entryVirtual('Array').some; var ArrayPrototype$c = Array.prototype; var some_1 = function (it) { var own = it.some; return it === ArrayPrototype$c || (it instanceof Array && own === ArrayPrototype$c.some) ? some : own; }; var some$1 = some_1; var some$2 = some$1; var isMatchFieldArrayName = function (name, searchName) { return RegExp(("^" + searchName + "[\\d+]").replace(/\[/g, '\\[').replace(/\]/g, '\\]')).test(name); }; var isNameInFieldArray = (function (names, name) { var _context; return some$2(_context = __spread(names)).call(_context, function (current) { return isMatchFieldArrayName(name, current); }); }); var isSelectInput = (function (element) { return element.type === SELECT + "-one"; }); function onDomRemove(element, onDetachCallback) { var observer = new MutationObserver(function () { if (isDetached(element)) { observer.disconnect(); onDetachCallback(); } }); observer.observe(window.document, { childList: true, subtree: true }); return observer; } var modeChecker = (function (mode) { return { isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit, isOnBlur: mode === VALIDATION_MODE.onBlur, isOnChange: mode === VALIDATION_MODE.onChange }; }); var isRadioOrCheckboxFunction = (function (ref) { return isRadioInput(ref) || isCheckBoxInput(ref); }); function useForm(_a) { var _this = this; var _b = _a === void 0 ? {} : _a, _c = _b.mode, mode = _c === void 0 ? VALIDATION_MODE.onSubmit : _c, _d = _b.reValidateMode, reValidateMode = _d === void 0 ? VALIDATION_MODE.onChange : _d, validationSchema = _b.validationSchema, validationResolver = _b.validationResolver, validationContext = _b.validationContext, _e = _b.defaultValues, defaultValues = _e === void 0 ? {} : _e, _f = _b.submitFocusError, submitFocusError = _f === void 0 ? true : _f, validateCriteriaMode = _b.validateCriteriaMode; var fieldsRef = React.useRef({}); var errorsRef = React.useRef({}); var touchedFieldsRef = React.useRef({}); var fieldArrayDefaultValues = React.useRef({}); var watchFieldsRef = React.useRef(new set$4()); var dirtyFieldsRef = React.useRef(new set$4()); var fieldsWithValidationRef = React.useRef(new set$4()); var validFieldsRef = React.useRef(new set$4()); var isValidRef = React.useRef(true); var defaultValuesRef = React.useRef(defaultValues); var defaultValuesAtRenderRef = React.useRef({}); var isUnMount = React.useRef(false); var isWatchAllRef = React.useRef(false); var isSubmittedRef = React.useRef(false); var isDirtyRef = React.useRef(false); var submitCountRef = React.useRef(0); var isSubmittingRef = React.useRef(false); var handleChangeRef = React.useRef(); var resetFieldArrayFunctionRef = React.useRef({}); var validationContextRef = React.useRef(validationContext); var fieldArrayNamesRef = React.useRef(new set$4()); var _g = __read(React.useState(), 2), render = _g[1]; var _h = React.useRef(modeChecker(mode)).current, isOnBlur = _h.isOnBlur, isOnSubmit = _h.isOnSubmit, isOnChange = _h.isOnChange; var validateAllFieldCriteria = validateCriteriaMode === 'all'; var isWindowUndefined = typeof window === UNDEFINED; var shouldValidateSchemaOrResolver = !!(validationSchema || validationResolver); var isWeb = typeof document !== UNDEFINED && !isWindowUndefined && !isUndefined(window.HTMLElement); var isProxyEnabled = isWeb ? 'Proxy' in window : typeof Proxy !== UNDEFINED; var readFormStateRef = React.useRef({ dirty: !isProxyEnabled, dirtyFields: !isProxyEnabled, isSubmitted: isOnSubmit, submitCount: !isProxyEnabled, touched: !isProxyEnabled, isSubmitting: !isProxyEnabled, isValid: !isProxyEnabled }); var _j = React.useRef(modeChecker(reValidateMode)).current, isReValidateOnBlur = _j.isOnBlur, isReValidateOnSubmit = _j.isOnSubmit; validationContextRef.current = validationContext; var reRender = React.useCallback(function () { if (!isUnMount.current) { render({}); } }, []); var shouldRenderBaseOnError = React.useCallback(function (name, error, shouldRender) { if (shouldRender === void 0) { shouldRender = false; } var shouldReRender = shouldRender || shouldRenderBasedOnError({ errors: errorsRef.current, error: error, name: name, validFields: validFieldsRef.current, fieldsWithValidation: fieldsWithValidationRef.current }); if (isEmptyObject(error)) { if (fieldsWithValidationRef.current.has(name) || shouldValidateSchemaOrResolver) { validFieldsRef.current.add(name); shouldReRender = shouldReRender || get$1(errorsRef.current, name); } errorsRef.current = unset(errorsRef.current, [name]); } else { var previousError = get$1(errorsRef.current, name); validFieldsRef.current.delete(name); shouldReRender = shouldReRender || (previousError ? !isSameError(previousError, error[name]) : true); set$5(errorsRef.current, name, error[name]); } if (shouldReRender && !isNullOrUndefined(shouldRender)) { reRender(); return true; } }, [reRender, shouldValidateSchemaOrResolver]); var setFieldValue = React.useCallback(function (field, rawValue) { var ref = field.ref, options = field.options; var value = isWeb && isHTMLElement(ref) && isNullOrUndefined(rawValue) ? '' : rawValue; if (isRadioInput(ref) && options) { forEach$2(options).call(options, function (_a) { var radioRef = _a.ref; return radioRef.checked = radioRef.value === value; }); } else if (isFileInput(ref)) { if (isString(value)) { ref.value = value; } else { ref.files = value; } } else if (isMultipleSelect(ref)) { var _context; forEach$2(_context = __spread(ref.options)).call(_context, function (selectRef) { return selectRef.selected = includes$4(value).call(value, selectRef.value); }); } else if (isCheckBoxInput(ref) && options) { options.length > 1 ? forEach$2(options).call(options, function (_a) { var checkboxRef = _a.ref; return checkboxRef.checked = includes$4(value).call(value, checkboxRef.value); }) : options[0].ref.checked = !!value; } else { ref.value = value; } }, [isWeb]); var setDirty = React.useCallback(function (name) { if (!fieldsRef.current[name] || !readFormStateRef.current.dirty && !readFormStateRef.current.dirtyFields) { return false; } var isFieldDirty = defaultValuesAtRenderRef.current[name] !== getFieldValue(fieldsRef.current, fieldsRef.current[name].ref); var isFieldArray = isNameInFieldArray(fieldArrayNamesRef.current, name); var previousDirtyFieldsLength = dirtyFieldsRef.current.size; if (isFieldArray) { var fieldArrayName = getFieldArrayParentName(name); isFieldDirty = getIsFieldsDifferent(getFieldValueByName(fieldsRef.current, fieldArrayName), get$1(defaultValuesRef.current, fieldArrayName)); } var isDirtyChanged = (isFieldArray ? isDirtyRef.current : dirtyFieldsRef.current.has(name)) !== isFieldDirty; if (isFieldDirty) { dirtyFieldsRef.current.add(name); } else { dirtyFieldsRef.current.delete(name); } isDirtyRef.current = isFieldArray ? isFieldDirty : !!dirtyFieldsRef.current.size; return readFormStateRef.current.dirty ? isDirtyChanged : previousDirtyFieldsLength !== dirtyFieldsRef.current.size; }, []); var setInternalValues = React.useCallback(function (name, value, parentFieldName) { var isValueArray = isArray$4(value); for (var key in value) { var fieldName = "" + (parentFieldName || name) + (isValueArray ? "[" + key + "]" : "." + key); var field = fieldsRef.current[fieldName]; if (isObject$1(value[key])) { setInternalValues(name, value[key], fieldName); } if (field) { setFieldValue(field, value[key]); setDirty(fieldName); } } }, [setFieldValue, setDirty]); var setInternalValue = React.useCallback(function (name, value) { var field = fieldsRef.current[name]; if (field) { setFieldValue(field, value); var output = setDirty(name); if (isBoolean(output)) { return output; } } else if (!isPrimitive(value)) { setInternalValues(name, value); } }, [setDirty, setFieldValue, setInternalValues]); var executeValidation = React.useCallback(function (name, skipReRender) { return __awaiter(_this, void 0, void 0, function () { var field, error; return __generator(this, function (_a) { switch (_a.label) { case 0: field = fieldsRef.current[name]; if (!field) return [3 /*break*/ , 2]; return [4 /*yield*/ , validateField(fieldsRef, validateAllFieldCriteria, field)]; case 1: error = _a.sent(); shouldRenderBaseOnError(name, error, skipReRender ? null : false); return [2 /*return*/ , isEmptyObject(error)]; case 2: return [2 /*return*/ , false]; } }); }); }, [shouldRenderBaseOnError, validateAllFieldCriteria]); var executeSchemaOrResolverValidation = React.useCallback(function (payload) { return __awaiter(_this, void 0, void 0, function () { var errors, previousFormIsValid, error; var _a; return __generator(this, function (_b) { switch (_b.label) { case 0: return [4 /*yield*/ , validateWithSchema(validationSchema, validateAllFieldCriteria, getFieldValueByName(fieldsRef.current), validationResolver, validationContextRef.current)]; case 1: errors = _b.sent().errors; previousFormIsValid = isValidRef.current; isValidRef.current = isEmptyObject(errors); if (isArray$4(payload)) { forEach$2(payload).call(payload, function (name) { var error = get$1(errors, name); if (error) { set$5(errorsRef.current, name, error); } else { unset(errorsRef.current, [name]); } }); reRender(); } else { error = get$1(errors, payload); shouldRenderBaseOnError(payload, error ? (_a = {}, _a[payload] = error, _a) : {}, previousFormIsValid !== isValidRef.current); } return [2 /*return*/ , isEmptyObject(errorsRef.current)]; } }); }); }, [reRender, shouldRenderBaseOnError, validateAllFieldCriteria, validationResolver, validationSchema]); var triggerValidation = React.useCallback(function (payload) { return __awaiter(_this, void 0, void 0, function () { var fields, result; var _this = this; return __generator(this, function (_a) { switch (_a.label) { case 0: fields = payload || keys$3(fieldsRef.current); if (shouldValidateSchemaOrResolver) { return [2 /*return*/ , executeSchemaOrResolverValidation(fields)]; } if (!isArray$4(fields)) return [3 /*break*/ , 2]; return [4 /*yield*/ , promise$3.all(map$2(fields).call(fields, function (data) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/ , executeValidation(data, true)]; case 1: return [2 /*return*/ , _a.sent()]; } }); }); }))]; case 1: result = _a.sent(); reRender(); return [2 /*return*/ , every$2(result).call(result, Boolean)]; case 2: return [4 /*yield*/ , executeValidation(fields)]; case 3: return [2 /*return*/ , _a.sent()]; } }); }); }, [executeSchemaOrResolverValidation, executeValidation, reRender, shouldValidateSchemaOrResolver]); var isFieldWatched = function (name) { return isWatchAllRef.current || watchFieldsRef.current.has(name) || watchFieldsRef.current.has((name.match(/\w+/) || [])[0]); }; function setValue(names, valueOrShouldValidate, shouldValidate) { var _context2; var shouldRender = false; var isArrayValue = isArray$4(names); forEach$2(_context2 = isArrayValue ? names : [names]).call(_context2, function (name) { var isStringFieldName = isString(name); shouldRender = setInternalValue(isStringFieldName ? name : keys$3(name)[0], isStringFieldName ? valueOrShouldValidate : values$5(name)[0]) || isArrayValue ? true : isFieldWatched(name); }); if (shouldRender || isArrayValue) { reRender(); } if (shouldValidate || isArrayValue && valueOrShouldValidate) { triggerValidation(isArrayValue ? undefined : names); } } handleChangeRef.current = handleChangeRef.current ? handleChangeRef.current : function (_a) { var type = _a.type, target = _a.target; return __awaiter(_this, void 0, void 0, function () { var name, fields, errors, field, currentError, error, isBlurEvent, shouldSkipValidation, shouldUpdateDirty, shouldRender, errors_1, previousFormIsValid; var _b; return __generator(this, function (_c) { switch (_c.label) { case 0: name = target ? target.name : ''; fields = fieldsRef.current; errors = errorsRef.current; field = fields[name]; currentError = get$1(errors, name); if (!field) { return [2 /*return*/ ]; } isBlurEvent = type === EVENTS.BLUR; shouldSkipValidation = skipValidation({ hasError: !!currentError, isOnChange: isOnChange, isBlurEvent: isBlurEvent, isOnSubmit: isOnSubmit, isReValidateOnSubmit: isReValidateOnSubmit, isOnBlur: isOnBlur, isReValidateOnBlur: isReValidateOnBlur, isSubmitted: isSubmittedRef.current }); shouldUpdateDirty = setDirty(name); shouldRender = isFieldWatched(name) || shouldUpdateDirty; if (isBlurEvent && !get$1(touchedFieldsRef.current, name) && readFormStateRef.current.touched) { set$5(touchedFieldsRef.current, name, true); shouldRender = true; } if (shouldSkipValidation) { return [2 /*return*/ , shouldRender && reRender()]; } if (!shouldValidateSchemaOrResolver) return [3 /*break*/ , 2]; return [4 /*yield*/ , validateWithSchema(validationSchema, validateAllFieldCriteria, getFieldValueByName(fields), validationResolver, validationContextRef.current)]; case 1: errors_1 = _c.sent().errors; previousFormIsValid = isValidRef.current; isValidRef.current = isEmptyObject(errors_1); error = get$1(errors_1, name) ? (_b = {}, _b[name] = get$1(errors_1, name), _b) : {}; if (previousFormIsValid !== isValidRef.current) { shouldRender = true; } return [3 /*break*/ , 4]; case 2: return [4 /*yield*/ , validateField(fieldsRef, validateAllFieldCriteria, field)]; case 3: error = _c.sent(); _c.label = 4; case 4: if (!shouldRenderBaseOnError(name, error) && shouldRender) { reRender(); } return [2 /*return*/ ]; } }); }); }; var validateSchemaOrResolver = React.useCallback(function (values) { if (values === void 0) { values = {}; } var fieldValues = isEmptyObject(defaultValuesRef.current) ? getFieldsValues(fieldsRef.current) : defaultValuesRef.current; validateWithSchema(validationSchema, validateAllFieldCriteria, transformToNestObject(__assign(__assign({}, fieldValues), values)), validationResolver, validationContextRef.current).then(function (_a) { var errors = _a.errors; var previousFormIsValid = isValidRef.current; isValidRef.current = isEmptyObject(errors); if (previousFormIsValid !== isValidRef.current) { reRender(); } }); }, // eslint-disable-next-line react-hooks/exhaustive-deps [reRender, validateAllFieldCriteria, validationResolver]); var removeFieldEventListener = React.useCallback(function (field, forceDelete) { if (handleChangeRef.current && field) { findRemovedFieldAndRemoveListener(fieldsRef.current, handleChangeRef.current, field, forceDelete); } }, []); var removeFieldEventListenerAndRef = React.useCallback(function (field, forceDelete) { var _context3; if (!field || field && isNameInFieldArray(fieldArrayNamesRef.current, field.ref.name) && !forceDelete) { return; } removeFieldEventListener(field, forceDelete); var name = field.ref.name; errorsRef.current = unset(errorsRef.current, [name]); touchedFieldsRef.current = unset(touchedFieldsRef.current, [name]); defaultValuesAtRenderRef.current = unset(defaultValuesAtRenderRef.current, [name]); forEach$2(_context3 = [dirtyFieldsRef, fieldsWithValidationRef, validFieldsRef, watchFieldsRef]).call(_context3, function (data) { return data.current.delete(name); }); if (readFormStateRef.current.isValid || readFormStateRef.current.touched) { reRender(); if (shouldValidateSchemaOrResolver) { validateSchemaOrResolver(); } } }, [reRender, shouldValidateSchemaOrResolver, validateSchemaOrResolver, removeFieldEventListener]); function clearError(name) { if (name) { unset(errorsRef.current, isArray$4(name) ? name : [name]); } else { errorsRef.current = {}; } reRender(); } var setInternalError = function (_a) { var name = _a.name, type = _a.type, types = _a.types, message = _a.message, shouldRender = _a.shouldRender; var field = fieldsRef.current[name]; if (!isSameError(get$1(errorsRef.current, name), { type: type, message: message, types: types })) { set$5(errorsRef.current, name, { type: type, types: types, message: message, ref: field ? field.ref : {}, isManual: true }); if (shouldRender) { reRender(); } } }; function setError(name, type, message) { if (type === void 0) { type = ''; } if (isString(name)) { setInternalError(__assign(__assign({ name: name }, isObject$1(type) ? { types: type, type: '' } : { type: type, message: message }), { shouldRender: true })); } else if (isArray$4(name)) { forEach$2(name).call(name, function (error) { return setInternalError(__assign({}, error)); }); reRender(); } } function watch(fieldNames, defaultValue) { var watchFields = watchFieldsRef.current; var isDefaultValueUndefined = isUndefined(defaultValue); var combinedDefaultValues = isDefaultValueUndefined ? defaultValuesRef.current : defaultValue; var fieldValues = getFieldsValues(fieldsRef.current, fieldNames); if (isString(fieldNames)) { return assignWatchFields(fieldValues, fieldNames, watchFields, isDefaultValueUndefined ? get$1(combinedDefaultValues, fieldNames) : defaultValue, true); } if (isArray$4(fieldNames)) { return reduce$2(fieldNames).call(fieldNames, function (previous, name) { var _a; return __assign(__assign({}, previous), (_a = {}, _a[name] = assignWatchFields(fieldValues, name, watchFields, combinedDefaultValues), _a)); }, {}); } isWatchAllRef.current = true; var result = !isEmptyObject(fieldValues) && fieldValues || combinedDefaultValues; return fieldNames && fieldNames.nest ? transformToNestObject(result) : result; } function unregister(name) { if (fieldsRef.current) { var _context4; forEach$2(_context4 = isArray$4(name) ? name : [name]).call(_context4, function (fieldName) { return removeFieldEventListenerAndRef(fieldsRef.current[fieldName], true); }); } } function registerFieldsRef(ref, validateOptions) { var _context5, _context6; if (validateOptions === void 0) { validateOptions = {}; } if (!ref.name) { // eslint-disable-next-line no-console return console.warn('Missing name @', ref); } var name = ref.name, type = ref.type, value = ref.value; var fieldRefAndValidationOptions = __assign({ ref: ref }, validateOptions); var fields = fieldsRef.current; var isRadioOrCheckbox = isRadioOrCheckboxFunction(ref); var field = fields[name]; var isEmptyDefaultValue = true; var isFieldArray; var defaultValue; if (isRadioOrCheckbox ? field && isArray$4(field.options) && find$2(_context5 = filter$2(_context6 = field.options).call(_context6, Boolean)).call(_context5, function (option) { return value === option.ref.value && option.ref === ref; }) : field && ref === field.ref) { fields[name] = __assign(__assign({}, field), validateOptions); return; } if (type) { var mutationWatcher = onDomRemove(ref, function () { return removeFieldEventListenerAndRef(field); }); field = isRadioOrCheckbox ? __assign({ options: __spread(field && field.options || [], [{ ref: ref, mutationWatcher: mutationWatcher }]), ref: { type: type, name: name } }, validateOptions) : __assign(__assign({}, fieldRefAndValidationOptions), { mutationWatcher: mutationWatcher }); } else { field = fieldRefAndValidationOptions; } fields[name] = field; if (!isEmptyObject(defaultValuesRef.current)) { defaultValue = get$1(defaultValuesRef.current, name); isEmptyDefaultValue = isUndefined(defaultValue); isFieldArray = isNameInFieldArray(fieldArrayNamesRef.current, name); if (!isEmptyDefaultValue && !isFieldArray) { setFieldValue(field, defaultValue); } } if (shouldValidateSchemaOrResolver && !isFieldArray && readFormStateRef.current.isValid) { validateSchemaOrResolver(); } else if (!isEmptyObject(validateOptions)) { fieldsWithValidationRef.current.add(name); if (!isOnSubmit && readFormStateRef.current.isValid) { validateField(fieldsRef, validateAllFieldCriteria, field).then(function (error) { var previousFormIsValid = isValidRef.current; isEmptyObject(error) ? validFieldsRef.current.add(name) : isValidRef.current = false; if (previousFormIsValid !== isValidRef.current) { reRender(); } }); } } if (!defaultValuesAtRenderRef.current[name] && !(isFieldArray && isEmptyDefaultValue)) { defaultValuesAtRenderRef.current[name] = isEmptyDefaultValue ? getFieldValue(fields, field.ref) : defaultValue; } if (type) { attachEventListeners({ field: isRadioOrCheckbox && field.options ? field.options[field.options.length - 1] : field, isRadioOrCheckbox: isRadioOrCheckbox || isSelectInput(ref), handleChange: handleChangeRef.current }); } } function register(refOrValidationOptions, validationOptions) { if (isWindowUndefined) { return; } if (isString(refOrValidationOptions)) { registerFieldsRef({ name: refOrValidationOptions }, validationOptions); return; } if (isObject$1(refOrValidationOptions) && 'name' in refOrValidationOptions) { registerFieldsRef(refOrValidationOptions, validationOptions); return; } return function (ref) { return ref && registerFieldsRef(ref, refOrValidationOptions); }; } var handleSubmit = React.useCallback(function (callback) { return function (e) { return __awaiter(_this, void 0, void 0, function () { var fieldErrors, fields, fieldValues, _a, errors, values, _b, _c, field, name_1, fieldError, e_1_1; var e_1, _d; return __generator(this, function (_e) { switch (_e.label) { case 0: if (e) { e.preventDefault(); e.persist(); } fieldErrors = {}; fields = fieldsRef.current; fieldValues = getFieldsValues(fields); if (readFormStateRef.current.isSubmitting) { isSubmittingRef.current = true; reRender(); } _e.label = 1; case 1: _e.trys.push([1,, 14, 15]); if (!shouldValidateSchemaOrResolver) return [3 /*break*/ , 3]; return [4 /*yield*/ , validateWithSchema(validationSchema, validateAllFieldCriteria, transformToNestObject(fieldValues), validationResolver, validationContextRef.current)]; case 2: _a = _e.sent(), errors = _a.errors, values = values$2(_a); errorsRef.current = errors; fieldErrors = errors; fieldValues = values; return [3 /*break*/ , 10]; case 3: _e.trys.push([3, 8, 9, 10]); _b = __values(values$5(fields)), _c = _b.next(); _e.label = 4; case 4: if (!!_c.done) return [3 /*break*/ , 7]; field = _c.value; if (!field) return [3 /*break*/ , 6]; name_1 = field.ref.name; return [4 /*yield*/ , validateField(fieldsRef, validateAllFieldCriteria, field)]; case 5: fieldError = _e.sent(); if (fieldError[name_1]) { set$5(fieldErrors, name_1, fieldError[name_1]); validFieldsRef.current.delete(name_1); } else { if (fieldsWithValidationRef.current.has(name_1)) { validFieldsRef.current.add(name_1); } } _e.label = 6; case 6: _c = _b.next(); return [3 /*break*/ , 4]; case 7: return [3 /*break*/ , 10]; case 8: e_1_1 = _e.sent(); e_1 = { error: e_1_1 }; return [3 /*break*/ , 10]; case 9: try { if (_c && !_c.done && (_d = _b.return)) _d.call(_b); } finally { if (e_1) throw e_1.error; } return [7 /*endfinally*/ ]; case 10: if (!isEmptyObject(fieldErrors)) return [3 /*break*/ , 12]; errorsRef.current = {}; reRender(); return [4 /*yield*/ , callback(transformToNestObject(fieldValues), e)]; case 11: _e.sent(); return [3 /*break*/ , 13]; case 12: errorsRef.current = fieldErrors; if (submitFocusError && isWeb) { focusOnErrorField(fields, fieldErrors); } _e.label = 13; case 13: return [3 /*break*/ , 15]; case 14: isSubmittedRef.current = true; isSubmittingRef.current = false; submitCountRef.current = submitCountRef.current + 1; reRender(); return [7 /*endfinally*/ ]; case 15: return [2 /*return*/ ]; } }); }); }; }, [isWeb, reRender, shouldValidateSchemaOrResolver, submitFocusError, validateAllFieldCriteria, validationResolver, validationSchema]); var resetRefs = function (_a) { var errors = _a.errors, dirty = _a.dirty, isSubmitted = _a.isSubmitted, touched = _a.touched, isValid = _a.isValid, submitCount = _a.submitCount, dirtyFields = _a.dirtyFields; fieldsRef.current = {}; if (!errors) { errorsRef.current = {}; } if (!touched) { touchedFieldsRef.current = {}; } if (!isValid) { validFieldsRef.current = new set$4(); fieldsWithValidationRef.current = new set$4(); isValidRef.current = true; } if (!dirty) { isDirtyRef.current = false; } if (!dirtyFields) { dirtyFieldsRef.current = new set$4(); } if (!isSubmitted) { isSubmittedRef.current = false; } if (!submitCount) { submitCountRef.current = 0; } defaultValuesAtRenderRef.current = {}; fieldArrayDefaultValues.current = {}; watchFieldsRef.current = new set$4(); isWatchAllRef.current = false; }; var reset = function (values, omitResetState) { var _context7; var e_2, _a; if (omitResetState === void 0) { omitResetState = {}; } if (isWeb) { try { for (var _b = __values(values$5(fieldsRef.current)), _c = _b.next(); !_c.done; _c = _b.next()) { var field = _c.value; if (field) { var ref = field.ref, options = field.options; var inputRef = isRadioOrCheckboxFunction(ref) && isArray$4(options) ? options[0].ref : ref; if (isHTMLElement(inputRef)) { try { inputRef.closest('form').reset(); break; } catch (_d) {} } } } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_2) throw e_2.error; } } } if (values) { defaultValuesRef.current = values; } forEach$2(_context7 = values$5(resetFieldArrayFunctionRef.current)).call(_context7, function (resetFieldArray) { return isFunction(resetFieldArray) && resetFieldArray(); }); resetRefs(omitResetState); reRender(); }; function getValues(payload) { if (isString(payload)) { return fieldsRef.current[payload] ? getFieldValue(fieldsRef.current, fieldsRef.current[payload].ref) : get$1(defaultValuesRef.current, payload); } var fieldValues = getFieldsValues(fieldsRef.current); var outputValues = isEmptyObject(fieldValues) ? defaultValuesRef.current : fieldValues; return payload && payload.nest ? transformToNestObject(outputValues) : outputValues; } React.useEffect(function () { return function () { var _context8; isUnMount.current = true; fieldsRef.current && process.env.NODE_ENV === 'production' && forEach$2(_context8 = values$5(fieldsRef.current)).call(_context8, function (field) { return removeFieldEventListenerAndRef(field, true); }); }; }, [removeFieldEventListenerAndRef]); if (!shouldValidateSchemaOrResolver) { isValidRef.current = validFieldsRef.current.size >= fieldsWithValidationRef.current.size && isEmptyObject(errorsRef.current); } var formState = { dirty: isDirtyRef.current, dirtyFields: dirtyFieldsRef.current, isSubmitted: isSubmittedRef.current, submitCount: submitCountRef.current, touched: touchedFieldsRef.current, isSubmitting: isSubmittingRef.current, isValid: isOnSubmit ? isSubmittedRef.current && isEmptyObject(errorsRef.current) : isValidRef.current }; var commonProps = { triggerValidation: triggerValidation, setValue: React.useCallback(setValue, [reRender, setInternalValue, triggerValidation]), register: React.useCallback(register, [defaultValuesRef.current, defaultValuesAtRenderRef.current]), unregister: React.useCallback(unregister, []), getValues: React.useCallback(getValues, []), formState: isProxyEnabled ? new Proxy(formState, { get: function (obj, prop) { if (prop in obj) { readFormStateRef.current[prop] = true; return obj[prop]; } return undefined; } }) : formState }; var control = __assign(__assign(__assign({ removeFieldEventListener: removeFieldEventListener, reRender: reRender }, shouldValidateSchemaOrResolver ? { validateSchemaIsValid: validateSchemaOrResolver } : {}), { mode: { isOnBlur: isOnBlur, isOnSubmit: isOnSubmit, isOnChange: isOnChange }, reValidateMode: { isReValidateOnBlur: isReValidateOnBlur, isReValidateOnSubmit: isReValidateOnSubmit }, errorsRef: errorsRef, touchedFieldsRef: touchedFieldsRef, fieldsRef: fieldsRef, isWatchAllRef: isWatchAllRef, watchFieldsRef: watchFieldsRef, resetFieldArrayFunctionRef: resetFieldArrayFunctionRef, fieldArrayDefaultValues: fieldArrayDefaultValues, validFieldsRef: validFieldsRef, dirtyFieldsRef: dirtyFieldsRef, fieldsWithValidationRef: fieldsWithValidationRef, fieldArrayNamesRef: fieldArrayNamesRef, isDirtyRef: isDirtyRef, readFormStateRef: readFormStateRef, defaultValuesRef: defaultValuesRef }), commonProps); return __assign({ watch: watch, control: control, handleSubmit: handleSubmit, reset: React.useCallback(reset, []), clearError: React.useCallback(clearError, []), setError: React.useCallback(setError, []), errors: errorsRef.current }, commonProps); } var test$1 = []; var nativeSort = test$1.sort; // IE8- var FAILS_ON_UNDEFINED = fails(function () { test$1.sort(undefined); }); // V8 bug var FAILS_ON_NULL = fails(function () { test$1.sort(null); }); // Old WebKit var STRICT_METHOD$5 = arrayMethodIsStrict('sort'); var FORCED$2 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$5; // `Array.prototype.sort` method // https://tc39.github.io/ecma262/#sec-array.prototype.sort _export({ target: 'Array', proto: true, forced: FORCED$2 }, { sort: function sort(comparefn) { return comparefn === undefined ? nativeSort.call(toObject(this)) : nativeSort.call(toObject(this), aFunction(comparefn)); } }); var sort = entryVirtual('Array').sort; var ArrayPrototype$d = Array.prototype; var sort_1 = function (it) { var own = it.sort; return it === ArrayPrototype$d || (it instanceof Array && own === ArrayPrototype$d.sort) ? sort : own; }; var sort$1 = sort_1; var sort$2 = sort$1; var FormGlobalContext = React.createContext(null); function useFormContext() { return React.useContext(FormGlobalContext); } function FormContext(_a) { var children = _a.children, formState = _a.formState, errors = _a.errors, restMethods = __rest(_a, ["children", "formState", "errors"]); return React.createElement(FormGlobalContext.Provider, { value: __assign(__assign({}, restMethods), { formState: formState, errors: errors }) }, children); } // `Date.now` method // https://tc39.github.io/ecma262/#sec-date.now _export({ target: 'Date', stat: true }, { now: function now() { return new Date().getTime(); } }); var now = path.Date.now; var now$1 = now; var now$2 = now$1; var generateId = (function () { var d = typeof performance === UNDEFINED ? now$2() : performance.now() * 1000; return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = (Math.random() * 16 + d) % 16 | 0; return (c == 'x' ? r : r & 0x3 | 0x8).toString(16); }); }); var appendId = function (value, keyName) { var _a; return __assign((_a = {}, _a[keyName] = generateId(), _a), isObject$1(value) ? value : { value: value }); }; var mapIds = function (data, keyName) { var _context; return map$2(_context = isArray$4(data) ? data : []).call(_context, function (value) { return appendId(value, keyName); }); }; var getSortRemovedItems = (function (indexes, removeIndexes, updatedIndexes, count, notFoundIndexes) { var e_1, _a, e_2, _b; if (updatedIndexes === void 0) { updatedIndexes = []; } if (count === void 0) { count = 0; } if (notFoundIndexes === void 0) { notFoundIndexes = []; } try { for (var removeIndexes_1 = __values(removeIndexes), removeIndexes_1_1 = removeIndexes_1.next(); !removeIndexes_1_1.done; removeIndexes_1_1 = removeIndexes_1.next()) { var removeIndex = removeIndexes_1_1.value; if (indexOf$3(indexes).call(indexes, removeIndex) < 0) { notFoundIndexes.push(removeIndex); } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (removeIndexes_1_1 && !removeIndexes_1_1.done && (_a = removeIndexes_1.return)) _a.call(removeIndexes_1); } finally { if (e_1) throw e_1.error; } } var _loop_1 = function (index) { if (indexOf$3(removeIndexes).call(removeIndexes, index) > -1) { updatedIndexes.push(-1); count++; } else { var _context; updatedIndexes.push(index - count - (notFoundIndexes.length ? filter$2(_context = map$2(notFoundIndexes).call(notFoundIndexes, function (notFoundIndex) { return notFoundIndex < index; })).call(_context, Boolean).length : 0)); } }; try { for (var _c = __values(sort$2(indexes).call(indexes)), _d = _c.next(); !_d.done; _d = _c.next()) { var index = _d.value; _loop_1(index); } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_d && !_d.done && (_b = _c.return)) _b.call(_c); } finally { if (e_2) throw e_2.error; } } return updatedIndexes; }); var removeAt = function (data, index) { return __spread(slice$2(data).call(data, 0, index), slice$2(data).call(data, index + 1)); }; function removeAtIndexes(data, index) { var k = -1; while (++k < data.length) { if (indexOf$3(index).call(index, k) >= 0) { delete data[k]; } } return filter$2(data).call(data, Boolean); } var removeArrayAt = (function (data, index) { return isUndefined(index) ? [] : isArray$4(index) ? removeAtIndexes(data, index) : removeAt(data, index); }); var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('splice'); var USES_TO_LENGTH$a = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 }); var max$2 = Math.max; var min$3 = Math.min; var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; // `Array.prototype.splice` method // https://tc39.github.io/ecma262/#sec-array.prototype.splice // with adding support of @@species _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 || !USES_TO_LENGTH$a }, { splice: function splice(start, deleteCount /* , ...items */) { var O = toObject(this); var len = toLength(O.length); var actualStart = toAbsoluteIndex(start, len); var argumentsLength = arguments.length; var insertCount, actualDeleteCount, A, k, from, to; if (argumentsLength === 0) { insertCount = actualDeleteCount = 0; } else if (argumentsLength === 1) { insertCount = 0; actualDeleteCount = len - actualStart; } else { insertCount = argumentsLength - 2; actualDeleteCount = min$3(max$2(toInteger(deleteCount), 0), len - actualStart); } if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) { throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); } A = arraySpeciesCreate(O, actualDeleteCount); for (k = 0; k < actualDeleteCount; k++) { from = actualStart + k; if (from in O) createProperty(A, k, O[from]); } A.length = actualDeleteCount; if (insertCount < actualDeleteCount) { for (k = actualStart; k < len - actualDeleteCount; k++) { from = k + actualDeleteCount; to = k + insertCount; if (from in O) O[to] = O[from]; else delete O[to]; } for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1]; } else if (insertCount > actualDeleteCount) { for (k = len - actualDeleteCount; k > actualStart; k--) { from = k + actualDeleteCount - 1; to = k + insertCount - 1; if (from in O) O[to] = O[from]; else delete O[to]; } } for (k = 0; k < insertCount; k++) { O[k + actualStart] = arguments[k + 2]; } O.length = len - actualDeleteCount + insertCount; return A; } }); var splice = entryVirtual('Array').splice; var ArrayPrototype$e = Array.prototype; var splice_1 = function (it) { var own = it.splice; return it === ArrayPrototype$e || (it instanceof Array && own === ArrayPrototype$e.splice) ? splice : own; }; var splice$1 = splice_1; var splice$2 = splice$1; var moveArrayAt = (function (data, from, to) { return isArray$4(data) ? splice$2(data).call(data, to, 0, splice$2(data).call(data, from, 1)[0]) : []; }); var swapArrayAt = (function (data, indexA, indexB) { var temp = [data[indexB], data[indexA]]; data[indexA] = temp[0]; data[indexB] = temp[1]; }); function prepend(data, value) { return __spread(isArray$4(value) ? value : [value || null], data); } function insert(data, index, value) { return __spread(slice$2(data).call(data, 0, index), isArray$4(value) ? value : [value || null], slice$2(data).call(data, index)); } // `Array.prototype.fill` method implementation // https://tc39.github.io/ecma262/#sec-array.prototype.fill var arrayFill = function fill(value /* , start = 0, end = @length */) { var O = toObject(this); var length = toLength(O.length); var argumentsLength = arguments.length; var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length); var end = argumentsLength > 2 ? arguments[2] : undefined; var endPos = end === undefined ? length : toAbsoluteIndex(end, length); while (endPos > index) O[index++] = value; return O; }; // `Array.prototype.fill` method // https://tc39.github.io/ecma262/#sec-array.prototype.fill _export({ target: 'Array', proto: true }, { fill: arrayFill }); var fill = entryVirtual('Array').fill; var ArrayPrototype$f = Array.prototype; var fill_1 = function (it) { var own = it.fill; return it === ArrayPrototype$f || (it instanceof Array && own === ArrayPrototype$f.fill) ? fill : own; }; var fill$1 = fill_1; var fill$2 = fill$1; var fillEmptyArray = (function (value) { var _context; return isArray$4(value) ? fill$2(_context = Array(value.length)).call(_context, null) : null; }); var useFieldArray = function (_a) { var control = _a.control, name = _a.name, _b = _a.keyName, keyName = _b === void 0 ? 'id' : _b; var methods = useFormContext(); var _c = control || methods.control, isWatchAllRef = _c.isWatchAllRef, resetFieldArrayFunctionRef = _c.resetFieldArrayFunctionRef, fieldArrayNamesRef = _c.fieldArrayNamesRef, reRender = _c.reRender, fieldsRef = _c.fieldsRef, getValues = _c.getValues, defaultValuesRef = _c.defaultValuesRef, removeFieldEventListener = _c.removeFieldEventListener, errorsRef = _c.errorsRef, dirtyFieldsRef = _c.dirtyFieldsRef, isDirtyRef = _c.isDirtyRef, touchedFieldsRef = _c.touchedFieldsRef, readFormStateRef = _c.readFormStateRef, watchFieldsRef = _c.watchFieldsRef, validFieldsRef = _c.validFieldsRef, fieldsWithValidationRef = _c.fieldsWithValidationRef, fieldArrayDefaultValues = _c.fieldArrayDefaultValues, validateSchemaIsValid = _c.validateSchemaIsValid; var getDefaultValues = function () { return __spread(get$1(fieldArrayDefaultValues.current[getFieldArrayParentName(name)] ? fieldArrayDefaultValues.current : defaultValuesRef.current, name, [])); }; var memoizedDefaultValues = React.useRef(getDefaultValues()); var _d = __read(React.useState(mapIds(memoizedDefaultValues.current, keyName)), 2), fields = _d[0], setField = _d[1]; var _e = __read(React.useState(false), 2), isDeleted = _e[0], setIsDeleted = _e[1]; var allFields = React.useRef(fields); var isNameKey = isKey(name); allFields.current = fields; if (isNameKey) { fieldArrayDefaultValues.current[name] = memoizedDefaultValues.current; } var appendValueWithKey = function (values) { return map$2(values).call(values, function (value) { return appendId(value, keyName); }); }; var setFieldAndValidState = function (fieldsValues) { var _a; setField(fieldsValues); if (readFormStateRef.current.isValid && validateSchemaIsValid) { validateSchemaIsValid((_a = {}, _a[name] = fieldsValues, _a)); } }; var modifyDirtyFields = function (_a) { var e_1, _b; var _c = _a === void 0 ? {} : _a, shouldRender = _c.shouldRender, isRemove = _c.isRemove, isPrePend = _c.isPrePend, index = _c.index, _d = _c.value, value = _d === void 0 ? {} : _d; var render = shouldRender; var values = isArray$4(value) ? value : [value]; if (readFormStateRef.current.dirty) { var dirtyFieldIndexesAndValues = {}; if (isPrePend || isRemove) { try { for (var _e = __values(sort$2(_context = __spread(dirtyFieldsRef.current)).call(_context)), _f = _e.next(); !_f.done; _f = _e.next()) { var _context; var dirtyField = _f.value; if (isMatchFieldArrayName(dirtyField, name)) { var matchedIndexes = dirtyField.match(REGEX_ARRAY_FIELD_INDEX); if (matchedIndexes) { var matchIndex = +matchedIndexes[matchedIndexes.length - 1]; if (dirtyFieldIndexesAndValues[matchIndex]) { dirtyFieldIndexesAndValues[matchIndex].push(dirtyField); } else { dirtyFieldIndexesAndValues[matchIndex] = [dirtyField]; } } dirtyFieldsRef.current.delete(dirtyField); } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_f && !_f.done && (_b = _e.return)) _b.call(_e); } finally { if (e_1) throw e_1.error; } } } if (!isUndefined(index) || isPrePend) { var _context2, _context3; var updatedDirtyFieldIndexes_1 = isUndefined(index) ? [] : getSortRemovedItems(map$2(_context2 = keys$3(dirtyFieldIndexesAndValues)).call(_context2, function (i) { return +i; }), isArray$4(index) ? index : [index]); forEach$2(_context3 = values$5(dirtyFieldIndexesAndValues)).call(_context3, function (values, index) { var e_2, _a; var updateIndex = isPrePend ? 0 : updatedDirtyFieldIndexes_1[index]; if (updateIndex > -1) { try { for (var values_1 = __values(values), values_1_1 = values_1.next(); !values_1_1.done; values_1_1 = values_1.next()) { var value_1 = values_1_1.value; var matchedIndexes = value_1.match(REGEX_ARRAY_FIELD_INDEX); if (matchedIndexes) { dirtyFieldsRef.current.add(value_1.replace(/[\d+]([^[\d+]+)$/, (isPrePend ? +matchedIndexes[matchedIndexes.length - 1] + values.length : updateIndex) + "$1")); } } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (values_1_1 && !values_1_1.done && (_a = values_1.return)) _a.call(values_1); } finally { if (e_2) throw e_2.error; } } } }); } if (!isRemove) { forEach$2(values).call(values, function (fieldValue, index) { var _context4; return forEach$2(_context4 = keys$3(fieldValue)).call(_context4, function (key) { return dirtyFieldsRef.current.add(name + "[" + (isPrePend ? index : allFields.current.length + index) + "]." + key); }); }); isDirtyRef.current = true; } render = true; } if (render && !isWatchAllRef.current) { reRender(); } }; var resetFields = function (flagOrFields) { if (readFormStateRef.current.dirty) { isDirtyRef.current = isUndefined(flagOrFields) ? true : getIsFieldsDifferent(flagOrFields, defaultValuesRef.current[name] || []); } for (var key in fieldsRef.current) { if (isMatchFieldArrayName(key, name) && fieldsRef.current[key]) { removeFieldEventListener(fieldsRef.current[key], true); } } }; var mapCurrentFieldsValueWithState = function () { var currentFieldsValue = get$1(getValues({ nest: true }), name); if (isArray$4(currentFieldsValue)) { for (var i = 0; i < currentFieldsValue.length; i++) { allFields.current[i] = __assign(__assign({}, allFields.current[i]), currentFieldsValue[i]); } } }; var append = function (value) { setFieldAndValidState(__spread(allFields.current, isArray$4(value) ? appendValueWithKey(value) : [appendId(value, keyName)])); modifyDirtyFields({ value: value }); }; var prepend$1 = function (value) { var shouldRender = false; resetFields(); setFieldAndValidState(prepend(allFields.current, isArray$4(value) ? appendValueWithKey(value) : [appendId(value, keyName)])); if (errorsRef.current[name]) { errorsRef.current[name] = prepend(errorsRef.current[name], fillEmptyArray(value)); } if (readFormStateRef.current.touched && touchedFieldsRef.current[name]) { touchedFieldsRef.current[name] = prepend(touchedFieldsRef.current[name], fillEmptyArray(value)); shouldRender = true; } modifyDirtyFields({ shouldRender: shouldRender, isPrePend: true, value: value }); }; var remove = function (index) { var shouldRender = false; var isIndexUndefined = isUndefined(index); if (!isIndexUndefined) { mapCurrentFieldsValueWithState(); } resetFields(removeArrayAt(getFieldValueByName(fieldsRef.current, name), index)); setFieldAndValidState(removeArrayAt(allFields.current, index)); setIsDeleted(true); if (errorsRef.current[name]) { var _context5; errorsRef.current[name] = removeArrayAt(errorsRef.current[name], index); if (!filter$2(_context5 = errorsRef.current[name]).call(_context5, Boolean).length) { delete errorsRef.current[name]; } } if (readFormStateRef.current.touched && touchedFieldsRef.current[name]) { touchedFieldsRef.current[name] = removeArrayAt(touchedFieldsRef.current[name], index); shouldRender = true; } if (readFormStateRef.current.isValid && !validateSchemaIsValid) { var fieldIndex = -1; var isFound = false; var isIndexUndefined_1 = isUndefined(index); while (fieldIndex++ < fields.length) { var _context6; var isLast = fieldIndex === fields.length - 1; var isCurrentIndex = indexOf$3(_context6 = isArray$4(index) ? index : [index]).call(_context6, fieldIndex) >= 0; if (isCurrentIndex || isIndexUndefined_1) { isFound = true; } if (!isFound) { continue; } for (var key in fields[fieldIndex]) { var currentFieldName = name + "[" + fieldIndex + "]." + key; if (isCurrentIndex || isLast || isIndexUndefined_1) { validFieldsRef.current.delete(currentFieldName); fieldsWithValidationRef.current.delete(currentFieldName); } else { var previousFieldName = name + "[" + (fieldIndex - 1) + "]." + key; if (validFieldsRef.current.has(currentFieldName)) { validFieldsRef.current.add(previousFieldName); } if (fieldsWithValidationRef.current.has(currentFieldName)) { fieldsWithValidationRef.current.add(previousFieldName); } } } } } modifyDirtyFields({ shouldRender: shouldRender, isRemove: true, index: index }); }; var insert$1 = function (index, value) { mapCurrentFieldsValueWithState(); resetFields(insert(getFieldValueByName(fieldsRef.current, name), index)); setFieldAndValidState(insert(allFields.current, index, isArray$4(value) ? appendValueWithKey(value) : [appendId(value, keyName)])); if (errorsRef.current[name]) { errorsRef.current[name] = insert(errorsRef.current[name], index, fillEmptyArray(value)); } if (readFormStateRef.current.touched && touchedFieldsRef.current[name]) { touchedFieldsRef.current[name] = insert(touchedFieldsRef.current[name], index, fillEmptyArray(value)); reRender(); } }; var swap = function (indexA, indexB) { mapCurrentFieldsValueWithState(); var fieldValues = getFieldValueByName(fieldsRef.current, name); swapArrayAt(fieldValues, indexA, indexB); resetFields(fieldValues); swapArrayAt(allFields.current, indexA, indexB); setFieldAndValidState(__spread(allFields.current)); if (errorsRef.current[name]) { swapArrayAt(errorsRef.current[name], indexA, indexB); } if (readFormStateRef.current.touched && touchedFieldsRef.current[name]) { swapArrayAt(touchedFieldsRef.current[name], indexA, indexB); reRender(); } }; var move = function (from, to) { mapCurrentFieldsValueWithState(); var fieldValues = getFieldValueByName(fieldsRef.current, name); moveArrayAt(fieldValues, from, to); resetFields(fieldValues); moveArrayAt(allFields.current, from, to); setFieldAndValidState(__spread(allFields.current)); if (errorsRef.current[name]) { moveArrayAt(errorsRef.current[name], from, to); } if (readFormStateRef.current.touched && touchedFieldsRef.current[name]) { moveArrayAt(touchedFieldsRef.current[name], from, to); reRender(); } }; var reset = function () { resetFields(); memoizedDefaultValues.current = getDefaultValues(); setField(mapIds(memoizedDefaultValues.current, keyName)); }; React.useEffect(function () { if (isNameKey && isDeleted && fieldArrayDefaultValues.current[name] && fields.length < fieldArrayDefaultValues.current[name].length) { fieldArrayDefaultValues.current[name].pop(); } }, [fields, name, fieldArrayDefaultValues, isDeleted, isNameKey]); React.useEffect(function () { var e_3, _a; if (isWatchAllRef && isWatchAllRef.current) { reRender(); } else if (watchFieldsRef) { try { for (var _b = __values(watchFieldsRef.current), _c = _b.next(); !_c.done; _c = _b.next()) { var watchField = _c.value; if (startsWith$2(watchField).call(watchField, name)) { reRender(); break; } } } catch (e_3_1) { e_3 = { error: e_3_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_3) throw e_3.error; } } } }, [fields, name, reRender, watchFieldsRef, isWatchAllRef]); React.useEffect(function () { var resetFunctions = resetFieldArrayFunctionRef.current; var fieldArrayNames = fieldArrayNamesRef.current; fieldArrayNames.add(name); resetFunctions[name] = reset; return function () { resetFields(); delete resetFunctions[name]; fieldArrayNames.delete(name); }; // eslint-disable-next-line react-hooks/exhaustive-deps }, []); return { swap: React.useCallback(swap, [name]), move: React.useCallback(move, [name]), prepend: React.useCallback(prepend$1, [name]), append: React.useCallback(append, [name]), remove: React.useCallback(remove, [fields, name]), insert: React.useCallback(insert$1, [name]), fields: fields }; }; // `Object.defineProperty` method // https://tc39.github.io/ecma262/#sec-object.defineproperty _export({ target: 'Object', stat: true, forced: !descriptors, sham: !descriptors }, { defineProperty: objectDefineProperty.f }); var defineProperty_1 = createCommonjsModule(function (module) { var Object = path.Object; var defineProperty = module.exports = function defineProperty(it, key, desc) { return Object.defineProperty(it, key, desc); }; if (Object.defineProperty.sham) defineProperty.sham = true; }); var defineProperty$4 = defineProperty_1; var defineProperty$5 = defineProperty$4; var getInputValue = (function (event, isCheckboxInput) { return isPrimitive(event) || !isObject$1(event.target) || isObject$1(event.target) && !event.type ? event : isCheckboxInput || isUndefined(event.target.value) ? event.target.checked : event.target.value; }); var Controller = function (_a) { var _b, _c, _d, _e; var name = _a.name, rules = _a.rules, InnerComponent = _a.as, onBlur = _a.onBlur, onChange = _a.onChange, _f = _a.onChangeName, onChangeName = _f === void 0 ? VALIDATION_MODE.onChange : _f, _g = _a.onBlurName, onBlurName = _g === void 0 ? VALIDATION_MODE.onBlur : _g, valueName = _a.valueName, defaultValue = _a.defaultValue, control = _a.control, onFocus = _a.onFocus, rest = __rest(_a, ["name", "rules", "as", "onBlur", "onChange", "onChangeName", "onBlurName", "valueName", "defaultValue", "control", "onFocus"]); var methods = useFormContext(); var _h = control || methods.control, defaultValuesRef = _h.defaultValuesRef, setValue = _h.setValue, register = _h.register, unregister = _h.unregister, errorsRef = _h.errorsRef, removeFieldEventListener = _h.removeFieldEventListener, triggerValidation = _h.triggerValidation, _j = _h.mode, isOnSubmit = _j.isOnSubmit, isOnBlur = _j.isOnBlur, isOnChange = _j.isOnChange, _k = _h.reValidateMode, isReValidateOnBlur = _k.isReValidateOnBlur, isReValidateOnSubmit = _k.isReValidateOnSubmit, isSubmitted = _h.formState.isSubmitted, touchedFieldsRef = _h.touchedFieldsRef, readFormStateRef = _h.readFormStateRef, reRender = _h.reRender, fieldsRef = _h.fieldsRef, fieldArrayNamesRef = _h.fieldArrayNamesRef; var _l = __read(React.useState(isUndefined(defaultValue) ? get$1(defaultValuesRef.current, name) : defaultValue), 2), value = _l[0], setInputStateValue = _l[1]; var valueRef = React.useRef(value); var isCheckboxInput = isBoolean(value); var shouldReValidateOnBlur = isOnBlur || isReValidateOnBlur; var rulesRef = React.useRef(rules); var onFocusRef = React.useRef(onFocus); var isNotFieldArray = !isNameInFieldArray(fieldArrayNamesRef.current, name); rulesRef.current = rules; var shouldValidate = function () { return !skipValidation({ hasError: !!get$1(errorsRef.current, name), isOnBlur: isOnBlur, isOnSubmit: isOnSubmit, isOnChange: isOnChange, isReValidateOnBlur: isReValidateOnBlur, isReValidateOnSubmit: isReValidateOnSubmit, isSubmitted: isSubmitted }); }; var commonTask = function (event) { var data = getInputValue(event, isCheckboxInput); setInputStateValue(data); valueRef.current = data; return data; }; var eventWrapper = function (event) { return function () { var arg = []; for (var _i = 0; _i < arguments.length; _i++) { arg[_i] = arguments[_i]; } return setValue(name, commonTask(event(arg)), shouldValidate()); }; }; var handleChange = function (event) { var data = commonTask(event); setValue(name, data, shouldValidate()); }; var registerField = React.useCallback(function () { if (!isNotFieldArray) { removeFieldEventListener(fieldsRef.current[name], true); } register(defineProperty$5({ name: name, focus: onFocusRef.current }, VALUE, { set: function (data) { setInputStateValue(data); valueRef.current = data; }, get: function () { return valueRef.current; } }), rulesRef.current); }, [isNotFieldArray, fieldsRef, rulesRef, name, onFocusRef, register, removeFieldEventListener]); React.useEffect(function () { return function () { !isNameInFieldArray(fieldArrayNamesRef.current, name) && unregister(name); }; }, [unregister, name, fieldArrayNamesRef]); React.useEffect(function () { registerField(); }, [registerField]); // eslint-disable-next-line react-hooks/exhaustive-deps React.useEffect(function () { if (!fieldsRef.current[name]) { registerField(); if (isNotFieldArray) { setInputStateValue(isUndefined(defaultValue) ? get$1(defaultValuesRef.current, name) : defaultValue); } } }); var props = __assign(__assign(__assign(__assign({ name: name }, rest), onChange ? (_b = {}, _b[onChangeName] = eventWrapper(onChange), _b) : (_c = {}, _c[onChangeName] = handleChange, _c)), (_d = {}, _d[onBlurName] = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (onBlur) { onBlur(args); } if (readFormStateRef.current.touched && !get$1(touchedFieldsRef.current, name)) { set$5(touchedFieldsRef.current, name, true); reRender(); } if (shouldReValidateOnBlur) { triggerValidation(name); } }, _d)), (_e = {}, _e[valueName || (isCheckboxInput ? 'checked' : VALUE)] = value, _e)); return React.isValidElement(InnerComponent) ? React.cloneElement(InnerComponent, props) : React.createElement(InnerComponent, props); }; var ErrorMessage = function (_a) { var InnerComponent = _a.as, errors = _a.errors, name = _a.name, message = _a.message, children = _a.children, rest = __rest(_a, ["as", "errors", "name", "message", "children"]); var methods = useFormContext(); var error = get$1(errors || methods.errors, name); if (!error) { return null; } var messageFromRegister = error.message, types = error.types; var props = __assign(__assign({}, InnerComponent ? rest : {}), { children: children ? children({ message: messageFromRegister || message, messages: types }) : messageFromRegister || message }); return InnerComponent ? React.isValidElement(InnerComponent) ? React.cloneElement(InnerComponent, props) : React.createElement(InnerComponent, props) : React.createElement(React.Fragment, __assign({}, props)); }; exports.Controller = Controller; exports.ErrorMessage = ErrorMessage; exports.FormContext = FormContext; exports.useFieldArray = useFieldArray; exports.useForm = useForm; exports.useFormContext = useFormContext; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27), __webpack_require__(3))) /***/ }), /* 4022 */ /***/ (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 _classnames = _interopRequireDefault(__webpack_require__(1)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(1599)); var _utils = __webpack_require__(1600); 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 Input = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) { var className = props.className, description = props.description, error = props.error, inProgress = props.inProgress, label = props.label, rest = _objectWithoutProperties(props, ["className", "description", "error", "inProgress", "label"]); var id = rest.id, required = rest.required; var descriptionId = (0, _utils.generateDescriptionId)(id); var errorId = (0, _utils.generateErrorId)(id); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: description, descriptionId: descriptionId, error: error, errorId: errorId, id: id, label: label, inProgress: inProgress }, /*#__PURE__*/_react["default"].createElement("input", _extends({}, rest, { ref: ref, className: (0, _classnames["default"])('form-control', className) // eslint-disable-next-line jsx-a11y/aria-proptypes , "aria-invalid": !!error, "aria-required": required, "aria-describedby": "".concat(descriptionId, " ").concat(errorId) }))); }); if (process.env.NODE_ENV !== 'production') { Input.propTypes = { id: _propTypes["default"].string.isRequired, className: _propTypes["default"].string, description: _propTypes["default"].string, error: _propTypes["default"].string, inProgress: _propTypes["default"].bool, label: _propTypes["default"].string.isRequired, rules: _propTypes["default"].object }; } var _default = Input; exports["default"] = _default; //# sourceMappingURL=Input.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4023 */ /***/ (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 _classnames = _interopRequireDefault(__webpack_require__(1)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(4024)); 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 FieldTemplate(props) { var groupsClassNames = (0, _classnames["default"])('form-group', _defineProperty({ 'has-error': props.error }, _FieldTemplate["default"].inProgress, props.inProgress)); return /*#__PURE__*/_react["default"].createElement("div", { className: groupsClassNames, "aria-busy": props.inProgress }, /*#__PURE__*/_react["default"].createElement("label", { htmlFor: props.id, className: "control-label" }, props.label), props.children, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", { id: props.descriptionId, className: (0, _classnames["default"])('help-block', { 'sr-only': props.error }) }, props.description), /*#__PURE__*/_react["default"].createElement("p", { id: props.errorId, className: "help-block", role: "status", "aria-live": "assertive" }, props.error))); } if (process.env.NODE_ENV !== 'production') { FieldTemplate.propTypes = { children: _propTypes["default"].node, description: _propTypes["default"].string, descriptionId: _propTypes["default"].string.isRequired, error: _propTypes["default"].string, errorId: _propTypes["default"].string.isRequired, id: _propTypes["default"].string, label: _propTypes["default"].string, inProgress: _propTypes["default"].bool }; } FieldTemplate.displayName = 'FieldTemplate'; var _default = FieldTemplate; exports["default"] = _default; //# sourceMappingURL=FieldTemplate.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4024 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"inProgress":"FieldTemplate__inProgress___2cjpb","object-blink":"FieldTemplate__object-blink___1Z-OK","skeleton-blink":"FieldTemplate__skeleton-blink___BOxvb"}; /***/ }), /* 4025 */ /***/ (function(module, exports, __webpack_require__) { var rng = __webpack_require__(1602); var bytesToUuid = __webpack_require__(1603); // **`v1()` - Generate time-based UUID** // // Inspired by https://github.com/LiosK/UUID.js // and http://docs.python.org/library/uuid.html var _nodeId; var _clockseq; // Previous uuid creation time var _lastMSecs = 0; var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details function v1(options, buf, offset) { var i = buf && offset || 0; var b = buf || []; options = options || {}; var node = options.node || _nodeId; var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not // specified. We do this lazily to minimize issues related to insufficient // system entropy. See #189 if (node == null || clockseq == null) { var seedBytes = rng(); if (node == null) { // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) node = _nodeId = [ seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] ]; } if (clockseq == null) { // Per 4.2.2, randomize (14 bit) clockseq clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; } } // UUID timestamps are 100 nano-second units since the Gregorian epoch, // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); // Per 4.2.1.2, use count of uuid's generated during the current clock // cycle to simulate higher resolution clock var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; // Per 4.2.1.2, Bump clockseq on clock regression if (dt < 0 && options.clockseq === undefined) { clockseq = clockseq + 1 & 0x3fff; } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new // time interval if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { nsecs = 0; } // Per 4.2.1.2 Throw error if too many uuids are requested if (nsecs >= 10000) { throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); } _lastMSecs = msecs; _lastNSecs = nsecs; _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch msecs += 12219292800000; // `time_low` var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; b[i++] = tl >>> 24 & 0xff; b[i++] = tl >>> 16 & 0xff; b[i++] = tl >>> 8 & 0xff; b[i++] = tl & 0xff; // `time_mid` var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; b[i++] = tmh >>> 8 & 0xff; b[i++] = tmh & 0xff; // `time_high_and_version` b[i++] = tmh >>> 24 & 0xf | 0x10; // include version b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` b[i++] = clockseq & 0xff; // `node` for (var n = 0; n < 6; ++n) { b[i + n] = node[n]; } return buf ? buf : bytesToUuid(b); } module.exports = v1; /***/ }), /* 4026 */ /***/ (function(module, exports, __webpack_require__) { var rng = __webpack_require__(1602); var bytesToUuid = __webpack_require__(1603); function v4(options, buf, offset) { var i = buf && offset || 0; if (typeof(options) == 'string') { buf = options === 'binary' ? new Array(16) : null; options = null; } options = options || {}; var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` rnds[6] = (rnds[6] & 0x0f) | 0x40; rnds[8] = (rnds[8] & 0x3f) | 0x80; // Copy bytes to buffer, if provided if (buf) { for (var ii = 0; ii < 16; ++ii) { buf[i + ii] = rnds[ii]; } } return buf || bytesToUuid(rnds); } module.exports = v4; /***/ }), /* 4027 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = DefaultFormTemplate; var _react = _interopRequireDefault(__webpack_require__(0)); var _UIForm = _interopRequireDefault(__webpack_require__(886)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function DefaultFormTemplate(_ref) { var widgetsRenderer = _ref.widgetsRenderer, buttonsRenderer = _ref.buttonsRenderer, children = _ref.children; return [/*#__PURE__*/_react["default"].createElement("div", { key: "form-widgets", className: _UIForm["default"]['form-content'] }, widgetsRenderer()), children, buttonsRenderer()]; } //# sourceMappingURL=DefaultFormTemplate.component.js.map /***/ }), /* 4028 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = TextModeFormTemplate; var _react = _interopRequireDefault(__webpack_require__(0)); var _UIForm = _interopRequireDefault(__webpack_require__(886)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function TextModeFormTemplate(_ref) { var widgetsRenderer = _ref.widgetsRenderer, children = _ref.children; return [/*#__PURE__*/_react["default"].createElement("dl", { key: "definitions", className: _UIForm["default"]['form-content'] }, widgetsRenderer()), children]; } //# sourceMappingURL=TextModeFormTemplate.component.js.map /***/ }), /* 4029 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = Message; var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function Message(props) { var description = props.description, descriptionId = props.descriptionId, errorId = props.errorId, errorMessage = props.errorMessage, isValid = props.isValid; return /*#__PURE__*/_react["default"].createElement("div", { className: props.className }, /*#__PURE__*/_react["default"].createElement("p", { key: "description", className: "help-block", id: descriptionId }, isValid ? description : ''), /*#__PURE__*/_react["default"].createElement("p", { key: "error", className: "help-block", role: "status", "aria-live": "assertive", id: errorId }, isValid ? '' : errorMessage)); } if (process.env.NODE_ENV !== 'production') { Message.propTypes = { className: _propTypes["default"].string, description: _propTypes["default"].string, descriptionId: _propTypes["default"].string.isRequired, errorId: _propTypes["default"].string.isRequired, errorMessage: _propTypes["default"].string, isValid: _propTypes["default"].bool }; } //# sourceMappingURL=Message.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4030 */ /***/ (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 = _interopRequireWildcard(__webpack_require__(888)); var errors = _interopRequireWildcard(__webpack_require__(397)); var properties = _interopRequireWildcard(__webpack_require__(96)); var propTypes = _interopRequireWildcard(__webpack_require__(901)); var triggers = _interopRequireWildcard(__webpack_require__(1618)); var validation = _interopRequireWildcard(__webpack_require__(551)); var _condition = _interopRequireDefault(__webpack_require__(904)); var _templates = _interopRequireDefault(__webpack_require__(1621)); var _widgets = _interopRequireDefault(__webpack_require__(905)); 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 = { array: array, errors: errors, properties: properties, propTypes: propTypes, triggers: triggers, validation: validation, condition: _condition["default"], templates: _templates["default"], widgets: _widgets["default"] }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4031 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(4032), arrayEach = __webpack_require__(4038), assignValue = __webpack_require__(1606), baseAssign = __webpack_require__(4039), baseAssignIn = __webpack_require__(4045), cloneBuffer = __webpack_require__(4048), copyArray = __webpack_require__(4049), copySymbols = __webpack_require__(4050), copySymbolsIn = __webpack_require__(4052), getAllKeys = __webpack_require__(4053), getAllKeysIn = __webpack_require__(1617), getTag = __webpack_require__(550), initCloneArray = __webpack_require__(4058), initCloneByTag = __webpack_require__(4059), initCloneObject = __webpack_require__(4065), isArray = __webpack_require__(173), isBuffer = __webpack_require__(890), isMap = __webpack_require__(4067), isObject = __webpack_require__(394), isSet = __webpack_require__(4069), keys = __webpack_require__(889), keysIn = __webpack_require__(895); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', 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 identify `toStringTag` values supported by `_.clone`. */ var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; /** * The base implementation of `_.clone` and `_.cloneDeep` which tracks * traversed objects. * * @private * @param {*} value The value to clone. * @param {boolean} bitmask The bitmask flags. * 1 - Deep clone * 2 - Flatten inherited properties * 4 - Clone symbols * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ function baseClone(value, bitmask, customizer, key, object, stack) { var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== undefined) { return result; } if (!isObject(value)) { return value; } var isArr = isArray(value); if (isArr) { result = initCloneArray(value); if (!isDeep) { return copyArray(value, result); } } else { var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; if (isBuffer(value)) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { result = (isFlat || isFunc) ? {} : initCloneObject(value); if (!isDeep) { return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { return object ? value : {}; } result = initCloneByTag(value, tag, isDeep); } } // Check for circular references and return its corresponding clone. stack || (stack = new Stack); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); if (isSet(value)) { value.forEach(function(subValue) { result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); } else if (isMap(value)) { value.forEach(function(subValue, key) { result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); } var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : (isFlat ? keysIn : keys); var props = isArr ? undefined : keysFunc(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } module.exports = baseClone; /***/ }), /* 4032 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(540), stackClear = __webpack_require__(4033), stackDelete = __webpack_require__(4034), stackGet = __webpack_require__(4035), stackHas = __webpack_require__(4036), stackSet = __webpack_require__(4037); /** * 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; /***/ }), /* 4033 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(540); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /* 4034 */ /***/ (function(module, exports) { /** * 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; } module.exports = stackDelete; /***/ }), /* 4035 */ /***/ (function(module, exports) { /** * 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); } module.exports = stackGet; /***/ }), /* 4036 */ /***/ (function(module, exports) { /** * 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); } module.exports = stackHas; /***/ }), /* 4037 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(540), Map = __webpack_require__(876), MapCache = __webpack_require__(1563); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * 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; } module.exports = stackSet; /***/ }), /* 4038 */ /***/ (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; /***/ }), /* 4039 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(398), keys = __webpack_require__(889); /** * The base implementation of `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssign(object, source) { return object && copyObject(source, keys(source), object); } module.exports = baseAssign; /***/ }), /* 4040 */ /***/ (function(module, exports) { /** * 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; } module.exports = baseTimes; /***/ }), /* 4041 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(318), isObjectLike = __webpack_require__(256); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * 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; } module.exports = baseIsArguments; /***/ }), /* 4042 */ /***/ (function(module, exports) { /** * 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 = stubFalse; /***/ }), /* 4043 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(318), isLength = __webpack_require__(891), isObjectLike = __webpack_require__(256); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', 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 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; /** * 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)]; } module.exports = baseIsTypedArray; /***/ }), /* 4044 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(1613); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /* 4045 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(398), keysIn = __webpack_require__(895); /** * The base implementation of `_.assignIn` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssignIn(object, source) { return object && copyObject(source, keysIn(source), object); } module.exports = baseAssignIn; /***/ }), /* 4046 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(394), isPrototype = __webpack_require__(549), nativeKeysIn = __webpack_require__(4047); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keysIn` 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 baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } module.exports = baseKeysIn; /***/ }), /* 4047 */ /***/ (function(module, exports) { /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } module.exports = nativeKeysIn; /***/ }), /* 4048 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(152); /** 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))) /***/ }), /* 4049 */ /***/ (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; /***/ }), /* 4050 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(398), getSymbols = __webpack_require__(896); /** * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbols(source, object) { return copyObject(source, getSymbols(source), object); } module.exports = copySymbols; /***/ }), /* 4051 */ /***/ (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; /***/ }), /* 4052 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(398), getSymbolsIn = __webpack_require__(1615); /** * Copies own and inherited symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbolsIn(source, object) { return copyObject(source, getSymbolsIn(source), object); } module.exports = copySymbolsIn; /***/ }), /* 4053 */ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(1616), getSymbols = __webpack_require__(896), keys = __webpack_require__(889); /** * 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; /***/ }), /* 4054 */ /***/ (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 DataView = getNative(root, 'DataView'); module.exports = DataView; /***/ }), /* 4055 */ /***/ (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 Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }), /* 4056 */ /***/ (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 Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /* 4057 */ /***/ (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 WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /* 4058 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Initializes an array clone. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the initialized clone. */ function initCloneArray(array) { var length = array.length, result = new array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result; } module.exports = initCloneArray; /***/ }), /* 4059 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(899), cloneDataView = __webpack_require__(4061), cloneRegExp = __webpack_require__(4062), cloneSymbol = __webpack_require__(4063), cloneTypedArray = __webpack_require__(4064); /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; 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]'; /** * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ function initCloneByTag(object, tag, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: return cloneArrayBuffer(object); case boolTag: case dateTag: return new Ctor(+object); case dataViewTag: return cloneDataView(object, isDeep); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: return cloneTypedArray(object, isDeep); case mapTag: return new Ctor; case numberTag: case stringTag: return new Ctor(object); case regexpTag: return cloneRegExp(object); case setTag: return new Ctor; case symbolTag: return cloneSymbol(object); } } module.exports = initCloneByTag; /***/ }), /* 4060 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(152); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /* 4061 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(899); /** * Creates a clone of `dataView`. * * @private * @param {Object} dataView The data view to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned data view. */ function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } module.exports = cloneDataView; /***/ }), /* 4062 */ /***/ (function(module, exports) { /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** * Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } module.exports = cloneRegExp; /***/ }), /* 4063 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(393); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a clone of the `symbol` object. * * @private * @param {Object} symbol The symbol object to clone. * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } module.exports = cloneSymbol; /***/ }), /* 4064 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(899); /** * 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; /***/ }), /* 4065 */ /***/ (function(module, exports, __webpack_require__) { var baseCreate = __webpack_require__(4066), getPrototype = __webpack_require__(898), isPrototype = __webpack_require__(549); /** * 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; /***/ }), /* 4066 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(394); /** 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; /***/ }), /* 4067 */ /***/ (function(module, exports, __webpack_require__) { var baseIsMap = __webpack_require__(4068), baseUnary = __webpack_require__(892), nodeUtil = __webpack_require__(893); /* Node.js helper references. */ var nodeIsMap = nodeUtil && nodeUtil.isMap; /** * Checks if `value` is classified as a `Map` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * * _.isMap(new Map); * // => true * * _.isMap(new WeakMap); * // => false */ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; module.exports = isMap; /***/ }), /* 4068 */ /***/ (function(module, exports, __webpack_require__) { var getTag = __webpack_require__(550), isObjectLike = __webpack_require__(256); /** `Object#toString` result references. */ var mapTag = '[object Map]'; /** * The base implementation of `_.isMap` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. */ function baseIsMap(value) { return isObjectLike(value) && getTag(value) == mapTag; } module.exports = baseIsMap; /***/ }), /* 4069 */ /***/ (function(module, exports, __webpack_require__) { var baseIsSet = __webpack_require__(4070), baseUnary = __webpack_require__(892), nodeUtil = __webpack_require__(893); /* Node.js helper references. */ var nodeIsSet = nodeUtil && nodeUtil.isSet; /** * Checks if `value` is classified as a `Set` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * * _.isSet(new Set); * // => true * * _.isSet(new WeakSet); * // => false */ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; module.exports = isSet; /***/ }), /* 4070 */ /***/ (function(module, exports, __webpack_require__) { var getTag = __webpack_require__(550), isObjectLike = __webpack_require__(256); /** `Object#toString` result references. */ var setTag = '[object Set]'; /** * The base implementation of `_.isSet` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. */ function baseIsSet(value) { return isObjectLike(value) && getTag(value) == setTag; } module.exports = baseIsSet; /***/ }), /* 4071 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(538), last = __webpack_require__(900), parent = __webpack_require__(4072), toKey = __webpack_require__(877); /** * The base implementation of `_.unset`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The property path to unset. * @returns {boolean} Returns `true` if the property is deleted, else `false`. */ function baseUnset(object, path) { path = castPath(path, object); object = parent(object, path); return object == null || delete object[toKey(last(path))]; } module.exports = baseUnset; /***/ }), /* 4072 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(1561), baseSlice = __webpack_require__(4073); /** * Gets the parent value at `path` of `object`. * * @private * @param {Object} object The object to query. * @param {Array} path The path to get the parent value of. * @returns {*} Returns the parent value. */ function parent(object, path) { return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); } module.exports = parent; /***/ }), /* 4073 */ /***/ (function(module, exports) { /** * The base implementation of `_.slice` without an iteratee call guard. * * @private * @param {Array} array The array to slice. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the slice of `array`. */ function baseSlice(array, start, end) { var index = -1, length = array.length; if (start < 0) { start = -start > length ? 0 : (length + start); } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : ((end - start) >>> 0); start >>>= 0; var result = Array(length); while (++index < length) { result[index] = array[index + start]; } return result; } module.exports = baseSlice; /***/ }), /* 4074 */ /***/ (function(module, exports, __webpack_require__) { var isPlainObject = __webpack_require__(4075); /** * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain * objects. * * @private * @param {*} value The value to inspect. * @param {string} key The key of the property to inspect. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. */ function customOmitClone(value) { return isPlainObject(value) ? undefined : value; } module.exports = customOmitClone; /***/ }), /* 4075 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(318), getPrototype = __webpack_require__(898), isObjectLike = __webpack_require__(256); /** `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; /***/ }), /* 4076 */ /***/ (function(module, exports, __webpack_require__) { var flatten = __webpack_require__(4077), overRest = __webpack_require__(4080), setToString = __webpack_require__(4082); /** * 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; /***/ }), /* 4077 */ /***/ (function(module, exports, __webpack_require__) { var baseFlatten = __webpack_require__(4078); /** * Flattens `array` a single level deep. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to flatten. * @returns {Array} Returns the new flattened array. * @example * * _.flatten([1, [2, [3, [4]], 5]]); * // => [1, 2, [3, [4]], 5] */ function flatten(array) { var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } module.exports = flatten; /***/ }), /* 4078 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(897), isFlattenable = __webpack_require__(4079); /** * 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; /***/ }), /* 4079 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(393), isArguments = __webpack_require__(548), isArray = __webpack_require__(173); /** Built-in value references. */ var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; /** * Checks if `value` is a flattenable `arguments` object or array. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } module.exports = isFlattenable; /***/ }), /* 4080 */ /***/ (function(module, exports, __webpack_require__) { var apply = __webpack_require__(4081); /* 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; /***/ }), /* 4081 */ /***/ (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; /***/ }), /* 4082 */ /***/ (function(module, exports, __webpack_require__) { var baseSetToString = __webpack_require__(4083), shortOut = __webpack_require__(4086); /** * 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; /***/ }), /* 4083 */ /***/ (function(module, exports, __webpack_require__) { var constant = __webpack_require__(4084), defineProperty = __webpack_require__(1608), identity = __webpack_require__(4085); /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !defineProperty ? identity : function(func, string) { return defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(string), 'writable': true }); }; module.exports = baseSetToString; /***/ }), /* 4084 */ /***/ (function(module, exports) { /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } module.exports = constant; /***/ }), /* 4085 */ /***/ (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; /***/ }), /* 4086 */ /***/ (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; /***/ }), /* 4087 */ /***/ (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.merge = merge; var _sfPath = __webpack_require__(552); var _schemaDefaults = __webpack_require__(1619); var _canonicalTitleMap = __webpack_require__(903); var _canonicalTitleMap2 = _interopRequireDefault(_canonicalTitleMap); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // export function merge(schema, form, schemaDefaultTypes, ignore, options, readonly, asyncTemplates) { function merge(lookup, form) { var typeDefaults = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (0, _schemaDefaults.createDefaults)(); var ignore = arguments[3]; var options = arguments[4]; var readonly = arguments[5]; var asyncTemplates = arguments[6]; var formItems = []; var formItemRest = []; form = form || []; var idx = form.indexOf('*'); options = options || {}; var stdForm = {}; var idxRest = form.indexOf('...'); if ((typeof lookup === 'undefined' ? 'undefined' : _typeof(lookup)) === 'object' && lookup.hasOwnProperty('properties')) { readonly = readonly || lookup.readonly || lookup.readOnly; stdForm = (0, _schemaDefaults.defaultForm)(lookup, typeDefaults, ignore, options); var defaultFormLookup = stdForm.lookup; lookup = defaultFormLookup || lookup; formItems = formItems.concat(stdForm.form); } if (idx !== -1) { form = form.slice(0, idx).concat(formItems).concat(form.slice(idx + 1)); } //simple case, we have a "...", just put the formItemRest there if (stdForm.form && idxRest !== -1) { var formKeys = form.map(function (obj) { if (typeof obj === 'string') { return obj; } else if (obj.key) { return obj.key; } }).filter(function (element) { return element !== undefined; }); formItemRest = formItemRest.concat(stdForm.form.map(function (obj) { var isInside = formKeys.indexOf(obj.key[0]) !== -1; if (!isInside) { return obj; } }).filter(function (element) { return element !== undefined; })); } if (idxRest !== -1) { form = form.slice(0, idxRest).concat(formItemRest).concat(form.slice(idxRest + 1)); } // ok let's merge! // We look at the supplied form and extend it with schema standards return form.map(function (obj) { // handle the shortcut with just a name if (typeof obj === 'string') { obj = { key: obj }; } if (obj.key) { if (typeof obj.key === 'string') { obj.key = (0, _sfPath.parse)(obj.key); } } // If it has a titleMap make sure it's a list if (obj.titleMap) { obj.titleMap = (0, _canonicalTitleMap2.default)(obj.titleMap); } // extend with std form from schema. if (obj.key) { var strid = (0, _sfPath.stringify)(obj.key); if (lookup[strid]) { var schemaDefaults = lookup[strid]; if (schemaDefaults) { Object.keys(schemaDefaults).forEach(function (attr) { if (obj[attr] === undefined) { obj[attr] = schemaDefaults[attr]; } }); } } } // Are we inheriting readonly? if (readonly === true) { // Inheriting false is not cool. obj.readonly = true; } // if it's a type with items, merge 'em! if (obj.items) { obj.items = merge(lookup, obj.items, typeDefaults, ignore, options, obj.readonly, asyncTemplates); } // if its has tabs, merge them also! if (obj.tabs) { obj.tabs.forEach(function (tab) { if (tab.items) { tab.items = merge(lookup, tab.items, typeDefaults, ignore, options, obj.readonly, asyncTemplates); } }); } // Special case: checkbox // Since have to ternary state we need a default if (obj.type === 'checkbox') { // Check for schema property, as the checkbox may be part of the explicitly defined form if (obj.schema === undefined) { obj.schema = { default: false }; } else if (obj.schema['default'] === undefined) { obj.schema['default'] = false; } } // Special case: template type with tempplateUrl that's needs to be loaded before rendering // TODO: this is not a clean solution. Maybe something cleaner can be made when $ref support // is introduced since we need to go async then anyway if (asyncTemplates && obj.type === 'template' && !obj.template && obj.templateUrl) { asyncTemplates.push(obj); } return obj; }); } /***/ }), /* 4088 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(4089).ObjectPath; /***/ }), /* 4089 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var __WEBPACK_AMD_DEFINE_RESULT__; ;!function(undefined) { var r = { '\'': /\\\'/g, '"': /\\\"/g, }; var ObjectPath = { parse: function(str){ if(typeof str !== 'string'){ throw new TypeError('ObjectPath.parse must be passed a string'); } var i = 0; var parts = []; var d, b, q, c; while (i < str.length){ d = str.indexOf('.', i); b = str.indexOf('[', i); // we've reached the end if (d === -1 && b === -1){ parts.push(str.slice(i, str.length)); i = str.length; } // dots else if (b === -1 || (d !== -1 && d < b)) { parts.push(str.slice(i, d)); i = d + 1; } // brackets else { if (b > i){ parts.push(str.slice(i, b)); i = b; } q = str.slice(b+1, b+2); if (q !== '"' && q !=='\'') { c = str.indexOf(']', b); if (c === -1) c = str.length; parts.push(str.slice(i + 1, c)); i = (str.slice(c + 1, c + 2) === '.') ? c + 2 : c + 1; } else { c = str.indexOf(q+']', b); if (c === -1) c = str.length; while (str.slice(c - 1, c) === '\\' && b < str.length){ b++; c = str.indexOf(q+']', b); } parts.push(str.slice(i + 2, c).replace(r[q], q)); i = (str.slice(c + 2, c + 3) === '.') ? c + 3 : c + 2; } } } return parts; }, // root === true : auto calculate root; must be dot-notation friendly // root String : the string to use as root stringify: function(arr, quote){ if(!Array.isArray(arr)) arr = [arr.toString()]; quote = quote === '"' ? '"' : '\''; return arr.map(function(n){ return '[' + quote + (n.toString()).replace(new RegExp(quote, 'g'), '\\' + quote) + quote + ']'; }).join(''); }, normalize: function(data, quote){ return ObjectPath.stringify(Array.isArray(data) ? data : ObjectPath.parse(data), quote); }, // Angular registerModule: function(angular) { angular.module('ObjectPath', []).provider('ObjectPath', function(){ this.parse = ObjectPath.parse; this.stringify = ObjectPath.stringify; this.normalize = ObjectPath.normalize; this.$get = function(){ return ObjectPath; }; }); } }; // AMD if (true) { !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { return { // this is only namespaced for backwards compatibility when fixing issue #8 ObjectPath: ObjectPath, // export these as top-level functions parse: ObjectPath.parse, stringify: ObjectPath.stringify, normalize: ObjectPath.normalize }; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } // CommonJS else if (typeof exports === 'object') { exports.ObjectPath = ObjectPath; } // Browser global else { window.ObjectPath = ObjectPath; } }(); /***/ }), /* 4090 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.select = select; var _sfPath = __webpack_require__(552); var sfPath = _interopRequireWildcard(_sfPath); 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 numRe = /^\d+$/; /** * @description * Utility method to access deep properties without * throwing errors when things are not defined. * Can also set a value in a deep structure, creating objects when missing * ex. * var foo = Select('address.contact.name',obj) * Select('address.contact.name',obj,'Leeroy') * * @param {string} projection A dot path to the property you want to get/set * @param {object} obj (optional) The object to project on, defaults to 'this' * @param {Any} valueToSet (opional) The value to set, if parts of the path of * the projection is missing empty objects will be created. * @returns {Any|undefined} returns the value at the end of the projection path * or undefined if there is none. */ function select(projection, obj, valueToSet) { if (!obj) { obj = this; } // Support [] array syntax var parts = typeof projection === 'string' ? sfPath.parse(projection) : projection; if (typeof valueToSet !== 'undefined' && parts.length === 1) { // special case, just setting one variable obj[parts[0]] = valueToSet; return obj; } if (typeof valueToSet !== 'undefined' && typeof obj[parts[0]] === 'undefined') { // We need to look ahead to check if array is appropriate obj[parts[0]] = parts.length > 2 && numRe.test(parts[1]) ? [] : {}; } var value = obj[parts[0]]; for (var i = 1; i < parts.length; i++) { // Special case: We allow JSON Form syntax for arrays using empty brackets // These will of course not work here so we exit if they are found. if (parts[i] === '') { return undefined; } if (typeof valueToSet !== 'undefined') { if (i === parts.length - 1) { // last step. Let's set the value value[parts[i]] = valueToSet; return valueToSet; } else { // Make sure to create new objects on the way if they are not there. // We need to look ahead to check if array is appropriate var tmp = value[parts[i]]; if (typeof tmp === 'undefined' || tmp === null) { tmp = numRe.test(parts[i + 1]) ? [] : {}; value[parts[i]] = tmp; } value = tmp; } } else if (value) { // Just get nex value. value = value[parts[i]]; } } return value; } /***/ }), /* 4091 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.jsonref = jsonref; var _jsonRefsStandalone = __webpack_require__(4092); var JsonRefs = _interopRequireWildcard(_jsonRefsStandalone); 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 jsonref(schema, callBack) { var promise = new Promise(function (resolve, reject) { JsonRefs.resolveRefs(schema, { filter: ['relative', 'local', 'remote'] }).then(function (res) { resolve(res.resolved); }).catch(function (err) { reject(new Error(err)); }); }); if (typeof callBack === 'function') { promise.then(function (resolved) { callBack(null, resolved); }).catch(function (error) { callBack(error); }); } else { return promise; } } /***/ }), /* 4092 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, setImmediate) {var require;var require;(function(f){if(true){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JsonRefs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ /* * The MIT License (MIT) * * Copyright (c) 2014 Jeremy Whitlock * * 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. */ 'use strict'; /** * Various utilities for JSON References *(http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03)* and * JSON Pointers *(https://tools.ietf.org/html/rfc6901)*. * * @module JsonRefs */ var path = require('path'); var PathLoader = require('path-loader'); var qs = require('querystring'); var slash = require('slash'); var URI = require('uri-js'); var badPtrTokenRegex = /~(?:[^01]|$)/g; var remoteCache = {}; var remoteTypes = ['relative', 'remote']; var remoteUriTypes = ['absolute', 'uri']; var uriDetailsCache = {}; // Load promises polyfill if necessary /* istanbul ignore if */ if (typeof Promise === 'undefined') { require('native-promise-only'); } /* Internal Functions */ // This is a very simplistic clone function that does not take into account non-JSON types. For these types the // original value is used as the clone. So while it's not a complete deep clone, for the needs of this project // this should be sufficient. function clone (obj) { var cloned; if (isType(obj, 'Array')) { cloned = []; obj.forEach(function (value, index) { cloned[index] = clone(value); }); } else if (isType(obj, 'Object')) { cloned = {}; Object.keys(obj).forEach(function (key) { cloned[key] = clone(obj[key]); }); } else { cloned = obj; } return cloned; } function combineQueryParams (qs1, qs2) { var combined = {}; function mergeQueryParams (obj) { Object.keys(obj).forEach(function (key) { combined[key] = obj[key]; }); } mergeQueryParams(qs.parse(qs1 || '')); mergeQueryParams(qs.parse(qs2 || '')); return Object.keys(combined).length === 0 ? undefined : qs.stringify(combined); } function combineURIs (u1, u2) { // Convert Windows paths if (isType(u1, 'String')) { u1 = slash(u1); } if (isType(u2, 'String')) { u2 = slash(u2); } var u2Details = parseURI(isType(u2, 'Undefined') ? '' : u2); var u1Details; var combinedDetails; if (remoteUriTypes.indexOf(u2Details.reference) > -1) { combinedDetails = u2Details; } else { u1Details = isType(u1, 'Undefined') ? undefined : parseURI(u1); if (!isType(u1Details, 'Undefined')) { combinedDetails = u1Details; // Join the paths combinedDetails.path = slash(path.join(u1Details.path, u2Details.path)); // Join query parameters combinedDetails.query = combineQueryParams(u1Details.query, u2Details.query); } else { combinedDetails = u2Details; } } // Remove the fragment combinedDetails.fragment = undefined; // For relative URIs, add back the '..' since it was removed above return (remoteUriTypes.indexOf(combinedDetails.reference) === -1 && combinedDetails.path.indexOf('../') === 0 ? '../' : '') + URI.serialize(combinedDetails); } function findAncestors (obj, path) { var ancestors = []; var node; if (path.length > 0) { node = obj; path.slice(0, path.length - 1).forEach(function (seg) { if (seg in node) { node = node[seg]; ancestors.push(node); } }); } return ancestors; } function processSubDocument (mode, doc, subDocPath, refDetails, options, parents, parentPtrs, allRefs, indirect) { var refValue; var rOptions; if (subDocPath.length > 0) { try { refValue = findValue(doc, subDocPath); } catch (err) { // We only mark missing remote references as missing because local references can have deferred values if (mode === 'remote') { refDetails.error = err.message; refDetails.missing = true; } } } else { refValue = doc; } if (!isType(refValue, 'Undefined')) { refDetails.value = refValue; } if (isType(refValue, 'Array') || isType(refValue, 'Object')) { rOptions = clone(options); if (mode === 'local') { delete rOptions.subDocPath; // Traverse the dereferenced value doc = refValue; } else { rOptions.relativeBase = path.dirname(parents[parents.length - 1]); if (subDocPath.length === 0) { delete rOptions.subDocPath; } else { rOptions.subDocPath = subDocPath; } } return findRefsRecursive(doc, rOptions, parents, parentPtrs, allRefs, indirect); } } // Should this be its own exported API? function findRefsRecursive (obj, options, parents, parentPtrs, allRefs, indirect) { var allTasks = Promise.resolve(); var parentPath = parentPtrs.length ? pathFromPtr(parentPtrs[parentPtrs.length - 1]) : []; var refs = findRefs(obj, options); var subDocPath = options.subDocPath || []; var subDocPtr = pathToPtr(subDocPath); var ancestorPtrs = ['#']; parents.forEach(function (parent, index) { if (parent.charAt(0) !== '#') { ancestorPtrs.push(parentPtrs[index]); } }); // Reverse the order so we search them in the proper order ancestorPtrs.reverse(); if ((parents[parents.length - 1] || '').charAt(0) !== '#') { allRefs.documents[pathToPtr(parentPath)] = obj; } Object.keys(refs).forEach(function (refPtr) { var refDetails = refs[refPtr]; var location; var parentIndex; var refFullPath; var refFullPtr; // If there are no parents, treat the reference pointer as-is. Otherwise, the reference is a reference within a // remote document and its sub document path prefix must be removed. if (parents.length === 0) { refFullPath = parentPath.concat(pathFromPtr(refPtr)); } else { refFullPath = parentPath.concat(pathFromPtr(refPtr).slice(parents.length === 0 ? 0 : subDocPath.length)); } refFullPtr = pathToPtr(refFullPath); // It is possible to process the same reference more than once in the event of hierarchical references so we avoid // processing a reference if we've already done so. if (!isType(allRefs[refFullPtr], 'Undefined')) { return; } // Record the reference metadata allRefs.refs[refFullPtr] = refs[refPtr]; // Do not process invalid references if (isType(refDetails.error, 'Undefined') && refDetails.type !== 'invalid') { if (remoteTypes.indexOf(refDetails.type) > -1) { location = combineURIs(options.relativeBase, refDetails.uri); parentIndex = parents.indexOf(location); } else { location = refDetails.uri; parentIndex = parentPtrs.indexOf(location); } // Record ancestor paths refDetails.ancestorPtrs = ancestorPtrs; // Record if the reference is indirect based on its parent refDetails.indirect = indirect; // Only process non-circular references further if (parentIndex === -1) { if (remoteTypes.indexOf(refDetails.type) > -1) { allTasks = allTasks .then(function () { return getRemoteDocument(location, options) .then(function (doc) { return processSubDocument('remote', doc, isType(refDetails.uriDetails.fragment, 'Undefined') ? [] : pathFromPtr(decodeURI(refDetails.uriDetails.fragment)), refDetails, options, parents.concat(location), parentPtrs.concat(refFullPtr), allRefs, indirect); }) .catch(function (err) { refDetails.error = err.message; refDetails.missing = true; }); }); } else { if (refFullPtr.indexOf(location + '/') !== 0 && refFullPtr !== location && subDocPtr.indexOf(location + '/') !== 0 && subDocPtr !== location) { if (location.indexOf(subDocPtr + '/') !== 0) { allTasks = allTasks .then(function () { return processSubDocument('local', obj, pathFromPtr(location), refDetails, options, parents.concat(location), parentPtrs.concat(refFullPtr), allRefs, indirect || (location.indexOf(subDocPtr + '/') === -1 && location !== subDocPtr)); }); } } else { refDetails.circular = true; } } } else { // Mark seen ancestors as circular parentPtrs.slice(parentIndex).forEach(function (parentPtr) { allRefs.refs[parentPtr].circular = true; }); refDetails.circular = true; } } }); allTasks = allTasks .then(function () { // Identify indirect, local circular references (Issue 82) var circulars = []; var processedRefPtrs = []; var processedRefs = []; function walkRefs (parentPtrs, parentRefs, refPtr, ref) { Object.keys(allRefs.refs).forEach(function (dRefPtr) { var dRefDetails = allRefs.refs[dRefPtr]; // Do not process already processed references or references that are not a nested references if (processedRefs.indexOf(ref) === -1 && processedRefPtrs.indexOf(refPtr) === -1 && circulars.indexOf(ref) === -1 && dRefPtr !== refPtr && dRefPtr.indexOf(ref + '/') === 0) { if (parentRefs.indexOf(ref) > -1) { parentRefs.forEach(function (parentRef) { if (circulars.indexOf(ref) === -1) { circulars.push(parentRef); } }); } else { walkRefs(parentPtrs.concat(refPtr), parentRefs.concat(ref), dRefPtr, dRefDetails.uri); } processedRefPtrs.push(refPtr); processedRefs.push(ref); } }); } Object.keys(allRefs.refs).forEach(function (refPtr) { var refDetails = allRefs.refs[refPtr]; // Only process local, non-circular references if (refDetails.type === 'local' && !refDetails.circular && circulars.indexOf(refDetails.uri) === -1) { walkRefs([], [], refPtr, refDetails.uri); } }); Object.keys(allRefs.refs).forEach(function (refPtr) { var refDetails = allRefs.refs[refPtr]; if (circulars.indexOf(refDetails.uri) > -1) { refDetails.circular = true; } }); }) .then(function () { return allRefs; }); return allTasks; } function findValue (obj, path) { var value = obj; path.forEach(function (seg) { seg = decodeURI(seg); if (seg in value) { value = value[seg]; } else { throw Error('JSON Pointer points to missing location: ' + pathToPtr(path)); } }); return value; } function getExtraRefKeys (ref) { return Object.keys(ref).filter(function (key) { return key !== '$ref'; }); } function getRefType (refDetails) { var type; // Convert the URI reference to one of our types switch (refDetails.uriDetails.reference) { case 'absolute': case 'uri': type = 'remote'; break; case 'same-document': type = 'local'; break; default: type = refDetails.uriDetails.reference; } return type; } function getRemoteDocument (url, options) { var cacheEntry = remoteCache[url]; var allTasks = Promise.resolve(); var loaderOptions = clone(options.loaderOptions || {}); if (isType(cacheEntry, 'Undefined')) { // If there is no content processor, default to processing the raw response as JSON if (isType(loaderOptions.processContent, 'Undefined')) { loaderOptions.processContent = function (res, callback) { callback(undefined, JSON.parse(res.text)); }; } // Attempt to load the resource using path-loader allTasks = PathLoader.load(decodeURI(url), loaderOptions); // Update the cache allTasks = allTasks .then(function (res) { remoteCache[url] = { value: res }; return res; }) .catch(function (err) { remoteCache[url] = { error: err }; throw err; }); } else { // Return the cached version allTasks = allTasks.then(function () { return cacheEntry.value; }); } // Return a cloned version to avoid updating the cache allTasks = allTasks.then(function (res) { return clone(res); }); return allTasks; } function isRefLike (obj, throwWithDetails) { var refLike = true; try { if (!isType(obj, 'Object')) { throw new Error('obj is not an Object'); } else if (!isType(obj.$ref, 'String')) { throw new Error('obj.$ref is not a String'); } } catch (err) { if (throwWithDetails) { throw err; } refLike = false; } return refLike; } function isType (obj, type) { // A PhantomJS bug (https://github.com/ariya/phantomjs/issues/11722) prohibits us from using the same approach for // undefined checking that we use for other types. if (type === 'Undefined') { return typeof obj === 'undefined'; } else { return Object.prototype.toString.call(obj) === '[object ' + type + ']'; } } function makeRefFilter (options) { var refFilter; var validTypes; if (isType(options.filter, 'Array') || isType(options.filter, 'String')) { validTypes = isType(options.filter, 'String') ? [options.filter] : options.filter; refFilter = function (refDetails) { // Check the exact type or for invalid URIs, check its original type return validTypes.indexOf(refDetails.type) > -1 || validTypes.indexOf(getRefType(refDetails)) > -1; }; } else if (isType(options.filter, 'Function')) { refFilter = options.filter; } else if (isType(options.filter, 'Undefined')) { refFilter = function () { return true; }; } return function (refDetails, path) { return (refDetails.type !== 'invalid' || options.includeInvalid === true) && refFilter(refDetails, path); }; } function makeSubDocPath (options) { var subDocPath; if (isType(options.subDocPath, 'Array')) { subDocPath = options.subDocPath; } else if (isType(options.subDocPath, 'String')) { subDocPath = pathFromPtr(options.subDocPath); } else if (isType(options.subDocPath, 'Undefined')) { subDocPath = []; } return subDocPath; } function parseURI (uri) { // We decode first to avoid doubly encoding return URI.parse(encodeURI(decodeURI(uri))); } function setValue (obj, refPath, value) { findValue(obj, refPath.slice(0, refPath.length - 1))[decodeURI(refPath[refPath.length - 1])] = value; } function walk (ancestors, node, path, fn) { var processChildren = true; function walkItem (item, segment) { path.push(segment); walk(ancestors, item, path, fn); path.pop(); } // Call the iteratee if (isType(fn, 'Function')) { processChildren = fn(ancestors, node, path); } // We do not process circular objects again if (ancestors.indexOf(node) === -1) { ancestors.push(node); if (processChildren !== false) { if (isType(node, 'Array')) { node.forEach(function (member, index) { walkItem(member, index.toString()); }); } else if (isType(node, 'Object')) { Object.keys(node).forEach(function (key) { walkItem(node[key], key); }); } } } ancestors.pop(); } function validateOptions (options, obj) { if (isType(options, 'Undefined')) { // Default to an empty options object options = {}; } else { // Clone the options so we do not alter the ones passed in options = clone(options); } if (!isType(options, 'Object')) { throw new TypeError('options must be an Object'); } else if (!isType(options.filter, 'Undefined') && !isType(options.filter, 'Array') && !isType(options.filter, 'Function') && !isType(options.filter, 'String')) { throw new TypeError('options.filter must be an Array, a Function of a String'); } else if (!isType(options.includeInvalid, 'Undefined') && !isType(options.includeInvalid, 'Boolean')) { throw new TypeError('options.includeInvalid must be a Boolean'); } else if (!isType(options.refPreProcessor, 'Undefined') && !isType(options.refPreProcessor, 'Function')) { throw new TypeError('options.refPreProcessor must be a Function'); } else if (!isType(options.refPostProcessor, 'Undefined') && !isType(options.refPostProcessor, 'Function')) { throw new TypeError('options.refPostProcessor must be a Function'); } else if (!isType(options.subDocPath, 'Undefined') && !isType(options.subDocPath, 'Array') && !isPtr(options.subDocPath)) { // If a pointer is provided, throw an error if it's not the proper type throw new TypeError('options.subDocPath must be an Array of path segments or a valid JSON Pointer'); } options.filter = makeRefFilter(options); // Set the subDocPath to avoid everyone else having to compute it options.subDocPath = makeSubDocPath(options); if (!isType(obj, 'Undefined')) { try { findValue(obj, options.subDocPath); } catch (err) { err.message = err.message.replace('JSON Pointer', 'options.subDocPath'); throw err; } } return options; } /* Module Members */ /* * Each of the functions below are defined as function statements and *then* exported in two steps instead of one due * to a bug in jsdoc (https://github.com/jsdoc2md/jsdoc-parse/issues/18) that causes our documentation to be * generated improperly. The impact to the user is significant enough for us to warrant working around it until this * is fixed. */ /** * The options used for various JsonRefs APIs. * * @typedef {object} JsonRefsOptions * * @param {string|string[]|function} [filter=function () {return true;}] - The filter to use when gathering JSON * References *(If this value is a single string or an array of strings, the value(s) are expected to be the `type(s)` * you are interested in collecting as described in {@link module:JsonRefs.getRefDetails}. If it is a function, it is * expected that the function behaves like {@link module:JsonRefs~RefDetailsFilter}.)* * @param {boolean} [includeInvalid=false] - Whether or not to include invalid JSON Reference details *(This will make * it so that objects that are like JSON Reference objects, as in they are an `Object` and the have a `$ref` property, * but fail validation will be included. This is very useful for when you want to know if you have invalid JSON * Reference definitions. This will not mean that APIs will process invalid JSON References but the reasons as to why * the JSON References are invalid will be included in the returned metadata.)* * @param {object} [loaderOptions] - The options to pass to * {@link https://github.com/whitlockjc/path-loader/blob/master/docs/API.md#module_PathLoader.load|PathLoader~load} * @param {module:JsonRefs~RefPreProcessor} [refPreProcessor] - The callback used to pre-process a JSON Reference like * object *(This is called prior to validating the JSON Reference like object and getting its details)* * @param {module:JsonRefs~RefPostProcessor} [refPostProcessor] - The callback used to post-process the JSON Reference * metadata *(This is called prior filtering the references)* * @param {string} [options.relativeBase] - The base location to use when resolving relative references *(Only useful * for APIs that do remote reference resolution. If this value is not defined, * {@link https://github.com/whitlockjc/path-loader|path-loader} will use `window.location.href` for the browser and * `process.cwd()` for Node.js.)* * @param {string|string[]} [options.subDocPath=[]] - The JSON Pointer or array of path segments to the sub document * location to search from */ /** * Simple function used to filter out JSON References. * * @typedef {function} RefDetailsFilter * * @param {module:JsonRefs~UnresolvedRefDetails} refDetails - The JSON Reference details to test * @param {string[]} path - The path to the JSON Reference * * @returns {boolean} whether the JSON Reference should be filtered *(out)* or not */ /** * Simple function used to pre-process a JSON Reference like object. * * @typedef {function} RefPreProcessor * * @param {object} obj - The JSON Reference like object * @param {string[]} path - The path to the JSON Reference like object * * @returns {object} the processed JSON Reference like object */ /** * Simple function used to post-process a JSON Reference details. * * @typedef {function} RefPostProcessor * * @param {module:JsonRefs~UnresolvedRefDetails} refDetails - The JSON Reference details to test * @param {string[]} path - The path to the JSON Reference * * @returns {object} the processed JSON Reference details object */ /** * Detailed information about resolved JSON References. * * @typedef {module:JsonRefs~UnresolvedRefDetails} ResolvedRefDetails * * @property {boolean} [circular] - Whether or not the JSON Reference is circular *(Will not be set if the JSON * Reference is not circular)* * @property {boolean} [missing] - Whether or not the referenced value was missing or not *(Will not be set if the * referenced value is not missing)* * @property {*} [value] - The referenced value *(Will not be set if the referenced value is missing)* */ /** * The results of resolving the JSON References of an array/object. * * @typedef {object} ResolvedRefsResults * * @property {module:JsonRefs~ResolvedRefDetails} refs - An object whose keys are JSON Pointers *(fragment version)* * to where the JSON Reference is defined and whose values are {@link module:JsonRefs~ResolvedRefDetails} * @property {object} resolved - The array/object with its JSON References fully resolved */ /** * An object containing the retrieved document and detailed information about its JSON References. * * @typedef {module:JsonRefs~ResolvedRefsResults} RetrievedRefsResults * * @property {object} value - The retrieved document */ /** * An object containing the retrieved document, the document with its references resolved and detailed information * about its JSON References. * * @typedef {object} RetrievedResolvedRefsResults * * @property {module:JsonRefs~UnresolvedRefDetails} refs - An object whose keys are JSON Pointers *(fragment version)* * to where the JSON Reference is defined and whose values are {@link module:JsonRefs~UnresolvedRefDetails} * @property {ResolvedRefsResults} - An object whose keys are JSON Pointers *(fragment version)* * to where the JSON Reference is defined and whose values are {@link module:JsonRefs~ResolvedRefDetails} * @property {object} value - The retrieved document */ /** * Detailed information about unresolved JSON References. * * @typedef {object} UnresolvedRefDetails * * @property {object} def - The JSON Reference definition * @property {string} [error] - The error information for invalid JSON Reference definition *(Only present when the * JSON Reference definition is invalid or there was a problem retrieving a remote reference during resolution)* * @property {string} uri - The URI portion of the JSON Reference * @property {object} uriDetails - Detailed information about the URI as provided by * {@link https://github.com/garycourt/uri-js|URI.parse}. * @property {string} type - The JSON Reference type *(This value can be one of the following: `invalid`, `local`, * `relative` or `remote`.)* * @property {string} [warning] - The warning information *(Only present when the JSON Reference definition produces a * warning)* */ /** * Clears the internal cache of remote documents, reference details, etc. * * @alias module:JsonRefs.clearCache */ function clearCache () { remoteCache = {}; } /** * Takes an array of path segments and decodes the JSON Pointer tokens in them. * * @param {string[]} path - The array of path segments * * @returns {string} the array of path segments with their JSON Pointer tokens decoded * * @throws {Error} if the path is not an `Array` * * @see {@link https://tools.ietf.org/html/rfc6901#section-3} * * @alias module:JsonRefs.decodePath */ function decodePath (path) { if (!isType(path, 'Array')) { throw new TypeError('path must be an array'); } return path.map(function (seg) { if (!isType(seg, 'String')) { seg = JSON.stringify(seg); } return decodeURI(seg.replace(/~1/g, '/').replace(/~0/g, '~')); }); } /** * Takes an array of path segments and encodes the special JSON Pointer characters in them. * * @param {string[]} path - The array of path segments * * @returns {string} the array of path segments with their JSON Pointer tokens encoded * * @throws {Error} if the path is not an `Array` * * @see {@link https://tools.ietf.org/html/rfc6901#section-3} * * @alias module:JsonRefs.encodePath */ function encodePath (path) { if (!isType(path, 'Array')) { throw new TypeError('path must be an array'); } return path.map(function (seg) { if (!isType(seg, 'String')) { seg = JSON.stringify(seg); } return seg.replace(/~/g, '~0').replace(/\//g, '~1'); }); } /** * Finds JSON References defined within the provided array/object. * * @param {array|object} obj - The structure to find JSON References within * @param {module:JsonRefs~JsonRefsOptions} [options] - The JsonRefs options * * @returns {object} an object whose keys are JSON Pointers *(fragment version)* to where the JSON Reference is defined * and whose values are {@link module:JsonRefs~UnresolvedRefDetails}. * * @throws {Error} when the input arguments fail validation or if `options.subDocPath` points to an invalid location * * @alias module:JsonRefs.findRefs * * @example * // Finding all valid references * var allRefs = JsonRefs.findRefs(obj); * // Finding all remote references * var remoteRefs = JsonRefs.findRefs(obj, {filter: ['relative', 'remote']}); * // Finding all invalid references * var invalidRefs = JsonRefs.findRefs(obj, {filter: 'invalid', includeInvalid: true}); */ function findRefs (obj, options) { var refs = {}; // Validate the provided document if (!isType(obj, 'Array') && !isType(obj, 'Object')) { throw new TypeError('obj must be an Array or an Object'); } // Validate options options = validateOptions(options, obj); // Walk the document (or sub document) and find all JSON References walk(findAncestors(obj, options.subDocPath), findValue(obj, options.subDocPath), clone(options.subDocPath), function (ancestors, node, path) { var processChildren = true; var refDetails; if (isRefLike(node)) { // Pre-process the node when necessary if (!isType(options.refPreProcessor, 'Undefined')) { node = options.refPreProcessor(clone(node), path); } refDetails = getRefDetails(node); // Post-process the reference details if (!isType(options.refPostProcessor, 'Undefined')) { refDetails = options.refPostProcessor(refDetails, path); } if (options.filter(refDetails, path)) { refs[pathToPtr(path)] = refDetails; } // Whenever a JSON Reference has extra children, its children should not be processed. // See: http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3 if (getExtraRefKeys(node).length > 0) { processChildren = false; } } return processChildren; }); return refs; } /** * Finds JSON References defined within the document at the provided location. * * This API is identical to {@link module:JsonRefs.findRefs} except this API will retrieve a remote document and then * return the result of {@link module:JsonRefs.findRefs} on the retrieved document. * * @param {string} location - The location to retrieve *(Can be relative or absolute, just make sure you look at the * {@link module:JsonRefs~JsonRefsOptions|options documentation} to see how relative references are handled.)* * @param {module:JsonRefs~JsonRefsOptions} [options] - The JsonRefs options * * @returns {Promise} a promise that resolves a {@link module:JsonRefs~RetrievedRefsResults} and rejects with an * `Error` when the input arguments fail validation, when `options.subDocPath` points to an invalid location or when * the location argument points to an unloadable resource * * @alias module:JsonRefs.findRefsAt * * @example * // Example that only resolves references within a sub document * JsonRefs.findRefsAt('http://petstore.swagger.io/v2/swagger.json', { * subDocPath: '#/definitions' * }) * .then(function (res) { * // Do something with the response * // * // res.refs: JSON Reference locations and details * // res.value: The retrieved document * }, function (err) { * console.log(err.stack); * }); */ function findRefsAt (location, options) { var allTasks = Promise.resolve(); allTasks = allTasks .then(function () { // Validate the provided location if (!isType(location, 'String')) { throw new TypeError('location must be a string'); } // Validate options options = validateOptions(options); // Combine the location and the optional relative base location = combineURIs(options.relativeBase, location); return getRemoteDocument(location, options); }) .then(function (res) { var cacheEntry = clone(remoteCache[location]); var cOptions = clone(options); var uriDetails = parseURI(location); if (isType(cacheEntry.refs, 'Undefined')) { // Do not filter any references so the cache is complete delete cOptions.filter; delete cOptions.subDocPath; cOptions.includeInvalid = true; remoteCache[location].refs = findRefs(res, cOptions); } // Add the filter options back if (!isType(options.filter, 'Undefined')) { cOptions.filter = options.filter; } if (!isType(uriDetails.fragment, 'Undefined')) { cOptions.subDocPath = pathFromPtr(decodeURI(uriDetails.fragment)); } else if (!isType(uriDetails.subDocPath, 'Undefined')) { cOptions.subDocPath = options.subDocPath; } // This will use the cache so don't worry about calling it twice return { refs: findRefs(res, cOptions), value: res }; }); return allTasks; } /** * Returns detailed information about the JSON Reference. * * @param {object} obj - The JSON Reference definition * * @returns {module:JsonRefs~UnresolvedRefDetails} the detailed information * * @alias module:JsonRefs.getRefDetails */ function getRefDetails (obj) { var details = { def: obj }; var cacheKey; var extraKeys; var uriDetails; try { if (isRefLike(obj, true)) { cacheKey = obj.$ref; uriDetails = uriDetailsCache[cacheKey]; if (isType(uriDetails, 'Undefined')) { uriDetails = uriDetailsCache[cacheKey] = parseURI(cacheKey); } details.uri = cacheKey; details.uriDetails = uriDetails; if (isType(uriDetails.error, 'Undefined')) { details.type = getRefType(details); } else { details.error = details.uriDetails.error; details.type = 'invalid'; } // Identify warning extraKeys = getExtraRefKeys(obj); if (extraKeys.length > 0) { details.warning = 'Extra JSON Reference properties will be ignored: ' + extraKeys.join(', '); } } else { details.type = 'invalid'; } } catch (err) { details.error = err.message; details.type = 'invalid'; } return details; } /** * Returns whether the argument represents a JSON Pointer. * * A string is a JSON Pointer if the following are all true: * * * The string is of type `String` * * The string must be empty, `#` or start with a `/` or `#/` * * @param {string} ptr - The string to check * @param {boolean} [throwWithDetails=false] - Whether or not to throw an `Error` with the details as to why the value * provided is invalid * * @returns {boolean} the result of the check * * @throws {error} when the provided value is invalid and the `throwWithDetails` argument is `true` * * @alias module:JsonRefs.isPtr * * @see {@link https://tools.ietf.org/html/rfc6901#section-3} * * @example * // Separating the different ways to invoke isPtr for demonstration purposes * if (isPtr(str)) { * // Handle a valid JSON Pointer * } else { * // Get the reason as to why the value is not a JSON Pointer so you can fix/report it * try { * isPtr(str, true); * } catch (err) { * // The error message contains the details as to why the provided value is not a JSON Pointer * } * } */ function isPtr (ptr, throwWithDetails) { var valid = true; var firstChar; try { if (isType(ptr, 'String')) { if (ptr !== '') { firstChar = ptr.charAt(0); if (['#', '/'].indexOf(firstChar) === -1) { throw new Error('ptr must start with a / or #/'); } else if (firstChar === '#' && ptr !== '#' && ptr.charAt(1) !== '/') { throw new Error('ptr must start with a / or #/'); } else if (ptr.match(badPtrTokenRegex)) { throw new Error('ptr has invalid token(s)'); } } } else { throw new Error('ptr is not a String'); } } catch (err) { if (throwWithDetails === true) { throw err; } valid = false; } return valid; } /** * Returns whether the argument represents a JSON Reference. * * An object is a JSON Reference only if the following are all true: * * * The object is of type `Object` * * The object has a `$ref` property * * The `$ref` property is a valid URI *(We do not require 100% strict URIs and will handle unescaped special * characters.)* * * @param {object} obj - The object to check * @param {boolean} [throwWithDetails=false] - Whether or not to throw an `Error` with the details as to why the value * provided is invalid * * @returns {boolean} the result of the check * * @throws {error} when the provided value is invalid and the `throwWithDetails` argument is `true` * * @alias module:JsonRefs.isRef * * @see {@link http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3} * * @example * // Separating the different ways to invoke isRef for demonstration purposes * if (isRef(obj)) { * // Handle a valid JSON Reference * } else { * // Get the reason as to why the value is not a JSON Reference so you can fix/report it * try { * isRef(str, true); * } catch (err) { * // The error message contains the details as to why the provided value is not a JSON Reference * } * } */ function isRef (obj, throwWithDetails) { return isRefLike(obj, throwWithDetails) && getRefDetails(obj, throwWithDetails).type !== 'invalid'; } /** * Returns an array of path segments for the provided JSON Pointer. * * @param {string} ptr - The JSON Pointer * * @returns {string[]} the path segments * * @throws {Error} if the provided `ptr` argument is not a JSON Pointer * * @alias module:JsonRefs.pathFromPtr */ function pathFromPtr (ptr) { if (!isPtr(ptr)) { throw new Error('ptr must be a JSON Pointer'); } var segments = ptr.split('/'); // Remove the first segment segments.shift(); return decodePath(segments); } /** * Returns a JSON Pointer for the provided array of path segments. * * **Note:** If a path segment in `path` is not a `String`, it will be converted to one using `JSON.stringify`. * * @param {string[]} path - The array of path segments * @param {boolean} [hashPrefix=true] - Whether or not create a hash-prefixed JSON Pointer * * @returns {string} the corresponding JSON Pointer * * @throws {Error} if the `path` argument is not an array * * @alias module:JsonRefs.pathToPtr */ function pathToPtr (path, hashPrefix) { if (!isType(path, 'Array')) { throw new Error('path must be an Array'); } // Encode each segment and return return (hashPrefix !== false ? '#' : '') + (path.length > 0 ? '/' : '') + encodePath(path).join('/'); } /** * Finds JSON References defined within the provided array/object and resolves them. * * @param {array|object} obj - The structure to find JSON References within * @param {module:JsonRefs~JsonRefsOptions} [options] - The JsonRefs options * * @returns {Promise} a promise that resolves a {@link module:JsonRefs~ResolvedRefsResults} and rejects with an * `Error` when the input arguments fail validation, when `options.subDocPath` points to an invalid location or when * the location argument points to an unloadable resource * * @alias module:JsonRefs.resolveRefs * * @example * // Example that only resolves relative and remote references * JsonRefs.resolveRefs(swaggerObj, { * filter: ['relative', 'remote'] * }) * .then(function (res) { * // Do something with the response * // * // res.refs: JSON Reference locations and details * // res.resolved: The document with the appropriate JSON References resolved * }, function (err) { * console.log(err.stack); * }); */ function resolveRefs (obj, options) { var allTasks = Promise.resolve(); allTasks = allTasks .then(function () { // Validate the provided document if (!isType(obj, 'Array') && !isType(obj, 'Object')) { throw new TypeError('obj must be an Array or an Object'); } // Validate options options = validateOptions(options, obj); // Clone the input so we do not alter it obj = clone(obj); }) .then(function () { return findRefsRecursive(obj, options, [], [], { documents: {}, refs: {} }); }) .then(function (allRefs) { var deferredRefs = {}; var refs = {}; function pathSorter (p1, p2) { return pathFromPtr(p1).length - pathFromPtr(p2).length; } // Resolve all references with a known value Object.keys(allRefs.refs).sort(pathSorter).forEach(function (refPtr) { var refDetails = allRefs.refs[refPtr]; // Record all direct references if (!refDetails.indirect) { refs[refPtr] = refDetails; } // Delete helper property delete refDetails.indirect; if (isType(refDetails.error, 'Undefined') && refDetails.type !== 'invalid') { if (isType(refDetails.value, 'Undefined') && refDetails.circular) { refDetails.value = refDetails.def; } // We defer processing all references without a value until later if (isType(refDetails.value, 'Undefined')) { deferredRefs[refPtr] = refDetails; } else { if (refPtr === '#') { obj = refDetails.value; } else { setValue(obj, pathFromPtr(refPtr), refDetails.value); } // Delete helper property delete refDetails.ancestorPtrs; } } else { // Delete helper property delete refDetails.ancestorPtrs; } }); // Resolve all deferred references Object.keys(deferredRefs).forEach(function (refPtr) { var refDetails = deferredRefs[refPtr]; // Attempt to resolve the value against all if its ancestors in order refDetails.ancestorPtrs.forEach(function (ancestorPtr, index) { if (isType(refDetails.value, 'Undefined')) { try { refDetails.value = findValue(allRefs.documents[ancestorPtr], pathFromPtr(refDetails.uri)); // Delete helper property delete refDetails.ancestorPtrs; setValue(obj, pathFromPtr(refPtr), refDetails.value); } catch (err) { if (index === refDetails.ancestorPtrs.length - 1) { refDetails.error = err.message; refDetails.missing = true; // Delete helper property delete refDetails.ancestorPtrs; } } } }); }); return { refs: refs, resolved: obj }; }); return allTasks; } /** * Resolves JSON References defined within the document at the provided location. * * This API is identical to {@link module:JsonRefs.resolveRefs} except this API will retrieve a remote document and then * return the result of {@link module:JsonRefs.resolveRefs} on the retrieved document. * * @param {string} location - The location to retrieve *(Can be relative or absolute, just make sure you look at the * {@link module:JsonRefs~JsonRefsOptions|options documentation} to see how relative references are handled.)* * @param {module:JsonRefs~JsonRefsOptions} [options] - The JsonRefs options * * @returns {Promise} a promise that resolves a {@link module:JsonRefs~RetrievedResolvedRefsResults} and rejects with an * `Error` when the input arguments fail validation, when `options.subDocPath` points to an invalid location or when * the location argument points to an unloadable resource * * @alias module:JsonRefs.resolveRefsAt * * @example * // Example that loads a JSON document (No options.loaderOptions.processContent required) and resolves all references * JsonRefs.resolveRefsAt('./swagger.json') * .then(function (res) { * // Do something with the response * // * // res.refs: JSON Reference locations and details * // res.resolved: The document with the appropriate JSON References resolved * // res.value: The retrieved document * }, function (err) { * console.log(err.stack); * }); */ function resolveRefsAt (location, options) { var allTasks = Promise.resolve(); allTasks = allTasks .then(function () { // Validate the provided location if (!isType(location, 'String')) { throw new TypeError('location must be a string'); } // Validate options options = validateOptions(options); // Combine the location and the optional relative base location = combineURIs(options.relativeBase, location); return getRemoteDocument(location, options); }) .then(function (res) { var cOptions = clone(options); var uriDetails = parseURI(location); // Set the sub document path if necessary if (!isType(uriDetails.fragment, 'Undefined')) { cOptions.subDocPath = pathFromPtr(decodeURI(uriDetails.fragment)); } // Update the relative base based on the retrieved location cOptions.relativeBase = path.dirname(location); return resolveRefs(res, cOptions) .then(function (res2) { return { refs: res2.refs, resolved: res2.resolved, value: res }; }); }); return allTasks; } /* Export the module members */ module.exports.clearCache = clearCache; module.exports.decodePath = decodePath; module.exports.encodePath = encodePath; module.exports.findRefs = findRefs; module.exports.findRefsAt = findRefsAt; module.exports.getRefDetails = getRefDetails; module.exports.isPtr = isPtr; module.exports.isRef = isRef; module.exports.pathFromPtr = pathFromPtr; module.exports.pathToPtr = pathToPtr; module.exports.resolveRefs = resolveRefs; module.exports.resolveRefsAt = resolveRefsAt; },{"native-promise-only":3,"path":4,"path-loader":5,"querystring":11,"slash":13,"uri-js":23}],2:[function(require,module,exports){ /** * Expose `Emitter`. */ module.exports = Emitter; /** * Initialize a new `Emitter`. * * @api public */ function Emitter(obj) { if (obj) return mixin(obj); }; /** * Mixin the emitter properties. * * @param {Object} obj * @return {Object} * @api private */ function mixin(obj) { for (var key in Emitter.prototype) { obj[key] = Emitter.prototype[key]; } return obj; } /** * Listen on the given `event` with `fn`. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.on = Emitter.prototype.addEventListener = function(event, fn){ this._callbacks = this._callbacks || {}; (this._callbacks['$' + event] = this._callbacks['$' + event] || []) .push(fn); return this; }; /** * Adds an `event` listener that will be invoked a single * time then automatically removed. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.once = function(event, fn){ function on() { this.off(event, on); fn.apply(this, arguments); } on.fn = fn; this.on(event, on); return this; }; /** * Remove the given callback for `event` or all * registered callbacks. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function(event, fn){ this._callbacks = this._callbacks || {}; // all if (0 == arguments.length) { this._callbacks = {}; return this; } // specific event var callbacks = this._callbacks['$' + event]; if (!callbacks) return this; // remove all handlers if (1 == arguments.length) { delete this._callbacks['$' + event]; return this; } // remove specific handler var cb; for (var i = 0; i < callbacks.length; i++) { cb = callbacks[i]; if (cb === fn || cb.fn === fn) { callbacks.splice(i, 1); break; } } return this; }; /** * Emit `event` with the given args. * * @param {String} event * @param {Mixed} ... * @return {Emitter} */ Emitter.prototype.emit = function(event){ this._callbacks = this._callbacks || {}; var args = [].slice.call(arguments, 1) , callbacks = this._callbacks['$' + event]; if (callbacks) { callbacks = callbacks.slice(0); for (var i = 0, len = callbacks.length; i < len; ++i) { callbacks[i].apply(this, args); } } return this; }; /** * Return array of callbacks for `event`. * * @param {String} event * @return {Array} * @api public */ Emitter.prototype.listeners = function(event){ this._callbacks = this._callbacks || {}; return this._callbacks['$' + event] || []; }; /** * Check if this emitter has `event` handlers. * * @param {String} event * @return {Boolean} * @api public */ Emitter.prototype.hasListeners = function(event){ return !! this.listeners(event).length; }; },{}],3:[function(require,module,exports){ (function (global){ /*! Native Promise Only v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org */ (function UMD(name,context,definition){ // special form of UMD for polyfilling across evironments context[name] = context[name] || definition(); if (typeof module != "undefined" && module.exports) { module.exports = context[name]; } else if (typeof define == "function" && define.amd) { define(function $AMD$(){ return context[name]; }); } })("Promise",typeof global != "undefined" ? global : this,function DEF(){ /*jshint validthis:true */ "use strict"; var builtInProp, cycle, scheduling_queue, ToString = Object.prototype.toString, timer = (typeof setImmediate != "undefined") ? function timer(fn) { return setImmediate(fn); } : setTimeout ; // dammit, IE8. try { Object.defineProperty({},"x",{}); builtInProp = function builtInProp(obj,name,val,config) { return Object.defineProperty(obj,name,{ value: val, writable: true, configurable: config !== false }); }; } catch (err) { builtInProp = function builtInProp(obj,name,val) { obj[name] = val; return obj; }; } // Note: using a queue instead of array for efficiency scheduling_queue = (function Queue() { var first, last, item; function Item(fn,self) { this.fn = fn; this.self = self; this.next = void 0; } return { add: function add(fn,self) { item = new Item(fn,self); if (last) { last.next = item; } else { first = item; } last = item; item = void 0; }, drain: function drain() { var f = first; first = last = cycle = void 0; while (f) { f.fn.call(f.self); f = f.next; } } }; })(); function schedule(fn,self) { scheduling_queue.add(fn,self); if (!cycle) { cycle = timer(scheduling_queue.drain); } } // promise duck typing function isThenable(o) { var _then, o_type = typeof o; if (o != null && ( o_type == "object" || o_type == "function" ) ) { _then = o.then; } return typeof _then == "function" ? _then : false; } function notify() { for (var i=0; i<this.chain.length; i++) { notifyIsolated( this, (this.state === 1) ? this.chain[i].success : this.chain[i].failure, this.chain[i] ); } this.chain.length = 0; } // NOTE: This is a separate function to isolate // the `try..catch` so that other code can be // optimized better function notifyIsolated(self,cb,chain) { var ret, _then; try { if (cb === false) { chain.reject(self.msg); } else { if (cb === true) { ret = self.msg; } else { ret = cb.call(void 0,self.msg); } if (ret === chain.promise) { chain.reject(TypeError("Promise-chain cycle")); } else if (_then = isThenable(ret)) { _then.call(ret,chain.resolve,chain.reject); } else { chain.resolve(ret); } } } catch (err) { chain.reject(err); } } function resolve(msg) { var _then, self = this; // already triggered? if (self.triggered) { return; } self.triggered = true; // unwrap if (self.def) { self = self.def; } try { if (_then = isThenable(msg)) { schedule(function(){ var def_wrapper = new MakeDefWrapper(self); try { _then.call(msg, function $resolve$(){ resolve.apply(def_wrapper,arguments); }, function $reject$(){ reject.apply(def_wrapper,arguments); } ); } catch (err) { reject.call(def_wrapper,err); } }) } else { self.msg = msg; self.state = 1; if (self.chain.length > 0) { schedule(notify,self); } } } catch (err) { reject.call(new MakeDefWrapper(self),err); } } function reject(msg) { var self = this; // already triggered? if (self.triggered) { return; } self.triggered = true; // unwrap if (self.def) { self = self.def; } self.msg = msg; self.state = 2; if (self.chain.length > 0) { schedule(notify,self); } } function iteratePromises(Constructor,arr,resolver,rejecter) { for (var idx=0; idx<arr.length; idx++) { (function IIFE(idx){ Constructor.resolve(arr[idx]) .then( function $resolver$(msg){ resolver(idx,msg); }, rejecter ); })(idx); } } function MakeDefWrapper(self) { this.def = self; this.triggered = false; } function MakeDef(self) { this.promise = self; this.state = 0; this.triggered = false; this.chain = []; this.msg = void 0; } function Promise(executor) { if (typeof executor != "function") { throw TypeError("Not a function"); } if (this.__NPO__ !== 0) { throw TypeError("Not a promise"); } // instance shadowing the inherited "brand" // to signal an already "initialized" promise this.__NPO__ = 1; var def = new MakeDef(this); this["then"] = function then(success,failure) { var o = { success: typeof success == "function" ? success : true, failure: typeof failure == "function" ? failure : false }; // Note: `then(..)` itself can be borrowed to be used against // a different promise constructor for making the chained promise, // by substituting a different `this` binding. o.promise = new this.constructor(function extractChain(resolve,reject) { if (typeof resolve != "function" || typeof reject != "function") { throw TypeError("Not a function"); } o.resolve = resolve; o.reject = reject; }); def.chain.push(o); if (def.state !== 0) { schedule(notify,def); } return o.promise; }; this["catch"] = function $catch$(failure) { return this.then(void 0,failure); }; try { executor.call( void 0, function publicResolve(msg){ resolve.call(def,msg); }, function publicReject(msg) { reject.call(def,msg); } ); } catch (err) { reject.call(def,err); } } var PromisePrototype = builtInProp({},"constructor",Promise, /*configurable=*/false ); // Note: Android 4 cannot use `Object.defineProperty(..)` here Promise.prototype = PromisePrototype; // built-in "brand" to signal an "uninitialized" promise builtInProp(PromisePrototype,"__NPO__",0, /*configurable=*/false ); builtInProp(Promise,"resolve",function Promise$resolve(msg) { var Constructor = this; // spec mandated checks // note: best "isPromise" check that's practical for now if (msg && typeof msg == "object" && msg.__NPO__ === 1) { return msg; } return new Constructor(function executor(resolve,reject){ if (typeof resolve != "function" || typeof reject != "function") { throw TypeError("Not a function"); } resolve(msg); }); }); builtInProp(Promise,"reject",function Promise$reject(msg) { return new this(function executor(resolve,reject){ if (typeof resolve != "function" || typeof reject != "function") { throw TypeError("Not a function"); } reject(msg); }); }); builtInProp(Promise,"all",function Promise$all(arr) { var Constructor = this; // spec mandated checks if (ToString.call(arr) != "[object Array]") { return Constructor.reject(TypeError("Not an array")); } if (arr.length === 0) { return Constructor.resolve([]); } return new Constructor(function executor(resolve,reject){ if (typeof resolve != "function" || typeof reject != "function") { throw TypeError("Not a function"); } var len = arr.length, msgs = Array(len), count = 0; iteratePromises(Constructor,arr,function resolver(idx,msg) { msgs[idx] = msg; if (++count === len) { resolve(msgs); } },reject); }); }); builtInProp(Promise,"race",function Promise$race(arr) { var Constructor = this; // spec mandated checks if (ToString.call(arr) != "[object Array]") { return Constructor.reject(TypeError("Not an array")); } return new Constructor(function executor(resolve,reject){ if (typeof resolve != "function" || typeof reject != "function") { throw TypeError("Not a function"); } iteratePromises(Constructor,arr,function resolver(idx,msg){ resolve(msg); },reject); }); }); return Promise; }); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{}],4:[function(require,module,exports){ (function (process){ // 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. // resolves . and .. elements in a path array with directory names there // must be no slashes, empty elements, or device names (c:\) in the array // (so also no leading and trailing slashes - it does not distinguish // relative and absolute paths) function normalizeArray(parts, allowAboveRoot) { // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = parts.length - 1; i >= 0; i--) { var last = parts[i]; if (last === '.') { parts.splice(i, 1); } else if (last === '..') { parts.splice(i, 1); up++; } else if (up) { parts.splice(i, 1); up--; } } // if the path is allowed to go above the root, restore leading ..s if (allowAboveRoot) { for (; up--; up) { parts.unshift('..'); } } return parts; } // Split a filename into [root, dir, basename, ext], unix version // 'root' is just a slash, or nothing. var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; var splitPath = function(filename) { return splitPathRe.exec(filename).slice(1); }; // path.resolve([from ...], to) // posix version exports.resolve = function() { var resolvedPath = '', resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { var path = (i >= 0) ? arguments[i] : process.cwd(); // Skip empty and invalid entries if (typeof path !== 'string') { throw new TypeError('Arguments to path.resolve must be strings'); } else if (!path) { continue; } resolvedPath = path + '/' + resolvedPath; resolvedAbsolute = path.charAt(0) === '/'; } // At this point the path should be resolved to a full absolute path, but // handle relative paths to be safe (might happen when process.cwd() fails) // Normalize the path resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { return !!p; }), !resolvedAbsolute).join('/'); return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; }; // path.normalize(path) // posix version exports.normalize = function(path) { var isAbsolute = exports.isAbsolute(path), trailingSlash = substr(path, -1) === '/'; // Normalize the path path = normalizeArray(filter(path.split('/'), function(p) { return !!p; }), !isAbsolute).join('/'); if (!path && !isAbsolute) { path = '.'; } if (path && trailingSlash) { path += '/'; } return (isAbsolute ? '/' : '') + path; }; // posix version exports.isAbsolute = function(path) { return path.charAt(0) === '/'; }; // posix version exports.join = function() { var paths = Array.prototype.slice.call(arguments, 0); return exports.normalize(filter(paths, function(p, index) { if (typeof p !== 'string') { throw new TypeError('Arguments to path.join must be strings'); } return p; }).join('/')); }; // path.relative(from, to) // posix version exports.relative = function(from, to) { from = exports.resolve(from).substr(1); to = exports.resolve(to).substr(1); function trim(arr) { var start = 0; for (; start < arr.length; start++) { if (arr[start] !== '') break; } var end = arr.length - 1; for (; end >= 0; end--) { if (arr[end] !== '') break; } if (start > end) return []; return arr.slice(start, end - start + 1); } var fromParts = trim(from.split('/')); var toParts = trim(to.split('/')); var length = Math.min(fromParts.length, toParts.length); var samePartsLength = length; for (var i = 0; i < length; i++) { if (fromParts[i] !== toParts[i]) { samePartsLength = i; break; } } var outputParts = []; for (var i = samePartsLength; i < fromParts.length; i++) { outputParts.push('..'); } outputParts = outputParts.concat(toParts.slice(samePartsLength)); return outputParts.join('/'); }; exports.sep = '/'; exports.delimiter = ':'; exports.dirname = function(path) { var result = splitPath(path), root = result[0], dir = result[1]; if (!root && !dir) { // No dirname whatsoever return '.'; } if (dir) { // It has a dirname, strip trailing slash dir = dir.substr(0, dir.length - 1); } return root + dir; }; exports.basename = function(path, ext) { var f = splitPath(path)[2]; // TODO: make this comparison case-insensitive on windows? if (ext && f.substr(-1 * ext.length) === ext) { f = f.substr(0, f.length - ext.length); } return f; }; exports.extname = function(path) { return splitPath(path)[3]; }; function filter (xs, f) { if (xs.filter) return xs.filter(f); var res = []; for (var i = 0; i < xs.length; i++) { if (f(xs[i], i, xs)) res.push(xs[i]); } return res; } // String.prototype.substr - negative index don't work in IE8 var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) { return str.substr(start, len) } : function (str, start, len) { if (start < 0) start = str.length + start; return str.substr(start, len); } ; }).call(this,require('_process')) },{"_process":8}],5:[function(require,module,exports){ /* * The MIT License (MIT) * * Copyright (c) 2015 Jeremy Whitlock * * 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. */ 'use strict'; /** * Utility that provides a single API for loading the content of a path/URL. * * @module PathLoader */ var supportedLoaders = { file: require('./lib/loaders/file'), http: require('./lib/loaders/http'), https: require('./lib/loaders/http') }; var defaultLoader = typeof window === 'object' || typeof importScripts === 'function' ? supportedLoaders.http : supportedLoaders.file; // Load promises polyfill if necessary /* istanbul ignore if */ if (typeof Promise === 'undefined') { require('native-promise-only'); } function getScheme (location) { if (typeof location !== 'undefined') { location = location.indexOf('://') === -1 ? '' : location.split('://')[0]; } return location; } /** * Callback used to provide access to altering a remote request prior to the request being made. * * @typedef {function} PrepareRequestCallback * * @param {object} req - The Superagent request object * @param {string} location - The location being retrieved * @param {function} callback - First callback * * @alias module:PathLoader~PrepareRequestCallback */ /** * Callback used to provide access to processing the raw response of the request being made. *(HTTP loader only)* * * @typedef {function} ProcessResponseCallback * * @param {object} res - The Superagent response object *(For non-HTTP loaders, this object will be like the Superagent * object in that it will have a `text` property whose value is the raw string value being processed. This was done * for consistency.)* * @param {function} callback - Error-first callback * * @returns {*} the result of processing the responsexs * * @alias module:PathLoader~ProcessResponseCallback */ function getLoader (location) { var scheme = getScheme(location); var loader = supportedLoaders[scheme]; if (typeof loader === 'undefined') { if (scheme === '') { loader = defaultLoader; } else { throw new Error('Unsupported scheme: ' + scheme); } } return loader; } /** * Loads a document at the provided location and returns a JavaScript object representation. * * @param {object} location - The location to the document * @param {object} [options] - The options * @param {string} [options.encoding='utf-8'] - The encoding to use when loading the file *(File loader only)* * @param {string} [options.method=get] - The HTTP method to use for the request *(HTTP loader only)* * @param {module:PathLoader~PrepareRequestCallback} [options.prepareRequest] - The callback used to prepare the request * *(HTTP loader only)* * @param {module:PathLoader~ProcessResponseCallback} [options.processContent] - The callback used to process the * response * * @returns {Promise} Always returns a promise even if there is a callback provided * * @example * // Example using Promises * * PathLoader * .load('./package.json') * .then(JSON.parse) * .then(function (document) { * console.log(document.name + ' (' + document.version + '): ' + document.description); * }, function (err) { * console.error(err.stack); * }); * * @example * // Example using options.prepareRequest to provide authentication details for a remotely secure URL * * PathLoader * .load('https://api.github.com/repos/whitlockjc/path-loader', { * prepareRequest: function (req, callback) { * req.auth('my-username', 'my-password'); * callback(undefined, req); * } * }) * .then(JSON.parse) * .then(function (document) { * console.log(document.full_name + ': ' + document.description); * }, function (err) { * console.error(err.stack); * }); * * @example * // Example loading a YAML file * * PathLoader * .load('/Users/not-you/projects/path-loader/.travis.yml') * .then(YAML.safeLoad) * .then(function (document) { * console.log('path-loader uses the', document.language, 'language.'); * }, function (err) { * console.error(err.stack); * }); * * @example * // Example loading a YAML file with options.processContent (Useful if you need information in the raw response) * * PathLoader * .load('/Users/not-you/projects/path-loader/.travis.yml', { * processContent: function (res, callback) { * callback(YAML.safeLoad(res.text)); * } * }) * .then(function (document) { * console.log('path-loader uses the', document.language, 'language.'); * }, function (err) { * console.error(err.stack); * }); */ module.exports.load = function (location, options) { var allTasks = Promise.resolve(); // Default options to empty object if (typeof options === 'undefined') { options = {}; } // Validate arguments allTasks = allTasks.then(function () { if (typeof location === 'undefined') { throw new TypeError('location is required'); } else if (typeof location !== 'string') { throw new TypeError('location must be a string'); } if (typeof options !== 'undefined') { if (typeof options !== 'object') { throw new TypeError('options must be an object'); } else if (typeof options.processContent !== 'undefined' && typeof options.processContent !== 'function') { throw new TypeError('options.processContent must be a function'); } } }); // Load the document from the provided location and process it allTasks = allTasks .then(function () { return new Promise(function (resolve, reject) { var loader = getLoader(location); loader.load(location, options || {}, function (err, document) { if (err) { reject(err); } else { resolve(document); } }); }); }) .then(function (res) { if (options.processContent) { return new Promise(function (resolve, reject) { // For consistency between file and http, always send an object with a 'text' property containing the raw // string value being processed. options.processContent(typeof res === 'object' ? res : {text: res}, function (err, processed) { if (err) { reject(err); } else { resolve(processed); } }); }); } else { // If there was no content processor, we will assume that for all objects that it is a Superagent response // and will return its `text` property value. Otherwise, we will return the raw response. return typeof res === 'object' ? res.text : res; } }); return allTasks; }; },{"./lib/loaders/file":6,"./lib/loaders/http":7,"native-promise-only":3}],6:[function(require,module,exports){ /* * The MIT License (MIT) * * Copyright (c) 2015 Jeremy Whitlock * * 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. */ 'use strict'; var unsupportedError = new TypeError('The \'file\' scheme is not supported in the browser'); /** * The file loader is not supported in the browser. * * @throws {error} the file loader is not supported in the browser */ module.exports.getBase = function () { throw unsupportedError; }; /** * The file loader is not supported in the browser. */ module.exports.load = function () { var fn = arguments[arguments.length - 1]; if (typeof fn === 'function') { fn(unsupportedError); } else { throw unsupportedError; } }; },{}],7:[function(require,module,exports){ /* eslint-env node, browser */ /* * The MIT License (MIT) * * Copyright (c) 2015 Jeremy Whitlock * * 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. */ 'use strict'; var request = require('superagent'); var supportedHttpMethods = ['delete', 'get', 'head', 'patch', 'post', 'put']; /** * Loads a file from an http or https URL. * * @param {string} location - The document URL (If relative, location is relative to window.location.origin). * @param {object} options - The loader options * @param {string} [options.method=get] - The HTTP method to use for the request * @param {module:PathLoader~PrepareRequestCallback} [options.prepareRequest] - The callback used to prepare a request * @param {module:PathLoader~ProcessResponseCallback} [options.processContent] - The callback used to process the * response * @param {function} callback - The error-first callback */ module.exports.load = function (location, options, callback) { var realMethod = options.method ? options.method.toLowerCase() : 'get'; var err; var realRequest; function makeRequest (err, req) { if (err) { callback(err); } else { // buffer() is only available in Node.js if (typeof req.buffer === 'function') { req.buffer(true); } req .end(function (err2, res) { if (err2) { callback(err2); } else { callback(undefined, res); } }); } } if (typeof options.method !== 'undefined') { if (typeof options.method !== 'string') { err = new TypeError('options.method must be a string'); } else if (supportedHttpMethods.indexOf(options.method) === -1) { err = new TypeError('options.method must be one of the following: ' + supportedHttpMethods.slice(0, supportedHttpMethods.length - 1).join(', ') + ' or ' + supportedHttpMethods[supportedHttpMethods.length - 1]); } } else if (typeof options.prepareRequest !== 'undefined' && typeof options.prepareRequest !== 'function') { err = new TypeError('options.prepareRequest must be a function'); } if (!err) { realRequest = request[realMethod === 'delete' ? 'del' : realMethod](location); if (options.prepareRequest) { try { options.prepareRequest(realRequest, makeRequest); } catch (err2) { callback(err2); } } else { makeRequest(undefined, realRequest); } } else { callback(err); } }; },{"superagent":14}],8:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = setTimeout(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; clearTimeout(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) { setTimeout(drainQueue, 0); } }; // 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.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; }; },{}],9:[function(require,module,exports){ // 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. 'use strict'; // If obj.hasOwnProperty has been overridden, then calling // obj.hasOwnProperty(prop) will break. // See: https://github.com/joyent/node/issues/1707 function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } module.exports = function(qs, sep, eq, options) { sep = sep || '&'; eq = eq || '='; var obj = {}; if (typeof qs !== 'string' || qs.length === 0) { return obj; } var regexp = /\+/g; qs = qs.split(sep); var maxKeys = 1000; if (options && typeof options.maxKeys === 'number') { maxKeys = options.maxKeys; } var len = qs.length; // maxKeys <= 0 means that we should not limit keys count if (maxKeys > 0 && len > maxKeys) { len = maxKeys; } for (var i = 0; i < len; ++i) { var x = qs[i].replace(regexp, '%20'), idx = x.indexOf(eq), kstr, vstr, k, v; if (idx >= 0) { kstr = x.substr(0, idx); vstr = x.substr(idx + 1); } else { kstr = x; vstr = ''; } k = decodeURIComponent(kstr); v = decodeURIComponent(vstr); if (!hasOwnProperty(obj, k)) { obj[k] = v; } else if (isArray(obj[k])) { obj[k].push(v); } else { obj[k] = [obj[k], v]; } } return obj; }; var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; },{}],10:[function(require,module,exports){ // 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. 'use strict'; var stringifyPrimitive = function(v) { switch (typeof v) { case 'string': return v; case 'boolean': return v ? 'true' : 'false'; case 'number': return isFinite(v) ? v : ''; default: return ''; } }; module.exports = function(obj, sep, eq, name) { sep = sep || '&'; eq = eq || '='; if (obj === null) { obj = undefined; } if (typeof obj === 'object') { return map(objectKeys(obj), function(k) { var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; if (isArray(obj[k])) { return map(obj[k], function(v) { return ks + encodeURIComponent(stringifyPrimitive(v)); }).join(sep); } else { return ks + encodeURIComponent(stringifyPrimitive(obj[k])); } }).join(sep); } if (!name) return ''; return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); }; var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; function map (xs, f) { if (xs.map) return xs.map(f); var res = []; for (var i = 0; i < xs.length; i++) { res.push(f(xs[i], i)); } return res; } var objectKeys = Object.keys || function (obj) { var res = []; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); } return res; }; },{}],11:[function(require,module,exports){ 'use strict'; exports.decode = exports.parse = require('./decode'); exports.encode = exports.stringify = require('./encode'); },{"./decode":9,"./encode":10}],12:[function(require,module,exports){ /** * Reduce `arr` with `fn`. * * @param {Array} arr * @param {Function} fn * @param {Mixed} initial * * TODO: combatible error handling? */ module.exports = function(arr, fn, initial){ var idx = 0; var len = arr.length; var curr = arguments.length == 3 ? initial : arr[idx++]; while (idx < len) { curr = fn.call(null, curr, arr[idx], ++idx, arr); } return curr; }; },{}],13:[function(require,module,exports){ 'use strict'; module.exports = function (str) { var isExtendedLengthPath = /^\\\\\?\\/.test(str); var hasNonAscii = /[^\x00-\x80]+/.test(str); if (isExtendedLengthPath || hasNonAscii) { return str; } return str.replace(/\\/g, '/'); }; },{}],14:[function(require,module,exports){ /** * Module dependencies. */ var Emitter = require('emitter'); var reduce = require('reduce'); var requestBase = require('./request-base'); var isObject = require('./is-object'); /** * Root reference for iframes. */ var root; if (typeof window !== 'undefined') { // Browser window root = window; } else if (typeof self !== 'undefined') { // Web Worker root = self; } else { // Other environments root = this; } /** * Noop. */ function noop(){}; /** * Check if `obj` is a host object, * we don't want to serialize these :) * * TODO: future proof, move to compoent land * * @param {Object} obj * @return {Boolean} * @api private */ function isHost(obj) { var str = {}.toString.call(obj); switch (str) { case '[object File]': case '[object Blob]': case '[object FormData]': return true; default: return false; } } /** * Expose `request`. */ var request = module.exports = require('./request').bind(null, Request); /** * Determine XHR. */ request.getXHR = function () { if (root.XMLHttpRequest && (!root.location || 'file:' != root.location.protocol || !root.ActiveXObject)) { return new XMLHttpRequest; } else { try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) {} try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {} try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {} try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {} } return false; }; /** * Removes leading and trailing whitespace, added to support IE. * * @param {String} s * @return {String} * @api private */ var trim = ''.trim ? function(s) { return s.trim(); } : function(s) { return s.replace(/(^\s*|\s*$)/g, ''); }; /** * Serialize the given `obj`. * * @param {Object} obj * @return {String} * @api private */ function serialize(obj) { if (!isObject(obj)) return obj; var pairs = []; for (var key in obj) { if (null != obj[key]) { pushEncodedKeyValuePair(pairs, key, obj[key]); } } return pairs.join('&'); } /** * Helps 'serialize' with serializing arrays. * Mutates the pairs array. * * @param {Array} pairs * @param {String} key * @param {Mixed} val */ function pushEncodedKeyValuePair(pairs, key, val) { if (Array.isArray(val)) { return val.forEach(function(v) { pushEncodedKeyValuePair(pairs, key, v); }); } pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(val)); } /** * Expose serialization method. */ request.serializeObject = serialize; /** * Parse the given x-www-form-urlencoded `str`. * * @param {String} str * @return {Object} * @api private */ function parseString(str) { var obj = {}; var pairs = str.split('&'); var parts; var pair; for (var i = 0, len = pairs.length; i < len; ++i) { pair = pairs[i]; parts = pair.split('='); obj[decodeURIComponent(parts[0])] = decodeURIComponent(parts[1]); } return obj; } /** * Expose parser. */ request.parseString = parseString; /** * Default MIME type map. * * superagent.types.xml = 'application/xml'; * */ request.types = { html: 'text/html', json: 'application/json', xml: 'application/xml', urlencoded: 'application/x-www-form-urlencoded', 'form': 'application/x-www-form-urlencoded', 'form-data': 'application/x-www-form-urlencoded' }; /** * Default serialization map. * * superagent.serialize['application/xml'] = function(obj){ * return 'generated xml here'; * }; * */ request.serialize = { 'application/x-www-form-urlencoded': serialize, 'application/json': JSON.stringify }; /** * Default parsers. * * superagent.parse['application/xml'] = function(str){ * return { object parsed from str }; * }; * */ request.parse = { 'application/x-www-form-urlencoded': parseString, 'application/json': JSON.parse }; /** * Parse the given header `str` into * an object containing the mapped fields. * * @param {String} str * @return {Object} * @api private */ function parseHeader(str) { var lines = str.split(/\r?\n/); var fields = {}; var index; var line; var field; var val; lines.pop(); // trailing CRLF for (var i = 0, len = lines.length; i < len; ++i) { line = lines[i]; index = line.indexOf(':'); field = line.slice(0, index).toLowerCase(); val = trim(line.slice(index + 1)); fields[field] = val; } return fields; } /** * Check if `mime` is json or has +json structured syntax suffix. * * @param {String} mime * @return {Boolean} * @api private */ function isJSON(mime) { return /[\/+]json\b/.test(mime); } /** * Return the mime type for the given `str`. * * @param {String} str * @return {String} * @api private */ function type(str){ return str.split(/ *; */).shift(); }; /** * Return header field parameters. * * @param {String} str * @return {Object} * @api private */ function params(str){ return reduce(str.split(/ *; */), function(obj, str){ var parts = str.split(/ *= */) , key = parts.shift() , val = parts.shift(); if (key && val) obj[key] = val; return obj; }, {}); }; /** * Initialize a new `Response` with the given `xhr`. * * - set flags (.ok, .error, etc) * - parse header * * Examples: * * Aliasing `superagent` as `request` is nice: * * request = superagent; * * We can use the promise-like API, or pass callbacks: * * request.get('/').end(function(res){}); * request.get('/', function(res){}); * * Sending data can be chained: * * request * .post('/user') * .send({ name: 'tj' }) * .end(function(res){}); * * Or passed to `.send()`: * * request * .post('/user') * .send({ name: 'tj' }, function(res){}); * * Or passed to `.post()`: * * request * .post('/user', { name: 'tj' }) * .end(function(res){}); * * Or further reduced to a single call for simple cases: * * request * .post('/user', { name: 'tj' }, function(res){}); * * @param {XMLHTTPRequest} xhr * @param {Object} options * @api private */ function Response(req, options) { options = options || {}; this.req = req; this.xhr = this.req.xhr; // responseText is accessible only if responseType is '' or 'text' and on older browsers this.text = ((this.req.method !='HEAD' && (this.xhr.responseType === '' || this.xhr.responseType === 'text')) || typeof this.xhr.responseType === 'undefined') ? this.xhr.responseText : null; this.statusText = this.req.xhr.statusText; this.setStatusProperties(this.xhr.status); this.header = this.headers = parseHeader(this.xhr.getAllResponseHeaders()); // getAllResponseHeaders sometimes falsely returns "" for CORS requests, but // getResponseHeader still works. so we get content-type even if getting // other headers fails. this.header['content-type'] = this.xhr.getResponseHeader('content-type'); this.setHeaderProperties(this.header); this.body = this.req.method != 'HEAD' ? this.parseBody(this.text ? this.text : this.xhr.response) : null; } /** * Get case-insensitive `field` value. * * @param {String} field * @return {String} * @api public */ Response.prototype.get = function(field){ return this.header[field.toLowerCase()]; }; /** * Set header related properties: * * - `.type` the content type without params * * A response of "Content-Type: text/plain; charset=utf-8" * will provide you with a `.type` of "text/plain". * * @param {Object} header * @api private */ Response.prototype.setHeaderProperties = function(header){ // content-type var ct = this.header['content-type'] || ''; this.type = type(ct); // params var obj = params(ct); for (var key in obj) this[key] = obj[key]; }; /** * Parse the given body `str`. * * Used for auto-parsing of bodies. Parsers * are defined on the `superagent.parse` object. * * @param {String} str * @return {Mixed} * @api private */ Response.prototype.parseBody = function(str){ var parse = request.parse[this.type]; if (!parse && isJSON(this.type)) { parse = request.parse['application/json']; } return parse && str && (str.length || str instanceof Object) ? parse(str) : null; }; /** * Set flags such as `.ok` based on `status`. * * For example a 2xx response will give you a `.ok` of __true__ * whereas 5xx will be __false__ and `.error` will be __true__. The * `.clientError` and `.serverError` are also available to be more * specific, and `.statusType` is the class of error ranging from 1..5 * sometimes useful for mapping respond colors etc. * * "sugar" properties are also defined for common cases. Currently providing: * * - .noContent * - .badRequest * - .unauthorized * - .notAcceptable * - .notFound * * @param {Number} status * @api private */ Response.prototype.setStatusProperties = function(status){ // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request if (status === 1223) { status = 204; } var type = status / 100 | 0; // status / class this.status = this.statusCode = status; this.statusType = type; // basics this.info = 1 == type; this.ok = 2 == type; this.clientError = 4 == type; this.serverError = 5 == type; this.error = (4 == type || 5 == type) ? this.toError() : false; // sugar this.accepted = 202 == status; this.noContent = 204 == status; this.badRequest = 400 == status; this.unauthorized = 401 == status; this.notAcceptable = 406 == status; this.notFound = 404 == status; this.forbidden = 403 == status; }; /** * Return an `Error` representative of this response. * * @return {Error} * @api public */ Response.prototype.toError = function(){ var req = this.req; var method = req.method; var url = req.url; var msg = 'cannot ' + method + ' ' + url + ' (' + this.status + ')'; var err = new Error(msg); err.status = this.status; err.method = method; err.url = url; return err; }; /** * Expose `Response`. */ request.Response = Response; /** * Initialize a new `Request` with the given `method` and `url`. * * @param {String} method * @param {String} url * @api public */ function Request(method, url) { var self = this; this._query = this._query || []; this.method = method; this.url = url; this.header = {}; // preserves header name case this._header = {}; // coerces header names to lowercase this.on('end', function(){ var err = null; var res = null; try { res = new Response(self); } catch(e) { err = new Error('Parser is unable to parse the response'); err.parse = true; err.original = e; // issue #675: return the raw response if the response parsing fails err.rawResponse = self.xhr && self.xhr.responseText ? self.xhr.responseText : null; // issue #876: return the http status code if the response parsing fails err.statusCode = self.xhr && self.xhr.status ? self.xhr.status : null; return self.callback(err); } self.emit('response', res); if (err) { return self.callback(err, res); } if (res.status >= 200 && res.status < 300) { return self.callback(err, res); } var new_err = new Error(res.statusText || 'Unsuccessful HTTP response'); new_err.original = err; new_err.response = res; new_err.status = res.status; self.callback(new_err, res); }); } /** * Mixin `Emitter` and `requestBase`. */ Emitter(Request.prototype); for (var key in requestBase) { Request.prototype[key] = requestBase[key]; } /** * Abort the request, and clear potential timeout. * * @return {Request} * @api public */ Request.prototype.abort = function(){ if (this.aborted) return; this.aborted = true; this.xhr.abort(); this.clearTimeout(); this.emit('abort'); return this; }; /** * Set Content-Type to `type`, mapping values from `request.types`. * * Examples: * * superagent.types.xml = 'application/xml'; * * request.post('/') * .type('xml') * .send(xmlstring) * .end(callback); * * request.post('/') * .type('application/xml') * .send(xmlstring) * .end(callback); * * @param {String} type * @return {Request} for chaining * @api public */ Request.prototype.type = function(type){ this.set('Content-Type', request.types[type] || type); return this; }; /** * Set responseType to `val`. Presently valid responseTypes are 'blob' and * 'arraybuffer'. * * Examples: * * req.get('/') * .responseType('blob') * .end(callback); * * @param {String} val * @return {Request} for chaining * @api public */ Request.prototype.responseType = function(val){ this._responseType = val; return this; }; /** * Set Accept to `type`, mapping values from `request.types`. * * Examples: * * superagent.types.json = 'application/json'; * * request.get('/agent') * .accept('json') * .end(callback); * * request.get('/agent') * .accept('application/json') * .end(callback); * * @param {String} accept * @return {Request} for chaining * @api public */ Request.prototype.accept = function(type){ this.set('Accept', request.types[type] || type); return this; }; /** * Set Authorization field value with `user` and `pass`. * * @param {String} user * @param {String} pass * @param {Object} options with 'type' property 'auto' or 'basic' (default 'basic') * @return {Request} for chaining * @api public */ Request.prototype.auth = function(user, pass, options){ if (!options) { options = { type: 'basic' } } switch (options.type) { case 'basic': var str = btoa(user + ':' + pass); this.set('Authorization', 'Basic ' + str); break; case 'auto': this.username = user; this.password = pass; break; } return this; }; /** * Add query-string `val`. * * Examples: * * request.get('/shoes') * .query('size=10') * .query({ color: 'blue' }) * * @param {Object|String} val * @return {Request} for chaining * @api public */ Request.prototype.query = function(val){ if ('string' != typeof val) val = serialize(val); if (val) this._query.push(val); return this; }; /** * Queue the given `file` as an attachment to the specified `field`, * with optional `filename`. * * ``` js * request.post('/upload') * .attach(new Blob(['<a id="a"><b id="b">hey!</b></a>'], { type: "text/html"})) * .end(callback); * ``` * * @param {String} field * @param {Blob|File} file * @param {String} filename * @return {Request} for chaining * @api public */ Request.prototype.attach = function(field, file, filename){ this._getFormData().append(field, file, filename || file.name); return this; }; Request.prototype._getFormData = function(){ if (!this._formData) { this._formData = new root.FormData(); } return this._formData; }; /** * Send `data` as the request body, defaulting the `.type()` to "json" when * an object is given. * * Examples: * * // manual json * request.post('/user') * .type('json') * .send('{"name":"tj"}') * .end(callback) * * // auto json * request.post('/user') * .send({ name: 'tj' }) * .end(callback) * * // manual x-www-form-urlencoded * request.post('/user') * .type('form') * .send('name=tj') * .end(callback) * * // auto x-www-form-urlencoded * request.post('/user') * .type('form') * .send({ name: 'tj' }) * .end(callback) * * // defaults to x-www-form-urlencoded * request.post('/user') * .send('name=tobi') * .send('species=ferret') * .end(callback) * * @param {String|Object} data * @return {Request} for chaining * @api public */ Request.prototype.send = function(data){ var obj = isObject(data); var type = this._header['content-type']; // merge if (obj && isObject(this._data)) { for (var key in data) { this._data[key] = data[key]; } } else if ('string' == typeof data) { if (!type) this.type('form'); type = this._header['content-type']; if ('application/x-www-form-urlencoded' == type) { this._data = this._data ? this._data + '&' + data : data; } else { this._data = (this._data || '') + data; } } else { this._data = data; } if (!obj || isHost(data)) return this; if (!type) this.type('json'); return this; }; /** * @deprecated */ Response.prototype.parse = function serialize(fn){ if (root.console) { console.warn("Client-side parse() method has been renamed to serialize(). This method is not compatible with superagent v2.0"); } this.serialize(fn); return this; }; Response.prototype.serialize = function serialize(fn){ this._parser = fn; return this; }; /** * Invoke the callback with `err` and `res` * and handle arity check. * * @param {Error} err * @param {Response} res * @api private */ Request.prototype.callback = function(err, res){ var fn = this._callback; this.clearTimeout(); fn(err, res); }; /** * Invoke callback with x-domain error. * * @api private */ Request.prototype.crossDomainError = function(){ var err = new Error('Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.'); err.crossDomain = true; err.status = this.status; err.method = this.method; err.url = this.url; this.callback(err); }; /** * Invoke callback with timeout error. * * @api private */ Request.prototype.timeoutError = function(){ var timeout = this._timeout; var err = new Error('timeout of ' + timeout + 'ms exceeded'); err.timeout = timeout; this.callback(err); }; /** * Enable transmission of cookies with x-domain requests. * * Note that for this to work the origin must not be * using "Access-Control-Allow-Origin" with a wildcard, * and also must set "Access-Control-Allow-Credentials" * to "true". * * @api public */ Request.prototype.withCredentials = function(){ this._withCredentials = true; return this; }; /** * Initiate request, invoking callback `fn(res)` * with an instanceof `Response`. * * @param {Function} fn * @return {Request} for chaining * @api public */ Request.prototype.end = function(fn){ var self = this; var xhr = this.xhr = request.getXHR(); var query = this._query.join('&'); var timeout = this._timeout; var data = this._formData || this._data; // store callback this._callback = fn || noop; // state change xhr.onreadystatechange = function(){ if (4 != xhr.readyState) return; // In IE9, reads to any property (e.g. status) off of an aborted XHR will // result in the error "Could not complete the operation due to error c00c023f" var status; try { status = xhr.status } catch(e) { status = 0; } if (0 == status) { if (self.timedout) return self.timeoutError(); if (self.aborted) return; return self.crossDomainError(); } self.emit('end'); }; // progress var handleProgress = function(e){ if (e.total > 0) { e.percent = e.loaded / e.total * 100; } e.direction = 'download'; self.emit('progress', e); }; if (this.hasListeners('progress')) { xhr.onprogress = handleProgress; } try { if (xhr.upload && this.hasListeners('progress')) { xhr.upload.onprogress = handleProgress; } } catch(e) { // Accessing xhr.upload fails in IE from a web worker, so just pretend it doesn't exist. // Reported here: // https://connect.microsoft.com/IE/feedback/details/837245/xmlhttprequest-upload-throws-invalid-argument-when-used-from-web-worker-context } // timeout if (timeout && !this._timer) { this._timer = setTimeout(function(){ self.timedout = true; self.abort(); }, timeout); } // querystring if (query) { query = request.serializeObject(query); this.url += ~this.url.indexOf('?') ? '&' + query : '?' + query; } // initiate request if (this.username && this.password) { xhr.open(this.method, this.url, true, this.username, this.password); } else { xhr.open(this.method, this.url, true); } // CORS if (this._withCredentials) xhr.withCredentials = true; // body if ('GET' != this.method && 'HEAD' != this.method && 'string' != typeof data && !isHost(data)) { // serialize stuff var contentType = this._header['content-type']; var serialize = this._parser || request.serialize[contentType ? contentType.split(';')[0] : '']; if (!serialize && isJSON(contentType)) serialize = request.serialize['application/json']; if (serialize) data = serialize(data); } // set header fields for (var field in this.header) { if (null == this.header[field]) continue; xhr.setRequestHeader(field, this.header[field]); } if (this._responseType) { xhr.responseType = this._responseType; } // send stuff this.emit('request', this); // IE11 xhr.send(undefined) sends 'undefined' string as POST payload (instead of nothing) // We need null here if data is undefined xhr.send(typeof data !== 'undefined' ? data : null); return this; }; /** * Expose `Request`. */ request.Request = Request; /** * GET `url` with optional callback `fn(res)`. * * @param {String} url * @param {Mixed|Function} data or fn * @param {Function} fn * @return {Request} * @api public */ request.get = function(url, data, fn){ var req = request('GET', url); if ('function' == typeof data) fn = data, data = null; if (data) req.query(data); if (fn) req.end(fn); return req; }; /** * HEAD `url` with optional callback `fn(res)`. * * @param {String} url * @param {Mixed|Function} data or fn * @param {Function} fn * @return {Request} * @api public */ request.head = function(url, data, fn){ var req = request('HEAD', url); if ('function' == typeof data) fn = data, data = null; if (data) req.send(data); if (fn) req.end(fn); return req; }; /** * DELETE `url` with optional callback `fn(res)`. * * @param {String} url * @param {Function} fn * @return {Request} * @api public */ function del(url, fn){ var req = request('DELETE', url); if (fn) req.end(fn); return req; }; request['del'] = del; request['delete'] = del; /** * PATCH `url` with optional `data` and callback `fn(res)`. * * @param {String} url * @param {Mixed} data * @param {Function} fn * @return {Request} * @api public */ request.patch = function(url, data, fn){ var req = request('PATCH', url); if ('function' == typeof data) fn = data, data = null; if (data) req.send(data); if (fn) req.end(fn); return req; }; /** * POST `url` with optional `data` and callback `fn(res)`. * * @param {String} url * @param {Mixed} data * @param {Function} fn * @return {Request} * @api public */ request.post = function(url, data, fn){ var req = request('POST', url); if ('function' == typeof data) fn = data, data = null; if (data) req.send(data); if (fn) req.end(fn); return req; }; /** * PUT `url` with optional `data` and callback `fn(res)`. * * @param {String} url * @param {Mixed|Function} data or fn * @param {Function} fn * @return {Request} * @api public */ request.put = function(url, data, fn){ var req = request('PUT', url); if ('function' == typeof data) fn = data, data = null; if (data) req.send(data); if (fn) req.end(fn); return req; }; },{"./is-object":15,"./request":17,"./request-base":16,"emitter":2,"reduce":12}],15:[function(require,module,exports){ /** * Check if `obj` is an object. * * @param {Object} obj * @return {Boolean} * @api private */ function isObject(obj) { return null != obj && 'object' == typeof obj; } module.exports = isObject; },{}],16:[function(require,module,exports){ /** * Module of mixed-in functions shared between node and client code */ var isObject = require('./is-object'); /** * Clear previous timeout. * * @return {Request} for chaining * @api public */ exports.clearTimeout = function _clearTimeout(){ this._timeout = 0; clearTimeout(this._timer); return this; }; /** * Force given parser * * Sets the body parser no matter type. * * @param {Function} * @api public */ exports.parse = function parse(fn){ this._parser = fn; return this; }; /** * Set timeout to `ms`. * * @param {Number} ms * @return {Request} for chaining * @api public */ exports.timeout = function timeout(ms){ this._timeout = ms; return this; }; /** * Faux promise support * * @param {Function} fulfill * @param {Function} reject * @return {Request} */ exports.then = function then(fulfill, reject) { return this.end(function(err, res) { err ? reject(err) : fulfill(res); }); } /** * Allow for extension */ exports.use = function use(fn) { fn(this); return this; } /** * Get request header `field`. * Case-insensitive. * * @param {String} field * @return {String} * @api public */ exports.get = function(field){ return this._header[field.toLowerCase()]; }; /** * Get case-insensitive header `field` value. * This is a deprecated internal API. Use `.get(field)` instead. * * (getHeader is no longer used internally by the superagent code base) * * @param {String} field * @return {String} * @api private * @deprecated */ exports.getHeader = exports.get; /** * Set header `field` to `val`, or multiple fields with one object. * Case-insensitive. * * Examples: * * req.get('/') * .set('Accept', 'application/json') * .set('X-API-Key', 'foobar') * .end(callback); * * req.get('/') * .set({ Accept: 'application/json', 'X-API-Key': 'foobar' }) * .end(callback); * * @param {String|Object} field * @param {String} val * @return {Request} for chaining * @api public */ exports.set = function(field, val){ if (isObject(field)) { for (var key in field) { this.set(key, field[key]); } return this; } this._header[field.toLowerCase()] = val; this.header[field] = val; return this; }; /** * Remove header `field`. * Case-insensitive. * * Example: * * req.get('/') * .unset('User-Agent') * .end(callback); * * @param {String} field */ exports.unset = function(field){ delete this._header[field.toLowerCase()]; delete this.header[field]; return this; }; /** * Write the field `name` and `val` for "multipart/form-data" * request bodies. * * ``` js * request.post('/upload') * .field('foo', 'bar') * .end(callback); * ``` * * @param {String} name * @param {String|Blob|File|Buffer|fs.ReadStream} val * @return {Request} for chaining * @api public */ exports.field = function(name, val) { this._getFormData().append(name, val); return this; }; },{"./is-object":15}],17:[function(require,module,exports){ // The node and browser modules expose versions of this with the // appropriate constructor function bound as first argument /** * Issue a request: * * Examples: * * request('GET', '/users').end(callback) * request('/users').end(callback) * request('/users', callback) * * @param {String} method * @param {String|Function} url or callback * @return {Request} * @api public */ function request(RequestConstructor, method, url) { // callback if ('function' == typeof url) { return new RequestConstructor('GET', method).end(url); } // url first if (2 == arguments.length) { return new RequestConstructor('GET', method); } return new RequestConstructor(method, url); } module.exports = request; },{}],18:[function(require,module,exports){ /*! https://mths.be/punycode v1.3.2 by @mathias, modified for URI.js */ var punycode = (function () { /** * The `punycode` object. * @name punycode * @type Object */ var punycode, /** Highest positive signed 32-bit float value */ maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 /** Bootstring parameters */ base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, // 0x80 delimiter = '-', // '\x2D' /** Regular expressions */ regexPunycode = /^xn--/, regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators /** Error messages */ errors = { 'overflow': 'Overflow: input needs wider integers to process', 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', 'invalid-input': 'Invalid input' }, /** Convenience shortcuts */ baseMinusTMin = base - tMin, floor = Math.floor, stringFromCharCode = String.fromCharCode, /** Temporary variable */ key; /*--------------------------------------------------------------------------*/ /** * A generic error utility function. * @private * @param {String} type The error type. * @returns {Error} Throws a `RangeError` with the applicable error message. */ function error(type) { throw new RangeError(errors[type]); } /** * A generic `Array#map` utility function. * @private * @param {Array} array The array to iterate over. * @param {Function} callback The function that gets called for every array * item. * @returns {Array} A new array of values returned by the callback function. */ function map(array, fn) { var length = array.length; var result = []; while (length--) { result[length] = fn(array[length]); } return result; } /** * A simple `Array#map`-like wrapper to work with domain name strings or email * addresses. * @private * @param {String} domain The domain name or email address. * @param {Function} callback The function that gets called for every * character. * @returns {Array} A new string of characters returned by the callback * function. */ function mapDomain(string, fn) { var parts = string.split('@'); var result = ''; if (parts.length > 1) { // In email addresses, only the domain name should be punycoded. Leave // the local part (i.e. everything up to `@`) intact. result = parts[0] + '@'; string = parts[1]; } // Avoid `split(regex)` for IE8 compatibility. See #17. string = string.replace(regexSeparators, '\x2E'); var labels = string.split('.'); var encoded = map(labels, fn).join('.'); return result + encoded; } /** * Creates an array containing the numeric code points of each Unicode * character in the string. While JavaScript uses UCS-2 internally, * this function will convert a pair of surrogate halves (each of which * UCS-2 exposes as separate characters) into a single code point, * matching UTF-16. * @see `punycode.ucs2.encode` * @see <https://mathiasbynens.be/notes/javascript-encoding> * @memberOf punycode.ucs2 * @name decode * @param {String} string The Unicode input string (UCS-2). * @returns {Array} The new array of code points. */ function ucs2decode(string) { var output = [], counter = 0, length = string.length, value, extra; while (counter < length) { value = string.charCodeAt(counter++); if (value >= 0xD800 && value <= 0xDBFF && counter < length) { // high surrogate, and there is a next character extra = string.charCodeAt(counter++); if ((extra & 0xFC00) == 0xDC00) { // low surrogate output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); } else { // unmatched surrogate; only append this code unit, in case the next // code unit is the high surrogate of a surrogate pair output.push(value); counter--; } } else { output.push(value); } } return output; } /** * Creates a string based on an array of numeric code points. * @see `punycode.ucs2.decode` * @memberOf punycode.ucs2 * @name encode * @param {Array} codePoints The array of numeric code points. * @returns {String} The new Unicode string (UCS-2). */ function ucs2encode(array) { return map(array, function(value) { var output = ''; if (value > 0xFFFF) { value -= 0x10000; output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); value = 0xDC00 | value & 0x3FF; } output += stringFromCharCode(value); return output; }).join(''); } /** * Converts a basic code point into a digit/integer. * @see `digitToBasic()` * @private * @param {Number} codePoint The basic numeric code point value. * @returns {Number} The numeric value of a basic code point (for use in * representing integers) in the range `0` to `base - 1`, or `base` if * the code point does not represent a value. */ function basicToDigit(codePoint) { if (codePoint - 48 < 10) { return codePoint - 22; } if (codePoint - 65 < 26) { return codePoint - 65; } if (codePoint - 97 < 26) { return codePoint - 97; } return base; } /** * Converts a digit/integer into a basic code point. * @see `basicToDigit()` * @private * @param {Number} digit The numeric value of a basic code point. * @returns {Number} The basic code point whose value (when used for * representing integers) is `digit`, which needs to be in the range * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is * used; else, the lowercase form is used. The behavior is undefined * if `flag` is non-zero and `digit` has no uppercase form. */ function digitToBasic(digit, flag) { // 0..25 map to ASCII a..z or A..Z // 26..35 map to ASCII 0..9 return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); } /** * Bias adaptation function as per section 3.4 of RFC 3492. * https://tools.ietf.org/html/rfc3492#section-3.4 * @private */ function adapt(delta, numPoints, firstTime) { var k = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { delta = floor(delta / baseMinusTMin); } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); } /** * Converts a Punycode string of ASCII-only symbols to a string of Unicode * symbols. * @memberOf punycode * @param {String} input The Punycode string of ASCII-only symbols. * @returns {String} The resulting string of Unicode symbols. */ function decode(input) { // Don't use UCS-2 var output = [], inputLength = input.length, out, i = 0, n = initialN, bias = initialBias, basic, j, index, oldi, w, k, digit, t, /** Cached calculation results */ baseMinusT; // Handle the basic code points: let `basic` be the number of input code // points before the last delimiter, or `0` if there is none, then copy // the first basic code points to the output. basic = input.lastIndexOf(delimiter); if (basic < 0) { basic = 0; } for (j = 0; j < basic; ++j) { // if it's not a basic code point if (input.charCodeAt(j) >= 0x80) { error('not-basic'); } output.push(input.charCodeAt(j)); } // Main decoding loop: start just after the last delimiter if any basic code // points were copied; start at the beginning otherwise. for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { // `index` is the index of the next character to be consumed. // Decode a generalized variable-length integer into `delta`, // which gets added to `i`. The overflow checking is easier // if we increase `i` as we go, then subtract off its starting // value at the end to obtain `delta`. for (oldi = i, w = 1, k = base; /* no condition */; k += base) { if (index >= inputLength) { error('invalid-input'); } digit = basicToDigit(input.charCodeAt(index++)); if (digit >= base || digit > floor((maxInt - i) / w)) { error('overflow'); } i += digit * w; t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); if (digit < t) { break; } baseMinusT = base - t; if (w > floor(maxInt / baseMinusT)) { error('overflow'); } w *= baseMinusT; } out = output.length + 1; bias = adapt(i - oldi, out, oldi == 0); // `i` was supposed to wrap around from `out` to `0`, // incrementing `n` each time, so we'll fix that now: if (floor(i / out) > maxInt - n) { error('overflow'); } n += floor(i / out); i %= out; // Insert `n` at position `i` of the output output.splice(i++, 0, n); } return ucs2encode(output); } /** * Converts a string of Unicode symbols (e.g. a domain name label) to a * Punycode string of ASCII-only symbols. * @memberOf punycode * @param {String} input The string of Unicode symbols. * @returns {String} The resulting Punycode string of ASCII-only symbols. */ function encode(input) { var n, delta, handledCPCount, basicLength, bias, j, m, q, k, t, currentValue, output = [], /** `inputLength` will hold the number of code points in `input`. */ inputLength, /** Cached calculation results */ handledCPCountPlusOne, baseMinusT, qMinusT; // Convert the input in UCS-2 to Unicode input = ucs2decode(input); // Cache the length inputLength = input.length; // Initialize the state n = initialN; delta = 0; bias = initialBias; // Handle the basic code points for (j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue < 0x80) { output.push(stringFromCharCode(currentValue)); } } handledCPCount = basicLength = output.length; // `handledCPCount` is the number of code points that have been handled; // `basicLength` is the number of basic code points. // Finish the basic string - if it is not empty - with a delimiter if (basicLength) { output.push(delimiter); } // Main encoding loop: while (handledCPCount < inputLength) { // All non-basic code points < n have been handled already. Find the next // larger one: for (m = maxInt, j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue >= n && currentValue < m) { m = currentValue; } } // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, // but guard against overflow handledCPCountPlusOne = handledCPCount + 1; if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { error('overflow'); } delta += (m - n) * handledCPCountPlusOne; n = m; for (j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue < n && ++delta > maxInt) { error('overflow'); } if (currentValue == n) { // Represent delta as a generalized variable-length integer for (q = delta, k = base; /* no condition */; k += base) { t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); if (q < t) { break; } qMinusT = q - t; baseMinusT = base - t; output.push( stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) ); q = floor(qMinusT / baseMinusT); } output.push(stringFromCharCode(digitToBasic(q, 0))); bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); delta = 0; ++handledCPCount; } } ++delta; ++n; } return output.join(''); } /** * Converts a Punycode string representing a domain name or an email address * to Unicode. Only the Punycoded parts of the input will be converted, i.e. * it doesn't matter if you call it on a string that has already been * converted to Unicode. * @memberOf punycode * @param {String} input The Punycoded domain name or email address to * convert to Unicode. * @returns {String} The Unicode representation of the given Punycode * string. */ function toUnicode(input) { return mapDomain(input, function(string) { return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; }); } /** * Converts a Unicode string representing a domain name or an email address to * Punycode. Only the non-ASCII parts of the domain name will be converted, * i.e. it doesn't matter if you call it with a domain that's already in * ASCII. * @memberOf punycode * @param {String} input The domain name or email address to convert, as a * Unicode string. * @returns {String} The Punycode representation of the given domain name or * email address. */ function toASCII(input) { return mapDomain(input, function(string) { return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; }); } /*--------------------------------------------------------------------------*/ /** Define the public API */ punycode = { /** * A string representing the current Punycode.js version number. * @memberOf punycode * @type String */ version: '1.3.2', /** * An object of methods to convert from JavaScript's internal character * representation (UCS-2) to Unicode code points, and back. * @see <https://mathiasbynens.be/notes/javascript-encoding> * @memberOf punycode * @type Object */ ucs2: { decode: ucs2decode, encode: ucs2encode }, decode: decode, encode: encode, toASCII: toASCII, toUnicode: toUnicode }; return punycode; }()); if (typeof COMPILED === "undefined" && typeof module !== "undefined") module.exports = punycode; },{}],19:[function(require,module,exports){ ///<reference path="commonjs.d.ts"/> require("./schemes/http"); require("./schemes/urn"); require("./schemes/mailto"); },{"./schemes/http":20,"./schemes/mailto":21,"./schemes/urn":22}],20:[function(require,module,exports){ ///<reference path="../uri.ts"/> if (typeof COMPILED === "undefined" && typeof URI === "undefined" && typeof require === "function") var URI = require("../uri"); URI.SCHEMES["http"] = URI.SCHEMES["https"] = { domainHost: true, parse: function (components, options) { //report missing host if (!components.host) { components.error = components.error || "HTTP URIs must have a host."; } return components; }, serialize: function (components, options) { //normalize the default port if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { components.port = undefined; } //normalize the empty path if (!components.path) { components.path = "/"; } //NOTE: We do not parse query strings for HTTP URIs //as WWW Form Url Encoded query strings are part of the HTML4+ spec, //and not the HTTP spec. return components; } }; },{"../uri":23}],21:[function(require,module,exports){ ///<reference path="../uri.ts"/> if (typeof COMPILED === "undefined" && typeof URI === "undefined" && typeof require === "function") { var URI = require("../uri"), punycode = require("../punycode"); } (function () { function merge() { var sets = []; for (var _i = 0; _i < arguments.length; _i++) { sets[_i - 0] = arguments[_i]; } if (sets.length > 1) { sets[0] = sets[0].slice(0, -1); var xl = sets.length - 1; for (var x = 1; x < xl; ++x) { sets[x] = sets[x].slice(1, -1); } sets[xl] = sets[xl].slice(1); return sets.join(''); } else { return sets[0]; } } function subexp(str) { return "(?:" + str + ")"; } var O = {}, isIRI = URI.IRI_SUPPORT, //RFC 3986 UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]", HEXDIG$$ = "[0-9A-Fa-f]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = //ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]", //WSP$$ = "[\\x20\\x09]", //OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]", //(%d1-8 / %d11-12 / %d14-31 / %d127) //QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$), //%d33 / %d35-91 / %d93-126 / obs-qtext //VCHAR$$ = "[\\x21-\\x7E]", //WSP$$ = "[\\x20\\x09]", //OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)), //%d0 / CR / LF / obs-qtext //FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"), //QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$), //QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'), ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]", QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]", VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"), DOT_ATOM_TEXT$ = subexp(ATEXT$$ + "+" + subexp("\\." + ATEXT$$ + "+") + "*"), QUOTED_PAIR$ = subexp("\\\\" + VCHAR$$), QCONTENT$ = subexp(QTEXT$$ + "|" + QUOTED_PAIR$), QUOTED_STRING$ = subexp('\\"' + QCONTENT$ + "*" + '\\"'), //RFC 6068 DTEXT_NO_OBS$$ = "[\\x21-\\x5A\\x5E-\\x7E]", SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]", QCHAR$ = subexp(UNRESERVED$$ + "|" + PCT_ENCODED$ + "|" + SOME_DELIMS$$), DOMAIN$ = subexp(DOT_ATOM_TEXT$ + "|" + "\\[" + DTEXT_NO_OBS$$ + "*" + "\\]"), LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + "|" + QUOTED_STRING$), ADDR_SPEC$ = subexp(LOCAL_PART$ + "\\@" + DOMAIN$), TO$ = subexp(ADDR_SPEC$ + subexp("\\," + ADDR_SPEC$) + "*"), HFNAME$ = subexp(QCHAR$ + "*"), HFVALUE$ = HFNAME$, HFIELD$ = subexp(HFNAME$ + "\\=" + HFVALUE$), HFIELDS2$ = subexp(HFIELD$ + subexp("\\&" + HFIELD$) + "*"), HFIELDS$ = subexp("\\?" + HFIELDS2$), MAILTO_URI = URI.VALIDATE_SUPPORT && new RegExp("^mailto\\:" + TO$ + "?" + HFIELDS$ + "?$"), UNRESERVED = new RegExp(UNRESERVED$$, "g"), PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"), NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"), NOT_DOMAIN = new RegExp(merge("[^]", ATEXT$$, "[\\.]", "[\\[]", DTEXT_NO_OBS$$, "[\\]]"), "g"), NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"), NOT_HFVALUE = NOT_HFNAME, TO = URI.VALIDATE_SUPPORT && new RegExp("^" + TO$ + "$"), HFIELDS = URI.VALIDATE_SUPPORT && new RegExp("^" + HFIELDS2$ + "$"); function toUpperCase(str) { return str.toUpperCase(); } function decodeUnreserved(str) { var decStr = URI.pctDecChars(str); return (!decStr.match(UNRESERVED) ? str : decStr); } function toArray(obj) { return obj !== undefined && obj !== null ? (obj instanceof Array && !obj.callee ? obj : (typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : []; } URI.SCHEMES["mailto"] = { parse: function (components, options) { if (URI.VALIDATE_SUPPORT && !components.error) { if (components.path && !TO.test(components.path)) { components.error = "Email address is not valid"; } else if (components.query && !HFIELDS.test(components.query)) { components.error = "Header fields are invalid"; } } var to = components.to = (components.path ? components.path.split(",") : []); components.path = undefined; if (components.query) { var unknownHeaders = false, headers = {}; var hfields = components.query.split("&"); for (var x = 0, xl = hfields.length; x < xl; ++x) { var hfield = hfields[x].split("="); switch (hfield[0]) { case "to": var toAddrs = hfield[1].split(","); for (var x_1 = 0, xl_1 = toAddrs.length; x_1 < xl_1; ++x_1) { to.push(toAddrs[x_1]); } break; case "subject": components.subject = URI.unescapeComponent(hfield[1], options); break; case "body": components.body = URI.unescapeComponent(hfield[1], options); break; default: unknownHeaders = true; headers[URI.unescapeComponent(hfield[0], options)] = URI.unescapeComponent(hfield[1], options); break; } } if (unknownHeaders) components.headers = headers; } components.query = undefined; for (var x = 0, xl = to.length; x < xl; ++x) { var addr = to[x].split("@"); addr[0] = URI.unescapeComponent(addr[0]); if (typeof punycode !== "undefined" && !options.unicodeSupport) { //convert Unicode IDN -> ASCII IDN try { addr[1] = punycode.toASCII(URI.unescapeComponent(addr[1], options).toLowerCase()); } catch (e) { components.error = components.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; } } else { addr[1] = URI.unescapeComponent(addr[1], options).toLowerCase(); } to[x] = addr.join("@"); } return components; }, serialize: function (components, options) { var to = toArray(components.to); if (to) { for (var x = 0, xl = to.length; x < xl; ++x) { var toAddr = String(to[x]); var atIdx = toAddr.lastIndexOf("@"); var localPart = toAddr.slice(0, atIdx); var domain = toAddr.slice(atIdx + 1); localPart = localPart.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, URI.pctEncChar); if (typeof punycode !== "undefined") { //convert IDN via punycode try { domain = (!options.iri ? punycode.toASCII(URI.unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain)); } catch (e) { components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; } } else { domain = domain.replace(PCT_ENCODED, decodeUnreserved).toLowerCase().replace(PCT_ENCODED, toUpperCase).replace(NOT_DOMAIN, URI.pctEncChar); } to[x] = localPart + "@" + domain; } components.path = to.join(","); } var headers = components.headers = components.headers || {}; if (components.subject) headers["subject"] = components.subject; if (components.body) headers["body"] = components.body; var fields = []; for (var name_1 in headers) { if (headers[name_1] !== O[name_1]) { fields.push(name_1.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, URI.pctEncChar) + "=" + headers[name_1].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, URI.pctEncChar)); } } if (fields.length) { components.query = fields.join("&"); } return components; } }; })(); },{"../punycode":18,"../uri":23}],22:[function(require,module,exports){ ///<reference path="../uri.ts"/> if (typeof COMPILED === "undefined" && typeof URI === "undefined" && typeof require === "function") var URI = require("../uri"); (function () { var pctEncChar = URI.pctEncChar, NID$ = "(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})", PCT_ENCODED$ = "(?:\\%[0-9A-Fa-f]{2})", TRANS$$ = "[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#]", NSS$ = "(?:(?:" + PCT_ENCODED$ + "|" + TRANS$$ + ")+)", URN_SCHEME = new RegExp("^urn\\:(" + NID$ + ")$"), URN_PATH = new RegExp("^(" + NID$ + ")\\:(" + NSS$ + ")$"), URN_PARSE = /^([^\:]+)\:(.*)/, URN_EXCLUDED = /[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g, UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; //RFC 2141 URI.SCHEMES["urn"] = { parse: function (components, options) { var matches = components.path.match(URN_PATH), scheme, schemeHandler; if (!matches) { if (!options.tolerant) { components.error = components.error || "URN is not strictly valid."; } matches = components.path.match(URN_PARSE); } if (matches) { scheme = "urn:" + matches[1].toLowerCase(); schemeHandler = URI.SCHEMES[scheme]; //in order to serialize properly, //every URN must have a serializer that calls the URN serializer if (!schemeHandler) { //create fake scheme handler schemeHandler = URI.SCHEMES[scheme] = { parse: function (components, options) { return components; }, serialize: URI.SCHEMES["urn"].serialize }; } components.scheme = scheme; components.path = matches[2]; components = schemeHandler.parse(components, options); } else { components.error = components.error || "URN can not be parsed."; } return components; }, serialize: function (components, options) { var scheme = components.scheme || options.scheme, matches; if (scheme && scheme !== "urn") { var matches = scheme.match(URN_SCHEME); if (!matches) { matches = ["urn:" + scheme, scheme]; } components.scheme = "urn"; components.path = matches[1] + ":" + (components.path ? components.path.replace(URN_EXCLUDED, pctEncChar) : ""); } return components; } }; //RFC 4122 URI.SCHEMES["urn:uuid"] = { parse: function (components, options) { if (!options.tolerant && (!components.path || !components.path.match(UUID))) { components.error = components.error || "UUID is not valid."; } return components; }, serialize: function (components, options) { //ensure UUID is valid if (!options.tolerant && (!components.path || !components.path.match(UUID))) { //invalid UUIDs can not have this scheme components.scheme = undefined; } else { //normalize UUID components.path = (components.path || "").toLowerCase(); } return URI.SCHEMES["urn"].serialize(components, options); } }; }()); },{"../uri":23}],23:[function(require,module,exports){ /** * URI.js * * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. * @author <a href="mailto:gary.court@gmail.com">Gary Court</a> * @version 2.0.0 * @see http://github.com/garycourt/uri-js * @license URI.js v2.0.0 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ /** * Copyright 2011 Gary Court. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. 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. * * THIS SOFTWARE IS PROVIDED BY GARY COURT ``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 GARY COURT OR * CONTRIBUTORS 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. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of Gary Court. */ ///<reference path="punycode.d.ts"/> ///<reference path="commonjs.d.ts"/> /** * Compiler switch for indicating code is compiled * @define {boolean} */ var COMPILED = false; /** * Compiler switch for supporting IRI URIs * @define {boolean} */ var URI__IRI_SUPPORT = true; /** * Compiler switch for supporting URI validation * @define {boolean} */ var URI__VALIDATE_SUPPORT = true; var URI = (function () { function merge() { var sets = []; for (var _i = 0; _i < arguments.length; _i++) { sets[_i - 0] = arguments[_i]; } if (sets.length > 1) { sets[0] = sets[0].slice(0, -1); var xl = sets.length - 1; for (var x = 1; x < xl; ++x) { sets[x] = sets[x].slice(1, -1); } sets[xl] = sets[xl].slice(1); return sets.join(''); } else { return sets[0]; } } function subexp(str) { return "(?:" + str + ")"; } function buildExps(isIRI) { var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET$ + "\\." + DEC_OCTET$ + "\\." + DEC_OCTET$ + "\\." + DEC_OCTET$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS$ = subexp(merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IPVFUTURE$ = subexp("v" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; return { URI_REF: URI__VALIDATE_SUPPORT && new RegExp("(" + GENERIC_REF$ + ")|(" + RELATIVE_REF$ + ")"), NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), NOT_HOST: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$), "g"), NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), UNRESERVED: new RegExp(UNRESERVED$$, "g"), OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), PCT_ENCODED: new RegExp(PCT_ENCODED$, "g") }; } var URI_PROTOCOL = buildExps(false), IRI_PROTOCOL = URI__IRI_SUPPORT ? buildExps(true) : undefined, URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?([^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i, RDS1 = /^\.\.?\//, RDS2 = /^\/\.(\/|$)/, RDS3 = /^\/\.\.(\/|$)/, RDS4 = /^\.\.?$/, RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/, NO_MATCH_IS_UNDEFINED = ("").match(/(){0}/)[1] === undefined; function pctEncChar(chr) { var c = chr.charCodeAt(0), e; if (c < 16) e = "%0" + c.toString(16).toUpperCase(); else if (c < 128) e = "%" + c.toString(16).toUpperCase(); else if (c < 2048) e = "%" + ((c >> 6) | 192).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); else e = "%" + ((c >> 12) | 224).toString(16).toUpperCase() + "%" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); return e; } function pctDecChars(str) { var newStr = "", i = 0, il = str.length, c, c2, c3; while (i < il) { c = parseInt(str.substr(i + 1, 2), 16); if (c < 128) { newStr += String.fromCharCode(c); i += 3; } else if (c >= 194 && c < 224) { if ((il - i) >= 6) { c2 = parseInt(str.substr(i + 4, 2), 16); newStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); } else { newStr += str.substr(i, 6); } i += 6; } else if (c >= 224) { if ((il - i) >= 9) { c2 = parseInt(str.substr(i + 4, 2), 16); c3 = parseInt(str.substr(i + 7, 2), 16); newStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); } else { newStr += str.substr(i, 9); } i += 9; } else { newStr += str.substr(i, 3); i += 3; } } return newStr; } function typeOf(o) { return o === undefined ? "undefined" : (o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase()); } function toUpperCase(str) { return str.toUpperCase(); } var SCHEMES = {}; function _normalizeComponentEncoding(components, protocol) { function decodeUnreserved(str) { var decStr = pctDecChars(str); return (!decStr.match(protocol.UNRESERVED) ? str : decStr); } if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); return components; } ; function parse(uriString, options) { if (options === void 0) { options = {}; } var protocol = (URI__IRI_SUPPORT && options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL), matches, parseError = false, components = {}, schemeHandler; if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; if (URI__VALIDATE_SUPPORT) { matches = uriString.match(protocol.URI_REF); if (matches) { if (matches[1]) { //generic URI matches = matches.slice(1, 10); } else { //relative URI matches = matches.slice(10, 19); } } if (!matches) { parseError = true; if (!options.tolerant) components.error = components.error || "URI is not strictly valid."; matches = uriString.match(URI_PARSE); } } else { matches = uriString.match(URI_PARSE); } if (matches) { if (NO_MATCH_IS_UNDEFINED) { //store each component components.scheme = matches[1]; //components.authority = matches[2]; components.userinfo = matches[3]; components.host = matches[4]; components.port = parseInt(matches[5], 10); components.path = matches[6] || ""; components.query = matches[7]; components.fragment = matches[8]; //fix port number if (isNaN(components.port)) { components.port = matches[5]; } } else { //store each component components.scheme = matches[1] || undefined; //components.authority = (uriString.indexOf("//") !== -1 ? matches[2] : undefined); components.userinfo = (uriString.indexOf("@") !== -1 ? matches[3] : undefined); components.host = (uriString.indexOf("//") !== -1 ? matches[4] : undefined); components.port = parseInt(matches[5], 10); components.path = matches[6] || ""; components.query = (uriString.indexOf("?") !== -1 ? matches[7] : undefined); components.fragment = (uriString.indexOf("#") !== -1 ? matches[8] : undefined); //fix port number if (isNaN(components.port)) { components.port = (uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined); } } //determine reference type if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { components.reference = "same-document"; } else if (components.scheme === undefined) { components.reference = "relative"; } else if (components.fragment === undefined) { components.reference = "absolute"; } else { components.reference = "uri"; } //check for reference errors if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { components.error = components.error || "URI is not a " + options.reference + " reference."; } //find scheme handler schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; //check if scheme can't handle IRIs if (URI__IRI_SUPPORT && typeof punycode !== "undefined" && !options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { //if host component is a domain name if (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) { //convert Unicode IDN -> ASCII IDN try { components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); } catch (e) { components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; } } //convert IRI -> URI _normalizeComponentEncoding(components, URI_PROTOCOL); } else { //normalize encodings _normalizeComponentEncoding(components, protocol); } //perform scheme specific parsing if (schemeHandler && schemeHandler.parse) { schemeHandler.parse(components, options); } } else { parseError = true; components.error = components.error || "URI can not be parsed."; } return components; } ; function _recomposeAuthority(components, options) { var uriTokens = []; if (components.userinfo !== undefined) { uriTokens.push(components.userinfo); uriTokens.push("@"); } if (components.host !== undefined) { uriTokens.push(components.host); } if (typeof components.port === "number") { uriTokens.push(":"); uriTokens.push(components.port.toString(10)); } return uriTokens.length ? uriTokens.join("") : undefined; } ; function removeDotSegments(input) { var output = [], s; while (input.length) { if (input.match(RDS1)) { input = input.replace(RDS1, ""); } else if (input.match(RDS2)) { input = input.replace(RDS2, "/"); } else if (input.match(RDS3)) { input = input.replace(RDS3, "/"); output.pop(); } else if (input === "." || input === "..") { input = ""; } else { s = input.match(RDS5)[0]; input = input.slice(s.length); output.push(s); } } return output.join(""); } ; function serialize(components, options) { if (options === void 0) { options = {}; } var protocol = (URI__IRI_SUPPORT && options.iri ? IRI_PROTOCOL : URI_PROTOCOL), uriTokens = [], schemeHandler, authority, s; //find scheme handler schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; //perform scheme specific serialization if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); //if host component is a domain name if (URI__IRI_SUPPORT && typeof punycode !== "undefined" && components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) { //convert IDN via punycode try { components.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host)); } catch (e) { components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; } } //normalize encoding _normalizeComponentEncoding(components, protocol); if (options.reference !== "suffix" && components.scheme) { uriTokens.push(components.scheme); uriTokens.push(":"); } authority = _recomposeAuthority(components, options); if (authority !== undefined) { if (options.reference !== "suffix") { uriTokens.push("//"); } uriTokens.push(authority); if (components.path && components.path.charAt(0) !== "/") { uriTokens.push("/"); } } if (components.path !== undefined) { s = components.path; if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { s = removeDotSegments(s); } if (authority === undefined) { s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" } uriTokens.push(s); } if (components.query !== undefined) { uriTokens.push("?"); uriTokens.push(components.query); } if (components.fragment !== undefined) { uriTokens.push("#"); uriTokens.push(components.fragment); } return uriTokens.join(''); //merge tokens into a string } ; function resolveComponents(base, relative, options, skipNormalization) { if (options === void 0) { options = {}; } var target = {}; if (!skipNormalization) { base = parse(serialize(base, options), options); //normalize base components relative = parse(serialize(relative, options), options); //normalize relative components } options = options || {}; if (!options.tolerant && relative.scheme) { target.scheme = relative.scheme; //target.authority = relative.authority; target.userinfo = relative.userinfo; target.host = relative.host; target.port = relative.port; target.path = removeDotSegments(relative.path); target.query = relative.query; } else { if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { //target.authority = relative.authority; target.userinfo = relative.userinfo; target.host = relative.host; target.port = relative.port; target.path = removeDotSegments(relative.path); target.query = relative.query; } else { if (!relative.path) { target.path = base.path; if (relative.query !== undefined) { target.query = relative.query; } else { target.query = base.query; } } else { if (relative.path.charAt(0) === "/") { target.path = removeDotSegments(relative.path); } else { if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { target.path = "/" + relative.path; } else if (!base.path) { target.path = relative.path; } else { target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; } target.path = removeDotSegments(target.path); } target.query = relative.query; } //target.authority = base.authority; target.userinfo = base.userinfo; target.host = base.host; target.port = base.port; } target.scheme = base.scheme; } target.fragment = relative.fragment; return target; } ; function resolve(baseURI, relativeURI, options) { return serialize(resolveComponents(parse(baseURI, options), parse(relativeURI, options), options, true), options); } ; function normalize(uri, options) { if (typeof uri === "string") { uri = serialize(parse(uri, options), options); } else if (typeOf(uri) === "object") { uri = parse(serialize(uri, options), options); } return uri; } ; function equal(uriA, uriB, options) { if (typeof uriA === "string") { uriA = serialize(parse(uriA, options), options); } else if (typeOf(uriA) === "object") { uriA = serialize(uriA, options); } if (typeof uriB === "string") { uriB = serialize(parse(uriB, options), options); } else if (typeOf(uriB) === "object") { uriB = serialize(uriB, options); } return uriA === uriB; } ; function escapeComponent(str, options) { return str && str.toString().replace((!URI__IRI_SUPPORT || !options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar); } ; function unescapeComponent(str, options) { return str && str.toString().replace((!URI__IRI_SUPPORT || !options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars); } ; return { IRI_SUPPORT: URI__IRI_SUPPORT, VALIDATE_SUPPORT: URI__VALIDATE_SUPPORT, pctEncChar: pctEncChar, pctDecChars: pctDecChars, SCHEMES: SCHEMES, parse: parse, _recomposeAuthority: _recomposeAuthority, removeDotSegments: removeDotSegments, serialize: serialize, resolveComponents: resolveComponents, resolve: resolve, normalize: normalize, equal: equal, escapeComponent: escapeComponent, unescapeComponent: unescapeComponent }; })(); if (!COMPILED && typeof module !== "undefined" && typeof require === "function") { var punycode = require("./punycode"); module.exports = URI; require("./schemes"); } },{"./punycode":18,"./schemes":19}]},{},[1])(1) }); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJpbmRleC5qcyIsIm5vZGVfbW9kdWxlcy9jb21wb25lbnQtZW1pdHRlci9pbmRleC5qcyIsIm5vZGVfbW9kdWxlcy9uYXRpdmUtcHJvbWlzZS1vbmx5L2xpYi9ucG8uc3JjLmpzIiwibm9kZV9tb2R1bGVzL3BhdGgtYnJvd3NlcmlmeS9pbmRleC5qcyIsIm5vZGVfbW9kdWxlcy9wYXRoLWxvYWRlci9pbmRleC5qcyIsIm5vZGVfbW9kdWxlcy9wYXRoLWxvYWRlci9saWIvbG9hZGVycy9maWxlLWJyb3dzZXIuanMiLCJub2RlX21vZHVsZXMvcGF0aC1sb2FkZXIvbGliL2xvYWRlcnMvaHR0cC5qcyIsIm5vZGVfbW9kdWxlcy9wcm9jZXNzL2Jyb3dzZXIuanMiLCJub2RlX21vZHVsZXMvcXVlcnlzdHJpbmctZXMzL2RlY29kZS5qcyIsIm5vZGVfbW9kdWxlcy9xdWVyeXN0cmluZy1lczMvZW5jb2RlLmpzIiwibm9kZV9tb2R1bGVzL3F1ZXJ5c3RyaW5nLWVzMy9pbmRleC5qcyIsIm5vZGVfbW9kdWxlcy9yZWR1Y2UtY29tcG9uZW50L2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL3NsYXNoL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL3N1cGVyYWdlbnQvbGliL2NsaWVudC5qcyIsIm5vZGVfbW9kdWxlcy9zdXBlcmFnZW50L2xpYi9pcy1vYmplY3QuanMiLCJub2RlX21vZHVsZXMvc3VwZXJhZ2VudC9saWIvcmVxdWVzdC1iYXNlLmpzIiwibm9kZV9tb2R1bGVzL3N1cGVyYWdlbnQvbGliL3JlcXVlc3QuanMiLCJub2RlX21vZHVsZXMvdXJpLWpzL2J1aWxkL3B1bnljb2RlLmpzIiwibm9kZV9tb2R1bGVzL3VyaS1qcy9idWlsZC9zY2hlbWVzLmpzIiwibm9kZV9tb2R1bGVzL3VyaS1qcy9idWlsZC9zY2hlbWVzL2h0dHAuanMiLCJub2RlX21vZHVsZXMvdXJpLWpzL2J1aWxkL3NjaGVtZXMvbWFpbHRvLmpzIiwibm9kZV9tb2R1bGVzL3VyaS1qcy9idWlsZC9zY2hlbWVzL3Vybi5qcyIsIm5vZGVfbW9kdWxlcy91cmktanMvYnVpbGQvdXJpLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FDQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNyMkNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FDaktBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7O0FDclhBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7OztBQ2hPQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQ3JPQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQ2pEQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNoR0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUMzRkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FDcEZBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FDckZBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FDSkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQ3ZCQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FDWEE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FDcmpDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQ2JBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FDdEtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNoQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNoZkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNKQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUMzQkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUM3SkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUN6RUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiLypcbiAqIFRoZSBNSVQgTGljZW5zZSAoTUlUKVxuICpcbiAqIENvcHlyaWdodCAoYykgMjAxNCBKZXJlbXkgV2hpdGxvY2tcbiAqXG4gKiBQZXJtaXNzaW9uIGlzIGhlcmVieSBncmFudGVkLCBmcmVlIG9mIGNoYXJnZSwgdG8gYW55IHBlcnNvbiBvYnRhaW5pbmcgYSBjb3B5XG4gKiBvZiB0aGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmlsZXMgKHRoZSBcIlNvZnR3YXJlXCIpLCB0byBkZWFsXG4gKiBpbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRhdGlvbiB0aGUgcmlnaHRzXG4gKiB0byB1c2UsIGNvcHksIG1vZGlmeSwgbWVyZ2UsIHB1Ymxpc2gsIGRpc3RyaWJ1dGUsIHN1YmxpY2Vuc2UsIGFuZC9vciBzZWxsXG4gKiBjb3BpZXMgb2YgdGhlIFNvZnR3YXJlLCBhbmQgdG8gcGVybWl0IHBlcnNvbnMgdG8gd2hvbSB0aGUgU29mdHdhcmUgaXNcbiAqIGZ1cm5pc2hlZCB0byBkbyBzbywgc3ViamVjdCB0byB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnM6XG4gKlxuICogVGhlIGFib3ZlIGNvcHlyaWdodCBub3RpY2UgYW5kIHRoaXMgcGVybWlzc2lvbiBub3RpY2Ugc2hhbGwgYmUgaW5jbHVkZWQgaW5cbiAqIGFsbCBjb3BpZXMgb3Igc3Vic3RhbnRpYWwgcG9ydGlvbnMgb2YgdGhlIFNvZnR3YXJlLlxuICpcbiAqIFRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCBcIkFTIElTXCIsIFdJVEhPVVQgV0FSUkFOVFkgT0YgQU5ZIEtJTkQsIEVYUFJFU1MgT1JcbiAqIElNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLFxuICogRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UgQU5EIE5PTklORlJJTkdFTUVOVC4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFXG4gKiBBVVRIT1JTIE9SIENPUFlSSUdIVCBIT0xERVJTIEJFIExJQUJMRSBGT1IgQU5ZIENMQUlNLCBEQU1BR0VTIE9SIE9USEVSXG4gKiBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLFxuICogT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPUiBPVEhFUiBERUFMSU5HUyBJTlxuICogVEhFIFNPRlRXQVJFLlxuICovXG5cbid1c2Ugc3RyaWN0JztcblxuLyoqXG4gKiBWYXJpb3VzIHV0aWxpdGllcyBmb3IgSlNPTiBSZWZlcmVuY2VzICooaHR0cDovL3Rvb2xzLmlldGYub3JnL2h0bWwvZHJhZnQtcGJyeWFuLXp5cC1qc29uLXJlZi0wMykqIGFuZFxuICogSlNPTiBQb2ludGVycyAqKGh0dHBzOi8vdG9vbHMuaWV0Zi5vcmcvaHRtbC9yZmM2OTAxKSouXG4gKlxuICogQG1vZHVsZSBKc29uUmVmc1xuICovXG5cbnZhciBwYXRoID0gcmVxdWlyZSgncGF0aCcpO1xudmFyIFBhdGhMb2FkZXIgPSByZXF1aXJlKCdwYXRoLWxvYWRlcicpO1xudmFyIHFzID0gcmVxdWlyZSgncXVlcnlzdHJpbmcnKTtcbnZhciBzbGFzaCA9IHJlcXVpcmUoJ3NsYXNoJyk7XG52YXIgVVJJID0gcmVxdWlyZSgndXJpLWpzJyk7XG5cbnZhciBiYWRQdHJUb2tlblJlZ2V4ID0gL34oPzpbXjAxXXwkKS9nO1xudmFyIHJlbW90ZUNhY2hlID0ge307XG52YXIgcmVtb3RlVHlwZXMgPSBbJ3JlbGF0aXZlJywgJ3JlbW90ZSddO1xudmFyIHJlbW90ZVVyaVR5cGVzID0gWydhYnNvbHV0ZScsICd1cmknXTtcbnZhciB1cmlEZXRhaWxzQ2FjaGUgPSB7fTtcblxuLy8gTG9hZCBwcm9taXNlcyBwb2x5ZmlsbCBpZiBuZWNlc3Nhcnlcbi8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuaWYgKHR5cGVvZiBQcm9taXNlID09PSAndW5kZWZpbmVkJykge1xuICByZXF1aXJlKCduYXRpdmUtcHJvbWlzZS1vbmx5Jyk7XG59XG5cbi8qIEludGVybmFsIEZ1bmN0aW9ucyAqL1xuXG4vLyBUaGlzIGlzIGEgdmVyeSBzaW1wbGlzdGljIGNsb25lIGZ1bmN0aW9uIHRoYXQgZG9lcyBub3QgdGFrZSBpbnRvIGFjY291bnQgbm9uLUpTT04gdHlwZXMuICBGb3IgdGhlc2UgdHlwZXMgdGhlXG4vLyBvcmlnaW5hbCB2YWx1ZSBpcyB1c2VkIGFzIHRoZSBjbG9uZS4gIFNvIHdoaWxlIGl0J3Mgbm90IGEgY29tcGxldGUgZGVlcCBjbG9uZSwgZm9yIHRoZSBuZWVkcyBvZiB0aGlzIHByb2plY3Rcbi8vIHRoaXMgc2hvdWxkIGJlIHN1ZmZpY2llbnQuXG5mdW5jdGlvbiBjbG9uZSAob2JqKSB7XG4gIHZhciBjbG9uZWQ7XG5cbiAgaWYgKGlzVHlwZShvYmosICdBcnJheScpKSB7XG4gICAgY2xvbmVkID0gW107XG5cbiAgICBvYmouZm9yRWFjaChmdW5jdGlvbiAodmFsdWUsIGluZGV4KSB7XG4gICAgICBjbG9uZWRbaW5kZXhdID0gY2xvbmUodmFsdWUpO1xuICAgIH0pO1xuICB9IGVsc2UgaWYgKGlzVHlwZShvYmosICdPYmplY3QnKSkge1xuICAgIGNsb25lZCA9IHt9O1xuXG4gICAgT2JqZWN0LmtleXMob2JqKS5mb3JFYWNoKGZ1bmN0aW9uIChrZXkpIHtcbiAgICAgIGNsb25lZFtrZXldID0gY2xvbmUob2JqW2tleV0pO1xuICAgIH0pO1xuICB9IGVsc2Uge1xuICAgIGNsb25lZCA9IG9iajtcbiAgfVxuXG4gIHJldHVybiBjbG9uZWQ7XG59XG5cbmZ1bmN0aW9uIGNvbWJpbmVRdWVyeVBhcmFtcyAocXMxLCBxczIpIHtcbiAgdmFyIGNvbWJpbmVkID0ge307XG5cbiAgZnVuY3Rpb24gbWVyZ2VRdWVyeVBhcmFtcyAob2JqKSB7XG4gICAgT2JqZWN0LmtleXMob2JqKS5mb3JFYWNoKGZ1bmN0aW9uIChrZXkpIHtcbiAgICAgIGNvbWJpbmVkW2tleV0gPSBvYmpba2V5XTtcbiAgICB9KTtcbiAgfVxuXG4gIG1lcmdlUXVlcnlQYXJhbXMocXMucGFyc2UocXMxIHx8ICcnKSk7XG4gIG1lcmdlUXVlcnlQYXJhbXMocXMucGFyc2UocXMyIHx8ICcnKSk7XG5cbiAgcmV0dXJuIE9iamVjdC5rZXlzKGNvbWJpbmVkKS5sZW5ndGggPT09IDAgPyB1bmRlZmluZWQgOiBxcy5zdHJpbmdpZnkoY29tYmluZWQpO1xufVxuXG5mdW5jdGlvbiBjb21iaW5lVVJJcyAodTEsIHUyKSB7XG4gIC8vIENvbnZlcnQgV2luZG93cyBwYXRoc1xuICBpZiAoaXNUeXBlKHUxLCAnU3RyaW5nJykpIHtcbiAgICB1MSA9IHNsYXNoKHUxKTtcbiAgfVxuXG4gIGlmIChpc1R5cGUodTIsICdTdHJpbmcnKSkge1xuICAgIHUyID0gc2xhc2godTIpO1xuICB9XG5cbiAgdmFyIHUyRGV0YWlscyA9IHBhcnNlVVJJKGlzVHlwZSh1MiwgJ1VuZGVmaW5lZCcpID8gJycgOiB1Mik7XG4gIHZhciB1MURldGFpbHM7XG4gIHZhciBjb21iaW5lZERldGFpbHM7XG5cbiAgaWYgKHJlbW90ZVVyaVR5cGVzLmluZGV4T2YodTJEZXRhaWxzLnJlZmVyZW5jZSkgPiAtMSkge1xuICAgIGNvbWJpbmVkRGV0YWlscyA9IHUyRGV0YWlscztcbiAgfSBlbHNlIHtcbiAgICB1MURldGFpbHMgPSBpc1R5cGUodTEsICdVbmRlZmluZWQnKSA/IHVuZGVmaW5lZCA6IHBhcnNlVVJJKHUxKTtcblxuICAgIGlmICghaXNUeXBlKHUxRGV0YWlscywgJ1VuZGVmaW5lZCcpKSB7XG4gICAgICBjb21iaW5lZERldGFpbHMgPSB1MURldGFpbHM7XG5cbiAgICAgIC8vIEpvaW4gdGhlIHBhdGhzXG4gICAgICBjb21iaW5lZERldGFpbHMucGF0aCA9IHNsYXNoKHBhdGguam9pbih1MURldGFpbHMucGF0aCwgdTJEZXRhaWxzLnBhdGgpKTtcblxuICAgICAgLy8gSm9pbiBxdWVyeSBwYXJhbWV0ZXJzXG4gICAgICBjb21iaW5lZERldGFpbHMucXVlcnkgPSBjb21iaW5lUXVlcnlQYXJhbXModTFEZXRhaWxzLnF1ZXJ5LCB1MkRldGFpbHMucXVlcnkpO1xuICAgIH0gZWxzZSB7XG4gICAgICBjb21iaW5lZERldGFpbHMgPSB1MkRldGFpbHM7XG4gICAgfVxuICB9XG5cbiAgLy8gUmVtb3ZlIHRoZSBmcmFnbWVudFxuICBjb21iaW5lZERldGFpbHMuZnJhZ21lbnQgPSB1bmRlZmluZWQ7XG5cbiAgLy8gRm9yIHJlbGF0aXZlIFVSSXMsIGFkZCBiYWNrIHRoZSAnLi4nIHNpbmNlIGl0IHdhcyByZW1vdmVkIGFib3ZlXG4gIHJldHVybiAocmVtb3RlVXJpVHlwZXMuaW5kZXhPZihjb21iaW5lZERldGFpbHMucmVmZXJlbmNlKSA9PT0gLTEgJiZcbiAgICAgICAgICBjb21iaW5lZERldGFpbHMucGF0aC5pbmRleE9mKCcuLi8nKSA9PT0gMCA/ICcuLi8nIDogJycpICsgVVJJLnNlcmlhbGl6ZShjb21iaW5lZERldGFpbHMpO1xufVxuXG5mdW5jdGlvbiBmaW5kQW5jZXN0b3JzIChvYmosIHBhdGgpIHtcbiAgdmFyIGFuY2VzdG9ycyA9IFtdO1xuICB2YXIgbm9kZTtcblxuICBpZiAocGF0aC5sZW5ndGggPiAwKSB7XG4gICAgbm9kZSA9IG9iajtcblxuICAgIHBhdGguc2xpY2UoMCwgcGF0aC5sZW5ndGggLSAxKS5mb3JFYWNoKGZ1bmN0aW9uIChzZWcpIHtcbiAgICAgIGlmIChzZWcgaW4gbm9kZSkge1xuICAgICAgICBub2RlID0gbm9kZVtzZWddO1xuXG4gICAgICAgIGFuY2VzdG9ycy5wdXNoKG5vZGUpO1xuICAgICAgfVxuICAgIH0pO1xuICB9XG5cbiAgcmV0dXJuIGFuY2VzdG9ycztcbn1cblxuZnVuY3Rpb24gcHJvY2Vzc1N1YkRvY3VtZW50IChtb2RlLCBkb2MsIHN1YkRvY1BhdGgsIHJlZkRldGFpbHMsIG9wdGlvbnMsIHBhcmVudHMsIHBhcmVudFB0cnMsIGFsbFJlZnMsIGluZGlyZWN0KSB7XG4gIHZhciByZWZWYWx1ZTtcbiAgdmFyIHJPcHRpb25zO1xuXG4gIGlmIChzdWJEb2NQYXRoLmxlbmd0aCA+IDApIHtcbiAgICB0cnkge1xuICAgICAgcmVmVmFsdWUgPSBmaW5kVmFsdWUoZG9jLCBzdWJEb2NQYXRoKTtcbiAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgIC8vIFdlIG9ubHkgbWFyayBtaXNzaW5nIHJlbW90ZSByZWZlcmVuY2VzIGFzIG1pc3NpbmcgYmVjYXVzZSBsb2NhbCByZWZlcmVuY2VzIGNhbiBoYXZlIGRlZmVycmVkIHZhbHVlc1xuICAgICAgaWYgKG1vZGUgPT09ICdyZW1vdGUnKSB7XG4gICAgICAgIHJlZkRldGFpbHMuZXJyb3IgPSBlcnIubWVzc2FnZTtcbiAgICAgICAgcmVmRGV0YWlscy5taXNzaW5nID0gdHJ1ZTtcbiAgICAgIH1cbiAgICB9XG4gIH0gZWxzZSB7XG4gICAgcmVmVmFsdWUgPSBkb2M7XG4gIH1cblxuICBpZiAoIWlzVHlwZShyZWZWYWx1ZSwgJ1VuZGVmaW5lZCcpKSB7XG4gICAgcmVmRGV0YWlscy52YWx1ZSA9IHJlZlZhbHVlO1xuICB9XG5cbiAgaWYgKGlzVHlwZShyZWZWYWx1ZSwgJ0FycmF5JykgfHwgaXNUeXBlKHJlZlZhbHVlLCAnT2JqZWN0JykpIHtcbiAgICByT3B0aW9ucyA9IGNsb25lKG9wdGlvbnMpO1xuXG4gICAgaWYgKG1vZGUgPT09ICdsb2NhbCcpIHtcbiAgICAgIGRlbGV0ZSByT3B0aW9ucy5zdWJEb2NQYXRoO1xuXG4gICAgICAvLyBUcmF2ZXJzZSB0aGUgZGVyZWZlcmVuY2VkIHZhbHVlXG4gICAgICBkb2MgPSByZWZWYWx1ZTtcbiAgICB9IGVsc2Uge1xuICAgICAgck9wdGlvbnMucmVsYXRpdmVCYXNlID0gcGF0aC5kaXJuYW1lKHBhcmVudHNbcGFyZW50cy5sZW5ndGggLSAxXSk7XG5cbiAgICAgIGlmIChzdWJEb2NQYXRoLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICBkZWxldGUgck9wdGlvbnMuc3ViRG9jUGF0aDtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJPcHRpb25zLnN1YkRvY1BhdGggPSBzdWJEb2NQYXRoO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBmaW5kUmVmc1JlY3Vyc2l2ZShkb2MsIHJPcHRpb25zLCBwYXJlbnRzLCBwYXJlbnRQdHJzLCBhbGxSZWZzLCBpbmRpcmVjdCk7XG4gIH1cbn1cblxuLy8gU2hvdWxkIHRoaXMgYmUgaXRzIG93biBleHBvcnRlZCBBUEk/XG5mdW5jdGlvbiBmaW5kUmVmc1JlY3Vyc2l2ZSAob2JqLCBvcHRpb25zLCBwYXJlbnRzLCBwYXJlbnRQdHJzLCBhbGxSZWZzLCBpbmRpcmVjdCkge1xuICB2YXIgYWxsVGFza3MgPSBQcm9taXNlLnJlc29sdmUoKTtcbiAgdmFyIHBhcmVudFBhdGggPSBwYXJlbnRQdHJzLmxlbmd0aCA/IHBhdGhGcm9tUHRyKHBhcmVudFB0cnNbcGFyZW50UHRycy5sZW5ndGggLSAxXSkgOiBbXTtcbiAgdmFyIHJlZnMgPSBmaW5kUmVmcyhvYmosIG9wdGlvbnMpO1xuICB2YXIgc3ViRG9jUGF0aCA9IG9wdGlvbnMuc3ViRG9jUGF0aCB8fCBbXTtcbiAgdmFyIHN1YkRvY1B0ciA9IHBhdGhUb1B0cihzdWJEb2NQYXRoKTtcbiAgdmFyIGFuY2VzdG9yUHRycyA9IFsnIyddO1xuXG4gIHBhcmVudHMuZm9yRWFjaChmdW5jdGlvbiAocGFyZW50LCBpbmRleCkge1xuICAgIGlmIChwYXJlbnQuY2hhckF0KDApICE9PSAnIycpIHtcbiAgICAgIGFuY2VzdG9yUHRycy5wdXNoKHBhcmVudFB0cnNbaW5kZXhdKTtcbiAgICB9XG4gIH0pO1xuXG4gIC8vIFJldmVyc2UgdGhlIG9yZGVyIHNvIHdlIHNlYXJjaCB0aGVtIGluIHRoZSBwcm9wZXIgb3JkZXJcbiAgYW5jZXN0b3JQdHJzLnJldmVyc2UoKTtcblxuICBpZiAoKHBhcmVudHNbcGFyZW50cy5sZW5ndGggLSAxXSB8fCAnJykuY2hhckF0KDApICE9PSAnIycpIHtcbiAgICBhbGxSZWZzLmRvY3VtZW50c1twYXRoVG9QdHIocGFyZW50UGF0aCldID0gb2JqO1xuICB9XG5cbiAgT2JqZWN0LmtleXMocmVmcykuZm9yRWFjaChmdW5jdGlvbiAocmVmUHRyKSB7XG4gICAgdmFyIHJlZkRldGFpbHMgPSByZWZzW3JlZlB0cl07XG4gICAgdmFyIGxvY2F0aW9uO1xuICAgIHZhciBwYXJlbnRJbmRleDtcbiAgICB2YXIgcmVmRnVsbFBhdGg7XG4gICAgdmFyIHJlZkZ1bGxQdHI7XG5cbiAgICAvLyBJZiB0aGVyZSBhcmUgbm8gcGFyZW50cywgdHJlYXQgdGhlIHJlZmVyZW5jZSBwb2ludGVyIGFzLWlzLiAgT3RoZXJ3aXNlLCB0aGUgcmVmZXJlbmNlIGlzIGEgcmVmZXJlbmNlIHdpdGhpbiBhXG4gICAgLy8gcmVtb3RlIGRvY3VtZW50IGFuZCBpdHMgc3ViIGRvY3VtZW50IHBhdGggcHJlZml4IG11c3QgYmUgcmVtb3ZlZC5cbiAgICBpZiAocGFyZW50cy5sZW5ndGggPT09IDApIHtcbiAgICAgIHJlZkZ1bGxQYXRoID0gcGFyZW50UGF0aC5jb25jYXQocGF0aEZyb21QdHIocmVmUHRyKSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJlZkZ1bGxQYXRoID0gcGFyZW50UGF0aC5jb25jYXQocGF0aEZyb21QdHIocmVmUHRyKS5zbGljZShwYXJlbnRzLmxlbmd0aCA9PT0gMCA/IDAgOiBzdWJEb2NQYXRoLmxlbmd0aCkpO1xuICAgIH1cblxuICAgIHJlZkZ1bGxQdHIgPSBwYXRoVG9QdHIocmVmRnVsbFBhdGgpO1xuXG4gICAgLy8gSXQgaXMgcG9zc2libGUgdG8gcHJvY2VzcyB0aGUgc2FtZSByZWZlcmVuY2UgbW9yZSB0aGFuIG9uY2UgaW4gdGhlIGV2ZW50IG9mIGhpZXJhcmNoaWNhbCByZWZlcmVuY2VzIHNvIHdlIGF2b2lkXG4gICAgLy8gcHJvY2Vzc2luZyBhIHJlZmVyZW5jZSBpZiB3ZSd2ZSBhbHJlYWR5IGRvbmUgc28uXG4gICAgaWYgKCFpc1R5cGUoYWxsUmVmc1tyZWZGdWxsUHRyXSwgJ1VuZGVmaW5lZCcpKSB7XG4gICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgLy8gUmVjb3JkIHRoZSByZWZlcmVuY2UgbWV0YWRhdGFcbiAgICBhbGxSZWZzLnJlZnNbcmVmRnVsbFB0cl0gPSByZWZzW3JlZlB0cl07XG5cbiAgICAvLyBEbyBub3QgcHJvY2VzcyBpbnZhbGlkIHJlZmVyZW5jZXNcbiAgICBpZiAoaXNUeXBlKHJlZkRldGFpbHMuZXJyb3IsICdVbmRlZmluZWQnKSAmJiByZWZEZXRhaWxzLnR5cGUgIT09ICdpbnZhbGlkJykge1xuICAgICAgaWYgKHJlbW90ZVR5cGVzLmluZGV4T2YocmVmRGV0YWlscy50eXBlKSA+IC0xKSB7XG4gICAgICAgIGxvY2F0aW9uID0gY29tYmluZVVSSXMob3B0aW9ucy5yZWxhdGl2ZUJhc2UsIHJlZkRldGFpbHMudXJpKTtcbiAgICAgICAgcGFyZW50SW5kZXggPSBwYXJlbnRzLmluZGV4T2YobG9jYXRpb24pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgbG9jYXRpb24gPSByZWZEZXRhaWxzLnVyaTtcbiAgICAgICAgcGFyZW50SW5kZXggPSBwYXJlbnRQdHJzLmluZGV4T2YobG9jYXRpb24pO1xuICAgICAgfVxuXG4gICAgICAvLyBSZWNvcmQgYW5jZXN0b3IgcGF0aHNcbiAgICAgIHJlZkRldGFpbHMuYW5jZXN0b3JQdHJzID0gYW5jZXN0b3JQdHJzO1xuXG4gICAgICAvLyBSZWNvcmQgaWYgdGhlIHJlZmVyZW5jZSBpcyBpbmRpcmVjdCBiYXNlZCBvbiBpdHMgcGFyZW50XG4gICAgICByZWZEZXRhaWxzLmluZGlyZWN0ID0gaW5kaXJlY3Q7XG5cbiAgICAgIC8vIE9ubHkgcHJvY2VzcyBub24tY2lyY3VsYXIgcmVmZXJlbmNlcyBmdXJ0aGVyXG4gICAgICBpZiAocGFyZW50SW5kZXggPT09IC0xKSB7XG4gICAgICAgIGlmIChyZW1vdGVUeXBlcy5pbmRleE9mKHJlZkRldGFpbHMudHlwZSkgPiAtMSkge1xuICAgICAgICAgIGFsbFRhc2tzID0gYWxsVGFza3NcbiAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGdldFJlbW90ZURvY3VtZW50KGxvY2F0aW9uLCBvcHRpb25zKVxuICAgICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uIChkb2MpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBwcm9jZXNzU3ViRG9jdW1lbnQoJ3JlbW90ZScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvYyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNUeXBlKHJlZkRldGFpbHMudXJpRGV0YWlscy5mcmFnbWVudCwgJ1VuZGVmaW5lZCcpID9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0aEZyb21QdHIoZGVjb2RlVVJJKHJlZkRldGFpbHMudXJpRGV0YWlscy5mcmFnbWVudCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZEZXRhaWxzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnRzLmNvbmNhdChsb2NhdGlvbiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudFB0cnMuY29uY2F0KHJlZkZ1bGxQdHIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGxSZWZzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRpcmVjdCk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24gKGVycikge1xuICAgICAgICAgICAgICAgICAgcmVmRGV0YWlscy5lcnJvciA9IGVyci5tZXNzYWdlO1xuICAgICAgICAgICAgICAgICAgcmVmRGV0YWlscy5taXNzaW5nID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmIChyZWZGdWxsUHRyLmluZGV4T2YobG9jYXRpb24gKyAnLycpICE9PSAwICYmIHJlZkZ1bGxQdHIgIT09IGxvY2F0aW9uICYmXG4gICAgICAgICAgICAgIHN1YkRvY1B0ci5pbmRleE9mKGxvY2F0aW9uICsgJy8nKSAhPT0gMCAmJiBzdWJEb2NQdHIgIT09IGxvY2F0aW9uKSB7XG4gICAgICAgICAgICBpZiAobG9jYXRpb24uaW5kZXhPZihzdWJEb2NQdHIgKyAnLycpICE9PSAwKSB7XG4gICAgICAgICAgICAgIGFsbFRhc2tzID0gYWxsVGFza3NcbiAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gcHJvY2Vzc1N1YkRvY3VtZW50KCdsb2NhbCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iaixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0aEZyb21QdHIobG9jYXRpb24pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZEZXRhaWxzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnRzLmNvbmNhdChsb2NhdGlvbiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudFB0cnMuY29uY2F0KHJlZkZ1bGxQdHIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGxSZWZzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRpcmVjdCB8fCAobG9jYXRpb24uaW5kZXhPZihzdWJEb2NQdHIgKyAnLycpID09PSAtMSAmJiBsb2NhdGlvbiAhPT0gc3ViRG9jUHRyKSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJlZkRldGFpbHMuY2lyY3VsYXIgPSB0cnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gTWFyayBzZWVuIGFuY2VzdG9ycyBhcyBjaXJjdWxhclxuICAgICAgICBwYXJlbnRQdHJzLnNsaWNlKHBhcmVudEluZGV4KS5mb3JFYWNoKGZ1bmN0aW9uIChwYXJlbnRQdHIpIHtcbiAgICAgICAgICBhbGxSZWZzLnJlZnNbcGFyZW50UHRyXS5jaXJjdWxhciA9IHRydWU7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJlZkRldGFpbHMuY2lyY3VsYXIgPSB0cnVlO1xuICAgICAgfVxuICAgIH1cbiAgfSk7XG5cbiAgYWxsVGFza3MgPSBhbGxUYXNrc1xuICAgIC50aGVuKGZ1bmN0aW9uICgpIHtcbiAgICAgIC8vIElkZW50aWZ5IGluZGlyZWN0LCBsb2NhbCBjaXJjdWxhciByZWZlcmVuY2VzIChJc3N1ZSA4MilcbiAgICAgIHZhciBjaXJjdWxhcnMgPSBbXTtcbiAgICAgIHZhciBwcm9jZXNzZWRSZWZQdHJzID0gW107XG4gICAgICB2YXIgcHJvY2Vzc2VkUmVmcyA9IFtdO1xuXG4gICAgICBmdW5jdGlvbiB3YWxrUmVmcyAocGFyZW50UHRycywgcGFyZW50UmVmcywgcmVmUHRyLCByZWYpIHtcbiAgICAgICAgT2JqZWN0LmtleXMoYWxsUmVmcy5yZWZzKS5mb3JFYWNoKGZ1bmN0aW9uIChkUmVmUHRyKSB7XG4gICAgICAgICAgdmFyIGRSZWZEZXRhaWxzID0gYWxsUmVmcy5yZWZzW2RSZWZQdHJdO1xuXG4gICAgICAgICAgLy8gRG8gbm90IHByb2Nlc3MgYWxyZWFkeSBwcm9jZXNzZWQgcmVmZXJlbmNlcyBvciByZWZlcmVuY2VzIHRoYXQgYXJlIG5vdCBhIG5lc3RlZCByZWZlcmVuY2VzXG4gICAgICAgICAgaWYgKHByb2Nlc3NlZFJlZnMuaW5kZXhPZihyZWYpID09PSAtMSAmJiBwcm9jZXNzZWRSZWZQdHJzLmluZGV4T2YocmVmUHRyKSA9PT0gLTEgJiZcbiAgICAgICAgICAgICAgY2lyY3VsYXJzLmluZGV4T2YocmVmKSA9PT0gLTEgJiYgZFJlZlB0ciAhPT0gcmVmUHRyICYmIGRSZWZQdHIuaW5kZXhPZihyZWYgKyAnLycpID09PSAwKSB7XG4gICAgICAgICAgICBpZiAocGFyZW50UmVmcy5pbmRleE9mKHJlZikgPiAtMSkge1xuICAgICAgICAgICAgICBwYXJlbnRSZWZzLmZvckVhY2goZnVuY3Rpb24gKHBhcmVudFJlZikge1xuICAgICAgICAgICAgICAgIGlmIChjaXJjdWxhcnMuaW5kZXhPZihyZWYpID09PSAtMSkge1xuICAgICAgICAgICAgICAgICAgY2lyY3VsYXJzLnB1c2gocGFyZW50UmVmKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgd2Fsa1JlZnMocGFyZW50UHRycy5jb25jYXQocmVmUHRyKSwgcGFyZW50UmVmcy5jb25jYXQocmVmKSwgZFJlZlB0ciwgZFJlZkRldGFpbHMudXJpKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcHJvY2Vzc2VkUmVmUHRycy5wdXNoKHJlZlB0cik7XG4gICAgICAgICAgICBwcm9jZXNzZWRSZWZzLnB1c2gocmVmKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfVxuXG4gICAgICBPYmplY3Qua2V5cyhhbGxSZWZzLnJlZnMpLmZvckVhY2goZnVuY3Rpb24gKHJlZlB0cikge1xuICAgICAgICB2YXIgcmVmRGV0YWlscyA9IGFsbFJlZnMucmVmc1tyZWZQdHJdO1xuXG4gICAgICAgIC8vIE9ubHkgcHJvY2VzcyBsb2NhbCwgbm9uLWNpcmN1bGFyIHJlZmVyZW5jZXNcbiAgICAgICAgaWYgKHJlZkRldGFpbHMudHlwZSA9PT0gJ2xvY2FsJyAmJiAhcmVmRGV0YWlscy5jaXJjdWxhciAmJiBjaXJjdWxhcnMuaW5kZXhPZihyZWZEZXRhaWxzLnVyaSkgPT09IC0xKSB7XG4gICAgICAgICAgd2Fsa1JlZnMoW10sIFtdLCByZWZQdHIsIHJlZkRldGFpbHMudXJpKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIE9iamVjdC5rZXlzKGFsbFJlZnMucmVmcykuZm9yRWFjaChmdW5jdGlvbiAocmVmUHRyKSB7XG4gICAgICAgIHZhciByZWZEZXRhaWxzID0gYWxsUmVmcy5yZWZzW3JlZlB0cl07XG5cbiAgICAgICAgaWYgKGNpcmN1bGFycy5pbmRleE9mKHJlZkRldGFpbHMudXJpKSA+IC0xKSB7XG4gICAgICAgICAgcmVmRGV0YWlscy5jaXJjdWxhciA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH0pXG4gICAgLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgcmV0dXJuIGFsbFJlZnM7XG4gICAgfSk7XG5cbiAgcmV0dXJuIGFsbFRhc2tzO1xufVxuXG5mdW5jdGlvbiBmaW5kVmFsdWUgKG9iaiwgcGF0aCkge1xuICB2YXIgdmFsdWUgPSBvYmo7XG5cbiAgcGF0aC5mb3JFYWNoKGZ1bmN0aW9uIChzZWcpIHtcbiAgICBzZWcgPSBkZWNvZGVVUkkoc2VnKTtcblxuICAgIGlmIChzZWcgaW4gdmFsdWUpIHtcbiAgICAgIHZhbHVlID0gdmFsdWVbc2VnXTtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhyb3cgRXJyb3IoJ0pTT04gUG9pbnRlciBwb2ludHMgdG8gbWlzc2luZyBsb2NhdGlvbjogJyArIHBhdGhUb1B0cihwYXRoKSk7XG4gICAgfVxuICB9KTtcblxuICByZXR1cm4gdmFsdWU7XG59XG5cbmZ1bmN0aW9uIGdldEV4dHJhUmVmS2V5cyAocmVmKSB7XG4gIHJldHVybiBPYmplY3Qua2V5cyhyZWYpLmZpbHRlcihmdW5jdGlvbiAoa2V5KSB7XG4gICAgcmV0dXJuIGtleSAhPT0gJyRyZWYnO1xuICB9KTtcbn1cblxuZnVuY3Rpb24gZ2V0UmVmVHlwZSAocmVmRGV0YWlscykge1xuICB2YXIgdHlwZTtcblxuICAvLyBDb252ZXJ0IHRoZSBVUkkgcmVmZXJlbmNlIHRvIG9uZSBvZiBvdXIgdHlwZXNcbiAgc3dpdGNoIChyZWZEZXRhaWxzLnVyaURldGFpbHMucmVmZXJlbmNlKSB7XG4gIGNhc2UgJ2Fic29sdXRlJzpcbiAgY2FzZSAndXJpJzpcbiAgICB0eXBlID0gJ3JlbW90ZSc7XG4gICAgYnJlYWs7XG4gIGNhc2UgJ3NhbWUtZG9jdW1lbnQnOlxuICAgIHR5cGUgPSAnbG9jYWwnO1xuICAgIGJyZWFrO1xuICBkZWZhdWx0OlxuICAgIHR5cGUgPSByZWZEZXRhaWxzLnVyaURldGFpbHMucmVmZXJlbmNlO1xuICB9XG5cbiAgcmV0dXJuIHR5cGU7XG59XG5cbmZ1bmN0aW9uIGdldFJlbW90ZURvY3VtZW50ICh1cmwsIG9wdGlvbnMpIHtcbiAgdmFyIGNhY2hlRW50cnkgPSByZW1vdGVDYWNoZVt1cmxdO1xuICB2YXIgYWxsVGFza3MgPSBQcm9taXNlLnJlc29sdmUoKTtcbiAgdmFyIGxvYWRlck9wdGlvbnMgPSBjbG9uZShvcHRpb25zLmxvYWRlck9wdGlvbnMgfHwge30pO1xuXG4gIGlmIChpc1R5cGUoY2FjaGVFbnRyeSwgJ1VuZGVmaW5lZCcpKSB7XG4gICAgLy8gSWYgdGhlcmUgaXMgbm8gY29udGVudCBwcm9jZXNzb3IsIGRlZmF1bHQgdG8gcHJvY2Vzc2luZyB0aGUgcmF3IHJlc3BvbnNlIGFzIEpTT05cbiAgICBpZiAoaXNUeXBlKGxvYWRlck9wdGlvbnMucHJvY2Vzc0NvbnRlbnQsICdVbmRlZmluZWQnKSkge1xuICAgICAgbG9hZGVyT3B0aW9ucy5wcm9jZXNzQ29udGVudCA9IGZ1bmN0aW9uIChyZXMsIGNhbGxiYWNrKSB7XG4gICAgICAgIGNhbGxiYWNrKHVuZGVmaW5lZCwgSlNPTi5wYXJzZShyZXMudGV4dCkpO1xuICAgICAgfTtcbiAgICB9XG5cbiAgICAvLyBBdHRlbXB0IHRvIGxvYWQgdGhlIHJlc291cmNlIHVzaW5nIHBhdGgtbG9hZGVyXG4gICAgYWxsVGFza3MgPSBQYXRoTG9hZGVyLmxvYWQoZGVjb2RlVVJJKHVybCksIGxvYWRlck9wdGlvbnMpO1xuXG4gICAgLy8gVXBkYXRlIHRoZSBjYWNoZVxuICAgIGFsbFRhc2tzID0gYWxsVGFza3NcbiAgICAgIC50aGVuKGZ1bmN0aW9uIChyZXMpIHtcbiAgICAgICAgcmVtb3RlQ2FjaGVbdXJsXSA9IHtcbiAgICAgICAgICB2YWx1ZTogcmVzXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIHJlcztcbiAgICAgIH0pXG4gICAgICAuY2F0Y2goZnVuY3Rpb24gKGVycikge1xuICAgICAgICByZW1vdGVDYWNoZVt1cmxdID0ge1xuICAgICAgICAgIGVycm9yOiBlcnJcbiAgICAgICAgfTtcblxuICAgICAgICB0aHJvdyBlcnI7XG4gICAgICB9KTtcbiAgfSBlbHNlIHtcbiAgICAvLyBSZXR1cm4gdGhlIGNhY2hlZCB2ZXJzaW9uXG4gICAgYWxsVGFza3MgPSBhbGxUYXNrcy50aGVuKGZ1bmN0aW9uICgpIHtcbiAgICAgIHJldHVybiBjYWNoZUVudHJ5LnZhbHVlO1xuICAgIH0pO1xuICB9XG5cbiAgLy8gUmV0dXJuIGEgY2xvbmVkIHZlcnNpb24gdG8gYXZvaWQgdXBkYXRpbmcgdGhlIGNhY2hlXG4gIGFsbFRhc2tzID0gYWxsVGFza3MudGhlbihmdW5jdGlvbiAocmVzKSB7XG4gICAgcmV0dXJuIGNsb25lKHJlcyk7XG4gIH0pO1xuXG4gIHJldHVybiBhbGxUYXNrcztcbn1cblxuZnVuY3Rpb24gaXNSZWZMaWtlIChvYmosIHRocm93V2l0aERldGFpbHMpIHtcbiAgdmFyIHJlZkxpa2UgPSB0cnVlO1xuXG4gIHRyeSB7XG4gICAgaWYgKCFpc1R5cGUob2JqLCAnT2JqZWN0JykpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcignb2JqIGlzIG5vdCBhbiBPYmplY3QnKTtcbiAgICB9IGVsc2UgaWYgKCFpc1R5cGUob2JqLiRyZWYsICdTdHJpbmcnKSkge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdvYmouJHJlZiBpcyBub3QgYSBTdHJpbmcnKTtcbiAgICB9XG4gIH0gY2F0Y2ggKGVycikge1xuICAgIGlmICh0aHJvd1dpdGhEZXRhaWxzKSB7XG4gICAgICB0aHJvdyBlcnI7XG4gICAgfVxuXG4gICAgcmVmTGlrZSA9IGZhbHNlO1xuICB9XG5cbiAgcmV0dXJuIHJlZkxpa2U7XG59XG5cbmZ1bmN0aW9uIGlzVHlwZSAob2JqLCB0eXBlKSB7XG4gIC8vIEEgUGhhbnRvbUpTIGJ1ZyAoaHR0cHM6Ly9naXRodWIuY29tL2FyaXlhL3BoYW50b21qcy9pc3N1ZXMvMTE3MjIpIHByb2hpYml0cyB1cyBmcm9tIHVzaW5nIHRoZSBzYW1lIGFwcHJvYWNoIGZvclxuICAvLyB1bmRlZmluZWQgY2hlY2tpbmcgdGhhdCB3ZSB1c2UgZm9yIG90aGVyIHR5cGVzLlxuICBpZiAodHlwZSA9PT0gJ1VuZGVmaW5lZCcpIHtcbiAgICByZXR1cm4gdHlwZW9mIG9iaiA9PT0gJ3VuZGVmaW5lZCc7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChvYmopID09PSAnW29iamVjdCAnICsgdHlwZSArICddJztcbiAgfVxufVxuXG5mdW5jdGlvbiBtYWtlUmVmRmlsdGVyIChvcHRpb25zKSB7XG4gIHZhciByZWZGaWx0ZXI7XG4gIHZhciB2YWxpZFR5cGVzO1xuXG4gIGlmIChpc1R5cGUob3B0aW9ucy5maWx0ZXIsICdBcnJheScpIHx8IGlzVHlwZShvcHRpb25zLmZpbHRlciwgJ1N0cmluZycpKSB7XG4gICAgdmFsaWRUeXBlcyA9IGlzVHlwZShvcHRpb25zLmZpbHRlciwgJ1N0cmluZycpID8gW29wdGlvbnMuZmlsdGVyXSA6IG9wdGlvbnMuZmlsdGVyO1xuICAgIHJlZkZpbHRlciA9IGZ1bmN0aW9uIChyZWZEZXRhaWxzKSB7XG4gICAgICAvLyBDaGVjayB0aGUgZXhhY3QgdHlwZSBvciBmb3IgaW52YWxpZCBVUklzLCBjaGVjayBpdHMgb3JpZ2luYWwgdHlwZVxuICAgICAgcmV0dXJuIHZhbGlkVHlwZXMuaW5kZXhPZihyZWZEZXRhaWxzLnR5cGUpID4gLTEgfHwgdmFsaWRUeXBlcy5pbmRleE9mKGdldFJlZlR5cGUocmVmRGV0YWlscykpID4gLTE7XG4gICAgfTtcbiAgfSBlbHNlIGlmIChpc1R5cGUob3B0aW9ucy5maWx0ZXIsICdGdW5jdGlvbicpKSB7XG4gICAgcmVmRmlsdGVyID0gb3B0aW9ucy5maWx0ZXI7XG4gIH0gZWxzZSBpZiAoaXNUeXBlKG9wdGlvbnMuZmlsdGVyLCAnVW5kZWZpbmVkJykpIHtcbiAgICByZWZGaWx0ZXIgPSBmdW5jdGlvbiAoKSB7XG4gICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9O1xuICB9XG5cbiAgcmV0dXJuIGZ1bmN0aW9uIChyZWZEZXRhaWxzLCBwYXRoKSB7XG4gICAgcmV0dXJuIChyZWZEZXRhaWxzLnR5cGUgIT09ICdpbnZhbGlkJyB8fCBvcHRpb25zLmluY2x1ZGVJbnZhbGlkID09PSB0cnVlKSAmJiByZWZGaWx0ZXIocmVmRGV0YWlscywgcGF0aCk7XG4gIH07XG59XG5cbmZ1bmN0aW9uIG1ha2VTdWJEb2NQYXRoIChvcHRpb25zKSB7XG4gIHZhciBzdWJEb2NQYXRoO1xuXG4gIGlmIChpc1R5cGUob3B0aW9ucy5zdWJEb2NQYXRoLCAnQXJyYXknKSkge1xuICAgIHN1YkRvY1BhdGggPSBvcHRpb25zLnN1YkRvY1BhdGg7XG4gIH0gZWxzZSBpZiAoaXNUeXBlKG9wdGlvbnMuc3ViRG9jUGF0aCwgJ1N0cmluZycpKSB7XG4gICAgc3ViRG9jUGF0aCA9IHBhdGhGcm9tUHRyKG9wdGlvbnMuc3ViRG9jUGF0aCk7XG4gIH0gZWxzZSBpZiAoaXNUeXBlKG9wdGlvbnMuc3ViRG9jUGF0aCwgJ1VuZGVmaW5lZCcpKSB7XG4gICAgc3ViRG9jUGF0aCA9IFtdO1xuICB9XG5cbiAgcmV0dXJuIHN1YkRvY1BhdGg7XG59XG5cbmZ1bmN0aW9uIHBhcnNlVVJJICh1cmkpIHtcbiAgLy8gV2UgZGVjb2RlIGZpcnN0IHRvIGF2b2lkIGRvdWJseSBlbmNvZGluZ1xuICByZXR1cm4gVVJJLnBhcnNlKGVuY29kZVVSSShkZWNvZGVVUkkodXJpKSkpO1xufVxuXG5mdW5jdGlvbiBzZXRWYWx1ZSAob2JqLCByZWZQYXRoLCB2YWx1ZSkge1xuICBmaW5kVmFsdWUob2JqLCByZWZQYXRoLnNsaWNlKDAsIHJlZlBhdGgubGVuZ3RoIC0gMSkpW2RlY29kZVVSSShyZWZQYXRoW3JlZlBhdGgubGVuZ3RoIC0gMV0pXSA9IHZhbHVlO1xufVxuXG5mdW5jdGlvbiB3YWxrIChhbmNlc3RvcnMsIG5vZGUsIHBhdGgsIGZuKSB7XG4gIHZhciBwcm9jZXNzQ2hpbGRyZW4gPSB0cnVlO1xuXG4gIGZ1bmN0aW9uIHdhbGtJdGVtIChpdGVtLCBzZWdtZW50KSB7XG4gICAgcGF0aC5wdXNoKHNlZ21lbnQpO1xuICAgIHdhbGsoYW5jZXN0b3JzLCBpdGVtLCBwYXRoLCBmbik7XG4gICAgcGF0aC5wb3AoKTtcbiAgfVxuXG4gIC8vIENhbGwgdGhlIGl0ZXJhdGVlXG4gIGlmIChpc1R5cGUoZm4sICdGdW5jdGlvbicpKSB7XG4gICAgcHJvY2Vzc0NoaWxkcmVuID0gZm4oYW5jZXN0b3JzLCBub2RlLCBwYXRoKTtcbiAgfVxuXG4gIC8vIFdlIGRvIG5vdCBwcm9jZXNzIGNpcmN1bGFyIG9iamVjdHMgYWdhaW5cbiAgaWYgKGFuY2VzdG9ycy5pbmRleE9mKG5vZGUpID09PSAtMSkge1xuICAgIGFuY2VzdG9ycy5wdXNoKG5vZGUpO1xuXG4gICAgaWYgKHByb2Nlc3NDaGlsZHJlbiAhPT0gZmFsc2UpIHtcbiAgICAgIGlmIChpc1R5cGUobm9kZSwgJ0FycmF5JykpIHtcbiAgICAgICAgbm9kZS5mb3JFYWNoKGZ1bmN0aW9uIChtZW1iZXIsIGluZGV4KSB7XG4gICAgICAgICAgd2Fsa0l0ZW0obWVtYmVyLCBpbmRleC50b1N0cmluZygpKTtcbiAgICAgICAgfSk7XG4gICAgICB9IGVsc2UgaWYgKGlzVHlwZShub2RlLCAnT2JqZWN0JykpIHtcbiAgICAgICAgT2JqZWN0LmtleXMobm9kZSkuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgICAgd2Fsa0l0ZW0obm9kZVtrZXldLCBrZXkpO1xuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBhbmNlc3RvcnMucG9wKCk7XG59XG5cbmZ1bmN0aW9uIHZhbGlkYXRlT3B0aW9ucyAob3B0aW9ucywgb2JqKSB7XG4gIGlmIChpc1R5cGUob3B0aW9ucywgJ1VuZGVmaW5lZCcpKSB7XG4gICAgLy8gRGVmYXVsdCB0byBhbiBlbXB0eSBvcHRpb25zIG9iamVjdFxuICAgIG9wdGlvbnMgPSB7fTtcbiAgfSBlbHNlIHtcbiAgICAvLyBDbG9uZSB0aGUgb3B0aW9ucyBzbyB3ZSBkbyBub3QgYWx0ZXIgdGhlIG9uZXMgcGFzc2VkIGluXG4gICAgb3B0aW9ucyA9IGNsb25lKG9wdGlvbnMpO1xuICB9XG5cbiAgaWYgKCFpc1R5cGUob3B0aW9ucywgJ09iamVjdCcpKSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcignb3B0aW9ucyBtdXN0IGJlIGFuIE9iamVjdCcpO1xuICB9IGVsc2UgaWYgKCFpc1R5cGUob3B0aW9ucy5maWx0ZXIsICdVbmRlZmluZWQnKSAmJlxuICAgICAgICAgICAgICFpc1R5cGUob3B0aW9ucy5maWx0ZXIsICdBcnJheScpICYmXG4gICAgICAgICAgICAgIWlzVHlwZShvcHRpb25zLmZpbHRlciwgJ0Z1bmN0aW9uJykgJiZcbiAgICAgICAgICAgICAhaXNUeXBlKG9wdGlvbnMuZmlsdGVyLCAnU3RyaW5nJykpIHtcbiAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdvcHRpb25zLmZpbHRlciBtdXN0IGJlIGFuIEFycmF5LCBhIEZ1bmN0aW9uIG9mIGEgU3RyaW5nJyk7XG4gIH0gZWxzZSBpZiAoIWlzVHlwZShvcHRpb25zLmluY2x1ZGVJbnZhbGlkLCAnVW5kZWZpbmVkJykgJiZcbiAgICAgICAgICAgICAhaXNUeXBlKG9wdGlvbnMuaW5jbHVkZUludmFsaWQsICdCb29sZWFuJykpIHtcbiAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdvcHRpb25zLmluY2x1ZGVJbnZhbGlkIG11c3QgYmUgYSBCb29sZWFuJyk7XG4gIH0gZWxzZSBpZiAoIWlzVHlwZShvcHRpb25zLnJlZlByZVByb2Nlc3NvciwgJ1VuZGVmaW5lZCcpICYmXG4gICAgICAgICAgICAgIWlzVHlwZShvcHRpb25zLnJlZlByZVByb2Nlc3NvciwgJ0Z1bmN0aW9uJykpIHtcbiAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdvcHRpb25zLnJlZlByZVByb2Nlc3NvciBtdXN0IGJlIGEgRnVuY3Rpb24nKTtcbiAgfSBlbHNlIGlmICghaXNUeXBlKG9wdGlvbnMucmVmUG9zdFByb2Nlc3NvciwgJ1VuZGVmaW5lZCcpICYmXG4gICAgICAgICAgICAgIWlzVHlwZShvcHRpb25zLnJlZlBvc3RQcm9jZXNzb3IsICdGdW5jdGlvbicpKSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcignb3B0aW9ucy5yZWZQb3N0UHJvY2Vzc29yIG11c3QgYmUgYSBGdW5jdGlvbicpO1xuICB9IGVsc2UgaWYgKCFpc1R5cGUob3B0aW9ucy5zdWJEb2NQYXRoLCAnVW5kZWZpbmVkJykgJiZcbiAgICAgICAgICAgICAhaXNUeXBlKG9wdGlvbnMuc3ViRG9jUGF0aCwgJ0FycmF5JykgJiZcbiAgICAgICAgICAgICAhaXNQdHIob3B0aW9ucy5zdWJEb2NQYXRoKSkge1xuICAgIC8vIElmIGEgcG9pbnRlciBpcyBwcm92aWRlZCwgdGhyb3cgYW4gZXJyb3IgaWYgaXQncyBub3QgdGhlIHByb3BlciB0eXBlXG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcignb3B0aW9ucy5zdWJEb2NQYXRoIG11c3QgYmUgYW4gQXJyYXkgb2YgcGF0aCBzZWdtZW50cyBvciBhIHZhbGlkIEpTT04gUG9pbnRlcicpO1xuICB9XG5cbiAgb3B0aW9ucy5maWx0ZXIgPSBtYWtlUmVmRmlsdGVyKG9wdGlvbnMpO1xuXG4gIC8vIFNldCB0aGUgc3ViRG9jUGF0aCB0byBhdm9pZCBldmVyeW9uZSBlbHNlIGhhdmluZyB0byBjb21wdXRlIGl0XG4gIG9wdGlvbnMuc3ViRG9jUGF0aCA9IG1ha2VTdWJEb2NQYXRoKG9wdGlvbnMpO1xuXG4gIGlmICghaXNUeXBlKG9iaiwgJ1VuZGVmaW5lZCcpKSB7XG4gICAgdHJ5IHtcbiAgICAgIGZpbmRWYWx1ZShvYmosIG9wdGlvbnMuc3ViRG9jUGF0aCk7XG4gICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICBlcnIubWVzc2FnZSA9IGVyci5tZXNzYWdlLnJlcGxhY2UoJ0pTT04gUG9pbnRlcicsICdvcHRpb25zLnN1YkRvY1BhdGgnKTtcblxuICAgICAgdGhyb3cgZXJyO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBvcHRpb25zO1xufVxuXG4vKiBNb2R1bGUgTWVtYmVycyAqL1xuXG4vKlxuICogRWFjaCBvZiB0aGUgZnVuY3Rpb25zIGJlbG93IGFyZSBkZWZpbmVkIGFzIGZ1bmN0aW9uIHN0YXRlbWVudHMgYW5kICp0aGVuKiBleHBvcnRlZCBpbiB0d28gc3RlcHMgaW5zdGVhZCBvZiBvbmUgZHVlXG4gKiB0byBhIGJ1ZyBpbiBqc2RvYyAoaHR0cHM6Ly9naXRodWIuY29tL2pzZG9jMm1kL2pzZG9jLXBhcnNlL2lzc3Vlcy8xOCkgdGhhdCBjYXVzZXMgb3VyIGRvY3VtZW50YXRpb24gdG8gYmVcbiAqIGdlbmVyYXRlZCBpbXByb3Blcmx5LiAgVGhlIGltcGFjdCB0byB0aGUgdXNlciBpcyBzaWduaWZpY2FudCBlbm91Z2ggZm9yIHVzIHRvIHdhcnJhbnQgd29ya2luZyBhcm91bmQgaXQgdW50aWwgdGhpc1xuICogaXMgZml4ZWQuXG4gKi9cblxuLyoqXG4gKiBUaGUgb3B0aW9ucyB1c2VkIGZvciB2YXJpb3VzIEpzb25SZWZzIEFQSXMuXG4gKlxuICogQHR5cGVkZWYge29iamVjdH0gSnNvblJlZnNPcHRpb25zXG4gKlxuICogQHBhcmFtIHtzdHJpbmd8c3RyaW5nW118ZnVuY3Rpb259IFtmaWx0ZXI9ZnVuY3Rpb24gKCkge3JldHVybiB0cnVlO31dIC0gVGhlIGZpbHRlciB0byB1c2Ugd2hlbiBnYXRoZXJpbmcgSlNPTlxuICogUmVmZXJlbmNlcyAqKElmIHRoaXMgdmFsdWUgaXMgYSBzaW5nbGUgc3RyaW5nIG9yIGFuIGFycmF5IG9mIHN0cmluZ3MsIHRoZSB2YWx1ZShzKSBhcmUgZXhwZWN0ZWQgdG8gYmUgdGhlIGB0eXBlKHMpYFxuICogeW91IGFyZSBpbnRlcmVzdGVkIGluIGNvbGxlY3RpbmcgYXMgZGVzY3JpYmVkIGluIHtAbGluayBtb2R1bGU6SnNvblJlZnMuZ2V0UmVmRGV0YWlsc30uICBJZiBpdCBpcyBhIGZ1bmN0aW9uLCBpdCBpc1xuICogZXhwZWN0ZWQgdGhhdCB0aGUgZnVuY3Rpb24gYmVoYXZlcyBsaWtlIHtAbGluayBtb2R1bGU6SnNvblJlZnN+UmVmRGV0YWlsc0ZpbHRlcn0uKSpcbiAqIEBwYXJhbSB7Ym9vbGVhbn0gW2luY2x1ZGVJbnZhbGlkPWZhbHNlXSAtIFdoZXRoZXIgb3Igbm90IHRvIGluY2x1ZGUgaW52YWxpZCBKU09OIFJlZmVyZW5jZSBkZXRhaWxzICooVGhpcyB3aWxsIG1ha2VcbiAqIGl0IHNvIHRoYXQgb2JqZWN0cyB0aGF0IGFyZSBsaWtlIEpTT04gUmVmZXJlbmNlIG9iamVjdHMsIGFzIGluIHRoZXkgYXJlIGFuIGBPYmplY3RgIGFuZCB0aGUgaGF2ZSBhIGAkcmVmYCBwcm9wZXJ0eSxcbiAqIGJ1dCBmYWlsIHZhbGlkYXRpb24gd2lsbCBiZSBpbmNsdWRlZC4gIFRoaXMgaXMgdmVyeSB1c2VmdWwgZm9yIHdoZW4geW91IHdhbnQgdG8ga25vdyBpZiB5b3UgaGF2ZSBpbnZhbGlkIEpTT05cbiAqIFJlZmVyZW5jZSBkZWZpbml0aW9ucy4gIFRoaXMgd2lsbCBub3QgbWVhbiB0aGF0IEFQSXMgd2lsbCBwcm9jZXNzIGludmFsaWQgSlNPTiBSZWZlcmVuY2VzIGJ1dCB0aGUgcmVhc29ucyBhcyB0byB3aHlcbiAqIHRoZSBKU09OIFJlZmVyZW5jZXMgYXJlIGludmFsaWQgd2lsbCBiZSBpbmNsdWRlZCBpbiB0aGUgcmV0dXJuZWQgbWV0YWRhdGEuKSpcbiAqIEBwYXJhbSB7b2JqZWN0fSBbbG9hZGVyT3B0aW9uc10gLSBUaGUgb3B0aW9ucyB0byBwYXNzIHRvXG4gKiB7QGxpbmsgaHR0cHM6Ly9naXRodWIuY29tL3doaXRsb2NramMvcGF0aC1sb2FkZXIvYmxvYi9tYXN0ZXIvZG9jcy9BUEkubWQjbW9kdWxlX1BhdGhMb2FkZXIubG9hZHxQYXRoTG9hZGVyfmxvYWR9XG4gKiBAcGFyYW0ge21vZHVsZTpKc29uUmVmc35SZWZQcmVQcm9jZXNzb3J9IFtyZWZQcmVQcm9jZXNzb3JdIC0gVGhlIGNhbGxiYWNrIHVzZWQgdG8gcHJlLXByb2Nlc3MgYSBKU09OIFJlZmVyZW5jZSBsaWtlXG4gKiBvYmplY3QgKihUaGlzIGlzIGNhbGxlZCBwcmlvciB0byB2YWxpZGF0aW5nIHRoZSBKU09OIFJlZmVyZW5jZSBsaWtlIG9iamVjdCBhbmQgZ2V0dGluZyBpdHMgZGV0YWlscykqXG4gKiBAcGFyYW0ge21vZHVsZTpKc29uUmVmc35SZWZQb3N0UHJvY2Vzc29yfSBbcmVmUG9zdFByb2Nlc3Nvcl0gLSBUaGUgY2FsbGJhY2sgdXNlZCB0byBwb3N0LXByb2Nlc3MgdGhlIEpTT04gUmVmZXJlbmNlXG4gKiBtZXRhZGF0YSAqKFRoaXMgaXMgY2FsbGVkIHByaW9yIGZpbHRlcmluZyB0aGUgcmVmZXJlbmNlcykqXG4gKiBAcGFyYW0ge3N0cmluZ30gW29wdGlvbnMucmVsYXRpdmVCYXNlXSAtIFRoZSBiYXNlIGxvY2F0aW9uIHRvIHVzZSB3aGVuIHJlc29sdmluZyByZWxhdGl2ZSByZWZlcmVuY2VzICooT25seSB1c2VmdWxcbiAqIGZvciBBUElzIHRoYXQgZG8gcmVtb3RlIHJlZmVyZW5jZSByZXNvbHV0aW9uLiAgSWYgdGhpcyB2YWx1ZSBpcyBub3QgZGVmaW5lZCxcbiAqIHtAbGluayBodHRwczovL2dpdGh1Yi5jb20vd2hpdGxvY2tqYy9wYXRoLWxvYWRlcnxwYXRoLWxvYWRlcn0gd2lsbCB1c2UgYHdpbmRvdy5sb2NhdGlvbi5ocmVmYCBmb3IgdGhlIGJyb3dzZXIgYW5kXG4gKiBgcHJvY2Vzcy5jd2QoKWAgZm9yIE5vZGUuanMuKSpcbiAqIEBwYXJhbSB7c3RyaW5nfHN0cmluZ1tdfSBbb3B0aW9ucy5zdWJEb2NQYXRoPVtdXSAtIFRoZSBKU09OIFBvaW50ZXIgb3IgYXJyYXkgb2YgcGF0aCBzZWdtZW50cyB0byB0aGUgc3ViIGRvY3VtZW50XG4gKiBsb2NhdGlvbiB0byBzZWFyY2ggZnJvbVxuICovXG5cbi8qKlxuICogU2ltcGxlIGZ1bmN0aW9uIHVzZWQgdG8gZmlsdGVyIG91dCBKU09OIFJlZmVyZW5jZXMuXG4gKlxuICogQHR5cGVkZWYge2Z1bmN0aW9ufSBSZWZEZXRhaWxzRmlsdGVyXG4gKlxuICogQHBhcmFtIHttb2R1bGU6SnNvblJlZnN+VW5yZXNvbHZlZFJlZkRldGFpbHN9IHJlZkRldGFpbHMgLSBUaGUgSlNPTiBSZWZlcmVuY2UgZGV0YWlscyB0byB0ZXN0XG4gKiBAcGFyYW0ge3N0cmluZ1tdfSBwYXRoIC0gVGhlIHBhdGggdG8gdGhlIEpTT04gUmVmZXJlbmNlXG4gKlxuICogQHJldHVybnMge2Jvb2xlYW59IHdoZXRoZXIgdGhlIEpTT04gUmVmZXJlbmNlIHNob3VsZCBiZSBmaWx0ZXJlZCAqKG91dCkqIG9yIG5vdFxuICovXG5cbi8qKlxuICogU2ltcGxlIGZ1bmN0aW9uIHVzZWQgdG8gcHJlLXByb2Nlc3MgYSBKU09OIFJlZmVyZW5jZSBsaWtlIG9iamVjdC5cbiAqXG4gKiBAdHlwZWRlZiB7ZnVuY3Rpb259IFJlZlByZVByb2Nlc3NvclxuICpcbiAqIEBwYXJhbSB7b2JqZWN0fSBvYmogLSBUaGUgSlNPTiBSZWZlcmVuY2UgbGlrZSBvYmplY3RcbiAqIEBwYXJhbSB7c3RyaW5nW119IHBhdGggLSBUaGUgcGF0aCB0byB0aGUgSlNPTiBSZWZlcmVuY2UgbGlrZSBvYmplY3RcbiAqXG4gKiBAcmV0dXJucyB7b2JqZWN0fSB0aGUgcHJvY2Vzc2VkIEpTT04gUmVmZXJlbmNlIGxpa2Ugb2JqZWN0XG4gKi9cblxuLyoqXG4gKiBTaW1wbGUgZnVuY3Rpb24gdXNlZCB0byBwb3N0LXByb2Nlc3MgYSBKU09OIFJlZmVyZW5jZSBkZXRhaWxzLlxuICpcbiAqIEB0eXBlZGVmIHtmdW5jdGlvbn0gUmVmUG9zdFByb2Nlc3NvclxuICpcbiAqIEBwYXJhbSB7bW9kdWxlOkpzb25SZWZzflVucmVzb2x2ZWRSZWZEZXRhaWxzfSByZWZEZXRhaWxzIC0gVGhlIEpTT04gUmVmZXJlbmNlIGRldGFpbHMgdG8gdGVzdFxuICogQHBhcmFtIHtzdHJpbmdbXX0gcGF0aCAtIFRoZSBwYXRoIHRvIHRoZSBKU09OIFJlZmVyZW5jZVxuICpcbiAqIEByZXR1cm5zIHtvYmplY3R9IHRoZSBwcm9jZXNzZWQgSlNPTiBSZWZlcmVuY2UgZGV0YWlscyBvYmplY3RcbiAqL1xuXG4vKipcbiAqIERldGFpbGVkIGluZm9ybWF0aW9uIGFib3V0IHJlc29sdmVkIEpTT04gUmVmZXJlbmNlcy5cbiAqXG4gKiBAdHlwZWRlZiB7bW9kdWxlOkpzb25SZWZzflVucmVzb2x2ZWRSZWZEZXRhaWxzfSBSZXNvbHZlZFJlZkRldGFpbHNcbiAqXG4gKiBAcHJvcGVydHkge2Jvb2xlYW59IFtjaXJjdWxhcl0gLSBXaGV0aGVyIG9yIG5vdCB0aGUgSlNPTiBSZWZlcmVuY2UgaXMgY2lyY3VsYXIgKihXaWxsIG5vdCBiZSBzZXQgaWYgdGhlIEpTT05cbiAqIFJlZmVyZW5jZSBpcyBub3QgY2lyY3VsYXIpKlxuICogQHByb3BlcnR5IHtib29sZWFufSBbbWlzc2luZ10gLSBXaGV0aGVyIG9yIG5vdCB0aGUgcmVmZXJlbmNlZCB2YWx1ZSB3YXMgbWlzc2luZyBvciBub3QgKihXaWxsIG5vdCBiZSBzZXQgaWYgdGhlXG4gKiByZWZlcmVuY2VkIHZhbHVlIGlzIG5vdCBtaXNzaW5nKSpcbiAqIEBwcm9wZXJ0eSB7Kn0gW3ZhbHVlXSAtIFRoZSByZWZlcmVuY2VkIHZhbHVlICooV2lsbCBub3QgYmUgc2V0IGlmIHRoZSByZWZlcmVuY2VkIHZhbHVlIGlzIG1pc3NpbmcpKlxuICovXG5cbi8qKlxuICogVGhlIHJlc3VsdHMgb2YgcmVzb2x2aW5nIHRoZSBKU09OIFJlZmVyZW5jZXMgb2YgYW4gYXJyYXkvb2JqZWN0LlxuICpcbiAqIEB0eXBlZGVmIHtvYmplY3R9IFJlc29sdmVkUmVmc1Jlc3VsdHNcbiAqXG4gKiBAcHJvcGVydHkge21vZHVsZTpKc29uUmVmc35SZXNvbHZlZFJlZkRldGFpbHN9IHJlZnMgLSBBbiBvYmplY3Qgd2hvc2Uga2V5cyBhcmUgSlNPTiBQb2ludGVycyAqKGZyYWdtZW50IHZlcnNpb24pKlxuICogdG8gd2hlcmUgdGhlIEpTT04gUmVmZXJlbmNlIGlzIGRlZmluZWQgYW5kIHdob3NlIHZhbHVlcyBhcmUge0BsaW5rIG1vZHVsZTpKc29uUmVmc35SZXNvbHZlZFJlZkRldGFpbHN9XG4gKiBAcHJvcGVydHkge29iamVjdH0gcmVzb2x2ZWQgLSBUaGUgYXJyYXkvb2JqZWN0IHdpdGggaXRzIEpTT04gUmVmZXJlbmNlcyBmdWxseSByZXNvbHZlZFxuICovXG5cbi8qKlxuICogQW4gb2JqZWN0IGNvbnRhaW5pbmcgdGhlIHJldHJpZXZlZCBkb2N1bWVudCBhbmQgZGV0YWlsZWQgaW5mb3JtYXRpb24gYWJvdXQgaXRzIEpTT04gUmVmZXJlbmNlcy5cbiAqXG4gKiBAdHlwZWRlZiB7bW9kdWxlOkpzb25SZWZzflJlc29sdmVkUmVmc1Jlc3VsdHN9IFJldHJpZXZlZFJlZnNSZXN1bHRzXG4gKlxuICogQHByb3BlcnR5IHtvYmplY3R9IHZhbHVlIC0gVGhlIHJldHJpZXZlZCBkb2N1bWVudFxuICovXG5cbi8qKlxuICogQW4gb2JqZWN0IGNvbnRhaW5pbmcgdGhlIHJldHJpZXZlZCBkb2N1bWVudCwgdGhlIGRvY3VtZW50IHdpdGggaXRzIHJlZmVyZW5jZXMgcmVzb2x2ZWQgYW5kICBkZXRhaWxlZCBpbmZvcm1hdGlvblxuICogYWJvdXQgaXRzIEpTT04gUmVmZXJlbmNlcy5cbiAqXG4gKiBAdHlwZWRlZiB7b2JqZWN0fSBSZXRyaWV2ZWRSZXNvbHZlZFJlZnNSZXN1bHRzXG4gKlxuICogQHByb3BlcnR5IHttb2R1bGU6SnNvblJlZnN+VW5yZXNvbHZlZFJlZkRldGFpbHN9IHJlZnMgLSBBbiBvYmplY3Qgd2hvc2Uga2V5cyBhcmUgSlNPTiBQb2ludGVycyAqKGZyYWdtZW50IHZlcnNpb24pKlxuICogdG8gd2hlcmUgdGhlIEpTT04gUmVmZXJlbmNlIGlzIGRlZmluZWQgYW5kIHdob3NlIHZhbHVlcyBhcmUge0BsaW5rIG1vZHVsZTpKc29uUmVmc35VbnJlc29sdmVkUmVmRGV0YWlsc31cbiAqIEBwcm9wZXJ0eSB7UmVzb2x2ZWRSZWZzUmVzdWx0c30gLSBBbiBvYmplY3Qgd2hvc2Uga2V5cyBhcmUgSlNPTiBQb2ludGVycyAqKGZyYWdtZW50IHZlcnNpb24pKlxuICogdG8gd2hlcmUgdGhlIEpTT04gUmVmZXJlbmNlIGlzIGRlZmluZWQgYW5kIHdob3NlIHZhbHVlcyBhcmUge0BsaW5rIG1vZHVsZTpKc29uUmVmc35SZXNvbHZlZFJlZkRldGFpbHN9XG4gKiBAcHJvcGVydHkge29iamVjdH0gdmFsdWUgLSBUaGUgcmV0cmlldmVkIGRvY3VtZW50XG4gKi9cblxuLyoqXG4gKiBEZXRhaWxlZCBpbmZvcm1hdGlvbiBhYm91dCB1bnJlc29sdmVkIEpTT04gUmVmZXJlbmNlcy5cbiAqXG4gKiBAdHlwZWRlZiB7b2JqZWN0fSBVbnJlc29sdmVkUmVmRGV0YWlsc1xuICpcbiAqIEBwcm9wZXJ0eSB7b2JqZWN0fSBkZWYgLSBUaGUgSlNPTiBSZWZlcmVuY2UgZGVmaW5pdGlvblxuICogQHByb3BlcnR5IHtzdHJpbmd9IFtlcnJvcl0gLSBUaGUgZXJyb3IgaW5mb3JtYXRpb24gZm9yIGludmFsaWQgSlNPTiBSZWZlcmVuY2UgZGVmaW5pdGlvbiAqKE9ubHkgcHJlc2VudCB3aGVuIHRoZVxuICogSlNPTiBSZWZlcmVuY2UgZGVmaW5pdGlvbiBpcyBpbnZhbGlkIG9yIHRoZXJlIHdhcyBhIHByb2JsZW0gcmV0cmlldmluZyBhIHJlbW90ZSByZWZlcmVuY2UgZHVyaW5nIHJlc29sdXRpb24pKlxuICogQHByb3BlcnR5IHtzdHJpbmd9IHVyaSAtIFRoZSBVUkkgcG9ydGlvbiBvZiB0aGUgSlNPTiBSZWZlcmVuY2VcbiAqIEBwcm9wZXJ0eSB7b2JqZWN0fSB1cmlEZXRhaWxzIC0gRGV0YWlsZWQgaW5mb3JtYXRpb24gYWJvdXQgdGhlIFVSSSBhcyBwcm92aWRlZCBieVxuICoge0BsaW5rIGh0dHBzOi8vZ2l0aHViLmNvbS9nYXJ5Y291cnQvdXJpLWpzfFVSSS5wYXJzZX0uXG4gKiBAcHJvcGVydHkge3N0cmluZ30gdHlwZSAtIFRoZSBKU09OIFJlZmVyZW5jZSB0eXBlICooVGhpcyB2YWx1ZSBjYW4gYmUgb25lIG9mIHRoZSBmb2xsb3dpbmc6IGBpbnZhbGlkYCwgYGxvY2FsYCxcbiAqIGByZWxhdGl2ZWAgb3IgYHJlbW90ZWAuKSpcbiAqIEBwcm9wZXJ0eSB7c3RyaW5nfSBbd2FybmluZ10gLSBUaGUgd2FybmluZyBpbmZvcm1hdGlvbiAqKE9ubHkgcHJlc2VudCB3aGVuIHRoZSBKU09OIFJlZmVyZW5jZSBkZWZpbml0aW9uIHByb2R1Y2VzIGFcbiAqIHdhcm5pbmcpKlxuICovXG5cbi8qKlxuICogQ2xlYXJzIHRoZSBpbnRlcm5hbCBjYWNoZSBvZiByZW1vdGUgZG9jdW1lbnRzLCByZWZlcmVuY2UgZGV0YWlscywgZXRjLlxuICpcbiAqIEBhbGlhcyBtb2R1bGU6SnNvblJlZnMuY2xlYXJDYWNoZVxuICovXG5mdW5jdGlvbiBjbGVhckNhY2hlICgpIHtcbiAgcmVtb3RlQ2FjaGUgPSB7fTtcbn1cblxuLyoqXG4gKiBUYWtlcyBhbiBhcnJheSBvZiBwYXRoIHNlZ21lbnRzIGFuZCBkZWNvZGVzIHRoZSBKU09OIFBvaW50ZXIgdG9rZW5zIGluIHRoZW0uXG4gKlxuICogQHBhcmFtIHtzdHJpbmdbXX0gcGF0aCAtIFRoZSBhcnJheSBvZiBwYXRoIHNlZ21lbnRzXG4gKlxuICogQHJldHVybnMge3N0cmluZ30gdGhlIGFycmF5IG9mIHBhdGggc2VnbWVudHMgd2l0aCB0aGVpciBKU09OIFBvaW50ZXIgdG9rZW5zIGRlY29kZWRcbiAqXG4gKiBAdGhyb3dzIHtFcnJvcn0gaWYgdGhlIHBhdGggaXMgbm90IGFuIGBBcnJheWBcbiAqXG4gKiBAc2VlIHtAbGluayBodHRwczovL3Rvb2xzLmlldGYub3JnL2h0bWwvcmZjNjkwMSNzZWN0aW9uLTN9XG4gKlxuICogQGFsaWFzIG1vZHVsZTpKc29uUmVmcy5kZWNvZGVQYXRoXG4gKi9cbmZ1bmN0aW9uIGRlY29kZVBhdGggKHBhdGgpIHtcbiAgaWYgKCFpc1R5cGUocGF0aCwgJ0FycmF5JykpIHtcbiAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdwYXRoIG11c3QgYmUgYW4gYXJyYXknKTtcbiAgfVxuXG4gIHJldHVybiBwYXRoLm1hcChmdW5jdGlvbiAoc2VnKSB7XG4gICAgaWYgKCFpc1R5cGUoc2VnLCAnU3RyaW5nJykpIHtcbiAgICAgIHNlZyA9IEpTT04uc3RyaW5naWZ5KHNlZyk7XG4gICAgfVxuXG4gICAgcmV0dXJuIGRlY29kZVVSSShzZWcucmVwbGFjZSgvfjEvZywgJy8nKS5yZXBsYWNlKC9+MC9nLCAnficpKTtcbiAgfSk7XG59XG5cbi8qKlxuICogVGFrZXMgYW4gYXJyYXkgb2YgcGF0aCBzZWdtZW50cyBhbmQgZW5jb2RlcyB0aGUgc3BlY2lhbCBKU09OIFBvaW50ZXIgY2hhcmFjdGVycyBpbiB0aGVtLlxuICpcbiAqIEBwYXJhbSB7c3RyaW5nW119IHBhdGggLSBUaGUgYXJyYXkgb2YgcGF0aCBzZWdtZW50c1xuICpcbiAqIEByZXR1cm5zIHtzdHJpbmd9IHRoZSBhcnJheSBvZiBwYXRoIHNlZ21lbnRzIHdpdGggdGhlaXIgSlNPTiBQb2ludGVyIHRva2VucyBlbmNvZGVkXG4gKlxuICogQHRocm93cyB7RXJyb3J9IGlmIHRoZSBwYXRoIGlzIG5vdCBhbiBgQXJyYXlgXG4gKlxuICogQHNlZSB7QGxpbmsgaHR0cHM6Ly90b29scy5pZXRmLm9yZy9odG1sL3JmYzY5MDEjc2VjdGlvbi0zfVxuICpcbiAqIEBhbGlhcyBtb2R1bGU6SnNvblJlZnMuZW5jb2RlUGF0aFxuICovXG5mdW5jdGlvbiBlbmNvZGVQYXRoIChwYXRoKSB7XG4gIGlmICghaXNUeXBlKHBhdGgsICdBcnJheScpKSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcigncGF0aCBtdXN0IGJlIGFuIGFycmF5Jyk7XG4gIH1cblxuICByZXR1cm4gcGF0aC5tYXAoZnVuY3Rpb24gKHNlZykge1xuICAgIGlmICghaXNUeXBlKHNlZywgJ1N0cmluZycpKSB7XG4gICAgICBzZWcgPSBKU09OLnN0cmluZ2lmeShzZWcpO1xuICAgIH1cblxuICAgIHJldHVybiBzZWcucmVwbGFjZSgvfi9nLCAnfjAnKS5yZXBsYWNlKC9cXC8vZywgJ34xJyk7XG4gIH0pO1xufVxuXG4vKipcbiAqIEZpbmRzIEpTT04gUmVmZXJlbmNlcyBkZWZpbmVkIHdpdGhpbiB0aGUgcHJvdmlkZWQgYXJyYXkvb2JqZWN0LlxuICpcbiAqIEBwYXJhbSB7YXJyYXl8b2JqZWN0fSBvYmogLSBUaGUgc3RydWN0dXJlIHRvIGZpbmQgSlNPTiBSZWZlcmVuY2VzIHdpdGhpblxuICogQHBhcmFtIHttb2R1bGU6SnNvblJlZnN+SnNvblJlZnNPcHRpb25zfSBbb3B0aW9uc10gLSBUaGUgSnNvblJlZnMgb3B0aW9uc1xuICpcbiAqIEByZXR1cm5zIHtvYmplY3R9IGFuIG9iamVjdCB3aG9zZSBrZXlzIGFyZSBKU09OIFBvaW50ZXJzICooZnJhZ21lbnQgdmVyc2lvbikqIHRvIHdoZXJlIHRoZSBKU09OIFJlZmVyZW5jZSBpcyBkZWZpbmVkXG4gKiBhbmQgd2hvc2UgdmFsdWVzIGFyZSB7QGxpbmsgbW9kdWxlOkpzb25SZWZzflVucmVzb2x2ZWRSZWZEZXRhaWxzfS5cbiAqXG4gKiBAdGhyb3dzIHtFcnJvcn0gd2hlbiB0aGUgaW5wdXQgYXJndW1lbnRzIGZhaWwgdmFsaWRhdGlvbiBvciBpZiBgb3B0aW9ucy5zdWJEb2NQYXRoYCBwb2ludHMgdG8gYW4gaW52YWxpZCBsb2NhdGlvblxuICpcbiAqIEBhbGlhcyBtb2R1bGU6SnNvblJlZnMuZmluZFJlZnNcbiAqXG4gKiBAZXhhbXBsZVxuICogLy8gRmluZGluZyBhbGwgdmFsaWQgcmVmZXJlbmNlc1xuICogdmFyIGFsbFJlZnMgPSBKc29uUmVmcy5maW5kUmVmcyhvYmopO1xuICogLy8gRmluZGluZyBhbGwgcmVtb3RlIHJlZmVyZW5jZXNcbiAqIHZhciByZW1vdGVSZWZzID0gSnNvblJlZnMuZmluZFJlZnMob2JqLCB7ZmlsdGVyOiBbJ3JlbGF0aXZlJywgJ3JlbW90ZSddfSk7XG4gKiAvLyBGaW5kaW5nIGFsbCBpbnZhbGlkIHJlZmVyZW5jZXNcbiAqIHZhciBpbnZhbGlkUmVmcyA9IEpzb25SZWZzLmZpbmRSZWZzKG9iaiwge2ZpbHRlcjogJ2ludmFsaWQnLCBpbmNsdWRlSW52YWxpZDogdHJ1ZX0pO1xuICovXG5mdW5jdGlvbiBmaW5kUmVmcyAob2JqLCBvcHRpb25zKSB7XG4gIHZhciByZWZzID0ge307XG5cbiAgLy8gVmFsaWRhdGUgdGhlIHByb3ZpZGVkIGRvY3VtZW50XG4gIGlmICghaXNUeXBlKG9iaiwgJ0FycmF5JykgJiYgIWlzVHlwZShvYmosICdPYmplY3QnKSkge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ29iaiBtdXN0IGJlIGFuIEFycmF5IG9yIGFuIE9iamVjdCcpO1xuICB9XG5cbiAgLy8gVmFsaWRhdGUgb3B0aW9uc1xuICBvcHRpb25zID0gdmFsaWRhdGVPcHRpb25zKG9wdGlvbnMsIG9iaik7XG5cbiAgLy8gV2FsayB0aGUgZG9jdW1lbnQgKG9yIHN1YiBkb2N1bWVudCkgYW5kIGZpbmQgYWxsIEpTT04gUmVmZXJlbmNlc1xuICB3YWxrKGZpbmRBbmNlc3RvcnMob2JqLCBvcHRpb25zLnN1YkRvY1BhdGgpLFxuICAgICAgIGZpbmRWYWx1ZShvYmosIG9wdGlvbnMuc3ViRG9jUGF0aCksXG4gICAgICAgY2xvbmUob3B0aW9ucy5zdWJEb2NQYXRoKSxcbiAgICAgICBmdW5jdGlvbiAoYW5jZXN0b3JzLCBub2RlLCBwYXRoKSB7XG4gICAgICAgICB2YXIgcHJvY2Vzc0NoaWxkcmVuID0gdHJ1ZTtcbiAgICAgICAgIHZhciByZWZEZXRhaWxzO1xuXG4gICAgICAgICBpZiAoaXNSZWZMaWtlKG5vZGUpKSB7XG4gICAgICAgICAgIC8vIFByZS1wcm9jZXNzIHRoZSBub2RlIHdoZW4gbmVjZXNzYXJ5XG4gICAgICAgICAgIGlmICghaXNUeXBlKG9wdGlvbnMucmVmUHJlUHJvY2Vzc29yLCAnVW5kZWZpbmVkJykpIHtcbiAgICAgICAgICAgICBub2RlID0gb3B0aW9ucy5yZWZQcmVQcm9jZXNzb3IoY2xvbmUobm9kZSksIHBhdGgpO1xuICAgICAgICAgICB9XG5cbiAgICAgICAgICAgcmVmRGV0YWlscyA9IGdldFJlZkRldGFpbHMobm9kZSk7XG5cbiAgICAgICAgICAgLy8gUG9zdC1wcm9jZXNzIHRoZSByZWZlcmVuY2UgZGV0YWlsc1xuICAgICAgICAgICBpZiAoIWlzVHlwZShvcHRpb25zLnJlZlBvc3RQcm9jZXNzb3IsICdVbmRlZmluZWQnKSkge1xuICAgICAgICAgICAgIHJlZkRldGFpbHMgPSBvcHRpb25zLnJlZlBvc3RQcm9jZXNzb3IocmVmRGV0YWlscywgcGF0aCk7XG4gICAgICAgICAgIH1cblxuICAgICAgICAgICBpZiAob3B0aW9ucy5maWx0ZXIocmVmRGV0YWlscywgcGF0aCkpIHtcbiAgICAgICAgICAgICByZWZzW3BhdGhUb1B0cihwYXRoKV0gPSByZWZEZXRhaWxzO1xuICAgICAgICAgICB9XG5cbiAgICAgICAgICAgLy8gV2hlbmV2ZXIgYSBKU09OIFJlZmVyZW5jZSBoYXMgZXh0cmEgY2hpbGRyZW4sIGl0cyBjaGlsZHJlbiBzaG91bGQgbm90IGJlIHByb2Nlc3NlZC5cbiAgICAgICAgICAgLy8gICBTZWU6IGh0dHA6Ly90b29scy5pZXRmLm9yZy9odG1sL2RyYWZ0LXBicnlhbi16eXAtanNvbi1yZWYtMDMjc2VjdGlvbi0zXG4gICAgICAgICAgIGlmIChnZXRFeHRyYVJlZktleXMobm9kZSkubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgIHByb2Nlc3NDaGlsZHJlbiA9IGZhbHNlO1xuICAgICAgICAgICB9XG4gICAgICAgICB9XG5cbiAgICAgICAgIHJldHVybiBwcm9jZXNzQ2hpbGRyZW47XG4gICAgICAgfSk7XG5cbiAgcmV0dXJuIHJlZnM7XG59XG5cbi8qKlxuICogRmluZHMgSlNPTiBSZWZlcmVuY2VzIGRlZmluZWQgd2l0aGluIHRoZSBkb2N1bWVudCBhdCB0aGUgcHJvdmlkZWQgbG9jYXRpb24uXG4gKlxuICogVGhpcyBBUEkgaXMgaWRlbnRpY2FsIHRvIHtAbGluayBtb2R1bGU6SnNvblJlZnMuZmluZFJlZnN9IGV4Y2VwdCB0aGlzIEFQSSB3aWxsIHJldHJpZXZlIGEgcmVtb3RlIGRvY3VtZW50IGFuZCB0aGVuXG4gKiByZXR1cm4gdGhlIHJlc3VsdCBvZiB7QGxpbmsgbW9kdWxlOkpzb25SZWZzLmZpbmRSZWZzfSBvbiB0aGUgcmV0cmlldmVkIGRvY3VtZW50LlxuICpcbiAqIEBwYXJhbSB7c3RyaW5nfSBsb2NhdGlvbiAtIFRoZSBsb2NhdGlvbiB0byByZXRyaWV2ZSAqKENhbiBiZSByZWxhdGl2ZSBvciBhYnNvbHV0ZSwganVzdCBtYWtlIHN1cmUgeW91IGxvb2sgYXQgdGhlXG4gKiB7QGxpbmsgbW9kdWxlOkpzb25SZWZzfkpzb25SZWZzT3B0aW9uc3xvcHRpb25zIGRvY3VtZW50YXRpb259IHRvIHNlZSBob3cgcmVsYXRpdmUgcmVmZXJlbmNlcyBhcmUgaGFuZGxlZC4pKlxuICogQHBhcmFtIHttb2R1bGU6SnNvblJlZnN+SnNvblJlZnNPcHRpb25zfSBbb3B0aW9uc10gLSBUaGUgSnNvblJlZnMgb3B0aW9uc1xuICpcbiAqIEByZXR1cm5zIHtQcm9taXNlfSBhIHByb21pc2UgdGhhdCByZXNvbHZlcyBhIHtAbGluayBtb2R1bGU6SnNvblJlZnN+UmV0cmlldmVkUmVmc1Jlc3VsdHN9IGFuZCByZWplY3RzIHdpdGggYW5cbiAqIGBFcnJvcmAgd2hlbiB0aGUgaW5wdXQgYXJndW1lbnRzIGZhaWwgdmFsaWRhdGlvbiwgd2hlbiBgb3B0aW9ucy5zdWJEb2NQYXRoYCBwb2ludHMgdG8gYW4gaW52YWxpZCBsb2NhdGlvbiBvciB3aGVuXG4gKiAgdGhlIGxvY2F0aW9uIGFyZ3VtZW50IHBvaW50cyB0byBhbiB1bmxvYWRhYmxlIHJlc291cmNlXG4gKlxuICogQGFsaWFzIG1vZHVsZTpKc29uUmVmcy5maW5kUmVmc0F0XG4gKlxuICogQGV4YW1wbGVcbiAqIC8vIEV4YW1wbGUgdGhhdCBvbmx5IHJlc29sdmVzIHJlZmVyZW5jZXMgd2l0aGluIGEgc3ViIGRvY3VtZW50XG4gKiBKc29uUmVmcy5maW5kUmVmc0F0KCdodHRwOi8vcGV0c3RvcmUuc3dhZ2dlci5pby92Mi9zd2FnZ2VyLmpzb24nLCB7XG4gKiAgICAgc3ViRG9jUGF0aDogJyMvZGVmaW5pdGlvbnMnXG4gKiAgIH0pXG4gKiAgIC50aGVuKGZ1bmN0aW9uIChyZXMpIHtcbiAqICAgICAgLy8gRG8gc29tZXRoaW5nIHdpdGggdGhlIHJlc3BvbnNlXG4gKiAgICAgIC8vXG4gKiAgICAgIC8vIHJlcy5yZWZzOiBKU09OIFJlZmVyZW5jZSBsb2NhdGlvbnMgYW5kIGRldGFpbHNcbiAqICAgICAgLy8gcmVzLnZhbHVlOiBUaGUgcmV0cmlldmVkIGRvY3VtZW50XG4gKiAgIH0sIGZ1bmN0aW9uIChlcnIpIHtcbiAqICAgICBjb25zb2xlLmxvZyhlcnIuc3RhY2spO1xuICogICB9KTtcbiAqL1xuZnVuY3Rpb24gZmluZFJlZnNBdCAobG9jYXRpb24sIG9wdGlvbnMpIHtcbiAgdmFyIGFsbFRhc2tzID0gUHJvbWlzZS5yZXNvbHZlKCk7XG5cbiAgYWxsVGFza3MgPSBhbGxUYXNrc1xuICAgIC50aGVuKGZ1bmN0aW9uICgpIHtcbiAgICAgIC8vIFZhbGlkYXRlIHRoZSBwcm92aWRlZCBsb2NhdGlvblxuICAgICAgaWYgKCFpc1R5cGUobG9jYXRpb24sICdTdHJpbmcnKSkge1xuICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdsb2NhdGlvbiBtdXN0IGJlIGEgc3RyaW5nJyk7XG4gICAgICB9XG5cbiAgICAgIC8vIFZhbGlkYXRlIG9wdGlvbnNcbiAgICAgIG9wdGlvbnMgPSB2YWxpZGF0ZU9wdGlvbnMob3B0aW9ucyk7XG5cbiAgICAgIC8vIENvbWJpbmUgdGhlIGxvY2F0aW9uIGFuZCB0aGUgb3B0aW9uYWwgcmVsYXRpdmUgYmFzZVxuICAgICAgbG9jYXRpb24gPSBjb21iaW5lVVJJcyhvcHRpb25zLnJlbGF0aXZlQmFzZSwgbG9jYXRpb24pO1xuXG4gICAgICByZXR1cm4gZ2V0UmVtb3RlRG9jdW1lbnQobG9jYXRpb24sIG9wdGlvbnMpO1xuICAgIH0pXG4gICAgLnRoZW4oZnVuY3Rpb24gKHJlcykge1xuICAgICAgdmFyIGNhY2hlRW50cnkgPSBjbG9uZShyZW1vdGVDYWNoZVtsb2NhdGlvbl0pO1xuICAgICAgdmFyIGNPcHRpb25zID0gY2xvbmUob3B0aW9ucyk7XG4gICAgICB2YXIgdXJpRGV0YWlscyA9IHBhcnNlVVJJKGxvY2F0aW9uKTtcblxuICAgICAgaWYgKGlzVHlwZShjYWNoZUVudHJ5LnJlZnMsICdVbmRlZmluZWQnKSkge1xuICAgICAgICAvLyBEbyBub3QgZmlsdGVyIGFueSByZWZlcmVuY2VzIHNvIHRoZSBjYWNoZSBpcyBjb21wbGV0ZVxuICAgICAgICBkZWxldGUgY09wdGlvbnMuZmlsdGVyO1xuICAgICAgICBkZWxldGUgY09wdGlvbnMuc3ViRG9jUGF0aDtcblxuICAgICAgICBjT3B0aW9ucy5pbmNsdWRlSW52YWxpZCA9IHRydWU7XG5cbiAgICAgICAgcmVtb3RlQ2FjaGVbbG9jYXRpb25dLnJlZnMgPSBmaW5kUmVmcyhyZXMsIGNPcHRpb25zKTtcbiAgICAgIH1cblxuICAgICAgLy8gQWRkIHRoZSBmaWx0ZXIgb3B0aW9ucyBiYWNrXG4gICAgICBpZiAoIWlzVHlwZShvcHRpb25zLmZpbHRlciwgJ1VuZGVmaW5lZCcpKSB7XG4gICAgICAgIGNPcHRpb25zLmZpbHRlciA9IG9wdGlvbnMuZmlsdGVyO1xuICAgICAgfVxuXG4gICAgICBpZiAoIWlzVHlwZSh1cmlEZXRhaWxzLmZyYWdtZW50LCAnVW5kZWZpbmVkJykpIHtcbiAgICAgICAgY09wdGlvbnMuc3ViRG9jUGF0aCA9IHBhdGhGcm9tUHRyKGRlY29kZVVSSSh1cmlEZXRhaWxzLmZyYWdtZW50KSk7XG4gICAgICB9IGVsc2UgaWYgKCFpc1R5cGUodXJpRGV0YWlscy5zdWJEb2NQYXRoLCAnVW5kZWZpbmVkJykpIHtcbiAgICAgICAgY09wdGlvbnMuc3ViRG9jUGF0aCA9IG9wdGlvbnMuc3ViRG9jUGF0aDtcbiAgICAgIH1cblxuICAgICAgLy8gVGhpcyB3aWxsIHVzZSB0aGUgY2FjaGUgc28gZG9uJ3Qgd29ycnkgYWJvdXQgY2FsbGluZyBpdCB0d2ljZVxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgcmVmczogZmluZFJlZnMocmVzLCBjT3B0aW9ucyksXG4gICAgICAgIHZhbHVlOiByZXNcbiAgICAgIH07XG4gICAgfSk7XG5cbiAgcmV0dXJuIGFsbFRhc2tzO1xufVxuXG4vKipcbiAqIFJldHVybnMgZGV0YWlsZWQgaW5mb3JtYXRpb24gYWJvdXQgdGhlIEpTT04gUmVmZXJlbmNlLlxuICpcbiAqIEBwYXJhbSB7b2JqZWN0fSBvYmogLSBUaGUgSlNPTiBSZWZlcmVuY2UgZGVmaW5pdGlvblxuICpcbiAqIEByZXR1cm5zIHttb2R1bGU6SnNvblJlZnN+VW5yZXNvbHZlZFJlZkRldGFpbHN9IHRoZSBkZXRhaWxlZCBpbmZvcm1hdGlvblxuICpcbiAqIEBhbGlhcyBtb2R1bGU6SnNvblJlZnMuZ2V0UmVmRGV0YWlsc1xuICovXG5mdW5jdGlvbiBnZXRSZWZEZXRhaWxzIChvYmopIHtcbiAgdmFyIGRldGFpbHMgPSB7XG4gICAgZGVmOiBvYmpcbiAgfTtcbiAgdmFyIGNhY2hlS2V5O1xuICB2YXIgZXh0cmFLZXlzO1xuICB2YXIgdXJpRGV0YWlscztcblxuICB0cnkge1xuICAgIGlmIChpc1JlZkxpa2Uob2JqLCB0cnVlKSkge1xuICAgICAgY2FjaGVLZXkgPSBvYmouJHJlZjtcbiAgICAgIHVyaURldGFpbHMgPSB1cmlEZXRhaWxzQ2FjaGVbY2FjaGVLZXldO1xuXG4gICAgICBpZiAoaXNUeXBlKHVyaURldGFpbHMsICdVbmRlZmluZWQnKSkge1xuICAgICAgICB1cmlEZXRhaWxzID0gdXJpRGV0YWlsc0NhY2hlW2NhY2hlS2V5XSA9IHBhcnNlVVJJKGNhY2hlS2V5KTtcbiAgICAgIH1cblxuICAgICAgZGV0YWlscy51cmkgPSBjYWNoZUtleTtcbiAgICAgIGRldGFpbHMudXJpRGV0YWlscyA9IHVyaURldGFpbHM7XG5cbiAgICAgIGlmIChpc1R5cGUodXJpRGV0YWlscy5lcnJvciwgJ1VuZGVmaW5lZCcpKSB7XG4gICAgICAgIGRldGFpbHMudHlwZSA9IGdldFJlZlR5cGUoZGV0YWlscyk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBkZXRhaWxzLmVycm9yID0gZGV0YWlscy51cmlEZXRhaWxzLmVycm9yO1xuICAgICAgICBkZXRhaWxzLnR5cGUgPSAnaW52YWxpZCc7XG4gICAgICB9XG5cbiAgICAgIC8vIElkZW50aWZ5IHdhcm5pbmdcbiAgICAgIGV4dHJhS2V5cyA9IGdldEV4dHJhUmVmS2V5cyhvYmopO1xuXG4gICAgICBpZiAoZXh0cmFLZXlzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgZGV0YWlscy53YXJuaW5nID0gJ0V4dHJhIEpTT04gUmVmZXJlbmNlIHByb3BlcnRpZXMgd2lsbCBiZSBpZ25vcmVkOiAnICsgZXh0cmFLZXlzLmpvaW4oJywgJyk7XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIGRldGFpbHMudHlwZSA9ICdpbnZhbGlkJztcbiAgICB9XG4gIH0gY2F0Y2ggKGVycikge1xuICAgIGRldGFpbHMuZXJyb3IgPSBlcnIubWVzc2FnZTtcbiAgICBkZXRhaWxzLnR5cGUgPSAnaW52YWxpZCc7XG4gIH1cblxuICByZXR1cm4gZGV0YWlscztcbn1cblxuLyoqXG4gKiBSZXR1cm5zIHdoZXRoZXIgdGhlIGFyZ3VtZW50IHJlcHJlc2VudHMgYSBKU09OIFBvaW50ZXIuXG4gKlxuICogQSBzdHJpbmcgaXMgYSBKU09OIFBvaW50ZXIgaWYgdGhlIGZvbGxvd2luZyBhcmUgYWxsIHRydWU6XG4gKlxuICogICAqIFRoZSBzdHJpbmcgaXMgb2YgdHlwZSBgU3RyaW5nYFxuICogICAqIFRoZSBzdHJpbmcgbXVzdCBiZSBlbXB0eSwgYCNgIG9yIHN0YXJ0IHdpdGggYSBgL2Agb3IgYCMvYFxuICpcbiAqIEBwYXJhbSB7c3RyaW5nfSBwdHIgLSBUaGUgc3RyaW5nIHRvIGNoZWNrXG4gKiBAcGFyYW0ge2Jvb2xlYW59IFt0aHJvd1dpdGhEZXRhaWxzPWZhbHNlXSAtIFdoZXRoZXIgb3Igbm90IHRvIHRocm93IGFuIGBFcnJvcmAgd2l0aCB0aGUgZGV0YWlscyBhcyB0byB3aHkgdGhlIHZhbHVlXG4gKiBwcm92aWRlZCBpcyBpbnZhbGlkXG4gKlxuICogQHJldHVybnMge2Jvb2xlYW59IHRoZSByZXN1bHQgb2YgdGhlIGNoZWNrXG4gKlxuICogQHRocm93cyB7ZXJyb3J9IHdoZW4gdGhlIHByb3ZpZGVkIHZhbHVlIGlzIGludmFsaWQgYW5kIHRoZSBgdGhyb3dXaXRoRGV0YWlsc2AgYXJndW1lbnQgaXMgYHRydWVgXG4gKlxuICogQGFsaWFzIG1vZHVsZTpKc29uUmVmcy5pc1B0clxuICpcbiAqIEBzZWUge0BsaW5rIGh0dHBzOi8vdG9vbHMuaWV0Zi5vcmcvaHRtbC9yZmM2OTAxI3NlY3Rpb24tM31cbiAqXG4gKiBAZXhhbXBsZVxuICogLy8gU2VwYXJhdGluZyB0aGUgZGlmZmVyZW50IHdheXMgdG8gaW52b2tlIGlzUHRyIGZvciBkZW1vbnN0cmF0aW9uIHB1cnBvc2VzXG4gKiBpZiAoaXNQdHIoc3RyKSkge1xuICogICAvLyBIYW5kbGUgYSB2YWxpZCBKU09OIFBvaW50ZXJcbiAqIH0gZWxzZSB7XG4gKiAgIC8vIEdldCB0aGUgcmVhc29uIGFzIHRvIHdoeSB0aGUgdmFsdWUgaXMgbm90IGEgSlNPTiBQb2ludGVyIHNvIHlvdSBjYW4gZml4L3JlcG9ydCBpdFxuICogICB0cnkge1xuICogICAgIGlzUHRyKHN0ciwgdHJ1ZSk7XG4gKiAgIH0gY2F0Y2ggKGVycikge1xuICogICAgIC8vIFRoZSBlcnJvciBtZXNzYWdlIGNvbnRhaW5zIHRoZSBkZXRhaWxzIGFzIHRvIHdoeSB0aGUgcHJvdmlkZWQgdmFsdWUgaXMgbm90IGEgSlNPTiBQb2ludGVyXG4gKiAgIH1cbiAqIH1cbiAqL1xuZnVuY3Rpb24gaXNQdHIgKHB0ciwgdGhyb3dXaXRoRGV0YWlscykge1xuICB2YXIgdmFsaWQgPSB0cnVlO1xuICB2YXIgZmlyc3RDaGFyO1xuXG4gIHRyeSB7XG4gICAgaWYgKGlzVHlwZShwdHIsICdTdHJpbmcnKSkge1xuICAgICAgaWYgKHB0ciAhPT0gJycpIHtcbiAgICAgICAgZmlyc3RDaGFyID0gcHRyLmNoYXJBdCgwKTtcblxuICAgICAgICBpZiAoWycjJywgJy8nXS5pbmRleE9mKGZpcnN0Q2hhcikgPT09IC0xKSB7XG4gICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdwdHIgbXVzdCBzdGFydCB3aXRoIGEgLyBvciAjLycpO1xuICAgICAgICB9IGVsc2UgaWYgKGZpcnN0Q2hhciA9PT0gJyMnICYmIHB0ciAhPT0gJyMnICYmIHB0ci5jaGFyQXQoMSkgIT09ICcvJykge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcigncHRyIG11c3Qgc3RhcnQgd2l0aCBhIC8gb3IgIy8nKTtcbiAgICAgICAgfSBlbHNlIGlmIChwdHIubWF0Y2goYmFkUHRyVG9rZW5SZWdleCkpIHtcbiAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ3B0ciBoYXMgaW52YWxpZCB0b2tlbihzKScpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcigncHRyIGlzIG5vdCBhIFN0cmluZycpO1xuICAgIH1cbiAgfSBjYXRjaCAoZXJyKSB7XG4gICAgaWYgKHRocm93V2l0aERldGFpbHMgPT09IHRydWUpIHtcbiAgICAgIHRocm93IGVycjtcbiAgICB9XG5cbiAgICB2YWxpZCA9IGZhbHNlO1xuICB9XG5cbiAgcmV0dXJuIHZhbGlkO1xufVxuXG4vKipcbiAqIFJldHVybnMgd2hldGhlciB0aGUgYXJndW1lbnQgcmVwcmVzZW50cyBhIEpTT04gUmVmZXJlbmNlLlxuICpcbiAqIEFuIG9iamVjdCBpcyBhIEpTT04gUmVmZXJlbmNlIG9ubHkgaWYgdGhlIGZvbGxvd2luZyBhcmUgYWxsIHRydWU6XG4gKlxuICogICAqIFRoZSBvYmplY3QgaXMgb2YgdHlwZSBgT2JqZWN0YFxuICogICAqIFRoZSBvYmplY3QgaGFzIGEgYCRyZWZgIHByb3BlcnR5XG4gKiAgICogVGhlIGAkcmVmYCBwcm9wZXJ0eSBpcyBhIHZhbGlkIFVSSSAqKFdlIGRvIG5vdCByZXF1aXJlIDEwMCUgc3RyaWN0IFVSSXMgYW5kIHdpbGwgaGFuZGxlIHVuZXNjYXBlZCBzcGVjaWFsXG4gKiAgICAgY2hhcmFjdGVycy4pKlxuICpcbiAqIEBwYXJhbSB7b2JqZWN0fSBvYmogLSBUaGUgb2JqZWN0IHRvIGNoZWNrXG4gKiBAcGFyYW0ge2Jvb2xlYW59IFt0aHJvd1dpdGhEZXRhaWxzPWZhbHNlXSAtIFdoZXRoZXIgb3Igbm90IHRvIHRocm93IGFuIGBFcnJvcmAgd2l0aCB0aGUgZGV0YWlscyBhcyB0byB3aHkgdGhlIHZhbHVlXG4gKiBwcm92aWRlZCBpcyBpbnZhbGlkXG4gKlxuICogQHJldHVybnMge2Jvb2xlYW59IHRoZSByZXN1bHQgb2YgdGhlIGNoZWNrXG4gKlxuICogQHRocm93cyB7ZXJyb3J9IHdoZW4gdGhlIHByb3ZpZGVkIHZhbHVlIGlzIGludmFsaWQgYW5kIHRoZSBgdGhyb3dXaXRoRGV0YWlsc2AgYXJndW1lbnQgaXMgYHRydWVgXG4gKlxuICogQGFsaWFzIG1vZHVsZTpKc29uUmVmcy5pc1JlZlxuICpcbiAqIEBzZWUge0BsaW5rIGh0dHA6Ly90b29scy5pZXRmLm9yZy9odG1sL2RyYWZ0LXBicnlhbi16eXAtanNvbi1yZWYtMDMjc2VjdGlvbi0zfVxuICpcbiAqIEBleGFtcGxlXG4gKiAvLyBTZXBhcmF0aW5nIHRoZSBkaWZmZXJlbnQgd2F5cyB0byBpbnZva2UgaXNSZWYgZm9yIGRlbW9uc3RyYXRpb24gcHVycG9zZXNcbiAqIGlmIChpc1JlZihvYmopKSB7XG4gKiAgIC8vIEhhbmRsZSBhIHZhbGlkIEpTT04gUmVmZXJlbmNlXG4gKiB9IGVsc2Uge1xuICogICAvLyBHZXQgdGhlIHJlYXNvbiBhcyB0byB3aHkgdGhlIHZhbHVlIGlzIG5vdCBhIEpTT04gUmVmZXJlbmNlIHNvIHlvdSBjYW4gZml4L3JlcG9ydCBpdFxuICogICB0cnkge1xuICogICAgIGlzUmVmKHN0ciwgdHJ1ZSk7XG4gKiAgIH0gY2F0Y2ggKGVycikge1xuICogICAgIC8vIFRoZSBlcnJvciBtZXNzYWdlIGNvbnRhaW5zIHRoZSBkZXRhaWxzIGFzIHRvIHdoeSB0aGUgcHJvdmlkZWQgdmFsdWUgaXMgbm90IGEgSlNPTiBSZWZlcmVuY2VcbiAqICAgfVxuICogfVxuICovXG5mdW5jdGlvbiBpc1JlZiAob2JqLCB0aHJvd1dpdGhEZXRhaWxzKSB7XG4gIHJldHVybiBpc1JlZkxpa2Uob2JqLCB0aHJvd1dpdGhEZXRhaWxzKSAmJiBnZXRSZWZEZXRhaWxzKG9iaiwgdGhyb3dXaXRoRGV0YWlscykudHlwZSAhPT0gJ2ludmFsaWQnO1xufVxuXG4vKipcbiAqIFJldHVybnMgYW4gYXJyYXkgb2YgcGF0aCBzZWdtZW50cyBmb3IgdGhlIHByb3ZpZGVkIEpTT04gUG9pbnRlci5cbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30gcHRyIC0gVGhlIEpTT04gUG9pbnRlclxuICpcbiAqIEByZXR1cm5zIHtzdHJpbmdbXX0gdGhlIHBhdGggc2VnbWVudHNcbiAqXG4gKiBAdGhyb3dzIHtFcnJvcn0gaWYgdGhlIHByb3ZpZGVkIGBwdHJgIGFyZ3VtZW50IGlzIG5vdCBhIEpTT04gUG9pbnRlclxuICpcbiAqIEBhbGlhcyBtb2R1bGU6SnNvblJlZnMucGF0aEZyb21QdHJcbiAqL1xuZnVuY3Rpb24gcGF0aEZyb21QdHIgKHB0cikge1xuICBpZiAoIWlzUHRyKHB0cikpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ3B0ciBtdXN0IGJlIGEgSlNPTiBQb2ludGVyJyk7XG4gIH1cblxuICB2YXIgc2VnbWVudHMgPSBwdHIuc3BsaXQoJy8nKTtcblxuICAvLyBSZW1vdmUgdGhlIGZpcnN0IHNlZ21lbnRcbiAgc2VnbWVudHMuc2hpZnQoKTtcblxuICByZXR1cm4gZGVjb2RlUGF0aChzZWdtZW50cyk7XG59XG5cbi8qKlxuICogUmV0dXJucyBhIEpTT04gUG9pbnRlciBmb3IgdGhlIHByb3ZpZGVkIGFycmF5IG9mIHBhdGggc2VnbWVudHMuXG4gKlxuICogKipOb3RlOioqIElmIGEgcGF0aCBzZWdtZW50IGluIGBwYXRoYCBpcyBub3QgYSBgU3RyaW5nYCwgaXQgd2lsbCBiZSBjb252ZXJ0ZWQgdG8gb25lIHVzaW5nIGBKU09OLnN0cmluZ2lmeWAuXG4gKlxuICogQHBhcmFtIHtzdHJpbmdbXX0gcGF0aCAtIFRoZSBhcnJheSBvZiBwYXRoIHNlZ21lbnRzXG4gKiBAcGFyYW0ge2Jvb2xlYW59IFtoYXNoUHJlZml4PXRydWVdIC0gV2hldGhlciBvciBub3QgY3JlYXRlIGEgaGFzaC1wcmVmaXhlZCBKU09OIFBvaW50ZXJcbiAqXG4gKiBAcmV0dXJucyB7c3RyaW5nfSB0aGUgY29ycmVzcG9uZGluZyBKU09OIFBvaW50ZXJcbiAqXG4gKiBAdGhyb3dzIHtFcnJvcn0gaWYgdGhlIGBwYXRoYCBhcmd1bWVudCBpcyBub3QgYW4gYXJyYXlcbiAqXG4gKiBAYWxpYXMgbW9kdWxlOkpzb25SZWZzLnBhdGhUb1B0clxuICovXG5mdW5jdGlvbiBwYXRoVG9QdHIgKHBhdGgsIGhhc2hQcmVmaXgpIHtcbiAgaWYgKCFpc1R5cGUocGF0aCwgJ0FycmF5JykpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ3BhdGggbXVzdCBiZSBhbiBBcnJheScpO1xuICB9XG5cbiAgLy8gRW5jb2RlIGVhY2ggc2VnbWVudCBhbmQgcmV0dXJuXG4gIHJldHVybiAoaGFzaFByZWZpeCAhPT0gZmFsc2UgPyAnIycgOiAnJykgKyAocGF0aC5sZW5ndGggPiAwID8gJy8nIDogJycpICsgZW5jb2RlUGF0aChwYXRoKS5qb2luKCcvJyk7XG59XG5cbi8qKlxuICogRmluZHMgSlNPTiBSZWZlcmVuY2VzIGRlZmluZWQgd2l0aGluIHRoZSBwcm92aWRlZCBhcnJheS9vYmplY3QgYW5kIHJlc29sdmVzIHRoZW0uXG4gKlxuICogQHBhcmFtIHthcnJheXxvYmplY3R9IG9iaiAtIFRoZSBzdHJ1Y3R1cmUgdG8gZmluZCBKU09OIFJlZmVyZW5jZXMgd2l0aGluXG4gKiBAcGFyYW0ge21vZHVsZTpKc29uUmVmc35Kc29uUmVmc09wdGlvbnN9IFtvcHRpb25zXSAtIFRoZSBKc29uUmVmcyBvcHRpb25zXG4gKlxuICogQHJldHVybnMge1Byb21pc2V9IGEgcHJvbWlzZSB0aGF0IHJlc29sdmVzIGEge0BsaW5rIG1vZHVsZTpKc29uUmVmc35SZXNvbHZlZFJlZnNSZXN1bHRzfSBhbmQgcmVqZWN0cyB3aXRoIGFuXG4gKiBgRXJyb3JgIHdoZW4gdGhlIGlucHV0IGFyZ3VtZW50cyBmYWlsIHZhbGlkYXRpb24sIHdoZW4gYG9wdGlvbnMuc3ViRG9jUGF0aGAgcG9pbnRzIHRvIGFuIGludmFsaWQgbG9jYXRpb24gb3Igd2hlblxuICogIHRoZSBsb2NhdGlvbiBhcmd1bWVudCBwb2ludHMgdG8gYW4gdW5sb2FkYWJsZSByZXNvdXJjZVxuICpcbiAqIEBhbGlhcyBtb2R1bGU6SnNvblJlZnMucmVzb2x2ZVJlZnNcbiAqXG4gKiBAZXhhbXBsZVxuICogLy8gRXhhbXBsZSB0aGF0IG9ubHkgcmVzb2x2ZXMgcmVsYXRpdmUgYW5kIHJlbW90ZSByZWZlcmVuY2VzXG4gKiBKc29uUmVmcy5yZXNvbHZlUmVmcyhzd2FnZ2VyT2JqLCB7XG4gKiAgICAgZmlsdGVyOiBbJ3JlbGF0aXZlJywgJ3JlbW90ZSddXG4gKiAgIH0pXG4gKiAgIC50aGVuKGZ1bmN0aW9uIChyZXMpIHtcbiAqICAgICAgLy8gRG8gc29tZXRoaW5nIHdpdGggdGhlIHJlc3BvbnNlXG4gKiAgICAgIC8vXG4gKiAgICAgIC8vIHJlcy5yZWZzOiBKU09OIFJlZmVyZW5jZSBsb2NhdGlvbnMgYW5kIGRldGFpbHNcbiAqICAgICAgLy8gcmVzLnJlc29sdmVkOiBUaGUgZG9jdW1lbnQgd2l0aCB0aGUgYXBwcm9wcmlhdGUgSlNPTiBSZWZlcmVuY2VzIHJlc29sdmVkXG4gKiAgIH0sIGZ1bmN0aW9uIChlcnIpIHtcbiAqICAgICBjb25zb2xlLmxvZyhlcnIuc3RhY2spO1xuICogICB9KTtcbiAqL1xuZnVuY3Rpb24gcmVzb2x2ZVJlZnMgKG9iaiwgb3B0aW9ucykge1xuICB2YXIgYWxsVGFza3MgPSBQcm9taXNlLnJlc29sdmUoKTtcblxuICBhbGxUYXNrcyA9IGFsbFRhc2tzXG4gICAgLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgLy8gVmFsaWRhdGUgdGhlIHByb3ZpZGVkIGRvY3VtZW50XG4gICAgICBpZiAoIWlzVHlwZShvYmosICdBcnJheScpICYmICFpc1R5cGUob2JqLCAnT2JqZWN0JykpIHtcbiAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignb2JqIG11c3QgYmUgYW4gQXJyYXkgb3IgYW4gT2JqZWN0Jyk7XG4gICAgICB9XG5cbiAgICAgIC8vIFZhbGlkYXRlIG9wdGlvbnNcbiAgICAgIG9wdGlvbnMgPSB2YWxpZGF0ZU9wdGlvbnMob3B0aW9ucywgb2JqKTtcblxuICAgICAgLy8gQ2xvbmUgdGhlIGlucHV0IHNvIHdlIGRvIG5vdCBhbHRlciBpdFxuICAgICAgb2JqID0gY2xvbmUob2JqKTtcbiAgICB9KVxuICAgIC50aGVuKGZ1bmN0aW9uICgpIHtcbiAgICAgIHJldHVybiBmaW5kUmVmc1JlY3Vyc2l2ZShvYmosIG9wdGlvbnMsIFtdLCBbXSwge1xuICAgICAgICBkb2N1bWVudHM6IHt9LFxuICAgICAgICByZWZzOiB7fVxuICAgICAgfSk7XG4gICAgfSlcbiAgICAudGhlbihmdW5jdGlvbiAoYWxsUmVmcykge1xuICAgICAgdmFyIGRlZmVycmVkUmVmcyA9IHt9O1xuICAgICAgdmFyIHJlZnMgPSB7fTtcblxuICAgICAgZnVuY3Rpb24gcGF0aFNvcnRlciAocDEsIHAyKSB7XG4gICAgICAgIHJldHVybiBwYXRoRnJvbVB0cihwMSkubGVuZ3RoIC0gcGF0aEZyb21QdHIocDIpLmxlbmd0aDtcbiAgICAgIH1cblxuICAgICAgLy8gUmVzb2x2ZSBhbGwgcmVmZXJlbmNlcyB3aXRoIGEga25vd24gdmFsdWVcbiAgICAgIE9iamVjdC5rZXlzKGFsbFJlZnMucmVmcykuc29ydChwYXRoU29ydGVyKS5mb3JFYWNoKGZ1bmN0aW9uIChyZWZQdHIpIHtcbiAgICAgICAgdmFyIHJlZkRldGFpbHMgPSBhbGxSZWZzLnJlZnNbcmVmUHRyXTtcblxuICAgICAgICAvLyBSZWNvcmQgYWxsIGRpcmVjdCByZWZlcmVuY2VzXG4gICAgICAgIGlmICghcmVmRGV0YWlscy5pbmRpcmVjdCkge1xuICAgICAgICAgIHJlZnNbcmVmUHRyXSA9IHJlZkRldGFpbHM7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBEZWxldGUgaGVscGVyIHByb3BlcnR5XG4gICAgICAgIGRlbGV0ZSByZWZEZXRhaWxzLmluZGlyZWN0O1xuXG4gICAgICAgIGlmIChpc1R5cGUocmVmRGV0YWlscy5lcnJvciwgJ1VuZGVmaW5lZCcpICYmIHJlZkRldGFpbHMudHlwZSAhPT0gJ2ludmFsaWQnKSB7XG4gICAgICAgICAgaWYgKGlzVHlwZShyZWZEZXRhaWxzLnZhbHVlLCAnVW5kZWZpbmVkJykgJiYgcmVmRGV0YWlscy5jaXJjdWxhcikge1xuICAgICAgICAgICAgcmVmRGV0YWlscy52YWx1ZSA9IHJlZkRldGFpbHMuZGVmO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIC8vIFdlIGRlZmVyIHByb2Nlc3NpbmcgYWxsIHJlZmVyZW5jZXMgd2l0aG91dCBhIHZhbHVlIHVudGlsIGxhdGVyXG4gICAgICAgICAgaWYgKGlzVHlwZShyZWZEZXRhaWxzLnZhbHVlLCAnVW5kZWZpbmVkJykpIHtcbiAgICAgICAgICAgIGRlZmVycmVkUmVmc1tyZWZQdHJdID0gcmVmRGV0YWlscztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHJlZlB0ciA9PT0gJyMnKSB7XG4gICAgICAgICAgICAgIG9iaiA9IHJlZkRldGFpbHMudmFsdWU7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBzZXRWYWx1ZShvYmosIHBhdGhGcm9tUHRyKHJlZlB0ciksIHJlZkRldGFpbHMudmFsdWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBEZWxldGUgaGVscGVyIHByb3BlcnR5XG4gICAgICAgICAgICBkZWxldGUgcmVmRGV0YWlscy5hbmNlc3RvclB0cnM7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIERlbGV0ZSBoZWxwZXIgcHJvcGVydHlcbiAgICAgICAgICBkZWxldGUgcmVmRGV0YWlscy5hbmNlc3RvclB0cnM7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuXG4gICAgICAvLyBSZXNvbHZlIGFsbCBkZWZlcnJlZCByZWZlcmVuY2VzXG4gICAgICBPYmplY3Qua2V5cyhkZWZlcnJlZFJlZnMpLmZvckVhY2goZnVuY3Rpb24gKHJlZlB0cikge1xuICAgICAgICB2YXIgcmVmRGV0YWlscyA9IGRlZmVycmVkUmVmc1tyZWZQdHJdO1xuXG4gICAgICAgIC8vIEF0dGVtcHQgdG8gcmVzb2x2ZSB0aGUgdmFsdWUgYWdhaW5zdCBhbGwgaWYgaXRzIGFuY2VzdG9ycyBpbiBvcmRlclxuICAgICAgICByZWZEZXRhaWxzLmFuY2VzdG9yUHRycy5mb3JFYWNoKGZ1bmN0aW9uIChhbmNlc3RvclB0ciwgaW5kZXgpIHtcbiAgICAgICAgICBpZiAoaXNUeXBlKHJlZkRldGFpbHMudmFsdWUsICdVbmRlZmluZWQnKSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgcmVmRGV0YWlscy52YWx1ZSA9IGZpbmRWYWx1ZShhbGxSZWZzLmRvY3VtZW50c1thbmNlc3RvclB0cl0sIHBhdGhGcm9tUHRyKHJlZkRldGFpbHMudXJpKSk7XG5cbiAgICAgICAgICAgICAgLy8gRGVsZXRlIGhlbHBlciBwcm9wZXJ0eVxuICAgICAgICAgICAgICBkZWxldGUgcmVmRGV0YWlscy5hbmNlc3RvclB0cnM7XG5cbiAgICAgICAgICAgICAgc2V0VmFsdWUob2JqLCBwYXRoRnJvbVB0cihyZWZQdHIpLCByZWZEZXRhaWxzLnZhbHVlKTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBpZiAoaW5kZXggPT09IHJlZkRldGFpbHMuYW5jZXN0b3JQdHJzLmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICByZWZEZXRhaWxzLmVycm9yID0gZXJyLm1lc3NhZ2U7XG4gICAgICAgICAgICAgICAgcmVmRGV0YWlscy5taXNzaW5nID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgIC8vIERlbGV0ZSBoZWxwZXIgcHJvcGVydHlcbiAgICAgICAgICAgICAgICBkZWxldGUgcmVmRGV0YWlscy5hbmNlc3RvclB0cnM7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfSk7XG5cbiAgICAgIHJldHVybiB7XG4gICAgICAgIHJlZnM6IHJlZnMsXG4gICAgICAgIHJlc29sdmVkOiBvYmpcbiAgICAgIH07XG4gICAgfSk7XG5cbiAgcmV0dXJuIGFsbFRhc2tzO1xufVxuXG4vKipcbiAqIFJlc29sdmVzIEpTT04gUmVmZXJlbmNlcyBkZWZpbmVkIHdpdGhpbiB0aGUgZG9jdW1lbnQgYXQgdGhlIHByb3ZpZGVkIGxvY2F0aW9uLlxuICpcbiAqIFRoaXMgQVBJIGlzIGlkZW50aWNhbCB0byB7QGxpbmsgbW9kdWxlOkpzb25SZWZzLnJlc29sdmVSZWZzfSBleGNlcHQgdGhpcyBBUEkgd2lsbCByZXRyaWV2ZSBhIHJlbW90ZSBkb2N1bWVudCBhbmQgdGhlblxuICogcmV0dXJuIHRoZSByZXN1bHQgb2Yge0BsaW5rIG1vZHVsZTpKc29uUmVmcy5yZXNvbHZlUmVmc30gb24gdGhlIHJldHJpZXZlZCBkb2N1bWVudC5cbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30gbG9jYXRpb24gLSBUaGUgbG9jYXRpb24gdG8gcmV0cmlldmUgKihDYW4gYmUgcmVsYXRpdmUgb3IgYWJzb2x1dGUsIGp1c3QgbWFrZSBzdXJlIHlvdSBsb29rIGF0IHRoZVxuICoge0BsaW5rIG1vZHVsZTpKc29uUmVmc35Kc29uUmVmc09wdGlvbnN8b3B0aW9ucyBkb2N1bWVudGF0aW9ufSB0byBzZWUgaG93IHJlbGF0aXZlIHJlZmVyZW5jZXMgYXJlIGhhbmRsZWQuKSpcbiAqIEBwYXJhbSB7bW9kdWxlOkpzb25SZWZzfkpzb25SZWZzT3B0aW9uc30gW29wdGlvbnNdIC0gVGhlIEpzb25SZWZzIG9wdGlvbnNcbiAqXG4gKiBAcmV0dXJucyB7UHJvbWlzZX0gYSBwcm9taXNlIHRoYXQgcmVzb2x2ZXMgYSB7QGxpbmsgbW9kdWxlOkpzb25SZWZzflJldHJpZXZlZFJlc29sdmVkUmVmc1Jlc3VsdHN9IGFuZCByZWplY3RzIHdpdGggYW5cbiAqIGBFcnJvcmAgd2hlbiB0aGUgaW5wdXQgYXJndW1lbnRzIGZhaWwgdmFsaWRhdGlvbiwgd2hlbiBgb3B0aW9ucy5zdWJEb2NQYXRoYCBwb2ludHMgdG8gYW4gaW52YWxpZCBsb2NhdGlvbiBvciB3aGVuXG4gKiAgdGhlIGxvY2F0aW9uIGFyZ3VtZW50IHBvaW50cyB0byBhbiB1bmxvYWRhYmxlIHJlc291cmNlXG4gKlxuICogQGFsaWFzIG1vZHVsZTpKc29uUmVmcy5yZXNvbHZlUmVmc0F0XG4gKlxuICogQGV4YW1wbGVcbiAqIC8vIEV4YW1wbGUgdGhhdCBsb2FkcyBhIEpTT04gZG9jdW1lbnQgKE5vIG9wdGlvbnMubG9hZGVyT3B0aW9ucy5wcm9jZXNzQ29udGVudCByZXF1aXJlZCkgYW5kIHJlc29sdmVzIGFsbCByZWZlcmVuY2VzXG4gKiBKc29uUmVmcy5yZXNvbHZlUmVmc0F0KCcuL3N3YWdnZXIuanNvbicpXG4gKiAgIC50aGVuKGZ1bmN0aW9uIChyZXMpIHtcbiAqICAgICAgLy8gRG8gc29tZXRoaW5nIHdpdGggdGhlIHJlc3BvbnNlXG4gKiAgICAgIC8vXG4gKiAgICAgIC8vIHJlcy5yZWZzOiBKU09OIFJlZmVyZW5jZSBsb2NhdGlvbnMgYW5kIGRldGFpbHNcbiAqICAgICAgLy8gcmVzLnJlc29sdmVkOiBUaGUgZG9jdW1lbnQgd2l0aCB0aGUgYXBwcm9wcmlhdGUgSlNPTiBSZWZlcmVuY2VzIHJlc29sdmVkXG4gKiAgICAgIC8vIHJlcy52YWx1ZTogVGhlIHJldHJpZXZlZCBkb2N1bWVudFxuICogICB9LCBmdW5jdGlvbiAoZXJyKSB7XG4gKiAgICAgY29uc29sZS5sb2coZXJyLnN0YWNrKTtcbiAqICAgfSk7XG4gKi9cbmZ1bmN0aW9uIHJlc29sdmVSZWZzQXQgKGxvY2F0aW9uLCBvcHRpb25zKSB7XG4gIHZhciBhbGxUYXNrcyA9IFByb21pc2UucmVzb2x2ZSgpO1xuXG4gIGFsbFRhc2tzID0gYWxsVGFza3NcbiAgICAudGhlbihmdW5jdGlvbiAoKSB7XG4gICAgICAvLyBWYWxpZGF0ZSB0aGUgcHJvdmlkZWQgbG9jYXRpb25cbiAgICAgIGlmICghaXNUeXBlKGxvY2F0aW9uLCAnU3RyaW5nJykpIHtcbiAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignbG9jYXRpb24gbXVzdCBiZSBhIHN0cmluZycpO1xuICAgICAgfVxuXG4gICAgICAvLyBWYWxpZGF0ZSBvcHRpb25zXG4gICAgICBvcHRpb25zID0gdmFsaWRhdGVPcHRpb25zKG9wdGlvbnMpO1xuXG4gICAgICAvLyBDb21iaW5lIHRoZSBsb2NhdGlvbiBhbmQgdGhlIG9wdGlvbmFsIHJlbGF0aXZlIGJhc2VcbiAgICAgIGxvY2F0aW9uID0gY29tYmluZVVSSXMob3B0aW9ucy5yZWxhdGl2ZUJhc2UsIGxvY2F0aW9uKTtcblxuICAgICAgcmV0dXJuIGdldFJlbW90ZURvY3VtZW50KGxvY2F0aW9uLCBvcHRpb25zKTtcbiAgICB9KVxuICAgIC50aGVuKGZ1bmN0aW9uIChyZXMpIHtcbiAgICAgIHZhciBjT3B0aW9ucyA9IGNsb25lKG9wdGlvbnMpO1xuICAgICAgdmFyIHVyaURldGFpbHMgPSBwYXJzZVVSSShsb2NhdGlvbik7XG5cbiAgICAgIC8vIFNldCB0aGUgc3ViIGRvY3VtZW50IHBhdGggaWYgbmVjZXNzYXJ5XG4gICAgICBpZiAoIWlzVHlwZSh1cmlEZXRhaWxzLmZyYWdtZW50LCAnVW5kZWZpbmVkJykpIHtcbiAgICAgICAgY09wdGlvbnMuc3ViRG9jUGF0aCA9IHBhdGhGcm9tUHRyKGRlY29kZVVSSSh1cmlEZXRhaWxzLmZyYWdtZW50KSk7XG4gICAgICB9XG5cbiAgICAgIC8vIFVwZGF0ZSB0aGUgcmVsYXRpdmUgYmFzZSBiYXNlZCBvbiB0aGUgcmV0cmlldmVkIGxvY2F0aW9uXG4gICAgICBjT3B0aW9ucy5yZWxhdGl2ZUJhc2UgPSBwYXRoLmRpcm5hbWUobG9jYXRpb24pO1xuXG4gICAgICByZXR1cm4gcmVzb2x2ZVJlZnMocmVzLCBjT3B0aW9ucylcbiAgICAgICAgLnRoZW4oZnVuY3Rpb24gKHJlczIpIHtcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcmVmczogcmVzMi5yZWZzLFxuICAgICAgICAgICAgcmVzb2x2ZWQ6IHJlczIucmVzb2x2ZWQsXG4gICAgICAgICAgICB2YWx1ZTogcmVzXG4gICAgICAgICAgfTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG5cbiAgcmV0dXJuIGFsbFRhc2tzO1xufVxuXG4vKiBFeHBvcnQgdGhlIG1vZHVsZSBtZW1iZXJzICovXG5tb2R1bGUuZXhwb3J0cy5jbGVhckNhY2hlID0gY2xlYXJDYWNoZTtcbm1vZHVsZS5leHBvcnRzLmRlY29kZVBhdGggPSBkZWNvZGVQYXRoO1xubW9kdWxlLmV4cG9ydHMuZW5jb2RlUGF0aCA9IGVuY29kZVBhdGg7XG5tb2R1bGUuZXhwb3J0cy5maW5kUmVmcyA9IGZpbmRSZWZzO1xubW9kdWxlLmV4cG9ydHMuZmluZFJlZnNBdCA9IGZpbmRSZWZzQXQ7XG5tb2R1bGUuZXhwb3J0cy5nZXRSZWZEZXRhaWxzID0gZ2V0UmVmRGV0YWlscztcbm1vZHVsZS5leHBvcnRzLmlzUHRyID0gaXNQdHI7XG5tb2R1bGUuZXhwb3J0cy5pc1JlZiA9IGlzUmVmO1xubW9kdWxlLmV4cG9ydHMucGF0aEZyb21QdHIgPSBwYXRoRnJvbVB0cjtcbm1vZHVsZS5leHBvcnRzLnBhdGhUb1B0ciA9IHBhdGhUb1B0cjtcbm1vZHVsZS5leHBvcnRzLnJlc29sdmVSZWZzID0gcmVzb2x2ZVJlZnM7XG5tb2R1bGUuZXhwb3J0cy5yZXNvbHZlUmVmc0F0ID0gcmVzb2x2ZVJlZnNBdDtcbiIsIlxuLyoqXG4gKiBFeHBvc2UgYEVtaXR0ZXJgLlxuICovXG5cbm1vZHVsZS5leHBvcnRzID0gRW1pdHRlcjtcblxuLyoqXG4gKiBJbml0aWFsaXplIGEgbmV3IGBFbWl0dGVyYC5cbiAqXG4gKiBAYXBpIHB1YmxpY1xuICovXG5cbmZ1bmN0aW9uIEVtaXR0ZXIob2JqKSB7XG4gIGlmIChvYmopIHJldHVybiBtaXhpbihvYmopO1xufTtcblxuLyoqXG4gKiBNaXhpbiB0aGUgZW1pdHRlciBwcm9wZXJ0aWVzLlxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fSBvYmpcbiAqIEByZXR1cm4ge09iamVjdH1cbiAqIEBhcGkgcHJpdmF0ZVxuICovXG5cbmZ1bmN0aW9uIG1peGluKG9iaikge1xuICBmb3IgKHZhciBrZXkgaW4gRW1pdHRlci5wcm90b3R5cGUpIHtcbiAgICBvYmpba2V5XSA9IEVtaXR0ZXIucHJvdG90eXBlW2tleV07XG4gIH1cbiAgcmV0dXJuIG9iajtcbn1cblxuLyoqXG4gKiBMaXN0ZW4gb24gdGhlIGdpdmVuIGBldmVudGAgd2l0aCBgZm5gLlxuICpcbiAqIEBwYXJhbSB7U3RyaW5nfSBldmVudFxuICogQHBhcmFtIHtGdW5jdGlvbn0gZm5cbiAqIEByZXR1cm4ge0VtaXR0ZXJ9XG4gKiBAYXBpIHB1YmxpY1xuICovXG5cbkVtaXR0ZXIucHJvdG90eXBlLm9uID1cbkVtaXR0ZXIucHJvdG90eXBlLmFkZEV2ZW50TGlzdGVuZXIgPSBmdW5jdGlvbihldmVudCwgZm4pe1xuICB0aGlzLl9jYWxsYmFja3MgPSB0aGlzLl9jYWxsYmFja3MgfHwge307XG4gICh0aGlzLl9jYWxsYmFja3NbJyQnICsgZXZlbnRdID0gdGhpcy5fY2FsbGJhY2tzWyckJyArIGV2ZW50XSB8fCBbXSlcbiAgICAucHVzaChmbik7XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBBZGRzIGFuIGBldmVudGAgbGlzdGVuZXIgdGhhdCB3aWxsIGJlIGludm9rZWQgYSBzaW5nbGVcbiAqIHRpbWUgdGhlbiBhdXRvbWF0aWNhbGx5IHJlbW92ZWQuXG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IGV2ZW50XG4gKiBAcGFyYW0ge0Z1bmN0aW9ufSBmblxuICogQHJldHVybiB7RW1pdHRlcn1cbiAqIEBhcGkgcHVibGljXG4gKi9cblxuRW1pdHRlci5wcm90b3R5cGUub25jZSA9IGZ1bmN0aW9uKGV2ZW50LCBmbil7XG4gIGZ1bmN0aW9uIG9uKCkge1xuICAgIHRoaXMub2ZmKGV2ZW50LCBvbik7XG4gICAgZm4uYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgfVxuXG4gIG9uLmZuID0gZm47XG4gIHRoaXMub24oZXZlbnQsIG9uKTtcbiAgcmV0dXJuIHRoaXM7XG59O1xuXG4vKipcbiAqIFJlbW92ZSB0aGUgZ2l2ZW4gY2FsbGJhY2sgZm9yIGBldmVudGAgb3IgYWxsXG4gKiByZWdpc3RlcmVkIGNhbGxiYWNrcy5cbiAqXG4gKiBAcGFyYW0ge1N0cmluZ30gZXZlbnRcbiAqIEBwYXJhbSB7RnVuY3Rpb259IGZuXG4gKiBAcmV0dXJuIHtFbWl0dGVyfVxuICogQGFwaSBwdWJsaWNcbiAqL1xuXG5FbWl0dGVyLnByb3RvdHlwZS5vZmYgPVxuRW1pdHRlci5wcm90b3R5cGUucmVtb3ZlTGlzdGVuZXIgPVxuRW1pdHRlci5wcm90b3R5cGUucmVtb3ZlQWxsTGlzdGVuZXJzID1cbkVtaXR0ZXIucHJvdG90eXBlLnJlbW92ZUV2ZW50TGlzdGVuZXIgPSBmdW5jdGlvbihldmVudCwgZm4pe1xuICB0aGlzLl9jYWxsYmFja3MgPSB0aGlzLl9jYWxsYmFja3MgfHwge307XG5cbiAgLy8gYWxsXG4gIGlmICgwID09IGFyZ3VtZW50cy5sZW5ndGgpIHtcbiAgICB0aGlzLl9jYWxsYmFja3MgPSB7fTtcbiAgICByZXR1cm4gdGhpcztcbiAgfVxuXG4gIC8vIHNwZWNpZmljIGV2ZW50XG4gIHZhciBjYWxsYmFja3MgPSB0aGlzLl9jYWxsYmFja3NbJyQnICsgZXZlbnRdO1xuICBpZiAoIWNhbGxiYWNrcykgcmV0dXJuIHRoaXM7XG5cbiAgLy8gcmVtb3ZlIGFsbCBoYW5kbGVyc1xuICBpZiAoMSA9PSBhcmd1bWVudHMubGVuZ3RoKSB7XG4gICAgZGVsZXRlIHRoaXMuX2NhbGxiYWNrc1snJCcgKyBldmVudF07XG4gICAgcmV0dXJuIHRoaXM7XG4gIH1cblxuICAvLyByZW1vdmUgc3BlY2lmaWMgaGFuZGxlclxuICB2YXIgY2I7XG4gIGZvciAodmFyIGkgPSAwOyBpIDwgY2FsbGJhY2tzLmxlbmd0aDsgaSsrKSB7XG4gICAgY2IgPSBjYWxsYmFja3NbaV07XG4gICAgaWYgKGNiID09PSBmbiB8fCBjYi5mbiA9PT0gZm4pIHtcbiAgICAgIGNhbGxiYWNrcy5zcGxpY2UoaSwgMSk7XG4gICAgICBicmVhaztcbiAgICB9XG4gIH1cbiAgcmV0dXJuIHRoaXM7XG59O1xuXG4vKipcbiAqIEVtaXQgYGV2ZW50YCB3aXRoIHRoZSBnaXZlbiBhcmdzLlxuICpcbiAqIEBwYXJhbSB7U3RyaW5nfSBldmVudFxuICogQHBhcmFtIHtNaXhlZH0gLi4uXG4gKiBAcmV0dXJuIHtFbWl0dGVyfVxuICovXG5cbkVtaXR0ZXIucHJvdG90eXBlLmVtaXQgPSBmdW5jdGlvbihldmVudCl7XG4gIHRoaXMuX2NhbGxiYWNrcyA9IHRoaXMuX2NhbGxiYWNrcyB8fCB7fTtcbiAgdmFyIGFyZ3MgPSBbXS5zbGljZS5jYWxsKGFyZ3VtZW50cywgMSlcbiAgICAsIGNhbGxiYWNrcyA9IHRoaXMuX2NhbGxiYWNrc1snJCcgKyBldmVudF07XG5cbiAgaWYgKGNhbGxiYWNrcykge1xuICAgIGNhbGxiYWNrcyA9IGNhbGxiYWNrcy5zbGljZSgwKTtcbiAgICBmb3IgKHZhciBpID0gMCwgbGVuID0gY2FsbGJhY2tzLmxlbmd0aDsgaSA8IGxlbjsgKytpKSB7XG4gICAgICBjYWxsYmFja3NbaV0uYXBwbHkodGhpcywgYXJncyk7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHRoaXM7XG59O1xuXG4vKipcbiAqIFJldHVybiBhcnJheSBvZiBjYWxsYmFja3MgZm9yIGBldmVudGAuXG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IGV2ZW50XG4gKiBAcmV0dXJuIHtBcnJheX1cbiAqIEBhcGkgcHVibGljXG4gKi9cblxuRW1pdHRlci5wcm90b3R5cGUubGlzdGVuZXJzID0gZnVuY3Rpb24oZXZlbnQpe1xuICB0aGlzLl9jYWxsYmFja3MgPSB0aGlzLl9jYWxsYmFja3MgfHwge307XG4gIHJldHVybiB0aGlzLl9jYWxsYmFja3NbJyQnICsgZXZlbnRdIHx8IFtdO1xufTtcblxuLyoqXG4gKiBDaGVjayBpZiB0aGlzIGVtaXR0ZXIgaGFzIGBldmVudGAgaGFuZGxlcnMuXG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IGV2ZW50XG4gKiBAcmV0dXJuIHtCb29sZWFufVxuICogQGFwaSBwdWJsaWNcbiAqL1xuXG5FbWl0dGVyLnByb3RvdHlwZS5oYXNMaXN0ZW5lcnMgPSBmdW5jdGlvbihldmVudCl7XG4gIHJldHVybiAhISB0aGlzLmxpc3RlbmVycyhldmVudCkubGVuZ3RoO1xufTtcbiIsIi8qISBOYXRpdmUgUHJvbWlzZSBPbmx5XG4gICAgdjAuOC4xIChjKSBLeWxlIFNpbXBzb25cbiAgICBNSVQgTGljZW5zZTogaHR0cDovL2dldGlmeS5taXQtbGljZW5zZS5vcmdcbiovXG5cbihmdW5jdGlvbiBVTUQobmFtZSxjb250ZXh0LGRlZmluaXRpb24pe1xuXHQvLyBzcGVjaWFsIGZvcm0gb2YgVU1EIGZvciBwb2x5ZmlsbGluZyBhY3Jvc3MgZXZpcm9ubWVudHNcblx0Y29udGV4dFtuYW1lXSA9IGNvbnRleHRbbmFtZV0gfHwgZGVmaW5pdGlvbigpO1xuXHRpZiAodHlwZW9mIG1vZHVsZSAhPSBcInVuZGVmaW5lZFwiICYmIG1vZHVsZS5leHBvcnRzKSB7IG1vZHVsZS5leHBvcnRzID0gY29udGV4dFtuYW1lXTsgfVxuXHRlbHNlIGlmICh0eXBlb2YgZGVmaW5lID09IFwiZnVuY3Rpb25cIiAmJiBkZWZpbmUuYW1kKSB7IGRlZmluZShmdW5jdGlvbiAkQU1EJCgpeyByZXR1cm4gY29udGV4dFtuYW1lXTsgfSk7IH1cbn0pKFwiUHJvbWlzZVwiLHR5cGVvZiBnbG9iYWwgIT0gXCJ1bmRlZmluZWRcIiA/IGdsb2JhbCA6IHRoaXMsZnVuY3Rpb24gREVGKCl7XG5cdC8qanNoaW50IHZhbGlkdGhpczp0cnVlICovXG5cdFwidXNlIHN0cmljdFwiO1xuXG5cdHZhciBidWlsdEluUHJvcCwgY3ljbGUsIHNjaGVkdWxpbmdfcXVldWUsXG5cdFx0VG9TdHJpbmcgPSBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLFxuXHRcdHRpbWVyID0gKHR5cGVvZiBzZXRJbW1lZGlhdGUgIT0gXCJ1bmRlZmluZWRcIikgP1xuXHRcdFx0ZnVuY3Rpb24gdGltZXIoZm4pIHsgcmV0dXJuIHNldEltbWVkaWF0ZShmbik7IH0gOlxuXHRcdFx0c2V0VGltZW91dFxuXHQ7XG5cblx0Ly8gZGFtbWl0LCBJRTguXG5cdHRyeSB7XG5cdFx0T2JqZWN0LmRlZmluZVByb3BlcnR5KHt9LFwieFwiLHt9KTtcblx0XHRidWlsdEluUHJvcCA9IGZ1bmN0aW9uIGJ1aWx0SW5Qcm9wKG9iaixuYW1lLHZhbCxjb25maWcpIHtcblx0XHRcdHJldHVybiBPYmplY3QuZGVmaW5lUHJvcGVydHkob2JqLG5hbWUse1xuXHRcdFx0XHR2YWx1ZTogdmFsLFxuXHRcdFx0XHR3cml0YWJsZTogdHJ1ZSxcblx0XHRcdFx0Y29uZmlndXJhYmxlOiBjb25maWcgIT09IGZhbHNlXG5cdFx0XHR9KTtcblx0XHR9O1xuXHR9XG5cdGNhdGNoIChlcnIpIHtcblx0XHRidWlsdEluUHJvcCA9IGZ1bmN0aW9uIGJ1aWx0SW5Qcm9wKG9iaixuYW1lLHZhbCkge1xuXHRcdFx0b2JqW25hbWVdID0gdmFsO1xuXHRcdFx0cmV0dXJuIG9iajtcblx0XHR9O1xuXHR9XG5cblx0Ly8gTm90ZTogdXNpbmcgYSBxdWV1ZSBpbnN0ZWFkIG9mIGFycmF5IGZvciBlZmZpY2llbmN5XG5cdHNjaGVkdWxpbmdfcXVldWUgPSAoZnVuY3Rpb24gUXVldWUoKSB7XG5cdFx0dmFyIGZpcnN0LCBsYXN0LCBpdGVtO1xuXG5cdFx0ZnVuY3Rpb24gSXRlbShmbixzZWxmKSB7XG5cdFx0XHR0aGlzLmZuID0gZm47XG5cdFx0XHR0aGlzLnNlbGYgPSBzZWxmO1xuXHRcdFx0dGhpcy5uZXh0ID0gdm9pZCAwO1xuXHRcdH1cblxuXHRcdHJldHVybiB7XG5cdFx0XHRhZGQ6IGZ1bmN0aW9uIGFkZChmbixzZWxmKSB7XG5cdFx0XHRcdGl0ZW0gPSBuZXcgSXRlbShmbixzZWxmKTtcblx0XHRcdFx0aWYgKGxhc3QpIHtcblx0XHRcdFx0XHRsYXN0Lm5leHQgPSBpdGVtO1xuXHRcdFx0XHR9XG5cdFx0XHRcdGVsc2Uge1xuXHRcdFx0XHRcdGZpcnN0ID0gaXRlbTtcblx0XHRcdFx0fVxuXHRcdFx0XHRsYXN0ID0gaXRlbTtcblx0XHRcdFx0aXRlbSA9IHZvaWQgMDtcblx0XHRcdH0sXG5cdFx0XHRkcmFpbjogZnVuY3Rpb24gZHJhaW4oKSB7XG5cdFx0XHRcdHZhciBmID0gZmlyc3Q7XG5cdFx0XHRcdGZpcnN0ID0gbGFzdCA9IGN5Y2xlID0gdm9pZCAwO1xuXG5cdFx0XHRcdHdoaWxlIChmKSB7XG5cdFx0XHRcdFx0Zi5mbi5jYWxsKGYuc2VsZik7XG5cdFx0XHRcdFx0ZiA9IGYubmV4dDtcblx0XHRcdFx0fVxuXHRcdFx0fVxuXHRcdH07XG5cdH0pKCk7XG5cblx0ZnVuY3Rpb24gc2NoZWR1bGUoZm4sc2VsZikge1xuXHRcdHNjaGVkdWxpbmdfcXVldWUuYWRkKGZuLHNlbGYpO1xuXHRcdGlmICghY3ljbGUpIHtcblx0XHRcdGN5Y2xlID0gdGltZXIoc2NoZWR1bGluZ19xdWV1ZS5kcmFpbik7XG5cdFx0fVxuXHR9XG5cblx0Ly8gcHJvbWlzZSBkdWNrIHR5cGluZ1xuXHRmdW5jdGlvbiBpc1RoZW5hYmxlKG8pIHtcblx0XHR2YXIgX3RoZW4sIG9fdHlwZSA9IHR5cGVvZiBvO1xuXG5cdFx0aWYgKG8gIT0gbnVsbCAmJlxuXHRcdFx0KFxuXHRcdFx0XHRvX3R5cGUgPT0gXCJvYmplY3RcIiB8fCBvX3R5cGUgPT0gXCJmdW5jdGlvblwiXG5cdFx0XHQpXG5cdFx0KSB7XG5cdFx0XHRfdGhlbiA9IG8udGhlbjtcblx0XHR9XG5cdFx0cmV0dXJuIHR5cGVvZiBfdGhlbiA9PSBcImZ1bmN0aW9uXCIgPyBfdGhlbiA6IGZhbHNlO1xuXHR9XG5cblx0ZnVuY3Rpb24gbm90aWZ5KCkge1xuXHRcdGZvciAodmFyIGk9MDsgaTx0aGlzLmNoYWluLmxlbmd0aDsgaSsrKSB7XG5cdFx0XHRub3RpZnlJc29sYXRlZChcblx0XHRcdFx0dGhpcyxcblx0XHRcdFx0KHRoaXMuc3RhdGUgPT09IDEpID8gdGhpcy5jaGFpbltpXS5zdWNjZXNzIDogdGhpcy5jaGFpbltpXS5mYWlsdXJlLFxuXHRcdFx0XHR0aGlzLmNoYWluW2ldXG5cdFx0XHQpO1xuXHRcdH1cblx0XHR0aGlzLmNoYWluLmxlbmd0aCA9IDA7XG5cdH1cblxuXHQvLyBOT1RFOiBUaGlzIGlzIGEgc2VwYXJhdGUgZnVuY3Rpb24gdG8gaXNvbGF0ZVxuXHQvLyB0aGUgYHRyeS4uY2F0Y2hgIHNvIHRoYXQgb3RoZXIgY29kZSBjYW4gYmVcblx0Ly8gb3B0aW1pemVkIGJldHRlclxuXHRmdW5jdGlvbiBub3RpZnlJc29sYXRlZChzZWxmLGNiLGNoYWluKSB7XG5cdFx0dmFyIHJldCwgX3RoZW47XG5cdFx0dHJ5IHtcblx0XHRcdGlmIChjYiA9PT0gZmFsc2UpIHtcblx0XHRcdFx0Y2hhaW4ucmVqZWN0KHNlbGYubXNnKTtcblx0XHRcdH1cblx0XHRcdGVsc2Uge1xuXHRcdFx0XHRpZiAoY2IgPT09IHRydWUpIHtcblx0XHRcdFx0XHRyZXQgPSBzZWxmLm1zZztcblx0XHRcdFx0fVxuXHRcdFx0XHRlbHNlIHtcblx0XHRcdFx0XHRyZXQgPSBjYi5jYWxsKHZvaWQgMCxzZWxmLm1zZyk7XG5cdFx0XHRcdH1cblxuXHRcdFx0XHRpZiAocmV0ID09PSBjaGFpbi5wcm9taXNlKSB7XG5cdFx0XHRcdFx0Y2hhaW4ucmVqZWN0KFR5cGVFcnJvcihcIlByb21pc2UtY2hhaW4gY3ljbGVcIikpO1xuXHRcdFx0XHR9XG5cdFx0XHRcdGVsc2UgaWYgKF90aGVuID0gaXNUaGVuYWJsZShyZXQpKSB7XG5cdFx0XHRcdFx0X3RoZW4uY2FsbChyZXQsY2hhaW4ucmVzb2x2ZSxjaGFpbi5yZWplY3QpO1xuXHRcdFx0XHR9XG5cdFx0XHRcdGVsc2Uge1xuXHRcdFx0XHRcdGNoYWluLnJlc29sdmUocmV0KTtcblx0XHRcdFx0fVxuXHRcdFx0fVxuXHRcdH1cblx0XHRjYXRjaCAoZXJyKSB7XG5cdFx0XHRjaGFpbi5yZWplY3QoZXJyKTtcblx0XHR9XG5cdH1cblxuXHRmdW5jdGlvbiByZXNvbHZlKG1zZykge1xuXHRcdHZhciBfdGhlbiwgc2VsZiA9IHRoaXM7XG5cblx0XHQvLyBhbHJlYWR5IHRyaWdnZXJlZD9cblx0XHRpZiAoc2VsZi50cmlnZ2VyZWQpIHsgcmV0dXJuOyB9XG5cblx0XHRzZWxmLnRyaWdnZXJlZCA9IHRydWU7XG5cblx0XHQvLyB1bndyYXBcblx0XHRpZiAoc2VsZi5kZWYpIHtcblx0XHRcdHNlbGYgPSBzZWxmLmRlZjtcblx0XHR9XG5cblx0XHR0cnkge1xuXHRcdFx0aWYgKF90aGVuID0gaXNUaGVuYWJsZShtc2cpKSB7XG5cdFx0XHRcdHNjaGVkdWxlKGZ1bmN0aW9uKCl7XG5cdFx0XHRcdFx0dmFyIGRlZl93cmFwcGVyID0gbmV3IE1ha2VEZWZXcmFwcGVyKHNlbGYpO1xuXHRcdFx0XHRcdHRyeSB7XG5cdFx0XHRcdFx0XHRfdGhlbi5jYWxsKG1zZyxcblx0XHRcdFx0XHRcdFx0ZnVuY3Rpb24gJHJlc29sdmUkKCl7IHJlc29sdmUuYXBwbHkoZGVmX3dyYXBwZXIsYXJndW1lbnRzKTsgfSxcblx0XHRcdFx0XHRcdFx0ZnVuY3Rpb24gJHJlamVjdCQoKXsgcmVqZWN0LmFwcGx5KGRlZl93cmFwcGVyLGFyZ3VtZW50cyk7IH1cblx0XHRcdFx0XHRcdCk7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHRcdGNhdGNoIChlcnIpIHtcblx0XHRcdFx0XHRcdHJlamVjdC5jYWxsKGRlZl93cmFwcGVyLGVycik7XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9KVxuXHRcdFx0fVxuXHRcdFx0ZWxzZSB7XG5cdFx0XHRcdHNlbGYubXNnID0gbXNnO1xuXHRcdFx0XHRzZWxmLnN0YXRlID0gMTtcblx0XHRcdFx0aWYgKHNlbGYuY2hhaW4ubGVuZ3RoID4gMCkge1xuXHRcdFx0XHRcdHNjaGVkdWxlKG5vdGlmeSxzZWxmKTtcblx0XHRcdFx0fVxuXHRcdFx0fVxuXHRcdH1cblx0XHRjYXRjaCAoZXJyKSB7XG5cdFx0XHRyZWplY3QuY2FsbChuZXcgTWFrZURlZldyYXBwZXIoc2VsZiksZXJyKTtcblx0XHR9XG5cdH1cblxuXHRmdW5jdGlvbiByZWplY3QobXNnKSB7XG5cdFx0dmFyIHNlbGYgPSB0aGlzO1xuXG5cdFx0Ly8gYWxyZWFkeSB0cmlnZ2VyZWQ/XG5cdFx0aWYgKHNlbGYudHJpZ2dlcmVkKSB7IHJldHVybjsgfVxuXG5cdFx0c2VsZi50cmlnZ2VyZWQgPSB0cnVlO1xuXG5cdFx0Ly8gdW53cmFwXG5cdFx0aWYgKHNlbGYuZGVmKSB7XG5cdFx0XHRzZWxmID0gc2VsZi5kZWY7XG5cdFx0fVxuXG5cdFx0c2VsZi5tc2cgPSBtc2c7XG5cdFx0c2VsZi5zdGF0ZSA9IDI7XG5cdFx0aWYgKHNlbGYuY2hhaW4ubGVuZ3RoID4gMCkge1xuXHRcdFx0c2NoZWR1bGUobm90aWZ5LHNlbGYpO1xuXHRcdH1cblx0fVxuXG5cdGZ1bmN0aW9uIGl0ZXJhdGVQcm9taXNlcyhDb25zdHJ1Y3RvcixhcnIscmVzb2x2ZXIscmVqZWN0ZXIpIHtcblx0XHRmb3IgKHZhciBpZHg9MDsgaWR4PGFyci5sZW5ndGg7IGlkeCsrKSB7XG5cdFx0XHQoZnVuY3Rpb24gSUlGRShpZHgpe1xuXHRcdFx0XHRDb25zdHJ1Y3Rvci5yZXNvbHZlKGFycltpZHhdKVxuXHRcdFx0XHQudGhlbihcblx0XHRcdFx0XHRmdW5jdGlvbiAkcmVzb2x2ZXIkKG1zZyl7XG5cdFx0XHRcdFx0XHRyZXNvbHZlcihpZHgsbXNnKTtcblx0XHRcdFx0XHR9LFxuXHRcdFx0XHRcdHJlamVjdGVyXG5cdFx0XHRcdCk7XG5cdFx0XHR9KShpZHgpO1xuXHRcdH1cblx0fVxuXG5cdGZ1bmN0aW9uIE1ha2VEZWZXcmFwcGVyKHNlbGYpIHtcblx0XHR0aGlzLmRlZiA9IHNlbGY7XG5cdFx0dGhpcy50cmlnZ2VyZWQgPSBmYWxzZTtcblx0fVxuXG5cdGZ1bmN0aW9uIE1ha2VEZWYoc2VsZikge1xuXHRcdHRoaXMucHJvbWlzZSA9IHNlbGY7XG5cdFx0dGhpcy5zdGF0ZSA9IDA7XG5cdFx0dGhpcy50cmlnZ2VyZWQgPSBmYWxzZTtcblx0XHR0aGlzLmNoYWluID0gW107XG5cdFx0dGhpcy5tc2cgPSB2b2lkIDA7XG5cdH1cblxuXHRmdW5jdGlvbiBQcm9taXNlKGV4ZWN1dG9yKSB7XG5cdFx0aWYgKHR5cGVvZiBleGVjdXRvciAhPSBcImZ1bmN0aW9uXCIpIHtcblx0XHRcdHRocm93IFR5cGVFcnJvcihcIk5vdCBhIGZ1bmN0aW9uXCIpO1xuXHRcdH1cblxuXHRcdGlmICh0aGlzLl9fTlBPX18gIT09IDApIHtcblx0XHRcdHRocm93IFR5cGVFcnJvcihcIk5vdCBhIHByb21pc2VcIik7XG5cdFx0fVxuXG5cdFx0Ly8gaW5zdGFuY2Ugc2hhZG93aW5nIHRoZSBpbmhlcml0ZWQgXCJicmFuZFwiXG5cdFx0Ly8gdG8gc2lnbmFsIGFuIGFscmVhZHkgXCJpbml0aWFsaXplZFwiIHByb21pc2Vcblx0XHR0aGlzLl9fTlBPX18gPSAxO1xuXG5cdFx0dmFyIGRlZiA9IG5ldyBNYWtlRGVmKHRoaXMpO1xuXG5cdFx0dGhpc1tcInRoZW5cIl0gPSBmdW5jdGlvbiB0aGVuKHN1Y2Nlc3MsZmFpbHVyZSkge1xuXHRcdFx0dmFyIG8gPSB7XG5cdFx0XHRcdHN1Y2Nlc3M6IHR5cGVvZiBzdWNjZXNzID09IFwiZnVuY3Rpb25cIiA/IHN1Y2Nlc3MgOiB0cnVlLFxuXHRcdFx0XHRmYWlsdXJlOiB0eXBlb2YgZmFpbHVyZSA9PSBcImZ1bmN0aW9uXCIgPyBmYWlsdXJlIDogZmFsc2Vcblx0XHRcdH07XG5cdFx0XHQvLyBOb3RlOiBgdGhlbiguLilgIGl0c2VsZiBjYW4gYmUgYm9ycm93ZWQgdG8gYmUgdXNlZCBhZ2FpbnN0XG5cdFx0XHQvLyBhIGRpZmZlcmVudCBwcm9taXNlIGNvbnN0cnVjdG9yIGZvciBtYWtpbmcgdGhlIGNoYWluZWQgcHJvbWlzZSxcblx0XHRcdC8vIGJ5IHN1YnN0aXR1dGluZyBhIGRpZmZlcmVudCBgdGhpc2AgYmluZGluZy5cblx0XHRcdG8ucHJvbWlzZSA9IG5ldyB0aGlzLmNvbnN0cnVjdG9yKGZ1bmN0aW9uIGV4dHJhY3RDaGFpbihyZXNvbHZlLHJlamVjdCkge1xuXHRcdFx0XHRpZiAodHlwZW9mIHJlc29sdmUgIT0gXCJmdW5jdGlvblwiIHx8IHR5cGVvZiByZWplY3QgIT0gXCJmdW5jdGlvblwiKSB7XG5cdFx0XHRcdFx0dGhyb3cgVHlwZUVycm9yKFwiTm90IGEgZnVuY3Rpb25cIik7XG5cdFx0XHRcdH1cblxuXHRcdFx0XHRvLnJlc29sdmUgPSByZXNvbHZlO1xuXHRcdFx0XHRvLnJlamVjdCA9IHJlamVjdDtcblx0XHRcdH0pO1xuXHRcdFx0ZGVmLmNoYWluLnB1c2gobyk7XG5cblx0XHRcdGlmIChkZWYuc3RhdGUgIT09IDApIHtcblx0XHRcdFx0c2NoZWR1bGUobm90aWZ5LGRlZik7XG5cdFx0XHR9XG5cblx0XHRcdHJldHVybiBvLnByb21pc2U7XG5cdFx0fTtcblx0XHR0aGlzW1wiY2F0Y2hcIl0gPSBmdW5jdGlvbiAkY2F0Y2gkKGZhaWx1cmUpIHtcblx0XHRcdHJldHVybiB0aGlzLnRoZW4odm9pZCAwLGZhaWx1cmUpO1xuXHRcdH07XG5cblx0XHR0cnkge1xuXHRcdFx0ZXhlY3V0b3IuY2FsbChcblx0XHRcdFx0dm9pZCAwLFxuXHRcdFx0XHRmdW5jdGlvbiBwdWJsaWNSZXNvbHZlKG1zZyl7XG5cdFx0XHRcdFx0cmVzb2x2ZS5jYWxsKGRlZixtc2cpO1xuXHRcdFx0XHR9LFxuXHRcdFx0XHRmdW5jdGlvbiBwdWJsaWNSZWplY3QobXNnKSB7XG5cdFx0XHRcdFx0cmVqZWN0LmNhbGwoZGVmLG1zZyk7XG5cdFx0XHRcdH1cblx0XHRcdCk7XG5cdFx0fVxuXHRcdGNhdGNoIChlcnIpIHtcblx0XHRcdHJlamVjdC5jYWxsKGRlZixlcnIpO1xuXHRcdH1cblx0fVxuXG5cdHZhciBQcm9taXNlUHJvdG90eXBlID0gYnVpbHRJblByb3Aoe30sXCJjb25zdHJ1Y3RvclwiLFByb21pc2UsXG5cdFx0Lypjb25maWd1cmFibGU9Ki9mYWxzZVxuXHQpO1xuXG5cdC8vIE5vdGU6IEFuZHJvaWQgNCBjYW5ub3QgdXNlIGBPYmplY3QuZGVmaW5lUHJvcGVydHkoLi4pYCBoZXJlXG5cdFByb21pc2UucHJvdG90eXBlID0gUHJvbWlzZVByb3RvdHlwZTtcblxuXHQvLyBidWlsdC1pbiBcImJyYW5kXCIgdG8gc2lnbmFsIGFuIFwidW5pbml0aWFsaXplZFwiIHByb21pc2Vcblx0YnVpbHRJblByb3AoUHJvbWlzZVByb3RvdHlwZSxcIl9fTlBPX19cIiwwLFxuXHRcdC8qY29uZmlndXJhYmxlPSovZmFsc2Vcblx0KTtcblxuXHRidWlsdEluUHJvcChQcm9taXNlLFwicmVzb2x2ZVwiLGZ1bmN0aW9uIFByb21pc2UkcmVzb2x2ZShtc2cpIHtcblx0XHR2YXIgQ29uc3RydWN0b3IgPSB0aGlzO1xuXG5cdFx0Ly8gc3BlYyBtYW5kYXRlZCBjaGVja3Ncblx0XHQvLyBub3RlOiBiZXN0IFwiaXNQcm9taXNlXCIgY2hlY2sgdGhhdCdzIHByYWN0aWNhbCBmb3Igbm93XG5cdFx0aWYgKG1zZyAmJiB0eXBlb2YgbXNnID09IFwib2JqZWN0XCIgJiYgbXNnLl9fTlBPX18gPT09IDEpIHtcblx0XHRcdHJldHVybiBtc2c7XG5cdFx0fVxuXG5cdFx0cmV0dXJuIG5ldyBDb25zdHJ1Y3RvcihmdW5jdGlvbiBleGVjdXRvcihyZXNvbHZlLHJlamVjdCl7XG5cdFx0XHRpZiAodHlwZW9mIHJlc29sdmUgIT0gXCJmdW5jdGlvblwiIHx8IHR5cGVvZiByZWplY3QgIT0gXCJmdW5jdGlvblwiKSB7XG5cdFx0XHRcdHRocm93IFR5cGVFcnJvcihcIk5vdCBhIGZ1bmN0aW9uXCIpO1xuXHRcdFx0fVxuXG5cdFx0XHRyZXNvbHZlKG1zZyk7XG5cdFx0fSk7XG5cdH0pO1xuXG5cdGJ1aWx0SW5Qcm9wKFByb21pc2UsXCJyZWplY3RcIixmdW5jdGlvbiBQcm9taXNlJHJlamVjdChtc2cpIHtcblx0XHRyZXR1cm4gbmV3IHRoaXMoZnVuY3Rpb24gZXhlY3V0b3IocmVzb2x2ZSxyZWplY3Qpe1xuXHRcdFx0aWYgKHR5cGVvZiByZXNvbHZlICE9IFwiZnVuY3Rpb25cIiB8fCB0eXBlb2YgcmVqZWN0ICE9IFwiZnVuY3Rpb25cIikge1xuXHRcdFx0XHR0aHJvdyBUeXBlRXJyb3IoXCJOb3QgYSBmdW5jdGlvblwiKTtcblx0XHRcdH1cblxuXHRcdFx0cmVqZWN0KG1zZyk7XG5cdFx0fSk7XG5cdH0pO1xuXG5cdGJ1aWx0SW5Qcm9wKFByb21pc2UsXCJhbGxcIixmdW5jdGlvbiBQcm9taXNlJGFsbChhcnIpIHtcblx0XHR2YXIgQ29uc3RydWN0b3IgPSB0aGlzO1xuXG5cdFx0Ly8gc3BlYyBtYW5kYXRlZCBjaGVja3Ncblx0XHRpZiAoVG9TdHJpbmcuY2FsbChhcnIpICE9IFwiW29iamVjdCBBcnJheV1cIikge1xuXHRcdFx0cmV0dXJuIENvbnN0cnVjdG9yLnJlamVjdChUeXBlRXJyb3IoXCJOb3QgYW4gYXJyYXlcIikpO1xuXHRcdH1cblx0XHRpZiAoYXJyLmxlbmd0aCA9PT0gMCkge1xuXHRcdFx0cmV0dXJuIENvbnN0cnVjdG9yLnJlc29sdmUoW10pO1xuXHRcdH1cblxuXHRcdHJldHVybiBuZXcgQ29uc3RydWN0b3IoZnVuY3Rpb24gZXhlY3V0b3IocmVzb2x2ZSxyZWplY3Qpe1xuXHRcdFx0aWYgKHR5cGVvZiByZXNvbHZlICE9IFwiZnVuY3Rpb25cIiB8fCB0eXBlb2YgcmVqZWN0ICE9IFwiZnVuY3Rpb25cIikge1xuXHRcdFx0XHR0aHJvdyBUeXBlRXJyb3IoXCJOb3QgYSBmdW5jdGlvblwiKTtcblx0XHRcdH1cblxuXHRcdFx0dmFyIGxlbiA9IGFyci5sZW5ndGgsIG1zZ3MgPSBBcnJheShsZW4pLCBjb3VudCA9IDA7XG5cblx0XHRcdGl0ZXJhdGVQcm9taXNlcyhDb25zdHJ1Y3RvcixhcnIsZnVuY3Rpb24gcmVzb2x2ZXIoaWR4LG1zZykge1xuXHRcdFx0XHRtc2dzW2lkeF0gPSBtc2c7XG5cdFx0XHRcdGlmICgrK2NvdW50ID09PSBsZW4pIHtcblx0XHRcdFx0XHRyZXNvbHZlKG1zZ3MpO1xuXHRcdFx0XHR9XG5cdFx0XHR9LHJlamVjdCk7XG5cdFx0fSk7XG5cdH0pO1xuXG5cdGJ1aWx0SW5Qcm9wKFByb21pc2UsXCJyYWNlXCIsZnVuY3Rpb24gUHJvbWlzZSRyYWNlKGFycikge1xuXHRcdHZhciBDb25zdHJ1Y3RvciA9IHRoaXM7XG5cblx0XHQvLyBzcGVjIG1hbmRhdGVkIGNoZWNrc1xuXHRcdGlmIChUb1N0cmluZy5jYWxsKGFycikgIT0gXCJbb2JqZWN0IEFycmF5XVwiKSB7XG5cdFx0XHRyZXR1cm4gQ29uc3RydWN0b3IucmVqZWN0KFR5cGVFcnJvcihcIk5vdCBhbiBhcnJheVwiKSk7XG5cdFx0fVxuXG5cdFx0cmV0dXJuIG5ldyBDb25zdHJ1Y3RvcihmdW5jdGlvbiBleGVjdXRvcihyZXNvbHZlLHJlamVjdCl7XG5cdFx0XHRpZiAodHlwZW9mIHJlc29sdmUgIT0gXCJmdW5jdGlvblwiIHx8IHR5cGVvZiByZWplY3QgIT0gXCJmdW5jdGlvblwiKSB7XG5cdFx0XHRcdHRocm93IFR5cGVFcnJvcihcIk5vdCBhIGZ1bmN0aW9uXCIpO1xuXHRcdFx0fVxuXG5cdFx0XHRpdGVyYXRlUHJvbWlzZXMoQ29uc3RydWN0b3IsYXJyLGZ1bmN0aW9uIHJlc29sdmVyKGlkeCxtc2cpe1xuXHRcdFx0XHRyZXNvbHZlKG1zZyk7XG5cdFx0XHR9LHJlamVjdCk7XG5cdFx0fSk7XG5cdH0pO1xuXG5cdHJldHVybiBQcm9taXNlO1xufSk7XG4iLCIvLyBDb3B5cmlnaHQgSm95ZW50LCBJbmMuIGFuZCBvdGhlciBOb2RlIGNvbnRyaWJ1dG9ycy5cbi8vXG4vLyBQZXJtaXNzaW9uIGlzIGhlcmVieSBncmFudGVkLCBmcmVlIG9mIGNoYXJnZSwgdG8gYW55IHBlcnNvbiBvYnRhaW5pbmcgYVxuLy8gY29weSBvZiB0aGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmlsZXMgKHRoZVxuLy8gXCJTb2Z0d2FyZVwiKSwgdG8gZGVhbCBpbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nXG4vLyB3aXRob3V0IGxpbWl0YXRpb24gdGhlIHJpZ2h0cyB0byB1c2UsIGNvcHksIG1vZGlmeSwgbWVyZ2UsIHB1Ymxpc2gsXG4vLyBkaXN0cmlidXRlLCBzdWJsaWNlbnNlLCBhbmQvb3Igc2VsbCBjb3BpZXMgb2YgdGhlIFNvZnR3YXJlLCBhbmQgdG8gcGVybWl0XG4vLyBwZXJzb25zIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzIGZ1cm5pc2hlZCB0byBkbyBzbywgc3ViamVjdCB0byB0aGVcbi8vIGZvbGxvd2luZyBjb25kaXRpb25zOlxuLy9cbi8vIFRoZSBhYm92ZSBjb3B5cmlnaHQgbm90aWNlIGFuZCB0aGlzIHBlcm1pc3Npb24gbm90aWNlIHNoYWxsIGJlIGluY2x1ZGVkXG4vLyBpbiBhbGwgY29waWVzIG9yIHN1YnN0YW50aWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS5cbi8vXG4vLyBUSEUgU09GVFdBUkUgSVMgUFJPVklERUQgXCJBUyBJU1wiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBLSU5ELCBFWFBSRVNTXG4vLyBPUiBJTVBMSUVELCBJTkNMVURJTkcgQlVUIE5PVCBMSU1JVEVEIFRPIFRIRSBXQVJSQU5USUVTIE9GXG4vLyBNRVJDSEFOVEFCSUxJVFksIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFORCBOT05JTkZSSU5HRU1FTlQuIElOXG4vLyBOTyBFVkVOVCBTSEFMTCBUSEUgQVVUSE9SUyBPUiBDT1BZUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSxcbi8vIERBTUFHRVMgT1IgT1RIRVIgTElBQklMSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDVCwgVE9SVCBPUlxuLy8gT1RIRVJXSVNFLCBBUklTSU5HIEZST00sIE9VVCBPRiBPUiBJTiBDT05ORUNUSU9OIFdJVEggVEhFIFNPRlRXQVJFIE9SIFRIRVxuLy8gVVNFIE9SIE9USEVSIERFQUxJTkdTIElOIFRIRSBTT0ZUV0FSRS5cblxuLy8gcmVzb2x2ZXMgLiBhbmQgLi4gZWxlbWVudHMgaW4gYSBwYXRoIGFycmF5IHdpdGggZGlyZWN0b3J5IG5hbWVzIHRoZXJlXG4vLyBtdXN0IGJlIG5vIHNsYXNoZXMsIGVtcHR5IGVsZW1lbnRzLCBvciBkZXZpY2UgbmFtZXMgKGM6XFwpIGluIHRoZSBhcnJheVxuLy8gKHNvIGFsc28gbm8gbGVhZGluZyBhbmQgdHJhaWxpbmcgc2xhc2hlcyAtIGl0IGRvZXMgbm90IGRpc3Rpbmd1aXNoXG4vLyByZWxhdGl2ZSBhbmQgYWJzb2x1dGUgcGF0aHMpXG5mdW5jdGlvbiBub3JtYWxpemVBcnJheShwYXJ0cywgYWxsb3dBYm92ZVJvb3QpIHtcbiAgLy8gaWYgdGhlIHBhdGggdHJpZXMgdG8gZ28gYWJvdmUgdGhlIHJvb3QsIGB1cGAgZW5kcyB1cCA+IDBcbiAgdmFyIHVwID0gMDtcbiAgZm9yICh2YXIgaSA9IHBhcnRzLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XG4gICAgdmFyIGxhc3QgPSBwYXJ0c1tpXTtcbiAgICBpZiAobGFzdCA9PT0gJy4nKSB7XG4gICAgICBwYXJ0cy5zcGxpY2UoaSwgMSk7XG4gICAgfSBlbHNlIGlmIChsYXN0ID09PSAnLi4nKSB7XG4gICAgICBwYXJ0cy5zcGxpY2UoaSwgMSk7XG4gICAgICB1cCsrO1xuICAgIH0gZWxzZSBpZiAodXApIHtcbiAgICAgIHBhcnRzLnNwbGljZShpLCAxKTtcbiAgICAgIHVwLS07XG4gICAgfVxuICB9XG5cbiAgLy8gaWYgdGhlIHBhdGggaXMgYWxsb3dlZCB0byBnbyBhYm92ZSB0aGUgcm9vdCwgcmVzdG9yZSBsZWFkaW5nIC4uc1xuICBpZiAoYWxsb3dBYm92ZVJvb3QpIHtcbiAgICBmb3IgKDsgdXAtLTsgdXApIHtcbiAgICAgIHBhcnRzLnVuc2hpZnQoJy4uJyk7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHBhcnRzO1xufVxuXG4vLyBTcGxpdCBhIGZpbGVuYW1lIGludG8gW3Jvb3QsIGRpciwgYmFzZW5hbWUsIGV4dF0sIHVuaXggdmVyc2lvblxuLy8gJ3Jvb3QnIGlzIGp1c3QgYSBzbGFzaCwgb3Igbm90aGluZy5cbnZhciBzcGxpdFBhdGhSZSA9XG4gICAgL14oXFwvP3wpKFtcXHNcXFNdKj8pKCg/OlxcLnsxLDJ9fFteXFwvXSs/fCkoXFwuW14uXFwvXSp8KSkoPzpbXFwvXSopJC87XG52YXIgc3BsaXRQYXRoID0gZnVuY3Rpb24oZmlsZW5hbWUpIHtcbiAgcmV0dXJuIHNwbGl0UGF0aFJlLmV4ZWMoZmlsZW5hbWUpLnNsaWNlKDEpO1xufTtcblxuLy8gcGF0aC5yZXNvbHZlKFtmcm9tIC4uLl0sIHRvKVxuLy8gcG9zaXggdmVyc2lvblxuZXhwb3J0cy5yZXNvbHZlID0gZnVuY3Rpb24oKSB7XG4gIHZhciByZXNvbHZlZFBhdGggPSAnJyxcbiAgICAgIHJlc29sdmVkQWJzb2x1dGUgPSBmYWxzZTtcblxuICBmb3IgKHZhciBpID0gYXJndW1lbnRzLmxlbmd0aCAtIDE7IGkgPj0gLTEgJiYgIXJlc29sdmVkQWJzb2x1dGU7IGktLSkge1xuICAgIHZhciBwYXRoID0gKGkgPj0gMCkgPyBhcmd1bWVudHNbaV0gOiBwcm9jZXNzLmN3ZCgpO1xuXG4gICAgLy8gU2tpcCBlbXB0eSBhbmQgaW52YWxpZCBlbnRyaWVzXG4gICAgaWYgKHR5cGVvZiBwYXRoICE9PSAnc3RyaW5nJykge1xuICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQXJndW1lbnRzIHRvIHBhdGgucmVzb2x2ZSBtdXN0IGJlIHN0cmluZ3MnKTtcbiAgICB9IGVsc2UgaWYgKCFwYXRoKSB7XG4gICAgICBjb250aW51ZTtcbiAgICB9XG5cbiAgICByZXNvbHZlZFBhdGggPSBwYXRoICsgJy8nICsgcmVzb2x2ZWRQYXRoO1xuICAgIHJlc29sdmVkQWJzb2x1dGUgPSBwYXRoLmNoYXJBdCgwKSA9PT0gJy8nO1xuICB9XG5cbiAgLy8gQXQgdGhpcyBwb2ludCB0aGUgcGF0aCBzaG91bGQgYmUgcmVzb2x2ZWQgdG8gYSBmdWxsIGFic29sdXRlIHBhdGgsIGJ1dFxuICAvLyBoYW5kbGUgcmVsYXRpdmUgcGF0aHMgdG8gYmUgc2FmZSAobWlnaHQgaGFwcGVuIHdoZW4gcHJvY2Vzcy5jd2QoKSBmYWlscylcblxuICAvLyBOb3JtYWxpemUgdGhlIHBhdGhcbiAgcmVzb2x2ZWRQYXRoID0gbm9ybWFsaXplQXJyYXkoZmlsdGVyKHJlc29sdmVkUGF0aC5zcGxpdCgnLycpLCBmdW5jdGlvbihwKSB7XG4gICAgcmV0dXJuICEhcDtcbiAgfSksICFyZXNvbHZlZEFic29sdXRlKS5qb2luKCcvJyk7XG5cbiAgcmV0dXJuICgocmVzb2x2ZWRBYnNvbHV0ZSA/ICcvJyA6ICcnKSArIHJlc29sdmVkUGF0aCkgfHwgJy4nO1xufTtcblxuLy8gcGF0aC5ub3JtYWxpemUocGF0aClcbi8vIHBvc2l4IHZlcnNpb25cbmV4cG9ydHMubm9ybWFsaXplID0gZnVuY3Rpb24ocGF0aCkge1xuICB2YXIgaXNBYnNvbHV0ZSA9IGV4cG9ydHMuaXNBYnNvbHV0ZShwYXRoKSxcbiAgICAgIHRyYWlsaW5nU2xhc2ggPSBzdWJzdHIocGF0aCwgLTEpID09PSAnLyc7XG5cbiAgLy8gTm9ybWFsaXplIHRoZSBwYXRoXG4gIHBhdGggPSBub3JtYWxpemVBcnJheShmaWx0ZXIocGF0aC5zcGxpdCgnLycpLCBmdW5jdGlvbihwKSB7XG4gICAgcmV0dXJuICEhcDtcbiAgfSksICFpc0Fic29sdXRlKS5qb2luKCcvJyk7XG5cbiAgaWYgKCFwYXRoICYmICFpc0Fic29sdXRlKSB7XG4gICAgcGF0aCA9ICcuJztcbiAgfVxuICBpZiAocGF0aCAmJiB0cmFpbGluZ1NsYXNoKSB7XG4gICAgcGF0aCArPSAnLyc7XG4gIH1cblxuICByZXR1cm4gKGlzQWJzb2x1dGUgPyAnLycgOiAnJykgKyBwYXRoO1xufTtcblxuLy8gcG9zaXggdmVyc2lvblxuZXhwb3J0cy5pc0Fic29sdXRlID0gZnVuY3Rpb24ocGF0aCkge1xuICByZXR1cm4gcGF0aC5jaGFyQXQoMCkgPT09ICcvJztcbn07XG5cbi8vIHBvc2l4IHZlcnNpb25cbmV4cG9ydHMuam9pbiA9IGZ1bmN0aW9uKCkge1xuICB2YXIgcGF0aHMgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMsIDApO1xuICByZXR1cm4gZXhwb3J0cy5ub3JtYWxpemUoZmlsdGVyKHBhdGhzLCBmdW5jdGlvbihwLCBpbmRleCkge1xuICAgIGlmICh0eXBlb2YgcCAhPT0gJ3N0cmluZycpIHtcbiAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ0FyZ3VtZW50cyB0byBwYXRoLmpvaW4gbXVzdCBiZSBzdHJpbmdzJyk7XG4gICAgfVxuICAgIHJldHVybiBwO1xuICB9KS5qb2luKCcvJykpO1xufTtcblxuXG4vLyBwYXRoLnJlbGF0aXZlKGZyb20sIHRvKVxuLy8gcG9zaXggdmVyc2lvblxuZXhwb3J0cy5yZWxhdGl2ZSA9IGZ1bmN0aW9uKGZyb20sIHRvKSB7XG4gIGZyb20gPSBleHBvcnRzLnJlc29sdmUoZnJvbSkuc3Vic3RyKDEpO1xuICB0byA9IGV4cG9ydHMucmVzb2x2ZSh0bykuc3Vic3RyKDEpO1xuXG4gIGZ1bmN0aW9uIHRyaW0oYXJyKSB7XG4gICAgdmFyIHN0YXJ0ID0gMDtcbiAgICBmb3IgKDsgc3RhcnQgPCBhcnIubGVuZ3RoOyBzdGFydCsrKSB7XG4gICAgICBpZiAoYXJyW3N0YXJ0XSAhPT0gJycpIGJyZWFrO1xuICAgIH1cblxuICAgIHZhciBlbmQgPSBhcnIubGVuZ3RoIC0gMTtcbiAgICBmb3IgKDsgZW5kID49IDA7IGVuZC0tKSB7XG4gICAgICBpZiAoYXJyW2VuZF0gIT09ICcnKSBicmVhaztcbiAgICB9XG5cbiAgICBpZiAoc3RhcnQgPiBlbmQpIHJldHVybiBbXTtcbiAgICByZXR1cm4gYXJyLnNsaWNlKHN0YXJ0LCBlbmQgLSBzdGFydCArIDEpO1xuICB9XG5cbiAgdmFyIGZyb21QYXJ0cyA9IHRyaW0oZnJvbS5zcGxpdCgnLycpKTtcbiAgdmFyIHRvUGFydHMgPSB0cmltKHRvLnNwbGl0KCcvJykpO1xuXG4gIHZhciBsZW5ndGggPSBNYXRoLm1pbihmcm9tUGFydHMubGVuZ3RoLCB0b1BhcnRzLmxlbmd0aCk7XG4gIHZhciBzYW1lUGFydHNMZW5ndGggPSBsZW5ndGg7XG4gIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICBpZiAoZnJvbVBhcnRzW2ldICE9PSB0b1BhcnRzW2ldKSB7XG4gICAgICBzYW1lUGFydHNMZW5ndGggPSBpO1xuICAgICAgYnJlYWs7XG4gICAgfVxuICB9XG5cbiAgdmFyIG91dHB1dFBhcnRzID0gW107XG4gIGZvciAodmFyIGkgPSBzYW1lUGFydHNMZW5ndGg7IGkgPCBmcm9tUGFydHMubGVuZ3RoOyBpKyspIHtcbiAgICBvdXRwdXRQYXJ0cy5wdXNoKCcuLicpO1xuICB9XG5cbiAgb3V0cHV0UGFydHMgPSBvdXRwdXRQYXJ0cy5jb25jYXQodG9QYXJ0cy5zbGljZShzYW1lUGFydHNMZW5ndGgpKTtcblxuICByZXR1cm4gb3V0cHV0UGFydHMuam9pbignLycpO1xufTtcblxuZXhwb3J0cy5zZXAgPSAnLyc7XG5leHBvcnRzLmRlbGltaXRlciA9ICc6JztcblxuZXhwb3J0cy5kaXJuYW1lID0gZnVuY3Rpb24ocGF0aCkge1xuICB2YXIgcmVzdWx0ID0gc3BsaXRQYXRoKHBhdGgpLFxuICAgICAgcm9vdCA9IHJlc3VsdFswXSxcbiAgICAgIGRpciA9IHJlc3VsdFsxXTtcblxuICBpZiAoIXJvb3QgJiYgIWRpcikge1xuICAgIC8vIE5vIGRpcm5hbWUgd2hhdHNvZXZlclxuICAgIHJldHVybiAnLic7XG4gIH1cblxuICBpZiAoZGlyKSB7XG4gICAgLy8gSXQgaGFzIGEgZGlybmFtZSwgc3RyaXAgdHJhaWxpbmcgc2xhc2hcbiAgICBkaXIgPSBkaXIuc3Vic3RyKDAsIGRpci5sZW5ndGggLSAxKTtcbiAgfVxuXG4gIHJldHVybiByb290ICsgZGlyO1xufTtcblxuXG5leHBvcnRzLmJhc2VuYW1lID0gZnVuY3Rpb24ocGF0aCwgZXh0KSB7XG4gIHZhciBmID0gc3BsaXRQYXRoKHBhdGgpWzJdO1xuICAvLyBUT0RPOiBtYWtlIHRoaXMgY29tcGFyaXNvbiBjYXNlLWluc2Vuc2l0aXZlIG9uIHdpbmRvd3M/XG4gIGlmIChleHQgJiYgZi5zdWJzdHIoLTEgKiBleHQubGVuZ3RoKSA9PT0gZXh0KSB7XG4gICAgZiA9IGYuc3Vic3RyKDAsIGYubGVuZ3RoIC0gZXh0Lmxlbmd0aCk7XG4gIH1cbiAgcmV0dXJuIGY7XG59O1xuXG5cbmV4cG9ydHMuZXh0bmFtZSA9IGZ1bmN0aW9uKHBhdGgpIHtcbiAgcmV0dXJuIHNwbGl0UGF0aChwYXRoKVszXTtcbn07XG5cbmZ1bmN0aW9uIGZpbHRlciAoeHMsIGYpIHtcbiAgICBpZiAoeHMuZmlsdGVyKSByZXR1cm4geHMuZmlsdGVyKGYpO1xuICAgIHZhciByZXMgPSBbXTtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHhzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIGlmIChmKHhzW2ldLCBpLCB4cykpIHJlcy5wdXNoKHhzW2ldKTtcbiAgICB9XG4gICAgcmV0dXJuIHJlcztcbn1cblxuLy8gU3RyaW5nLnByb3RvdHlwZS5zdWJzdHIgLSBuZWdhdGl2ZSBpbmRleCBkb24ndCB3b3JrIGluIElFOFxudmFyIHN1YnN0ciA9ICdhYicuc3Vic3RyKC0xKSA9PT0gJ2InXG4gICAgPyBmdW5jdGlvbiAoc3RyLCBzdGFydCwgbGVuKSB7IHJldHVybiBzdHIuc3Vic3RyKHN0YXJ0LCBsZW4pIH1cbiAgICA6IGZ1bmN0aW9uIChzdHIsIHN0YXJ0LCBsZW4pIHtcbiAgICAgICAgaWYgKHN0YXJ0IDwgMCkgc3RhcnQgPSBzdHIubGVuZ3RoICsgc3RhcnQ7XG4gICAgICAgIHJldHVybiBzdHIuc3Vic3RyKHN0YXJ0LCBsZW4pO1xuICAgIH1cbjtcbiIsIi8qXG4gKiBUaGUgTUlUIExpY2Vuc2UgKE1JVClcbiAqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTUgSmVyZW15IFdoaXRsb2NrXG4gKlxuICogUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBvZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGEgY29weVxuICogb2YgdGhpcyBzb2Z0d2FyZSBhbmQgYXNzb2NpYXRlZCBkb2N1bWVudGF0aW9uIGZpbGVzICh0aGUgXCJTb2Z0d2FyZVwiKSwgdG8gZGVhbFxuICogaW4gdGhlIFNvZnR3YXJlIHdpdGhvdXQgcmVzdHJpY3Rpb24sIGluY2x1ZGluZyB3aXRob3V0IGxpbWl0YXRpb24gdGhlIHJpZ2h0c1xuICogdG8gdXNlLCBjb3B5LCBtb2RpZnksIG1lcmdlLCBwdWJsaXNoLCBkaXN0cmlidXRlLCBzdWJsaWNlbnNlLCBhbmQvb3Igc2VsbFxuICogY29waWVzIG9mIHRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdCBwZXJzb25zIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzXG4gKiBmdXJuaXNoZWQgdG8gZG8gc28sIHN1YmplY3QgdG8gdGhlIGZvbGxvd2luZyBjb25kaXRpb25zOlxuICpcbiAqIFRoZSBhYm92ZSBjb3B5cmlnaHQgbm90aWNlIGFuZCB0aGlzIHBlcm1pc3Npb24gbm90aWNlIHNoYWxsIGJlIGluY2x1ZGVkIGluXG4gKiBhbGwgY29waWVzIG9yIHN1YnN0YW50aWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS5cbiAqXG4gKiBUSEUgU09GVFdBUkUgSVMgUFJPVklERUQgXCJBUyBJU1wiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBLSU5ELCBFWFBSRVNTIE9SXG4gKiBJTVBMSUVELCBJTkNMVURJTkcgQlVUIE5PVCBMSU1JVEVEIFRPIFRIRSBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSxcbiAqIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFORCBOT05JTkZSSU5HRU1FTlQuIElOIE5PIEVWRU5UIFNIQUxMIFRIRVxuICogQVVUSE9SUyBPUiBDT1BZUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdFUyBPUiBPVEhFUlxuICogTElBQklMSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDVCwgVE9SVCBPUiBPVEhFUldJU0UsIEFSSVNJTkcgRlJPTSxcbiAqIE9VVCBPRiBPUiBJTiBDT05ORUNUSU9OIFdJVEggVEhFIFNPRlRXQVJFIE9SIFRIRSBVU0UgT1IgT1RIRVIgREVBTElOR1MgSU5cbiAqIFRIRSBTT0ZUV0FSRS5cbiAqL1xuXG4ndXNlIHN0cmljdCc7XG5cbi8qKlxuICogVXRpbGl0eSB0aGF0IHByb3ZpZGVzIGEgc2luZ2xlIEFQSSBmb3IgbG9hZGluZyB0aGUgY29udGVudCBvZiBhIHBhdGgvVVJMLlxuICpcbiAqIEBtb2R1bGUgUGF0aExvYWRlclxuICovXG5cbnZhciBzdXBwb3J0ZWRMb2FkZXJzID0ge1xuICBmaWxlOiByZXF1aXJlKCcuL2xpYi9sb2FkZXJzL2ZpbGUnKSxcbiAgaHR0cDogcmVxdWlyZSgnLi9saWIvbG9hZGVycy9odHRwJyksXG4gIGh0dHBzOiByZXF1aXJlKCcuL2xpYi9sb2FkZXJzL2h0dHAnKVxufTtcbnZhciBkZWZhdWx0TG9hZGVyID0gdHlwZW9mIHdpbmRvdyA9PT0gJ29iamVjdCcgfHwgdHlwZW9mIGltcG9ydFNjcmlwdHMgPT09ICdmdW5jdGlvbicgP1xuICAgICAgc3VwcG9ydGVkTG9hZGVycy5odHRwIDpcbiAgICAgIHN1cHBvcnRlZExvYWRlcnMuZmlsZTtcblxuLy8gTG9hZCBwcm9taXNlcyBwb2x5ZmlsbCBpZiBuZWNlc3Nhcnlcbi8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuaWYgKHR5cGVvZiBQcm9taXNlID09PSAndW5kZWZpbmVkJykge1xuICByZXF1aXJlKCduYXRpdmUtcHJvbWlzZS1vbmx5Jyk7XG59XG5cbmZ1bmN0aW9uIGdldFNjaGVtZSAobG9jYXRpb24pIHtcbiAgaWYgKHR5cGVvZiBsb2NhdGlvbiAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICBsb2NhdGlvbiA9IGxvY2F0aW9uLmluZGV4T2YoJzovLycpID09PSAtMSA/ICcnIDogbG9jYXRpb24uc3BsaXQoJzovLycpWzBdO1xuICB9XG5cbiAgcmV0dXJuIGxvY2F0aW9uO1xufVxuXG4vKipcbiAqIENhbGxiYWNrIHVzZWQgdG8gcHJvdmlkZSBhY2Nlc3MgdG8gYWx0ZXJpbmcgYSByZW1vdGUgcmVxdWVzdCBwcmlvciB0byB0aGUgcmVxdWVzdCBiZWluZyBtYWRlLlxuICpcbiAqIEB0eXBlZGVmIHtmdW5jdGlvbn0gUHJlcGFyZVJlcXVlc3RDYWxsYmFja1xuICpcbiAqIEBwYXJhbSB7b2JqZWN0fSByZXEgLSBUaGUgU3VwZXJhZ2VudCByZXF1ZXN0IG9iamVjdFxuICogQHBhcmFtIHtzdHJpbmd9IGxvY2F0aW9uIC0gVGhlIGxvY2F0aW9uIGJlaW5nIHJldHJpZXZlZFxuICogQHBhcmFtIHtmdW5jdGlvbn0gY2FsbGJhY2sgLSBGaXJzdCBjYWxsYmFja1xuICpcbiAqIEBhbGlhcyBtb2R1bGU6UGF0aExvYWRlcn5QcmVwYXJlUmVxdWVzdENhbGxiYWNrXG4gKi9cblxuIC8qKlxuICAqIENhbGxiYWNrIHVzZWQgdG8gcHJvdmlkZSBhY2Nlc3MgdG8gcHJvY2Vzc2luZyB0aGUgcmF3IHJlc3BvbnNlIG9mIHRoZSByZXF1ZXN0IGJlaW5nIG1hZGUuICooSFRUUCBsb2FkZXIgb25seSkqXG4gICpcbiAgKiBAdHlwZWRlZiB7ZnVuY3Rpb259IFByb2Nlc3NSZXNwb25zZUNhbGxiYWNrXG4gICpcbiAgKiBAcGFyYW0ge29iamVjdH0gcmVzIC0gVGhlIFN1cGVyYWdlbnQgcmVzcG9uc2Ugb2JqZWN0ICooRm9yIG5vbi1IVFRQIGxvYWRlcnMsIHRoaXMgb2JqZWN0IHdpbGwgYmUgbGlrZSB0aGUgU3VwZXJhZ2VudFxuICAqIG9iamVjdCBpbiB0aGF0IGl0IHdpbGwgaGF2ZSBhIGB0ZXh0YCBwcm9wZXJ0eSB3aG9zZSB2YWx1ZSBpcyB0aGUgcmF3IHN0cmluZyB2YWx1ZSBiZWluZyBwcm9jZXNzZWQuICBUaGlzIHdhcyBkb25lXG4gICogZm9yIGNvbnNpc3RlbmN5LikqXG4gICogQHBhcmFtIHtmdW5jdGlvbn0gY2FsbGJhY2sgLSBFcnJvci1maXJzdCBjYWxsYmFja1xuICAqXG4gICogQHJldHVybnMgeyp9IHRoZSByZXN1bHQgb2YgcHJvY2Vzc2luZyB0aGUgcmVzcG9uc2V4c1xuICAqXG4gICogQGFsaWFzIG1vZHVsZTpQYXRoTG9hZGVyflByb2Nlc3NSZXNwb25zZUNhbGxiYWNrXG4gICovXG5cbmZ1bmN0aW9uIGdldExvYWRlciAobG9jYXRpb24pIHtcbiAgdmFyIHNjaGVtZSA9IGdldFNjaGVtZShsb2NhdGlvbik7XG4gIHZhciBsb2FkZXIgPSBzdXBwb3J0ZWRMb2FkZXJzW3NjaGVtZV07XG5cbiAgaWYgKHR5cGVvZiBsb2FkZXIgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgaWYgKHNjaGVtZSA9PT0gJycpIHtcbiAgICAgIGxvYWRlciA9IGRlZmF1bHRMb2FkZXI7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcignVW5zdXBwb3J0ZWQgc2NoZW1lOiAnICsgc2NoZW1lKTtcbiAgICB9XG4gIH1cblxuICByZXR1cm4gbG9hZGVyO1xufVxuXG4vKipcbiAqIExvYWRzIGEgZG9jdW1lbnQgYXQgdGhlIHByb3ZpZGVkIGxvY2F0aW9uIGFuZCByZXR1cm5zIGEgSmF2YVNjcmlwdCBvYmplY3QgcmVwcmVzZW50YXRpb24uXG4gKlxuICogQHBhcmFtIHtvYmplY3R9IGxvY2F0aW9uIC0gVGhlIGxvY2F0aW9uIHRvIHRoZSBkb2N1bWVudFxuICogQHBhcmFtIHtvYmplY3R9IFtvcHRpb25zXSAtIFRoZSBvcHRpb25zXG4gKiBAcGFyYW0ge3N0cmluZ30gW29wdGlvbnMuZW5jb2Rpbmc9J3V0Zi04J10gLSBUaGUgZW5jb2RpbmcgdG8gdXNlIHdoZW4gbG9hZGluZyB0aGUgZmlsZSAqKEZpbGUgbG9hZGVyIG9ubHkpKlxuICogQHBhcmFtIHtzdHJpbmd9IFtvcHRpb25zLm1ldGhvZD1nZXRdIC0gVGhlIEhUVFAgbWV0aG9kIHRvIHVzZSBmb3IgdGhlIHJlcXVlc3QgKihIVFRQIGxvYWRlciBvbmx5KSpcbiAqIEBwYXJhbSB7bW9kdWxlOlBhdGhMb2FkZXJ+UHJlcGFyZVJlcXVlc3RDYWxsYmFja30gW29wdGlvbnMucHJlcGFyZVJlcXVlc3RdIC0gVGhlIGNhbGxiYWNrIHVzZWQgdG8gcHJlcGFyZSB0aGUgcmVxdWVzdFxuICogKihIVFRQIGxvYWRlciBvbmx5KSpcbiAqIEBwYXJhbSB7bW9kdWxlOlBhdGhMb2FkZXJ+UHJvY2Vzc1Jlc3BvbnNlQ2FsbGJhY2t9IFtvcHRpb25zLnByb2Nlc3NDb250ZW50XSAtIFRoZSBjYWxsYmFjayB1c2VkIHRvIHByb2Nlc3MgdGhlXG4gKiByZXNwb25zZVxuICpcbiAqIEByZXR1cm5zIHtQcm9taXNlfSBBbHdheXMgcmV0dXJucyBhIHByb21pc2UgZXZlbiBpZiB0aGVyZSBpcyBhIGNhbGxiYWNrIHByb3ZpZGVkXG4gKlxuICogQGV4YW1wbGVcbiAqIC8vIEV4YW1wbGUgdXNpbmcgUHJvbWlzZXNcbiAqXG4gKiBQYXRoTG9hZGVyXG4gKiAgIC5sb2FkKCcuL3BhY2thZ2UuanNvbicpXG4gKiAgIC50aGVuKEpTT04ucGFyc2UpXG4gKiAgIC50aGVuKGZ1bmN0aW9uIChkb2N1bWVudCkge1xuICogICAgIGNvbnNvbGUubG9nKGRvY3VtZW50Lm5hbWUgKyAnICgnICsgZG9jdW1lbnQudmVyc2lvbiArICcpOiAnICsgZG9jdW1lbnQuZGVzY3JpcHRpb24pO1xuICogICB9LCBmdW5jdGlvbiAoZXJyKSB7XG4gKiAgICAgY29uc29sZS5lcnJvcihlcnIuc3RhY2spO1xuICogICB9KTtcbiAqXG4gKiBAZXhhbXBsZVxuICogLy8gRXhhbXBsZSB1c2luZyBvcHRpb25zLnByZXBhcmVSZXF1ZXN0IHRvIHByb3ZpZGUgYXV0aGVudGljYXRpb24gZGV0YWlscyBmb3IgYSByZW1vdGVseSBzZWN1cmUgVVJMXG4gKlxuICogUGF0aExvYWRlclxuICogICAubG9hZCgnaHR0cHM6Ly9hcGkuZ2l0aHViLmNvbS9yZXBvcy93aGl0bG9ja2pjL3BhdGgtbG9hZGVyJywge1xuICogICAgIHByZXBhcmVSZXF1ZXN0OiBmdW5jdGlvbiAocmVxLCBjYWxsYmFjaykge1xuICogICAgICAgcmVxLmF1dGgoJ215LXVzZXJuYW1lJywgJ215LXBhc3N3b3JkJyk7XG4gKiAgICAgICBjYWxsYmFjayh1bmRlZmluZWQsIHJlcSk7XG4gKiAgICAgfVxuICogICB9KVxuICogICAudGhlbihKU09OLnBhcnNlKVxuICogICAudGhlbihmdW5jdGlvbiAoZG9jdW1lbnQpIHtcbiAqICAgICBjb25zb2xlLmxvZyhkb2N1bWVudC5mdWxsX25hbWUgKyAnOiAnICsgZG9jdW1lbnQuZGVzY3JpcHRpb24pO1xuICogICB9LCBmdW5jdGlvbiAoZXJyKSB7XG4gKiAgICAgY29uc29sZS5lcnJvcihlcnIuc3RhY2spO1xuICogICB9KTtcbiAqXG4gKiBAZXhhbXBsZVxuICogLy8gRXhhbXBsZSBsb2FkaW5nIGEgWUFNTCBmaWxlXG4gKlxuICogUGF0aExvYWRlclxuICogICAubG9hZCgnL1VzZXJzL25vdC15b3UvcHJvamVjdHMvcGF0aC1sb2FkZXIvLnRyYXZpcy55bWwnKVxuICogICAudGhlbihZQU1MLnNhZmVMb2FkKVxuICogICAudGhlbihmdW5jdGlvbiAoZG9jdW1lbnQpIHtcbiAqICAgICBjb25zb2xlLmxvZygncGF0aC1sb2FkZXIgdXNlcyB0aGUnLCBkb2N1bWVudC5sYW5ndWFnZSwgJ2xhbmd1YWdlLicpO1xuICogICB9LCBmdW5jdGlvbiAoZXJyKSB7XG4gKiAgICAgY29uc29sZS5lcnJvcihlcnIuc3RhY2spO1xuICogICB9KTtcbiAqXG4gKiBAZXhhbXBsZVxuICogLy8gRXhhbXBsZSBsb2FkaW5nIGEgWUFNTCBmaWxlIHdpdGggb3B0aW9ucy5wcm9jZXNzQ29udGVudCAoVXNlZnVsIGlmIHlvdSBuZWVkIGluZm9ybWF0aW9uIGluIHRoZSByYXcgcmVzcG9uc2UpXG4gKlxuICogUGF0aExvYWRlclxuICogICAubG9hZCgnL1VzZXJzL25vdC15b3UvcHJvamVjdHMvcGF0aC1sb2FkZXIvLnRyYXZpcy55bWwnLCB7XG4gKiAgICAgcHJvY2Vzc0NvbnRlbnQ6IGZ1bmN0aW9uIChyZXMsIGNhbGxiYWNrKSB7XG4gKiAgICAgICBjYWxsYmFjayhZQU1MLnNhZmVMb2FkKHJlcy50ZXh0KSk7XG4gKiAgICAgfVxuICogICB9KVxuICogICAudGhlbihmdW5jdGlvbiAoZG9jdW1lbnQpIHtcbiAqICAgICBjb25zb2xlLmxvZygncGF0aC1sb2FkZXIgdXNlcyB0aGUnLCBkb2N1bWVudC5sYW5ndWFnZSwgJ2xhbmd1YWdlLicpO1xuICogICB9LCBmdW5jdGlvbiAoZXJyKSB7XG4gKiAgICAgY29uc29sZS5lcnJvcihlcnIuc3RhY2spO1xuICogICB9KTtcbiAqL1xubW9kdWxlLmV4cG9ydHMubG9hZCA9IGZ1bmN0aW9uIChsb2NhdGlvbiwgb3B0aW9ucykge1xuICB2YXIgYWxsVGFza3MgPSBQcm9taXNlLnJlc29sdmUoKTtcblxuICAvLyBEZWZhdWx0IG9wdGlvbnMgdG8gZW1wdHkgb2JqZWN0XG4gIGlmICh0eXBlb2Ygb3B0aW9ucyA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICBvcHRpb25zID0ge307XG4gIH1cblxuICAvLyBWYWxpZGF0ZSBhcmd1bWVudHNcbiAgYWxsVGFza3MgPSBhbGxUYXNrcy50aGVuKGZ1bmN0aW9uICgpIHtcbiAgICBpZiAodHlwZW9mIGxvY2F0aW9uID09PSAndW5kZWZpbmVkJykge1xuICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignbG9jYXRpb24gaXMgcmVxdWlyZWQnKTtcbiAgICB9IGVsc2UgaWYgKHR5cGVvZiBsb2NhdGlvbiAhPT0gJ3N0cmluZycpIHtcbiAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ2xvY2F0aW9uIG11c3QgYmUgYSBzdHJpbmcnKTtcbiAgICB9XG5cbiAgICBpZiAodHlwZW9mIG9wdGlvbnMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICBpZiAodHlwZW9mIG9wdGlvbnMgIT09ICdvYmplY3QnKSB7XG4gICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ29wdGlvbnMgbXVzdCBiZSBhbiBvYmplY3QnKTtcbiAgICAgIH0gZWxzZSBpZiAodHlwZW9mIG9wdGlvbnMucHJvY2Vzc0NvbnRlbnQgIT09ICd1bmRlZmluZWQnICYmIHR5cGVvZiBvcHRpb25zLnByb2Nlc3NDb250ZW50ICE9PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ29wdGlvbnMucHJvY2Vzc0NvbnRlbnQgbXVzdCBiZSBhIGZ1bmN0aW9uJyk7XG4gICAgICB9XG4gICAgfVxuICB9KTtcblxuICAvLyBMb2FkIHRoZSBkb2N1bWVudCBmcm9tIHRoZSBwcm92aWRlZCBsb2NhdGlvbiBhbmQgcHJvY2VzcyBpdFxuICBhbGxUYXNrcyA9IGFsbFRhc2tzXG4gICAgLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKGZ1bmN0aW9uIChyZXNvbHZlLCByZWplY3QpIHtcbiAgICAgICAgdmFyIGxvYWRlciA9IGdldExvYWRlcihsb2NhdGlvbik7XG5cbiAgICAgICAgbG9hZGVyLmxvYWQobG9jYXRpb24sIG9wdGlvbnMgfHwge30sIGZ1bmN0aW9uIChlcnIsIGRvY3VtZW50KSB7XG4gICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgcmVqZWN0KGVycik7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJlc29sdmUoZG9jdW1lbnQpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICB9KVxuICAgIC50aGVuKGZ1bmN0aW9uIChyZXMpIHtcbiAgICAgIGlmIChvcHRpb25zLnByb2Nlc3NDb250ZW50KSB7XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgLy8gRm9yIGNvbnNpc3RlbmN5IGJldHdlZW4gZmlsZSBhbmQgaHR0cCwgYWx3YXlzIHNlbmQgYW4gb2JqZWN0IHdpdGggYSAndGV4dCcgcHJvcGVydHkgY29udGFpbmluZyB0aGUgcmF3XG4gICAgICAgICAgLy8gc3RyaW5nIHZhbHVlIGJlaW5nIHByb2Nlc3NlZC5cbiAgICAgICAgICBvcHRpb25zLnByb2Nlc3NDb250ZW50KHR5cGVvZiByZXMgPT09ICdvYmplY3QnID8gcmVzIDoge3RleHQ6IHJlc30sIGZ1bmN0aW9uIChlcnIsIHByb2Nlc3NlZCkge1xuICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICByZWplY3QoZXJyKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJlc29sdmUocHJvY2Vzc2VkKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyBJZiB0aGVyZSB3YXMgbm8gY29udGVudCBwcm9jZXNzb3IsIHdlIHdpbGwgYXNzdW1lIHRoYXQgZm9yIGFsbCBvYmplY3RzIHRoYXQgaXQgaXMgYSBTdXBlcmFnZW50IHJlc3BvbnNlXG4gICAgICAgIC8vIGFuZCB3aWxsIHJldHVybiBpdHMgYHRleHRgIHByb3BlcnR5IHZhbHVlLiAgT3RoZXJ3aXNlLCB3ZSB3aWxsIHJldHVybiB0aGUgcmF3IHJlc3BvbnNlLlxuICAgICAgICByZXR1cm4gdHlwZW9mIHJlcyA9PT0gJ29iamVjdCcgPyByZXMudGV4dCA6IHJlcztcbiAgICAgIH1cbiAgICB9KTtcblxuICByZXR1cm4gYWxsVGFza3M7XG59O1xuIiwiLypcbiAqIFRoZSBNSVQgTGljZW5zZSAoTUlUKVxuICpcbiAqIENvcHlyaWdodCAoYykgMjAxNSBKZXJlbXkgV2hpdGxvY2tcbiAqXG4gKiBQZXJtaXNzaW9uIGlzIGhlcmVieSBncmFudGVkLCBmcmVlIG9mIGNoYXJnZSwgdG8gYW55IHBlcnNvbiBvYnRhaW5pbmcgYSBjb3B5XG4gKiBvZiB0aGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmlsZXMgKHRoZSBcIlNvZnR3YXJlXCIpLCB0byBkZWFsXG4gKiBpbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRhdGlvbiB0aGUgcmlnaHRzXG4gKiB0byB1c2UsIGNvcHksIG1vZGlmeSwgbWVyZ2UsIHB1Ymxpc2gsIGRpc3RyaWJ1dGUsIHN1YmxpY2Vuc2UsIGFuZC9vciBzZWxsXG4gKiBjb3BpZXMgb2YgdGhlIFNvZnR3YXJlLCBhbmQgdG8gcGVybWl0IHBlcnNvbnMgdG8gd2hvbSB0aGUgU29mdHdhcmUgaXNcbiAqIGZ1cm5pc2hlZCB0byBkbyBzbywgc3ViamVjdCB0byB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnM6XG4gKlxuICogVGhlIGFib3ZlIGNvcHlyaWdodCBub3RpY2UgYW5kIHRoaXMgcGVybWlzc2lvbiBub3RpY2Ugc2hhbGwgYmUgaW5jbHVkZWQgaW5cbiAqIGFsbCBjb3BpZXMgb3Igc3Vic3RhbnRpYWwgcG9ydGlvbnMgb2YgdGhlIFNvZnR3YXJlLlxuICpcbiAqIFRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCBcIkFTIElTXCIsIFdJVEhPVVQgV0FSUkFOVFkgT0YgQU5ZIEtJTkQsIEVYUFJFU1MgT1JcbiAqIElNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLFxuICogRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UgQU5EIE5PTklORlJJTkdFTUVOVC4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFXG4gKiBBVVRIT1JTIE9SIENPUFlSSUdIVCBIT0xERVJTIEJFIExJQUJMRSBGT1IgQU5ZIENMQUlNLCBEQU1BR0VTIE9SIE9USEVSXG4gKiBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLFxuICogT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPUiBPVEhFUiBERUFMSU5HUyBJTlxuICogVEhFIFNPRlRXQVJFLlxuICovXG5cbid1c2Ugc3RyaWN0JztcblxudmFyIHVuc3VwcG9ydGVkRXJyb3IgPSBuZXcgVHlwZUVycm9yKCdUaGUgXFwnZmlsZVxcJyBzY2hlbWUgaXMgbm90IHN1cHBvcnRlZCBpbiB0aGUgYnJvd3NlcicpO1xuXG4vKipcbiAqIFRoZSBmaWxlIGxvYWRlciBpcyBub3Qgc3VwcG9ydGVkIGluIHRoZSBicm93c2VyLlxuICpcbiAqIEB0aHJvd3Mge2Vycm9yfSB0aGUgZmlsZSBsb2FkZXIgaXMgbm90IHN1cHBvcnRlZCBpbiB0aGUgYnJvd3NlclxuICovXG5tb2R1bGUuZXhwb3J0cy5nZXRCYXNlID0gZnVuY3Rpb24gKCkge1xuICB0aHJvdyB1bnN1cHBvcnRlZEVycm9yO1xufTtcblxuLyoqXG4gKiBUaGUgZmlsZSBsb2FkZXIgaXMgbm90IHN1cHBvcnRlZCBpbiB0aGUgYnJvd3Nlci5cbiAqL1xubW9kdWxlLmV4cG9ydHMubG9hZCA9IGZ1bmN0aW9uICgpIHtcbiAgdmFyIGZuID0gYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXTtcblxuICBpZiAodHlwZW9mIGZuID09PSAnZnVuY3Rpb24nKSB7XG4gICAgZm4odW5zdXBwb3J0ZWRFcnJvcik7XG4gIH0gZWxzZSB7XG4gICAgdGhyb3cgdW5zdXBwb3J0ZWRFcnJvcjtcbiAgfVxufTtcbiIsIi8qIGVzbGludC1lbnYgbm9kZSwgYnJvd3NlciAqL1xuXG4vKlxuICogVGhlIE1JVCBMaWNlbnNlIChNSVQpXG4gKlxuICogQ29weXJpZ2h0IChjKSAyMDE1IEplcmVteSBXaGl0bG9ja1xuICpcbiAqIFBlcm1pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmluZyBhIGNvcHlcbiAqIG9mIHRoaXMgc29mdHdhcmUgYW5kIGFzc29jaWF0ZWQgZG9jdW1lbnRhdGlvbiBmaWxlcyAodGhlIFwiU29mdHdhcmVcIiksIHRvIGRlYWxcbiAqIGluIHRoZSBTb2Z0d2FyZSB3aXRob3V0IHJlc3RyaWN0aW9uLCBpbmNsdWRpbmcgd2l0aG91dCBsaW1pdGF0aW9uIHRoZSByaWdodHNcbiAqIHRvIHVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwgcHVibGlzaCwgZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGxcbiAqIGNvcGllcyBvZiB0aGUgU29mdHdhcmUsIGFuZCB0byBwZXJtaXQgcGVyc29ucyB0byB3aG9tIHRoZSBTb2Z0d2FyZSBpc1xuICogZnVybmlzaGVkIHRvIGRvIHNvLCBzdWJqZWN0IHRvIHRoZSBmb2xsb3dpbmcgY29uZGl0aW9uczpcbiAqXG4gKiBUaGUgYWJvdmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGljZSBzaGFsbCBiZSBpbmNsdWRlZCBpblxuICogYWxsIGNvcGllcyBvciBzdWJzdGFudGlhbCBwb3J0aW9ucyBvZiB0aGUgU29mdHdhcmUuXG4gKlxuICogVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEIFwiQVMgSVNcIiwgV0lUSE9VVCBXQVJSQU5UWSBPRiBBTlkgS0lORCwgRVhQUkVTUyBPUlxuICogSU1QTElFRCwgSU5DTFVESU5HIEJVVCBOT1QgTElNSVRFRCBUTyBUSEUgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFksXG4gKiBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklOR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEVcbiAqIEFVVEhPUlMgT1IgQ09QWVJJR0hUIEhPTERFUlMgQkUgTElBQkxFIEZPUiBBTlkgQ0xBSU0sIERBTUFHRVMgT1IgT1RIRVJcbiAqIExJQUJJTElUWSwgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIFRPUlQgT1IgT1RIRVJXSVNFLCBBUklTSU5HIEZST00sXG4gKiBPVVQgT0YgT1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOXG4gKiBUSEUgU09GVFdBUkUuXG4gKi9cblxuJ3VzZSBzdHJpY3QnO1xuXG52YXIgcmVxdWVzdCA9IHJlcXVpcmUoJ3N1cGVyYWdlbnQnKTtcblxudmFyIHN1cHBvcnRlZEh0dHBNZXRob2RzID0gWydkZWxldGUnLCAnZ2V0JywgJ2hlYWQnLCAncGF0Y2gnLCAncG9zdCcsICdwdXQnXTtcblxuLyoqXG4gKiBMb2FkcyBhIGZpbGUgZnJvbSBhbiBodHRwIG9yIGh0dHBzIFVSTC5cbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30gbG9jYXRpb24gLSBUaGUgZG9jdW1lbnQgVVJMIChJZiByZWxhdGl2ZSwgbG9jYXRpb24gaXMgcmVsYXRpdmUgdG8gd2luZG93LmxvY2F0aW9uLm9yaWdpbikuXG4gKiBAcGFyYW0ge29iamVjdH0gb3B0aW9ucyAtIFRoZSBsb2FkZXIgb3B0aW9uc1xuICogQHBhcmFtIHtzdHJpbmd9IFtvcHRpb25zLm1ldGhvZD1nZXRdIC0gVGhlIEhUVFAgbWV0aG9kIHRvIHVzZSBmb3IgdGhlIHJlcXVlc3RcbiAqIEBwYXJhbSB7bW9kdWxlOlBhdGhMb2FkZXJ+UHJlcGFyZVJlcXVlc3RDYWxsYmFja30gW29wdGlvbnMucHJlcGFyZVJlcXVlc3RdIC0gVGhlIGNhbGxiYWNrIHVzZWQgdG8gcHJlcGFyZSBhIHJlcXVlc3RcbiAqIEBwYXJhbSB7bW9kdWxlOlBhdGhMb2FkZXJ+UHJvY2Vzc1Jlc3BvbnNlQ2FsbGJhY2t9IFtvcHRpb25zLnByb2Nlc3NDb250ZW50XSAtIFRoZSBjYWxsYmFjayB1c2VkIHRvIHByb2Nlc3MgdGhlXG4gKiByZXNwb25zZVxuICogQHBhcmFtIHtmdW5jdGlvbn0gY2FsbGJhY2sgLSBUaGUgZXJyb3ItZmlyc3QgY2FsbGJhY2tcbiAqL1xubW9kdWxlLmV4cG9ydHMubG9hZCA9IGZ1bmN0aW9uIChsb2NhdGlvbiwgb3B0aW9ucywgY2FsbGJhY2spIHtcbiAgdmFyIHJlYWxNZXRob2QgPSBvcHRpb25zLm1ldGhvZCA/IG9wdGlvbnMubWV0aG9kLnRvTG93ZXJDYXNlKCkgOiAnZ2V0JztcbiAgdmFyIGVycjtcbiAgdmFyIHJlYWxSZXF1ZXN0O1xuXG4gIGZ1bmN0aW9uIG1ha2VSZXF1ZXN0IChlcnIsIHJlcSkge1xuICAgIGlmIChlcnIpIHtcbiAgICAgIGNhbGxiYWNrKGVycik7XG4gICAgfSBlbHNlIHtcbiAgICAgIC8vIGJ1ZmZlcigpIGlzIG9ubHkgYXZhaWxhYmxlIGluIE5vZGUuanNcbiAgICAgIGlmICh0eXBlb2YgcmVxLmJ1ZmZlciA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICByZXEuYnVmZmVyKHRydWUpO1xuICAgICAgfVxuXG4gICAgICByZXFcbiAgICAgICAgLmVuZChmdW5jdGlvbiAoZXJyMiwgcmVzKSB7XG4gICAgICAgICAgaWYgKGVycjIpIHtcbiAgICAgICAgICAgIGNhbGxiYWNrKGVycjIpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjYWxsYmFjayh1bmRlZmluZWQsIHJlcyk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG4gIH1cblxuICBpZiAodHlwZW9mIG9wdGlvbnMubWV0aG9kICE9PSAndW5kZWZpbmVkJykge1xuICAgIGlmICh0eXBlb2Ygb3B0aW9ucy5tZXRob2QgIT09ICdzdHJpbmcnKSB7XG4gICAgICBlcnIgPSBuZXcgVHlwZUVycm9yKCdvcHRpb25zLm1ldGhvZCBtdXN0IGJlIGEgc3RyaW5nJyk7XG4gICAgfSBlbHNlIGlmIChzdXBwb3J0ZWRIdHRwTWV0aG9kcy5pbmRleE9mKG9wdGlvbnMubWV0aG9kKSA9PT0gLTEpIHtcbiAgICAgIGVyciA9IG5ldyBUeXBlRXJyb3IoJ29wdGlvbnMubWV0aG9kIG11c3QgYmUgb25lIG9mIHRoZSBmb2xsb3dpbmc6ICcgK1xuICAgICAgICBzdXBwb3J0ZWRIdHRwTWV0aG9kcy5zbGljZSgwLCBzdXBwb3J0ZWRIdHRwTWV0aG9kcy5sZW5ndGggLSAxKS5qb2luKCcsICcpICsgJyBvciAnICtcbiAgICAgICAgc3VwcG9ydGVkSHR0cE1ldGhvZHNbc3VwcG9ydGVkSHR0cE1ldGhvZHMubGVuZ3RoIC0gMV0pO1xuICAgIH1cbiAgfSBlbHNlIGlmICh0eXBlb2Ygb3B0aW9ucy5wcmVwYXJlUmVxdWVzdCAhPT0gJ3VuZGVmaW5lZCcgJiYgdHlwZW9mIG9wdGlvbnMucHJlcGFyZVJlcXVlc3QgIT09ICdmdW5jdGlvbicpIHtcbiAgICBlcnIgPSBuZXcgVHlwZUVycm9yKCdvcHRpb25zLnByZXBhcmVSZXF1ZXN0IG11c3QgYmUgYSBmdW5jdGlvbicpO1xuICB9XG5cbiAgaWYgKCFlcnIpIHtcbiAgICByZWFsUmVxdWVzdCA9IHJlcXVlc3RbcmVhbE1ldGhvZCA9PT0gJ2RlbGV0ZScgPyAnZGVsJyA6IHJlYWxNZXRob2RdKGxvY2F0aW9uKTtcblxuICAgIGlmIChvcHRpb25zLnByZXBhcmVSZXF1ZXN0KSB7XG4gICAgICB0cnkge1xuICAgICAgICBvcHRpb25zLnByZXBhcmVSZXF1ZXN0KHJlYWxSZXF1ZXN0LCBtYWtlUmVxdWVzdCk7XG4gICAgICB9IGNhdGNoIChlcnIyKSB7XG4gICAgICAgIGNhbGxiYWNrKGVycjIpO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBtYWtlUmVxdWVzdCh1bmRlZmluZWQsIHJlYWxSZXF1ZXN0KTtcbiAgICB9XG4gIH0gZWxzZSB7XG4gICAgY2FsbGJhY2soZXJyKTtcbiAgfVxufTtcbiIsIi8vIHNoaW0gZm9yIHVzaW5nIHByb2Nlc3MgaW4gYnJvd3NlclxuXG52YXIgcHJvY2VzcyA9IG1vZHVsZS5leHBvcnRzID0ge307XG52YXIgcXVldWUgPSBbXTtcbnZhciBkcmFpbmluZyA9IGZhbHNlO1xudmFyIGN1cnJlbnRRdWV1ZTtcbnZhciBxdWV1ZUluZGV4ID0gLTE7XG5cbmZ1bmN0aW9uIGNsZWFuVXBOZXh0VGljaygpIHtcbiAgICBkcmFpbmluZyA9IGZhbHNlO1xuICAgIGlmIChjdXJyZW50UXVldWUubGVuZ3RoKSB7XG4gICAgICAgIHF1ZXVlID0gY3VycmVudFF1ZXVlLmNvbmNhdChxdWV1ZSk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgcXVldWVJbmRleCA9IC0xO1xuICAgIH1cbiAgICBpZiAocXVldWUubGVuZ3RoKSB7XG4gICAgICAgIGRyYWluUXVldWUoKTtcbiAgICB9XG59XG5cbmZ1bmN0aW9uIGRyYWluUXVldWUoKSB7XG4gICAgaWYgKGRyYWluaW5nKSB7XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgdmFyIHRpbWVvdXQgPSBzZXRUaW1lb3V0KGNsZWFuVXBOZXh0VGljayk7XG4gICAgZHJhaW5pbmcgPSB0cnVlO1xuXG4gICAgdmFyIGxlbiA9IHF1ZXVlLmxlbmd0aDtcbiAgICB3aGlsZShsZW4pIHtcbiAgICAgICAgY3VycmVudFF1ZXVlID0gcXVldWU7XG4gICAgICAgIHF1ZXVlID0gW107XG4gICAgICAgIHdoaWxlICgrK3F1ZXVlSW5kZXggPCBsZW4pIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50UXVldWUpIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50UXVldWVbcXVldWVJbmRleF0ucnVuKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcXVldWVJbmRleCA9IC0xO1xuICAgICAgICBsZW4gPSBxdWV1ZS5sZW5ndGg7XG4gICAgfVxuICAgIGN1cnJlbnRRdWV1ZSA9IG51bGw7XG4gICAgZHJhaW5pbmcgPSBmYWxzZTtcbiAgICBjbGVhclRpbWVvdXQodGltZW91dCk7XG59XG5cbnByb2Nlc3MubmV4dFRpY2sgPSBmdW5jdGlvbiAoZnVuKSB7XG4gICAgdmFyIGFyZ3MgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCAtIDEpO1xuICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID4gMSkge1xuICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgYXJnc1tpIC0gMV0gPSBhcmd1bWVudHNbaV07XG4gICAgICAgIH1cbiAgICB9XG4gICAgcXVldWUucHVzaChuZXcgSXRlbShmdW4sIGFyZ3MpKTtcbiAgICBpZiAocXVldWUubGVuZ3RoID09PSAxICYmICFkcmFpbmluZykge1xuICAgICAgICBzZXRUaW1lb3V0KGRyYWluUXVldWUsIDApO1xuICAgIH1cbn07XG5cbi8vIHY4IGxpa2VzIHByZWRpY3RpYmxlIG9iamVjdHNcbmZ1bmN0aW9uIEl0ZW0oZnVuLCBhcnJheSkge1xuICAgIHRoaXMuZnVuID0gZnVuO1xuICAgIHRoaXMuYXJyYXkgPSBhcnJheTtcbn1cbkl0ZW0ucHJvdG90eXBlLnJ1biA9IGZ1bmN0aW9uICgpIHtcbiAgICB0aGlzLmZ1bi5hcHBseShudWxsLCB0aGlzLmFycmF5KTtcbn07XG5wcm9jZXNzLnRpdGxlID0gJ2Jyb3dzZXInO1xucHJvY2Vzcy5icm93c2VyID0gdHJ1ZTtcbnByb2Nlc3MuZW52ID0ge307XG5wcm9jZXNzLmFyZ3YgPSBbXTtcbnByb2Nlc3MudmVyc2lvbiA9ICcnOyAvLyBlbXB0eSBzdHJpbmcgdG8gYXZvaWQgcmVnZXhwIGlzc3Vlc1xucHJvY2Vzcy52ZXJzaW9ucyA9IHt9O1xuXG5mdW5jdGlvbiBub29wKCkge31cblxucHJvY2Vzcy5vbiA9IG5vb3A7XG5wcm9jZXNzLmFkZExpc3RlbmVyID0gbm9vcDtcbnByb2Nlc3Mub25jZSA9IG5vb3A7XG5wcm9jZXNzLm9mZiA9IG5vb3A7XG5wcm9jZXNzLnJlbW92ZUxpc3RlbmVyID0gbm9vcDtcbnByb2Nlc3MucmVtb3ZlQWxsTGlzdGVuZXJzID0gbm9vcDtcbnByb2Nlc3MuZW1pdCA9IG5vb3A7XG5cbnByb2Nlc3MuYmluZGluZyA9IGZ1bmN0aW9uIChuYW1lKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdwcm9jZXNzLmJpbmRpbmcgaXMgbm90IHN1cHBvcnRlZCcpO1xufTtcblxucHJvY2Vzcy5jd2QgPSBmdW5jdGlvbiAoKSB7IHJldHVybiAnLycgfTtcbnByb2Nlc3MuY2hkaXIgPSBmdW5jdGlvbiAoZGlyKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdwcm9jZXNzLmNoZGlyIGlzIG5vdCBzdXBwb3J0ZWQnKTtcbn07XG5wcm9jZXNzLnVtYXNrID0gZnVuY3Rpb24oKSB7IHJldHVybiAwOyB9O1xuIiwiLy8gQ29weXJpZ2h0IEpveWVudCwgSW5jLiBhbmQgb3RoZXIgTm9kZSBjb250cmlidXRvcnMuXG4vL1xuLy8gUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBvZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGFcbi8vIGNvcHkgb2YgdGhpcyBzb2Z0d2FyZSBhbmQgYXNzb2NpYXRlZCBkb2N1bWVudGF0aW9uIGZpbGVzICh0aGVcbi8vIFwiU29mdHdhcmVcIiksIHRvIGRlYWwgaW4gdGhlIFNvZnR3YXJlIHdpdGhvdXQgcmVzdHJpY3Rpb24sIGluY2x1ZGluZ1xuLy8gd2l0aG91dCBsaW1pdGF0aW9uIHRoZSByaWdodHMgdG8gdXNlLCBjb3B5LCBtb2RpZnksIG1lcmdlLCBwdWJsaXNoLFxuLy8gZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGwgY29waWVzIG9mIHRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdFxuLy8gcGVyc29ucyB0byB3aG9tIHRoZSBTb2Z0d2FyZSBpcyBmdXJuaXNoZWQgdG8gZG8gc28sIHN1YmplY3QgdG8gdGhlXG4vLyBmb2xsb3dpbmcgY29uZGl0aW9uczpcbi8vXG4vLyBUaGUgYWJvdmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGljZSBzaGFsbCBiZSBpbmNsdWRlZFxuLy8gaW4gYWxsIGNvcGllcyBvciBzdWJzdGFudGlhbCBwb3J0aW9ucyBvZiB0aGUgU29mdHdhcmUuXG4vL1xuLy8gVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEIFwiQVMgSVNcIiwgV0lUSE9VVCBXQVJSQU5UWSBPRiBBTlkgS0lORCwgRVhQUkVTU1xuLy8gT1IgSU1QTElFRCwgSU5DTFVESU5HIEJVVCBOT1QgTElNSVRFRCBUTyBUSEUgV0FSUkFOVElFUyBPRlxuLy8gTUVSQ0hBTlRBQklMSVRZLCBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklOR0VNRU5ULiBJTlxuLy8gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUlMgT1IgQ09QWVJJR0hUIEhPTERFUlMgQkUgTElBQkxFIEZPUiBBTlkgQ0xBSU0sXG4vLyBEQU1BR0VTIE9SIE9USEVSIExJQUJJTElUWSwgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIFRPUlQgT1Jcbi8vIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLCBPVVQgT0YgT1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEVcbi8vIFVTRSBPUiBPVEhFUiBERUFMSU5HUyBJTiBUSEUgU09GVFdBUkUuXG5cbid1c2Ugc3RyaWN0JztcblxuLy8gSWYgb2JqLmhhc093blByb3BlcnR5IGhhcyBiZWVuIG92ZXJyaWRkZW4sIHRoZW4gY2FsbGluZ1xuLy8gb2JqLmhhc093blByb3BlcnR5KHByb3ApIHdpbGwgYnJlYWsuXG4vLyBTZWU6IGh0dHBzOi8vZ2l0aHViLmNvbS9qb3llbnQvbm9kZS9pc3N1ZXMvMTcwN1xuZnVuY3Rpb24gaGFzT3duUHJvcGVydHkob2JqLCBwcm9wKSB7XG4gIHJldHVybiBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwob2JqLCBwcm9wKTtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbihxcywgc2VwLCBlcSwgb3B0aW9ucykge1xuICBzZXAgPSBzZXAgfHwgJyYnO1xuICBlcSA9IGVxIHx8ICc9JztcbiAgdmFyIG9iaiA9IHt9O1xuXG4gIGlmICh0eXBlb2YgcXMgIT09ICdzdHJpbmcnIHx8IHFzLmxlbmd0aCA9PT0gMCkge1xuICAgIHJldHVybiBvYmo7XG4gIH1cblxuICB2YXIgcmVnZXhwID0gL1xcKy9nO1xuICBxcyA9IHFzLnNwbGl0KHNlcCk7XG5cbiAgdmFyIG1heEtleXMgPSAxMDAwO1xuICBpZiAob3B0aW9ucyAmJiB0eXBlb2Ygb3B0aW9ucy5tYXhLZXlzID09PSAnbnVtYmVyJykge1xuICAgIG1heEtleXMgPSBvcHRpb25zLm1heEtleXM7XG4gIH1cblxuICB2YXIgbGVuID0gcXMubGVuZ3RoO1xuICAvLyBtYXhLZXlzIDw9IDAgbWVhbnMgdGhhdCB3ZSBzaG91bGQgbm90IGxpbWl0IGtleXMgY291bnRcbiAgaWYgKG1heEtleXMgPiAwICYmIGxlbiA+IG1heEtleXMpIHtcbiAgICBsZW4gPSBtYXhLZXlzO1xuICB9XG5cbiAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW47ICsraSkge1xuICAgIHZhciB4ID0gcXNbaV0ucmVwbGFjZShyZWdleHAsICclMjAnKSxcbiAgICAgICAgaWR4ID0geC5pbmRleE9mKGVxKSxcbiAgICAgICAga3N0ciwgdnN0ciwgaywgdjtcblxuICAgIGlmIChpZHggPj0gMCkge1xuICAgICAga3N0ciA9IHguc3Vic3RyKDAsIGlkeCk7XG4gICAgICB2c3RyID0geC5zdWJzdHIoaWR4ICsgMSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGtzdHIgPSB4O1xuICAgICAgdnN0ciA9ICcnO1xuICAgIH1cblxuICAgIGsgPSBkZWNvZGVVUklDb21wb25lbnQoa3N0cik7XG4gICAgdiA9IGRlY29kZVVSSUNvbXBvbmVudCh2c3RyKTtcblxuICAgIGlmICghaGFzT3duUHJvcGVydHkob2JqLCBrKSkge1xuICAgICAgb2JqW2tdID0gdjtcbiAgICB9IGVsc2UgaWYgKGlzQXJyYXkob2JqW2tdKSkge1xuICAgICAgb2JqW2tdLnB1c2godik7XG4gICAgfSBlbHNlIHtcbiAgICAgIG9ialtrXSA9IFtvYmpba10sIHZdO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBvYmo7XG59O1xuXG52YXIgaXNBcnJheSA9IEFycmF5LmlzQXJyYXkgfHwgZnVuY3Rpb24gKHhzKSB7XG4gIHJldHVybiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwoeHMpID09PSAnW29iamVjdCBBcnJheV0nO1xufTtcbiIsIi8vIENvcHlyaWdodCBKb3llbnQsIEluYy4gYW5kIG90aGVyIE5vZGUgY29udHJpYnV0b3JzLlxuLy9cbi8vIFBlcm1pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmluZyBhXG4vLyBjb3B5IG9mIHRoaXMgc29mdHdhcmUgYW5kIGFzc29jaWF0ZWQgZG9jdW1lbnRhdGlvbiBmaWxlcyAodGhlXG4vLyBcIlNvZnR3YXJlXCIpLCB0byBkZWFsIGluIHRoZSBTb2Z0d2FyZSB3aXRob3V0IHJlc3RyaWN0aW9uLCBpbmNsdWRpbmdcbi8vIHdpdGhvdXQgbGltaXRhdGlvbiB0aGUgcmlnaHRzIHRvIHVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwgcHVibGlzaCxcbi8vIGRpc3RyaWJ1dGUsIHN1YmxpY2Vuc2UsIGFuZC9vciBzZWxsIGNvcGllcyBvZiB0aGUgU29mdHdhcmUsIGFuZCB0byBwZXJtaXRcbi8vIHBlcnNvbnMgdG8gd2hvbSB0aGUgU29mdHdhcmUgaXMgZnVybmlzaGVkIHRvIGRvIHNvLCBzdWJqZWN0IHRvIHRoZVxuLy8gZm9sbG93aW5nIGNvbmRpdGlvbnM6XG4vL1xuLy8gVGhlIGFib3ZlIGNvcHlyaWdodCBub3RpY2UgYW5kIHRoaXMgcGVybWlzc2lvbiBub3RpY2Ugc2hhbGwgYmUgaW5jbHVkZWRcbi8vIGluIGFsbCBjb3BpZXMgb3Igc3Vic3RhbnRpYWwgcG9ydGlvbnMgb2YgdGhlIFNvZnR3YXJlLlxuLy9cbi8vIFRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCBcIkFTIElTXCIsIFdJVEhPVVQgV0FSUkFOVFkgT0YgQU5ZIEtJTkQsIEVYUFJFU1Ncbi8vIE9SIElNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0Zcbi8vIE1FUkNIQU5UQUJJTElUWSwgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UgQU5EIE5PTklORlJJTkdFTUVOVC4gSU5cbi8vIE5PIEVWRU5UIFNIQUxMIFRIRSBBVVRIT1JTIE9SIENPUFlSSUdIVCBIT0xERVJTIEJFIExJQUJMRSBGT1IgQU5ZIENMQUlNLFxuLy8gREFNQUdFUyBPUiBPVEhFUiBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SXG4vLyBPVEhFUldJU0UsIEFSSVNJTkcgRlJPTSwgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgU09GVFdBUkUgT1IgVEhFXG4vLyBVU0UgT1IgT1RIRVIgREVBTElOR1MgSU4gVEhFIFNPRlRXQVJFLlxuXG4ndXNlIHN0cmljdCc7XG5cbnZhciBzdHJpbmdpZnlQcmltaXRpdmUgPSBmdW5jdGlvbih2KSB7XG4gIHN3aXRjaCAodHlwZW9mIHYpIHtcbiAgICBjYXNlICdzdHJpbmcnOlxuICAgICAgcmV0dXJuIHY7XG5cbiAgICBjYXNlICdib29sZWFuJzpcbiAgICAgIHJldHVybiB2ID8gJ3RydWUnIDogJ2ZhbHNlJztcblxuICAgIGNhc2UgJ251bWJlcic6XG4gICAgICByZXR1cm4gaXNGaW5pdGUodikgPyB2IDogJyc7XG5cbiAgICBkZWZhdWx0OlxuICAgICAgcmV0dXJuICcnO1xuICB9XG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uKG9iaiwgc2VwLCBlcSwgbmFtZSkge1xuICBzZXAgPSBzZXAgfHwgJyYnO1xuICBlcSA9IGVxIHx8ICc9JztcbiAgaWYgKG9iaiA9PT0gbnVsbCkge1xuICAgIG9iaiA9IHVuZGVmaW5lZDtcbiAgfVxuXG4gIGlmICh0eXBlb2Ygb2JqID09PSAnb2JqZWN0Jykge1xuICAgIHJldHVybiBtYXAob2JqZWN0S2V5cyhvYmopLCBmdW5jdGlvbihrKSB7XG4gICAgICB2YXIga3MgPSBlbmNvZGVVUklDb21wb25lbnQoc3RyaW5naWZ5UHJpbWl0aXZlKGspKSArIGVxO1xuICAgICAgaWYgKGlzQXJyYXkob2JqW2tdKSkge1xuICAgICAgICByZXR1cm4gbWFwKG9ialtrXSwgZnVuY3Rpb24odikge1xuICAgICAgICAgIHJldHVybiBrcyArIGVuY29kZVVSSUNvbXBvbmVudChzdHJpbmdpZnlQcmltaXRpdmUodikpO1xuICAgICAgICB9KS5qb2luKHNlcCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4ga3MgKyBlbmNvZGVVUklDb21wb25lbnQoc3RyaW5naWZ5UHJpbWl0aXZlKG9ialtrXSkpO1xuICAgICAgfVxuICAgIH0pLmpvaW4oc2VwKTtcblxuICB9XG5cbiAgaWYgKCFuYW1lKSByZXR1cm4gJyc7XG4gIHJldHVybiBlbmNvZGVVUklDb21wb25lbnQoc3RyaW5naWZ5UHJpbWl0aXZlKG5hbWUpKSArIGVxICtcbiAgICAgICAgIGVuY29kZVVSSUNvbXBvbmVudChzdHJpbmdpZnlQcmltaXRpdmUob2JqKSk7XG59O1xuXG52YXIgaXNBcnJheSA9IEFycmF5LmlzQXJyYXkgfHwgZnVuY3Rpb24gKHhzKSB7XG4gIHJldHVybiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwoeHMpID09PSAnW29iamVjdCBBcnJheV0nO1xufTtcblxuZnVuY3Rpb24gbWFwICh4cywgZikge1xuICBpZiAoeHMubWFwKSByZXR1cm4geHMubWFwKGYpO1xuICB2YXIgcmVzID0gW107XG4gIGZvciAodmFyIGkgPSAwOyBpIDwgeHMubGVuZ3RoOyBpKyspIHtcbiAgICByZXMucHVzaChmKHhzW2ldLCBpKSk7XG4gIH1cbiAgcmV0dXJuIHJlcztcbn1cblxudmFyIG9iamVjdEtleXMgPSBPYmplY3Qua2V5cyB8fCBmdW5jdGlvbiAob2JqKSB7XG4gIHZhciByZXMgPSBbXTtcbiAgZm9yICh2YXIga2V5IGluIG9iaikge1xuICAgIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwob2JqLCBrZXkpKSByZXMucHVzaChrZXkpO1xuICB9XG4gIHJldHVybiByZXM7XG59O1xuIiwiJ3VzZSBzdHJpY3QnO1xuXG5leHBvcnRzLmRlY29kZSA9IGV4cG9ydHMucGFyc2UgPSByZXF1aXJlKCcuL2RlY29kZScpO1xuZXhwb3J0cy5lbmNvZGUgPSBleHBvcnRzLnN0cmluZ2lmeSA9IHJlcXVpcmUoJy4vZW5jb2RlJyk7XG4iLCJcbi8qKlxuICogUmVkdWNlIGBhcnJgIHdpdGggYGZuYC5cbiAqXG4gKiBAcGFyYW0ge0FycmF5fSBhcnJcbiAqIEBwYXJhbSB7RnVuY3Rpb259IGZuXG4gKiBAcGFyYW0ge01peGVkfSBpbml0aWFsXG4gKlxuICogVE9ETzogY29tYmF0aWJsZSBlcnJvciBoYW5kbGluZz9cbiAqL1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uKGFyciwgZm4sIGluaXRpYWwpeyAgXG4gIHZhciBpZHggPSAwO1xuICB2YXIgbGVuID0gYXJyLmxlbmd0aDtcbiAgdmFyIGN1cnIgPSBhcmd1bWVudHMubGVuZ3RoID09IDNcbiAgICA/IGluaXRpYWxcbiAgICA6IGFycltpZHgrK107XG5cbiAgd2hpbGUgKGlkeCA8IGxlbikge1xuICAgIGN1cnIgPSBmbi5jYWxsKG51bGwsIGN1cnIsIGFycltpZHhdLCArK2lkeCwgYXJyKTtcbiAgfVxuICBcbiAgcmV0dXJuIGN1cnI7XG59OyIsIid1c2Ugc3RyaWN0Jztcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKHN0cikge1xuXHR2YXIgaXNFeHRlbmRlZExlbmd0aFBhdGggPSAvXlxcXFxcXFxcXFw/XFxcXC8udGVzdChzdHIpO1xuXHR2YXIgaGFzTm9uQXNjaWkgPSAvW15cXHgwMC1cXHg4MF0rLy50ZXN0KHN0cik7XG5cblx0aWYgKGlzRXh0ZW5kZWRMZW5ndGhQYXRoIHx8IGhhc05vbkFzY2lpKSB7XG5cdFx0cmV0dXJuIHN0cjtcblx0fVxuXG5cdHJldHVybiBzdHIucmVwbGFjZSgvXFxcXC9nLCAnLycpO1xufTtcbiIsIi8qKlxuICogTW9kdWxlIGRlcGVuZGVuY2llcy5cbiAqL1xuXG52YXIgRW1pdHRlciA9IHJlcXVpcmUoJ2VtaXR0ZXInKTtcbnZhciByZWR1Y2UgPSByZXF1aXJlKCdyZWR1Y2UnKTtcbnZhciByZXF1ZXN0QmFzZSA9IHJlcXVpcmUoJy4vcmVxdWVzdC1iYXNlJyk7XG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL2lzLW9iamVjdCcpO1xuXG4vKipcbiAqIFJvb3QgcmVmZXJlbmNlIGZvciBpZnJhbWVzLlxuICovXG5cbnZhciByb290O1xuaWYgKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnKSB7IC8vIEJyb3dzZXIgd2luZG93XG4gIHJvb3QgPSB3aW5kb3c7XG59IGVsc2UgaWYgKHR5cGVvZiBzZWxmICE9PSAndW5kZWZpbmVkJykgeyAvLyBXZWIgV29ya2VyXG4gIHJvb3QgPSBzZWxmO1xufSBlbHNlIHsgLy8gT3RoZXIgZW52aXJvbm1lbnRzXG4gIHJvb3QgPSB0aGlzO1xufVxuXG4vKipcbiAqIE5vb3AuXG4gKi9cblxuZnVuY3Rpb24gbm9vcCgpe307XG5cbi8qKlxuICogQ2hlY2sgaWYgYG9iamAgaXMgYSBob3N0IG9iamVjdCxcbiAqIHdlIGRvbid0IHdhbnQgdG8gc2VyaWFsaXplIHRoZXNlIDopXG4gKlxuICogVE9ETzogZnV0dXJlIHByb29mLCBtb3ZlIHRvIGNvbXBvZW50IGxhbmRcbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gb2JqXG4gKiBAcmV0dXJuIHtCb29sZWFufVxuICogQGFwaSBwcml2YXRlXG4gKi9cblxuZnVuY3Rpb24gaXNIb3N0KG9iaikge1xuICB2YXIgc3RyID0ge30udG9TdHJpbmcuY2FsbChvYmopO1xuXG4gIHN3aXRjaCAoc3RyKSB7XG4gICAgY2FzZSAnW29iamVjdCBGaWxlXSc6XG4gICAgY2FzZSAnW29iamVjdCBCbG9iXSc6XG4gICAgY2FzZSAnW29iamVjdCBGb3JtRGF0YV0nOlxuICAgICAgcmV0dXJuIHRydWU7XG4gICAgZGVmYXVsdDpcbiAgICAgIHJldHVybiBmYWxzZTtcbiAgfVxufVxuXG4vKipcbiAqIEV4cG9zZSBgcmVxdWVzdGAuXG4gKi9cblxudmFyIHJlcXVlc3QgPSBtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vcmVxdWVzdCcpLmJpbmQobnVsbCwgUmVxdWVzdCk7XG5cbi8qKlxuICogRGV0ZXJtaW5lIFhIUi5cbiAqL1xuXG5yZXF1ZXN0LmdldFhIUiA9IGZ1bmN0aW9uICgpIHtcbiAgaWYgKHJvb3QuWE1MSHR0cFJlcXVlc3RcbiAgICAgICYmICghcm9vdC5sb2NhdGlvbiB8fCAnZmlsZTonICE9IHJvb3QubG9jYXRpb24ucHJvdG9jb2xcbiAgICAgICAgICB8fCAhcm9vdC5BY3RpdmVYT2JqZWN0KSkge1xuICAgIHJldHVybiBuZXcgWE1MSHR0cFJlcXVlc3Q7XG4gIH0gZWxzZSB7XG4gICAgdHJ5IHsgcmV0dXJuIG5ldyBBY3RpdmVYT2JqZWN0KCdNaWNyb3NvZnQuWE1MSFRUUCcpOyB9IGNhdGNoKGUpIHt9XG4gICAgdHJ5IHsgcmV0dXJuIG5ldyBBY3RpdmVYT2JqZWN0KCdNc3htbDIuWE1MSFRUUC42LjAnKTsgfSBjYXRjaChlKSB7fVxuICAgIHRyeSB7IHJldHVybiBuZXcgQWN0aXZlWE9iamVjdCgnTXN4bWwyLlhNTEhUVFAuMy4wJyk7IH0gY2F0Y2goZSkge31cbiAgICB0cnkgeyByZXR1cm4gbmV3IEFjdGl2ZVhPYmplY3QoJ01zeG1sMi5YTUxIVFRQJyk7IH0gY2F0Y2goZSkge31cbiAgfVxuICByZXR1cm4gZmFsc2U7XG59O1xuXG4vKipcbiAqIFJlbW92ZXMgbGVhZGluZyBhbmQgdHJhaWxpbmcgd2hpdGVzcGFjZSwgYWRkZWQgdG8gc3VwcG9ydCBJRS5cbiAqXG4gKiBAcGFyYW0ge1N0cmluZ30gc1xuICogQHJldHVybiB7U3RyaW5nfVxuICogQGFwaSBwcml2YXRlXG4gKi9cblxudmFyIHRyaW0gPSAnJy50cmltXG4gID8gZnVuY3Rpb24ocykgeyByZXR1cm4gcy50cmltKCk7IH1cbiAgOiBmdW5jdGlvbihzKSB7IHJldHVybiBzLnJlcGxhY2UoLyheXFxzKnxcXHMqJCkvZywgJycpOyB9O1xuXG4vKipcbiAqIFNlcmlhbGl6ZSB0aGUgZ2l2ZW4gYG9iamAuXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IG9ialxuICogQHJldHVybiB7U3RyaW5nfVxuICogQGFwaSBwcml2YXRlXG4gKi9cblxuZnVuY3Rpb24gc2VyaWFsaXplKG9iaikge1xuICBpZiAoIWlzT2JqZWN0KG9iaikpIHJldHVybiBvYmo7XG4gIHZhciBwYWlycyA9IFtdO1xuICBmb3IgKHZhciBrZXkgaW4gb2JqKSB7XG4gICAgaWYgKG51bGwgIT0gb2JqW2tleV0pIHtcbiAgICAgIHB1c2hFbmNvZGVkS2V5VmFsdWVQYWlyKHBhaXJzLCBrZXksIG9ialtrZXldKTtcbiAgICAgICAgfVxuICAgICAgfVxuICByZXR1cm4gcGFpcnMuam9pbignJicpO1xufVxuXG4vKipcbiAqIEhlbHBzICdzZXJpYWxpemUnIHdpdGggc2VyaWFsaXppbmcgYXJyYXlzLlxuICogTXV0YXRlcyB0aGUgcGFpcnMgYXJyYXkuXG4gKlxuICogQHBhcmFtIHtBcnJheX0gcGFpcnNcbiAqIEBwYXJhbSB7U3RyaW5nfSBrZXlcbiAqIEBwYXJhbSB7TWl4ZWR9IHZhbFxuICovXG5cbmZ1bmN0aW9uIHB1c2hFbmNvZGVkS2V5VmFsdWVQYWlyKHBhaXJzLCBrZXksIHZhbCkge1xuICBpZiAoQXJyYXkuaXNBcnJheSh2YWwpKSB7XG4gICAgcmV0dXJuIHZhbC5mb3JFYWNoKGZ1bmN0aW9uKHYpIHtcbiAgICAgIHB1c2hFbmNvZGVkS2V5VmFsdWVQYWlyKHBhaXJzLCBrZXksIHYpO1xuICAgIH0pO1xuICB9XG4gIHBhaXJzLnB1c2goZW5jb2RlVVJJQ29tcG9uZW50KGtleSlcbiAgICArICc9JyArIGVuY29kZVVSSUNvbXBvbmVudCh2YWwpKTtcbn1cblxuLyoqXG4gKiBFeHBvc2Ugc2VyaWFsaXphdGlvbiBtZXRob2QuXG4gKi9cblxuIHJlcXVlc3Quc2VyaWFsaXplT2JqZWN0ID0gc2VyaWFsaXplO1xuXG4gLyoqXG4gICogUGFyc2UgdGhlIGdpdmVuIHgtd3d3LWZvcm0tdXJsZW5jb2RlZCBgc3RyYC5cbiAgKlxuICAqIEBwYXJhbSB7U3RyaW5nfSBzdHJcbiAgKiBAcmV0dXJuIHtPYmplY3R9XG4gICogQGFwaSBwcml2YXRlXG4gICovXG5cbmZ1bmN0aW9uIHBhcnNlU3RyaW5nKHN0cikge1xuICB2YXIgb2JqID0ge307XG4gIHZhciBwYWlycyA9IHN0ci5zcGxpdCgnJicpO1xuICB2YXIgcGFydHM7XG4gIHZhciBwYWlyO1xuXG4gIGZvciAodmFyIGkgPSAwLCBsZW4gPSBwYWlycy5sZW5ndGg7IGkgPCBsZW47ICsraSkge1xuICAgIHBhaXIgPSBwYWlyc1tpXTtcbiAgICBwYXJ0cyA9IHBhaXIuc3BsaXQoJz0nKTtcbiAgICBvYmpbZGVjb2RlVVJJQ29tcG9uZW50KHBhcnRzWzBdKV0gPSBkZWNvZGVVUklDb21wb25lbnQocGFydHNbMV0pO1xuICB9XG5cbiAgcmV0dXJuIG9iajtcbn1cblxuLyoqXG4gKiBFeHBvc2UgcGFyc2VyLlxuICovXG5cbnJlcXVlc3QucGFyc2VTdHJpbmcgPSBwYXJzZVN0cmluZztcblxuLyoqXG4gKiBEZWZhdWx0IE1JTUUgdHlwZSBtYXAuXG4gKlxuICogICAgIHN1cGVyYWdlbnQudHlwZXMueG1sID0gJ2FwcGxpY2F0aW9uL3htbCc7XG4gKlxuICovXG5cbnJlcXVlc3QudHlwZXMgPSB7XG4gIGh0bWw6ICd0ZXh0L2h0bWwnLFxuICBqc29uOiAnYXBwbGljYXRpb24vanNvbicsXG4gIHhtbDogJ2FwcGxpY2F0aW9uL3htbCcsXG4gIHVybGVuY29kZWQ6ICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnLFxuICAnZm9ybSc6ICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnLFxuICAnZm9ybS1kYXRhJzogJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZCdcbn07XG5cbi8qKlxuICogRGVmYXVsdCBzZXJpYWxpemF0aW9uIG1hcC5cbiAqXG4gKiAgICAgc3VwZXJhZ2VudC5zZXJpYWxpemVbJ2FwcGxpY2F0aW9uL3htbCddID0gZnVuY3Rpb24ob2JqKXtcbiAqICAgICAgIHJldHVybiAnZ2VuZXJhdGVkIHhtbCBoZXJlJztcbiAqICAgICB9O1xuICpcbiAqL1xuXG4gcmVxdWVzdC5zZXJpYWxpemUgPSB7XG4gICAnYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkJzogc2VyaWFsaXplLFxuICAgJ2FwcGxpY2F0aW9uL2pzb24nOiBKU09OLnN0cmluZ2lmeVxuIH07XG5cbiAvKipcbiAgKiBEZWZhdWx0IHBhcnNlcnMuXG4gICpcbiAgKiAgICAgc3VwZXJhZ2VudC5wYXJzZVsnYXBwbGljYXRpb24veG1sJ10gPSBmdW5jdGlvbihzdHIpe1xuICAqICAgICAgIHJldHVybiB7IG9iamVjdCBwYXJzZWQgZnJvbSBzdHIgfTtcbiAgKiAgICAgfTtcbiAgKlxuICAqL1xuXG5yZXF1ZXN0LnBhcnNlID0ge1xuICAnYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkJzogcGFyc2VTdHJpbmcsXG4gICdhcHBsaWNhdGlvbi9qc29uJzogSlNPTi5wYXJzZVxufTtcblxuLyoqXG4gKiBQYXJzZSB0aGUgZ2l2ZW4gaGVhZGVyIGBzdHJgIGludG9cbiAqIGFuIG9iamVjdCBjb250YWluaW5nIHRoZSBtYXBwZWQgZmllbGRzLlxuICpcbiAqIEBwYXJhbSB7U3RyaW5nfSBzdHJcbiAqIEByZXR1cm4ge09iamVjdH1cbiAqIEBhcGkgcHJpdmF0ZVxuICovXG5cbmZ1bmN0aW9uIHBhcnNlSGVhZGVyKHN0cikge1xuICB2YXIgbGluZXMgPSBzdHIuc3BsaXQoL1xccj9cXG4vKTtcbiAgdmFyIGZpZWxkcyA9IHt9O1xuICB2YXIgaW5kZXg7XG4gIHZhciBsaW5lO1xuICB2YXIgZmllbGQ7XG4gIHZhciB2YWw7XG5cbiAgbGluZXMucG9wKCk7IC8vIHRyYWlsaW5nIENSTEZcblxuICBmb3IgKHZhciBpID0gMCwgbGVuID0gbGluZXMubGVuZ3RoOyBpIDwgbGVuOyArK2kpIHtcbiAgICBsaW5lID0gbGluZXNbaV07XG4gICAgaW5kZXggPSBsaW5lLmluZGV4T2YoJzonKTtcbiAgICBmaWVsZCA9IGxpbmUuc2xpY2UoMCwgaW5kZXgpLnRvTG93ZXJDYXNlKCk7XG4gICAgdmFsID0gdHJpbShsaW5lLnNsaWNlKGluZGV4ICsgMSkpO1xuICAgIGZpZWxkc1tmaWVsZF0gPSB2YWw7XG4gIH1cblxuICByZXR1cm4gZmllbGRzO1xufVxuXG4vKipcbiAqIENoZWNrIGlmIGBtaW1lYCBpcyBqc29uIG9yIGhhcyAranNvbiBzdHJ1Y3R1cmVkIHN5bnRheCBzdWZmaXguXG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IG1pbWVcbiAqIEByZXR1cm4ge0Jvb2xlYW59XG4gKiBAYXBpIHByaXZhdGVcbiAqL1xuXG5mdW5jdGlvbiBpc0pTT04obWltZSkge1xuICByZXR1cm4gL1tcXC8rXWpzb25cXGIvLnRlc3QobWltZSk7XG59XG5cbi8qKlxuICogUmV0dXJuIHRoZSBtaW1lIHR5cGUgZm9yIHRoZSBnaXZlbiBgc3RyYC5cbiAqXG4gKiBAcGFyYW0ge1N0cmluZ30gc3RyXG4gKiBAcmV0dXJuIHtTdHJpbmd9XG4gKiBAYXBpIHByaXZhdGVcbiAqL1xuXG5mdW5jdGlvbiB0eXBlKHN0cil7XG4gIHJldHVybiBzdHIuc3BsaXQoLyAqOyAqLykuc2hpZnQoKTtcbn07XG5cbi8qKlxuICogUmV0dXJuIGhlYWRlciBmaWVsZCBwYXJhbWV0ZXJzLlxuICpcbiAqIEBwYXJhbSB7U3RyaW5nfSBzdHJcbiAqIEByZXR1cm4ge09iamVjdH1cbiAqIEBhcGkgcHJpdmF0ZVxuICovXG5cbmZ1bmN0aW9uIHBhcmFtcyhzdHIpe1xuICByZXR1cm4gcmVkdWNlKHN0ci5zcGxpdCgvICo7ICovKSwgZnVuY3Rpb24ob2JqLCBzdHIpe1xuICAgIHZhciBwYXJ0cyA9IHN0ci5zcGxpdCgvICo9ICovKVxuICAgICAgLCBrZXkgPSBwYXJ0cy5zaGlmdCgpXG4gICAgICAsIHZhbCA9IHBhcnRzLnNoaWZ0KCk7XG5cbiAgICBpZiAoa2V5ICYmIHZhbCkgb2JqW2tleV0gPSB2YWw7XG4gICAgcmV0dXJuIG9iajtcbiAgfSwge30pO1xufTtcblxuLyoqXG4gKiBJbml0aWFsaXplIGEgbmV3IGBSZXNwb25zZWAgd2l0aCB0aGUgZ2l2ZW4gYHhocmAuXG4gKlxuICogIC0gc2V0IGZsYWdzICgub2ssIC5lcnJvciwgZXRjKVxuICogIC0gcGFyc2UgaGVhZGVyXG4gKlxuICogRXhhbXBsZXM6XG4gKlxuICogIEFsaWFzaW5nIGBzdXBlcmFnZW50YCBhcyBgcmVxdWVzdGAgaXMgbmljZTpcbiAqXG4gKiAgICAgIHJlcXVlc3QgPSBzdXBlcmFnZW50O1xuICpcbiAqICBXZSBjYW4gdXNlIHRoZSBwcm9taXNlLWxpa2UgQVBJLCBvciBwYXNzIGNhbGxiYWNrczpcbiAqXG4gKiAgICAgIHJlcXVlc3QuZ2V0KCcvJykuZW5kKGZ1bmN0aW9uKHJlcyl7fSk7XG4gKiAgICAgIHJlcXVlc3QuZ2V0KCcvJywgZnVuY3Rpb24ocmVzKXt9KTtcbiAqXG4gKiAgU2VuZGluZyBkYXRhIGNhbiBiZSBjaGFpbmVkOlxuICpcbiAqICAgICAgcmVxdWVzdFxuICogICAgICAgIC5wb3N0KCcvdXNlcicpXG4gKiAgICAgICAgLnNlbmQoeyBuYW1lOiAndGonIH0pXG4gKiAgICAgICAgLmVuZChmdW5jdGlvbihyZXMpe30pO1xuICpcbiAqICBPciBwYXNzZWQgdG8gYC5zZW5kKClgOlxuICpcbiAqICAgICAgcmVxdWVzdFxuICogICAgICAgIC5wb3N0KCcvdXNlcicpXG4gKiAgICAgICAgLnNlbmQoeyBuYW1lOiAndGonIH0sIGZ1bmN0aW9uKHJlcyl7fSk7XG4gKlxuICogIE9yIHBhc3NlZCB0byBgLnBvc3QoKWA6XG4gKlxuICogICAgICByZXF1ZXN0XG4gKiAgICAgICAgLnBvc3QoJy91c2VyJywgeyBuYW1lOiAndGonIH0pXG4gKiAgICAgICAgLmVuZChmdW5jdGlvbihyZXMpe30pO1xuICpcbiAqIE9yIGZ1cnRoZXIgcmVkdWNlZCB0byBhIHNpbmdsZSBjYWxsIGZvciBzaW1wbGUgY2FzZXM6XG4gKlxuICogICAgICByZXF1ZXN0XG4gKiAgICAgICAgLnBvc3QoJy91c2VyJywgeyBuYW1lOiAndGonIH0sIGZ1bmN0aW9uKHJlcyl7fSk7XG4gKlxuICogQHBhcmFtIHtYTUxIVFRQUmVxdWVzdH0geGhyXG4gKiBAcGFyYW0ge09iamVjdH0gb3B0aW9uc1xuICogQGFwaSBwcml2YXRlXG4gKi9cblxuZnVuY3Rpb24gUmVzcG9uc2UocmVxLCBvcHRpb25zKSB7XG4gIG9wdGlvbnMgPSBvcHRpb25zIHx8IHt9O1xuICB0aGlzLnJlcSA9IHJlcTtcbiAgdGhpcy54aHIgPSB0aGlzLnJlcS54aHI7XG4gIC8vIHJlc3BvbnNlVGV4dCBpcyBhY2Nlc3NpYmxlIG9ubHkgaWYgcmVzcG9uc2VUeXBlIGlzICcnIG9yICd0ZXh0JyBhbmQgb24gb2xkZXIgYnJvd3NlcnNcbiAgdGhpcy50ZXh0ID0gKCh0aGlzLnJlcS5tZXRob2QgIT0nSEVBRCcgJiYgKHRoaXMueGhyLnJlc3BvbnNlVHlwZSA9PT0gJycgfHwgdGhpcy54aHIucmVzcG9uc2VUeXBlID09PSAndGV4dCcpKSB8fCB0eXBlb2YgdGhpcy54aHIucmVzcG9uc2VUeXBlID09PSAndW5kZWZpbmVkJylcbiAgICAgPyB0aGlzLnhoci5yZXNwb25zZVRleHRcbiAgICAgOiBudWxsO1xuICB0aGlzLnN0YXR1c1RleHQgPSB0aGlzLnJlcS54aHIuc3RhdHVzVGV4dDtcbiAgdGhpcy5zZXRTdGF0dXNQcm9wZXJ0aWVzKHRoaXMueGhyLnN0YXR1cyk7XG4gIHRoaXMuaGVhZGVyID0gdGhpcy5oZWFkZXJzID0gcGFyc2VIZWFkZXIodGhpcy54aHIuZ2V0QWxsUmVzcG9uc2VIZWFkZXJzKCkpO1xuICAvLyBnZXRBbGxSZXNwb25zZUhlYWRlcnMgc29tZXRpbWVzIGZhbHNlbHkgcmV0dXJucyBcIlwiIGZvciBDT1JTIHJlcXVlc3RzLCBidXRcbiAgLy8gZ2V0UmVzcG9uc2VIZWFkZXIgc3RpbGwgd29ya3MuIHNvIHdlIGdldCBjb250ZW50LXR5cGUgZXZlbiBpZiBnZXR0aW5nXG4gIC8vIG90aGVyIGhlYWRlcnMgZmFpbHMuXG4gIHRoaXMuaGVhZGVyWydjb250ZW50LXR5cGUnXSA9IHRoaXMueGhyLmdldFJlc3BvbnNlSGVhZGVyKCdjb250ZW50LXR5cGUnKTtcbiAgdGhpcy5zZXRIZWFkZXJQcm9wZXJ0aWVzKHRoaXMuaGVhZGVyKTtcbiAgdGhpcy5ib2R5ID0gdGhpcy5yZXEubWV0aG9kICE9ICdIRUFEJ1xuICAgID8gdGhpcy5wYXJzZUJvZHkodGhpcy50ZXh0ID8gdGhpcy50ZXh0IDogdGhpcy54aHIucmVzcG9uc2UpXG4gICAgOiBudWxsO1xufVxuXG4vKipcbiAqIEdldCBjYXNlLWluc2Vuc2l0aXZlIGBmaWVsZGAgdmFsdWUuXG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IGZpZWxkXG4gKiBAcmV0dXJuIHtTdHJpbmd9XG4gKiBAYXBpIHB1YmxpY1xuICovXG5cblJlc3BvbnNlLnByb3RvdHlwZS5nZXQgPSBmdW5jdGlvbihmaWVsZCl7XG4gIHJldHVybiB0aGlzLmhlYWRlcltmaWVsZC50b0xvd2VyQ2FzZSgpXTtcbn07XG5cbi8qKlxuICogU2V0IGhlYWRlciByZWxhdGVkIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGAudHlwZWAgdGhlIGNvbnRlbnQgdHlwZSB3aXRob3V0IHBhcmFtc1xuICpcbiAqIEEgcmVzcG9uc2Ugb2YgXCJDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9dXRmLThcIlxuICogd2lsbCBwcm92aWRlIHlvdSB3aXRoIGEgYC50eXBlYCBvZiBcInRleHQvcGxhaW5cIi5cbiAqXG4gKiBAcGFyYW0ge09iamVjdH0gaGVhZGVyXG4gKiBAYXBpIHByaXZhdGVcbiAqL1xuXG5SZXNwb25zZS5wcm90b3R5cGUuc2V0SGVhZGVyUHJvcGVydGllcyA9IGZ1bmN0aW9uKGhlYWRlcil7XG4gIC8vIGNvbnRlbnQtdHlwZVxuICB2YXIgY3QgPSB0aGlzLmhlYWRlclsnY29udGVudC10eXBlJ10gfHwgJyc7XG4gIHRoaXMudHlwZSA9IHR5cGUoY3QpO1xuXG4gIC8vIHBhcmFtc1xuICB2YXIgb2JqID0gcGFyYW1zKGN0KTtcbiAgZm9yICh2YXIga2V5IGluIG9iaikgdGhpc1trZXldID0gb2JqW2tleV07XG59O1xuXG4vKipcbiAqIFBhcnNlIHRoZSBnaXZlbiBib2R5IGBzdHJgLlxuICpcbiAqIFVzZWQgZm9yIGF1dG8tcGFyc2luZyBvZiBib2RpZXMuIFBhcnNlcnNcbiAqIGFyZSBkZWZpbmVkIG9uIHRoZSBgc3VwZXJhZ2VudC5wYXJzZWAgb2JqZWN0LlxuICpcbiAqIEBwYXJhbSB7U3RyaW5nfSBzdHJcbiAqIEByZXR1cm4ge01peGVkfVxuICogQGFwaSBwcml2YXRlXG4gKi9cblxuUmVzcG9uc2UucHJvdG90eXBlLnBhcnNlQm9keSA9IGZ1bmN0aW9uKHN0cil7XG4gIHZhciBwYXJzZSA9IHJlcXVlc3QucGFyc2VbdGhpcy50eXBlXTtcbiAgaWYgKCFwYXJzZSAmJiBpc0pTT04odGhpcy50eXBlKSkge1xuICAgIHBhcnNlID0gcmVxdWVzdC5wYXJzZVsnYXBwbGljYXRpb24vanNvbiddO1xuICB9XG4gIHJldHVybiBwYXJzZSAmJiBzdHIgJiYgKHN0ci5sZW5ndGggfHwgc3RyIGluc3RhbmNlb2YgT2JqZWN0KVxuICAgID8gcGFyc2Uoc3RyKVxuICAgIDogbnVsbDtcbn07XG5cbi8qKlxuICogU2V0IGZsYWdzIHN1Y2ggYXMgYC5va2AgYmFzZWQgb24gYHN0YXR1c2AuXG4gKlxuICogRm9yIGV4YW1wbGUgYSAyeHggcmVzcG9uc2Ugd2lsbCBnaXZlIHlvdSBhIGAub2tgIG9mIF9fdHJ1ZV9fXG4gKiB3aGVyZWFzIDV4eCB3aWxsIGJlIF9fZmFsc2VfXyBhbmQgYC5lcnJvcmAgd2lsbCBiZSBfX3RydWVfXy4gVGhlXG4gKiBgLmNsaWVudEVycm9yYCBhbmQgYC5zZXJ2ZXJFcnJvcmAgYXJlIGFsc28gYXZhaWxhYmxlIHRvIGJlIG1vcmVcbiAqIHNwZWNpZmljLCBhbmQgYC5zdGF0dXNUeXBlYCBpcyB0aGUgY2xhc3Mgb2YgZXJyb3IgcmFuZ2luZyBmcm9tIDEuLjVcbiAqIHNvbWV0aW1lcyB1c2VmdWwgZm9yIG1hcHBpbmcgcmVzcG9uZCBjb2xvcnMgZXRjLlxuICpcbiAqIFwic3VnYXJcIiBwcm9wZXJ0aWVzIGFyZSBhbHNvIGRlZmluZWQgZm9yIGNvbW1vbiBjYXNlcy4gQ3VycmVudGx5IHByb3ZpZGluZzpcbiAqXG4gKiAgIC0gLm5vQ29udGVudFxuICogICAtIC5iYWRSZXF1ZXN0XG4gKiAgIC0gLnVuYXV0aG9yaXplZFxuICogICAtIC5ub3RBY2NlcHRhYmxlXG4gKiAgIC0gLm5vdEZvdW5kXG4gKlxuICogQHBhcmFtIHtOdW1iZXJ9IHN0YXR1c1xuICogQGFwaSBwcml2YXRlXG4gKi9cblxuUmVzcG9uc2UucHJvdG90eXBlLnNldFN0YXR1c1Byb3BlcnRpZXMgPSBmdW5jdGlvbihzdGF0dXMpe1xuICAvLyBoYW5kbGUgSUU5IGJ1ZzogaHR0cDovL3N0YWNrb3ZlcmZsb3cuY29tL3F1ZXN0aW9ucy8xMDA0Njk3Mi9tc2llLXJldHVybnMtc3RhdHVzLWNvZGUtb2YtMTIyMy1mb3ItYWpheC1yZXF1ZXN0XG4gIGlmIChzdGF0dXMgPT09IDEyMjMpIHtcbiAgICBzdGF0dXMgPSAyMDQ7XG4gIH1cblxuICB2YXIgdHlwZSA9IHN0YXR1cyAvIDEwMCB8IDA7XG5cbiAgLy8gc3RhdHVzIC8gY2xhc3NcbiAgdGhpcy5zdGF0dXMgPSB0aGlzLnN0YXR1c0NvZGUgPSBzdGF0dXM7XG4gIHRoaXMuc3RhdHVzVHlwZSA9IHR5cGU7XG5cbiAgLy8gYmFzaWNzXG4gIHRoaXMuaW5mbyA9IDEgPT0gdHlwZTtcbiAgdGhpcy5vayA9IDIgPT0gdHlwZTtcbiAgdGhpcy5jbGllbnRFcnJvciA9IDQgPT0gdHlwZTtcbiAgdGhpcy5zZXJ2ZXJFcnJvciA9IDUgPT0gdHlwZTtcbiAgdGhpcy5lcnJvciA9ICg0ID09IHR5cGUgfHwgNSA9PSB0eXBlKVxuICAgID8gdGhpcy50b0Vycm9yKClcbiAgICA6IGZhbHNlO1xuXG4gIC8vIHN1Z2FyXG4gIHRoaXMuYWNjZXB0ZWQgPSAyMDIgPT0gc3RhdHVzO1xuICB0aGlzLm5vQ29udGVudCA9IDIwNCA9PSBzdGF0dXM7XG4gIHRoaXMuYmFkUmVxdWVzdCA9IDQwMCA9PSBzdGF0dXM7XG4gIHRoaXMudW5hdXRob3JpemVkID0gNDAxID09IHN0YXR1cztcbiAgdGhpcy5ub3RBY2NlcHRhYmxlID0gNDA2ID09IHN0YXR1cztcbiAgdGhpcy5ub3RGb3VuZCA9IDQwNCA9PSBzdGF0dXM7XG4gIHRoaXMuZm9yYmlkZGVuID0gNDAzID09IHN0YXR1cztcbn07XG5cbi8qKlxuICogUmV0dXJuIGFuIGBFcnJvcmAgcmVwcmVzZW50YXRpdmUgb2YgdGhpcyByZXNwb25zZS5cbiAqXG4gKiBAcmV0dXJuIHtFcnJvcn1cbiAqIEBhcGkgcHVibGljXG4gKi9cblxuUmVzcG9uc2UucHJvdG90eXBlLnRvRXJyb3IgPSBmdW5jdGlvbigpe1xuICB2YXIgcmVxID0gdGhpcy5yZXE7XG4gIHZhciBtZXRob2QgPSByZXEubWV0aG9kO1xuICB2YXIgdXJsID0gcmVxLnVybDtcblxuICB2YXIgbXNnID0gJ2Nhbm5vdCAnICsgbWV0aG9kICsgJyAnICsgdXJsICsgJyAoJyArIHRoaXMuc3RhdHVzICsgJyknO1xuICB2YXIgZXJyID0gbmV3IEVycm9yKG1zZyk7XG4gIGVyci5zdGF0dXMgPSB0aGlzLnN0YXR1cztcbiAgZXJyLm1ldGhvZCA9IG1ldGhvZDtcbiAgZXJyLnVybCA9IHVybDtcblxuICByZXR1cm4gZXJyO1xufTtcblxuLyoqXG4gKiBFeHBvc2UgYFJlc3BvbnNlYC5cbiAqL1xuXG5yZXF1ZXN0LlJlc3BvbnNlID0gUmVzcG9uc2U7XG5cbi8qKlxuICogSW5pdGlhbGl6ZSBhIG5ldyBgUmVxdWVzdGAgd2l0aCB0aGUgZ2l2ZW4gYG1ldGhvZGAgYW5kIGB1cmxgLlxuICpcbiAqIEBwYXJhbSB7U3RyaW5nfSBtZXRob2RcbiAqIEBwYXJhbSB7U3RyaW5nfSB1cmxcbiAqIEBhcGkgcHVibGljXG4gKi9cblxuZnVuY3Rpb24gUmVxdWVzdChtZXRob2QsIHVybCkge1xuICB2YXIgc2VsZiA9IHRoaXM7XG4gIHRoaXMuX3F1ZXJ5ID0gdGhpcy5fcXVlcnkgfHwgW107XG4gIHRoaXMubWV0aG9kID0gbWV0aG9kO1xuICB0aGlzLnVybCA9IHVybDtcbiAgdGhpcy5oZWFkZXIgPSB7fTsgLy8gcHJlc2VydmVzIGhlYWRlciBuYW1lIGNhc2VcbiAgdGhpcy5faGVhZGVyID0ge307IC8vIGNvZXJjZXMgaGVhZGVyIG5hbWVzIHRvIGxvd2VyY2FzZVxuICB0aGlzLm9uKCdlbmQnLCBmdW5jdGlvbigpe1xuICAgIHZhciBlcnIgPSBudWxsO1xuICAgIHZhciByZXMgPSBudWxsO1xuXG4gICAgdHJ5IHtcbiAgICAgIHJlcyA9IG5ldyBSZXNwb25zZShzZWxmKTtcbiAgICB9IGNhdGNoKGUpIHtcbiAgICAgIGVyciA9IG5ldyBFcnJvcignUGFyc2VyIGlzIHVuYWJsZSB0byBwYXJzZSB0aGUgcmVzcG9uc2UnKTtcbiAgICAgIGVyci5wYXJzZSA9IHRydWU7XG4gICAgICBlcnIub3JpZ2luYWwgPSBlO1xuICAgICAgLy8gaXNzdWUgIzY3NTogcmV0dXJuIHRoZSByYXcgcmVzcG9uc2UgaWYgdGhlIHJlc3BvbnNlIHBhcnNpbmcgZmFpbHNcbiAgICAgIGVyci5yYXdSZXNwb25zZSA9IHNlbGYueGhyICYmIHNlbGYueGhyLnJlc3BvbnNlVGV4dCA/IHNlbGYueGhyLnJlc3BvbnNlVGV4dCA6IG51bGw7XG4gICAgICAvLyBpc3N1ZSAjODc2OiByZXR1cm4gdGhlIGh0dHAgc3RhdHVzIGNvZGUgaWYgdGhlIHJlc3BvbnNlIHBhcnNpbmcgZmFpbHNcbiAgICAgIGVyci5zdGF0dXNDb2RlID0gc2VsZi54aHIgJiYgc2VsZi54aHIuc3RhdHVzID8gc2VsZi54aHIuc3RhdHVzIDogbnVsbDtcbiAgICAgIHJldHVybiBzZWxmLmNhbGxiYWNrKGVycik7XG4gICAgfVxuXG4gICAgc2VsZi5lbWl0KCdyZXNwb25zZScsIHJlcyk7XG5cbiAgICBpZiAoZXJyKSB7XG4gICAgICByZXR1cm4gc2VsZi5jYWxsYmFjayhlcnIsIHJlcyk7XG4gICAgfVxuXG4gICAgaWYgKHJlcy5zdGF0dXMgPj0gMjAwICYmIHJlcy5zdGF0dXMgPCAzMDApIHtcbiAgICAgIHJldHVybiBzZWxmLmNhbGxiYWNrKGVyciwgcmVzKTtcbiAgICB9XG5cbiAgICB2YXIgbmV3X2VyciA9IG5ldyBFcnJvcihyZXMuc3RhdHVzVGV4dCB8fCAnVW5zdWNjZXNzZnVsIEhUVFAgcmVzcG9uc2UnKTtcbiAgICBuZXdfZXJyLm9yaWdpbmFsID0gZXJyO1xuICAgIG5ld19lcnIucmVzcG9uc2UgPSByZXM7XG4gICAgbmV3X2Vyci5zdGF0dXMgPSByZXMuc3RhdHVzO1xuXG4gICAgc2VsZi5jYWxsYmFjayhuZXdfZXJyLCByZXMpO1xuICB9KTtcbn1cblxuLyoqXG4gKiBNaXhpbiBgRW1pdHRlcmAgYW5kIGByZXF1ZXN0QmFzZWAuXG4gKi9cblxuRW1pdHRlcihSZXF1ZXN0LnByb3RvdHlwZSk7XG5mb3IgKHZhciBrZXkgaW4gcmVxdWVzdEJhc2UpIHtcbiAgUmVxdWVzdC5wcm90b3R5cGVba2V5XSA9IHJlcXVlc3RCYXNlW2tleV07XG59XG5cbi8qKlxuICogQWJvcnQgdGhlIHJlcXVlc3QsIGFuZCBjbGVhciBwb3RlbnRpYWwgdGltZW91dC5cbiAqXG4gKiBAcmV0dXJuIHtSZXF1ZXN0fVxuICogQGFwaSBwdWJsaWNcbiAqL1xuXG5SZXF1ZXN0LnByb3RvdHlwZS5hYm9ydCA9IGZ1bmN0aW9uKCl7XG4gIGlmICh0aGlzLmFib3J0ZWQpIHJldHVybjtcbiAgdGhpcy5hYm9ydGVkID0gdHJ1ZTtcbiAgdGhpcy54aHIuYWJvcnQoKTtcbiAgdGhpcy5jbGVhclRpbWVvdXQoKTtcbiAgdGhpcy5lbWl0KCdhYm9ydCcpO1xuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogU2V0IENvbnRlbnQtVHlwZSB0byBgdHlwZWAsIG1hcHBpbmcgdmFsdWVzIGZyb20gYHJlcXVlc3QudHlwZXNgLlxuICpcbiAqIEV4YW1wbGVzOlxuICpcbiAqICAgICAgc3VwZXJhZ2VudC50eXBlcy54bWwgPSAnYXBwbGljYXRpb24veG1sJztcbiAqXG4gKiAgICAgIHJlcXVlc3QucG9zdCgnLycpXG4gKiAgICAgICAgLnR5cGUoJ3htbCcpXG4gKiAgICAgICAgLnNlbmQoeG1sc3RyaW5nKVxuICogICAgICAgIC5lbmQoY2FsbGJhY2spO1xuICpcbiAqICAgICAgcmVxdWVzdC5wb3N0KCcvJylcbiAqICAgICAgICAudHlwZSgnYXBwbGljYXRpb24veG1sJylcbiAqICAgICAgICAuc2VuZCh4bWxzdHJpbmcpXG4gKiAgICAgICAgLmVuZChjYWxsYmFjayk7XG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IHR5cGVcbiAqIEByZXR1cm4ge1JlcXVlc3R9IGZvciBjaGFpbmluZ1xuICogQGFwaSBwdWJsaWNcbiAqL1xuXG5SZXF1ZXN0LnByb3RvdHlwZS50eXBlID0gZnVuY3Rpb24odHlwZSl7XG4gIHRoaXMuc2V0KCdDb250ZW50LVR5cGUnLCByZXF1ZXN0LnR5cGVzW3R5cGVdIHx8IHR5cGUpO1xuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogU2V0IHJlc3BvbnNlVHlwZSB0byBgdmFsYC4gUHJlc2VudGx5IHZhbGlkIHJlc3BvbnNlVHlwZXMgYXJlICdibG9iJyBhbmQgXG4gKiAnYXJyYXlidWZmZXInLlxuICpcbiAqIEV4YW1wbGVzOlxuICpcbiAqICAgICAgcmVxLmdldCgnLycpXG4gKiAgICAgICAgLnJlc3BvbnNlVHlwZSgnYmxvYicpXG4gKiAgICAgICAgLmVuZChjYWxsYmFjayk7XG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IHZhbFxuICogQHJldHVybiB7UmVxdWVzdH0gZm9yIGNoYWluaW5nXG4gKiBAYXBpIHB1YmxpY1xuICovXG5cblJlcXVlc3QucHJvdG90eXBlLnJlc3BvbnNlVHlwZSA9IGZ1bmN0aW9uKHZhbCl7XG4gIHRoaXMuX3Jlc3BvbnNlVHlwZSA9IHZhbDtcbiAgcmV0dXJuIHRoaXM7XG59O1xuXG4vKipcbiAqIFNldCBBY2NlcHQgdG8gYHR5cGVgLCBtYXBwaW5nIHZhbHVlcyBmcm9tIGByZXF1ZXN0LnR5cGVzYC5cbiAqXG4gKiBFeGFtcGxlczpcbiAqXG4gKiAgICAgIHN1cGVyYWdlbnQudHlwZXMuanNvbiA9ICdhcHBsaWNhdGlvbi9qc29uJztcbiAqXG4gKiAgICAgIHJlcXVlc3QuZ2V0KCcvYWdlbnQnKVxuICogICAgICAgIC5hY2NlcHQoJ2pzb24nKVxuICogICAgICAgIC5lbmQoY2FsbGJhY2spO1xuICpcbiAqICAgICAgcmVxdWVzdC5nZXQoJy9hZ2VudCcpXG4gKiAgICAgICAgLmFjY2VwdCgnYXBwbGljYXRpb24vanNvbicpXG4gKiAgICAgICAgLmVuZChjYWxsYmFjayk7XG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IGFjY2VwdFxuICogQHJldHVybiB7UmVxdWVzdH0gZm9yIGNoYWluaW5nXG4gKiBAYXBpIHB1YmxpY1xuICovXG5cblJlcXVlc3QucHJvdG90eXBlLmFjY2VwdCA9IGZ1bmN0aW9uKHR5cGUpe1xuICB0aGlzLnNldCgnQWNjZXB0JywgcmVxdWVzdC50eXBlc1t0eXBlXSB8fCB0eXBlKTtcbiAgcmV0dXJuIHRoaXM7XG59O1xuXG4vKipcbiAqIFNldCBBdXRob3JpemF0aW9uIGZpZWxkIHZhbHVlIHdpdGggYHVzZXJgIGFuZCBgcGFzc2AuXG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IHVzZXJcbiAqIEBwYXJhbSB7U3RyaW5nfSBwYXNzXG4gKiBAcGFyYW0ge09iamVjdH0gb3B0aW9ucyB3aXRoICd0eXBlJyBwcm9wZXJ0eSAnYXV0bycgb3IgJ2Jhc2ljJyAoZGVmYXVsdCAnYmFzaWMnKVxuICogQHJldHVybiB7UmVxdWVzdH0gZm9yIGNoYWluaW5nXG4gKiBAYXBpIHB1YmxpY1xuICovXG5cblJlcXVlc3QucHJvdG90eXBlLmF1dGggPSBmdW5jdGlvbih1c2VyLCBwYXNzLCBvcHRpb25zKXtcbiAgaWYgKCFvcHRpb25zKSB7XG4gICAgb3B0aW9ucyA9IHtcbiAgICAgIHR5cGU6ICdiYXNpYydcbiAgICB9XG4gIH1cblxuICBzd2l0Y2ggKG9wdGlvbnMudHlwZSkge1xuICAgIGNhc2UgJ2Jhc2ljJzpcbiAgICAgIHZhciBzdHIgPSBidG9hKHVzZXIgKyAnOicgKyBwYXNzKTtcbiAgICAgIHRoaXMuc2V0KCdBdXRob3JpemF0aW9uJywgJ0Jhc2ljICcgKyBzdHIpO1xuICAgIGJyZWFrO1xuXG4gICAgY2FzZSAnYXV0byc6XG4gICAgICB0aGlzLnVzZXJuYW1lID0gdXNlcjtcbiAgICAgIHRoaXMucGFzc3dvcmQgPSBwYXNzO1xuICAgIGJyZWFrO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4qIEFkZCBxdWVyeS1zdHJpbmcgYHZhbGAuXG4qXG4qIEV4YW1wbGVzOlxuKlxuKiAgIHJlcXVlc3QuZ2V0KCcvc2hvZXMnKVxuKiAgICAgLnF1ZXJ5KCdzaXplPTEwJylcbiogICAgIC5xdWVyeSh7IGNvbG9yOiAnYmx1ZScgfSlcbipcbiogQHBhcmFtIHtPYmplY3R8U3RyaW5nfSB2YWxcbiogQHJldHVybiB7UmVxdWVzdH0gZm9yIGNoYWluaW5nXG4qIEBhcGkgcHVibGljXG4qL1xuXG5SZXF1ZXN0LnByb3RvdHlwZS5xdWVyeSA9IGZ1bmN0aW9uKHZhbCl7XG4gIGlmICgnc3RyaW5nJyAhPSB0eXBlb2YgdmFsKSB2YWwgPSBzZXJpYWxpemUodmFsKTtcbiAgaWYgKHZhbCkgdGhpcy5fcXVlcnkucHVzaCh2YWwpO1xuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogUXVldWUgdGhlIGdpdmVuIGBmaWxlYCBhcyBhbiBhdHRhY2htZW50IHRvIHRoZSBzcGVjaWZpZWQgYGZpZWxkYCxcbiAqIHdpdGggb3B0aW9uYWwgYGZpbGVuYW1lYC5cbiAqXG4gKiBgYGAganNcbiAqIHJlcXVlc3QucG9zdCgnL3VwbG9hZCcpXG4gKiAgIC5hdHRhY2gobmV3IEJsb2IoWyc8YSBpZD1cImFcIj48YiBpZD1cImJcIj5oZXkhPC9iPjwvYT4nXSwgeyB0eXBlOiBcInRleHQvaHRtbFwifSkpXG4gKiAgIC5lbmQoY2FsbGJhY2spO1xuICogYGBgXG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IGZpZWxkXG4gKiBAcGFyYW0ge0Jsb2J8RmlsZX0gZmlsZVxuICogQHBhcmFtIHtTdHJpbmd9IGZpbGVuYW1lXG4gKiBAcmV0dXJuIHtSZXF1ZXN0fSBmb3IgY2hhaW5pbmdcbiAqIEBhcGkgcHVibGljXG4gKi9cblxuUmVxdWVzdC5wcm90b3R5cGUuYXR0YWNoID0gZnVuY3Rpb24oZmllbGQsIGZpbGUsIGZpbGVuYW1lKXtcbiAgdGhpcy5fZ2V0Rm9ybURhdGEoKS5hcHBlbmQoZmllbGQsIGZpbGUsIGZpbGVuYW1lIHx8IGZpbGUubmFtZSk7XG4gIHJldHVybiB0aGlzO1xufTtcblxuUmVxdWVzdC5wcm90b3R5cGUuX2dldEZvcm1EYXRhID0gZnVuY3Rpb24oKXtcbiAgaWYgKCF0aGlzLl9mb3JtRGF0YSkge1xuICAgIHRoaXMuX2Zvcm1EYXRhID0gbmV3IHJvb3QuRm9ybURhdGEoKTtcbiAgfVxuICByZXR1cm4gdGhpcy5fZm9ybURhdGE7XG59O1xuXG4vKipcbiAqIFNlbmQgYGRhdGFgIGFzIHRoZSByZXF1ZXN0IGJvZHksIGRlZmF1bHRpbmcgdGhlIGAudHlwZSgpYCB0byBcImpzb25cIiB3aGVuXG4gKiBhbiBvYmplY3QgaXMgZ2l2ZW4uXG4gKlxuICogRXhhbXBsZXM6XG4gKlxuICogICAgICAgLy8gbWFudWFsIGpzb25cbiAqICAgICAgIHJlcXVlc3QucG9zdCgnL3VzZXInKVxuICogICAgICAgICAudHlwZSgnanNvbicpXG4gKiAgICAgICAgIC5zZW5kKCd7XCJuYW1lXCI6XCJ0alwifScpXG4gKiAgICAgICAgIC5lbmQoY2FsbGJhY2spXG4gKlxuICogICAgICAgLy8gYXV0byBqc29uXG4gKiAgICAgICByZXF1ZXN0LnBvc3QoJy91c2VyJylcbiAqICAgICAgICAgLnNlbmQoeyBuYW1lOiAndGonIH0pXG4gKiAgICAgICAgIC5lbmQoY2FsbGJhY2spXG4gKlxuICogICAgICAgLy8gbWFudWFsIHgtd3d3LWZvcm0tdXJsZW5jb2RlZFxuICogICAgICAgcmVxdWVzdC5wb3N0KCcvdXNlcicpXG4gKiAgICAgICAgIC50eXBlKCdmb3JtJylcbiAqICAgICAgICAgLnNlbmQoJ25hbWU9dGonKVxuICogICAgICAgICAuZW5kKGNhbGxiYWNrKVxuICpcbiAqICAgICAgIC8vIGF1dG8geC13d3ctZm9ybS11cmxlbmNvZGVkXG4gKiAgICAgICByZXF1ZXN0LnBvc3QoJy91c2VyJylcbiAqICAgICAgICAgLnR5cGUoJ2Zvcm0nKVxuICogICAgICAgICAuc2VuZCh7IG5hbWU6ICd0aicgfSlcbiAqICAgICAgICAgLmVuZChjYWxsYmFjaylcbiAqXG4gKiAgICAgICAvLyBkZWZhdWx0cyB0byB4LXd3dy1mb3JtLXVybGVuY29kZWRcbiAgKiAgICAgIHJlcXVlc3QucG9zdCgnL3VzZXInKVxuICAqICAgICAgICAuc2VuZCgnbmFtZT10b2JpJylcbiAgKiAgICAgICAgLnNlbmQoJ3NwZWNpZXM9ZmVycmV0JylcbiAgKiAgICAgICAgLmVuZChjYWxsYmFjaylcbiAqXG4gKiBAcGFyYW0ge1N0cmluZ3xPYmplY3R9IGRhdGFcbiAqIEByZXR1cm4ge1JlcXVlc3R9IGZvciBjaGFpbmluZ1xuICogQGFwaSBwdWJsaWNcbiAqL1xuXG5SZXF1ZXN0LnByb3RvdHlwZS5zZW5kID0gZnVuY3Rpb24oZGF0YSl7XG4gIHZhciBvYmogPSBpc09iamVjdChkYXRhKTtcbiAgdmFyIHR5cGUgPSB0aGlzLl9oZWFkZXJbJ2NvbnRlbnQtdHlwZSddO1xuXG4gIC8vIG1lcmdlXG4gIGlmIChvYmogJiYgaXNPYmplY3QodGhpcy5fZGF0YSkpIHtcbiAgICBmb3IgKHZhciBrZXkgaW4gZGF0YSkge1xuICAgICAgdGhpcy5fZGF0YVtrZXldID0gZGF0YVtrZXldO1xuICAgIH1cbiAgfSBlbHNlIGlmICgnc3RyaW5nJyA9PSB0eXBlb2YgZGF0YSkge1xuICAgIGlmICghdHlwZSkgdGhpcy50eXBlKCdmb3JtJyk7XG4gICAgdHlwZSA9IHRoaXMuX2hlYWRlclsnY29udGVudC10eXBlJ107XG4gICAgaWYgKCdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnID09IHR5cGUpIHtcbiAgICAgIHRoaXMuX2RhdGEgPSB0aGlzLl9kYXRhXG4gICAgICAgID8gdGhpcy5fZGF0YSArICcmJyArIGRhdGFcbiAgICAgICAgOiBkYXRhO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLl9kYXRhID0gKHRoaXMuX2RhdGEgfHwgJycpICsgZGF0YTtcbiAgICB9XG4gIH0gZWxzZSB7XG4gICAgdGhpcy5fZGF0YSA9IGRhdGE7XG4gIH1cblxuICBpZiAoIW9iaiB8fCBpc0hvc3QoZGF0YSkpIHJldHVybiB0aGlzO1xuICBpZiAoIXR5cGUpIHRoaXMudHlwZSgnanNvbicpO1xuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogQGRlcHJlY2F0ZWRcbiAqL1xuUmVzcG9uc2UucHJvdG90eXBlLnBhcnNlID0gZnVuY3Rpb24gc2VyaWFsaXplKGZuKXtcbiAgaWYgKHJvb3QuY29uc29sZSkge1xuICAgIGNvbnNvbGUud2FybihcIkNsaWVudC1zaWRlIHBhcnNlKCkgbWV0aG9kIGhhcyBiZWVuIHJlbmFtZWQgdG8gc2VyaWFsaXplKCkuIFRoaXMgbWV0aG9kIGlzIG5vdCBjb21wYXRpYmxlIHdpdGggc3VwZXJhZ2VudCB2Mi4wXCIpO1xuICB9XG4gIHRoaXMuc2VyaWFsaXplKGZuKTtcbiAgcmV0dXJuIHRoaXM7XG59O1xuXG5SZXNwb25zZS5wcm90b3R5cGUuc2VyaWFsaXplID0gZnVuY3Rpb24gc2VyaWFsaXplKGZuKXtcbiAgdGhpcy5fcGFyc2VyID0gZm47XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBJbnZva2UgdGhlIGNhbGxiYWNrIHdpdGggYGVycmAgYW5kIGByZXNgXG4gKiBhbmQgaGFuZGxlIGFyaXR5IGNoZWNrLlxuICpcbiAqIEBwYXJhbSB7RXJyb3J9IGVyclxuICogQHBhcmFtIHtSZXNwb25zZX0gcmVzXG4gKiBAYXBpIHByaXZhdGVcbiAqL1xuXG5SZXF1ZXN0LnByb3RvdHlwZS5jYWxsYmFjayA9IGZ1bmN0aW9uKGVyciwgcmVzKXtcbiAgdmFyIGZuID0gdGhpcy5fY2FsbGJhY2s7XG4gIHRoaXMuY2xlYXJUaW1lb3V0KCk7XG4gIGZuKGVyciwgcmVzKTtcbn07XG5cbi8qKlxuICogSW52b2tlIGNhbGxiYWNrIHdpdGggeC1kb21haW4gZXJyb3IuXG4gKlxuICogQGFwaSBwcml2YXRlXG4gKi9cblxuUmVxdWVzdC5wcm90b3R5cGUuY3Jvc3NEb21haW5FcnJvciA9IGZ1bmN0aW9uKCl7XG4gIHZhciBlcnIgPSBuZXcgRXJyb3IoJ1JlcXVlc3QgaGFzIGJlZW4gdGVybWluYXRlZFxcblBvc3NpYmxlIGNhdXNlczogdGhlIG5ldHdvcmsgaXMgb2ZmbGluZSwgT3JpZ2luIGlzIG5vdCBhbGxvd2VkIGJ5IEFjY2Vzcy1Db250cm9sLUFsbG93LU9yaWdpbiwgdGhlIHBhZ2UgaXMgYmVpbmcgdW5sb2FkZWQsIGV0Yy4nKTtcbiAgZXJyLmNyb3NzRG9tYWluID0gdHJ1ZTtcblxuICBlcnIuc3RhdHVzID0gdGhpcy5zdGF0dXM7XG4gIGVyci5tZXRob2QgPSB0aGlzLm1ldGhvZDtcbiAgZXJyLnVybCA9IHRoaXMudXJsO1xuXG4gIHRoaXMuY2FsbGJhY2soZXJyKTtcbn07XG5cbi8qKlxuICogSW52b2tlIGNhbGxiYWNrIHdpdGggdGltZW91dCBlcnJvci5cbiAqXG4gKiBAYXBpIHByaXZhdGVcbiAqL1xuXG5SZXF1ZXN0LnByb3RvdHlwZS50aW1lb3V0RXJyb3IgPSBmdW5jdGlvbigpe1xuICB2YXIgdGltZW91dCA9IHRoaXMuX3RpbWVvdXQ7XG4gIHZhciBlcnIgPSBuZXcgRXJyb3IoJ3RpbWVvdXQgb2YgJyArIHRpbWVvdXQgKyAnbXMgZXhjZWVkZWQnKTtcbiAgZXJyLnRpbWVvdXQgPSB0aW1lb3V0O1xuICB0aGlzLmNhbGxiYWNrKGVycik7XG59O1xuXG4vKipcbiAqIEVuYWJsZSB0cmFuc21pc3Npb24gb2YgY29va2llcyB3aXRoIHgtZG9tYWluIHJlcXVlc3RzLlxuICpcbiAqIE5vdGUgdGhhdCBmb3IgdGhpcyB0byB3b3JrIHRoZSBvcmlnaW4gbXVzdCBub3QgYmVcbiAqIHVzaW5nIFwiQWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2luXCIgd2l0aCBhIHdpbGRjYXJkLFxuICogYW5kIGFsc28gbXVzdCBzZXQgXCJBY2Nlc3MtQ29udHJvbC1BbGxvdy1DcmVkZW50aWFsc1wiXG4gKiB0byBcInRydWVcIi5cbiAqXG4gKiBAYXBpIHB1YmxpY1xuICovXG5cblJlcXVlc3QucHJvdG90eXBlLndpdGhDcmVkZW50aWFscyA9IGZ1bmN0aW9uKCl7XG4gIHRoaXMuX3dpdGhDcmVkZW50aWFscyA9IHRydWU7XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBJbml0aWF0ZSByZXF1ZXN0LCBpbnZva2luZyBjYWxsYmFjayBgZm4ocmVzKWBcbiAqIHdpdGggYW4gaW5zdGFuY2VvZiBgUmVzcG9uc2VgLlxuICpcbiAqIEBwYXJhbSB7RnVuY3Rpb259IGZuXG4gKiBAcmV0dXJuIHtSZXF1ZXN0fSBmb3IgY2hhaW5pbmdcbiAqIEBhcGkgcHVibGljXG4gKi9cblxuUmVxdWVzdC5wcm90b3R5cGUuZW5kID0gZnVuY3Rpb24oZm4pe1xuICB2YXIgc2VsZiA9IHRoaXM7XG4gIHZhciB4aHIgPSB0aGlzLnhociA9IHJlcXVlc3QuZ2V0WEhSKCk7XG4gIHZhciBxdWVyeSA9IHRoaXMuX3F1ZXJ5LmpvaW4oJyYnKTtcbiAgdmFyIHRpbWVvdXQgPSB0aGlzLl90aW1lb3V0O1xuICB2YXIgZGF0YSA9IHRoaXMuX2Zvcm1EYXRhIHx8IHRoaXMuX2RhdGE7XG5cbiAgLy8gc3RvcmUgY2FsbGJhY2tcbiAgdGhpcy5fY2FsbGJhY2sgPSBmbiB8fCBub29wO1xuXG4gIC8vIHN0YXRlIGNoYW5nZVxuICB4aHIub25yZWFkeXN0YXRlY2hhbmdlID0gZnVuY3Rpb24oKXtcbiAgICBpZiAoNCAhPSB4aHIucmVhZHlTdGF0ZSkgcmV0dXJuO1xuXG4gICAgLy8gSW4gSUU5LCByZWFkcyB0byBhbnkgcHJvcGVydHkgKGUuZy4gc3RhdHVzKSBvZmYgb2YgYW4gYWJvcnRlZCBYSFIgd2lsbFxuICAgIC8vIHJlc3VsdCBpbiB0aGUgZXJyb3IgXCJDb3VsZCBub3QgY29tcGxldGUgdGhlIG9wZXJhdGlvbiBkdWUgdG8gZXJyb3IgYzAwYzAyM2ZcIlxuICAgIHZhciBzdGF0dXM7XG4gICAgdHJ5IHsgc3RhdHVzID0geGhyLnN0YXR1cyB9IGNhdGNoKGUpIHsgc3RhdHVzID0gMDsgfVxuXG4gICAgaWYgKDAgPT0gc3RhdHVzKSB7XG4gICAgICBpZiAoc2VsZi50aW1lZG91dCkgcmV0dXJuIHNlbGYudGltZW91dEVycm9yKCk7XG4gICAgICBpZiAoc2VsZi5hYm9ydGVkKSByZXR1cm47XG4gICAgICByZXR1cm4gc2VsZi5jcm9zc0RvbWFpbkVycm9yKCk7XG4gICAgfVxuICAgIHNlbGYuZW1pdCgnZW5kJyk7XG4gIH07XG5cbiAgLy8gcHJvZ3Jlc3NcbiAgdmFyIGhhbmRsZVByb2dyZXNzID0gZnVuY3Rpb24oZSl7XG4gICAgaWYgKGUudG90YWwgPiAwKSB7XG4gICAgICBlLnBlcmNlbnQgPSBlLmxvYWRlZCAvIGUudG90YWwgKiAxMDA7XG4gICAgfVxuICAgIGUuZGlyZWN0aW9uID0gJ2Rvd25sb2FkJztcbiAgICBzZWxmLmVtaXQoJ3Byb2dyZXNzJywgZSk7XG4gIH07XG4gIGlmICh0aGlzLmhhc0xpc3RlbmVycygncHJvZ3Jlc3MnKSkge1xuICAgIHhoci5vbnByb2dyZXNzID0gaGFuZGxlUHJvZ3Jlc3M7XG4gIH1cbiAgdHJ5IHtcbiAgICBpZiAoeGhyLnVwbG9hZCAmJiB0aGlzLmhhc0xpc3RlbmVycygncHJvZ3Jlc3MnKSkge1xuICAgICAgeGhyLnVwbG9hZC5vbnByb2dyZXNzID0gaGFuZGxlUHJvZ3Jlc3M7XG4gICAgfVxuICB9IGNhdGNoKGUpIHtcbiAgICAvLyBBY2Nlc3NpbmcgeGhyLnVwbG9hZCBmYWlscyBpbiBJRSBmcm9tIGEgd2ViIHdvcmtlciwgc28ganVzdCBwcmV0ZW5kIGl0IGRvZXNuJ3QgZXhpc3QuXG4gICAgLy8gUmVwb3J0ZWQgaGVyZTpcbiAgICAvLyBodHRwczovL2Nvbm5lY3QubWljcm9zb2Z0LmNvbS9JRS9mZWVkYmFjay9kZXRhaWxzLzgzNzI0NS94bWxodHRwcmVxdWVzdC11cGxvYWQtdGhyb3dzLWludmFsaWQtYXJndW1lbnQtd2hlbi11c2VkLWZyb20td2ViLXdvcmtlci1jb250ZXh0XG4gIH1cblxuICAvLyB0aW1lb3V0XG4gIGlmICh0aW1lb3V0ICYmICF0aGlzLl90aW1lcikge1xuICAgIHRoaXMuX3RpbWVyID0gc2V0VGltZW91dChmdW5jdGlvbigpe1xuICAgICAgc2VsZi50aW1lZG91dCA9IHRydWU7XG4gICAgICBzZWxmLmFib3J0KCk7XG4gICAgfSwgdGltZW91dCk7XG4gIH1cblxuICAvLyBxdWVyeXN0cmluZ1xuICBpZiAocXVlcnkpIHtcbiAgICBxdWVyeSA9IHJlcXVlc3Quc2VyaWFsaXplT2JqZWN0KHF1ZXJ5KTtcbiAgICB0aGlzLnVybCArPSB+dGhpcy51cmwuaW5kZXhPZignPycpXG4gICAgICA/ICcmJyArIHF1ZXJ5XG4gICAgICA6ICc/JyArIHF1ZXJ5O1xuICB9XG5cbiAgLy8gaW5pdGlhdGUgcmVxdWVzdFxuICBpZiAodGhpcy51c2VybmFtZSAmJiB0aGlzLnBhc3N3b3JkKSB7XG4gICAgeGhyLm9wZW4odGhpcy5tZXRob2QsIHRoaXMudXJsLCB0cnVlLCB0aGlzLnVzZXJuYW1lLCB0aGlzLnBhc3N3b3JkKTtcbiAgfSBlbHNlIHtcbiAgICB4aHIub3Blbih0aGlzLm1ldGhvZCwgdGhpcy51cmwsIHRydWUpO1xuICB9XG5cbiAgLy8gQ09SU1xuICBpZiAodGhpcy5fd2l0aENyZWRlbnRpYWxzKSB4aHIud2l0aENyZWRlbnRpYWxzID0gdHJ1ZTtcblxuICAvLyBib2R5XG4gIGlmICgnR0VUJyAhPSB0aGlzLm1ldGhvZCAmJiAnSEVBRCcgIT0gdGhpcy5tZXRob2QgJiYgJ3N0cmluZycgIT0gdHlwZW9mIGRhdGEgJiYgIWlzSG9zdChkYXRhKSkge1xuICAgIC8vIHNlcmlhbGl6ZSBzdHVmZlxuICAgIHZhciBjb250ZW50VHlwZSA9IHRoaXMuX2hlYWRlclsnY29udGVudC10eXBlJ107XG4gICAgdmFyIHNlcmlhbGl6ZSA9IHRoaXMuX3BhcnNlciB8fCByZXF1ZXN0LnNlcmlhbGl6ZVtjb250ZW50VHlwZSA/IGNvbnRlbnRUeXBlLnNwbGl0KCc7JylbMF0gOiAnJ107XG4gICAgaWYgKCFzZXJpYWxpemUgJiYgaXNKU09OKGNvbnRlbnRUeXBlKSkgc2VyaWFsaXplID0gcmVxdWVzdC5zZXJpYWxpemVbJ2FwcGxpY2F0aW9uL2pzb24nXTtcbiAgICBpZiAoc2VyaWFsaXplKSBkYXRhID0gc2VyaWFsaXplKGRhdGEpO1xuICB9XG5cbiAgLy8gc2V0IGhlYWRlciBmaWVsZHNcbiAgZm9yICh2YXIgZmllbGQgaW4gdGhpcy5oZWFkZXIpIHtcbiAgICBpZiAobnVsbCA9PSB0aGlzLmhlYWRlcltmaWVsZF0pIGNvbnRpbnVlO1xuICAgIHhoci5zZXRSZXF1ZXN0SGVhZGVyKGZpZWxkLCB0aGlzLmhlYWRlcltmaWVsZF0pO1xuICB9XG5cbiAgaWYgKHRoaXMuX3Jlc3BvbnNlVHlwZSkge1xuICAgIHhoci5yZXNwb25zZVR5cGUgPSB0aGlzLl9yZXNwb25zZVR5cGU7XG4gIH1cblxuICAvLyBzZW5kIHN0dWZmXG4gIHRoaXMuZW1pdCgncmVxdWVzdCcsIHRoaXMpO1xuXG4gIC8vIElFMTEgeGhyLnNlbmQodW5kZWZpbmVkKSBzZW5kcyAndW5kZWZpbmVkJyBzdHJpbmcgYXMgUE9TVCBwYXlsb2FkIChpbnN0ZWFkIG9mIG5vdGhpbmcpXG4gIC8vIFdlIG5lZWQgbnVsbCBoZXJlIGlmIGRhdGEgaXMgdW5kZWZpbmVkXG4gIHhoci5zZW5kKHR5cGVvZiBkYXRhICE9PSAndW5kZWZpbmVkJyA/IGRhdGEgOiBudWxsKTtcbiAgcmV0dXJuIHRoaXM7XG59O1xuXG5cbi8qKlxuICogRXhwb3NlIGBSZXF1ZXN0YC5cbiAqL1xuXG5yZXF1ZXN0LlJlcXVlc3QgPSBSZXF1ZXN0O1xuXG4vKipcbiAqIEdFVCBgdXJsYCB3aXRoIG9wdGlvbmFsIGNhbGxiYWNrIGBmbihyZXMpYC5cbiAqXG4gKiBAcGFyYW0ge1N0cmluZ30gdXJsXG4gKiBAcGFyYW0ge01peGVkfEZ1bmN0aW9ufSBkYXRhIG9yIGZuXG4gKiBAcGFyYW0ge0Z1bmN0aW9ufSBmblxuICogQHJldHVybiB7UmVxdWVzdH1cbiAqIEBhcGkgcHVibGljXG4gKi9cblxucmVxdWVzdC5nZXQgPSBmdW5jdGlvbih1cmwsIGRhdGEsIGZuKXtcbiAgdmFyIHJlcSA9IHJlcXVlc3QoJ0dFVCcsIHVybCk7XG4gIGlmICgnZnVuY3Rpb24nID09IHR5cGVvZiBkYXRhKSBmbiA9IGRhdGEsIGRhdGEgPSBudWxsO1xuICBpZiAoZGF0YSkgcmVxLnF1ZXJ5KGRhdGEpO1xuICBpZiAoZm4pIHJlcS5lbmQoZm4pO1xuICByZXR1cm4gcmVxO1xufTtcblxuLyoqXG4gKiBIRUFEIGB1cmxgIHdpdGggb3B0aW9uYWwgY2FsbGJhY2sgYGZuKHJlcylgLlxuICpcbiAqIEBwYXJhbSB7U3RyaW5nfSB1cmxcbiAqIEBwYXJhbSB7TWl4ZWR8RnVuY3Rpb259IGRhdGEgb3IgZm5cbiAqIEBwYXJhbSB7RnVuY3Rpb259IGZuXG4gKiBAcmV0dXJuIHtSZXF1ZXN0fVxuICogQGFwaSBwdWJsaWNcbiAqL1xuXG5yZXF1ZXN0LmhlYWQgPSBmdW5jdGlvbih1cmwsIGRhdGEsIGZuKXtcbiAgdmFyIHJlcSA9IHJlcXVlc3QoJ0hFQUQnLCB1cmwpO1xuICBpZiAoJ2Z1bmN0aW9uJyA9PSB0eXBlb2YgZGF0YSkgZm4gPSBkYXRhLCBkYXRhID0gbnVsbDtcbiAgaWYgKGRhdGEpIHJlcS5zZW5kKGRhdGEpO1xuICBpZiAoZm4pIHJlcS5lbmQoZm4pO1xuICByZXR1cm4gcmVxO1xufTtcblxuLyoqXG4gKiBERUxFVEUgYHVybGAgd2l0aCBvcHRpb25hbCBjYWxsYmFjayBgZm4ocmVzKWAuXG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IHVybFxuICogQHBhcmFtIHtGdW5jdGlvbn0gZm5cbiAqIEByZXR1cm4ge1JlcXVlc3R9XG4gKiBAYXBpIHB1YmxpY1xuICovXG5cbmZ1bmN0aW9uIGRlbCh1cmwsIGZuKXtcbiAgdmFyIHJlcSA9IHJlcXVlc3QoJ0RFTEVURScsIHVybCk7XG4gIGlmIChmbikgcmVxLmVuZChmbik7XG4gIHJldHVybiByZXE7XG59O1xuXG5yZXF1ZXN0WydkZWwnXSA9IGRlbDtcbnJlcXVlc3RbJ2RlbGV0ZSddID0gZGVsO1xuXG4vKipcbiAqIFBBVENIIGB1cmxgIHdpdGggb3B0aW9uYWwgYGRhdGFgIGFuZCBjYWxsYmFjayBgZm4ocmVzKWAuXG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IHVybFxuICogQHBhcmFtIHtNaXhlZH0gZGF0YVxuICogQHBhcmFtIHtGdW5jdGlvbn0gZm5cbiAqIEByZXR1cm4ge1JlcXVlc3R9XG4gKiBAYXBpIHB1YmxpY1xuICovXG5cbnJlcXVlc3QucGF0Y2ggPSBmdW5jdGlvbih1cmwsIGRhdGEsIGZuKXtcbiAgdmFyIHJlcSA9IHJlcXVlc3QoJ1BBVENIJywgdXJsKTtcbiAgaWYgKCdmdW5jdGlvbicgPT0gdHlwZW9mIGRhdGEpIGZuID0gZGF0YSwgZGF0YSA9IG51bGw7XG4gIGlmIChkYXRhKSByZXEuc2VuZChkYXRhKTtcbiAgaWYgKGZuKSByZXEuZW5kKGZuKTtcbiAgcmV0dXJuIHJlcTtcbn07XG5cbi8qKlxuICogUE9TVCBgdXJsYCB3aXRoIG9wdGlvbmFsIGBkYXRhYCBhbmQgY2FsbGJhY2sgYGZuKHJlcylgLlxuICpcbiAqIEBwYXJhbSB7U3RyaW5nfSB1cmxcbiAqIEBwYXJhbSB7TWl4ZWR9IGRhdGFcbiAqIEBwYXJhbSB7RnVuY3Rpb259IGZuXG4gKiBAcmV0dXJuIHtSZXF1ZXN0fVxuICogQGFwaSBwdWJsaWNcbiAqL1xuXG5yZXF1ZXN0LnBvc3QgPSBmdW5jdGlvbih1cmwsIGRhdGEsIGZuKXtcbiAgdmFyIHJlcSA9IHJlcXVlc3QoJ1BPU1QnLCB1cmwpO1xuICBpZiAoJ2Z1bmN0aW9uJyA9PSB0eXBlb2YgZGF0YSkgZm4gPSBkYXRhLCBkYXRhID0gbnVsbDtcbiAgaWYgKGRhdGEpIHJlcS5zZW5kKGRhdGEpO1xuICBpZiAoZm4pIHJlcS5lbmQoZm4pO1xuICByZXR1cm4gcmVxO1xufTtcblxuLyoqXG4gKiBQVVQgYHVybGAgd2l0aCBvcHRpb25hbCBgZGF0YWAgYW5kIGNhbGxiYWNrIGBmbihyZXMpYC5cbiAqXG4gKiBAcGFyYW0ge1N0cmluZ30gdXJsXG4gKiBAcGFyYW0ge01peGVkfEZ1bmN0aW9ufSBkYXRhIG9yIGZuXG4gKiBAcGFyYW0ge0Z1bmN0aW9ufSBmblxuICogQHJldHVybiB7UmVxdWVzdH1cbiAqIEBhcGkgcHVibGljXG4gKi9cblxucmVxdWVzdC5wdXQgPSBmdW5jdGlvbih1cmwsIGRhdGEsIGZuKXtcbiAgdmFyIHJlcSA9IHJlcXVlc3QoJ1BVVCcsIHVybCk7XG4gIGlmICgnZnVuY3Rpb24nID09IHR5cGVvZiBkYXRhKSBmbiA9IGRhdGEsIGRhdGEgPSBudWxsO1xuICBpZiAoZGF0YSkgcmVxLnNlbmQoZGF0YSk7XG4gIGlmIChmbikgcmVxLmVuZChmbik7XG4gIHJldHVybiByZXE7XG59O1xuIiwiLyoqXG4gKiBDaGVjayBpZiBgb2JqYCBpcyBhbiBvYmplY3QuXG4gKlxuICogQHBhcmFtIHtPYmplY3R9IG9ialxuICogQHJldHVybiB7Qm9vbGVhbn1cbiAqIEBhcGkgcHJpdmF0ZVxuICovXG5cbmZ1bmN0aW9uIGlzT2JqZWN0KG9iaikge1xuICByZXR1cm4gbnVsbCAhPSBvYmogJiYgJ29iamVjdCcgPT0gdHlwZW9mIG9iajtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBpc09iamVjdDtcbiIsIi8qKlxuICogTW9kdWxlIG9mIG1peGVkLWluIGZ1bmN0aW9ucyBzaGFyZWQgYmV0d2VlbiBub2RlIGFuZCBjbGllbnQgY29kZVxuICovXG52YXIgaXNPYmplY3QgPSByZXF1aXJlKCcuL2lzLW9iamVjdCcpO1xuXG4vKipcbiAqIENsZWFyIHByZXZpb3VzIHRpbWVvdXQuXG4gKlxuICogQHJldHVybiB7UmVxdWVzdH0gZm9yIGNoYWluaW5nXG4gKiBAYXBpIHB1YmxpY1xuICovXG5cbmV4cG9ydHMuY2xlYXJUaW1lb3V0ID0gZnVuY3Rpb24gX2NsZWFyVGltZW91dCgpe1xuICB0aGlzLl90aW1lb3V0ID0gMDtcbiAgY2xlYXJUaW1lb3V0KHRoaXMuX3RpbWVyKTtcbiAgcmV0dXJuIHRoaXM7XG59O1xuXG4vKipcbiAqIEZvcmNlIGdpdmVuIHBhcnNlclxuICpcbiAqIFNldHMgdGhlIGJvZHkgcGFyc2VyIG5vIG1hdHRlciB0eXBlLlxuICpcbiAqIEBwYXJhbSB7RnVuY3Rpb259XG4gKiBAYXBpIHB1YmxpY1xuICovXG5cbmV4cG9ydHMucGFyc2UgPSBmdW5jdGlvbiBwYXJzZShmbil7XG4gIHRoaXMuX3BhcnNlciA9IGZuO1xuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogU2V0IHRpbWVvdXQgdG8gYG1zYC5cbiAqXG4gKiBAcGFyYW0ge051bWJlcn0gbXNcbiAqIEByZXR1cm4ge1JlcXVlc3R9IGZvciBjaGFpbmluZ1xuICogQGFwaSBwdWJsaWNcbiAqL1xuXG5leHBvcnRzLnRpbWVvdXQgPSBmdW5jdGlvbiB0aW1lb3V0KG1zKXtcbiAgdGhpcy5fdGltZW91dCA9IG1zO1xuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogRmF1eCBwcm9taXNlIHN1cHBvcnRcbiAqXG4gKiBAcGFyYW0ge0Z1bmN0aW9ufSBmdWxmaWxsXG4gKiBAcGFyYW0ge0Z1bmN0aW9ufSByZWplY3RcbiAqIEByZXR1cm4ge1JlcXVlc3R9XG4gKi9cblxuZXhwb3J0cy50aGVuID0gZnVuY3Rpb24gdGhlbihmdWxmaWxsLCByZWplY3QpIHtcbiAgcmV0dXJuIHRoaXMuZW5kKGZ1bmN0aW9uKGVyciwgcmVzKSB7XG4gICAgZXJyID8gcmVqZWN0KGVycikgOiBmdWxmaWxsKHJlcyk7XG4gIH0pO1xufVxuXG4vKipcbiAqIEFsbG93IGZvciBleHRlbnNpb25cbiAqL1xuXG5leHBvcnRzLnVzZSA9IGZ1bmN0aW9uIHVzZShmbikge1xuICBmbih0aGlzKTtcbiAgcmV0dXJuIHRoaXM7XG59XG5cblxuLyoqXG4gKiBHZXQgcmVxdWVzdCBoZWFkZXIgYGZpZWxkYC5cbiAqIENhc2UtaW5zZW5zaXRpdmUuXG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IGZpZWxkXG4gKiBAcmV0dXJuIHtTdHJpbmd9XG4gKiBAYXBpIHB1YmxpY1xuICovXG5cbmV4cG9ydHMuZ2V0ID0gZnVuY3Rpb24oZmllbGQpe1xuICByZXR1cm4gdGhpcy5faGVhZGVyW2ZpZWxkLnRvTG93ZXJDYXNlKCldO1xufTtcblxuLyoqXG4gKiBHZXQgY2FzZS1pbnNlbnNpdGl2ZSBoZWFkZXIgYGZpZWxkYCB2YWx1ZS5cbiAqIFRoaXMgaXMgYSBkZXByZWNhdGVkIGludGVybmFsIEFQSS4gVXNlIGAuZ2V0KGZpZWxkKWAgaW5zdGVhZC5cbiAqXG4gKiAoZ2V0SGVhZGVyIGlzIG5vIGxvbmdlciB1c2VkIGludGVybmFsbHkgYnkgdGhlIHN1cGVyYWdlbnQgY29kZSBiYXNlKVxuICpcbiAqIEBwYXJhbSB7U3RyaW5nfSBmaWVsZFxuICogQHJldHVybiB7U3RyaW5nfVxuICogQGFwaSBwcml2YXRlXG4gKiBAZGVwcmVjYXRlZFxuICovXG5cbmV4cG9ydHMuZ2V0SGVhZGVyID0gZXhwb3J0cy5nZXQ7XG5cbi8qKlxuICogU2V0IGhlYWRlciBgZmllbGRgIHRvIGB2YWxgLCBvciBtdWx0aXBsZSBmaWVsZHMgd2l0aCBvbmUgb2JqZWN0LlxuICogQ2FzZS1pbnNlbnNpdGl2ZS5cbiAqXG4gKiBFeGFtcGxlczpcbiAqXG4gKiAgICAgIHJlcS5nZXQoJy8nKVxuICogICAgICAgIC5zZXQoJ0FjY2VwdCcsICdhcHBsaWNhdGlvbi9qc29uJylcbiAqICAgICAgICAuc2V0KCdYLUFQSS1LZXknLCAnZm9vYmFyJylcbiAqICAgICAgICAuZW5kKGNhbGxiYWNrKTtcbiAqXG4gKiAgICAgIHJlcS5nZXQoJy8nKVxuICogICAgICAgIC5zZXQoeyBBY2NlcHQ6ICdhcHBsaWNhdGlvbi9qc29uJywgJ1gtQVBJLUtleSc6ICdmb29iYXInIH0pXG4gKiAgICAgICAgLmVuZChjYWxsYmFjayk7XG4gKlxuICogQHBhcmFtIHtTdHJpbmd8T2JqZWN0fSBmaWVsZFxuICogQHBhcmFtIHtTdHJpbmd9IHZhbFxuICogQHJldHVybiB7UmVxdWVzdH0gZm9yIGNoYWluaW5nXG4gKiBAYXBpIHB1YmxpY1xuICovXG5cbmV4cG9ydHMuc2V0ID0gZnVuY3Rpb24oZmllbGQsIHZhbCl7XG4gIGlmIChpc09iamVjdChmaWVsZCkpIHtcbiAgICBmb3IgKHZhciBrZXkgaW4gZmllbGQpIHtcbiAgICAgIHRoaXMuc2V0KGtleSwgZmllbGRba2V5XSk7XG4gICAgfVxuICAgIHJldHVybiB0aGlzO1xuICB9XG4gIHRoaXMuX2hlYWRlcltmaWVsZC50b0xvd2VyQ2FzZSgpXSA9IHZhbDtcbiAgdGhpcy5oZWFkZXJbZmllbGRdID0gdmFsO1xuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogUmVtb3ZlIGhlYWRlciBgZmllbGRgLlxuICogQ2FzZS1pbnNlbnNpdGl2ZS5cbiAqXG4gKiBFeGFtcGxlOlxuICpcbiAqICAgICAgcmVxLmdldCgnLycpXG4gKiAgICAgICAgLnVuc2V0KCdVc2VyLUFnZW50JylcbiAqICAgICAgICAuZW5kKGNhbGxiYWNrKTtcbiAqXG4gKiBAcGFyYW0ge1N0cmluZ30gZmllbGRcbiAqL1xuZXhwb3J0cy51bnNldCA9IGZ1bmN0aW9uKGZpZWxkKXtcbiAgZGVsZXRlIHRoaXMuX2hlYWRlcltmaWVsZC50b0xvd2VyQ2FzZSgpXTtcbiAgZGVsZXRlIHRoaXMuaGVhZGVyW2ZpZWxkXTtcbiAgcmV0dXJuIHRoaXM7XG59O1xuXG4vKipcbiAqIFdyaXRlIHRoZSBmaWVsZCBgbmFtZWAgYW5kIGB2YWxgIGZvciBcIm11bHRpcGFydC9mb3JtLWRhdGFcIlxuICogcmVxdWVzdCBib2RpZXMuXG4gKlxuICogYGBgIGpzXG4gKiByZXF1ZXN0LnBvc3QoJy91cGxvYWQnKVxuICogICAuZmllbGQoJ2ZvbycsICdiYXInKVxuICogICAuZW5kKGNhbGxiYWNrKTtcbiAqIGBgYFxuICpcbiAqIEBwYXJhbSB7U3RyaW5nfSBuYW1lXG4gKiBAcGFyYW0ge1N0cmluZ3xCbG9ifEZpbGV8QnVmZmVyfGZzLlJlYWRTdHJlYW19IHZhbFxuICogQHJldHVybiB7UmVxdWVzdH0gZm9yIGNoYWluaW5nXG4gKiBAYXBpIHB1YmxpY1xuICovXG5leHBvcnRzLmZpZWxkID0gZnVuY3Rpb24obmFtZSwgdmFsKSB7XG4gIHRoaXMuX2dldEZvcm1EYXRhKCkuYXBwZW5kKG5hbWUsIHZhbCk7XG4gIHJldHVybiB0aGlzO1xufTtcbiIsIi8vIFRoZSBub2RlIGFuZCBicm93c2VyIG1vZHVsZXMgZXhwb3NlIHZlcnNpb25zIG9mIHRoaXMgd2l0aCB0aGVcbi8vIGFwcHJvcHJpYXRlIGNvbnN0cnVjdG9yIGZ1bmN0aW9uIGJvdW5kIGFzIGZpcnN0IGFyZ3VtZW50XG4vKipcbiAqIElzc3VlIGEgcmVxdWVzdDpcbiAqXG4gKiBFeGFtcGxlczpcbiAqXG4gKiAgICByZXF1ZXN0KCdHRVQnLCAnL3VzZXJzJykuZW5kKGNhbGxiYWNrKVxuICogICAgcmVxdWVzdCgnL3VzZXJzJykuZW5kKGNhbGxiYWNrKVxuICogICAgcmVxdWVzdCgnL3VzZXJzJywgY2FsbGJhY2spXG4gKlxuICogQHBhcmFtIHtTdHJpbmd9IG1ldGhvZFxuICogQHBhcmFtIHtTdHJpbmd8RnVuY3Rpb259IHVybCBvciBjYWxsYmFja1xuICogQHJldHVybiB7UmVxdWVzdH1cbiAqIEBhcGkgcHVibGljXG4gKi9cblxuZnVuY3Rpb24gcmVxdWVzdChSZXF1ZXN0Q29uc3RydWN0b3IsIG1ldGhvZCwgdXJsKSB7XG4gIC8vIGNhbGxiYWNrXG4gIGlmICgnZnVuY3Rpb24nID09IHR5cGVvZiB1cmwpIHtcbiAgICByZXR1cm4gbmV3IFJlcXVlc3RDb25zdHJ1Y3RvcignR0VUJywgbWV0aG9kKS5lbmQodXJsKTtcbiAgfVxuXG4gIC8vIHVybCBmaXJzdFxuICBpZiAoMiA9PSBhcmd1bWVudHMubGVuZ3RoKSB7XG4gICAgcmV0dXJuIG5ldyBSZXF1ZXN0Q29uc3RydWN0b3IoJ0dFVCcsIG1ldGhvZCk7XG4gIH1cblxuICByZXR1cm4gbmV3IFJlcXVlc3RDb25zdHJ1Y3RvcihtZXRob2QsIHVybCk7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gcmVxdWVzdDtcbiIsIi8qISBodHRwczovL210aHMuYmUvcHVueWNvZGUgdjEuMy4yIGJ5IEBtYXRoaWFzLCBtb2RpZmllZCBmb3IgVVJJLmpzICovXHJcblxyXG52YXIgcHVueWNvZGUgPSAoZnVuY3Rpb24gKCkge1xyXG5cclxuXHQvKipcclxuXHQgKiBUaGUgYHB1bnljb2RlYCBvYmplY3QuXHJcblx0ICogQG5hbWUgcHVueWNvZGVcclxuXHQgKiBAdHlwZSBPYmplY3RcclxuXHQgKi9cclxuXHR2YXIgcHVueWNvZGUsXHJcblxyXG5cdC8qKiBIaWdoZXN0IHBvc2l0aXZlIHNpZ25lZCAzMi1iaXQgZmxvYXQgdmFsdWUgKi9cclxuXHRtYXhJbnQgPSAyMTQ3NDgzNjQ3LCAvLyBha2EuIDB4N0ZGRkZGRkYgb3IgMl4zMS0xXHJcblxyXG5cdC8qKiBCb290c3RyaW5nIHBhcmFtZXRlcnMgKi9cclxuXHRiYXNlID0gMzYsXHJcblx0dE1pbiA9IDEsXHJcblx0dE1heCA9IDI2LFxyXG5cdHNrZXcgPSAzOCxcclxuXHRkYW1wID0gNzAwLFxyXG5cdGluaXRpYWxCaWFzID0gNzIsXHJcblx0aW5pdGlhbE4gPSAxMjgsIC8vIDB4ODBcclxuXHRkZWxpbWl0ZXIgPSAnLScsIC8vICdcXHgyRCdcclxuXHJcblx0LyoqIFJlZ3VsYXIgZXhwcmVzc2lvbnMgKi9cclxuXHRyZWdleFB1bnljb2RlID0gL154bi0tLyxcclxuXHRyZWdleE5vbkFTQ0lJID0gL1teXFx4MjAtXFx4N0VdLywgLy8gdW5wcmludGFibGUgQVNDSUkgY2hhcnMgKyBub24tQVNDSUkgY2hhcnNcclxuXHRyZWdleFNlcGFyYXRvcnMgPSAvW1xceDJFXFx1MzAwMlxcdUZGMEVcXHVGRjYxXS9nLCAvLyBSRkMgMzQ5MCBzZXBhcmF0b3JzXHJcblxyXG5cdC8qKiBFcnJvciBtZXNzYWdlcyAqL1xyXG5cdGVycm9ycyA9IHtcclxuXHRcdCdvdmVyZmxvdyc6ICdPdmVyZmxvdzogaW5wdXQgbmVlZHMgd2lkZXIgaW50ZWdlcnMgdG8gcHJvY2VzcycsXHJcblx0XHQnbm90LWJhc2ljJzogJ0lsbGVnYWwgaW5wdXQgPj0gMHg4MCAobm90IGEgYmFzaWMgY29kZSBwb2ludCknLFxyXG5cdFx0J2ludmFsaWQtaW5wdXQnOiAnSW52YWxpZCBpbnB1dCdcclxuXHR9LFxyXG5cclxuXHQvKiogQ29udmVuaWVuY2Ugc2hvcnRjdXRzICovXHJcblx0YmFzZU1pbnVzVE1pbiA9IGJhc2UgLSB0TWluLFxyXG5cdGZsb29yID0gTWF0aC5mbG9vcixcclxuXHRzdHJpbmdGcm9tQ2hhckNvZGUgPSBTdHJpbmcuZnJvbUNoYXJDb2RlLFxyXG5cclxuXHQvKiogVGVtcG9yYXJ5IHZhcmlhYmxlICovXHJcblx0a2V5O1xyXG5cclxuXHQvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi9cclxuXHJcblx0LyoqXHJcblx0ICogQSBnZW5lcmljIGVycm9yIHV0aWxpdHkgZnVuY3Rpb24uXHJcblx0ICogQHByaXZhdGVcclxuXHQgKiBAcGFyYW0ge1N0cmluZ30gdHlwZSBUaGUgZXJyb3IgdHlwZS5cclxuXHQgKiBAcmV0dXJucyB7RXJyb3J9IFRocm93cyBhIGBSYW5nZUVycm9yYCB3aXRoIHRoZSBhcHBsaWNhYmxlIGVycm9yIG1lc3NhZ2UuXHJcblx0ICovXHJcblx0ZnVuY3Rpb24gZXJyb3IodHlwZSkge1xyXG5cdFx0dGhyb3cgbmV3IFJhbmdlRXJyb3IoZXJyb3JzW3R5cGVdKTtcclxuXHR9XHJcblxyXG5cdC8qKlxyXG5cdCAqIEEgZ2VuZXJpYyBgQXJyYXkjbWFwYCB1dGlsaXR5IGZ1bmN0aW9uLlxyXG5cdCAqIEBwcml2YXRlXHJcblx0ICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIGl0ZXJhdGUgb3Zlci5cclxuXHQgKiBAcGFyYW0ge0Z1bmN0aW9ufSBjYWxsYmFjayBUaGUgZnVuY3Rpb24gdGhhdCBnZXRzIGNhbGxlZCBmb3IgZXZlcnkgYXJyYXlcclxuXHQgKiBpdGVtLlxyXG5cdCAqIEByZXR1cm5zIHtBcnJheX0gQSBuZXcgYXJyYXkgb2YgdmFsdWVzIHJldHVybmVkIGJ5IHRoZSBjYWxsYmFjayBmdW5jdGlvbi5cclxuXHQgKi9cclxuXHRmdW5jdGlvbiBtYXAoYXJyYXksIGZuKSB7XHJcblx0XHR2YXIgbGVuZ3RoID0gYXJyYXkubGVuZ3RoO1xyXG5cdFx0dmFyIHJlc3VsdCA9IFtdO1xyXG5cdFx0d2hpbGUgKGxlbmd0aC0tKSB7XHJcblx0XHRcdHJlc3VsdFtsZW5ndGhdID0gZm4oYXJyYXlbbGVuZ3RoXSk7XHJcblx0XHR9XHJcblx0XHRyZXR1cm4gcmVzdWx0O1xyXG5cdH1cclxuXHJcblx0LyoqXHJcblx0ICogQSBzaW1wbGUgYEFycmF5I21hcGAtbGlrZSB3cmFwcGVyIHRvIHdvcmsgd2l0aCBkb21haW4gbmFtZSBzdHJpbmdzIG9yIGVtYWlsXHJcblx0ICogYWRkcmVzc2VzLlxyXG5cdCAqIEBwcml2YXRlXHJcblx0ICogQHBhcmFtIHtTdHJpbmd9IGRvbWFpbiBUaGUgZG9tYWluIG5hbWUgb3IgZW1haWwgYWRkcmVzcy5cclxuXHQgKiBAcGFyYW0ge0Z1bmN0aW9ufSBjYWxsYmFjayBUaGUgZnVuY3Rpb24gdGhhdCBnZXRzIGNhbGxlZCBmb3IgZXZlcnlcclxuXHQgKiBjaGFyYWN0ZXIuXHJcblx0ICogQHJldHVybnMge0FycmF5fSBBIG5ldyBzdHJpbmcgb2YgY2hhcmFjdGVycyByZXR1cm5lZCBieSB0aGUgY2FsbGJhY2tcclxuXHQgKiBmdW5jdGlvbi5cclxuXHQgKi9cclxuXHRmdW5jdGlvbiBtYXBEb21haW4oc3RyaW5nLCBmbikge1xyXG5cdFx0dmFyIHBhcnRzID0gc3RyaW5nLnNwbGl0KCdAJyk7XHJcblx0XHR2YXIgcmVzdWx0ID0gJyc7XHJcblx0XHRpZiAocGFydHMubGVuZ3RoID4gMSkge1xyXG5cdFx0XHQvLyBJbiBlbWFpbCBhZGRyZXNzZXMsIG9ubHkgdGhlIGRvbWFpbiBuYW1lIHNob3VsZCBiZSBwdW55Y29kZWQuIExlYXZlXHJcblx0XHRcdC8vIHRoZSBsb2NhbCBwYXJ0IChpLmUuIGV2ZXJ5dGhpbmcgdXAgdG8gYEBgKSBpbnRhY3QuXHJcblx0XHRcdHJlc3VsdCA9IHBhcnRzWzBdICsgJ0AnO1xyXG5cdFx0XHRzdHJpbmcgPSBwYXJ0c1sxXTtcclxuXHRcdH1cclxuXHRcdC8vIEF2b2lkIGBzcGxpdChyZWdleClgIGZvciBJRTggY29tcGF0aWJpbGl0eS4gU2VlICMxNy5cclxuXHRcdHN0cmluZyA9IHN0cmluZy5yZXBsYWNlKHJlZ2V4U2VwYXJhdG9ycywgJ1xceDJFJyk7XHJcblx0XHR2YXIgbGFiZWxzID0gc3RyaW5nLnNwbGl0KCcuJyk7XHJcblx0XHR2YXIgZW5jb2RlZCA9IG1hcChsYWJlbHMsIGZuKS5qb2luKCcuJyk7XHJcblx0XHRyZXR1cm4gcmVzdWx0ICsgZW5jb2RlZDtcclxuXHR9XHJcblxyXG5cdC8qKlxyXG5cdCAqIENyZWF0ZXMgYW4gYXJyYXkgY29udGFpbmluZyB0aGUgbnVtZXJpYyBjb2RlIHBvaW50cyBvZiBlYWNoIFVuaWNvZGVcclxuXHQgKiBjaGFyYWN0ZXIgaW4gdGhlIHN0cmluZy4gV2hpbGUgSmF2YVNjcmlwdCB1c2VzIFVDUy0yIGludGVybmFsbHksXHJcblx0ICogdGhpcyBmdW5jdGlvbiB3aWxsIGNvbnZlcnQgYSBwYWlyIG9mIHN1cnJvZ2F0ZSBoYWx2ZXMgKGVhY2ggb2Ygd2hpY2hcclxuXHQgKiBVQ1MtMiBleHBvc2VzIGFzIHNlcGFyYXRlIGNoYXJhY3RlcnMpIGludG8gYSBzaW5nbGUgY29kZSBwb2ludCxcclxuXHQgKiBtYXRjaGluZyBVVEYtMTYuXHJcblx0ICogQHNlZSBgcHVueWNvZGUudWNzMi5lbmNvZGVgXHJcblx0ICogQHNlZSA8aHR0cHM6Ly9tYXRoaWFzYnluZW5zLmJlL25vdGVzL2phdmFzY3JpcHQtZW5jb2Rpbmc+XHJcblx0ICogQG1lbWJlck9mIHB1bnljb2RlLnVjczJcclxuXHQgKiBAbmFtZSBkZWNvZGVcclxuXHQgKiBAcGFyYW0ge1N0cmluZ30gc3RyaW5nIFRoZSBVbmljb2RlIGlucHV0IHN0cmluZyAoVUNTLTIpLlxyXG5cdCAqIEByZXR1cm5zIHtBcnJheX0gVGhlIG5ldyBhcnJheSBvZiBjb2RlIHBvaW50cy5cclxuXHQgKi9cclxuXHRmdW5jdGlvbiB1Y3MyZGVjb2RlKHN0cmluZykge1xyXG5cdFx0dmFyIG91dHB1dCA9IFtdLFxyXG5cdFx0ICAgIGNvdW50ZXIgPSAwLFxyXG5cdFx0ICAgIGxlbmd0aCA9IHN0cmluZy5sZW5ndGgsXHJcblx0XHQgICAgdmFsdWUsXHJcblx0XHQgICAgZXh0cmE7XHJcblx0XHR3aGlsZSAoY291bnRlciA8IGxlbmd0aCkge1xyXG5cdFx0XHR2YWx1ZSA9IHN0cmluZy5jaGFyQ29kZUF0KGNvdW50ZXIrKyk7XHJcblx0XHRcdGlmICh2YWx1ZSA+PSAweEQ4MDAgJiYgdmFsdWUgPD0gMHhEQkZGICYmIGNvdW50ZXIgPCBsZW5ndGgpIHtcclxuXHRcdFx0XHQvLyBoaWdoIHN1cnJvZ2F0ZSwgYW5kIHRoZXJlIGlzIGEgbmV4dCBjaGFyYWN0ZXJcclxuXHRcdFx0XHRleHRyYSA9IHN0cmluZy5jaGFyQ29kZUF0KGNvdW50ZXIrKyk7XHJcblx0XHRcdFx0aWYgKChleHRyYSAmIDB4RkMwMCkgPT0gMHhEQzAwKSB7IC8vIGxvdyBzdXJyb2dhdGVcclxuXHRcdFx0XHRcdG91dHB1dC5wdXNoKCgodmFsdWUgJiAweDNGRikgPDwgMTApICsgKGV4dHJhICYgMHgzRkYpICsgMHgxMDAwMCk7XHJcblx0XHRcdFx0fSBlbHNlIHtcclxuXHRcdFx0XHRcdC8vIHVubWF0Y2hlZCBzdXJyb2dhdGU7IG9ubHkgYXBwZW5kIHRoaXMgY29kZSB1bml0LCBpbiBjYXNlIHRoZSBuZXh0XHJcblx0XHRcdFx0XHQvLyBjb2RlIHVuaXQgaXMgdGhlIGhpZ2ggc3Vycm9nYXRlIG9mIGEgc3Vycm9nYXRlIHBhaXJcclxuXHRcdFx0XHRcdG91dHB1dC5wdXNoKHZhbHVlKTtcclxuXHRcdFx0XHRcdGNvdW50ZXItLTtcclxuXHRcdFx0XHR9XHJcblx0XHRcdH0gZWxzZSB7XHJcblx0XHRcdFx0b3V0cHV0LnB1c2godmFsdWUpO1xyXG5cdFx0XHR9XHJcblx0XHR9XHJcblx0XHRyZXR1cm4gb3V0cHV0O1xyXG5cdH1cclxuXHJcblx0LyoqXHJcblx0ICogQ3JlYXRlcyBhIHN0cmluZyBiYXNlZCBvbiBhbiBhcnJheSBvZiBudW1lcmljIGNvZGUgcG9pbnRzLlxyXG5cdCAqIEBzZWUgYHB1bnljb2RlLnVjczIuZGVjb2RlYFxyXG5cdCAqIEBtZW1iZXJPZiBwdW55Y29kZS51Y3MyXHJcblx0ICogQG5hbWUgZW5jb2RlXHJcblx0ICogQHBhcmFtIHtBcnJheX0gY29kZVBvaW50cyBUaGUgYXJyYXkgb2YgbnVtZXJpYyBjb2RlIHBvaW50cy5cclxuXHQgKiBAcmV0dXJucyB7U3RyaW5nfSBUaGUgbmV3IFVuaWNvZGUgc3RyaW5nIChVQ1MtMikuXHJcblx0ICovXHJcblx0ZnVuY3Rpb24gdWNzMmVuY29kZShhcnJheSkge1xyXG5cdFx0cmV0dXJuIG1hcChhcnJheSwgZnVuY3Rpb24odmFsdWUpIHtcclxuXHRcdFx0dmFyIG91dHB1dCA9ICcnO1xyXG5cdFx0XHRpZiAodmFsdWUgPiAweEZGRkYpIHtcclxuXHRcdFx0XHR2YWx1ZSAtPSAweDEwMDAwO1xyXG5cdFx0XHRcdG91dHB1dCArPSBzdHJpbmdGcm9tQ2hhckNvZGUodmFsdWUgPj4+IDEwICYgMHgzRkYgfCAweEQ4MDApO1xyXG5cdFx0XHRcdHZhbHVlID0gMHhEQzAwIHwgdmFsdWUgJiAweDNGRjtcclxuXHRcdFx0fVxyXG5cdFx0XHRvdXRwdXQgKz0gc3RyaW5nRnJvbUNoYXJDb2RlKHZhbHVlKTtcclxuXHRcdFx0cmV0dXJuIG91dHB1dDtcclxuXHRcdH0pLmpvaW4oJycpO1xyXG5cdH1cclxuXHJcblx0LyoqXHJcblx0ICogQ29udmVydHMgYSBiYXNpYyBjb2RlIHBvaW50IGludG8gYSBkaWdpdC9pbnRlZ2VyLlxyXG5cdCAqIEBzZWUgYGRpZ2l0VG9CYXNpYygpYFxyXG5cdCAqIEBwcml2YXRlXHJcblx0ICogQHBhcmFtIHtOdW1iZXJ9IGNvZGVQb2ludCBUaGUgYmFzaWMgbnVtZXJpYyBjb2RlIHBvaW50IHZhbHVlLlxyXG5cdCAqIEByZXR1cm5zIHtOdW1iZXJ9IFRoZSBudW1lcmljIHZhbHVlIG9mIGEgYmFzaWMgY29kZSBwb2ludCAoZm9yIHVzZSBpblxyXG5cdCAqIHJlcHJlc2VudGluZyBpbnRlZ2VycykgaW4gdGhlIHJhbmdlIGAwYCB0byBgYmFzZSAtIDFgLCBvciBgYmFzZWAgaWZcclxuXHQgKiB0aGUgY29kZSBwb2ludCBkb2VzIG5vdCByZXByZXNlbnQgYSB2YWx1ZS5cclxuXHQgKi9cclxuXHRmdW5jdGlvbiBiYXNpY1RvRGlnaXQoY29kZVBvaW50KSB7XHJcblx0XHRpZiAoY29kZVBvaW50IC0gNDggPCAxMCkge1xyXG5cdFx0XHRyZXR1cm4gY29kZVBvaW50IC0gMjI7XHJcblx0XHR9XHJcblx0XHRpZiAoY29kZVBvaW50IC0gNjUgPCAyNikge1xyXG5cdFx0XHRyZXR1cm4gY29kZVBvaW50IC0gNjU7XHJcblx0XHR9XHJcblx0XHRpZiAoY29kZVBvaW50IC0gOTcgPCAyNikge1xyXG5cdFx0XHRyZXR1cm4gY29kZVBvaW50IC0gOTc7XHJcblx0XHR9XHJcblx0XHRyZXR1cm4gYmFzZTtcclxuXHR9XHJcblxyXG5cdC8qKlxyXG5cdCAqIENvbnZlcnRzIGEgZGlnaXQvaW50ZWdlciBpbnRvIGEgYmFzaWMgY29kZSBwb2ludC5cclxuXHQgKiBAc2VlIGBiYXNpY1RvRGlnaXQoKWBcclxuXHQgKiBAcHJpdmF0ZVxyXG5cdCAqIEBwYXJhbSB7TnVtYmVyfSBkaWdpdCBUaGUgbnVtZXJpYyB2YWx1ZSBvZiBhIGJhc2ljIGNvZGUgcG9pbnQuXHJcblx0ICogQHJldHVybnMge051bWJlcn0gVGhlIGJhc2ljIGNvZGUgcG9pbnQgd2hvc2UgdmFsdWUgKHdoZW4gdXNlZCBmb3JcclxuXHQgKiByZXByZXNlbnRpbmcgaW50ZWdlcnMpIGlzIGBkaWdpdGAsIHdoaWNoIG5lZWRzIHRvIGJlIGluIHRoZSByYW5nZVxyXG5cdCAqIGAwYCB0byBgYmFzZSAtIDFgLiBJZiBgZmxhZ2AgaXMgbm9uLXplcm8sIHRoZSB1cHBlcmNhc2UgZm9ybSBpc1xyXG5cdCAqIHVzZWQ7IGVsc2UsIHRoZSBsb3dlcmNhc2UgZm9ybSBpcyB1c2VkLiBUaGUgYmVoYXZpb3IgaXMgdW5kZWZpbmVkXHJcblx0ICogaWYgYGZsYWdgIGlzIG5vbi16ZXJvIGFuZCBgZGlnaXRgIGhhcyBubyB1cHBlcmNhc2UgZm9ybS5cclxuXHQgKi9cclxuXHRmdW5jdGlvbiBkaWdpdFRvQmFzaWMoZGlnaXQsIGZsYWcpIHtcclxuXHRcdC8vICAwLi4yNSBtYXAgdG8gQVNDSUkgYS4ueiBvciBBLi5aXHJcblx0XHQvLyAyNi4uMzUgbWFwIHRvIEFTQ0lJIDAuLjlcclxuXHRcdHJldHVybiBkaWdpdCArIDIyICsgNzUgKiAoZGlnaXQgPCAyNikgLSAoKGZsYWcgIT0gMCkgPDwgNSk7XHJcblx0fVxyXG5cclxuXHQvKipcclxuXHQgKiBCaWFzIGFkYXB0YXRpb24gZnVuY3Rpb24gYXMgcGVyIHNlY3Rpb24gMy40IG9mIFJGQyAzNDkyLlxyXG5cdCAqIGh0dHBzOi8vdG9vbHMuaWV0Zi5vcmcvaHRtbC9yZmMzNDkyI3NlY3Rpb24tMy40XHJcblx0ICogQHByaXZhdGVcclxuXHQgKi9cclxuXHRmdW5jdGlvbiBhZGFwdChkZWx0YSwgbnVtUG9pbnRzLCBmaXJzdFRpbWUpIHtcclxuXHRcdHZhciBrID0gMDtcclxuXHRcdGRlbHRhID0gZmlyc3RUaW1lID8gZmxvb3IoZGVsdGEgLyBkYW1wKSA6IGRlbHRhID4+IDE7XHJcblx0XHRkZWx0YSArPSBmbG9vcihkZWx0YSAvIG51bVBvaW50cyk7XHJcblx0XHRmb3IgKC8qIG5vIGluaXRpYWxpemF0aW9uICovOyBkZWx0YSA+IGJhc2VNaW51c1RNaW4gKiB0TWF4ID4+IDE7IGsgKz0gYmFzZSkge1xyXG5cdFx0XHRkZWx0YSA9IGZsb29yKGRlbHRhIC8gYmFzZU1pbnVzVE1pbik7XHJcblx0XHR9XHJcblx0XHRyZXR1cm4gZmxvb3IoayArIChiYXNlTWludXNUTWluICsgMSkgKiBkZWx0YSAvIChkZWx0YSArIHNrZXcpKTtcclxuXHR9XHJcblxyXG5cdC8qKlxyXG5cdCAqIENvbnZlcnRzIGEgUHVueWNvZGUgc3RyaW5nIG9mIEFTQ0lJLW9ubHkgc3ltYm9scyB0byBhIHN0cmluZyBvZiBVbmljb2RlXHJcblx0ICogc3ltYm9scy5cclxuXHQgKiBAbWVtYmVyT2YgcHVueWNvZGVcclxuXHQgKiBAcGFyYW0ge1N0cmluZ30gaW5wdXQgVGhlIFB1bnljb2RlIHN0cmluZyBvZiBBU0NJSS1vbmx5IHN5bWJvbHMuXHJcblx0ICogQHJldHVybnMge1N0cmluZ30gVGhlIHJlc3VsdGluZyBzdHJpbmcgb2YgVW5pY29kZSBzeW1ib2xzLlxyXG5cdCAqL1xyXG5cdGZ1bmN0aW9uIGRlY29kZShpbnB1dCkge1xyXG5cdFx0Ly8gRG9uJ3QgdXNlIFVDUy0yXHJcblx0XHR2YXIgb3V0cHV0ID0gW10sXHJcblx0XHQgICAgaW5wdXRMZW5ndGggPSBpbnB1dC5sZW5ndGgsXHJcblx0XHQgICAgb3V0LFxyXG5cdFx0ICAgIGkgPSAwLFxyXG5cdFx0ICAgIG4gPSBpbml0aWFsTixcclxuXHRcdCAgICBiaWFzID0gaW5pdGlhbEJpYXMsXHJcblx0XHQgICAgYmFzaWMsXHJcblx0XHQgICAgaixcclxuXHRcdCAgICBpbmRleCxcclxuXHRcdCAgICBvbGRpLFxyXG5cdFx0ICAgIHcsXHJcblx0XHQgICAgayxcclxuXHRcdCAgICBkaWdpdCxcclxuXHRcdCAgICB0LFxyXG5cdFx0ICAgIC8qKiBDYWNoZWQgY2FsY3VsYXRpb24gcmVzdWx0cyAqL1xyXG5cdFx0ICAgIGJhc2VNaW51c1Q7XHJcblxyXG5cdFx0Ly8gSGFuZGxlIHRoZSBiYXNpYyBjb2RlIHBvaW50czogbGV0IGBiYXNpY2AgYmUgdGhlIG51bWJlciBvZiBpbnB1dCBjb2RlXHJcblx0XHQvLyBwb2ludHMgYmVmb3JlIHRoZSBsYXN0IGRlbGltaXRlciwgb3IgYDBgIGlmIHRoZXJlIGlzIG5vbmUsIHRoZW4gY29weVxyXG5cdFx0Ly8gdGhlIGZpcnN0IGJhc2ljIGNvZGUgcG9pbnRzIHRvIHRoZSBvdXRwdXQuXHJcblxyXG5cdFx0YmFzaWMgPSBpbnB1dC5sYXN0SW5kZXhPZihkZWxpbWl0ZXIpO1xyXG5cdFx0aWYgKGJhc2ljIDwgMCkge1xyXG5cdFx0XHRiYXNpYyA9IDA7XHJcblx0XHR9XHJcblxyXG5cdFx0Zm9yIChqID0gMDsgaiA8IGJhc2ljOyArK2opIHtcclxuXHRcdFx0Ly8gaWYgaXQncyBub3QgYSBiYXNpYyBjb2RlIHBvaW50XHJcblx0XHRcdGlmIChpbnB1dC5jaGFyQ29kZUF0KGopID49IDB4ODApIHtcclxuXHRcdFx0XHRlcnJvcignbm90LWJhc2ljJyk7XHJcblx0XHRcdH1cclxuXHRcdFx0b3V0cHV0LnB1c2goaW5wdXQuY2hhckNvZGVBdChqKSk7XHJcblx0XHR9XHJcblxyXG5cdFx0Ly8gTWFpbiBkZWNvZGluZyBsb29wOiBzdGFydCBqdXN0IGFmdGVyIHRoZSBsYXN0IGRlbGltaXRlciBpZiBhbnkgYmFzaWMgY29kZVxyXG5cdFx0Ly8gcG9pbnRzIHdlcmUgY29waWVkOyBzdGFydCBhdCB0aGUgYmVnaW5uaW5nIG90aGVyd2lzZS5cclxuXHJcblx0XHRmb3IgKGluZGV4ID0gYmFzaWMgPiAwID8gYmFzaWMgKyAxIDogMDsgaW5kZXggPCBpbnB1dExlbmd0aDsgLyogbm8gZmluYWwgZXhwcmVzc2lvbiAqLykge1xyXG5cclxuXHRcdFx0Ly8gYGluZGV4YCBpcyB0aGUgaW5kZXggb2YgdGhlIG5leHQgY2hhcmFjdGVyIHRvIGJlIGNvbnN1bWVkLlxyXG5cdFx0XHQvLyBEZWNvZGUgYSBnZW5lcmFsaXplZCB2YXJpYWJsZS1sZW5ndGggaW50ZWdlciBpbnRvIGBkZWx0YWAsXHJcblx0XHRcdC8vIHdoaWNoIGdldHMgYWRkZWQgdG8gYGlgLiBUaGUgb3ZlcmZsb3cgY2hlY2tpbmcgaXMgZWFzaWVyXHJcblx0XHRcdC8vIGlmIHdlIGluY3JlYXNlIGBpYCBhcyB3ZSBnbywgdGhlbiBzdWJ0cmFjdCBvZmYgaXRzIHN0YXJ0aW5nXHJcblx0XHRcdC8vIHZhbHVlIGF0IHRoZSBlbmQgdG8gb2J0YWluIGBkZWx0YWAuXHJcblx0XHRcdGZvciAob2xkaSA9IGksIHcgPSAxLCBrID0gYmFzZTsgLyogbm8gY29uZGl0aW9uICovOyBrICs9IGJhc2UpIHtcclxuXHJcblx0XHRcdFx0aWYgKGluZGV4ID49IGlucHV0TGVuZ3RoKSB7XHJcblx0XHRcdFx0XHRlcnJvcignaW52YWxpZC1pbnB1dCcpO1xyXG5cdFx0XHRcdH1cclxuXHJcblx0XHRcdFx0ZGlnaXQgPSBiYXNpY1RvRGlnaXQoaW5wdXQuY2hhckNvZGVBdChpbmRleCsrKSk7XHJcblxyXG5cdFx0XHRcdGlmIChkaWdpdCA+PSBiYXNlIHx8IGRpZ2l0ID4gZmxvb3IoKG1heEludCAtIGkpIC8gdykpIHtcclxuXHRcdFx0XHRcdGVycm9yKCdvdmVyZmxvdycpO1xyXG5cdFx0XHRcdH1cclxuXHJcblx0XHRcdFx0aSArPSBkaWdpdCAqIHc7XHJcblx0XHRcdFx0dCA9IGsgPD0gYmlhcyA/IHRNaW4gOiAoayA+PSBiaWFzICsgdE1heCA/IHRNYXggOiBrIC0gYmlhcyk7XHJcblxyXG5cdFx0XHRcdGlmIChkaWdpdCA8IHQpIHtcclxuXHRcdFx0XHRcdGJyZWFrO1xyXG5cdFx0XHRcdH1cclxuXHJcblx0XHRcdFx0YmFzZU1pbnVzVCA9IGJhc2UgLSB0O1xyXG5cdFx0XHRcdGlmICh3ID4gZmxvb3IobWF4SW50IC8gYmFzZU1pbnVzVCkpIHtcclxuXHRcdFx0XHRcdGVycm9yKCdvdmVyZmxvdycpO1xyXG5cdFx0XHRcdH1cclxuXHJcblx0XHRcdFx0dyAqPSBiYXNlTWludXNUO1xyXG5cclxuXHRcdFx0fVxyXG5cclxuXHRcdFx0b3V0ID0gb3V0cHV0Lmxlbmd0aCArIDE7XHJcblx0XHRcdGJpYXMgPSBhZGFwdChpIC0gb2xkaSwgb3V0LCBvbGRpID09IDApO1xyXG5cclxuXHRcdFx0Ly8gYGlgIHdhcyBzdXBwb3NlZCB0byB3cmFwIGFyb3VuZCBmcm9tIGBvdXRgIHRvIGAwYCxcclxuXHRcdFx0Ly8gaW5jcmVtZW50aW5nIGBuYCBlYWNoIHRpbWUsIHNvIHdlJ2xsIGZpeCB0aGF0IG5vdzpcclxuXHRcdFx0aWYgKGZsb29yKGkgLyBvdXQpID4gbWF4SW50IC0gbikge1xyXG5cdFx0XHRcdGVycm9yKCdvdmVyZmxvdycpO1xyXG5cdFx0XHR9XHJcblxyXG5cdFx0XHRuICs9IGZsb29yKGkgLyBvdXQpO1xyXG5cdFx0XHRpICU9IG91dDtcclxuXHJcblx0XHRcdC8vIEluc2VydCBgbmAgYXQgcG9zaXRpb24gYGlgIG9mIHRoZSBvdXRwdXRcclxuXHRcdFx0b3V0cHV0LnNwbGljZShpKyssIDAsIG4pO1xyXG5cclxuXHRcdH1cclxuXHJcblx0XHRyZXR1cm4gdWNzMmVuY29kZShvdXRwdXQpO1xyXG5cdH1cclxuXHJcblx0LyoqXHJcblx0ICogQ29udmVydHMgYSBzdHJpbmcgb2YgVW5pY29kZSBzeW1ib2xzIChlLmcuIGEgZG9tYWluIG5hbWUgbGFiZWwpIHRvIGFcclxuXHQgKiBQdW55Y29kZSBzdHJpbmcgb2YgQVNDSUktb25seSBzeW1ib2xzLlxyXG5cdCAqIEBtZW1iZXJPZiBwdW55Y29kZVxyXG5cdCAqIEBwYXJhbSB7U3RyaW5nfSBpbnB1dCBUaGUgc3RyaW5nIG9mIFVuaWNvZGUgc3ltYm9scy5cclxuXHQgKiBAcmV0dXJucyB7U3RyaW5nfSBUaGUgcmVzdWx0aW5nIFB1bnljb2RlIHN0cmluZyBvZiBBU0NJSS1vbmx5IHN5bWJvbHMuXHJcblx0ICovXHJcblx0ZnVuY3Rpb24gZW5jb2RlKGlucHV0KSB7XHJcblx0XHR2YXIgbixcclxuXHRcdCAgICBkZWx0YSxcclxuXHRcdCAgICBoYW5kbGVkQ1BDb3VudCxcclxuXHRcdCAgICBiYXNpY0xlbmd0aCxcclxuXHRcdCAgICBiaWFzLFxyXG5cdFx0ICAgIGosXHJcblx0XHQgICAgbSxcclxuXHRcdCAgICBxLFxyXG5cdFx0ICAgIGssXHJcblx0XHQgICAgdCxcclxuXHRcdCAgICBjdXJyZW50VmFsdWUsXHJcblx0XHQgICAgb3V0cHV0ID0gW10sXHJcblx0XHQgICAgLyoqIGBpbnB1dExlbmd0aGAgd2lsbCBob2xkIHRoZSBudW1iZXIgb2YgY29kZSBwb2ludHMgaW4gYGlucHV0YC4gKi9cclxuXHRcdCAgICBpbnB1dExlbmd0aCxcclxuXHRcdCAgICAvKiogQ2FjaGVkIGNhbGN1bGF0aW9uIHJlc3VsdHMgKi9cclxuXHRcdCAgICBoYW5kbGVkQ1BDb3VudFBsdXNPbmUsXHJcblx0XHQgICAgYmFzZU1pbnVzVCxcclxuXHRcdCAgICBxTWludXNUO1xyXG5cclxuXHRcdC8vIENvbnZlcnQgdGhlIGlucHV0IGluIFVDUy0yIHRvIFVuaWNvZGVcclxuXHRcdGlucHV0ID0gdWNzMmRlY29kZShpbnB1dCk7XHJcblxyXG5cdFx0Ly8gQ2FjaGUgdGhlIGxlbmd0aFxyXG5cdFx0aW5wdXRMZW5ndGggPSBpbnB1dC5sZW5ndGg7XHJcblxyXG5cdFx0Ly8gSW5pdGlhbGl6ZSB0aGUgc3RhdGVcclxuXHRcdG4gPSBpbml0aWFsTjtcclxuXHRcdGRlbHRhID0gMDtcclxuXHRcdGJpYXMgPSBpbml0aWFsQmlhcztcclxuXHJcblx0XHQvLyBIYW5kbGUgdGhlIGJhc2ljIGNvZGUgcG9pbnRzXHJcblx0XHRmb3IgKGogPSAwOyBqIDwgaW5wdXRMZW5ndGg7ICsraikge1xyXG5cdFx0XHRjdXJyZW50VmFsdWUgPSBpbnB1dFtqXTtcclxuXHRcdFx0aWYgKGN1cnJlbnRWYWx1ZSA8IDB4ODApIHtcclxuXHRcdFx0XHRvdXRwdXQucHVzaChzdHJpbmdGcm9tQ2hhckNvZGUoY3VycmVudFZhbHVlKSk7XHJcblx0XHRcdH1cclxuXHRcdH1cclxuXHJcblx0XHRoYW5kbGVkQ1BDb3VudCA9IGJhc2ljTGVuZ3RoID0gb3V0cHV0Lmxlbmd0aDtcclxuXHJcblx0XHQvLyBgaGFuZGxlZENQQ291bnRgIGlzIHRoZSBudW1iZXIgb2YgY29kZSBwb2ludHMgdGhhdCBoYXZlIGJlZW4gaGFuZGxlZDtcclxuXHRcdC8vIGBiYXNpY0xlbmd0aGAgaXMgdGhlIG51bWJlciBvZiBiYXNpYyBjb2RlIHBvaW50cy5cclxuXHJcblx0XHQvLyBGaW5pc2ggdGhlIGJhc2ljIHN0cmluZyAtIGlmIGl0IGlzIG5vdCBlbXB0eSAtIHdpdGggYSBkZWxpbWl0ZXJcclxuXHRcdGlmIChiYXNpY0xlbmd0aCkge1xyXG5cdFx0XHRvdXRwdXQucHVzaChkZWxpbWl0ZXIpO1xyXG5cdFx0fVxyXG5cclxuXHRcdC8vIE1haW4gZW5jb2RpbmcgbG9vcDpcclxuXHRcdHdoaWxlIChoYW5kbGVkQ1BDb3VudCA8IGlucHV0TGVuZ3RoKSB7XHJcblxyXG5cdFx0XHQvLyBBbGwgbm9uLWJhc2ljIGNvZGUgcG9pbnRzIDwgbiBoYXZlIGJlZW4gaGFuZGxlZCBhbHJlYWR5LiBGaW5kIHRoZSBuZXh0XHJcblx0XHRcdC8vIGxhcmdlciBvbmU6XHJcblx0XHRcdGZvciAobSA9IG1heEludCwgaiA9IDA7IGogPCBpbnB1dExlbmd0aDsgKytqKSB7XHJcblx0XHRcdFx0Y3VycmVudFZhbHVlID0gaW5wdXRbal07XHJcblx0XHRcdFx0aWYgKGN1cnJlbnRWYWx1ZSA+PSBuICYmIGN1cnJlbnRWYWx1ZSA8IG0pIHtcclxuXHRcdFx0XHRcdG0gPSBjdXJyZW50VmFsdWU7XHJcblx0XHRcdFx0fVxyXG5cdFx0XHR9XHJcblxyXG5cdFx0XHQvLyBJbmNyZWFzZSBgZGVsdGFgIGVub3VnaCB0byBhZHZhbmNlIHRoZSBkZWNvZGVyJ3MgPG4saT4gc3RhdGUgdG8gPG0sMD4sXHJcblx0XHRcdC8vIGJ1dCBndWFyZCBhZ2FpbnN0IG92ZXJmbG93XHJcblx0XHRcdGhhbmRsZWRDUENvdW50UGx1c09uZSA9IGhhbmRsZWRDUENvdW50ICsgMTtcclxuXHRcdFx0aWYgKG0gLSBuID4gZmxvb3IoKG1heEludCAtIGRlbHRhKSAvIGhhbmRsZWRDUENvdW50UGx1c09uZSkpIHtcclxuXHRcdFx0XHRlcnJvcignb3ZlcmZsb3cnKTtcclxuXHRcdFx0fVxyXG5cclxuXHRcdFx0ZGVsdGEgKz0gKG0gLSBuKSAqIGhhbmRsZWRDUENvdW50UGx1c09uZTtcclxuXHRcdFx0biA9IG07XHJcblxyXG5cdFx0XHRmb3IgKGogPSAwOyBqIDwgaW5wdXRMZW5ndGg7ICsraikge1xyXG5cdFx0XHRcdGN1cnJlbnRWYWx1ZSA9IGlucHV0W2pdO1xyXG5cclxuXHRcdFx0XHRpZiAoY3VycmVudFZhbHVlIDwgbiAmJiArK2RlbHRhID4gbWF4SW50KSB7XHJcblx0XHRcdFx0XHRlcnJvcignb3ZlcmZsb3cnKTtcclxuXHRcdFx0XHR9XHJcblxyXG5cdFx0XHRcdGlmIChjdXJyZW50VmFsdWUgPT0gbikge1xyXG5cdFx0XHRcdFx0Ly8gUmVwcmVzZW50IGRlbHRhIGFzIGEgZ2VuZXJhbGl6ZWQgdmFyaWFibGUtbGVuZ3RoIGludGVnZXJcclxuXHRcdFx0XHRcdGZvciAocSA9IGRlbHRhLCBrID0gYmFzZTsgLyogbm8gY29uZGl0aW9uICovOyBrICs9IGJhc2UpIHtcclxuXHRcdFx0XHRcdFx0dCA9IGsgPD0gYmlhcyA/IHRNaW4gOiAoayA+PSBiaWFzICsgdE1heCA/IHRNYXggOiBrIC0gYmlhcyk7XHJcblx0XHRcdFx0XHRcdGlmIChxIDwgdCkge1xyXG5cdFx0XHRcdFx0XHRcdGJyZWFrO1xyXG5cdFx0XHRcdFx0XHR9XHJcblx0XHRcdFx0XHRcdHFNaW51c1QgPSBxIC0gdDtcclxuXHRcdFx0XHRcdFx0YmFzZU1pbnVzVCA9IGJhc2UgLSB0O1xyXG5cdFx0XHRcdFx0XHRvdXRwdXQucHVzaChcclxuXHRcdFx0XHRcdFx0XHRzdHJpbmdGcm9tQ2hhckNvZGUoZGlnaXRUb0Jhc2ljKHQgKyBxTWludXNUICUgYmFzZU1pbnVzVCwgMCkpXHJcblx0XHRcdFx0XHRcdCk7XHJcblx0XHRcdFx0XHRcdHEgPSBmbG9vcihxTWludXNUIC8gYmFzZU1pbnVzVCk7XHJcblx0XHRcdFx0XHR9XHJcblxyXG5cdFx0XHRcdFx0b3V0cHV0LnB1c2goc3RyaW5nRnJvbUNoYXJDb2RlKGRpZ2l0VG9CYXNpYyhxLCAwKSkpO1xyXG5cdFx0XHRcdFx0YmlhcyA9IGFkYXB0KGRlbHRhLCBoYW5kbGVkQ1BDb3VudFBsdXNPbmUsIGhhbmRsZWRDUENvdW50ID09IGJhc2ljTGVuZ3RoKTtcclxuXHRcdFx0XHRcdGRlbHRhID0gMDtcclxuXHRcdFx0XHRcdCsraGFuZGxlZENQQ291bnQ7XHJcblx0XHRcdFx0fVxyXG5cdFx0XHR9XHJcblxyXG5cdFx0XHQrK2RlbHRhO1xyXG5cdFx0XHQrK247XHJcblxyXG5cdFx0fVxyXG5cdFx0cmV0dXJuIG91dHB1dC5qb2luKCcnKTtcclxuXHR9XHJcblxyXG5cdC8qKlxyXG5cdCAqIENvbnZlcnRzIGEgUHVueWNvZGUgc3RyaW5nIHJlcHJlc2VudGluZyBhIGRvbWFpbiBuYW1lIG9yIGFuIGVtYWlsIGFkZHJlc3NcclxuXHQgKiB0byBVbmljb2RlLiBPbmx5IHRoZSBQdW55Y29kZWQgcGFydHMgb2YgdGhlIGlucHV0IHdpbGwgYmUgY29udmVydGVkLCBpLmUuXHJcblx0ICogaXQgZG9lc24ndCBtYXR0ZXIgaWYgeW91IGNhbGwgaXQgb24gYSBzdHJpbmcgdGhhdCBoYXMgYWxyZWFkeSBiZWVuXHJcblx0ICogY29udmVydGVkIHRvIFVuaWNvZGUuXHJcblx0ICogQG1lbWJlck9mIHB1bnljb2RlXHJcblx0ICogQHBhcmFtIHtTdHJpbmd9IGlucHV0IFRoZSBQdW55Y29kZWQgZG9tYWluIG5hbWUgb3IgZW1haWwgYWRkcmVzcyB0b1xyXG5cdCAqIGNvbnZlcnQgdG8gVW5pY29kZS5cclxuXHQgKiBAcmV0dXJucyB7U3RyaW5nfSBUaGUgVW5pY29kZSByZXByZXNlbnRhdGlvbiBvZiB0aGUgZ2l2ZW4gUHVueWNvZGVcclxuXHQgKiBzdHJpbmcuXHJcblx0ICovXHJcblx0ZnVuY3Rpb24gdG9Vbmljb2RlKGlucHV0KSB7XHJcblx0XHRyZXR1cm4gbWFwRG9tYWluKGlucHV0LCBmdW5jdGlvbihzdHJpbmcpIHtcclxuXHRcdFx0cmV0dXJuIHJlZ2V4UHVueWNvZGUudGVzdChzdHJpbmcpXHJcblx0XHRcdFx0PyBkZWNvZGUoc3RyaW5nLnNsaWNlKDQpLnRvTG93ZXJDYXNlKCkpXHJcblx0XHRcdFx0OiBzdHJpbmc7XHJcblx0XHR9KTtcclxuXHR9XHJcblxyXG5cdC8qKlxyXG5cdCAqIENvbnZlcnRzIGEgVW5pY29kZSBzdHJpbmcgcmVwcmVzZW50aW5nIGEgZG9tYWluIG5hbWUgb3IgYW4gZW1haWwgYWRkcmVzcyB0b1xyXG5cdCAqIFB1bnljb2RlLiBPbmx5IHRoZSBub24tQVNDSUkgcGFydHMgb2YgdGhlIGRvbWFpbiBuYW1lIHdpbGwgYmUgY29udmVydGVkLFxyXG5cdCAqIGkuZS4gaXQgZG9lc24ndCBtYXR0ZXIgaWYgeW91IGNhbGwgaXQgd2l0aCBhIGRvbWFpbiB0aGF0J3MgYWxyZWFkeSBpblxyXG5cdCAqIEFTQ0lJLlxyXG5cdCAqIEBtZW1iZXJPZiBwdW55Y29kZVxyXG5cdCAqIEBwYXJhbSB7U3RyaW5nfSBpbnB1dCBUaGUgZG9tYWluIG5hbWUgb3IgZW1haWwgYWRkcmVzcyB0byBjb252ZXJ0LCBhcyBhXHJcblx0ICogVW5pY29kZSBzdHJpbmcuXHJcblx0ICogQHJldHVybnMge1N0cmluZ30gVGhlIFB1bnljb2RlIHJlcHJlc2VudGF0aW9uIG9mIHRoZSBnaXZlbiBkb21haW4gbmFtZSBvclxyXG5cdCAqIGVtYWlsIGFkZHJlc3MuXHJcblx0ICovXHJcblx0ZnVuY3Rpb24gdG9BU0NJSShpbnB1dCkge1xyXG5cdFx0cmV0dXJuIG1hcERvbWFpbihpbnB1dCwgZnVuY3Rpb24oc3RyaW5nKSB7XHJcblx0XHRcdHJldHVybiByZWdleE5vbkFTQ0lJLnRlc3Qoc3RyaW5nKVxyXG5cdFx0XHRcdD8gJ3huLS0nICsgZW5jb2RlKHN0cmluZylcclxuXHRcdFx0XHQ6IHN0cmluZztcclxuXHRcdH0pO1xyXG5cdH1cclxuXHJcblx0LyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovXHJcblxyXG5cdC8qKiBEZWZpbmUgdGhlIHB1YmxpYyBBUEkgKi9cclxuXHRwdW55Y29kZSA9IHtcclxuXHRcdC8qKlxyXG5cdFx0ICogQSBzdHJpbmcgcmVwcmVzZW50aW5nIHRoZSBjdXJyZW50IFB1bnljb2RlLmpzIHZlcnNpb24gbnVtYmVyLlxyXG5cdFx0ICogQG1lbWJlck9mIHB1bnljb2RlXHJcblx0XHQgKiBAdHlwZSBTdHJpbmdcclxuXHRcdCAqL1xyXG5cdFx0dmVyc2lvbjogJzEuMy4yJyxcclxuXHRcdC8qKlxyXG5cdFx0ICogQW4gb2JqZWN0IG9mIG1ldGhvZHMgdG8gY29udmVydCBmcm9tIEphdmFTY3JpcHQncyBpbnRlcm5hbCBjaGFyYWN0ZXJcclxuXHRcdCAqIHJlcHJlc2VudGF0aW9uIChVQ1MtMikgdG8gVW5pY29kZSBjb2RlIHBvaW50cywgYW5kIGJhY2suXHJcblx0XHQgKiBAc2VlIDxodHRwczovL21hdGhpYXNieW5lbnMuYmUvbm90ZXMvamF2YXNjcmlwdC1lbmNvZGluZz5cclxuXHRcdCAqIEBtZW1iZXJPZiBwdW55Y29kZVxyXG5cdFx0ICogQHR5cGUgT2JqZWN0XHJcblx0XHQgKi9cclxuXHRcdHVjczI6IHtcclxuXHRcdFx0ZGVjb2RlOiB1Y3MyZGVjb2RlLFxyXG5cdFx0XHRlbmNvZGU6IHVjczJlbmNvZGVcclxuXHRcdH0sXHJcblx0XHRkZWNvZGU6IGRlY29kZSxcclxuXHRcdGVuY29kZTogZW5jb2RlLFxyXG5cdFx0dG9BU0NJSTogdG9BU0NJSSxcclxuXHRcdHRvVW5pY29kZTogdG9Vbmljb2RlXHJcblx0fTtcclxuXHJcblx0cmV0dXJuIHB1bnljb2RlO1xyXG59KCkpO1xyXG5cclxuaWYgKHR5cGVvZiBDT01QSUxFRCA9PT0gXCJ1bmRlZmluZWRcIiAmJiB0eXBlb2YgbW9kdWxlICE9PSBcInVuZGVmaW5lZFwiKSBtb2R1bGUuZXhwb3J0cyA9IHB1bnljb2RlOyIsIi8vLzxyZWZlcmVuY2UgcGF0aD1cImNvbW1vbmpzLmQudHNcIi8+XHJcbnJlcXVpcmUoXCIuL3NjaGVtZXMvaHR0cFwiKTtcclxucmVxdWlyZShcIi4vc2NoZW1lcy91cm5cIik7XHJcbnJlcXVpcmUoXCIuL3NjaGVtZXMvbWFpbHRvXCIpO1xyXG4iLCIvLy88cmVmZXJlbmNlIHBhdGg9XCIuLi91cmkudHNcIi8+XHJcbmlmICh0eXBlb2YgQ09NUElMRUQgPT09IFwidW5kZWZpbmVkXCIgJiYgdHlwZW9mIFVSSSA9PT0gXCJ1bmRlZmluZWRcIiAmJiB0eXBlb2YgcmVxdWlyZSA9PT0gXCJmdW5jdGlvblwiKVxyXG4gICAgdmFyIFVSSSA9IHJlcXVpcmUoXCIuLi91cmlcIik7XHJcblVSSS5TQ0hFTUVTW1wiaHR0cFwiXSA9IFVSSS5TQ0hFTUVTW1wiaHR0cHNcIl0gPSB7XHJcbiAgICBkb21haW5Ib3N0OiB0cnVlLFxyXG4gICAgcGFyc2U6IGZ1bmN0aW9uIChjb21wb25lbnRzLCBvcHRpb25zKSB7XHJcbiAgICAgICAgLy9yZXBvcnQgbWlzc2luZyBob3N0XHJcbiAgICAgICAgaWYgKCFjb21wb25lbnRzLmhvc3QpIHtcclxuICAgICAgICAgICAgY29tcG9uZW50cy5lcnJvciA9IGNvbXBvbmVudHMuZXJyb3IgfHwgXCJIVFRQIFVSSXMgbXVzdCBoYXZlIGEgaG9zdC5cIjtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIGNvbXBvbmVudHM7XHJcbiAgICB9LFxyXG4gICAgc2VyaWFsaXplOiBmdW5jdGlvbiAoY29tcG9uZW50cywgb3B0aW9ucykge1xyXG4gICAgICAgIC8vbm9ybWFsaXplIHRoZSBkZWZhdWx0IHBvcnRcclxuICAgICAgICBpZiAoY29tcG9uZW50cy5wb3J0ID09PSAoU3RyaW5nKGNvbXBvbmVudHMuc2NoZW1lKS50b0xvd2VyQ2FzZSgpICE9PSBcImh0dHBzXCIgPyA4MCA6IDQ0MykgfHwgY29tcG9uZW50cy5wb3J0ID09PSBcIlwiKSB7XHJcbiAgICAgICAgICAgIGNvbXBvbmVudHMucG9ydCA9IHVuZGVmaW5lZDtcclxuICAgICAgICB9XHJcbiAgICAgICAgLy9ub3JtYWxpemUgdGhlIGVtcHR5IHBhdGhcclxuICAgICAgICBpZiAoIWNvbXBvbmVudHMucGF0aCkge1xyXG4gICAgICAgICAgICBjb21wb25lbnRzLnBhdGggPSBcIi9cIjtcclxuICAgICAgICB9XHJcbiAgICAgICAgLy9OT1RFOiBXZSBkbyBub3QgcGFyc2UgcXVlcnkgc3RyaW5ncyBmb3IgSFRUUCBVUklzXHJcbiAgICAgICAgLy9hcyBXV1cgRm9ybSBVcmwgRW5jb2RlZCBxdWVyeSBzdHJpbmdzIGFyZSBwYXJ0IG9mIHRoZSBIVE1MNCsgc3BlYyxcclxuICAgICAgICAvL2FuZCBub3QgdGhlIEhUVFAgc3BlYy4gXHJcbiAgICAgICAgcmV0dXJuIGNvbXBvbmVudHM7XHJcbiAgICB9XHJcbn07XHJcbiIsIi8vLzxyZWZlcmVuY2UgcGF0aD1cIi4uL3VyaS50c1wiLz5cclxuaWYgKHR5cGVvZiBDT01QSUxFRCA9PT0gXCJ1bmRlZmluZWRcIiAmJiB0eXBlb2YgVVJJID09PSBcInVuZGVmaW5lZFwiICYmIHR5cGVvZiByZXF1aXJlID09PSBcImZ1bmN0aW9uXCIpIHtcclxuICAgIHZhciBVUkkgPSByZXF1aXJlKFwiLi4vdXJpXCIpLCBwdW55Y29kZSA9IHJlcXVpcmUoXCIuLi9wdW55Y29kZVwiKTtcclxufVxyXG4oZnVuY3Rpb24gKCkge1xyXG4gICAgZnVuY3Rpb24gbWVyZ2UoKSB7XHJcbiAgICAgICAgdmFyIHNldHMgPSBbXTtcclxuICAgICAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykge1xyXG4gICAgICAgICAgICBzZXRzW19pIC0gMF0gPSBhcmd1bWVudHNbX2ldO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoc2V0cy5sZW5ndGggPiAxKSB7XHJcbiAgICAgICAgICAgIHNldHNbMF0gPSBzZXRzWzBdLnNsaWNlKDAsIC0xKTtcclxuICAgICAgICAgICAgdmFyIHhsID0gc2V0cy5sZW5ndGggLSAxO1xyXG4gICAgICAgICAgICBmb3IgKHZhciB4ID0gMTsgeCA8IHhsOyArK3gpIHtcclxuICAgICAgICAgICAgICAgIHNldHNbeF0gPSBzZXRzW3hdLnNsaWNlKDEsIC0xKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZXRzW3hsXSA9IHNldHNbeGxdLnNsaWNlKDEpO1xyXG4gICAgICAgICAgICByZXR1cm4gc2V0cy5qb2luKCcnKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgIHJldHVybiBzZXRzWzBdO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIGZ1bmN0aW9uIHN1YmV4cChzdHIpIHtcclxuICAgICAgICByZXR1cm4gXCIoPzpcIiArIHN0ciArIFwiKVwiO1xyXG4gICAgfVxyXG4gICAgdmFyIE8gPSB7fSwgaXNJUkkgPSBVUkkuSVJJX1NVUFBPUlQsIFxyXG4gICAgLy9SRkMgMzk4NlxyXG4gICAgVU5SRVNFUlZFRCQkID0gXCJbQS1aYS16MC05XFxcXC1cXFxcLlxcXFxfXFxcXH5cIiArIChpc0lSSSA/IFwiXFxcXHhBMC1cXFxcdTIwMERcXFxcdTIwMTAtXFxcXHUyMDI5XFxcXHUyMDJGLVxcXFx1RDdGRlxcXFx1RjkwMC1cXFxcdUZEQ0ZcXFxcdUZERjAtXFxcXHVGRkVGXCIgOiBcIlwiKSArIFwiXVwiLCBIRVhESUckJCA9IFwiWzAtOUEtRmEtZl1cIiwgUENUX0VOQ09ERUQkID0gc3ViZXhwKHN1YmV4cChcIiVbRUZlZl1cIiArIEhFWERJRyQkICsgXCIlXCIgKyBIRVhESUckJCArIEhFWERJRyQkICsgXCIlXCIgKyBIRVhESUckJCArIEhFWERJRyQkKSArIFwifFwiICsgc3ViZXhwKFwiJVs4OUEtRmEtZl1cIiArIEhFWERJRyQkICsgXCIlXCIgKyBIRVhESUckJCArIEhFWERJRyQkKSArIFwifFwiICsgc3ViZXhwKFwiJVwiICsgSEVYRElHJCQgKyBIRVhESUckJCkpLCBcclxuICAgIC8vUkZDIDUzMjIsIGV4Y2VwdCB0aGVzZSBzeW1ib2xzIGFzIHBlciBSRkMgNjA2ODogQCA6IC8gPyAjIFsgXSAmIDsgPSBcclxuICAgIC8vQVRFWFQkJCA9IFwiW0EtWmEtejAtOVxcXFwhXFxcXCNcXFxcJFxcXFwlXFxcXCZcXFxcJ1xcXFwqXFxcXCtcXFxcLVxcXFwvXFxcXD1cXFxcP1xcXFxeXFxcXF9cXFxcYFxcXFx7XFxcXHxcXFxcfVxcXFx+XVwiLFxyXG4gICAgLy9XU1AkJCA9IFwiW1xcXFx4MjBcXFxceDA5XVwiLFxyXG4gICAgLy9PQlNfUVRFWFQkJCA9IFwiW1xcXFx4MDEtXFxcXHgwOFxcXFx4MEJcXFxceDBDXFxcXHgwRS1cXFxceDFGXFxcXHg3Rl1cIiwgIC8vKCVkMS04IC8gJWQxMS0xMiAvICVkMTQtMzEgLyAlZDEyNylcclxuICAgIC8vUVRFWFQkJCA9IG1lcmdlKFwiW1xcXFx4MjFcXFxceDIzLVxcXFx4NUJcXFxceDVELVxcXFx4N0VdXCIsIE9CU19RVEVYVCQkKSwgIC8vJWQzMyAvICVkMzUtOTEgLyAlZDkzLTEyNiAvIG9icy1xdGV4dFxyXG4gICAgLy9WQ0hBUiQkID0gXCJbXFxcXHgyMS1cXFxceDdFXVwiLFxyXG4gICAgLy9XU1AkJCA9IFwiW1xcXFx4MjBcXFxceDA5XVwiLFxyXG4gICAgLy9PQlNfUVAkID0gc3ViZXhwKFwiXFxcXFxcXFxcIiArIG1lcmdlKFwiW1xcXFx4MDBcXFxceDBEXFxcXHgwQV1cIiwgT0JTX1FURVhUJCQpKSwgIC8vJWQwIC8gQ1IgLyBMRiAvIG9icy1xdGV4dFxyXG4gICAgLy9GV1MkID0gc3ViZXhwKHN1YmV4cChXU1AkJCArIFwiKlwiICsgXCJcXFxceDBEXFxcXHgwQVwiKSArIFwiP1wiICsgV1NQJCQgKyBcIitcIiksXHJcbiAgICAvL1FVT1RFRF9QQUlSJCA9IHN1YmV4cChzdWJleHAoXCJcXFxcXFxcXFwiICsgc3ViZXhwKFZDSEFSJCQgKyBcInxcIiArIFdTUCQkKSkgKyBcInxcIiArIE9CU19RUCQpLFxyXG4gICAgLy9RVU9URURfU1RSSU5HJCA9IHN1YmV4cCgnXFxcXFwiJyArIHN1YmV4cChGV1MkICsgXCI/XCIgKyBRQ09OVEVOVCQpICsgXCIqXCIgKyBGV1MkICsgXCI/XCIgKyAnXFxcXFwiJyksXHJcbiAgICBBVEVYVCQkID0gXCJbQS1aYS16MC05XFxcXCFcXFxcJFxcXFwlXFxcXCdcXFxcKlxcXFwrXFxcXC1cXFxcXlxcXFxfXFxcXGBcXFxce1xcXFx8XFxcXH1cXFxcfl1cIiwgUVRFWFQkJCA9IFwiW1xcXFwhXFxcXCRcXFxcJVxcXFwnXFxcXChcXFxcKVxcXFwqXFxcXCtcXFxcLFxcXFwtXFxcXC4wLTlcXFxcPFxcXFw+QS1aXFxcXHg1RS1cXFxceDdFXVwiLCBWQ0hBUiQkID0gbWVyZ2UoUVRFWFQkJCwgXCJbXFxcXFxcXCJcXFxcXFxcXF1cIiksIERPVF9BVE9NX1RFWFQkID0gc3ViZXhwKEFURVhUJCQgKyBcIitcIiArIHN1YmV4cChcIlxcXFwuXCIgKyBBVEVYVCQkICsgXCIrXCIpICsgXCIqXCIpLCBRVU9URURfUEFJUiQgPSBzdWJleHAoXCJcXFxcXFxcXFwiICsgVkNIQVIkJCksIFFDT05URU5UJCA9IHN1YmV4cChRVEVYVCQkICsgXCJ8XCIgKyBRVU9URURfUEFJUiQpLCBRVU9URURfU1RSSU5HJCA9IHN1YmV4cCgnXFxcXFwiJyArIFFDT05URU5UJCArIFwiKlwiICsgJ1xcXFxcIicpLCBcclxuICAgIC8vUkZDIDYwNjhcclxuICAgIERURVhUX05PX09CUyQkID0gXCJbXFxcXHgyMS1cXFxceDVBXFxcXHg1RS1cXFxceDdFXVwiLCBTT01FX0RFTElNUyQkID0gXCJbXFxcXCFcXFxcJFxcXFwnXFxcXChcXFxcKVxcXFwqXFxcXCtcXFxcLFxcXFw7XFxcXDpcXFxcQF1cIiwgUUNIQVIkID0gc3ViZXhwKFVOUkVTRVJWRUQkJCArIFwifFwiICsgUENUX0VOQ09ERUQkICsgXCJ8XCIgKyBTT01FX0RFTElNUyQkKSwgRE9NQUlOJCA9IHN1YmV4cChET1RfQVRPTV9URVhUJCArIFwifFwiICsgXCJcXFxcW1wiICsgRFRFWFRfTk9fT0JTJCQgKyBcIipcIiArIFwiXFxcXF1cIiksIExPQ0FMX1BBUlQkID0gc3ViZXhwKERPVF9BVE9NX1RFWFQkICsgXCJ8XCIgKyBRVU9URURfU1RSSU5HJCksIEFERFJfU1BFQyQgPSBzdWJleHAoTE9DQUxfUEFSVCQgKyBcIlxcXFxAXCIgKyBET01BSU4kKSwgVE8kID0gc3ViZXhwKEFERFJfU1BFQyQgKyBzdWJleHAoXCJcXFxcLFwiICsgQUREUl9TUEVDJCkgKyBcIipcIiksIEhGTkFNRSQgPSBzdWJleHAoUUNIQVIkICsgXCIqXCIpLCBIRlZBTFVFJCA9IEhGTkFNRSQsIEhGSUVMRCQgPSBzdWJleHAoSEZOQU1FJCArIFwiXFxcXD1cIiArIEhGVkFMVUUkKSwgSEZJRUxEUzIkID0gc3ViZXhwKEhGSUVMRCQgKyBzdWJleHAoXCJcXFxcJlwiICsgSEZJRUxEJCkgKyBcIipcIiksIEhGSUVMRFMkID0gc3ViZXhwKFwiXFxcXD9cIiArIEhGSUVMRFMyJCksIE1BSUxUT19VUkkgPSBVUkkuVkFMSURBVEVfU1VQUE9SVCAmJiBuZXcgUmVnRXhwKFwiXm1haWx0b1xcXFw6XCIgKyBUTyQgKyBcIj9cIiArIEhGSUVMRFMkICsgXCI/JFwiKSwgVU5SRVNFUlZFRCA9IG5ldyBSZWdFeHAoVU5SRVNFUlZFRCQkLCBcImdcIiksIFBDVF9FTkNPREVEID0gbmV3IFJlZ0V4cChQQ1RfRU5DT0RFRCQsIFwiZ1wiKSwgTk9UX0xPQ0FMX1BBUlQgPSBuZXcgUmVnRXhwKG1lcmdlKFwiW15dXCIsIEFURVhUJCQsIFwiW1xcXFwuXVwiLCAnW1xcXFxcIl0nLCBWQ0hBUiQkKSwgXCJnXCIpLCBOT1RfRE9NQUlOID0gbmV3IFJlZ0V4cChtZXJnZShcIlteXVwiLCBBVEVYVCQkLCBcIltcXFxcLl1cIiwgXCJbXFxcXFtdXCIsIERURVhUX05PX09CUyQkLCBcIltcXFxcXV1cIiksIFwiZ1wiKSwgTk9UX0hGTkFNRSA9IG5ldyBSZWdFeHAobWVyZ2UoXCJbXl1cIiwgVU5SRVNFUlZFRCQkLCBTT01FX0RFTElNUyQkKSwgXCJnXCIpLCBOT1RfSEZWQUxVRSA9IE5PVF9IRk5BTUUsIFRPID0gVVJJLlZBTElEQVRFX1NVUFBPUlQgJiYgbmV3IFJlZ0V4cChcIl5cIiArIFRPJCArIFwiJFwiKSwgSEZJRUxEUyA9IFVSSS5WQUxJREFURV9TVVBQT1JUICYmIG5ldyBSZWdFeHAoXCJeXCIgKyBIRklFTERTMiQgKyBcIiRcIik7XHJcbiAgICBmdW5jdGlvbiB0b1VwcGVyQ2FzZShzdHIpIHtcclxuICAgICAgICByZXR1cm4gc3RyLnRvVXBwZXJDYXNlKCk7XHJcbiAgICB9XHJcbiAgICBmdW5jdGlvbiBkZWNvZGVVbnJlc2VydmVkKHN0cikge1xyXG4gICAgICAgIHZhciBkZWNTdHIgPSBVUkkucGN0RGVjQ2hhcnMoc3RyKTtcclxuICAgICAgICByZXR1cm4gKCFkZWNTdHIubWF0Y2goVU5SRVNFUlZFRCkgPyBzdHIgOiBkZWNTdHIpO1xyXG4gICAgfVxyXG4gICAgZnVuY3Rpb24gdG9BcnJheShvYmopIHtcclxuICAgICAgICByZXR1cm4gb2JqICE9PSB1bmRlZmluZWQgJiYgb2JqICE9PSBudWxsID8gKG9iaiBpbnN0YW5jZW9mIEFycmF5ICYmICFvYmouY2FsbGVlID8gb2JqIDogKHR5cGVvZiBvYmoubGVuZ3RoICE9PSBcIm51bWJlclwiIHx8IG9iai5zcGxpdCB8fCBvYmouc2V0SW50ZXJ2YWwgfHwgb2JqLmNhbGwgPyBbb2JqXSA6IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKG9iaikpKSA6IFtdO1xyXG4gICAgfVxyXG4gICAgVVJJLlNDSEVNRVNbXCJtYWlsdG9cIl0gPSB7XHJcbiAgICAgICAgcGFyc2U6IGZ1bmN0aW9uIChjb21wb25lbnRzLCBvcHRpb25zKSB7XHJcbiAgICAgICAgICAgIGlmIChVUkkuVkFMSURBVEVfU1VQUE9SVCAmJiAhY29tcG9uZW50cy5lcnJvcikge1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvbXBvbmVudHMucGF0aCAmJiAhVE8udGVzdChjb21wb25lbnRzLnBhdGgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50cy5lcnJvciA9IFwiRW1haWwgYWRkcmVzcyBpcyBub3QgdmFsaWRcIjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGNvbXBvbmVudHMucXVlcnkgJiYgIUhGSUVMRFMudGVzdChjb21wb25lbnRzLnF1ZXJ5KSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudHMuZXJyb3IgPSBcIkhlYWRlciBmaWVsZHMgYXJlIGludmFsaWRcIjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB2YXIgdG8gPSBjb21wb25lbnRzLnRvID0gKGNvbXBvbmVudHMucGF0aCA/IGNvbXBvbmVudHMucGF0aC5zcGxpdChcIixcIikgOiBbXSk7XHJcbiAgICAgICAgICAgIGNvbXBvbmVudHMucGF0aCA9IHVuZGVmaW5lZDtcclxuICAgICAgICAgICAgaWYgKGNvbXBvbmVudHMucXVlcnkpIHtcclxuICAgICAgICAgICAgICAgIHZhciB1bmtub3duSGVhZGVycyA9IGZhbHNlLCBoZWFkZXJzID0ge307XHJcbiAgICAgICAgICAgICAgICB2YXIgaGZpZWxkcyA9IGNvbXBvbmVudHMucXVlcnkuc3BsaXQoXCImXCIpO1xyXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgeCA9IDAsIHhsID0gaGZpZWxkcy5sZW5ndGg7IHggPCB4bDsgKyt4KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGhmaWVsZCA9IGhmaWVsZHNbeF0uc3BsaXQoXCI9XCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoaGZpZWxkWzBdKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCJ0b1wiOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRvQWRkcnMgPSBoZmllbGRbMV0uc3BsaXQoXCIsXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgeF8xID0gMCwgeGxfMSA9IHRvQWRkcnMubGVuZ3RoOyB4XzEgPCB4bF8xOyArK3hfMSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvLnB1c2godG9BZGRyc1t4XzFdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwic3ViamVjdFwiOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50cy5zdWJqZWN0ID0gVVJJLnVuZXNjYXBlQ29tcG9uZW50KGhmaWVsZFsxXSwgb3B0aW9ucyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcImJvZHlcIjpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudHMuYm9keSA9IFVSSS51bmVzY2FwZUNvbXBvbmVudChoZmllbGRbMV0sIG9wdGlvbnMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmtub3duSGVhZGVycyA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzW1VSSS51bmVzY2FwZUNvbXBvbmVudChoZmllbGRbMF0sIG9wdGlvbnMpXSA9IFVSSS51bmVzY2FwZUNvbXBvbmVudChoZmllbGRbMV0sIG9wdGlvbnMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKHVua25vd25IZWFkZXJzKVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudHMuaGVhZGVycyA9IGhlYWRlcnM7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY29tcG9uZW50cy5xdWVyeSA9IHVuZGVmaW5lZDtcclxuICAgICAgICAgICAgZm9yICh2YXIgeCA9IDAsIHhsID0gdG8ubGVuZ3RoOyB4IDwgeGw7ICsreCkge1xyXG4gICAgICAgICAgICAgICAgdmFyIGFkZHIgPSB0b1t4XS5zcGxpdChcIkBcIik7XHJcbiAgICAgICAgICAgICAgICBhZGRyWzBdID0gVVJJLnVuZXNjYXBlQ29tcG9uZW50KGFkZHJbMF0pO1xyXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBwdW55Y29kZSAhPT0gXCJ1bmRlZmluZWRcIiAmJiAhb3B0aW9ucy51bmljb2RlU3VwcG9ydCkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vY29udmVydCBVbmljb2RlIElETiAtPiBBU0NJSSBJRE5cclxuICAgICAgICAgICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRyWzFdID0gcHVueWNvZGUudG9BU0NJSShVUkkudW5lc2NhcGVDb21wb25lbnQoYWRkclsxXSwgb3B0aW9ucykudG9Mb3dlckNhc2UoKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudHMuZXJyb3IgPSBjb21wb25lbnRzLmVycm9yIHx8IFwiRW1haWwgYWRkcmVzcydzIGRvbWFpbiBuYW1lIGNhbiBub3QgYmUgY29udmVydGVkIHRvIEFTQ0lJIHZpYSBwdW55Y29kZTogXCIgKyBlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGFkZHJbMV0gPSBVUkkudW5lc2NhcGVDb21wb25lbnQoYWRkclsxXSwgb3B0aW9ucykudG9Mb3dlckNhc2UoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHRvW3hdID0gYWRkci5qb2luKFwiQFwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50cztcclxuICAgICAgICB9LFxyXG4gICAgICAgIHNlcmlhbGl6ZTogZnVuY3Rpb24gKGNvbXBvbmVudHMsIG9wdGlvbnMpIHtcclxuICAgICAgICAgICAgdmFyIHRvID0gdG9BcnJheShjb21wb25lbnRzLnRvKTtcclxuICAgICAgICAgICAgaWYgKHRvKSB7XHJcbiAgICAgICAgICAgICAgICBmb3IgKHZhciB4ID0gMCwgeGwgPSB0by5sZW5ndGg7IHggPCB4bDsgKyt4KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRvQWRkciA9IFN0cmluZyh0b1t4XSk7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGF0SWR4ID0gdG9BZGRyLmxhc3RJbmRleE9mKFwiQFwiKTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgbG9jYWxQYXJ0ID0gdG9BZGRyLnNsaWNlKDAsIGF0SWR4KTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZG9tYWluID0gdG9BZGRyLnNsaWNlKGF0SWR4ICsgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgbG9jYWxQYXJ0ID0gbG9jYWxQYXJ0LnJlcGxhY2UoUENUX0VOQ09ERUQsIGRlY29kZVVucmVzZXJ2ZWQpLnJlcGxhY2UoUENUX0VOQ09ERUQsIHRvVXBwZXJDYXNlKS5yZXBsYWNlKE5PVF9MT0NBTF9QQVJULCBVUkkucGN0RW5jQ2hhcik7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBwdW55Y29kZSAhPT0gXCJ1bmRlZmluZWRcIikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnZlcnQgSUROIHZpYSBwdW55Y29kZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9tYWluID0gKCFvcHRpb25zLmlyaSA/IHB1bnljb2RlLnRvQVNDSUkoVVJJLnVuZXNjYXBlQ29tcG9uZW50KGRvbWFpbiwgb3B0aW9ucykudG9Mb3dlckNhc2UoKSkgOiBwdW55Y29kZS50b1VuaWNvZGUoZG9tYWluKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudHMuZXJyb3IgPSBjb21wb25lbnRzLmVycm9yIHx8IFwiRW1haWwgYWRkcmVzcydzIGRvbWFpbiBuYW1lIGNhbiBub3QgYmUgY29udmVydGVkIHRvIFwiICsgKCFvcHRpb25zLmlyaSA/IFwiQVNDSUlcIiA6IFwiVW5pY29kZVwiKSArIFwiIHZpYSBwdW55Y29kZTogXCIgKyBlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkb21haW4gPSBkb21haW4ucmVwbGFjZShQQ1RfRU5DT0RFRCwgZGVjb2RlVW5yZXNlcnZlZCkudG9Mb3dlckNhc2UoKS5yZXBsYWNlKFBDVF9FTkNPREVELCB0b1VwcGVyQ2FzZSkucmVwbGFjZShOT1RfRE9NQUlOLCBVUkkucGN0RW5jQ2hhcik7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHRvW3hdID0gbG9jYWxQYXJ0ICsgXCJAXCIgKyBkb21haW47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBjb21wb25lbnRzLnBhdGggPSB0by5qb2luKFwiLFwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB2YXIgaGVhZGVycyA9IGNvbXBvbmVudHMuaGVhZGVycyA9IGNvbXBvbmVudHMuaGVhZGVycyB8fCB7fTtcclxuICAgICAgICAgICAgaWYgKGNvbXBvbmVudHMuc3ViamVjdClcclxuICAgICAgICAgICAgICAgIGhlYWRlcnNbXCJzdWJqZWN0XCJdID0gY29tcG9uZW50cy5zdWJqZWN0O1xyXG4gICAgICAgICAgICBpZiAoY29tcG9uZW50cy5ib2R5KVxyXG4gICAgICAgICAgICAgICAgaGVhZGVyc1tcImJvZHlcIl0gPSBjb21wb25lbnRzLmJvZHk7XHJcbiAgICAgICAgICAgIHZhciBmaWVsZHMgPSBbXTtcclxuICAgICAgICAgICAgZm9yICh2YXIgbmFtZV8xIGluIGhlYWRlcnMpIHtcclxuICAgICAgICAgICAgICAgIGlmIChoZWFkZXJzW25hbWVfMV0gIT09IE9bbmFtZV8xXSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkcy5wdXNoKG5hbWVfMS5yZXBsYWNlKFBDVF9FTkNPREVELCBkZWNvZGVVbnJlc2VydmVkKS5yZXBsYWNlKFBDVF9FTkNPREVELCB0b1VwcGVyQ2FzZSkucmVwbGFjZShOT1RfSEZOQU1FLCBVUkkucGN0RW5jQ2hhcikgK1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBcIj1cIiArXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnNbbmFtZV8xXS5yZXBsYWNlKFBDVF9FTkNPREVELCBkZWNvZGVVbnJlc2VydmVkKS5yZXBsYWNlKFBDVF9FTkNPREVELCB0b1VwcGVyQ2FzZSkucmVwbGFjZShOT1RfSEZWQUxVRSwgVVJJLnBjdEVuY0NoYXIpKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoZmllbGRzLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5xdWVyeSA9IGZpZWxkcy5qb2luKFwiJlwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50cztcclxuICAgICAgICB9XHJcbiAgICB9O1xyXG59KSgpO1xyXG4iLCIvLy88cmVmZXJlbmNlIHBhdGg9XCIuLi91cmkudHNcIi8+XHJcbmlmICh0eXBlb2YgQ09NUElMRUQgPT09IFwidW5kZWZpbmVkXCIgJiYgdHlwZW9mIFVSSSA9PT0gXCJ1bmRlZmluZWRcIiAmJiB0eXBlb2YgcmVxdWlyZSA9PT0gXCJmdW5jdGlvblwiKVxyXG4gICAgdmFyIFVSSSA9IHJlcXVpcmUoXCIuLi91cmlcIik7XHJcbihmdW5jdGlvbiAoKSB7XHJcbiAgICB2YXIgcGN0RW5jQ2hhciA9IFVSSS5wY3RFbmNDaGFyLCBOSUQkID0gXCIoPzpbMC05QS1aYS16XVswLTlBLVphLXpcXFxcLV17MSwzMX0pXCIsIFBDVF9FTkNPREVEJCA9IFwiKD86XFxcXCVbMC05QS1GYS1mXXsyfSlcIiwgVFJBTlMkJCA9IFwiWzAtOUEtWmEtelxcXFwoXFxcXClcXFxcK1xcXFwsXFxcXC1cXFxcLlxcXFw6XFxcXD1cXFxcQFxcXFw7XFxcXCRcXFxcX1xcXFwhXFxcXCpcXFxcJ1xcXFwvXFxcXD9cXFxcI11cIiwgTlNTJCA9IFwiKD86KD86XCIgKyBQQ1RfRU5DT0RFRCQgKyBcInxcIiArIFRSQU5TJCQgKyBcIikrKVwiLCBVUk5fU0NIRU1FID0gbmV3IFJlZ0V4cChcIl51cm5cXFxcOihcIiArIE5JRCQgKyBcIikkXCIpLCBVUk5fUEFUSCA9IG5ldyBSZWdFeHAoXCJeKFwiICsgTklEJCArIFwiKVxcXFw6KFwiICsgTlNTJCArIFwiKSRcIiksIFVSTl9QQVJTRSA9IC9eKFteXFw6XSspXFw6KC4qKS8sIFVSTl9FWENMVURFRCA9IC9bXFx4MDAtXFx4MjBcXFxcXFxcIlxcJlxcPFxcPlxcW1xcXVxcXlxcYFxce1xcfFxcfVxcflxceDdGLVxceEZGXS9nLCBVVUlEID0gL15bMC05QS1GYS1mXXs4fSg/OlxcLVswLTlBLUZhLWZdezR9KXszfVxcLVswLTlBLUZhLWZdezEyfSQvO1xyXG4gICAgLy9SRkMgMjE0MVxyXG4gICAgVVJJLlNDSEVNRVNbXCJ1cm5cIl0gPSB7XHJcbiAgICAgICAgcGFyc2U6IGZ1bmN0aW9uIChjb21wb25lbnRzLCBvcHRpb25zKSB7XHJcbiAgICAgICAgICAgIHZhciBtYXRjaGVzID0gY29tcG9uZW50cy5wYXRoLm1hdGNoKFVSTl9QQVRIKSwgc2NoZW1lLCBzY2hlbWVIYW5kbGVyO1xyXG4gICAgICAgICAgICBpZiAoIW1hdGNoZXMpIHtcclxuICAgICAgICAgICAgICAgIGlmICghb3B0aW9ucy50b2xlcmFudCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudHMuZXJyb3IgPSBjb21wb25lbnRzLmVycm9yIHx8IFwiVVJOIGlzIG5vdCBzdHJpY3RseSB2YWxpZC5cIjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIG1hdGNoZXMgPSBjb21wb25lbnRzLnBhdGgubWF0Y2goVVJOX1BBUlNFKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAobWF0Y2hlcykge1xyXG4gICAgICAgICAgICAgICAgc2NoZW1lID0gXCJ1cm46XCIgKyBtYXRjaGVzWzFdLnRvTG93ZXJDYXNlKCk7XHJcbiAgICAgICAgICAgICAgICBzY2hlbWVIYW5kbGVyID0gVVJJLlNDSEVNRVNbc2NoZW1lXTtcclxuICAgICAgICAgICAgICAgIC8vaW4gb3JkZXIgdG8gc2VyaWFsaXplIHByb3Blcmx5LCBcclxuICAgICAgICAgICAgICAgIC8vZXZlcnkgVVJOIG11c3QgaGF2ZSBhIHNlcmlhbGl6ZXIgdGhhdCBjYWxscyB0aGUgVVJOIHNlcmlhbGl6ZXIgXHJcbiAgICAgICAgICAgICAgICBpZiAoIXNjaGVtZUhhbmRsZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICAvL2NyZWF0ZSBmYWtlIHNjaGVtZSBoYW5kbGVyXHJcbiAgICAgICAgICAgICAgICAgICAgc2NoZW1lSGFuZGxlciA9IFVSSS5TQ0hFTUVTW3NjaGVtZV0gPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlOiBmdW5jdGlvbiAoY29tcG9uZW50cywgb3B0aW9ucykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudHM7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlcmlhbGl6ZTogVVJJLlNDSEVNRVNbXCJ1cm5cIl0uc2VyaWFsaXplXHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGNvbXBvbmVudHMuc2NoZW1lID0gc2NoZW1lO1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5wYXRoID0gbWF0Y2hlc1syXTtcclxuICAgICAgICAgICAgICAgIGNvbXBvbmVudHMgPSBzY2hlbWVIYW5kbGVyLnBhcnNlKGNvbXBvbmVudHMsIG9wdGlvbnMpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5lcnJvciA9IGNvbXBvbmVudHMuZXJyb3IgfHwgXCJVUk4gY2FuIG5vdCBiZSBwYXJzZWQuXCI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudHM7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBzZXJpYWxpemU6IGZ1bmN0aW9uIChjb21wb25lbnRzLCBvcHRpb25zKSB7XHJcbiAgICAgICAgICAgIHZhciBzY2hlbWUgPSBjb21wb25lbnRzLnNjaGVtZSB8fCBvcHRpb25zLnNjaGVtZSwgbWF0Y2hlcztcclxuICAgICAgICAgICAgaWYgKHNjaGVtZSAmJiBzY2hlbWUgIT09IFwidXJuXCIpIHtcclxuICAgICAgICAgICAgICAgIHZhciBtYXRjaGVzID0gc2NoZW1lLm1hdGNoKFVSTl9TQ0hFTUUpO1xyXG4gICAgICAgICAgICAgICAgaWYgKCFtYXRjaGVzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbWF0Y2hlcyA9IFtcInVybjpcIiArIHNjaGVtZSwgc2NoZW1lXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGNvbXBvbmVudHMuc2NoZW1lID0gXCJ1cm5cIjtcclxuICAgICAgICAgICAgICAgIGNvbXBvbmVudHMucGF0aCA9IG1hdGNoZXNbMV0gKyBcIjpcIiArIChjb21wb25lbnRzLnBhdGggPyBjb21wb25lbnRzLnBhdGgucmVwbGFjZShVUk5fRVhDTFVERUQsIHBjdEVuY0NoYXIpIDogXCJcIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudHM7XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxuICAgIC8vUkZDIDQxMjJcclxuICAgIFVSSS5TQ0hFTUVTW1widXJuOnV1aWRcIl0gPSB7XHJcbiAgICAgICAgcGFyc2U6IGZ1bmN0aW9uIChjb21wb25lbnRzLCBvcHRpb25zKSB7XHJcbiAgICAgICAgICAgIGlmICghb3B0aW9ucy50b2xlcmFudCAmJiAoIWNvbXBvbmVudHMucGF0aCB8fCAhY29tcG9uZW50cy5wYXRoLm1hdGNoKFVVSUQpKSkge1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5lcnJvciA9IGNvbXBvbmVudHMuZXJyb3IgfHwgXCJVVUlEIGlzIG5vdCB2YWxpZC5cIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50cztcclxuICAgICAgICB9LFxyXG4gICAgICAgIHNlcmlhbGl6ZTogZnVuY3Rpb24gKGNvbXBvbmVudHMsIG9wdGlvbnMpIHtcclxuICAgICAgICAgICAgLy9lbnN1cmUgVVVJRCBpcyB2YWxpZFxyXG4gICAgICAgICAgICBpZiAoIW9wdGlvbnMudG9sZXJhbnQgJiYgKCFjb21wb25lbnRzLnBhdGggfHwgIWNvbXBvbmVudHMucGF0aC5tYXRjaChVVUlEKSkpIHtcclxuICAgICAgICAgICAgICAgIC8vaW52YWxpZCBVVUlEcyBjYW4gbm90IGhhdmUgdGhpcyBzY2hlbWVcclxuICAgICAgICAgICAgICAgIGNvbXBvbmVudHMuc2NoZW1lID0gdW5kZWZpbmVkO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy9ub3JtYWxpemUgVVVJRFxyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5wYXRoID0gKGNvbXBvbmVudHMucGF0aCB8fCBcIlwiKS50b0xvd2VyQ2FzZSgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiBVUkkuU0NIRU1FU1tcInVyblwiXS5zZXJpYWxpemUoY29tcG9uZW50cywgb3B0aW9ucyk7XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxufSgpKTtcclxuIiwiLyoqXHJcbiAqIFVSSS5qc1xyXG4gKlxyXG4gKiBAZmlsZW92ZXJ2aWV3IEFuIFJGQyAzOTg2IGNvbXBsaWFudCwgc2NoZW1lIGV4dGVuZGFibGUgVVJJIHBhcnNpbmcvdmFsaWRhdGluZy9yZXNvbHZpbmcgbGlicmFyeSBmb3IgSmF2YVNjcmlwdC5cclxuICogQGF1dGhvciA8YSBocmVmPVwibWFpbHRvOmdhcnkuY291cnRAZ21haWwuY29tXCI+R2FyeSBDb3VydDwvYT5cclxuICogQHZlcnNpb24gMi4wLjBcclxuICogQHNlZSBodHRwOi8vZ2l0aHViLmNvbS9nYXJ5Y291cnQvdXJpLWpzXHJcbiAqIEBsaWNlbnNlIFVSSS5qcyB2Mi4wLjAgKGMpIDIwMTEgR2FyeSBDb3VydC4gTGljZW5zZTogaHR0cDovL2dpdGh1Yi5jb20vZ2FyeWNvdXJ0L3VyaS1qc1xyXG4gKi9cclxuLyoqXHJcbiAqIENvcHlyaWdodCAyMDExIEdhcnkgQ291cnQuIEFsbCByaWdodHMgcmVzZXJ2ZWQuXHJcbiAqXHJcbiAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dCBtb2RpZmljYXRpb24sIGFyZVxyXG4gKiBwZXJtaXR0ZWQgcHJvdmlkZWQgdGhhdCB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnMgYXJlIG1ldDpcclxuICpcclxuICogICAgMS4gUmVkaXN0cmlidXRpb25zIG9mIHNvdXJjZSBjb2RlIG11c3QgcmV0YWluIHRoZSBhYm92ZSBjb3B5cmlnaHQgbm90aWNlLCB0aGlzIGxpc3Qgb2ZcclxuICogICAgICAgY29uZGl0aW9ucyBhbmQgdGhlIGZvbGxvd2luZyBkaXNjbGFpbWVyLlxyXG4gKlxyXG4gKiAgICAyLiBSZWRpc3RyaWJ1dGlvbnMgaW4gYmluYXJ5IGZvcm0gbXVzdCByZXByb2R1Y2UgdGhlIGFib3ZlIGNvcHlyaWdodCBub3RpY2UsIHRoaXMgbGlzdFxyXG4gKiAgICAgICBvZiBjb25kaXRpb25zIGFuZCB0aGUgZm9sbG93aW5nIGRpc2NsYWltZXIgaW4gdGhlIGRvY3VtZW50YXRpb24gYW5kL29yIG90aGVyIG1hdGVyaWFsc1xyXG4gKiAgICAgICBwcm92aWRlZCB3aXRoIHRoZSBkaXN0cmlidXRpb24uXHJcbiAqXHJcbiAqIFRISVMgU09GVFdBUkUgSVMgUFJPVklERUQgQlkgR0FSWSBDT1VSVCBgYEFTIElTJycgQU5EIEFOWSBFWFBSRVNTIE9SIElNUExJRURcclxuICogV0FSUkFOVElFUywgSU5DTFVESU5HLCBCVVQgTk9UIExJTUlURUQgVE8sIFRIRSBJTVBMSUVEIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZIEFORFxyXG4gKiBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBUkUgRElTQ0xBSU1FRC4gSU4gTk8gRVZFTlQgU0hBTEwgR0FSWSBDT1VSVCBPUlxyXG4gKiBDT05UUklCVVRPUlMgQkUgTElBQkxFIEZPUiBBTlkgRElSRUNULCBJTkRJUkVDVCwgSU5DSURFTlRBTCwgU1BFQ0lBTCwgRVhFTVBMQVJZLCBPUlxyXG4gKiBDT05TRVFVRU5USUFMIERBTUFHRVMgKElOQ0xVRElORywgQlVUIE5PVCBMSU1JVEVEIFRPLCBQUk9DVVJFTUVOVCBPRiBTVUJTVElUVVRFIEdPT0RTIE9SXHJcbiAqIFNFUlZJQ0VTOyBMT1NTIE9GIFVTRSwgREFUQSwgT1IgUFJPRklUUzsgT1IgQlVTSU5FU1MgSU5URVJSVVBUSU9OKSBIT1dFVkVSIENBVVNFRCBBTkQgT05cclxuICogQU5ZIFRIRU9SWSBPRiBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQ09OVFJBQ1QsIFNUUklDVCBMSUFCSUxJVFksIE9SIFRPUlQgKElOQ0xVRElOR1xyXG4gKiBORUdMSUdFTkNFIE9SIE9USEVSV0lTRSkgQVJJU0lORyBJTiBBTlkgV0FZIE9VVCBPRiBUSEUgVVNFIE9GIFRISVMgU09GVFdBUkUsIEVWRU4gSUZcclxuICogQURWSVNFRCBPRiBUSEUgUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0UuXHJcbiAqXHJcbiAqIFRoZSB2aWV3cyBhbmQgY29uY2x1c2lvbnMgY29udGFpbmVkIGluIHRoZSBzb2Z0d2FyZSBhbmQgZG9jdW1lbnRhdGlvbiBhcmUgdGhvc2Ugb2YgdGhlXHJcbiAqIGF1dGhvcnMgYW5kIHNob3VsZCBub3QgYmUgaW50ZXJwcmV0ZWQgYXMgcmVwcmVzZW50aW5nIG9mZmljaWFsIHBvbGljaWVzLCBlaXRoZXIgZXhwcmVzc2VkXHJcbiAqIG9yIGltcGxpZWQsIG9mIEdhcnkgQ291cnQuXHJcbiAqL1xyXG4vLy88cmVmZXJlbmNlIHBhdGg9XCJwdW55Y29kZS5kLnRzXCIvPlxyXG4vLy88cmVmZXJlbmNlIHBhdGg9XCJjb21tb25qcy5kLnRzXCIvPlxyXG4vKipcclxuICogQ29tcGlsZXIgc3dpdGNoIGZvciBpbmRpY2F0aW5nIGNvZGUgaXMgY29tcGlsZWRcclxuICogQGRlZmluZSB7Ym9vbGVhbn1cclxuICovXHJcbnZhciBDT01QSUxFRCA9IGZhbHNlO1xyXG4vKipcclxuICogQ29tcGlsZXIgc3dpdGNoIGZvciBzdXBwb3J0aW5nIElSSSBVUklzXHJcbiAqIEBkZWZpbmUge2Jvb2xlYW59XHJcbiAqL1xyXG52YXIgVVJJX19JUklfU1VQUE9SVCA9IHRydWU7XHJcbi8qKlxyXG4gKiBDb21waWxlciBzd2l0Y2ggZm9yIHN1cHBvcnRpbmcgVVJJIHZhbGlkYXRpb25cclxuICogQGRlZmluZSB7Ym9vbGVhbn1cclxuICovXHJcbnZhciBVUklfX1ZBTElEQVRFX1NVUFBPUlQgPSB0cnVlO1xyXG52YXIgVVJJID0gKGZ1bmN0aW9uICgpIHtcclxuICAgIGZ1bmN0aW9uIG1lcmdlKCkge1xyXG4gICAgICAgIHZhciBzZXRzID0gW107XHJcbiAgICAgICAgZm9yICh2YXIgX2kgPSAwOyBfaSA8IGFyZ3VtZW50cy5sZW5ndGg7IF9pKyspIHtcclxuICAgICAgICAgICAgc2V0c1tfaSAtIDBdID0gYXJndW1lbnRzW19pXTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKHNldHMubGVuZ3RoID4gMSkge1xyXG4gICAgICAgICAgICBzZXRzWzBdID0gc2V0c1swXS5zbGljZSgwLCAtMSk7XHJcbiAgICAgICAgICAgIHZhciB4bCA9IHNldHMubGVuZ3RoIC0gMTtcclxuICAgICAgICAgICAgZm9yICh2YXIgeCA9IDE7IHggPCB4bDsgKyt4KSB7XHJcbiAgICAgICAgICAgICAgICBzZXRzW3hdID0gc2V0c1t4XS5zbGljZSgxLCAtMSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2V0c1t4bF0gPSBzZXRzW3hsXS5zbGljZSgxKTtcclxuICAgICAgICAgICAgcmV0dXJuIHNldHMuam9pbignJyk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gc2V0c1swXTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICBmdW5jdGlvbiBzdWJleHAoc3RyKSB7XHJcbiAgICAgICAgcmV0dXJuIFwiKD86XCIgKyBzdHIgKyBcIilcIjtcclxuICAgIH1cclxuICAgIGZ1bmN0aW9uIGJ1aWxkRXhwcyhpc0lSSSkge1xyXG4gICAgICAgIHZhciBBTFBIQSQkID0gXCJbQS1aYS16XVwiLCBDUiQgPSBcIltcXFxceDBEXVwiLCBESUdJVCQkID0gXCJbMC05XVwiLCBEUVVPVEUkJCA9IFwiW1xcXFx4MjJdXCIsIEhFWERJRyQkID0gbWVyZ2UoRElHSVQkJCwgXCJbQS1GYS1mXVwiKSwgTEYkJCA9IFwiW1xcXFx4MEFdXCIsIFNQJCQgPSBcIltcXFxceDIwXVwiLCBQQ1RfRU5DT0RFRCQgPSBzdWJleHAoc3ViZXhwKFwiJVtFRmVmXVwiICsgSEVYRElHJCQgKyBcIiVcIiArIEhFWERJRyQkICsgSEVYRElHJCQgKyBcIiVcIiArIEhFWERJRyQkICsgSEVYRElHJCQpICsgXCJ8XCIgKyBzdWJleHAoXCIlWzg5QS1GYS1mXVwiICsgSEVYRElHJCQgKyBcIiVcIiArIEhFWERJRyQkICsgSEVYRElHJCQpICsgXCJ8XCIgKyBzdWJleHAoXCIlXCIgKyBIRVhESUckJCArIEhFWERJRyQkKSksIEdFTl9ERUxJTVMkJCA9IFwiW1xcXFw6XFxcXC9cXFxcP1xcXFwjXFxcXFtcXFxcXVxcXFxAXVwiLCBTVUJfREVMSU1TJCQgPSBcIltcXFxcIVxcXFwkXFxcXCZcXFxcJ1xcXFwoXFxcXClcXFxcKlxcXFwrXFxcXCxcXFxcO1xcXFw9XVwiLCBSRVNFUlZFRCQkID0gbWVyZ2UoR0VOX0RFTElNUyQkLCBTVUJfREVMSU1TJCQpLCBVQ1NDSEFSJCQgPSBpc0lSSSA/IFwiW1xcXFx4QTAtXFxcXHUyMDBEXFxcXHUyMDEwLVxcXFx1MjAyOVxcXFx1MjAyRi1cXFxcdUQ3RkZcXFxcdUY5MDAtXFxcXHVGRENGXFxcXHVGREYwLVxcXFx1RkZFRl1cIiA6IFwiW11cIiwgSVBSSVZBVEUkJCA9IGlzSVJJID8gXCJbXFxcXHVFMDAwLVxcXFx1RjhGRl1cIiA6IFwiW11cIiwgVU5SRVNFUlZFRCQkID0gbWVyZ2UoQUxQSEEkJCwgRElHSVQkJCwgXCJbXFxcXC1cXFxcLlxcXFxfXFxcXH5dXCIsIFVDU0NIQVIkJCksIFNDSEVNRSQgPSBzdWJleHAoQUxQSEEkJCArIG1lcmdlKEFMUEhBJCQsIERJR0lUJCQsIFwiW1xcXFwrXFxcXC1cXFxcLl1cIikgKyBcIipcIiksIFVTRVJJTkZPJCA9IHN1YmV4cChzdWJleHAoUENUX0VOQ09ERUQkICsgXCJ8XCIgKyBtZXJnZShVTlJFU0VSVkVEJCQsIFNVQl9ERUxJTVMkJCwgXCJbXFxcXDpdXCIpKSArIFwiKlwiKSwgREVDX09DVEVUJCA9IHN1YmV4cChzdWJleHAoXCIyNVswLTVdXCIpICsgXCJ8XCIgKyBzdWJleHAoXCIyWzAtNF1cIiArIERJR0lUJCQpICsgXCJ8XCIgKyBzdWJleHAoXCIxXCIgKyBESUdJVCQkICsgRElHSVQkJCkgKyBcInxcIiArIHN1YmV4cChcIlsxLTldXCIgKyBESUdJVCQkKSArIFwifFwiICsgRElHSVQkJCksIElQVjRBRERSRVNTJCA9IHN1YmV4cChERUNfT0NURVQkICsgXCJcXFxcLlwiICsgREVDX09DVEVUJCArIFwiXFxcXC5cIiArIERFQ19PQ1RFVCQgKyBcIlxcXFwuXCIgKyBERUNfT0NURVQkKSwgSDE2JCA9IHN1YmV4cChIRVhESUckJCArIFwiezEsNH1cIiksIExTMzIkID0gc3ViZXhwKHN1YmV4cChIMTYkICsgXCJcXFxcOlwiICsgSDE2JCkgKyBcInxcIiArIElQVjRBRERSRVNTJCksIElQVjZBRERSRVNTJCA9IHN1YmV4cChtZXJnZShVTlJFU0VSVkVEJCQsIFNVQl9ERUxJTVMkJCwgXCJbXFxcXDpdXCIpICsgXCIrXCIpLCBJUFZGVVRVUkUkID0gc3ViZXhwKFwidlwiICsgSEVYRElHJCQgKyBcIitcXFxcLlwiICsgbWVyZ2UoVU5SRVNFUlZFRCQkLCBTVUJfREVMSU1TJCQsIFwiW1xcXFw6XVwiKSArIFwiK1wiKSwgSVBfTElURVJBTCQgPSBzdWJleHAoXCJcXFxcW1wiICsgc3ViZXhwKElQVjZBRERSRVNTJCArIFwifFwiICsgSVBWRlVUVVJFJCkgKyBcIlxcXFxdXCIpLCBSRUdfTkFNRSQgPSBzdWJleHAoc3ViZXhwKFBDVF9FTkNPREVEJCArIFwifFwiICsgbWVyZ2UoVU5SRVNFUlZFRCQkLCBTVUJfREVMSU1TJCQpKSArIFwiKlwiKSwgSE9TVCQgPSBzdWJleHAoSVBfTElURVJBTCQgKyBcInxcIiArIElQVjRBRERSRVNTJCArIFwiKD8hXCIgKyBSRUdfTkFNRSQgKyBcIilcIiArIFwifFwiICsgUkVHX05BTUUkKSwgUE9SVCQgPSBzdWJleHAoRElHSVQkJCArIFwiKlwiKSwgQVVUSE9SSVRZJCA9IHN1YmV4cChzdWJleHAoVVNFUklORk8kICsgXCJAXCIpICsgXCI/XCIgKyBIT1NUJCArIHN1YmV4cChcIlxcXFw6XCIgKyBQT1JUJCkgKyBcIj9cIiksIFBDSEFSJCA9IHN1YmV4cChQQ1RfRU5DT0RFRCQgKyBcInxcIiArIG1lcmdlKFVOUkVTRVJWRUQkJCwgU1VCX0RFTElNUyQkLCBcIltcXFxcOlxcXFxAXVwiKSksIFNFR01FTlQkID0gc3ViZXhwKFBDSEFSJCArIFwiKlwiKSwgU0VHTUVOVF9OWiQgPSBzdWJleHAoUENIQVIkICsgXCIrXCIpLCBTRUdNRU5UX05aX05DJCA9IHN1YmV4cChzdWJleHAoUENUX0VOQ09ERUQkICsgXCJ8XCIgKyBtZXJnZShVTlJFU0VSVkVEJCQsIFNVQl9ERUxJTVMkJCwgXCJbXFxcXEBdXCIpKSArIFwiK1wiKSwgUEFUSF9BQkVNUFRZJCA9IHN1YmV4cChzdWJleHAoXCJcXFxcL1wiICsgU0VHTUVOVCQpICsgXCIqXCIpLCBQQVRIX0FCU09MVVRFJCA9IHN1YmV4cChcIlxcXFwvXCIgKyBzdWJleHAoU0VHTUVOVF9OWiQgKyBQQVRIX0FCRU1QVFkkKSArIFwiP1wiKSwgUEFUSF9OT1NDSEVNRSQgPSBzdWJleHAoU0VHTUVOVF9OWl9OQyQgKyBQQVRIX0FCRU1QVFkkKSwgUEFUSF9ST09UTEVTUyQgPSBzdWJleHAoU0VHTUVOVF9OWiQgKyBQQVRIX0FCRU1QVFkkKSwgUEFUSF9FTVBUWSQgPSBcIig/IVwiICsgUENIQVIkICsgXCIpXCIsIFBBVEgkID0gc3ViZXhwKFBBVEhfQUJFTVBUWSQgKyBcInxcIiArIFBBVEhfQUJTT0xVVEUkICsgXCJ8XCIgKyBQQVRIX05PU0NIRU1FJCArIFwifFwiICsgUEFUSF9ST09UTEVTUyQgKyBcInxcIiArIFBBVEhfRU1QVFkkKSwgUVVFUlkkID0gc3ViZXhwKHN1YmV4cChQQ0hBUiQgKyBcInxcIiArIG1lcmdlKFwiW1xcXFwvXFxcXD9dXCIsIElQUklWQVRFJCQpKSArIFwiKlwiKSwgRlJBR01FTlQkID0gc3ViZXhwKHN1YmV4cChQQ0hBUiQgKyBcInxbXFxcXC9cXFxcP11cIikgKyBcIipcIiksIEhJRVJfUEFSVCQgPSBzdWJleHAoc3ViZXhwKFwiXFxcXC9cXFxcL1wiICsgQVVUSE9SSVRZJCArIFBBVEhfQUJFTVBUWSQpICsgXCJ8XCIgKyBQQVRIX0FCU09MVVRFJCArIFwifFwiICsgUEFUSF9ST09UTEVTUyQgKyBcInxcIiArIFBBVEhfRU1QVFkkKSwgVVJJJCA9IHN1YmV4cChTQ0hFTUUkICsgXCJcXFxcOlwiICsgSElFUl9QQVJUJCArIHN1YmV4cChcIlxcXFw/XCIgKyBRVUVSWSQpICsgXCI/XCIgKyBzdWJleHAoXCJcXFxcI1wiICsgRlJBR01FTlQkKSArIFwiP1wiKSwgUkVMQVRJVkVfUEFSVCQgPSBzdWJleHAoc3ViZXhwKFwiXFxcXC9cXFxcL1wiICsgQVVUSE9SSVRZJCArIFBBVEhfQUJFTVBUWSQpICsgXCJ8XCIgKyBQQVRIX0FCU09MVVRFJCArIFwifFwiICsgUEFUSF9OT1NDSEVNRSQgKyBcInxcIiArIFBBVEhfRU1QVFkkKSwgUkVMQVRJVkUkID0gc3ViZXhwKFJFTEFUSVZFX1BBUlQkICsgc3ViZXhwKFwiXFxcXD9cIiArIFFVRVJZJCkgKyBcIj9cIiArIHN1YmV4cChcIlxcXFwjXCIgKyBGUkFHTUVOVCQpICsgXCI/XCIpLCBVUklfUkVGRVJFTkNFJCA9IHN1YmV4cChVUkkkICsgXCJ8XCIgKyBSRUxBVElWRSQpLCBBQlNPTFVURV9VUkkkID0gc3ViZXhwKFNDSEVNRSQgKyBcIlxcXFw6XCIgKyBISUVSX1BBUlQkICsgc3ViZXhwKFwiXFxcXD9cIiArIFFVRVJZJCkgKyBcIj9cIiksIEdFTkVSSUNfUkVGJCA9IFwiXihcIiArIFNDSEVNRSQgKyBcIilcXFxcOlwiICsgc3ViZXhwKHN1YmV4cChcIlxcXFwvXFxcXC8oXCIgKyBzdWJleHAoXCIoXCIgKyBVU0VSSU5GTyQgKyBcIilAXCIpICsgXCI/KFwiICsgSE9TVCQgKyBcIilcIiArIHN1YmV4cChcIlxcXFw6KFwiICsgUE9SVCQgKyBcIilcIikgKyBcIj8pXCIpICsgXCI/KFwiICsgUEFUSF9BQkVNUFRZJCArIFwifFwiICsgUEFUSF9BQlNPTFVURSQgKyBcInxcIiArIFBBVEhfUk9PVExFU1MkICsgXCJ8XCIgKyBQQVRIX0VNUFRZJCArIFwiKVwiKSArIHN1YmV4cChcIlxcXFw/KFwiICsgUVVFUlkkICsgXCIpXCIpICsgXCI/XCIgKyBzdWJleHAoXCJcXFxcIyhcIiArIEZSQUdNRU5UJCArIFwiKVwiKSArIFwiPyRcIiwgUkVMQVRJVkVfUkVGJCA9IFwiXigpezB9XCIgKyBzdWJleHAoc3ViZXhwKFwiXFxcXC9cXFxcLyhcIiArIHN1YmV4cChcIihcIiArIFVTRVJJTkZPJCArIFwiKUBcIikgKyBcIj8oXCIgKyBIT1NUJCArIFwiKVwiICsgc3ViZXhwKFwiXFxcXDooXCIgKyBQT1JUJCArIFwiKVwiKSArIFwiPylcIikgKyBcIj8oXCIgKyBQQVRIX0FCRU1QVFkkICsgXCJ8XCIgKyBQQVRIX0FCU09MVVRFJCArIFwifFwiICsgUEFUSF9OT1NDSEVNRSQgKyBcInxcIiArIFBBVEhfRU1QVFkkICsgXCIpXCIpICsgc3ViZXhwKFwiXFxcXD8oXCIgKyBRVUVSWSQgKyBcIilcIikgKyBcIj9cIiArIHN1YmV4cChcIlxcXFwjKFwiICsgRlJBR01FTlQkICsgXCIpXCIpICsgXCI/JFwiLCBBQlNPTFVURV9SRUYkID0gXCJeKFwiICsgU0NIRU1FJCArIFwiKVxcXFw6XCIgKyBzdWJleHAoc3ViZXhwKFwiXFxcXC9cXFxcLyhcIiArIHN1YmV4cChcIihcIiArIFVTRVJJTkZPJCArIFwiKUBcIikgKyBcIj8oXCIgKyBIT1NUJCArIFwiKVwiICsgc3ViZXhwKFwiXFxcXDooXCIgKyBQT1JUJCArIFwiKVwiKSArIFwiPylcIikgKyBcIj8oXCIgKyBQQVRIX0FCRU1QVFkkICsgXCJ8XCIgKyBQQVRIX0FCU09MVVRFJCArIFwifFwiICsgUEFUSF9ST09UTEVTUyQgKyBcInxcIiArIFBBVEhfRU1QVFkkICsgXCIpXCIpICsgc3ViZXhwKFwiXFxcXD8oXCIgKyBRVUVSWSQgKyBcIilcIikgKyBcIj8kXCIsIFNBTUVET0NfUkVGJCA9IFwiXlwiICsgc3ViZXhwKFwiXFxcXCMoXCIgKyBGUkFHTUVOVCQgKyBcIilcIikgKyBcIj8kXCIsIEFVVEhPUklUWV9SRUYkID0gXCJeXCIgKyBzdWJleHAoXCIoXCIgKyBVU0VSSU5GTyQgKyBcIilAXCIpICsgXCI/KFwiICsgSE9TVCQgKyBcIilcIiArIHN1YmV4cChcIlxcXFw6KFwiICsgUE9SVCQgKyBcIilcIikgKyBcIj8kXCI7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgVVJJX1JFRjogVVJJX19WQUxJREFURV9TVVBQT1JUICYmIG5ldyBSZWdFeHAoXCIoXCIgKyBHRU5FUklDX1JFRiQgKyBcIil8KFwiICsgUkVMQVRJVkVfUkVGJCArIFwiKVwiKSxcclxuICAgICAgICAgICAgTk9UX1NDSEVNRTogbmV3IFJlZ0V4cChtZXJnZShcIlteXVwiLCBBTFBIQSQkLCBESUdJVCQkLCBcIltcXFxcK1xcXFwtXFxcXC5dXCIpLCBcImdcIiksXHJcbiAgICAgICAgICAgIE5PVF9VU0VSSU5GTzogbmV3IFJlZ0V4cChtZXJnZShcIlteXFxcXCVcXFxcOl1cIiwgVU5SRVNFUlZFRCQkLCBTVUJfREVMSU1TJCQpLCBcImdcIiksXHJcbiAgICAgICAgICAgIE5PVF9IT1NUOiBuZXcgUmVnRXhwKG1lcmdlKFwiW15cXFxcJV1cIiwgVU5SRVNFUlZFRCQkLCBTVUJfREVMSU1TJCQpLCBcImdcIiksXHJcbiAgICAgICAgICAgIE5PVF9QQVRIOiBuZXcgUmVnRXhwKG1lcmdlKFwiW15cXFxcJVxcXFwvXFxcXDpcXFxcQF1cIiwgVU5SRVNFUlZFRCQkLCBTVUJfREVMSU1TJCQpLCBcImdcIiksXHJcbiAgICAgICAgICAgIE5PVF9QQVRIX05PU0NIRU1FOiBuZXcgUmVnRXhwKG1lcmdlKFwiW15cXFxcJVxcXFwvXFxcXEBdXCIsIFVOUkVTRVJWRUQkJCwgU1VCX0RFTElNUyQkKSwgXCJnXCIpLFxyXG4gICAgICAgICAgICBOT1RfUVVFUlk6IG5ldyBSZWdFeHAobWVyZ2UoXCJbXlxcXFwlXVwiLCBVTlJFU0VSVkVEJCQsIFNVQl9ERUxJTVMkJCwgXCJbXFxcXDpcXFxcQFxcXFwvXFxcXD9dXCIsIElQUklWQVRFJCQpLCBcImdcIiksXHJcbiAgICAgICAgICAgIE5PVF9GUkFHTUVOVDogbmV3IFJlZ0V4cChtZXJnZShcIlteXFxcXCVdXCIsIFVOUkVTRVJWRUQkJCwgU1VCX0RFTElNUyQkLCBcIltcXFxcOlxcXFxAXFxcXC9cXFxcP11cIiksIFwiZ1wiKSxcclxuICAgICAgICAgICAgRVNDQVBFOiBuZXcgUmVnRXhwKG1lcmdlKFwiW15dXCIsIFVOUkVTRVJWRUQkJCwgU1VCX0RFTElNUyQkKSwgXCJnXCIpLFxyXG4gICAgICAgICAgICBVTlJFU0VSVkVEOiBuZXcgUmVnRXhwKFVOUkVTRVJWRUQkJCwgXCJnXCIpLFxyXG4gICAgICAgICAgICBPVEhFUl9DSEFSUzogbmV3IFJlZ0V4cChtZXJnZShcIlteXFxcXCVdXCIsIFVOUkVTRVJWRUQkJCwgUkVTRVJWRUQkJCksIFwiZ1wiKSxcclxuICAgICAgICAgICAgUENUX0VOQ09ERUQ6IG5ldyBSZWdFeHAoUENUX0VOQ09ERUQkLCBcImdcIilcclxuICAgICAgICB9O1xyXG4gICAgfVxyXG4gICAgdmFyIFVSSV9QUk9UT0NPTCA9IGJ1aWxkRXhwcyhmYWxzZSksIElSSV9QUk9UT0NPTCA9IFVSSV9fSVJJX1NVUFBPUlQgPyBidWlsZEV4cHModHJ1ZSkgOiB1bmRlZmluZWQsIFVSSV9QQVJTRSA9IC9eKD86KFteOlxcLz8jXSspOik/KD86XFwvXFwvKCg/OihbXlxcLz8jQF0qKUApPyhbXlxcLz8jOl0qKSg/OlxcOihcXGQqKSk/KSk/KFtePyNdKikoPzpcXD8oW14jXSopKT8oPzojKCg/Oi58XFxuKSopKT8vaSwgUkRTMSA9IC9eXFwuXFwuP1xcLy8sIFJEUzIgPSAvXlxcL1xcLihcXC98JCkvLCBSRFMzID0gL15cXC9cXC5cXC4oXFwvfCQpLywgUkRTNCA9IC9eXFwuXFwuPyQvLCBSRFM1ID0gL15cXC8/KD86LnxcXG4pKj8oPz1cXC98JCkvLCBOT19NQVRDSF9JU19VTkRFRklORUQgPSAoXCJcIikubWF0Y2goLygpezB9LylbMV0gPT09IHVuZGVmaW5lZDtcclxuICAgIGZ1bmN0aW9uIHBjdEVuY0NoYXIoY2hyKSB7XHJcbiAgICAgICAgdmFyIGMgPSBjaHIuY2hhckNvZGVBdCgwKSwgZTtcclxuICAgICAgICBpZiAoYyA8IDE2KVxyXG4gICAgICAgICAgICBlID0gXCIlMFwiICsgYy50b1N0cmluZygxNikudG9VcHBlckNhc2UoKTtcclxuICAgICAgICBlbHNlIGlmIChjIDwgMTI4KVxyXG4gICAgICAgICAgICBlID0gXCIlXCIgKyBjLnRvU3RyaW5nKDE2KS50b1VwcGVyQ2FzZSgpO1xyXG4gICAgICAgIGVsc2UgaWYgKGMgPCAyMDQ4KVxyXG4gICAgICAgICAgICBlID0gXCIlXCIgKyAoKGMgPj4gNikgfCAxOTIpLnRvU3RyaW5nKDE2KS50b1VwcGVyQ2FzZSgpICsgXCIlXCIgKyAoKGMgJiA2MykgfCAxMjgpLnRvU3RyaW5nKDE2KS50b1VwcGVyQ2FzZSgpO1xyXG4gICAgICAgIGVsc2VcclxuICAgICAgICAgICAgZSA9IFwiJVwiICsgKChjID4+IDEyKSB8IDIyNCkudG9TdHJpbmcoMTYpLnRvVXBwZXJDYXNlKCkgKyBcIiVcIiArICgoKGMgPj4gNikgJiA2MykgfCAxMjgpLnRvU3RyaW5nKDE2KS50b1VwcGVyQ2FzZSgpICsgXCIlXCIgKyAoKGMgJiA2MykgfCAxMjgpLnRvU3RyaW5nKDE2KS50b1VwcGVyQ2FzZSgpO1xyXG4gICAgICAgIHJldHVybiBlO1xyXG4gICAgfVxyXG4gICAgZnVuY3Rpb24gcGN0RGVjQ2hhcnMoc3RyKSB7XHJcbiAgICAgICAgdmFyIG5ld1N0ciA9IFwiXCIsIGkgPSAwLCBpbCA9IHN0ci5sZW5ndGgsIGMsIGMyLCBjMztcclxuICAgICAgICB3aGlsZSAoaSA8IGlsKSB7XHJcbiAgICAgICAgICAgIGMgPSBwYXJzZUludChzdHIuc3Vic3RyKGkgKyAxLCAyKSwgMTYpO1xyXG4gICAgICAgICAgICBpZiAoYyA8IDEyOCkge1xyXG4gICAgICAgICAgICAgICAgbmV3U3RyICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoYyk7XHJcbiAgICAgICAgICAgICAgICBpICs9IDM7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSBpZiAoYyA+PSAxOTQgJiYgYyA8IDIyNCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKChpbCAtIGkpID49IDYpIHtcclxuICAgICAgICAgICAgICAgICAgICBjMiA9IHBhcnNlSW50KHN0ci5zdWJzdHIoaSArIDQsIDIpLCAxNik7XHJcbiAgICAgICAgICAgICAgICAgICAgbmV3U3RyICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoKChjICYgMzEpIDw8IDYpIHwgKGMyICYgNjMpKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIG5ld1N0ciArPSBzdHIuc3Vic3RyKGksIDYpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaSArPSA2O1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2UgaWYgKGMgPj0gMjI0KSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoKGlsIC0gaSkgPj0gOSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGMyID0gcGFyc2VJbnQoc3RyLnN1YnN0cihpICsgNCwgMiksIDE2KTtcclxuICAgICAgICAgICAgICAgICAgICBjMyA9IHBhcnNlSW50KHN0ci5zdWJzdHIoaSArIDcsIDIpLCAxNik7XHJcbiAgICAgICAgICAgICAgICAgICAgbmV3U3RyICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoKChjICYgMTUpIDw8IDEyKSB8ICgoYzIgJiA2MykgPDwgNikgfCAoYzMgJiA2MykpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmV3U3RyICs9IHN0ci5zdWJzdHIoaSwgOSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpICs9IDk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBuZXdTdHIgKz0gc3RyLnN1YnN0cihpLCAzKTtcclxuICAgICAgICAgICAgICAgIGkgKz0gMztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gbmV3U3RyO1xyXG4gICAgfVxyXG4gICAgZnVuY3Rpb24gdHlwZU9mKG8pIHtcclxuICAgICAgICByZXR1cm4gbyA9PT0gdW5kZWZpbmVkID8gXCJ1bmRlZmluZWRcIiA6IChvID09PSBudWxsID8gXCJudWxsXCIgOiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwobykuc3BsaXQoXCIgXCIpLnBvcCgpLnNwbGl0KFwiXVwiKS5zaGlmdCgpLnRvTG93ZXJDYXNlKCkpO1xyXG4gICAgfVxyXG4gICAgZnVuY3Rpb24gdG9VcHBlckNhc2Uoc3RyKSB7XHJcbiAgICAgICAgcmV0dXJuIHN0ci50b1VwcGVyQ2FzZSgpO1xyXG4gICAgfVxyXG4gICAgdmFyIFNDSEVNRVMgPSB7fTtcclxuICAgIGZ1bmN0aW9uIF9ub3JtYWxpemVDb21wb25lbnRFbmNvZGluZyhjb21wb25lbnRzLCBwcm90b2NvbCkge1xyXG4gICAgICAgIGZ1bmN0aW9uIGRlY29kZVVucmVzZXJ2ZWQoc3RyKSB7XHJcbiAgICAgICAgICAgIHZhciBkZWNTdHIgPSBwY3REZWNDaGFycyhzdHIpO1xyXG4gICAgICAgICAgICByZXR1cm4gKCFkZWNTdHIubWF0Y2gocHJvdG9jb2wuVU5SRVNFUlZFRCkgPyBzdHIgOiBkZWNTdHIpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoY29tcG9uZW50cy5zY2hlbWUpXHJcbiAgICAgICAgICAgIGNvbXBvbmVudHMuc2NoZW1lID0gU3RyaW5nKGNvbXBvbmVudHMuc2NoZW1lKS5yZXBsYWNlKHByb3RvY29sLlBDVF9FTkNPREVELCBkZWNvZGVVbnJlc2VydmVkKS50b0xvd2VyQ2FzZSgpLnJlcGxhY2UocHJvdG9jb2wuTk9UX1NDSEVNRSwgXCJcIik7XHJcbiAgICAgICAgaWYgKGNvbXBvbmVudHMudXNlcmluZm8gIT09IHVuZGVmaW5lZClcclxuICAgICAgICAgICAgY29tcG9uZW50cy51c2VyaW5mbyA9IFN0cmluZyhjb21wb25lbnRzLnVzZXJpbmZvKS5yZXBsYWNlKHByb3RvY29sLlBDVF9FTkNPREVELCBkZWNvZGVVbnJlc2VydmVkKS5yZXBsYWNlKHByb3RvY29sLk5PVF9VU0VSSU5GTywgcGN0RW5jQ2hhcikucmVwbGFjZShwcm90b2NvbC5QQ1RfRU5DT0RFRCwgdG9VcHBlckNhc2UpO1xyXG4gICAgICAgIGlmIChjb21wb25lbnRzLmhvc3QgIT09IHVuZGVmaW5lZClcclxuICAgICAgICAgICAgY29tcG9uZW50cy5ob3N0ID0gU3RyaW5nKGNvbXBvbmVudHMuaG9zdCkucmVwbGFjZShwcm90b2NvbC5QQ1RfRU5DT0RFRCwgZGVjb2RlVW5yZXNlcnZlZCkudG9Mb3dlckNhc2UoKS5yZXBsYWNlKHByb3RvY29sLk5PVF9IT1NULCBwY3RFbmNDaGFyKS5yZXBsYWNlKHByb3RvY29sLlBDVF9FTkNPREVELCB0b1VwcGVyQ2FzZSk7XHJcbiAgICAgICAgaWYgKGNvbXBvbmVudHMucGF0aCAhPT0gdW5kZWZpbmVkKVxyXG4gICAgICAgICAgICBjb21wb25lbnRzLnBhdGggPSBTdHJpbmcoY29tcG9uZW50cy5wYXRoKS5yZXBsYWNlKHByb3RvY29sLlBDVF9FTkNPREVELCBkZWNvZGVVbnJlc2VydmVkKS5yZXBsYWNlKChjb21wb25lbnRzLnNjaGVtZSA/IHByb3RvY29sLk5PVF9QQVRIIDogcHJvdG9jb2wuTk9UX1BBVEhfTk9TQ0hFTUUpLCBwY3RFbmNDaGFyKS5yZXBsYWNlKHByb3RvY29sLlBDVF9FTkNPREVELCB0b1VwcGVyQ2FzZSk7XHJcbiAgICAgICAgaWYgKGNvbXBvbmVudHMucXVlcnkgIT09IHVuZGVmaW5lZClcclxuICAgICAgICAgICAgY29tcG9uZW50cy5xdWVyeSA9IFN0cmluZyhjb21wb25lbnRzLnF1ZXJ5KS5yZXBsYWNlKHByb3RvY29sLlBDVF9FTkNPREVELCBkZWNvZGVVbnJlc2VydmVkKS5yZXBsYWNlKHByb3RvY29sLk5PVF9RVUVSWSwgcGN0RW5jQ2hhcikucmVwbGFjZShwcm90b2NvbC5QQ1RfRU5DT0RFRCwgdG9VcHBlckNhc2UpO1xyXG4gICAgICAgIGlmIChjb21wb25lbnRzLmZyYWdtZW50ICE9PSB1bmRlZmluZWQpXHJcbiAgICAgICAgICAgIGNvbXBvbmVudHMuZnJhZ21lbnQgPSBTdHJpbmcoY29tcG9uZW50cy5mcmFnbWVudCkucmVwbGFjZShwcm90b2NvbC5QQ1RfRU5DT0RFRCwgZGVjb2RlVW5yZXNlcnZlZCkucmVwbGFjZShwcm90b2NvbC5OT1RfRlJBR01FTlQsIHBjdEVuY0NoYXIpLnJlcGxhY2UocHJvdG9jb2wuUENUX0VOQ09ERUQsIHRvVXBwZXJDYXNlKTtcclxuICAgICAgICByZXR1cm4gY29tcG9uZW50cztcclxuICAgIH1cclxuICAgIDtcclxuICAgIGZ1bmN0aW9uIHBhcnNlKHVyaVN0cmluZywgb3B0aW9ucykge1xyXG4gICAgICAgIGlmIChvcHRpb25zID09PSB2b2lkIDApIHsgb3B0aW9ucyA9IHt9OyB9XHJcbiAgICAgICAgdmFyIHByb3RvY29sID0gKFVSSV9fSVJJX1NVUFBPUlQgJiYgb3B0aW9ucy5pcmkgIT09IGZhbHNlID8gSVJJX1BST1RPQ09MIDogVVJJX1BST1RPQ09MKSwgbWF0Y2hlcywgcGFyc2VFcnJvciA9IGZhbHNlLCBjb21wb25lbnRzID0ge30sIHNjaGVtZUhhbmRsZXI7XHJcbiAgICAgICAgaWYgKG9wdGlvbnMucmVmZXJlbmNlID09PSBcInN1ZmZpeFwiKVxyXG4gICAgICAgICAgICB1cmlTdHJpbmcgPSAob3B0aW9ucy5zY2hlbWUgPyBvcHRpb25zLnNjaGVtZSArIFwiOlwiIDogXCJcIikgKyBcIi8vXCIgKyB1cmlTdHJpbmc7XHJcbiAgICAgICAgaWYgKFVSSV9fVkFMSURBVEVfU1VQUE9SVCkge1xyXG4gICAgICAgICAgICBtYXRjaGVzID0gdXJpU3RyaW5nLm1hdGNoKHByb3RvY29sLlVSSV9SRUYpO1xyXG4gICAgICAgICAgICBpZiAobWF0Y2hlcykge1xyXG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoZXNbMV0pIHtcclxuICAgICAgICAgICAgICAgICAgICAvL2dlbmVyaWMgVVJJXHJcbiAgICAgICAgICAgICAgICAgICAgbWF0Y2hlcyA9IG1hdGNoZXMuc2xpY2UoMSwgMTApO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy9yZWxhdGl2ZSBVUklcclxuICAgICAgICAgICAgICAgICAgICBtYXRjaGVzID0gbWF0Y2hlcy5zbGljZSgxMCwgMTkpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICghbWF0Y2hlcykge1xyXG4gICAgICAgICAgICAgICAgcGFyc2VFcnJvciA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICBpZiAoIW9wdGlvbnMudG9sZXJhbnQpXHJcbiAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50cy5lcnJvciA9IGNvbXBvbmVudHMuZXJyb3IgfHwgXCJVUkkgaXMgbm90IHN0cmljdGx5IHZhbGlkLlwiO1xyXG4gICAgICAgICAgICAgICAgbWF0Y2hlcyA9IHVyaVN0cmluZy5tYXRjaChVUklfUEFSU0UpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICBtYXRjaGVzID0gdXJpU3RyaW5nLm1hdGNoKFVSSV9QQVJTRSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChtYXRjaGVzKSB7XHJcbiAgICAgICAgICAgIGlmIChOT19NQVRDSF9JU19VTkRFRklORUQpIHtcclxuICAgICAgICAgICAgICAgIC8vc3RvcmUgZWFjaCBjb21wb25lbnRcclxuICAgICAgICAgICAgICAgIGNvbXBvbmVudHMuc2NoZW1lID0gbWF0Y2hlc1sxXTtcclxuICAgICAgICAgICAgICAgIC8vY29tcG9uZW50cy5hdXRob3JpdHkgPSBtYXRjaGVzWzJdO1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy51c2VyaW5mbyA9IG1hdGNoZXNbM107XHJcbiAgICAgICAgICAgICAgICBjb21wb25lbnRzLmhvc3QgPSBtYXRjaGVzWzRdO1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5wb3J0ID0gcGFyc2VJbnQobWF0Y2hlc1s1XSwgMTApO1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5wYXRoID0gbWF0Y2hlc1s2XSB8fCBcIlwiO1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5xdWVyeSA9IG1hdGNoZXNbN107XHJcbiAgICAgICAgICAgICAgICBjb21wb25lbnRzLmZyYWdtZW50ID0gbWF0Y2hlc1s4XTtcclxuICAgICAgICAgICAgICAgIC8vZml4IHBvcnQgbnVtYmVyXHJcbiAgICAgICAgICAgICAgICBpZiAoaXNOYU4oY29tcG9uZW50cy5wb3J0KSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudHMucG9ydCA9IG1hdGNoZXNbNV07XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAvL3N0b3JlIGVhY2ggY29tcG9uZW50XHJcbiAgICAgICAgICAgICAgICBjb21wb25lbnRzLnNjaGVtZSA9IG1hdGNoZXNbMV0gfHwgdW5kZWZpbmVkO1xyXG4gICAgICAgICAgICAgICAgLy9jb21wb25lbnRzLmF1dGhvcml0eSA9ICh1cmlTdHJpbmcuaW5kZXhPZihcIi8vXCIpICE9PSAtMSA/IG1hdGNoZXNbMl0gOiB1bmRlZmluZWQpO1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy51c2VyaW5mbyA9ICh1cmlTdHJpbmcuaW5kZXhPZihcIkBcIikgIT09IC0xID8gbWF0Y2hlc1szXSA6IHVuZGVmaW5lZCk7XHJcbiAgICAgICAgICAgICAgICBjb21wb25lbnRzLmhvc3QgPSAodXJpU3RyaW5nLmluZGV4T2YoXCIvL1wiKSAhPT0gLTEgPyBtYXRjaGVzWzRdIDogdW5kZWZpbmVkKTtcclxuICAgICAgICAgICAgICAgIGNvbXBvbmVudHMucG9ydCA9IHBhcnNlSW50KG1hdGNoZXNbNV0sIDEwKTtcclxuICAgICAgICAgICAgICAgIGNvbXBvbmVudHMucGF0aCA9IG1hdGNoZXNbNl0gfHwgXCJcIjtcclxuICAgICAgICAgICAgICAgIGNvbXBvbmVudHMucXVlcnkgPSAodXJpU3RyaW5nLmluZGV4T2YoXCI/XCIpICE9PSAtMSA/IG1hdGNoZXNbN10gOiB1bmRlZmluZWQpO1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5mcmFnbWVudCA9ICh1cmlTdHJpbmcuaW5kZXhPZihcIiNcIikgIT09IC0xID8gbWF0Y2hlc1s4XSA6IHVuZGVmaW5lZCk7XHJcbiAgICAgICAgICAgICAgICAvL2ZpeCBwb3J0IG51bWJlclxyXG4gICAgICAgICAgICAgICAgaWYgKGlzTmFOKGNvbXBvbmVudHMucG9ydCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRzLnBvcnQgPSAodXJpU3RyaW5nLm1hdGNoKC9cXC9cXC8oPzoufFxcbikqXFw6KD86XFwvfFxcP3xcXCN8JCkvKSA/IG1hdGNoZXNbNF0gOiB1bmRlZmluZWQpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIC8vZGV0ZXJtaW5lIHJlZmVyZW5jZSB0eXBlXHJcbiAgICAgICAgICAgIGlmIChjb21wb25lbnRzLnNjaGVtZSA9PT0gdW5kZWZpbmVkICYmIGNvbXBvbmVudHMudXNlcmluZm8gPT09IHVuZGVmaW5lZCAmJiBjb21wb25lbnRzLmhvc3QgPT09IHVuZGVmaW5lZCAmJiBjb21wb25lbnRzLnBvcnQgPT09IHVuZGVmaW5lZCAmJiAhY29tcG9uZW50cy5wYXRoICYmIGNvbXBvbmVudHMucXVlcnkgPT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5yZWZlcmVuY2UgPSBcInNhbWUtZG9jdW1lbnRcIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIGlmIChjb21wb25lbnRzLnNjaGVtZSA9PT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICBjb21wb25lbnRzLnJlZmVyZW5jZSA9IFwicmVsYXRpdmVcIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIGlmIChjb21wb25lbnRzLmZyYWdtZW50ID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGNvbXBvbmVudHMucmVmZXJlbmNlID0gXCJhYnNvbHV0ZVwiO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5yZWZlcmVuY2UgPSBcInVyaVwiO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIC8vY2hlY2sgZm9yIHJlZmVyZW5jZSBlcnJvcnNcclxuICAgICAgICAgICAgaWYgKG9wdGlvbnMucmVmZXJlbmNlICYmIG9wdGlvbnMucmVmZXJlbmNlICE9PSBcInN1ZmZpeFwiICYmIG9wdGlvbnMucmVmZXJlbmNlICE9PSBjb21wb25lbnRzLnJlZmVyZW5jZSkge1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5lcnJvciA9IGNvbXBvbmVudHMuZXJyb3IgfHwgXCJVUkkgaXMgbm90IGEgXCIgKyBvcHRpb25zLnJlZmVyZW5jZSArIFwiIHJlZmVyZW5jZS5cIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAvL2ZpbmQgc2NoZW1lIGhhbmRsZXJcclxuICAgICAgICAgICAgc2NoZW1lSGFuZGxlciA9IFNDSEVNRVNbKG9wdGlvbnMuc2NoZW1lIHx8IGNvbXBvbmVudHMuc2NoZW1lIHx8IFwiXCIpLnRvTG93ZXJDYXNlKCldO1xyXG4gICAgICAgICAgICAvL2NoZWNrIGlmIHNjaGVtZSBjYW4ndCBoYW5kbGUgSVJJc1xyXG4gICAgICAgICAgICBpZiAoVVJJX19JUklfU1VQUE9SVCAmJiB0eXBlb2YgcHVueWNvZGUgIT09IFwidW5kZWZpbmVkXCIgJiYgIW9wdGlvbnMudW5pY29kZVN1cHBvcnQgJiYgKCFzY2hlbWVIYW5kbGVyIHx8ICFzY2hlbWVIYW5kbGVyLnVuaWNvZGVTdXBwb3J0KSkge1xyXG4gICAgICAgICAgICAgICAgLy9pZiBob3N0IGNvbXBvbmVudCBpcyBhIGRvbWFpbiBuYW1lXHJcbiAgICAgICAgICAgICAgICBpZiAoY29tcG9uZW50cy5ob3N0ICYmIChvcHRpb25zLmRvbWFpbkhvc3QgfHwgKHNjaGVtZUhhbmRsZXIgJiYgc2NoZW1lSGFuZGxlci5kb21haW5Ib3N0KSkpIHtcclxuICAgICAgICAgICAgICAgICAgICAvL2NvbnZlcnQgVW5pY29kZSBJRE4gLT4gQVNDSUkgSUROXHJcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50cy5ob3N0ID0gcHVueWNvZGUudG9BU0NJSShjb21wb25lbnRzLmhvc3QucmVwbGFjZShwcm90b2NvbC5QQ1RfRU5DT0RFRCwgcGN0RGVjQ2hhcnMpLnRvTG93ZXJDYXNlKCkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRzLmVycm9yID0gY29tcG9uZW50cy5lcnJvciB8fCBcIkhvc3QncyBkb21haW4gbmFtZSBjYW4gbm90IGJlIGNvbnZlcnRlZCB0byBBU0NJSSB2aWEgcHVueWNvZGU6IFwiICsgZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAvL2NvbnZlcnQgSVJJIC0+IFVSSVxyXG4gICAgICAgICAgICAgICAgX25vcm1hbGl6ZUNvbXBvbmVudEVuY29kaW5nKGNvbXBvbmVudHMsIFVSSV9QUk9UT0NPTCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAvL25vcm1hbGl6ZSBlbmNvZGluZ3NcclxuICAgICAgICAgICAgICAgIF9ub3JtYWxpemVDb21wb25lbnRFbmNvZGluZyhjb21wb25lbnRzLCBwcm90b2NvbCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgLy9wZXJmb3JtIHNjaGVtZSBzcGVjaWZpYyBwYXJzaW5nXHJcbiAgICAgICAgICAgIGlmIChzY2hlbWVIYW5kbGVyICYmIHNjaGVtZUhhbmRsZXIucGFyc2UpIHtcclxuICAgICAgICAgICAgICAgIHNjaGVtZUhhbmRsZXIucGFyc2UoY29tcG9uZW50cywgb3B0aW9ucyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgIHBhcnNlRXJyb3IgPSB0cnVlO1xyXG4gICAgICAgICAgICBjb21wb25lbnRzLmVycm9yID0gY29tcG9uZW50cy5lcnJvciB8fCBcIlVSSSBjYW4gbm90IGJlIHBhcnNlZC5cIjtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIGNvbXBvbmVudHM7XHJcbiAgICB9XHJcbiAgICA7XHJcbiAgICBmdW5jdGlvbiBfcmVjb21wb3NlQXV0aG9yaXR5KGNvbXBvbmVudHMsIG9wdGlvbnMpIHtcclxuICAgICAgICB2YXIgdXJpVG9rZW5zID0gW107XHJcbiAgICAgICAgaWYgKGNvbXBvbmVudHMudXNlcmluZm8gIT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICB1cmlUb2tlbnMucHVzaChjb21wb25lbnRzLnVzZXJpbmZvKTtcclxuICAgICAgICAgICAgdXJpVG9rZW5zLnB1c2goXCJAXCIpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoY29tcG9uZW50cy5ob3N0ICE9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgdXJpVG9rZW5zLnB1c2goY29tcG9uZW50cy5ob3N0KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKHR5cGVvZiBjb21wb25lbnRzLnBvcnQgPT09IFwibnVtYmVyXCIpIHtcclxuICAgICAgICAgICAgdXJpVG9rZW5zLnB1c2goXCI6XCIpO1xyXG4gICAgICAgICAgICB1cmlUb2tlbnMucHVzaChjb21wb25lbnRzLnBvcnQudG9TdHJpbmcoMTApKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHVyaVRva2Vucy5sZW5ndGggPyB1cmlUb2tlbnMuam9pbihcIlwiKSA6IHVuZGVmaW5lZDtcclxuICAgIH1cclxuICAgIDtcclxuICAgIGZ1bmN0aW9uIHJlbW92ZURvdFNlZ21lbnRzKGlucHV0KSB7XHJcbiAgICAgICAgdmFyIG91dHB1dCA9IFtdLCBzO1xyXG4gICAgICAgIHdoaWxlIChpbnB1dC5sZW5ndGgpIHtcclxuICAgICAgICAgICAgaWYgKGlucHV0Lm1hdGNoKFJEUzEpKSB7XHJcbiAgICAgICAgICAgICAgICBpbnB1dCA9IGlucHV0LnJlcGxhY2UoUkRTMSwgXCJcIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSBpZiAoaW5wdXQubWF0Y2goUkRTMikpIHtcclxuICAgICAgICAgICAgICAgIGlucHV0ID0gaW5wdXQucmVwbGFjZShSRFMyLCBcIi9cIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSBpZiAoaW5wdXQubWF0Y2goUkRTMykpIHtcclxuICAgICAgICAgICAgICAgIGlucHV0ID0gaW5wdXQucmVwbGFjZShSRFMzLCBcIi9cIik7XHJcbiAgICAgICAgICAgICAgICBvdXRwdXQucG9wKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSBpZiAoaW5wdXQgPT09IFwiLlwiIHx8IGlucHV0ID09PSBcIi4uXCIpIHtcclxuICAgICAgICAgICAgICAgIGlucHV0ID0gXCJcIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHMgPSBpbnB1dC5tYXRjaChSRFM1KVswXTtcclxuICAgICAgICAgICAgICAgIGlucHV0ID0gaW5wdXQuc2xpY2Uocy5sZW5ndGgpO1xyXG4gICAgICAgICAgICAgICAgb3V0cHV0LnB1c2gocyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIG91dHB1dC5qb2luKFwiXCIpO1xyXG4gICAgfVxyXG4gICAgO1xyXG4gICAgZnVuY3Rpb24gc2VyaWFsaXplKGNvbXBvbmVudHMsIG9wdGlvbnMpIHtcclxuICAgICAgICBpZiAob3B0aW9ucyA9PT0gdm9pZCAwKSB7IG9wdGlvbnMgPSB7fTsgfVxyXG4gICAgICAgIHZhciBwcm90b2NvbCA9IChVUklfX0lSSV9TVVBQT1JUICYmIG9wdGlvbnMuaXJpID8gSVJJX1BST1RPQ09MIDogVVJJX1BST1RPQ09MKSwgdXJpVG9rZW5zID0gW10sIHNjaGVtZUhhbmRsZXIsIGF1dGhvcml0eSwgcztcclxuICAgICAgICAvL2ZpbmQgc2NoZW1lIGhhbmRsZXJcclxuICAgICAgICBzY2hlbWVIYW5kbGVyID0gU0NIRU1FU1sob3B0aW9ucy5zY2hlbWUgfHwgY29tcG9uZW50cy5zY2hlbWUgfHwgXCJcIikudG9Mb3dlckNhc2UoKV07XHJcbiAgICAgICAgLy9wZXJmb3JtIHNjaGVtZSBzcGVjaWZpYyBzZXJpYWxpemF0aW9uXHJcbiAgICAgICAgaWYgKHNjaGVtZUhhbmRsZXIgJiYgc2NoZW1lSGFuZGxlci5zZXJpYWxpemUpXHJcbiAgICAgICAgICAgIHNjaGVtZUhhbmRsZXIuc2VyaWFsaXplKGNvbXBvbmVudHMsIG9wdGlvbnMpO1xyXG4gICAgICAgIC8vaWYgaG9zdCBjb21wb25lbnQgaXMgYSBkb21haW4gbmFtZVxyXG4gICAgICAgIGlmIChVUklfX0lSSV9TVVBQT1JUICYmIHR5cGVvZiBwdW55Y29kZSAhPT0gXCJ1bmRlZmluZWRcIiAmJiBjb21wb25lbnRzLmhvc3QgJiYgKG9wdGlvbnMuZG9tYWluSG9zdCB8fCAoc2NoZW1lSGFuZGxlciAmJiBzY2hlbWVIYW5kbGVyLmRvbWFpbkhvc3QpKSkge1xyXG4gICAgICAgICAgICAvL2NvbnZlcnQgSUROIHZpYSBwdW55Y29kZVxyXG4gICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5ob3N0ID0gKCFvcHRpb25zLmlyaSA/IHB1bnljb2RlLnRvQVNDSUkoY29tcG9uZW50cy5ob3N0LnJlcGxhY2UocHJvdG9jb2wuUENUX0VOQ09ERUQsIHBjdERlY0NoYXJzKS50b0xvd2VyQ2FzZSgpKSA6IHB1bnljb2RlLnRvVW5pY29kZShjb21wb25lbnRzLmhvc3QpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5lcnJvciA9IGNvbXBvbmVudHMuZXJyb3IgfHwgXCJIb3N0J3MgZG9tYWluIG5hbWUgY2FuIG5vdCBiZSBjb252ZXJ0ZWQgdG8gXCIgKyAoIW9wdGlvbnMuaXJpID8gXCJBU0NJSVwiIDogXCJVbmljb2RlXCIpICsgXCIgdmlhIHB1bnljb2RlOiBcIiArIGU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgLy9ub3JtYWxpemUgZW5jb2RpbmdcclxuICAgICAgICBfbm9ybWFsaXplQ29tcG9uZW50RW5jb2RpbmcoY29tcG9uZW50cywgcHJvdG9jb2wpO1xyXG4gICAgICAgIGlmIChvcHRpb25zLnJlZmVyZW5jZSAhPT0gXCJzdWZmaXhcIiAmJiBjb21wb25lbnRzLnNjaGVtZSkge1xyXG4gICAgICAgICAgICB1cmlUb2tlbnMucHVzaChjb21wb25lbnRzLnNjaGVtZSk7XHJcbiAgICAgICAgICAgIHVyaVRva2Vucy5wdXNoKFwiOlwiKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgYXV0aG9yaXR5ID0gX3JlY29tcG9zZUF1dGhvcml0eShjb21wb25lbnRzLCBvcHRpb25zKTtcclxuICAgICAgICBpZiAoYXV0aG9yaXR5ICE9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgaWYgKG9wdGlvbnMucmVmZXJlbmNlICE9PSBcInN1ZmZpeFwiKSB7XHJcbiAgICAgICAgICAgICAgICB1cmlUb2tlbnMucHVzaChcIi8vXCIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHVyaVRva2Vucy5wdXNoKGF1dGhvcml0eSk7XHJcbiAgICAgICAgICAgIGlmIChjb21wb25lbnRzLnBhdGggJiYgY29tcG9uZW50cy5wYXRoLmNoYXJBdCgwKSAhPT0gXCIvXCIpIHtcclxuICAgICAgICAgICAgICAgIHVyaVRva2Vucy5wdXNoKFwiL1wiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoY29tcG9uZW50cy5wYXRoICE9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgcyA9IGNvbXBvbmVudHMucGF0aDtcclxuICAgICAgICAgICAgaWYgKCFvcHRpb25zLmFic29sdXRlUGF0aCAmJiAoIXNjaGVtZUhhbmRsZXIgfHwgIXNjaGVtZUhhbmRsZXIuYWJzb2x1dGVQYXRoKSkge1xyXG4gICAgICAgICAgICAgICAgcyA9IHJlbW92ZURvdFNlZ21lbnRzKHMpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChhdXRob3JpdHkgPT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcyA9IHMucmVwbGFjZSgvXlxcL1xcLy8sIFwiLyUyRlwiKTsgLy9kb24ndCBhbGxvdyB0aGUgcGF0aCB0byBzdGFydCB3aXRoIFwiLy9cIlxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHVyaVRva2Vucy5wdXNoKHMpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoY29tcG9uZW50cy5xdWVyeSAhPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIHVyaVRva2Vucy5wdXNoKFwiP1wiKTtcclxuICAgICAgICAgICAgdXJpVG9rZW5zLnB1c2goY29tcG9uZW50cy5xdWVyeSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChjb21wb25lbnRzLmZyYWdtZW50ICE9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgdXJpVG9rZW5zLnB1c2goXCIjXCIpO1xyXG4gICAgICAgICAgICB1cmlUb2tlbnMucHVzaChjb21wb25lbnRzLmZyYWdtZW50KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHVyaVRva2Vucy5qb2luKCcnKTsgLy9tZXJnZSB0b2tlbnMgaW50byBhIHN0cmluZ1xyXG4gICAgfVxyXG4gICAgO1xyXG4gICAgZnVuY3Rpb24gcmVzb2x2ZUNvbXBvbmVudHMoYmFzZSwgcmVsYXRpdmUsIG9wdGlvbnMsIHNraXBOb3JtYWxpemF0aW9uKSB7XHJcbiAgICAgICAgaWYgKG9wdGlvbnMgPT09IHZvaWQgMCkgeyBvcHRpb25zID0ge307IH1cclxuICAgICAgICB2YXIgdGFyZ2V0ID0ge307XHJcbiAgICAgICAgaWYgKCFza2lwTm9ybWFsaXphdGlvbikge1xyXG4gICAgICAgICAgICBiYXNlID0gcGFyc2Uoc2VyaWFsaXplKGJhc2UsIG9wdGlvbnMpLCBvcHRpb25zKTsgLy9ub3JtYWxpemUgYmFzZSBjb21wb25lbnRzXHJcbiAgICAgICAgICAgIHJlbGF0aXZlID0gcGFyc2Uoc2VyaWFsaXplKHJlbGF0aXZlLCBvcHRpb25zKSwgb3B0aW9ucyk7IC8vbm9ybWFsaXplIHJlbGF0aXZlIGNvbXBvbmVudHNcclxuICAgICAgICB9XHJcbiAgICAgICAgb3B0aW9ucyA9IG9wdGlvbnMgfHwge307XHJcbiAgICAgICAgaWYgKCFvcHRpb25zLnRvbGVyYW50ICYmIHJlbGF0aXZlLnNjaGVtZSkge1xyXG4gICAgICAgICAgICB0YXJnZXQuc2NoZW1lID0gcmVsYXRpdmUuc2NoZW1lO1xyXG4gICAgICAgICAgICAvL3RhcmdldC5hdXRob3JpdHkgPSByZWxhdGl2ZS5hdXRob3JpdHk7XHJcbiAgICAgICAgICAgIHRhcmdldC51c2VyaW5mbyA9IHJlbGF0aXZlLnVzZXJpbmZvO1xyXG4gICAgICAgICAgICB0YXJnZXQuaG9zdCA9IHJlbGF0aXZlLmhvc3Q7XHJcbiAgICAgICAgICAgIHRhcmdldC5wb3J0ID0gcmVsYXRpdmUucG9ydDtcclxuICAgICAgICAgICAgdGFyZ2V0LnBhdGggPSByZW1vdmVEb3RTZWdtZW50cyhyZWxhdGl2ZS5wYXRoKTtcclxuICAgICAgICAgICAgdGFyZ2V0LnF1ZXJ5ID0gcmVsYXRpdmUucXVlcnk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICBpZiAocmVsYXRpdmUudXNlcmluZm8gIT09IHVuZGVmaW5lZCB8fCByZWxhdGl2ZS5ob3N0ICE9PSB1bmRlZmluZWQgfHwgcmVsYXRpdmUucG9ydCAhPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAvL3RhcmdldC5hdXRob3JpdHkgPSByZWxhdGl2ZS5hdXRob3JpdHk7XHJcbiAgICAgICAgICAgICAgICB0YXJnZXQudXNlcmluZm8gPSByZWxhdGl2ZS51c2VyaW5mbztcclxuICAgICAgICAgICAgICAgIHRhcmdldC5ob3N0ID0gcmVsYXRpdmUuaG9zdDtcclxuICAgICAgICAgICAgICAgIHRhcmdldC5wb3J0ID0gcmVsYXRpdmUucG9ydDtcclxuICAgICAgICAgICAgICAgIHRhcmdldC5wYXRoID0gcmVtb3ZlRG90U2VnbWVudHMocmVsYXRpdmUucGF0aCk7XHJcbiAgICAgICAgICAgICAgICB0YXJnZXQucXVlcnkgPSByZWxhdGl2ZS5xdWVyeTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGlmICghcmVsYXRpdmUucGF0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRhcmdldC5wYXRoID0gYmFzZS5wYXRoO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZWxhdGl2ZS5xdWVyeSAhPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldC5xdWVyeSA9IHJlbGF0aXZlLnF1ZXJ5O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0LnF1ZXJ5ID0gYmFzZS5xdWVyeTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAocmVsYXRpdmUucGF0aC5jaGFyQXQoMCkgPT09IFwiL1wiKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldC5wYXRoID0gcmVtb3ZlRG90U2VnbWVudHMocmVsYXRpdmUucGF0aCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGJhc2UudXNlcmluZm8gIT09IHVuZGVmaW5lZCB8fCBiYXNlLmhvc3QgIT09IHVuZGVmaW5lZCB8fCBiYXNlLnBvcnQgIT09IHVuZGVmaW5lZCkgJiYgIWJhc2UucGF0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0LnBhdGggPSBcIi9cIiArIHJlbGF0aXZlLnBhdGg7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIWJhc2UucGF0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0LnBhdGggPSByZWxhdGl2ZS5wYXRoO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0LnBhdGggPSBiYXNlLnBhdGguc2xpY2UoMCwgYmFzZS5wYXRoLmxhc3RJbmRleE9mKFwiL1wiKSArIDEpICsgcmVsYXRpdmUucGF0aDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXQucGF0aCA9IHJlbW92ZURvdFNlZ21lbnRzKHRhcmdldC5wYXRoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0LnF1ZXJ5ID0gcmVsYXRpdmUucXVlcnk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAvL3RhcmdldC5hdXRob3JpdHkgPSBiYXNlLmF1dGhvcml0eTtcclxuICAgICAgICAgICAgICAgIHRhcmdldC51c2VyaW5mbyA9IGJhc2UudXNlcmluZm87XHJcbiAgICAgICAgICAgICAgICB0YXJnZXQuaG9zdCA9IGJhc2UuaG9zdDtcclxuICAgICAgICAgICAgICAgIHRhcmdldC5wb3J0ID0gYmFzZS5wb3J0O1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHRhcmdldC5zY2hlbWUgPSBiYXNlLnNjaGVtZTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGFyZ2V0LmZyYWdtZW50ID0gcmVsYXRpdmUuZnJhZ21lbnQ7XHJcbiAgICAgICAgcmV0dXJuIHRhcmdldDtcclxuICAgIH1cclxuICAgIDtcclxuICAgIGZ1bmN0aW9uIHJlc29sdmUoYmFzZVVSSSwgcmVsYXRpdmVVUkksIG9wdGlvbnMpIHtcclxuICAgICAgICByZXR1cm4gc2VyaWFsaXplKHJlc29sdmVDb21wb25lbnRzKHBhcnNlKGJhc2VVUkksIG9wdGlvbnMpLCBwYXJzZShyZWxhdGl2ZVVSSSwgb3B0aW9ucyksIG9wdGlvbnMsIHRydWUpLCBvcHRpb25zKTtcclxuICAgIH1cclxuICAgIDtcclxuICAgIGZ1bmN0aW9uIG5vcm1hbGl6ZSh1cmksIG9wdGlvbnMpIHtcclxuICAgICAgICBpZiAodHlwZW9mIHVyaSA9PT0gXCJzdHJpbmdcIikge1xyXG4gICAgICAgICAgICB1cmkgPSBzZXJpYWxpemUocGFyc2UodXJpLCBvcHRpb25zKSwgb3B0aW9ucyk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2UgaWYgKHR5cGVPZih1cmkpID09PSBcIm9iamVjdFwiKSB7XHJcbiAgICAgICAgICAgIHVyaSA9IHBhcnNlKHNlcmlhbGl6ZSh1cmksIG9wdGlvbnMpLCBvcHRpb25zKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHVyaTtcclxuICAgIH1cclxuICAgIDtcclxuICAgIGZ1bmN0aW9uIGVxdWFsKHVyaUEsIHVyaUIsIG9wdGlvbnMpIHtcclxuICAgICAgICBpZiAodHlwZW9mIHVyaUEgPT09IFwic3RyaW5nXCIpIHtcclxuICAgICAgICAgICAgdXJpQSA9IHNlcmlhbGl6ZShwYXJzZSh1cmlBLCBvcHRpb25zKSwgb3B0aW9ucyk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2UgaWYgKHR5cGVPZih1cmlBKSA9PT0gXCJvYmplY3RcIikge1xyXG4gICAgICAgICAgICB1cmlBID0gc2VyaWFsaXplKHVyaUEsIG9wdGlvbnMpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodHlwZW9mIHVyaUIgPT09IFwic3RyaW5nXCIpIHtcclxuICAgICAgICAgICAgdXJpQiA9IHNlcmlhbGl6ZShwYXJzZSh1cmlCLCBvcHRpb25zKSwgb3B0aW9ucyk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2UgaWYgKHR5cGVPZih1cmlCKSA9PT0gXCJvYmplY3RcIikge1xyXG4gICAgICAgICAgICB1cmlCID0gc2VyaWFsaXplKHVyaUIsIG9wdGlvbnMpO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdXJpQSA9PT0gdXJpQjtcclxuICAgIH1cclxuICAgIDtcclxuICAgIGZ1bmN0aW9uIGVzY2FwZUNvbXBvbmVudChzdHIsIG9wdGlvbnMpIHtcclxuICAgICAgICByZXR1cm4gc3RyICYmIHN0ci50b1N0cmluZygpLnJlcGxhY2UoKCFVUklfX0lSSV9TVVBQT1JUIHx8ICFvcHRpb25zIHx8ICFvcHRpb25zLmlyaSA/IFVSSV9QUk9UT0NPTC5FU0NBUEUgOiBJUklfUFJPVE9DT0wuRVNDQVBFKSwgcGN0RW5jQ2hhcik7XHJcbiAgICB9XHJcbiAgICA7XHJcbiAgICBmdW5jdGlvbiB1bmVzY2FwZUNvbXBvbmVudChzdHIsIG9wdGlvbnMpIHtcclxuICAgICAgICByZXR1cm4gc3RyICYmIHN0ci50b1N0cmluZygpLnJlcGxhY2UoKCFVUklfX0lSSV9TVVBQT1JUIHx8ICFvcHRpb25zIHx8ICFvcHRpb25zLmlyaSA/IFVSSV9QUk9UT0NPTC5QQ1RfRU5DT0RFRCA6IElSSV9QUk9UT0NPTC5QQ1RfRU5DT0RFRCksIHBjdERlY0NoYXJzKTtcclxuICAgIH1cclxuICAgIDtcclxuICAgIHJldHVybiB7XHJcbiAgICAgICAgSVJJX1NVUFBPUlQ6IFVSSV9fSVJJX1NVUFBPUlQsXHJcbiAgICAgICAgVkFMSURBVEVfU1VQUE9SVDogVVJJX19WQUxJREFURV9TVVBQT1JULFxyXG4gICAgICAgIHBjdEVuY0NoYXI6IHBjdEVuY0NoYXIsXHJcbiAgICAgICAgcGN0RGVjQ2hhcnM6IHBjdERlY0NoYXJzLFxyXG4gICAgICAgIFNDSEVNRVM6IFNDSEVNRVMsXHJcbiAgICAgICAgcGFyc2U6IHBhcnNlLFxyXG4gICAgICAgIF9yZWNvbXBvc2VBdXRob3JpdHk6IF9yZWNvbXBvc2VBdXRob3JpdHksXHJcbiAgICAgICAgcmVtb3ZlRG90U2VnbWVudHM6IHJlbW92ZURvdFNlZ21lbnRzLFxyXG4gICAgICAgIHNlcmlhbGl6ZTogc2VyaWFsaXplLFxyXG4gICAgICAgIHJlc29sdmVDb21wb25lbnRzOiByZXNvbHZlQ29tcG9uZW50cyxcclxuICAgICAgICByZXNvbHZlOiByZXNvbHZlLFxyXG4gICAgICAgIG5vcm1hbGl6ZTogbm9ybWFsaXplLFxyXG4gICAgICAgIGVxdWFsOiBlcXVhbCxcclxuICAgICAgICBlc2NhcGVDb21wb25lbnQ6IGVzY2FwZUNvbXBvbmVudCxcclxuICAgICAgICB1bmVzY2FwZUNvbXBvbmVudDogdW5lc2NhcGVDb21wb25lbnRcclxuICAgIH07XHJcbn0pKCk7XHJcbmlmICghQ09NUElMRUQgJiYgdHlwZW9mIG1vZHVsZSAhPT0gXCJ1bmRlZmluZWRcIiAmJiB0eXBlb2YgcmVxdWlyZSA9PT0gXCJmdW5jdGlvblwiKSB7XHJcbiAgICB2YXIgcHVueWNvZGUgPSByZXF1aXJlKFwiLi9wdW55Y29kZVwiKTtcclxuICAgIG1vZHVsZS5leHBvcnRzID0gVVJJO1xyXG4gICAgcmVxdWlyZShcIi4vc2NoZW1lc1wiKTtcclxufVxyXG4iXX0= /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27), __webpack_require__(1544).setImmediate)) /***/ }), /* 4093 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.traverseSchema = traverseSchema; exports.traverseForm = traverseForm; /** * Traverse a schema, applying a function(schema,path) on every sub schema * i.e. every property of an object. */ function traverseSchema(schema, fn, path, ignoreArrays) { ignoreArrays = ignoreArrays === undefined ? true : ignoreArrays; path = path || []; var traverse = function traverse(schemaObject, processorFunction, pathArray) { processorFunction(schemaObject, pathArray); if (schemaObject.properties) { Object.keys(schemaObject.properties).forEach(function (name) { var currentPath = pathArray.slice(); currentPath.push(name); traverse(schemaObject.properties[name], processorFunction, currentPath); }); } // Only support type "array" which have a schemaObject as "items". if (!ignoreArrays && schemaObject.items) { var arrPath = pathArray.slice(); arrPath.push(''); traverse(schemaObject.items, processorFunction, arrPath); } }; traverse(schema, fn, path || []); } function traverseForm(form, fn) { fn(form); if (form.items) { form.items.forEach(function (f) { traverseForm(f, fn); }); } if (form.tabs) { form.tabs.forEach(function (tab) { if (tab.items) { tab.items.forEach(function (f) { traverseForm(f, fn); }); } }); } } /***/ }), /* 4094 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validate = validate; var _tv = __webpack_require__(1620); var _tv2 = _interopRequireDefault(_tv); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Validate a value against its form definition and schema. * The value should either be of proper type or a string, some type * coercion is applied. * * @param {Object} form A merged form definition, i.e. one with a schema. * @param {Any} value the value to validate. * @return {Object} a tv4js result object. */ function validate(form, value) { if (!form) { return { valid: true }; } var schema = form.schema; if (!schema) { return { valid: true }; } // Input of type text and textareas will give us a viewValue of '' // when empty, this is a valid value in a schema and does not count as something // that breaks validation of 'required'. But for our own sanity an empty field should // not validate if it's required. if (value === '') { value = undefined; } // Numbers fields will give a null value, which also means empty field if (form.type === 'number' && value === null) { value = undefined; } // Version 4 of JSON Schema has the required property not on the // property itself but on the wrapping object. Since we like to test // only this property we wrap it in a fake object. var wrap = { type: 'object', properties: {}, required: undefined }; var propName = form.key[form.key.length - 1]; wrap.properties[propName] = schema; if (form.required) { wrap.required = [propName]; } var valueWrap = {}; if (typeof value !== 'undefined') { valueWrap[propName] = value; } return _tv2.default.validateResult(valueWrap, wrap); } /* Common code for validating a value against its form and schema definition */ /***/ }), /* 4095 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* globals define,module */ /* Using a Universal Module Loader that should be browser, require, and AMD friendly http://ricostacruz.com/cheatsheets/umdjs.html */ ;(function(root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports === "object") { module.exports = factory(); } else { root.jsonLogic = factory(); } }(this, function() { "use strict"; /* globals console:false */ if ( ! Array.isArray) { Array.isArray = function(arg) { return Object.prototype.toString.call(arg) === "[object Array]"; }; } /** * Return an array that contains no duplicates (original not modified) * @param {array} array Original reference array * @return {array} New array with no duplicates */ function arrayUnique(array) { var a = []; for (var i=0, l=array.length; i<l; i++) { if (a.indexOf(array[i]) === -1) { a.push(array[i]); } } return a; } var jsonLogic = {}; var operations = { "==": function(a, b) { return a == b; }, "===": function(a, b) { return a === b; }, "!=": function(a, b) { return a != b; }, "!==": function(a, b) { return a !== b; }, ">": function(a, b) { return a > b; }, ">=": function(a, b) { return a >= b; }, "<": function(a, b, c) { return (c === undefined) ? a < b : (a < b) && (b < c); }, "<=": function(a, b, c) { return (c === undefined) ? a <= b : (a <= b) && (b <= c); }, "!!": function(a) { return jsonLogic.truthy(a); }, "!": function(a) { return !jsonLogic.truthy(a); }, "%": function(a, b) { return a % b; }, "log": function(a) { console.log(a); return a; }, "in": function(a, b) { if(!b || typeof b.indexOf === "undefined") return false; return (b.indexOf(a) !== -1); }, "cat": function() { return Array.prototype.join.call(arguments, ""); }, "substr":function(source, start, end) { if(end < 0){ // JavaScript doesn't support negative end, this emulates PHP behavior var temp = String(source).substr(start); return temp.substr(0, temp.length + end); } return String(source).substr(start, end); }, "+": function() { return Array.prototype.reduce.call(arguments, function(a, b) { return parseFloat(a, 10) + parseFloat(b, 10); }, 0); }, "*": function() { return Array.prototype.reduce.call(arguments, function(a, b) { return parseFloat(a, 10) * parseFloat(b, 10); }); }, "-": function(a, b) { if(b === undefined) { return -a; }else{ return a - b; } }, "/": function(a, b) { return a / b; }, "min": function() { return Math.min.apply(this, arguments); }, "max": function() { return Math.max.apply(this, arguments); }, "merge": function() { return Array.prototype.reduce.call(arguments, function(a, b) { return a.concat(b); }, []); }, "var": function(a, b) { var not_found = (b === undefined) ? null : b; var data = this; if(typeof a === "undefined" || a==="" || a===null) { return data; } var sub_props = String(a).split("."); for(var i = 0; i < sub_props.length; i++) { if(data === null) { return not_found; } // Descending into data data = data[sub_props[i]]; if(data === undefined) { return not_found; } } return data; }, "missing": function() { /* Missing can receive many keys as many arguments, like {"missing:[1,2]} Missing can also receive *one* argument that is an array of keys, which typically happens if it's actually acting on the output of another command (like 'if' or 'merge') */ var missing = []; var keys = Array.isArray(arguments[0]) ? arguments[0] : arguments; for(var i = 0; i < keys.length; i++) { var key = keys[i]; var value = jsonLogic.apply({"var": key}, this); if(value === null || value === "") { missing.push(key); } } return missing; }, "missing_some": function(need_count, options) { // missing_some takes two arguments, how many (minimum) items must be present, and an array of keys (just like 'missing') to check for presence. var are_missing = jsonLogic.apply({"missing": options}, this); if(options.length - are_missing.length >= need_count) { return []; }else{ return are_missing; } }, "method": function(obj, method, args) { return obj[method].apply(obj, args); }, }; jsonLogic.is_logic = function(logic) { return ( typeof logic === "object" && // An object logic !== null && // but not null ! Array.isArray(logic) && // and not an array Object.keys(logic).length === 1 // with exactly one key ); }; /* This helper will defer to the JsonLogic spec as a tie-breaker when different language interpreters define different behavior for the truthiness of primitives. E.g., PHP considers empty arrays to be falsy, but Javascript considers them to be truthy. JsonLogic, as an ecosystem, needs one consistent answer. Spec and rationale here: http://jsonlogic.com/truthy */ jsonLogic.truthy = function(value) { if(Array.isArray(value) && value.length === 0) { return false; } return !! value; }; jsonLogic.get_operator = function(logic) { return Object.keys(logic)[0]; }; jsonLogic.get_values = function(logic) { return logic[jsonLogic.get_operator(logic)]; }; jsonLogic.apply = function(logic, data) { // Does this array contain logic? Only one way to find out. if(Array.isArray(logic)) { return logic.map(function(l) { return jsonLogic.apply(l, data); }); } // You've recursed to a primitive, stop! if( ! jsonLogic.is_logic(logic) ) { return logic; } data = data || {}; var op = jsonLogic.get_operator(logic); var values = logic[op]; var i; var current; var scopedLogic, scopedData, filtered, initial; // easy syntax for unary operators, like {"var" : "x"} instead of strict {"var" : ["x"]} if( ! Array.isArray(values)) { values = [values]; } // 'if', 'and', and 'or' violate the normal rule of depth-first calculating consequents, let each manage recursion as needed. if(op === "if" || op == "?:") { /* 'if' should be called with a odd number of parameters, 3 or greater This works on the pattern: if( 0 ){ 1 }else{ 2 }; if( 0 ){ 1 }else if( 2 ){ 3 }else{ 4 }; if( 0 ){ 1 }else if( 2 ){ 3 }else if( 4 ){ 5 }else{ 6 }; The implementation is: For pairs of values (0,1 then 2,3 then 4,5 etc) If the first evaluates truthy, evaluate and return the second If the first evaluates falsy, jump to the next pair (e.g, 0,1 to 2,3) given one parameter, evaluate and return it. (it's an Else and all the If/ElseIf were false) given 0 parameters, return NULL (not great practice, but there was no Else) */ for(i = 0; i < values.length - 1; i += 2) { if( jsonLogic.truthy( jsonLogic.apply(values[i], data) ) ) { return jsonLogic.apply(values[i+1], data); } } if(values.length === i+1) return jsonLogic.apply(values[i], data); return null; }else if(op === "and") { // Return first falsy, or last for(i=0; i < values.length; i+=1) { current = jsonLogic.apply(values[i], data); if( ! jsonLogic.truthy(current)) { return current; } } return current; // Last }else if(op === "or") {// Return first truthy, or last for(i=0; i < values.length; i+=1) { current = jsonLogic.apply(values[i], data); if( jsonLogic.truthy(current) ) { return current; } } return current; // Last }else if(op === 'filter'){ scopedData = jsonLogic.apply(values[0], data); scopedLogic = values[1]; if ( ! Array.isArray(scopedData)) { return []; } // Return only the elements from the array in the first argument, // that return truthy when passed to the logic in the second argument. // For parity with JavaScript, reindex the returned array return scopedData.filter(function(datum){ return jsonLogic.truthy( jsonLogic.apply(scopedLogic, datum)); }); }else if(op === 'map'){ scopedData = jsonLogic.apply(values[0], data); scopedLogic = values[1]; if ( ! Array.isArray(scopedData)) { return []; } return scopedData.map(function(datum){ return jsonLogic.apply(scopedLogic, datum); }); }else if(op === 'reduce'){ scopedData = jsonLogic.apply(values[0], data); scopedLogic = values[1]; initial = typeof values[2] !== 'undefined' ? values[2] : null; if ( ! Array.isArray(scopedData)) { return initial; } return scopedData.reduce( function(accumulator, current){ return jsonLogic.apply( scopedLogic, {'current':current, 'accumulator':accumulator} ); }, initial ); }else if(op === "all") { scopedData = jsonLogic.apply(values[0], data); scopedLogic = values[1]; // All of an empty set is false. Note, some and none have correct fallback after the for loop if( ! scopedData.length) { return false; } for(i=0; i < scopedData.length; i+=1) { if( ! jsonLogic.truthy( jsonLogic.apply(scopedLogic, scopedData[i]) )) { return false; // First falsy, short circuit } } return true; // All were truthy }else if(op === "none") { filtered = jsonLogic.apply({'filter' : values}, data); return filtered.length === 0; }else if(op === "some") { filtered = jsonLogic.apply({'filter' : values}, data); return filtered.length > 0; } // Everyone else gets immediate depth-first recursion values = values.map(function(val) { return jsonLogic.apply(val, data); }); // The operation is called with "data" bound to its "this" and "values" passed as arguments. // Structured commands like % or > can name formal arguments while flexible commands (like missing or merge) can operate on the pseudo-array arguments // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments if(typeof operations[op] === "function") { return operations[op].apply(data, values); }else if(op.indexOf(".") > 0) { // Contains a dot, and not in the 0th position var sub_ops = String(op).split("."); var operation = operations; for(i = 0; i < sub_ops.length; i++) { // Descending into operations operation = operation[sub_ops[i]]; if(operation === undefined) { throw new Error("Unrecognized operation " + op + " (failed at " + sub_ops.slice(0, i+1).join(".") + ")"); } } return operation.apply(data, values); } throw new Error("Unrecognized operation " + op ); }; jsonLogic.uses_data = function(logic) { var collection = []; if( jsonLogic.is_logic(logic) ) { var op = jsonLogic.get_operator(logic); var values = logic[op]; if( ! Array.isArray(values)) { values = [values]; } if(op === "var") { // This doesn't cover the case where the arg to var is itself a rule. collection.push(values[0]); }else{ // Recursion! values.map(function(val) { collection.push.apply(collection, jsonLogic.uses_data(val) ); }); } } return arrayUnique(collection); }; jsonLogic.add_operation = function(name, code) { operations[name] = code; }; jsonLogic.rm_operation = function(name) { delete operations[name]; }; jsonLogic.rule_like = function(rule, pattern) { // console.log("Is ". JSON.stringify(rule) . " like " . JSON.stringify(pattern) . "?"); if(pattern === rule) { return true; } // TODO : Deep object equivalency? if(pattern === "@") { return true; } // Wildcard! if(pattern === "number") { return (typeof rule === "number"); } if(pattern === "string") { return (typeof rule === "string"); } if(pattern === "array") { // !logic test might be superfluous in JavaScript return Array.isArray(rule) && ! jsonLogic.is_logic(rule); } if(jsonLogic.is_logic(pattern)) { if(jsonLogic.is_logic(rule)) { var pattern_op = jsonLogic.get_operator(pattern); var rule_op = jsonLogic.get_operator(rule); if(pattern_op === "@" || pattern_op === rule_op) { // echo "\nOperators match, go deeper\n"; return jsonLogic.rule_like( jsonLogic.get_values(rule, false), jsonLogic.get_values(pattern, false) ); } } return false; // pattern is logic, rule isn't, can't be eq } if(Array.isArray(pattern)) { if(Array.isArray(rule)) { if(pattern.length !== rule.length) { return false; } /* Note, array order MATTERS, because we're using this array test logic to consider arguments, where order can matter. (e.g., + is commutative, but '-' or 'if' or 'var' are NOT) */ for(var i = 0; i < pattern.length; i += 1) { // If any fail, we fail if( ! jsonLogic.rule_like(rule[i], pattern[i])) { return false; } } return true; // If they *all* passed, we pass }else{ return false; // Pattern is array, rule isn't } } // Not logic, not array, not a === match for rule. return false; }; return jsonLogic; })); /***/ }), /* 4096 */ /***/ (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 _classnames = _interopRequireDefault(__webpack_require__(1)); var _reactI18next = __webpack_require__(10); var _Actions = __webpack_require__(32); var _ArrayItem = _interopRequireDefault(__webpack_require__(4097)); var _Message = _interopRequireDefault(__webpack_require__(887)); var _generateId = __webpack_require__(61); var _constants = __webpack_require__(73); var _DefaultArrayTemplate = _interopRequireDefault(__webpack_require__(4099)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function DefaultArrayTemplate(props) { var _useTranslation = (0, _reactI18next.useTranslation)(_constants.I18N_DOMAIN_FORMS), t = _useTranslation.t; var canReorder = props.canReorder, errorMessage = props.errorMessage, id = props.id, isValid = props.isValid, onAdd = props.onAdd, onRemove = props.onRemove, onReorder = props.onReorder, renderItem = props.renderItem, schema = props.schema, value = props.value, valueIsUpdating = props.valueIsUpdating, _props$options = props.options, options = _props$options === void 0 ? {} : _props$options, isCloseable = props.isCloseable; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); return /*#__PURE__*/_react["default"].createElement("fieldset", { className: (0, _classnames["default"])(_DefaultArrayTemplate["default"]['tf-array-fieldset'], 'tf-array-fieldset'), "data-content": schema.title }, schema.title && /*#__PURE__*/_react["default"].createElement("legend", { className: "sr-only" }, schema.title), !schema.readOnly && /*#__PURE__*/_react["default"].createElement(_Actions.Action, { id: "".concat(id || 'tf-array', "-btn"), className: (0, _classnames["default"])(_DefaultArrayTemplate["default"]['tf-array-add'], 'tf-array-add'), bsStyle: "info", onClick: onAdd, disabled: valueIsUpdating || schema.disabled, label: options.btnLabel || t('ARRAY_ADD_ELEMENT', { defaultValue: 'Add' }) }), /*#__PURE__*/_react["default"].createElement(_Message["default"], { className: isValid ? undefined : 'has-error', errorMessage: errorMessage, description: schema.description, isValid: isValid, descriptionId: descriptionId, errorId: errorId }), /*#__PURE__*/_react["default"].createElement("ol", { id: id, className: (0, _classnames["default"])(_DefaultArrayTemplate["default"]['tf-array'], 'tf-array'), "aria-describedby": "".concat(descriptionId, " ").concat(errorId), "aria-invalid": isValid }, value.map(function (itemValue, index) { return /*#__PURE__*/_react["default"].createElement("li", { className: (0, _classnames["default"])(_DefaultArrayTemplate["default"].item, 'item', "item-".concat(index)), key: index }, /*#__PURE__*/_react["default"].createElement(_ArrayItem["default"], { hasMoveDown: index < value.length - 1, hasMoveUp: index > 0, id: id && "".concat(id, "-control-").concat(index), index: index, onRemove: onRemove, onReorder: canReorder ? onReorder : undefined, isClosed: itemValue.isClosed, valueIsUpdating: valueIsUpdating, renderItem: renderItem, isCloseable: isCloseable, disabled: schema.disabled, readOnly: schema.readOnly })); }))); } DefaultArrayTemplate.defaultProps = { isCloseable: false }; if (process.env.NODE_ENV !== 'production') { DefaultArrayTemplate.propTypes = { canReorder: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, id: _propTypes["default"].string, isValid: _propTypes["default"].bool, onAdd: _propTypes["default"].func.isRequired, onRemove: _propTypes["default"].func.isRequired, onReorder: _propTypes["default"].func.isRequired, renderItem: _propTypes["default"].func.isRequired, schema: _propTypes["default"].object.isRequired, value: _propTypes["default"].array.isRequired, valueIsUpdating: _propTypes["default"].bool, options: _propTypes["default"].shape({ btnLabel: _propTypes["default"].string }), isCloseable: _propTypes["default"].bool }; } var _default = DefaultArrayTemplate; exports["default"] = _default; //# sourceMappingURL=DefaultArrayTemplate.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4097 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports.ReorderButton = ReorderButton; exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _Actions = __webpack_require__(32); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _reactI18next = __webpack_require__(10); var _constants = __webpack_require__(73); var _ArrayItem = _interopRequireDefault(__webpack_require__(4098)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(1622)); 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 _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 ReorderButton(props) { var disabled = props.disabled, index = props.index, hasMoveDown = props.hasMoveDown, hasMoveUp = props.hasMoveUp, id = props.id, isMoveDown = props.isMoveDown, onReorder = props.onReorder; var buttonProps; var _useTranslation = (0, _reactI18next.useTranslation)(_constants.I18N_DOMAIN_FORMS), t = _useTranslation.t; if (isMoveDown) { buttonProps = { id: id && "".concat(id, "-moveDown"), disabled: disabled || !hasMoveDown, onClick: function onClick(event) { return props.onReorder(event, { previousIndex: index, nextIndex: index + 1 }); }, label: t('ARRAY_ITEM_MOVE_DOWN', { defaultValue: 'Move down' }), iconTransform: 'rotate-270' }; } else { buttonProps = { id: id && "".concat(id, "-moveUp"), disabled: disabled || !hasMoveUp, onClick: function onClick(event) { return onReorder(event, { previousIndex: index, nextIndex: index - 1 }); }, label: t('ARRAY_ITEM_MOVE_UP', { defaultValue: 'Move up' }), iconTransform: 'rotate-90' }; } return /*#__PURE__*/_react["default"].createElement(_Actions.Action, _extends({}, buttonProps, { className: "".concat(_ArrayItem["default"]['tf-array-item-reorder'], " tf-array-item-reorder"), icon: "talend-arrow-left", link: true, hideLabel: true })); } if (process.env.NODE_ENV !== 'production') { ReorderButton.propTypes = { disabled: _propTypes["default"].bool, hasMoveDown: _propTypes["default"].bool.isRequired, hasMoveUp: _propTypes["default"].bool.isRequired, id: _propTypes["default"].string, index: _propTypes["default"].number.isRequired, isMoveDown: _propTypes["default"].bool, onReorder: _propTypes["default"].func.isRequired }; } function ArrayItem(props) { var renderItem = props.renderItem, disabled = props.disabled, id = props.id, index = props.index, onRemove = props.onRemove, onReorder = props.onReorder, isClosed = props.isClosed, valueIsUpdating = props.valueIsUpdating, isCloseable = props.isCloseable, readOnly = props.readOnly; var _useTranslation2 = (0, _reactI18next.useTranslation)(_constants.I18N_DOMAIN_FORMS), t = _useTranslation2.t; var widgetIsDisabled = disabled || valueIsUpdating; var deleteAction = { id: id && "".concat(id, "-delete"), onClick: function onClick(event) { return onRemove(event, index); }, label: t('ARRAY_FIELD_TEMPLATE_ACTION_DELETE', { defaultValue: 'Delete' }), type: 'button', disabled: widgetIsDisabled, className: _ArrayItem["default"]["delete"], icon: 'talend-trash', hideLabel: true, link: true }; var actions = []; if (!readOnly) { actions.push(deleteAction); } return /*#__PURE__*/_react["default"].createElement("div", { className: (0, _classnames["default"])(_ArrayItem["default"]['tf-array-item'], 'tf-array-item', _defineProperty({}, _FieldTemplate["default"].updating, valueIsUpdating)) }, /*#__PURE__*/_react["default"].createElement("div", { className: _ArrayItem["default"].control }, !isClosed && onReorder && !readOnly && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(ReorderButton, _extends({}, props, { index: index, disabled: widgetIsDisabled })), /*#__PURE__*/_react["default"].createElement(ReorderButton, _extends({}, props, { index: index, isMoveDown: true, disabled: widgetIsDisabled })))), renderItem(index, { actions: actions }), !isCloseable && !readOnly && !disabled && /*#__PURE__*/_react["default"].createElement("div", { className: _ArrayItem["default"].control }, /*#__PURE__*/_react["default"].createElement(_Actions.Action, deleteAction))); } if (process.env.NODE_ENV !== 'production') { ArrayItem.propTypes = { renderItem: _propTypes["default"].func, disabled: _propTypes["default"].bool, readOnly: _propTypes["default"].bool, id: _propTypes["default"].string, index: _propTypes["default"].number.isRequired, isClosed: _propTypes["default"].bool, onRemove: _propTypes["default"].func.isRequired, onReorder: _propTypes["default"].func.isRequired, valueIsUpdating: _propTypes["default"].bool, isCloseable: _propTypes["default"].bool }; } ArrayItem.defaultProps = { isCloseable: false, renderItem: function renderItem() { return null; } }; var _default = ArrayItem; exports["default"] = _default; //# sourceMappingURL=ArrayItem.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4098 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tf-array-item":"ArrayItem__tf-array-item___16Vdy","delete":"ArrayItem__delete___3K50L","tf-array-item-reorder":"ArrayItem__tf-array-item-reorder___2gEcD","control":"ArrayItem__control___3SrfY"}; /***/ }), /* 4099 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tf-array-fieldset":"DefaultArrayTemplate__tf-array-fieldset___1NFb0","tf-array-add":"DefaultArrayTemplate__tf-array-add___aJ33N","tf-array":"DefaultArrayTemplate__tf-array___1BpRq","item":"DefaultArrayTemplate__item___3GvRM"}; /***/ }), /* 4100 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tf-array-text-mode":"TextModeArrayTemplate__tf-array-text-mode___o-DCQ","block":"TextModeArrayTemplate__block___QStWP"}; /***/ }), /* 4101 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Array = _interopRequireDefault(__webpack_require__(4102)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Array["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4102 */ /***/ (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 _lodash = __webpack_require__(4103); var _Widget = _interopRequireDefault(__webpack_require__(153)); var _validation = __webpack_require__(551); var _templates = _interopRequireDefault(__webpack_require__(1621)); var _widgets = _interopRequireDefault(__webpack_require__(905)); var _array = __webpack_require__(888); 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 _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 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 getRange(previousIndex, nextIndex) { if (previousIndex < nextIndex) { return { minIndex: previousIndex, maxIndex: nextIndex + 1 }; } return { minIndex: nextIndex, maxIndex: previousIndex + 1 }; } var ArrayWidget = /*#__PURE__*/function (_React$Component) { _inherits(ArrayWidget, _React$Component); var _super = _createSuper(ArrayWidget); function ArrayWidget(props) { var _this; _classCallCheck(this, ArrayWidget); _this = _super.call(this, props); _this.onAdd = _this.onAdd.bind(_assertThisInitialized(_this)); _this.onRemove = _this.onRemove.bind(_assertThisInitialized(_this)); _this.onReorder = _this.onReorder.bind(_assertThisInitialized(_this)); _this.renderItem = _this.renderItem.bind(_assertThisInitialized(_this)); return _this; } _createClass(ArrayWidget, [{ key: "onAdd", value: function onAdd(event) { var arrayMergedSchema = this.props.schema; var items = arrayMergedSchema.items, schema = arrayMergedSchema.schema; var getDefaultValue = schema.items.type === 'object' ? {} : ''; var hasOneItem = items.length === 1; var itemsEnum = (0, _lodash.get)(schema, 'items.enum'); var isSingleSelectItem = hasOneItem && (0, _lodash.head)(items).type === 'select' && (0, _lodash.head)(itemsEnum); var defaultValue = isSingleSelectItem ? (0, _lodash.head)(itemsEnum) : getDefaultValue; var currentValue = this.props.value; if (this.isCloseable()) { currentValue = currentValue.map(function (item) { return _objectSpread(_objectSpread({}, item), {}, { isClosed: true }); }); } var value = currentValue.concat(defaultValue); var payload = { schema: arrayMergedSchema, value: value }; this.props.onChange(event, payload); this.props.onFinish(event, payload); } }, { key: "onRemove", value: function onRemove(event, indexToRemove) { var schema = this.props.schema; var value = this.props.value.slice(0); value.splice(indexToRemove, 1); // shift up the items errors after the one we remove function widgetChangeErrors(errors) { return (0, _validation.shiftArrayErrorsKeys)(errors, { arrayKey: schema.key, minIndex: indexToRemove, shouldRemoveIndex: function shouldRemoveIndex(index) { return index === indexToRemove; }, getNextIndex: function getNextIndex(index) { return index - 1; } }); } var payload = { schema: schema, value: value }; this.props.onChange(event, payload); this.props.onFinish(event, payload, { widgetChangeErrors: widgetChangeErrors }); } }, { key: "onReorder", value: function onReorder(event, _ref) { var previousIndex = _ref.previousIndex, nextIndex = _ref.nextIndex; var schema = this.props.schema; var value = this.props.value.slice(0); var _value$splice = value.splice(previousIndex, 1), _value$splice2 = _slicedToArray(_value$splice, 1), item = _value$splice2[0]; value.splice(nextIndex, 0, item); function widgetChangeErrors(errors) { // determine the range [min, max[ of items to shift, with the pace var _getRange = getRange(previousIndex, nextIndex), minIndex = _getRange.minIndex, maxIndex = _getRange.maxIndex; var switchPace = Math.sign(previousIndex - nextIndex); // shift the items errors between the previous and next position // set the item-we-move errors indexes return (0, _validation.shiftArrayErrorsKeys)(errors, { arrayKey: schema.key, minIndex: minIndex, maxIndex: maxIndex, getNextIndex: function getNextIndex(index) { return index === previousIndex ? nextIndex : index + switchPace; } }); } var payload = { schema: schema, value: value }; this.props.onChange(event, payload); this.props.onFinish(event, payload, { widgetChangeErrors: widgetChangeErrors }); } }, { key: "getArrayTemplate", value: function getArrayTemplate() { var baseTemplateId = 'array'; var templateId = "".concat(baseTemplateId, "_").concat(this.props.displayMode); var ArrayTemplate = this.props.templates[templateId] || _templates["default"][templateId]; if (!ArrayTemplate) { return this.props.templates[baseTemplateId] || _templates["default"][baseTemplateId]; } return ArrayTemplate; } }, { key: "isCloseable", value: function isCloseable() { var widgetId = this.props.schema.itemWidget; var itemWidget = this.props.widgets[widgetId] || _widgets["default"][widgetId]; if (!itemWidget) { return false; } return itemWidget.isCloseable === true; } }, { key: "renderItem", value: function renderItem(index, extraProps) { return /*#__PURE__*/_react["default"].createElement(_Widget["default"], _extends({}, this.props, extraProps, { disabled: this.props.schema.disabled, id: this.props.id && "".concat(this.props.id, "-").concat(index), schema: (0, _array.getArrayElementSchema)(this.props.schema, index), value: this.props.value[index] })); } }, { key: "render", value: function render() { var ArrayTemplate = this.getArrayTemplate(); return /*#__PURE__*/_react["default"].createElement(ArrayTemplate, _extends({}, this.props, { canReorder: this.props.schema.reorder !== false, onAdd: this.onAdd, onReorder: this.onReorder, onRemove: this.onRemove, renderItem: this.renderItem, isCloseable: this.isCloseable() })); } }]); return ArrayWidget; }(_react["default"].Component); exports["default"] = ArrayWidget; ArrayWidget.defaultProps = { value: [], templates: {}, widgets: {} }; if (process.env.NODE_ENV !== 'production') { ArrayWidget.propTypes = { displayMode: _propTypes["default"].string, id: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, schema: _propTypes["default"].object.isRequired, templates: _propTypes["default"].object, value: _propTypes["default"].array, widgets: _propTypes["default"].object }; } //# sourceMappingURL=Array.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4103 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** * @license * Lodash <https://lodash.com/> * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ ;(function() { /** Used as a safe reference for `undefined` in pre-ES5 environments. */ var undefined; /** Used as the semantic version number. */ var VERSION = '4.17.20'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** Error message constants. */ var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', FUNC_ERROR_TEXT = 'Expected a function'; /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** 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_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512; /** Used as default options for `_.truncate`. */ var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = '...'; /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; /** Used to indicate the type of lazy iteratees. */ var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3; /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 1.7976931348623157e+308, NAN = 0 / 0; /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; /** Used to associate wrap methods with their bit flags. */ var wrapFlags = [ ['ary', WRAP_ARY_FLAG], ['bind', WRAP_BIND_FLAG], ['bindKey', WRAP_BIND_KEY_FLAG], ['curry', WRAP_CURRY_FLAG], ['curryRight', WRAP_CURRY_RIGHT_FLAG], ['flip', WRAP_FLIP_FLAG], ['partial', WRAP_PARTIAL_FLAG], ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], ['rearg', WRAP_REARG_FLAG] ]; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', asyncTag = '[object AsyncFunction]', boolTag = '[object Boolean]', dateTag = '[object Date]', domExcTag = '[object DOMException]', 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]', weakSetTag = '[object WeakSet]'; 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 empty string literals in compiled template source. */ var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; /** Used to match HTML entities and HTML characters. */ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source); /** Used to match template delimiters. */ var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g; /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g, reTrimStart = /^\s+/, reTrimEnd = /\s+$/; /** Used to match wrap detail comments. */ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /; /** Used to match words composed of alphanumeric characters. */ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Used to match * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). */ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** 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 host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** Used to match Latin Unicode letters (excluding mathematical operators). */ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; /** Used to ensure capturing order of template delimiters. */ var reNoMatch = /($^)/; /** Used to match unescaped characters in compiled string literals. */ var reUnescapedString = /['\n\r\u2028\u2029\\]/g; /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = '\\u2700-\\u27bf', rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', rsPunctuationRange = '\\u2000-\\u206f', rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', rsVarRange = '\\ufe0e\\ufe0f', rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; /** Used to compose unicode capture groups. */ var rsApos = "['\u2019]", rsAstral = '[' + rsAstralRange + ']', rsBreak = '[' + rsBreakRange + ']', rsCombo = '[' + rsComboRange + ']', rsDigits = '\\d+', rsDingbat = '[' + rsDingbatRange + ']', rsLower = '[' + rsLowerRange + ']', rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', rsFitz = '\\ud83c[\\udffb-\\udfff]', rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', rsUpper = '[' + rsUpperRange + ']', rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match apostrophes. */ var reApos = RegExp(rsApos, 'g'); /** * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). */ var reComboMark = RegExp(rsCombo, 'g'); /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** Used to match complex or compound words. */ var reUnicodeWord = RegExp([ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, rsUpper + '+' + rsOptContrUpper, rsOrdUpper, rsOrdLower, rsDigits, rsEmoji ].join('|'), 'g'); /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); /** Used to detect strings that need a more robust regexp to match words. */ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; /** Used to assign default `context` object properties. */ var contextProps = [ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' ]; /** Used to make template sourceURLs easier to identify. */ var templateCounter = -1; /** 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; /** Used to identify `toStringTag` values supported by `_.clone`. */ var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; /** Used to map Latin Unicode letters to basic Latin letters. */ var deburredLetters = { // Latin-1 Supplement block. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', '\xc7': 'C', '\xe7': 'c', '\xd0': 'D', '\xf0': 'd', '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', '\xd1': 'N', '\xf1': 'n', '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', '\xc6': 'Ae', '\xe6': 'ae', '\xde': 'Th', '\xfe': 'th', '\xdf': 'ss', // Latin Extended-A block. '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', '\u0134': 'J', '\u0135': 'j', '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', '\u0163': 't', '\u0165': 't', '\u0167': 't', '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', '\u0174': 'W', '\u0175': 'w', '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', '\u0132': 'IJ', '\u0133': 'ij', '\u0152': 'Oe', '\u0153': 'oe', '\u0149': "'n", '\u017f': 's' }; /** Used to map characters to HTML entities. */ var htmlEscapes = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }; /** Used to map HTML entities to characters. */ var htmlUnescapes = { '&': '&', '<': '<', '>': '>', '"': '"', ''': "'" }; /** Used to escape characters for inclusion in compiled string literals. */ var stringEscapes = { '\\': '\\', "'": "'", '\n': 'n', '\r': 'r', '\u2028': 'u2028', '\u2029': 'u2029' }; /** Built-in method references without a dependency on `root`. */ var freeParseFloat = parseFloat, 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')(); /** 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) {} }()); /* Node.js helper references. */ var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /*--------------------------------------------------------------------------*/ /** * 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); } /** * A specialized version of `baseAggregator` for arrays. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform keys. * @param {Object} accumulator The initial aggregated object. * @returns {Function} Returns `accumulator`. */ function arrayAggregator(array, setter, iteratee, accumulator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { var value = array[index]; setter(accumulator, value, iteratee(value), array); } return accumulator; } /** * 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; } /** * A specialized version of `_.forEachRight` 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 arrayEachRight(array, iteratee) { var length = array == null ? 0 : array.length; while (length--) { if (iteratee(array[length], length, array) === false) { break; } } return array; } /** * A specialized version of `_.every` 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 all elements pass the predicate check, * else `false`. */ function arrayEvery(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (!predicate(array[index], index, array)) { return false; } } return true; } /** * 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; } /** * 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; } /** * 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; } /** * 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; } /** * 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 `_.reduce` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as * the initial value. * @returns {*} Returns the accumulated value. */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { accumulator = iteratee(accumulator, array[index], index, array); } return accumulator; } /** * A specialized version of `_.reduceRight` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the last element of `array` as * the initial value. * @returns {*} Returns the accumulated value. */ function arrayReduceRight(array, iteratee, accumulator, initAccum) { var length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[--length]; } while (length--) { accumulator = iteratee(accumulator, array[length], length, array); } return accumulator; } /** * 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; } /** * Gets the size of an ASCII `string`. * * @private * @param {string} string The string inspect. * @returns {number} Returns the string size. */ var asciiSize = baseProperty('length'); /** * Converts an ASCII `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function asciiToArray(string) { return string.split(''); } /** * Splits an ASCII `string` into an array of its words. * * @private * @param {string} The string to inspect. * @returns {Array} Returns the words of `string`. */ function asciiWords(string) { return string.match(reAsciiWord) || []; } /** * The base implementation of methods like `_.findKey` and `_.findLastKey`, * without support for iteratee shorthands, which iterates over `collection` * using `eachFunc`. * * @private * @param {Array|Object} collection The collection to inspect. * @param {Function} predicate The function invoked per iteration. * @param {Function} eachFunc The function to iterate over `collection`. * @returns {*} Returns the found element or its key, else `undefined`. */ function baseFindKey(collection, predicate, eachFunc) { var result; eachFunc(collection, function(value, key, collection) { if (predicate(value, key, collection)) { result = key; return false; } }); return result; } /** * 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; } /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } /** * This function is like `baseIndexOf` except that it accepts a comparator. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @param {Function} comparator The comparator invoked per element. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOfWith(array, value, fromIndex, comparator) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (comparator(array[index], value)) { return index; } } return -1; } /** * The base implementation of `_.isNaN` without support for number objects. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. */ function baseIsNaN(value) { return value !== value; } /** * The base implementation of `_.mean` and `_.meanBy` without support for * iteratee shorthands. * * @private * @param {Array} array The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {number} Returns the mean. */ function baseMean(array, iteratee) { var length = array == null ? 0 : array.length; return length ? (baseSum(array, iteratee) / length) : NAN; } /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { return object == null ? undefined : object[key]; }; } /** * The base implementation of `_.propertyOf` without support for deep paths. * * @private * @param {Object} object The object to query. * @returns {Function} Returns the new accessor function. */ function basePropertyOf(object) { return function(key) { return object == null ? undefined : object[key]; }; } /** * The base implementation of `_.reduce` and `_.reduceRight`, without support * for iteratee shorthands, which iterates over `collection` using `eachFunc`. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} accumulator The initial value. * @param {boolean} initAccum Specify using the first or last element of * `collection` as the initial value. * @param {Function} eachFunc The function to iterate over `collection`. * @returns {*} Returns the accumulated value. */ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { eachFunc(collection, function(value, index, collection) { accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection); }); return accumulator; } /** * The base implementation of `_.sortBy` which uses `comparer` to define the * sort order of `array` and replaces criteria objects with their corresponding * values. * * @private * @param {Array} array The array to sort. * @param {Function} comparer The function to define sort order. * @returns {Array} Returns `array`. */ function baseSortBy(array, comparer) { var length = array.length; array.sort(comparer); while (length--) { array[length] = array[length].value; } return array; } /** * The base implementation of `_.sum` and `_.sumBy` without support for * iteratee shorthands. * * @private * @param {Array} array The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {number} Returns the sum. */ function baseSum(array, iteratee) { var result, index = -1, length = array.length; while (++index < length) { var current = iteratee(array[index]); if (current !== undefined) { result = result === undefined ? current : (result + current); } } return result; } /** * 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 `_.toPairs` and `_.toPairsIn` which creates an array * of key-value pairs for `object` corresponding to the property names of `props`. * * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. * @returns {Object} Returns the key-value pairs. */ function baseToPairs(object, props) { return arrayMap(props, function(key) { return [key, object[key]]; }); } /** * 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); }; } /** * The base implementation of `_.values` and `_.valuesIn` which creates an * array of `object` property values corresponding to the property names * of `props`. * * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. * @returns {Object} Returns the array of property values. */ function baseValues(object, props) { return arrayMap(props, function(key) { return object[key]; }); } /** * 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); } /** * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol * that is not found in the character symbols. * * @private * @param {Array} strSymbols The string symbols to inspect. * @param {Array} chrSymbols The character symbols to find. * @returns {number} Returns the index of the first unmatched string symbol. */ function charsStartIndex(strSymbols, chrSymbols) { var index = -1, length = strSymbols.length; while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} return index; } /** * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol * that is not found in the character symbols. * * @private * @param {Array} strSymbols The string symbols to inspect. * @param {Array} chrSymbols The character symbols to find. * @returns {number} Returns the index of the last unmatched string symbol. */ function charsEndIndex(strSymbols, chrSymbols) { var index = strSymbols.length; while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} return index; } /** * Gets the number of `placeholder` occurrences in `array`. * * @private * @param {Array} array The array to inspect. * @param {*} placeholder The placeholder to search for. * @returns {number} Returns the placeholder count. */ function countHolders(array, placeholder) { var length = array.length, result = 0; while (length--) { if (array[length] === placeholder) { ++result; } } return result; } /** * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A * letters to basic Latin letters. * * @private * @param {string} letter The matched letter to deburr. * @returns {string} Returns the deburred letter. */ var deburrLetter = basePropertyOf(deburredLetters); /** * Used by `_.escape` to convert characters to HTML entities. * * @private * @param {string} chr The matched character to escape. * @returns {string} Returns the escaped character. */ var escapeHtmlChar = basePropertyOf(htmlEscapes); /** * Used by `_.template` to escape characters for inclusion in compiled string literals. * * @private * @param {string} chr The matched character to escape. * @returns {string} Returns the escaped character. */ function escapeStringChar(chr) { return '\\' + stringEscapes[chr]; } /** * 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]; } /** * Checks if `string` contains Unicode symbols. * * @private * @param {string} string The string to inspect. * @returns {boolean} Returns `true` if a symbol is found, else `false`. */ function hasUnicode(string) { return reHasUnicode.test(string); } /** * Checks if `string` contains a word composed of Unicode symbols. * * @private * @param {string} string The string to inspect. * @returns {boolean} Returns `true` if a word is found, else `false`. */ function hasUnicodeWord(string) { return reHasUnicodeWord.test(string); } /** * Converts `iterator` to an array. * * @private * @param {Object} iterator The iterator to convert. * @returns {Array} Returns the converted array. */ function iteratorToArray(iterator) { var data, result = []; while (!(data = iterator.next()).done) { result.push(data.value); } return result; } /** * 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)); }; } /** * 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; } /** * 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; } /** * Converts `set` to its value-value pairs. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the value-value pairs. */ function setToPairs(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = [value, value]; }); return result; } /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } /** * A specialized version of `_.lastIndexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictLastIndexOf(array, value, fromIndex) { var index = fromIndex + 1; while (index--) { if (array[index] === value) { return index; } } return index; } /** * Gets the number of symbols in `string`. * * @private * @param {string} string The string to inspect. * @returns {number} Returns the string size. */ function stringSize(string) { return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); } /** * Converts `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function stringToArray(string) { return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); } /** * Used by `_.unescape` to convert HTML entities to characters. * * @private * @param {string} chr The matched character to unescape. * @returns {string} Returns the unescaped character. */ var unescapeHtmlChar = basePropertyOf(htmlUnescapes); /** * Gets the size of a Unicode `string`. * * @private * @param {string} string The string inspect. * @returns {number} Returns the string size. */ function unicodeSize(string) { var result = reUnicode.lastIndex = 0; while (reUnicode.test(string)) { ++result; } return result; } /** * Converts a Unicode `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function unicodeToArray(string) { return string.match(reUnicode) || []; } /** * Splits a Unicode `string` into an array of its words. * * @private * @param {string} The string to inspect. * @returns {Array} Returns the words of `string`. */ function unicodeWords(string) { return string.match(reUnicodeWord) || []; } /*--------------------------------------------------------------------------*/ /** * Create a new pristine `lodash` function using the `context` object. * * @static * @memberOf _ * @since 1.1.0 * @category Util * @param {Object} [context=root] The context object. * @returns {Function} Returns a new `lodash` function. * @example * * _.mixin({ 'foo': _.constant('foo') }); * * var lodash = _.runInContext(); * lodash.mixin({ 'bar': lodash.constant('bar') }); * * _.isFunction(_.foo); * // => true * _.isFunction(_.bar); * // => false * * lodash.isFunction(lodash.foo); * // => false * lodash.isFunction(lodash.bar); * // => true * * // Create a suped-up `defer` in Node.js. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; */ var runInContext = (function runInContext(context) { context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); /** Built-in constructor references. */ var Array = context.Array, Date = context.Date, Error = context.Error, Function = context.Function, Math = context.Math, Object = context.Object, RegExp = context.RegExp, String = context.String, TypeError = context.TypeError; /** 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 = context['__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 generate unique IDs. */ var idCounter = 0; /** 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 infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); /** Used to restore the original `_` reference in `_.noConflict`. */ var oldDash = root._; /** 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 ? context.Buffer : undefined, Symbol = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, getPrototype = overArg(Object.getPrototypeOf, Object), objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, symIterator = Symbol ? Symbol.iterator : undefined, symToStringTag = Symbol ? Symbol.toStringTag : undefined; var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); /** Mocked built-ins. */ var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date && Date.now !== root.Date.now && Date.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeCeil = Math.ceil, nativeFloor = Math.floor, nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object.keys, Object), nativeMax = Math.max, nativeMin = Math.min, nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math.random, nativeReverse = arrayProto.reverse; /* Built-in method references that are verified to be native. */ var DataView = getNative(context, 'DataView'), Map = getNative(context, 'Map'), Promise = getNative(context, 'Promise'), Set = getNative(context, 'Set'), WeakMap = getNative(context, 'WeakMap'), nativeCreate = getNative(Object, 'create'); /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; /** Used to lookup unminified function names. */ var realNames = {}; /** 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, symbolToString = symbolProto ? symbolProto.toString : undefined; /*------------------------------------------------------------------------*/ /** * Creates a `lodash` object which wraps `value` to enable implicit method * chain sequences. Methods that operate on and return arrays, collections, * and functions can be chained together. Methods that retrieve a single value * or may return a primitive value will automatically end the chain sequence * and return the unwrapped value. Otherwise, the value must be unwrapped * with `_#value`. * * Explicit chain sequences, which must be unwrapped with `_#value`, may be * enabled using `_.chain`. * * The execution of chained methods is lazy, that is, it's deferred until * `_#value` is implicitly or explicitly called. * * Lazy evaluation allows several methods to support shortcut fusion. * Shortcut fusion is an optimization to merge iteratee calls; this avoids * the creation of intermediate arrays and can greatly reduce the number of * iteratee executions. Sections of a chain sequence qualify for shortcut * fusion if the section is applied to an array and iteratees accept only * one argument. The heuristic for whether a section qualifies for shortcut * fusion is subject to change. * * Chaining is supported in custom builds as long as the `_#value` method is * directly or indirectly included in the build. * * In addition to lodash methods, wrappers have `Array` and `String` methods. * * The wrapper `Array` methods are: * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` * * The wrapper `String` methods are: * `replace` and `split` * * The wrapper methods that support shortcut fusion are: * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` * * The chainable wrapper methods are: * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, * `zipObject`, `zipObjectDeep`, and `zipWith` * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, * `upperFirst`, `value`, and `words` * * @name _ * @constructor * @category Seq * @param {*} value The value to wrap in a `lodash` instance. * @returns {Object} Returns the new `lodash` wrapper instance. * @example * * function square(n) { * return n * n; * } * * var wrapped = _([1, 2, 3]); * * // Returns an unwrapped value. * wrapped.reduce(_.add); * // => 6 * * // Returns a wrapped value. * var squares = wrapped.map(square); * * _.isArray(squares); * // => false * * _.isArray(squares.value()); * // => true */ function lodash(value) { if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { if (value instanceof LodashWrapper) { return value; } if (hasOwnProperty.call(value, '__wrapped__')) { return wrapperClone(value); } } return new LodashWrapper(value); } /** * 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; }; }()); /** * The function whose prototype chain sequence wrappers inherit from. * * @private */ function baseLodash() { // No operation performed. } /** * 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; } /** * By default, the template delimiters used by lodash are like those in * embedded Ruby (ERB) as well as ES2015 template strings. Change the * following template settings to use alternative delimiters. * * @static * @memberOf _ * @type {Object} */ lodash.templateSettings = { /** * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings * @type {RegExp} */ 'escape': reEscape, /** * Used to detect code to be evaluated. * * @memberOf _.templateSettings * @type {RegExp} */ 'evaluate': reEvaluate, /** * Used to detect `data` property values to inject. * * @memberOf _.templateSettings * @type {RegExp} */ 'interpolate': reInterpolate, /** * Used to reference the data object in the template text. * * @memberOf _.templateSettings * @type {string} */ 'variable': '', /** * Used to import variables into the compiled template. * * @memberOf _.templateSettings * @type {Object} */ 'imports': { /** * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports * @type {Function} */ '_': lodash } }; // Ensure wrappers are instances of `baseLodash`. lodash.prototype = baseLodash.prototype; lodash.prototype.constructor = lodash; LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; /*------------------------------------------------------------------------*/ /** * 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__ = []; } /** * Creates a clone of the lazy wrapper object. * * @private * @name clone * @memberOf LazyWrapper * @returns {Object} Returns the cloned `LazyWrapper` object. */ function lazyClone() { var result = new LazyWrapper(this.__wrapped__); result.__actions__ = copyArray(this.__actions__); result.__dir__ = this.__dir__; result.__filtered__ = this.__filtered__; result.__iteratees__ = copyArray(this.__iteratees__); result.__takeCount__ = this.__takeCount__; result.__views__ = copyArray(this.__views__); return result; } /** * Reverses the direction of lazy iteration. * * @private * @name reverse * @memberOf LazyWrapper * @returns {Object} Returns the new reversed `LazyWrapper` object. */ function lazyReverse() { if (this.__filtered__) { var result = new LazyWrapper(this); result.__dir__ = -1; result.__filtered__ = true; } else { result = this.clone(); result.__dir__ *= -1; } return result; } /** * Extracts the unwrapped value from its lazy wrapper. * * @private * @name value * @memberOf LazyWrapper * @returns {*} Returns the unwrapped value. */ function lazyValue() { var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : (start - 1), iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__); if (!isArr || (!isRight && arrLength == length && takeCount == length)) { return baseWrapperValue(array, this.__actions__); } var result = []; outer: while (length-- && resIndex < takeCount) { index += dir; var iterIndex = -1, value = array[index]; while (++iterIndex < iterLength) { var data = iteratees[iterIndex], iteratee = data.iteratee, type = data.type, computed = iteratee(value); if (type == LAZY_MAP_FLAG) { value = computed; } else if (!computed) { if (type == LAZY_FILTER_FLAG) { continue outer; } else { break outer; } } } result[resIndex++] = value; } return result; } // Ensure `LazyWrapper` is an instance of `baseLodash`. LazyWrapper.prototype = baseCreate(baseLodash.prototype); LazyWrapper.prototype.constructor = LazyWrapper; /*------------------------------------------------------------------------*/ /** * 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; } /** * A specialized version of `_.sample` for arrays. * * @private * @param {Array} array The array to sample. * @returns {*} Returns the random element. */ function arraySample(array) { var length = array.length; return length ? array[baseRandom(0, length - 1)] : undefined; } /** * A specialized version of `_.sampleSize` for arrays. * * @private * @param {Array} array The array to sample. * @param {number} n The number of elements to sample. * @returns {Array} Returns the random elements. */ function arraySampleSize(array, n) { return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); } /** * A specialized version of `_.shuffle` for arrays. * * @private * @param {Array} array The array to shuffle. * @returns {Array} Returns the new shuffled array. */ function arrayShuffle(array) { return shuffleSelf(copyArray(array)); } /** * 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); } } /** * 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); } } /** * 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; } /** * Aggregates elements of `collection` on `accumulator` with keys transformed * by `iteratee` and values set by `setter`. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform keys. * @param {Object} accumulator The initial aggregated object. * @returns {Function} Returns `accumulator`. */ function baseAggregator(collection, setter, iteratee, accumulator) { baseEach(collection, function(value, key, collection) { setter(accumulator, value, iteratee(value), collection); }); return accumulator; } /** * The base implementation of `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssign(object, source) { return object && copyObject(source, keys(source), object); } /** * The base implementation of `_.assignIn` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssignIn(object, source) { return object && copyObject(source, keysIn(source), object); } /** * 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; } } /** * The base implementation of `_.at` without support for individual paths. * * @private * @param {Object} object The object to iterate over. * @param {string[]} paths The property paths to pick. * @returns {Array} Returns the picked elements. */ function baseAt(object, paths) { var index = -1, length = paths.length, result = Array(length), skip = object == null; while (++index < length) { result[index] = skip ? undefined : get(object, paths[index]); } return result; } /** * The base implementation of `_.clamp` which doesn't coerce arguments. * * @private * @param {number} number The number to clamp. * @param {number} [lower] The lower bound. * @param {number} upper The upper bound. * @returns {number} Returns the clamped number. */ function baseClamp(number, lower, upper) { if (number === number) { if (upper !== undefined) { number = number <= upper ? number : upper; } if (lower !== undefined) { number = number >= lower ? number : lower; } } return number; } /** * The base implementation of `_.clone` and `_.cloneDeep` which tracks * traversed objects. * * @private * @param {*} value The value to clone. * @param {boolean} bitmask The bitmask flags. * 1 - Deep clone * 2 - Flatten inherited properties * 4 - Clone symbols * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ function baseClone(value, bitmask, customizer, key, object, stack) { var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== undefined) { return result; } if (!isObject(value)) { return value; } var isArr = isArray(value); if (isArr) { result = initCloneArray(value); if (!isDeep) { return copyArray(value, result); } } else { var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; if (isBuffer(value)) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { result = (isFlat || isFunc) ? {} : initCloneObject(value); if (!isDeep) { return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { return object ? value : {}; } result = initCloneByTag(value, tag, isDeep); } } // Check for circular references and return its corresponding clone. stack || (stack = new Stack); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); if (isSet(value)) { value.forEach(function(subValue) { result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); } else if (isMap(value)) { value.forEach(function(subValue, key) { result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); } var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : (isFlat ? keysIn : keys); var props = isArr ? undefined : keysFunc(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } /** * The base implementation of `_.conforms` which doesn't clone `source`. * * @private * @param {Object} source The object of property predicates to conform to. * @returns {Function} Returns the new spec function. */ function baseConforms(source) { var props = keys(source); return function(object) { return baseConformsTo(object, source, props); }; } /** * The base implementation of `_.conformsTo` which accepts `props` to check. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property predicates to conform to. * @returns {boolean} Returns `true` if `object` conforms, else `false`. */ function baseConformsTo(object, source, props) { var length = props.length; if (object == null) { return !length; } object = Object(object); while (length--) { var key = props[length], predicate = source[key], value = object[key]; if ((value === undefined && !(key in object)) || !predicate(value)) { return false; } } return true; } /** * The base implementation of `_.delay` and `_.defer` which accepts `args` * to provide to `func`. * * @private * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. * @param {Array} args The arguments to provide to `func`. * @returns {number|Object} Returns the timer id or timeout object. */ function baseDelay(func, wait, args) { if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } return setTimeout(function() { func.apply(undefined, args); }, wait); } /** * The base implementation of methods like `_.difference` without support * for excluding multiple arrays or iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Array} values The values to exclude. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of filtered values. */ function baseDifference(array, values, iteratee, comparator) { var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length; if (!length) { return result; } if (iteratee) { values = arrayMap(values, baseUnary(iteratee)); } if (comparator) { includes = arrayIncludesWith; isCommon = false; } else if (values.length >= LARGE_ARRAY_SIZE) { includes = cacheHas; isCommon = false; values = new SetCache(values); } outer: while (++index < length) { var value = array[index], computed = iteratee == null ? value : iteratee(value); value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var valuesIndex = valuesLength; while (valuesIndex--) { if (values[valuesIndex] === computed) { continue outer; } } result.push(value); } else if (!includes(values, computed, comparator)) { result.push(value); } } return result; } /** * 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); /** * The base implementation of `_.forEachRight` 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 baseEachRight = createBaseEach(baseForOwnRight, true); /** * The base implementation of `_.every` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false` */ function baseEvery(collection, predicate) { var result = true; baseEach(collection, function(value, index, collection) { result = !!predicate(value, index, collection); return result; }); return result; } /** * 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; } /** * The base implementation of `_.fill` without an iteratee call guard. * * @private * @param {Array} array The array to fill. * @param {*} value The value to fill `array` with. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns `array`. */ function baseFill(array, value, start, end) { var length = array.length; start = toInteger(start); if (start < 0) { start = -start > length ? 0 : (length + start); } end = (end === undefined || end > length) ? length : toInteger(end); if (end < 0) { end += length; } end = start > end ? 0 : toLength(end); while (start < end) { array[start++] = value; } return array; } /** * The base implementation of `_.filter` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function baseFilter(collection, predicate) { var result = []; baseEach(collection, function(value, index, collection) { if (predicate(value, index, collection)) { result.push(value); } }); return result; } /** * 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; } /** * 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(); /** * This function is like `baseFor` except that it iterates over properties * in the opposite order. * * @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 baseForRight = createBaseFor(true); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } /** * The base implementation of `_.forOwnRight` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwnRight(object, iteratee) { return object && baseForRight(object, iteratee, keys); } /** * The base implementation of `_.functions` which creates an array of * `object` function property names filtered from `props`. * * @private * @param {Object} object The object to inspect. * @param {Array} props The property names to filter. * @returns {Array} Returns the function names. */ function baseFunctions(object, props) { return arrayFilter(props, function(key) { return isFunction(object[key]); }); } /** * 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; } /** * 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 `_.gt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is greater than `other`, * else `false`. */ function baseGt(value, other) { return value > other; } /** * The base implementation of `_.has` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { return object != null && hasOwnProperty.call(object, key); } /** * The base implementation of `_.hasIn` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } /** * The base implementation of `_.inRange` which doesn't coerce arguments. * * @private * @param {number} number The number to check. * @param {number} start The start of the range. * @param {number} end The end of the range. * @returns {boolean} Returns `true` if `number` is in the range, else `false`. */ function baseInRange(number, start, end) { return number >= nativeMin(start, end) && number < nativeMax(start, end); } /** * The base implementation of methods like `_.intersection`, without support * for iteratee shorthands, that accepts an array of arrays to inspect. * * @private * @param {Array} arrays The arrays to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of shared values. */ function baseIntersection(arrays, iteratee, comparator) { var includes = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result = []; while (othIndex--) { var array = arrays[othIndex]; if (othIndex && iteratee) { array = arrayMap(array, baseUnary(iteratee)); } maxLength = nativeMin(array.length, maxLength); caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) ? new SetCache(othIndex && array) : undefined; } array = arrays[0]; var index = -1, seen = caches[0]; outer: while (++index < length && result.length < maxLength) { var value = array[index], computed = iteratee ? iteratee(value) : value; value = (comparator || value !== 0) ? value : 0; if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator) )) { othIndex = othLength; while (--othIndex) { var cache = caches[othIndex]; if (!(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator)) ) { continue outer; } } if (seen) { seen.push(computed); } result.push(value); } } return result; } /** * The base implementation of `_.invert` and `_.invertBy` which inverts * `object` with values transformed by `iteratee` and set by `setter`. * * @private * @param {Object} object The object to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform values. * @param {Object} accumulator The initial inverted object. * @returns {Function} Returns `accumulator`. */ function baseInverter(object, setter, iteratee, accumulator) { baseForOwn(object, function(value, key, object) { setter(accumulator, iteratee(value), key, object); }); return accumulator; } /** * The base implementation of `_.invoke` without support for individual * method arguments. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the method to invoke. * @param {Array} args The arguments to invoke the method with. * @returns {*} Returns the result of the invoked method. */ function baseInvoke(object, path, args) { path = castPath(path, object); object = parent(object, path); var func = object == null ? object : object[toKey(last(path))]; return func == null ? undefined : apply(func, object, args); } /** * 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 `_.isArrayBuffer` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. */ function baseIsArrayBuffer(value) { return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; } /** * The base implementation of `_.isDate` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a date object, else `false`. */ function baseIsDate(value) { return isObjectLike(value) && baseGetTag(value) == dateTag; } /** * 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 `_.isMap` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. */ function baseIsMap(value) { return isObjectLike(value) && getTag(value) == mapTag; } /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new Stack; if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; } } } return true; } /** * 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 `_.isRegExp` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. */ function baseIsRegExp(value) { return isObjectLike(value) && baseGetTag(value) == regexpTag; } /** * The base implementation of `_.isSet` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. */ function baseIsSet(value) { return isObjectLike(value) && getTag(value) == setTag; } /** * 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 `_.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); } /** * 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; } /** * The base implementation of `_.keysIn` 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 baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } /** * The base implementation of `_.lt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is less than `other`, * else `false`. */ function baseLt(value, other) { return value < other; } /** * The base implementation of `_.map` 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} Returns the new mapped array. */ function baseMap(collection, iteratee) { var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value, key, collection) { result[++index] = iteratee(value, key, collection); }); return result; } /** * The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } /** * The base implementation of `_.merge` without support for multiple sources. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {number} srcIndex The index of `source`. * @param {Function} [customizer] The function to customize merged values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } baseFor(source, function(srcValue, key) { stack || (stack = new Stack); if (isObject(srcValue)) { baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { newValue = srcValue; } assignMergeValue(object, key, newValue); } }, keysIn); } /** * A specialized version of `baseMerge` for arrays and objects which performs * deep merges and tracks traversed objects enabling objects with circular * references to be merged. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {string} key The key of the value to merge. * @param {number} srcIndex The index of `source`. * @param {Function} mergeFunc The function to merge values. * @param {Function} [customizer] The function to customize assigned values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, (key + ''), object, source, stack) : undefined; var isCommon = newValue === undefined; if (isCommon) { var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || isFunction(objValue)) { newValue = initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack['delete'](srcValue); } assignMergeValue(object, key, newValue); } /** * The base implementation of `_.nth` which doesn't coerce arguments. * * @private * @param {Array} array The array to query. * @param {number} n The index of the element to return. * @returns {*} Returns the nth element of `array`. */ function baseNth(array, n) { var length = array.length; if (!length) { return; } n += n < 0 ? length : 0; return isIndex(n, length) ? array[n] : undefined; } /** * The base implementation of `_.orderBy` without param guards. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. * @param {string[]} orders The sort orders of `iteratees`. * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { if (iteratees.length) { iteratees = arrayMap(iteratees, function(iteratee) { if (isArray(iteratee)) { return function(value) { return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); } } return iteratee; }); } else { iteratees = [identity]; } var index = -1; iteratees = arrayMap(iteratees, baseUnary(getIteratee())); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); }); return { 'criteria': criteria, 'index': ++index, 'value': value }; }); return baseSortBy(result, function(object, other) { return compareMultiple(object, other, orders); }); } /** * The base implementation of `_.pick` without support for individual * property identifiers. * * @private * @param {Object} object The source object. * @param {string[]} paths The property paths to pick. * @returns {Object} Returns the new object. */ function basePick(object, paths) { return basePickBy(object, paths, function(value, path) { return hasIn(object, path); }); } /** * The base implementation of `_.pickBy` without support for iteratee shorthands. * * @private * @param {Object} object The source object. * @param {string[]} paths The property paths to pick. * @param {Function} predicate The function invoked per property. * @returns {Object} Returns the new object. */ function basePickBy(object, paths, predicate) { var index = -1, length = paths.length, result = {}; while (++index < length) { var path = paths[index], value = baseGet(object, path); if (predicate(value, path)) { baseSet(result, castPath(path, object), value); } } return result; } /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } /** * The base implementation of `_.pullAllBy` without support for iteratee * shorthands. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to remove. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns `array`. */ function basePullAll(array, values, iteratee, comparator) { var indexOf = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values.length, seen = array; if (array === values) { values = copyArray(values); } if (iteratee) { seen = arrayMap(array, baseUnary(iteratee)); } while (++index < length) { var fromIndex = 0, value = values[index], computed = iteratee ? iteratee(value) : value; while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { if (seen !== array) { splice.call(seen, fromIndex, 1); } splice.call(array, fromIndex, 1); } } return array; } /** * The base implementation of `_.pullAt` without support for individual * indexes or capturing the removed elements. * * @private * @param {Array} array The array to modify. * @param {number[]} indexes The indexes of elements to remove. * @returns {Array} Returns `array`. */ function basePullAt(array, indexes) { var length = array ? indexes.length : 0, lastIndex = length - 1; while (length--) { var index = indexes[length]; if (length == lastIndex || index !== previous) { var previous = index; if (isIndex(index)) { splice.call(array, index, 1); } else { baseUnset(array, index); } } } return array; } /** * The base implementation of `_.random` without support for returning * floating-point numbers. * * @private * @param {number} lower The lower bound. * @param {number} upper The upper bound. * @returns {number} Returns the random number. */ function baseRandom(lower, upper) { return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); } /** * The base implementation of `_.range` and `_.rangeRight` which doesn't * coerce arguments. * * @private * @param {number} start The start of the range. * @param {number} end The end of the range. * @param {number} step The value to increment or decrement by. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Array} Returns the range of numbers. */ function baseRange(start, end, step, fromRight) { var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result = Array(length); while (length--) { result[fromRight ? length : ++index] = start; start += step; } return result; } /** * The base implementation of `_.repeat` which doesn't coerce arguments. * * @private * @param {string} string The string to repeat. * @param {number} n The number of times to repeat the string. * @returns {string} Returns the repeated string. */ function baseRepeat(string, n) { var result = ''; if (!string || n < 1 || n > MAX_SAFE_INTEGER) { return result; } // Leverage the exponentiation by squaring algorithm for a faster repeat. // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. do { if (n % 2) { result += string; } n = nativeFloor(n / 2); if (n) { string += string; } } while (n); return result; } /** * 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 + ''); } /** * The base implementation of `_.sample`. * * @private * @param {Array|Object} collection The collection to sample. * @returns {*} Returns the random element. */ function baseSample(collection) { return arraySample(values(collection)); } /** * The base implementation of `_.sampleSize` without param guards. * * @private * @param {Array|Object} collection The collection to sample. * @param {number} n The number of elements to sample. * @returns {Array} Returns the random elements. */ function baseSampleSize(collection, n) { var array = values(collection); return shuffleSelf(array, baseClamp(n, 0, array.length)); } /** * 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; } /** * 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; }; /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !defineProperty ? identity : function(func, string) { return defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(string), 'writable': true }); }; /** * The base implementation of `_.shuffle`. * * @private * @param {Array|Object} collection The collection to shuffle. * @returns {Array} Returns the new shuffled array. */ function baseShuffle(collection) { return shuffleSelf(values(collection)); } /** * The base implementation of `_.slice` without an iteratee call guard. * * @private * @param {Array} array The array to slice. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the slice of `array`. */ function baseSlice(array, start, end) { var index = -1, length = array.length; if (start < 0) { start = -start > length ? 0 : (length + start); } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : ((end - start) >>> 0); start >>>= 0; var result = Array(length); while (++index < length) { result[index] = array[index + start]; } return result; } /** * The base implementation of `_.some` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection 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 baseSome(collection, predicate) { var result; baseEach(collection, function(value, index, collection) { result = predicate(value, index, collection); return !result; }); return !!result; } /** * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which * performs a binary search of `array` to determine the index at which `value` * should be inserted into `array` in order to maintain its sort order. * * @private * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. * @param {boolean} [retHighest] Specify returning the highest qualified index. * @returns {number} Returns the index at which `value` should be inserted * into `array`. */ function baseSortedIndex(array, value, retHighest) { var low = 0, high = array == null ? low : array.length; if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { while (low < high) { var mid = (low + high) >>> 1, computed = array[mid]; if (computed !== null && !isSymbol(computed) && (retHighest ? (computed <= value) : (computed < value))) { low = mid + 1; } else { high = mid; } } return high; } return baseSortedIndexBy(array, value, identity, retHighest); } /** * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` * which invokes `iteratee` for `value` and each element of `array` to compute * their sort ranking. The iteratee is invoked with one argument; (value). * * @private * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. * @param {Function} iteratee The iteratee invoked per element. * @param {boolean} [retHighest] Specify returning the highest qualified index. * @returns {number} Returns the index at which `value` should be inserted * into `array`. */ function baseSortedIndexBy(array, value, iteratee, retHighest) { var low = 0, high = array == null ? 0 : array.length; if (high === 0) { return 0; } value = iteratee(value); var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined; while (low < high) { var mid = nativeFloor((low + high) / 2), computed = iteratee(array[mid]), othIsDefined = computed !== undefined, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed); if (valIsNaN) { var setLow = retHighest || othIsReflexive; } else if (valIsUndefined) { setLow = othIsReflexive && (retHighest || othIsDefined); } else if (valIsNull) { setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); } else if (valIsSymbol) { setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); } else if (othIsNull || othIsSymbol) { setLow = false; } else { setLow = retHighest ? (computed <= value) : (computed < value); } if (setLow) { low = mid + 1; } else { high = mid; } } return nativeMin(high, MAX_ARRAY_INDEX); } /** * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. */ function baseSortedUniq(array, iteratee) { var index = -1, length = array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index], computed = iteratee ? iteratee(value) : value; if (!index || !eq(computed, seen)) { var seen = computed; result[resIndex++] = value === 0 ? 0 : value; } } return result; } /** * The base implementation of `_.toNumber` which doesn't ensure correct * conversions of binary, hexadecimal, or octal string values. * * @private * @param {*} value The value to process. * @returns {number} Returns the number. */ function baseToNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } return +value; } /** * 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; } /** * The base implementation of `_.uniqBy` without support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new duplicate free array. */ function baseUniq(array, iteratee, comparator) { var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; if (comparator) { isCommon = false; includes = arrayIncludesWith; } else if (length >= LARGE_ARRAY_SIZE) { var set = iteratee ? null : createSet(array); if (set) { return setToArray(set); } isCommon = false; includes = cacheHas; seen = new SetCache; } else { seen = iteratee ? [] : result; } outer: while (++index < length) { var value = array[index], computed = iteratee ? iteratee(value) : value; value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var seenIndex = seen.length; while (seenIndex--) { if (seen[seenIndex] === computed) { continue outer; } } if (iteratee) { seen.push(computed); } result.push(value); } else if (!includes(seen, computed, comparator)) { if (seen !== result) { seen.push(computed); } result.push(value); } } return result; } /** * The base implementation of `_.unset`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The property path to unset. * @returns {boolean} Returns `true` if the property is deleted, else `false`. */ function baseUnset(object, path) { path = castPath(path, object); object = parent(object, path); return object == null || delete object[toKey(last(path))]; } /** * The base implementation of `_.update`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to update. * @param {Function} updater The function to produce the updated value. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseUpdate(object, path, updater, customizer) { return baseSet(object, path, updater(baseGet(object, path)), customizer); } /** * The base implementation of methods like `_.dropWhile` and `_.takeWhile` * without support for iteratee shorthands. * * @private * @param {Array} array The array to query. * @param {Function} predicate The function invoked per iteration. * @param {boolean} [isDrop] Specify dropping elements instead of taking them. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Array} Returns the slice of `array`. */ function baseWhile(array, predicate, isDrop, fromRight) { var length = array.length, index = fromRight ? length : -1; while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} return isDrop ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); } /** * The base implementation of `wrapperValue` which returns the result of * performing a sequence of actions on the unwrapped `value`, where each * successive action is supplied the return value of the previous. * * @private * @param {*} value The unwrapped value. * @param {Array} actions Actions to perform to resolve the unwrapped value. * @returns {*} Returns the resolved value. */ function baseWrapperValue(value, actions) { var result = value; if (result instanceof LazyWrapper) { result = result.value(); } return arrayReduce(actions, function(result, action) { return action.func.apply(action.thisArg, arrayPush([result], action.args)); }, result); } /** * The base implementation of methods like `_.xor`, without support for * iteratee shorthands, that accepts an array of arrays to inspect. * * @private * @param {Array} arrays The arrays to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of values. */ function baseXor(arrays, iteratee, comparator) { var length = arrays.length; if (length < 2) { return length ? baseUniq(arrays[0]) : []; } var index = -1, result = Array(length); while (++index < length) { var array = arrays[index], othIndex = -1; while (++othIndex < length) { if (othIndex != index) { result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); } } } return baseUniq(baseFlatten(result, 1), iteratee, comparator); } /** * This base implementation of `_.zipObject` which assigns values using `assignFunc`. * * @private * @param {Array} props The property identifiers. * @param {Array} values The property values. * @param {Function} assignFunc The function to assign values. * @returns {Object} Returns the new object. */ function baseZipObject(props, values, assignFunc) { var index = -1, length = props.length, valsLength = values.length, result = {}; while (++index < length) { var value = index < valsLength ? values[index] : undefined; assignFunc(result, props[index], value); } return result; } /** * Casts `value` to an empty array if it's not an array like object. * * @private * @param {*} value The value to inspect. * @returns {Array|Object} Returns the cast array-like object. */ function castArrayLikeObject(value) { return isArrayLikeObject(value) ? value : []; } /** * Casts `value` to `identity` if it's not a function. * * @private * @param {*} value The value to inspect. * @returns {Function} Returns cast function. */ function castFunction(value) { return typeof value == 'function' ? value : identity; } /** * 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)); } /** * A `baseRest` alias which can be replaced with `identity` by module * replacement plugins. * * @private * @type {Function} * @param {Function} func The function to apply a rest parameter to. * @returns {Function} Returns the new function. */ var castRest = baseRest; /** * Casts `array` to a slice if it's needed. * * @private * @param {Array} array The array to inspect. * @param {number} start The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the cast slice. */ function castSlice(array, start, end) { var length = array.length; end = end === undefined ? length : end; return (!start && end >= length) ? array : baseSlice(array, start, end); } /** * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). * * @private * @param {number|Object} id The timer id or timeout object of the timer to clear. */ var clearTimeout = ctxClearTimeout || function(id) { return root.clearTimeout(id); }; /** * 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; } /** * 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; } /** * Creates a clone of `dataView`. * * @private * @param {Object} dataView The data view to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned data view. */ function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } /** * Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } /** * Creates a clone of the `symbol` object. * * @private * @param {Object} symbol The symbol object to clone. * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } /** * 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); } /** * Compares values to sort them in ascending order. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {number} Returns the sort order indicator for `value`. */ function compareAscending(value, other) { if (value !== other) { var valIsDefined = value !== undefined, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value); var othIsDefined = other !== undefined, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || (valIsNull && othIsDefined && othIsReflexive) || (!valIsDefined && othIsReflexive) || !valIsReflexive) { return 1; } if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || (othIsNull && valIsDefined && valIsReflexive) || (!othIsDefined && valIsReflexive) || !othIsReflexive) { return -1; } } return 0; } /** * Used by `_.orderBy` to compare multiple properties of a value to another * and stable sort them. * * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, * specify an order of "desc" for descending or "asc" for ascending sort order * of corresponding values. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {boolean[]|string[]} orders The order to sort by for each property. * @returns {number} Returns the sort order indicator for `object`. */ function compareMultiple(object, other, orders) { var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; while (++index < length) { var result = compareAscending(objCriteria[index], othCriteria[index]); if (result) { if (index >= ordersLength) { return result; } var order = orders[index]; return result * (order == 'desc' ? -1 : 1); } } // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications // that causes it, under certain circumstances, to provide the same value for // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 // for more details. // // This also ensures a stable sort in V8 and other engines. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. return object.index - other.index; } /** * 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; } /** * 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; } /** * 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; } /** * 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; } /** * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbols(source, object) { return copyObject(source, getSymbols(source), object); } /** * Copies own and inherited symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbolsIn(source, object) { return copyObject(source, getSymbolsIn(source), object); } /** * Creates a function like `_.groupBy`. * * @private * @param {Function} setter The function to set accumulator values. * @param {Function} [initializer] The accumulator object initializer. * @returns {Function} Returns the new aggregator function. */ function createAggregator(setter, initializer) { return function(collection, iteratee) { var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; return func(collection, setter, getIteratee(iteratee, 2), accumulator); }; } /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } /** * Creates a `baseEach` or `baseEachRight` function. * * @private * @param {Function} eachFunc The function to iterate over a collection. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); while ((fromRight ? index-- : ++index < length)) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } /** * Creates a function that wraps `func` to invoke it with the optional `this` * binding of `thisArg`. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ function createBind(func, bitmask, thisArg) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper() { var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; return fn.apply(isBind ? thisArg : this, arguments); } return wrapper; } /** * Creates a function like `_.lowerFirst`. * * @private * @param {string} methodName The name of the `String` case method to use. * @returns {Function} Returns the new case function. */ function createCaseFirst(methodName) { return function(string) { string = toString(string); var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; var chr = strSymbols ? strSymbols[0] : string.charAt(0); var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1); return chr[methodName]() + trailing; }; } /** * Creates a function like `_.camelCase`. * * @private * @param {Function} callback The function to combine each word. * @returns {Function} Returns the new compounder function. */ function createCompounder(callback) { return function(string) { return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); }; } /** * 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; }; } /** * Creates a function that wraps `func` to enable currying. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createCurry(func, bitmask, arity) { var Ctor = createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length, placeholder = getHolder(wrapper); while (index--) { args[index] = arguments[index]; } var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) ? [] : replaceHolders(args, placeholder); length -= holders.length; if (length < arity) { return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; return apply(fn, this, args); } return wrapper; } /** * Creates a `_.find` or `_.findLast` function. * * @private * @param {Function} findIndexFunc The function to find the collection index. * @returns {Function} Returns the new find function. */ function createFind(findIndexFunc) { return function(collection, predicate, fromIndex) { var iterable = Object(collection); if (!isArrayLike(collection)) { var iteratee = getIteratee(predicate, 3); collection = keys(collection); predicate = function(key) { return iteratee(iterable[key], key, iterable); }; } var index = findIndexFunc(collection, predicate, fromIndex); return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; }; } /** * Creates a `_.flow` or `_.flowRight` function. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new flow function. */ function createFlow(fromRight) { return flatRest(function(funcs) { var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru; if (fromRight) { funcs.reverse(); } while (index--) { var func = funcs[index]; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } if (prereq && !wrapper && getFuncName(func) == 'wrapper') { var wrapper = new LodashWrapper([], true); } } index = wrapper ? index : length; while (++index < length) { func = funcs[index]; var funcName = getFuncName(func), data = funcName == 'wrapper' ? getData(func) : undefined; if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1 ) { wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); } else { wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func); } } return function() { var args = arguments, value = args[0]; if (wrapper && args.length == 1 && isArray(value)) { return wrapper.plant(value).value(); } var index = 0, result = length ? funcs[index].apply(this, args) : value; while (++index < length) { result = funcs[index].call(this, result); } return result; }; }); } /** * 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; } /** * Creates a function like `_.invertBy`. * * @private * @param {Function} setter The function to set accumulator values. * @param {Function} toIteratee The function to resolve iteratees. * @returns {Function} Returns the new inverter function. */ function createInverter(setter, toIteratee) { return function(object, iteratee) { return baseInverter(object, setter, toIteratee(iteratee), {}); }; } /** * Creates a function that performs a mathematical operation on two values. * * @private * @param {Function} operator The function to perform the operation. * @param {number} [defaultValue] The value used for `undefined` arguments. * @returns {Function} Returns the new mathematical operation function. */ function createMathOperation(operator, defaultValue) { return function(value, other) { var result; if (value === undefined && other === undefined) { return defaultValue; } if (value !== undefined) { result = value; } if (other !== undefined) { if (result === undefined) { return other; } if (typeof value == 'string' || typeof other == 'string') { value = baseToString(value); other = baseToString(other); } else { value = baseToNumber(value); other = baseToNumber(other); } result = operator(value, other); } return result; }; } /** * Creates a function like `_.over`. * * @private * @param {Function} arrayFunc The function to iterate over iteratees. * @returns {Function} Returns the new over function. */ function createOver(arrayFunc) { return flatRest(function(iteratees) { iteratees = arrayMap(iteratees, baseUnary(getIteratee())); return baseRest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee) { return apply(iteratee, thisArg, args); }); }); }); } /** * Creates the padding for `string` based on `length`. The `chars` string * is truncated if the number of characters exceeds `length`. * * @private * @param {number} length The padding length. * @param {string} [chars=' '] The string used as padding. * @returns {string} Returns the padding for `string`. */ function createPadding(length, chars) { chars = chars === undefined ? ' ' : baseToString(chars); var charsLength = chars.length; if (charsLength < 2) { return charsLength ? baseRepeat(chars, length) : chars; } var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); return hasUnicode(chars) ? castSlice(stringToArray(result), 0, length).join('') : result.slice(0, length); } /** * Creates a function that wraps `func` to invoke it with the `this` binding * of `thisArg` and `partials` prepended to the arguments it receives. * * @private * @param {Function} func The function 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. * @returns {Function} Returns the new wrapped function. */ function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper() { var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; } while (argsLength--) { args[leftIndex++] = arguments[++argsIndex]; } return apply(fn, isBind ? thisArg : this, args); } return wrapper; } /** * Creates a `_.range` or `_.rangeRight` function. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new range function. */ function createRange(fromRight) { return function(start, end, step) { if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { end = step = undefined; } // Ensure the sign of `-0` is preserved. start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { end = toFinite(end); } step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); return baseRange(start, end, step, fromRight); }; } /** * Creates a function that performs a relational operation on two values. * * @private * @param {Function} operator The function to perform the operation. * @returns {Function} Returns the new relational operation function. */ function createRelationalOperation(operator) { return function(value, other) { if (!(typeof value == 'string' && typeof other == 'string')) { value = toNumber(value); other = toNumber(other); } return operator(value, other); }; } /** * 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); } /** * Creates a function like `_.round`. * * @private * @param {string} methodName The name of the `Math` method to use when rounding. * @returns {Function} Returns the new round function. */ function createRound(methodName) { var func = Math[methodName]; return function(number, precision) { number = toNumber(number); precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); if (precision && nativeIsFinite(number)) { // Shift with exponential notation to avoid floating-point issues. // See [MDN](https://mdn.io/round#Examples) for more details. var pair = (toString(number) + 'e').split('e'), value = func(pair[0] + 'e' + (+pair[1] + precision)); pair = (toString(value) + 'e').split('e'); return +(pair[0] + 'e' + (+pair[1] - precision)); } return func(number); }; } /** * Creates a set object of `values`. * * @private * @param {Array} values The values to add to the set. * @returns {Object} Returns the new set. */ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { return new Set(values); }; /** * Creates a `_.toPairs` or `_.toPairsIn` function. * * @private * @param {Function} keysFunc The function to get the keys of a given object. * @returns {Function} Returns the new pairs function. */ function createToPairs(keysFunc) { return function(object) { var tag = getTag(object); if (tag == mapTag) { return mapToArray(object); } if (tag == setTag) { return setToPairs(object); } return baseToPairs(object, keysFunc(object)); }; } /** * Creates a function that either curries or invokes `func` with optional * `this` binding and partially applied arguments. * * @private * @param {Function|string} func The function or method name to wrap. * @param {number} bitmask The bitmask flags. * 1 - `_.bind` * 2 - `_.bindKey` * 4 - `_.curry` or `_.curryRight` of a bound function * 8 - `_.curry` * 16 - `_.curryRight` * 32 - `_.partial` * 64 - `_.partialRight` * 128 - `_.rearg` * 256 - `_.ary` * 512 - `_.flip` * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to be partially applied. * @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 createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; if (!isBindKey && typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } var length = partials ? partials.length : 0; if (!length) { bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); partials = holders = undefined; } ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); arity = arity === undefined ? arity : toInteger(arity); length -= holders ? holders.length : 0; if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { var partialsRight = partials, holdersRight = holders; partials = holders = undefined; } var data = isBindKey ? undefined : getData(func); var newData = [ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity ]; if (data) { mergeData(newData, data); } func = newData[0]; bitmask = newData[1]; thisArg = newData[2]; partials = newData[3]; holders = newData[4]; arity = newData[9] = newData[9] === undefined ? (isBindKey ? 0 : func.length) : nativeMax(newData[9] - length, 0); if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == WRAP_BIND_FLAG) { var result = createBind(func, bitmask, thisArg); } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { result = createCurry(func, bitmask, arity); } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { result = createPartial(func, bitmask, thisArg, partials); } else { result = createHybrid.apply(undefined, newData); } var setter = data ? baseSetData : setData; return setWrapToString(setter(result, newData), func, bitmask); } /** * Used by `_.defaults` to customize its `_.assignIn` use to assign properties * of source objects to the destination object for all destination properties * that resolve to `undefined`. * * @private * @param {*} objValue The destination value. * @param {*} srcValue The source value. * @param {string} key The key of the property to assign. * @param {Object} object The parent object of `objValue`. * @returns {*} Returns the value to assign. */ function customDefaultsAssignIn(objValue, srcValue, key, object) { if (objValue === undefined || (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { return srcValue; } return objValue; } /** * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source * objects into destination objects that are passed thru. * * @private * @param {*} objValue The destination value. * @param {*} srcValue The source value. * @param {string} key The key of the property to merge. * @param {Object} object The parent object of `objValue`. * @param {Object} source The parent object of `srcValue`. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. * @returns {*} Returns the value to assign. */ function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { if (isObject(objValue) && isObject(srcValue)) { // Recursively merge objects and arrays (susceptible to call stack limits). stack.set(srcValue, objValue); baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); stack['delete'](srcValue); } return objValue; } /** * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain * objects. * * @private * @param {*} value The value to inspect. * @param {string} key The key of the property to inspect. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. */ function customOmitClone(value) { return isPlainObject(value) ? undefined : value; } /** * 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; } /** * 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; } } // Check that cyclic values are equal. var objStacked = stack.get(object); var othStacked = stack.get(other); if (objStacked && othStacked) { return objStacked == other && othStacked == object; } 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; } /** * 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 + ''); } /** * 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); } /** * 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); } /** * 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); }; /** * 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; } /** * 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 = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; return object.placeholder; } /** * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, * this function returns the custom method, otherwise it returns `baseIteratee`. * If arguments are provided, the chosen function is invoked with them and * its result is returned. * * @private * @param {*} [value] The value to convert to an iteratee. * @param {number} [arity] The arity of the created iteratee. * @returns {Function} Returns the chosen function or its result. */ function getIteratee() { var result = lodash.iteratee || iteratee; result = result === iteratee ? baseIteratee : result; return arguments.length ? result(arguments[0], arguments[1]) : result; } /** * 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 property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } /** * 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); }); }; /** * 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; }; /** * 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; }; } /** * Gets the view, applying any `transforms` to the `start` and `end` positions. * * @private * @param {number} start The start of the view. * @param {number} end The end of the view. * @param {Array} transforms The transformations to apply to the view. * @returns {Object} Returns an object containing the `start` and `end` * positions of the view. */ function getView(start, end, transforms) { var index = -1, length = transforms.length; while (++index < length) { var data = transforms[index], size = data.size; switch (data.type) { case 'drop': start += size; break; case 'dropRight': end -= size; break; case 'take': end = nativeMin(end, start + size); break; case 'takeRight': start = nativeMax(start, end - size); break; } } return { 'start': start, 'end': end }; } /** * Extracts wrapper details from the `source` body comment. * * @private * @param {string} source The source to inspect. * @returns {Array} Returns the wrapper details. */ function getWrapDetails(source) { var match = source.match(reWrapDetails); return match ? match[1].split(reSplitDetails) : []; } /** * 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)); } /** * Initializes an array clone. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the initialized clone. */ function initCloneArray(array) { var length = array.length, result = new array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result; } /** * 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)) : {}; } /** * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ function initCloneByTag(object, tag, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: return cloneArrayBuffer(object); case boolTag: case dateTag: return new Ctor(+object); case dataViewTag: return cloneDataView(object, isDeep); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: return cloneTypedArray(object, isDeep); case mapTag: return new Ctor; case numberTag: case stringTag: return new Ctor(object); case regexpTag: return cloneRegExp(object); case setTag: return new Ctor; case symbolTag: return cloneSymbol(object); } } /** * Inserts wrapper `details` in a comment at the top of the `source` body. * * @private * @param {string} source The source to modify. * @returns {Array} details The details to insert. * @returns {string} Returns the modified source. */ function insertWrapDetails(source, details) { var length = details.length; if (!length) { return source; } var lastIndex = length - 1; details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; details = details.join(length > 2 ? ', ' : ' '); return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); } /** * Checks if `value` is a flattenable `arguments` object or array. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } /** * 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); } /** * 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; } /** * 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)); } /** * 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 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]; } /** * 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 `func` is capable of being masked. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `func` is maskable, else `false`. */ var isMaskable = coreJsData ? isFunction : stubFalse; /** * 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; } /** * 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); } /** * 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))); }; } /** * 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; } /** * Merges the function metadata of `source` into `data`. * * Merging metadata reduces the number of wrappers used to invoke a function. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` * may be applied regardless of execution order. Methods like `_.ary` and * `_.rearg` modify function arguments, making the order in which they are * executed important, preventing the merging of metadata. However, we make * an exception for a safe combined case where curried functions have `_.ary` * and or `_.rearg` applied. * * @private * @param {Array} data The destination metadata. * @param {Array} source The source metadata. * @returns {Array} Returns `data`. */ function mergeData(data, source) { var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); var isCombo = ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); // Exit early if metadata can't be merged. if (!(isCommon || isCombo)) { return data; } // Use source `thisArg` if available. if (srcBitmask & WRAP_BIND_FLAG) { data[2] = source[2]; // Set when currying a bound function. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; } // Compose partial arguments. var value = source[3]; if (value) { var partials = data[3]; data[3] = partials ? composeArgs(partials, value, source[4]) : value; data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; } // Compose partial right arguments. value = source[5]; if (value) { partials = data[5]; data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; } // Use source `argPos` if available. value = source[7]; if (value) { data[7] = value; } // Use source `ary` if it's smaller. if (srcBitmask & WRAP_ARY_FLAG) { data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); } // Use source `arity` if one is not provided. if (data[9] == null) { data[9] = source[9]; } // Use source `func` and merge bitmasks. data[0] = source[0]; data[1] = newBitmask; return data; } /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } /** * 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); } /** * 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); }; } /** * Gets the parent value at `path` of `object`. * * @private * @param {Object} object The object to query. * @param {Array} path The path to get the parent value of. * @returns {*} Returns the parent value. */ function parent(object, path) { return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); } /** * Reorder `array` according to the specified indexes where the element at * the first index is assigned as the first element, the element at * the second index is assigned as the second element, and so on. * * @private * @param {Array} array The array to reorder. * @param {Array} indexes The arranged array indexes. * @returns {Array} Returns `array`. */ function reorder(array, indexes) { var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array); while (length--) { var index = indexes[length]; array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; } return array; } /** * 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]; } /** * 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); /** * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). * * @private * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. * @returns {number|Object} Returns the timer id or timeout object. */ var setTimeout = ctxSetTimeout || function(func, wait) { return root.setTimeout(func, wait); }; /** * 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); /** * 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))); } /** * 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); }; } /** * A specialized version of `_.shuffle` which mutates and sets the size of `array`. * * @private * @param {Array} array The array to shuffle. * @param {number} [size=array.length] The size of `array`. * @returns {Array} Returns `array`. */ function shuffleSelf(array, size) { var index = -1, length = array.length, lastIndex = length - 1; size = size === undefined ? length : size; while (++index < size) { var rand = baseRandom(index, lastIndex), value = array[rand]; array[rand] = array[index]; array[index] = value; } array.length = size; return array; } /** * 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; }); /** * 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; } /** * 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 ''; } /** * Updates wrapper `details` based on `bitmask` flags. * * @private * @returns {Array} details The details to modify. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Array} Returns `details`. */ function updateWrapDetails(details, bitmask) { arrayEach(wrapFlags, function(pair) { var value = '_.' + pair[0]; if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { details.push(value); } }); return details.sort(); } /** * Creates a clone of `wrapper`. * * @private * @param {Object} wrapper The wrapper to clone. * @returns {Object} Returns the cloned wrapper. */ function wrapperClone(wrapper) { if (wrapper instanceof LazyWrapper) { return wrapper.clone(); } var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); result.__actions__ = copyArray(wrapper.__actions__); result.__index__ = wrapper.__index__; result.__values__ = wrapper.__values__; return result; } /*------------------------------------------------------------------------*/ /** * Creates an array of elements split into groups the length of `size`. * If `array` can't be split evenly, the final chunk will be the remaining * elements. * * @static * @memberOf _ * @since 3.0.0 * @category Array * @param {Array} array The array to process. * @param {number} [size=1] The length of each chunk * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the new array of chunks. * @example * * _.chunk(['a', 'b', 'c', 'd'], 2); * // => [['a', 'b'], ['c', 'd']] * * _.chunk(['a', 'b', 'c', 'd'], 3); * // => [['a', 'b', 'c'], ['d']] */ function chunk(array, size, guard) { if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { size = 1; } else { size = nativeMax(toInteger(size), 0); } var length = array == null ? 0 : array.length; if (!length || size < 1) { return []; } var index = 0, resIndex = 0, result = Array(nativeCeil(length / size)); while (index < length) { result[resIndex++] = baseSlice(array, index, (index += size)); } return result; } /** * Creates an array with all falsey values removed. The values `false`, `null`, * `0`, `""`, `undefined`, and `NaN` are falsey. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to compact. * @returns {Array} Returns the new array of filtered values. * @example * * _.compact([0, 1, false, 2, '', 3]); * // => [1, 2, 3] */ function compact(array) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value) { result[resIndex++] = value; } } return result; } /** * Creates a new array concatenating `array` with any additional arrays * and/or values. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to concatenate. * @param {...*} [values] The values to concatenate. * @returns {Array} Returns the new concatenated array. * @example * * var array = [1]; * var other = _.concat(array, 2, [3], [[4]]); * * console.log(other); * // => [1, 2, 3, [4]] * * console.log(array); * // => [1] */ function concat() { var length = arguments.length; if (!length) { return []; } var args = Array(length - 1), array = arguments[0], index = length; while (index--) { args[index - 1] = arguments[index]; } return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); } /** * Creates an array of `array` values not included in the other given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. The order and references of result values are * determined by the first array. * * **Note:** Unlike `_.pullAll`, this method returns a new array. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. * @see _.without, _.xor * @example * * _.difference([2, 1], [2, 3]); * // => [1] */ var difference = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; }); /** * This method is like `_.difference` except that it accepts `iteratee` which * is invoked for each element of `array` and `values` to generate the criterion * by which they're compared. The order and references of result values are * determined by the first array. The iteratee is invoked with one argument: * (value). * * **Note:** Unlike `_.pullAllBy`, this method returns a new array. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of filtered values. * @example * * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); * // => [1.2] * * // The `_.property` iteratee shorthand. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ var differenceBy = baseRest(function(array, values) { var iteratee = last(values); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) : []; }); /** * This method is like `_.difference` except that it accepts `comparator` * which is invoked to compare elements of `array` to `values`. The order and * references of result values are determined by the first array. The comparator * is invoked with two arguments: (arrVal, othVal). * * **Note:** Unlike `_.pullAllWith`, this method returns a new array. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of filtered values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; * * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); * // => [{ 'x': 2, 'y': 1 }] */ var differenceWith = baseRest(function(array, values) { var comparator = last(values); if (isArrayLikeObject(comparator)) { comparator = undefined; } return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) : []; }); /** * Creates a slice of `array` with `n` elements dropped from the beginning. * * @static * @memberOf _ * @since 0.5.0 * @category Array * @param {Array} array The array to query. * @param {number} [n=1] The number of elements to drop. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the slice of `array`. * @example * * _.drop([1, 2, 3]); * // => [2, 3] * * _.drop([1, 2, 3], 2); * // => [3] * * _.drop([1, 2, 3], 5); * // => [] * * _.drop([1, 2, 3], 0); * // => [1, 2, 3] */ function drop(array, n, guard) { var length = array == null ? 0 : array.length; if (!length) { return []; } n = (guard || n === undefined) ? 1 : toInteger(n); return baseSlice(array, n < 0 ? 0 : n, length); } /** * Creates a slice of `array` with `n` elements dropped from the end. * * @static * @memberOf _ * @since 3.0.0 * @category Array * @param {Array} array The array to query. * @param {number} [n=1] The number of elements to drop. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the slice of `array`. * @example * * _.dropRight([1, 2, 3]); * // => [1, 2] * * _.dropRight([1, 2, 3], 2); * // => [1] * * _.dropRight([1, 2, 3], 5); * // => [] * * _.dropRight([1, 2, 3], 0); * // => [1, 2, 3] */ function dropRight(array, n, guard) { var length = array == null ? 0 : array.length; if (!length) { return []; } n = (guard || n === undefined) ? 1 : toInteger(n); n = length - n; return baseSlice(array, 0, n < 0 ? 0 : n); } /** * Creates a slice of `array` excluding elements dropped from the end. * Elements are dropped until `predicate` returns falsey. The predicate is * invoked with three arguments: (value, index, array). * * @static * @memberOf _ * @since 3.0.0 * @category Array * @param {Array} array The array to query. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * * var users = [ * { 'user': 'barney', 'active': true }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': false } * ]; * * _.dropRightWhile(users, function(o) { return !o.active; }); * // => objects for ['barney'] * * // The `_.matches` iteratee shorthand. * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); * // => objects for ['barney', 'fred'] * * // The `_.matchesProperty` iteratee shorthand. * _.dropRightWhile(users, ['active', false]); * // => objects for ['barney'] * * // The `_.property` iteratee shorthand. * _.dropRightWhile(users, 'active'); * // => objects for ['barney', 'fred', 'pebbles'] */ function dropRightWhile(array, predicate) { return (array && array.length) ? baseWhile(array, getIteratee(predicate, 3), true, true) : []; } /** * Creates a slice of `array` excluding elements dropped from the beginning. * Elements are dropped until `predicate` returns falsey. The predicate is * invoked with three arguments: (value, index, array). * * @static * @memberOf _ * @since 3.0.0 * @category Array * @param {Array} array The array to query. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * * var users = [ * { 'user': 'barney', 'active': false }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': true } * ]; * * _.dropWhile(users, function(o) { return !o.active; }); * // => objects for ['pebbles'] * * // The `_.matches` iteratee shorthand. * _.dropWhile(users, { 'user': 'barney', 'active': false }); * // => objects for ['fred', 'pebbles'] * * // The `_.matchesProperty` iteratee shorthand. * _.dropWhile(users, ['active', false]); * // => objects for ['pebbles'] * * // The `_.property` iteratee shorthand. * _.dropWhile(users, 'active'); * // => objects for ['barney', 'fred', 'pebbles'] */ function dropWhile(array, predicate) { return (array && array.length) ? baseWhile(array, getIteratee(predicate, 3), true) : []; } /** * Fills elements of `array` with `value` from `start` up to, but not * including, `end`. * * **Note:** This method mutates `array`. * * @static * @memberOf _ * @since 3.2.0 * @category Array * @param {Array} array The array to fill. * @param {*} value The value to fill `array` with. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns `array`. * @example * * var array = [1, 2, 3]; * * _.fill(array, 'a'); * console.log(array); * // => ['a', 'a', 'a'] * * _.fill(Array(3), 2); * // => [2, 2, 2] * * _.fill([4, 6, 8, 10], '*', 1, 3); * // => [4, '*', '*', 10] */ function fill(array, value, start, end) { var length = array == null ? 0 : array.length; if (!length) { return []; } if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { start = 0; end = length; } return baseFill(array, value, start, end); } /** * This method is like `_.find` except that it returns the index of the first * element `predicate` returns truthy for instead of the element itself. * * @static * @memberOf _ * @since 1.1.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * * var users = [ * { 'user': 'barney', 'active': false }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': true } * ]; * * _.findIndex(users, function(o) { return o.user == 'barney'; }); * // => 0 * * // The `_.matches` iteratee shorthand. * _.findIndex(users, { 'user': 'fred', 'active': false }); * // => 1 * * // The `_.matchesProperty` iteratee shorthand. * _.findIndex(users, ['active', false]); * // => 0 * * // The `_.property` iteratee shorthand. * _.findIndex(users, 'active'); * // => 2 */ function findIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = fromIndex == null ? 0 : toInteger(fromIndex); if (index < 0) { index = nativeMax(length + index, 0); } return baseFindIndex(array, getIteratee(predicate, 3), index); } /** * This method is like `_.findIndex` except that it iterates over elements * of `collection` from right to left. * * @static * @memberOf _ * @since 2.0.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * * var users = [ * { 'user': 'barney', 'active': true }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': false } * ]; * * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); * // => 2 * * // The `_.matches` iteratee shorthand. * _.findLastIndex(users, { 'user': 'barney', 'active': true }); * // => 0 * * // The `_.matchesProperty` iteratee shorthand. * _.findLastIndex(users, ['active', false]); * // => 2 * * // The `_.property` iteratee shorthand. * _.findLastIndex(users, 'active'); * // => 0 */ function findLastIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = length - 1; if (fromIndex !== undefined) { index = toInteger(fromIndex); index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); } return baseFindIndex(array, getIteratee(predicate, 3), index, true); } /** * Flattens `array` a single level deep. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to flatten. * @returns {Array} Returns the new flattened array. * @example * * _.flatten([1, [2, [3, [4]], 5]]); * // => [1, 2, [3, [4]], 5] */ function flatten(array) { var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } /** * Recursively flattens `array`. * * @static * @memberOf _ * @since 3.0.0 * @category Array * @param {Array} array The array to flatten. * @returns {Array} Returns the new flattened array. * @example * * _.flattenDeep([1, [2, [3, [4]], 5]]); * // => [1, 2, 3, 4, 5] */ function flattenDeep(array) { var length = array == null ? 0 : array.length; return length ? baseFlatten(array, INFINITY) : []; } /** * Recursively flatten `array` up to `depth` times. * * @static * @memberOf _ * @since 4.4.0 * @category Array * @param {Array} array The array to flatten. * @param {number} [depth=1] The maximum recursion depth. * @returns {Array} Returns the new flattened array. * @example * * var array = [1, [2, [3, [4]], 5]]; * * _.flattenDepth(array, 1); * // => [1, 2, [3, [4]], 5] * * _.flattenDepth(array, 2); * // => [1, 2, 3, [4], 5] */ function flattenDepth(array, depth) { var length = array == null ? 0 : array.length; if (!length) { return []; } depth = depth === undefined ? 1 : toInteger(depth); return baseFlatten(array, depth); } /** * The inverse of `_.toPairs`; this method returns an object composed * from key-value `pairs`. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} pairs The key-value pairs. * @returns {Object} Returns the new object. * @example * * _.fromPairs([['a', 1], ['b', 2]]); * // => { 'a': 1, 'b': 2 } */ function fromPairs(pairs) { var index = -1, length = pairs == null ? 0 : pairs.length, result = {}; while (++index < length) { var pair = pairs[index]; result[pair[0]] = pair[1]; } return result; } /** * Gets the first element of `array`. * * @static * @memberOf _ * @since 0.1.0 * @alias first * @category Array * @param {Array} array The array to query. * @returns {*} Returns the first element of `array`. * @example * * _.head([1, 2, 3]); * // => 1 * * _.head([]); * // => undefined */ function head(array) { return (array && array.length) ? array[0] : undefined; } /** * Gets the index at which the first occurrence of `value` is found in `array` * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. If `fromIndex` is negative, it's used as the * offset from the end of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. * @example * * _.indexOf([1, 2, 1, 2], 2); * // => 1 * * // Search from the `fromIndex`. * _.indexOf([1, 2, 1, 2], 2, 2); * // => 3 */ function indexOf(array, value, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = fromIndex == null ? 0 : toInteger(fromIndex); if (index < 0) { index = nativeMax(length + index, 0); } return baseIndexOf(array, value, index); } /** * Gets all but the last element of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to query. * @returns {Array} Returns the slice of `array`. * @example * * _.initial([1, 2, 3]); * // => [1, 2] */ function initial(array) { var length = array == null ? 0 : array.length; return length ? baseSlice(array, 0, -1) : []; } /** * Creates an array of unique values that are included in all given arrays * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. The order and references of result values are * determined by the first array. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @returns {Array} Returns the new array of intersecting values. * @example * * _.intersection([2, 1], [2, 3]); * // => [2] */ var intersection = baseRest(function(arrays) { var mapped = arrayMap(arrays, castArrayLikeObject); return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped) : []; }); /** * This method is like `_.intersection` except that it accepts `iteratee` * which is invoked for each element of each `arrays` to generate the criterion * by which they're compared. The order and references of result values are * determined by the first array. The iteratee is invoked with one argument: * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of intersecting values. * @example * * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); * // => [2.1] * * // The `_.property` iteratee shorthand. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }] */ var intersectionBy = baseRest(function(arrays) { var iteratee = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); if (iteratee === last(mapped)) { iteratee = undefined; } else { mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped, getIteratee(iteratee, 2)) : []; }); /** * This method is like `_.intersection` except that it accepts `comparator` * which is invoked to compare elements of `arrays`. The order and references * of result values are determined by the first array. The comparator is * invoked with two arguments: (arrVal, othVal). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of intersecting values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; * * _.intersectionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }] */ var intersectionWith = baseRest(function(arrays) { var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); comparator = typeof comparator == 'function' ? comparator : undefined; if (comparator) { mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped, undefined, comparator) : []; }); /** * Converts all elements in `array` into a string separated by `separator`. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to convert. * @param {string} [separator=','] The element separator. * @returns {string} Returns the joined string. * @example * * _.join(['a', 'b', 'c'], '~'); * // => 'a~b~c' */ function join(array, separator) { return array == null ? '' : nativeJoin.call(array, separator); } /** * 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; } /** * This method is like `_.indexOf` except that it iterates over elements of * `array` from right to left. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. * @example * * _.lastIndexOf([1, 2, 1, 2], 2); * // => 3 * * // Search from the `fromIndex`. * _.lastIndexOf([1, 2, 1, 2], 2, 2); * // => 1 */ function lastIndexOf(array, value, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = length; if (fromIndex !== undefined) { index = toInteger(fromIndex); index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); } return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true); } /** * Gets the element at index `n` of `array`. If `n` is negative, the nth * element from the end is returned. * * @static * @memberOf _ * @since 4.11.0 * @category Array * @param {Array} array The array to query. * @param {number} [n=0] The index of the element to return. * @returns {*} Returns the nth element of `array`. * @example * * var array = ['a', 'b', 'c', 'd']; * * _.nth(array, 1); * // => 'b' * * _.nth(array, -2); * // => 'c'; */ function nth(array, n) { return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; } /** * Removes all given values from `array` using * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` * to remove elements from an array by predicate. * * @static * @memberOf _ * @since 2.0.0 * @category Array * @param {Array} array The array to modify. * @param {...*} [values] The values to remove. * @returns {Array} Returns `array`. * @example * * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * * _.pull(array, 'a', 'c'); * console.log(array); * // => ['b', 'b'] */ var pull = baseRest(pullAll); /** * This method is like `_.pull` except that it accepts an array of values to remove. * * **Note:** Unlike `_.difference`, this method mutates `array`. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to modify. * @param {Array} values The values to remove. * @returns {Array} Returns `array`. * @example * * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * * _.pullAll(array, ['a', 'c']); * console.log(array); * // => ['b', 'b'] */ function pullAll(array, values) { return (array && array.length && values && values.length) ? basePullAll(array, values) : array; } /** * This method is like `_.pullAll` except that it accepts `iteratee` which is * invoked for each element of `array` and `values` to generate the criterion * by which they're compared. The iteratee is invoked with one argument: (value). * * **Note:** Unlike `_.differenceBy`, this method mutates `array`. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to modify. * @param {Array} values The values to remove. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns `array`. * @example * * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; * * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); * console.log(array); * // => [{ 'x': 2 }] */ function pullAllBy(array, values, iteratee) { return (array && array.length && values && values.length) ? basePullAll(array, values, getIteratee(iteratee, 2)) : array; } /** * This method is like `_.pullAll` except that it accepts `comparator` which * is invoked to compare elements of `array` to `values`. The comparator is * invoked with two arguments: (arrVal, othVal). * * **Note:** Unlike `_.differenceWith`, this method mutates `array`. * * @static * @memberOf _ * @since 4.6.0 * @category Array * @param {Array} array The array to modify. * @param {Array} values The values to remove. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns `array`. * @example * * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; * * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); * console.log(array); * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] */ function pullAllWith(array, values, comparator) { return (array && array.length && values && values.length) ? basePullAll(array, values, undefined, comparator) : array; } /** * Removes elements from `array` corresponding to `indexes` and returns an * array of removed elements. * * **Note:** Unlike `_.at`, this method mutates `array`. * * @static * @memberOf _ * @since 3.0.0 * @category Array * @param {Array} array The array to modify. * @param {...(number|number[])} [indexes] The indexes of elements to remove. * @returns {Array} Returns the new array of removed elements. * @example * * var array = ['a', 'b', 'c', 'd']; * var pulled = _.pullAt(array, [1, 3]); * * console.log(array); * // => ['a', 'c'] * * console.log(pulled); * // => ['b', 'd'] */ var pullAt = flatRest(function(array, indexes) { var length = array == null ? 0 : array.length, result = baseAt(array, indexes); basePullAt(array, arrayMap(indexes, function(index) { return isIndex(index, length) ? +index : index; }).sort(compareAscending)); return result; }); /** * Removes all elements from `array` that `predicate` returns truthy for * and returns an array of the removed elements. The predicate is invoked * with three arguments: (value, index, array). * * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` * to pull elements from an array by value. * * @static * @memberOf _ * @since 2.0.0 * @category Array * @param {Array} array The array to modify. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new array of removed elements. * @example * * var array = [1, 2, 3, 4]; * var evens = _.remove(array, function(n) { * return n % 2 == 0; * }); * * console.log(array); * // => [1, 3] * * console.log(evens); * // => [2, 4] */ function remove(array, predicate) { var result = []; if (!(array && array.length)) { return result; } var index = -1, indexes = [], length = array.length; predicate = getIteratee(predicate, 3); while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result.push(value); indexes.push(index); } } basePullAt(array, indexes); return result; } /** * Reverses `array` so that the first element becomes the last, the second * element becomes the second to last, and so on. * * **Note:** This method mutates `array` and is based on * [`Array#reverse`](https://mdn.io/Array/reverse). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to modify. * @returns {Array} Returns `array`. * @example * * var array = [1, 2, 3]; * * _.reverse(array); * // => [3, 2, 1] * * console.log(array); * // => [3, 2, 1] */ function reverse(array) { return array == null ? array : nativeReverse.call(array); } /** * Creates a slice of `array` from `start` up to, but not including, `end`. * * **Note:** This method is used instead of * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are * returned. * * @static * @memberOf _ * @since 3.0.0 * @category Array * @param {Array} array The array to slice. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the slice of `array`. */ function slice(array, start, end) { var length = array == null ? 0 : array.length; if (!length) { return []; } if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { start = 0; end = length; } else { start = start == null ? 0 : toInteger(start); end = end === undefined ? length : toInteger(end); } return baseSlice(array, start, end); } /** * Uses a binary search to determine the lowest index at which `value` * should be inserted into `array` in order to maintain its sort order. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * * _.sortedIndex([30, 50], 40); * // => 1 */ function sortedIndex(array, value) { return baseSortedIndex(array, value); } /** * This method is like `_.sortedIndex` except that it accepts `iteratee` * which is invoked for `value` and each element of `array` to compute their * sort ranking. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * * var objects = [{ 'x': 4 }, { 'x': 5 }]; * * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); * // => 0 * * // The `_.property` iteratee shorthand. * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); * // => 0 */ function sortedIndexBy(array, value, iteratee) { return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); } /** * This method is like `_.indexOf` except that it performs a binary * search on a sorted `array`. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @returns {number} Returns the index of the matched value, else `-1`. * @example * * _.sortedIndexOf([4, 5, 5, 5, 6], 5); * // => 1 */ function sortedIndexOf(array, value) { var length = array == null ? 0 : array.length; if (length) { var index = baseSortedIndex(array, value); if (index < length && eq(array[index], value)) { return index; } } return -1; } /** * This method is like `_.sortedIndex` except that it returns the highest * index at which `value` should be inserted into `array` in order to * maintain its sort order. * * @static * @memberOf _ * @since 3.0.0 * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * * _.sortedLastIndex([4, 5, 5, 5, 6], 5); * // => 4 */ function sortedLastIndex(array, value) { return baseSortedIndex(array, value, true); } /** * This method is like `_.sortedLastIndex` except that it accepts `iteratee` * which is invoked for `value` and each element of `array` to compute their * sort ranking. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The sorted array to inspect. * @param {*} value The value to evaluate. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the index at which `value` should be inserted * into `array`. * @example * * var objects = [{ 'x': 4 }, { 'x': 5 }]; * * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); * // => 1 * * // The `_.property` iteratee shorthand. * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); * // => 1 */ function sortedLastIndexBy(array, value, iteratee) { return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); } /** * This method is like `_.lastIndexOf` except that it performs a binary * search on a sorted `array`. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @returns {number} Returns the index of the matched value, else `-1`. * @example * * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); * // => 3 */ function sortedLastIndexOf(array, value) { var length = array == null ? 0 : array.length; if (length) { var index = baseSortedIndex(array, value, true) - 1; if (eq(array[index], value)) { return index; } } return -1; } /** * This method is like `_.uniq` except that it's designed and optimized * for sorted arrays. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @returns {Array} Returns the new duplicate free array. * @example * * _.sortedUniq([1, 1, 2]); * // => [1, 2] */ function sortedUniq(array) { return (array && array.length) ? baseSortedUniq(array) : []; } /** * This method is like `_.uniqBy` except that it's designed and optimized * for sorted arrays. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. * @example * * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); * // => [1.1, 2.3] */ function sortedUniqBy(array, iteratee) { return (array && array.length) ? baseSortedUniq(array, getIteratee(iteratee, 2)) : []; } /** * Gets all but the first element of `array`. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to query. * @returns {Array} Returns the slice of `array`. * @example * * _.tail([1, 2, 3]); * // => [2, 3] */ function tail(array) { var length = array == null ? 0 : array.length; return length ? baseSlice(array, 1, length) : []; } /** * Creates a slice of `array` with `n` elements taken from the beginning. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to query. * @param {number} [n=1] The number of elements to take. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the slice of `array`. * @example * * _.take([1, 2, 3]); * // => [1] * * _.take([1, 2, 3], 2); * // => [1, 2] * * _.take([1, 2, 3], 5); * // => [1, 2, 3] * * _.take([1, 2, 3], 0); * // => [] */ function take(array, n, guard) { if (!(array && array.length)) { return []; } n = (guard || n === undefined) ? 1 : toInteger(n); return baseSlice(array, 0, n < 0 ? 0 : n); } /** * Creates a slice of `array` with `n` elements taken from the end. * * @static * @memberOf _ * @since 3.0.0 * @category Array * @param {Array} array The array to query. * @param {number} [n=1] The number of elements to take. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the slice of `array`. * @example * * _.takeRight([1, 2, 3]); * // => [3] * * _.takeRight([1, 2, 3], 2); * // => [2, 3] * * _.takeRight([1, 2, 3], 5); * // => [1, 2, 3] * * _.takeRight([1, 2, 3], 0); * // => [] */ function takeRight(array, n, guard) { var length = array == null ? 0 : array.length; if (!length) { return []; } n = (guard || n === undefined) ? 1 : toInteger(n); n = length - n; return baseSlice(array, n < 0 ? 0 : n, length); } /** * Creates a slice of `array` with elements taken from the end. Elements are * taken until `predicate` returns falsey. The predicate is invoked with * three arguments: (value, index, array). * * @static * @memberOf _ * @since 3.0.0 * @category Array * @param {Array} array The array to query. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * * var users = [ * { 'user': 'barney', 'active': true }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': false } * ]; * * _.takeRightWhile(users, function(o) { return !o.active; }); * // => objects for ['fred', 'pebbles'] * * // The `_.matches` iteratee shorthand. * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); * // => objects for ['pebbles'] * * // The `_.matchesProperty` iteratee shorthand. * _.takeRightWhile(users, ['active', false]); * // => objects for ['fred', 'pebbles'] * * // The `_.property` iteratee shorthand. * _.takeRightWhile(users, 'active'); * // => [] */ function takeRightWhile(array, predicate) { return (array && array.length) ? baseWhile(array, getIteratee(predicate, 3), false, true) : []; } /** * Creates a slice of `array` with elements taken from the beginning. Elements * are taken until `predicate` returns falsey. The predicate is invoked with * three arguments: (value, index, array). * * @static * @memberOf _ * @since 3.0.0 * @category Array * @param {Array} array The array to query. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the slice of `array`. * @example * * var users = [ * { 'user': 'barney', 'active': false }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': true } * ]; * * _.takeWhile(users, function(o) { return !o.active; }); * // => objects for ['barney', 'fred'] * * // The `_.matches` iteratee shorthand. * _.takeWhile(users, { 'user': 'barney', 'active': false }); * // => objects for ['barney'] * * // The `_.matchesProperty` iteratee shorthand. * _.takeWhile(users, ['active', false]); * // => objects for ['barney', 'fred'] * * // The `_.property` iteratee shorthand. * _.takeWhile(users, 'active'); * // => [] */ function takeWhile(array, predicate) { return (array && array.length) ? baseWhile(array, getIteratee(predicate, 3)) : []; } /** * Creates an array of unique values, in order, from all given arrays using * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @returns {Array} Returns the new array of combined values. * @example * * _.union([2], [1, 2]); * // => [2, 1] */ var union = baseRest(function(arrays) { return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); }); /** * This method is like `_.union` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by * which uniqueness is computed. Result values are chosen from the first * array in which the value occurs. The iteratee is invoked with one argument: * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of combined values. * @example * * _.unionBy([2.1], [1.2, 2.3], Math.floor); * // => [2.1, 1.2] * * // The `_.property` iteratee shorthand. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ var unionBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); }); /** * This method is like `_.union` except that it accepts `comparator` which * is invoked to compare elements of `arrays`. Result values are chosen from * the first array in which the value occurs. The comparator is invoked * with two arguments: (arrVal, othVal). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of combined values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; * * _.unionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ var unionWith = baseRest(function(arrays) { var comparator = last(arrays); comparator = typeof comparator == 'function' ? comparator : undefined; return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); }); /** * Creates a duplicate-free version of an array, using * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons, in which only the first occurrence of each element * is kept. The order of result values is determined by the order they occur * in the array. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to inspect. * @returns {Array} Returns the new duplicate free array. * @example * * _.uniq([2, 1, 2]); * // => [2, 1] */ function uniq(array) { return (array && array.length) ? baseUniq(array) : []; } /** * This method is like `_.uniq` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which * uniqueness is computed. The order of result values is determined by the * order they occur in the array. The iteratee is invoked with one argument: * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. * @example * * _.uniqBy([2.1, 1.2, 2.3], Math.floor); * // => [2.1, 1.2] * * // The `_.property` iteratee shorthand. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ function uniqBy(array, iteratee) { return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; } /** * This method is like `_.uniq` except that it accepts `comparator` which * is invoked to compare elements of `array`. The order of result values is * determined by the order they occur in the array.The comparator is invoked * with two arguments: (arrVal, othVal). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new duplicate free array. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; * * _.uniqWith(objects, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] */ function uniqWith(array, comparator) { comparator = typeof comparator == 'function' ? comparator : undefined; return (array && array.length) ? baseUniq(array, undefined, comparator) : []; } /** * This method is like `_.zip` except that it accepts an array of grouped * elements and creates an array regrouping the elements to their pre-zip * configuration. * * @static * @memberOf _ * @since 1.2.0 * @category Array * @param {Array} array The array of grouped elements to process. * @returns {Array} Returns the new array of regrouped elements. * @example * * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); * // => [['a', 1, true], ['b', 2, false]] * * _.unzip(zipped); * // => [['a', 'b'], [1, 2], [true, false]] */ function unzip(array) { if (!(array && array.length)) { return []; } var length = 0; array = arrayFilter(array, function(group) { if (isArrayLikeObject(group)) { length = nativeMax(group.length, length); return true; } }); return baseTimes(length, function(index) { return arrayMap(array, baseProperty(index)); }); } /** * This method is like `_.unzip` except that it accepts `iteratee` to specify * how regrouped values should be combined. The iteratee is invoked with the * elements of each group: (...group). * * @static * @memberOf _ * @since 3.8.0 * @category Array * @param {Array} array The array of grouped elements to process. * @param {Function} [iteratee=_.identity] The function to combine * regrouped values. * @returns {Array} Returns the new array of regrouped elements. * @example * * var zipped = _.zip([1, 2], [10, 20], [100, 200]); * // => [[1, 10, 100], [2, 20, 200]] * * _.unzipWith(zipped, _.add); * // => [3, 30, 300] */ function unzipWith(array, iteratee) { if (!(array && array.length)) { return []; } var result = unzip(array); if (iteratee == null) { return result; } return arrayMap(result, function(group) { return apply(iteratee, undefined, group); }); } /** * Creates an array excluding all given values using * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * **Note:** Unlike `_.pull`, this method returns a new array. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to inspect. * @param {...*} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. * @see _.difference, _.xor * @example * * _.without([2, 1, 2, 3], 1, 2); * // => [3] */ var without = baseRest(function(array, values) { return isArrayLikeObject(array) ? baseDifference(array, values) : []; }); /** * Creates an array of unique values that is the * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) * of the given arrays. The order of result values is determined by the order * they occur in the arrays. * * @static * @memberOf _ * @since 2.4.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @returns {Array} Returns the new array of filtered values. * @see _.difference, _.without * @example * * _.xor([2, 1], [2, 3]); * // => [1, 3] */ var xor = baseRest(function(arrays) { return baseXor(arrayFilter(arrays, isArrayLikeObject)); }); /** * This method is like `_.xor` except that it accepts `iteratee` which is * invoked for each element of each `arrays` to generate the criterion by * which by which they're compared. The order of result values is determined * by the order they occur in the arrays. The iteratee is invoked with one * argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new array of filtered values. * @example * * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); * // => [1.2, 3.4] * * // The `_.property` iteratee shorthand. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 2 }] */ var xorBy = baseRest(function(arrays) { var iteratee = last(arrays); if (isArrayLikeObject(iteratee)) { iteratee = undefined; } return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); }); /** * This method is like `_.xor` except that it accepts `comparator` which is * invoked to compare elements of `arrays`. The order of result values is * determined by the order they occur in the arrays. The comparator is invoked * with two arguments: (arrVal, othVal). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of filtered values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; * * _.xorWith(objects, others, _.isEqual); * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ var xorWith = baseRest(function(arrays) { var comparator = last(arrays); comparator = typeof comparator == 'function' ? comparator : undefined; return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); }); /** * Creates an array of grouped elements, the first of which contains the * first elements of the given arrays, the second of which contains the * second elements of the given arrays, and so on. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {...Array} [arrays] The arrays to process. * @returns {Array} Returns the new array of grouped elements. * @example * * _.zip(['a', 'b'], [1, 2], [true, false]); * // => [['a', 1, true], ['b', 2, false]] */ var zip = baseRest(unzip); /** * This method is like `_.fromPairs` except that it accepts two arrays, * one of property identifiers and one of corresponding values. * * @static * @memberOf _ * @since 0.4.0 * @category Array * @param {Array} [props=[]] The property identifiers. * @param {Array} [values=[]] The property values. * @returns {Object} Returns the new object. * @example * * _.zipObject(['a', 'b'], [1, 2]); * // => { 'a': 1, 'b': 2 } */ function zipObject(props, values) { return baseZipObject(props || [], values || [], assignValue); } /** * This method is like `_.zipObject` except that it supports property paths. * * @static * @memberOf _ * @since 4.1.0 * @category Array * @param {Array} [props=[]] The property identifiers. * @param {Array} [values=[]] The property values. * @returns {Object} Returns the new object. * @example * * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } */ function zipObjectDeep(props, values) { return baseZipObject(props || [], values || [], baseSet); } /** * This method is like `_.zip` except that it accepts `iteratee` to specify * how grouped values should be combined. The iteratee is invoked with the * elements of each group: (...group). * * @static * @memberOf _ * @since 3.8.0 * @category Array * @param {...Array} [arrays] The arrays to process. * @param {Function} [iteratee=_.identity] The function to combine * grouped values. * @returns {Array} Returns the new array of grouped elements. * @example * * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { * return a + b + c; * }); * // => [111, 222] */ var zipWith = baseRest(function(arrays) { var length = arrays.length, iteratee = length > 1 ? arrays[length - 1] : undefined; iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; return unzipWith(arrays, iteratee); }); /*------------------------------------------------------------------------*/ /** * Creates a `lodash` wrapper instance that wraps `value` with explicit method * chain sequences enabled. The result of such sequences must be unwrapped * with `_#value`. * * @static * @memberOf _ * @since 1.3.0 * @category Seq * @param {*} value The value to wrap. * @returns {Object} Returns the new `lodash` wrapper instance. * @example * * var users = [ * { 'user': 'barney', 'age': 36 }, * { 'user': 'fred', 'age': 40 }, * { 'user': 'pebbles', 'age': 1 } * ]; * * var youngest = _ * .chain(users) * .sortBy('age') * .map(function(o) { * return o.user + ' is ' + o.age; * }) * .head() * .value(); * // => 'pebbles is 1' */ function chain(value) { var result = lodash(value); result.__chain__ = true; return result; } /** * This method invokes `interceptor` and returns `value`. The interceptor * is invoked with one argument; (value). The purpose of this method is to * "tap into" a method chain sequence in order to modify intermediate results. * * @static * @memberOf _ * @since 0.1.0 * @category Seq * @param {*} value The value to provide to `interceptor`. * @param {Function} interceptor The function to invoke. * @returns {*} Returns `value`. * @example * * _([1, 2, 3]) * .tap(function(array) { * // Mutate input array. * array.pop(); * }) * .reverse() * .value(); * // => [2, 1] */ function tap(value, interceptor) { interceptor(value); return value; } /** * This method is like `_.tap` except that it returns the result of `interceptor`. * The purpose of this method is to "pass thru" values replacing intermediate * results in a method chain sequence. * * @static * @memberOf _ * @since 3.0.0 * @category Seq * @param {*} value The value to provide to `interceptor`. * @param {Function} interceptor The function to invoke. * @returns {*} Returns the result of `interceptor`. * @example * * _(' abc ') * .chain() * .trim() * .thru(function(value) { * return [value]; * }) * .value(); * // => ['abc'] */ function thru(value, interceptor) { return interceptor(value); } /** * This method is the wrapper version of `_.at`. * * @name at * @memberOf _ * @since 1.0.0 * @category Seq * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Object} Returns the new `lodash` wrapper instance. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; * * _(object).at(['a[0].b.c', 'a[1]']).value(); * // => [3, 4] */ var wrapperAt = flatRest(function(paths) { var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) { return baseAt(object, paths); }; if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) { return this.thru(interceptor); } value = value.slice(start, +start + (length ? 1 : 0)); value.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); return new LodashWrapper(value, this.__chain__).thru(function(array) { if (length && !array.length) { array.push(undefined); } return array; }); }); /** * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. * * @name chain * @memberOf _ * @since 0.1.0 * @category Seq * @returns {Object} Returns the new `lodash` wrapper instance. * @example * * var users = [ * { 'user': 'barney', 'age': 36 }, * { 'user': 'fred', 'age': 40 } * ]; * * // A sequence without explicit chaining. * _(users).head(); * // => { 'user': 'barney', 'age': 36 } * * // A sequence with explicit chaining. * _(users) * .chain() * .head() * .pick('user') * .value(); * // => { 'user': 'barney' } */ function wrapperChain() { return chain(this); } /** * Executes the chain sequence and returns the wrapped result. * * @name commit * @memberOf _ * @since 3.2.0 * @category Seq * @returns {Object} Returns the new `lodash` wrapper instance. * @example * * var array = [1, 2]; * var wrapped = _(array).push(3); * * console.log(array); * // => [1, 2] * * wrapped = wrapped.commit(); * console.log(array); * // => [1, 2, 3] * * wrapped.last(); * // => 3 * * console.log(array); * // => [1, 2, 3] */ function wrapperCommit() { return new LodashWrapper(this.value(), this.__chain__); } /** * Gets the next value on a wrapped object following the * [iterator protocol](https://mdn.io/iteration_protocols#iterator). * * @name next * @memberOf _ * @since 4.0.0 * @category Seq * @returns {Object} Returns the next iterator value. * @example * * var wrapped = _([1, 2]); * * wrapped.next(); * // => { 'done': false, 'value': 1 } * * wrapped.next(); * // => { 'done': false, 'value': 2 } * * wrapped.next(); * // => { 'done': true, 'value': undefined } */ function wrapperNext() { if (this.__values__ === undefined) { this.__values__ = toArray(this.value()); } var done = this.__index__ >= this.__values__.length, value = done ? undefined : this.__values__[this.__index__++]; return { 'done': done, 'value': value }; } /** * Enables the wrapper to be iterable. * * @name Symbol.iterator * @memberOf _ * @since 4.0.0 * @category Seq * @returns {Object} Returns the wrapper object. * @example * * var wrapped = _([1, 2]); * * wrapped[Symbol.iterator]() === wrapped; * // => true * * Array.from(wrapped); * // => [1, 2] */ function wrapperToIterator() { return this; } /** * Creates a clone of the chain sequence planting `value` as the wrapped value. * * @name plant * @memberOf _ * @since 3.2.0 * @category Seq * @param {*} value The value to plant. * @returns {Object} Returns the new `lodash` wrapper instance. * @example * * function square(n) { * return n * n; * } * * var wrapped = _([1, 2]).map(square); * var other = wrapped.plant([3, 4]); * * other.value(); * // => [9, 16] * * wrapped.value(); * // => [1, 4] */ function wrapperPlant(value) { var result, parent = this; while (parent instanceof baseLodash) { var clone = wrapperClone(parent); clone.__index__ = 0; clone.__values__ = undefined; if (result) { previous.__wrapped__ = clone; } else { result = clone; } var previous = clone; parent = parent.__wrapped__; } previous.__wrapped__ = value; return result; } /** * This method is the wrapper version of `_.reverse`. * * **Note:** This method mutates the wrapped array. * * @name reverse * @memberOf _ * @since 0.1.0 * @category Seq * @returns {Object} Returns the new `lodash` wrapper instance. * @example * * var array = [1, 2, 3]; * * _(array).reverse().value() * // => [3, 2, 1] * * console.log(array); * // => [3, 2, 1] */ function wrapperReverse() { var value = this.__wrapped__; if (value instanceof LazyWrapper) { var wrapped = value; if (this.__actions__.length) { wrapped = new LazyWrapper(this); } wrapped = wrapped.reverse(); wrapped.__actions__.push({ 'func': thru, 'args': [reverse], 'thisArg': undefined }); return new LodashWrapper(wrapped, this.__chain__); } return this.thru(reverse); } /** * Executes the chain sequence to resolve the unwrapped value. * * @name value * @memberOf _ * @since 0.1.0 * @alias toJSON, valueOf * @category Seq * @returns {*} Returns the resolved unwrapped value. * @example * * _([1, 2, 3]).value(); * // => [1, 2, 3] */ function wrapperValue() { return baseWrapperValue(this.__wrapped__, this.__actions__); } /*------------------------------------------------------------------------*/ /** * Creates an object composed of keys generated from the results of running * each element of `collection` thru `iteratee`. The corresponding value of * each key is the number of times the key was returned by `iteratee`. The * iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 0.5.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * * _.countBy([6.1, 4.2, 6.3], Math.floor); * // => { '4': 1, '6': 2 } * * // The `_.property` iteratee shorthand. * _.countBy(['one', 'two', 'three'], 'length'); * // => { '3': 2, '5': 1 } */ var countBy = createAggregator(function(result, value, key) { if (hasOwnProperty.call(result, key)) { ++result[key]; } else { baseAssignValue(result, key, 1); } }); /** * Checks if `predicate` returns truthy for **all** elements of `collection`. * Iteration is stopped once `predicate` returns falsey. The predicate is * invoked with three arguments: (value, index|key, collection). * * **Note:** This method returns `true` for * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of * elements of empty collections. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. * @example * * _.every([true, 1, null, 'yes'], Boolean); * // => false * * var users = [ * { 'user': 'barney', 'age': 36, 'active': false }, * { 'user': 'fred', 'age': 40, 'active': false } * ]; * * // The `_.matches` iteratee shorthand. * _.every(users, { 'user': 'barney', 'active': false }); * // => false * * // The `_.matchesProperty` iteratee shorthand. * _.every(users, ['active', false]); * // => true * * // The `_.property` iteratee shorthand. * _.every(users, 'active'); * // => false */ function every(collection, predicate, guard) { var func = isArray(collection) ? arrayEvery : baseEvery; if (guard && isIterateeCall(collection, predicate, guard)) { predicate = undefined; } return func(collection, getIteratee(predicate, 3)); } /** * Iterates over elements of `collection`, returning an array of all elements * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * * **Note:** Unlike `_.remove`, this method returns a new array. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false } * ]; * * _.filter(users, function(o) { return !o.active; }); * // => objects for ['fred'] * * // The `_.matches` iteratee shorthand. * _.filter(users, { 'age': 36, 'active': true }); * // => objects for ['barney'] * * // The `_.matchesProperty` iteratee shorthand. * _.filter(users, ['active', false]); * // => objects for ['fred'] * * // The `_.property` iteratee shorthand. * _.filter(users, 'active'); * // => objects for ['barney'] * * // Combining several predicates using `_.overEvery` or `_.overSome`. * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); * // => objects for ['fred', 'barney'] */ function filter(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; return func(collection, getIteratee(predicate, 3)); } /** * Iterates over elements of `collection`, returning the first element * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false }, * { 'user': 'pebbles', 'age': 1, 'active': true } * ]; * * _.find(users, function(o) { return o.age < 40; }); * // => object for 'barney' * * // The `_.matches` iteratee shorthand. * _.find(users, { 'age': 1, 'active': true }); * // => object for 'pebbles' * * // The `_.matchesProperty` iteratee shorthand. * _.find(users, ['active', false]); * // => object for 'fred' * * // The `_.property` iteratee shorthand. * _.find(users, 'active'); * // => object for 'barney' */ var find = createFind(findIndex); /** * This method is like `_.find` except that it iterates over elements of * `collection` from right to left. * * @static * @memberOf _ * @since 2.0.0 * @category Collection * @param {Array|Object} collection The collection to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=collection.length-1] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * * _.findLast([1, 2, 3, 4], function(n) { * return n % 2 == 1; * }); * // => 3 */ var findLast = createFind(findLastIndex); /** * Creates a flattened array of values by running each element in `collection` * thru `iteratee` and flattening the mapped results. The iteratee is invoked * with three arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * * function duplicate(n) { * return [n, n]; * } * * _.flatMap([1, 2], duplicate); * // => [1, 1, 2, 2] */ function flatMap(collection, iteratee) { return baseFlatten(map(collection, iteratee), 1); } /** * This method is like `_.flatMap` except that it recursively flattens the * mapped results. * * @static * @memberOf _ * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new flattened array. * @example * * function duplicate(n) { * return [[[n, n]]]; * } * * _.flatMapDeep([1, 2], duplicate); * // => [1, 1, 2, 2] */ function flatMapDeep(collection, iteratee) { return baseFlatten(map(collection, iteratee), INFINITY); } /** * This method is like `_.flatMap` except that it recursively flattens the * mapped results up to `depth` times. * * @static * @memberOf _ * @since 4.7.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {number} [depth=1] The maximum recursion depth. * @returns {Array} Returns the new flattened array. * @example * * function duplicate(n) { * return [[[n, n]]]; * } * * _.flatMapDepth([1, 2], duplicate, 2); * // => [[1, 1], [2, 2]] */ function flatMapDepth(collection, iteratee, depth) { depth = depth === undefined ? 1 : toInteger(depth); return baseFlatten(map(collection, iteratee), depth); } /** * Iterates over elements of `collection` and invokes `iteratee` for each element. * The iteratee is invoked with three arguments: (value, index|key, collection). * Iteratee functions may exit iteration early by explicitly returning `false`. * * **Note:** As with other "Collections" methods, objects with a "length" * property are iterated like arrays. To avoid this behavior use `_.forIn` * or `_.forOwn` for object iteration. * * @static * @memberOf _ * @since 0.1.0 * @alias each * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. * @see _.forEachRight * @example * * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. * * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { var func = isArray(collection) ? arrayEach : baseEach; return func(collection, getIteratee(iteratee, 3)); } /** * This method is like `_.forEach` except that it iterates over elements of * `collection` from right to left. * * @static * @memberOf _ * @since 2.0.0 * @alias eachRight * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. * @see _.forEach * @example * * _.forEachRight([1, 2], function(value) { * console.log(value); * }); * // => Logs `2` then `1`. */ function forEachRight(collection, iteratee) { var func = isArray(collection) ? arrayEachRight : baseEachRight; return func(collection, getIteratee(iteratee, 3)); } /** * Creates an object composed of keys generated from the results of running * each element of `collection` thru `iteratee`. The order of grouped values * is determined by the order they occur in `collection`. The corresponding * value of each key is an array of elements responsible for generating the * key. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * * _.groupBy([6.1, 4.2, 6.3], Math.floor); * // => { '4': [4.2], '6': [6.1, 6.3] } * * // The `_.property` iteratee shorthand. * _.groupBy(['one', 'two', 'three'], 'length'); * // => { '3': ['one', 'two'], '5': ['three'] } */ var groupBy = createAggregator(function(result, value, key) { if (hasOwnProperty.call(result, key)) { result[key].push(value); } else { baseAssignValue(result, key, [value]); } }); /** * Checks if `value` is in `collection`. If `collection` is a string, it's * checked for a substring of `value`, otherwise * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * is used for equality comparisons. If `fromIndex` is negative, it's used as * the offset from the end of `collection`. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object|string} collection The collection to inspect. * @param {*} value The value to search for. * @param {number} [fromIndex=0] The index to search from. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. * @returns {boolean} Returns `true` if `value` is found, else `false`. * @example * * _.includes([1, 2, 3], 1); * // => true * * _.includes([1, 2, 3], 1, 2); * // => false * * _.includes({ 'a': 1, 'b': 2 }, 1); * // => true * * _.includes('abcd', 'bc'); * // => true */ function includes(collection, value, fromIndex, guard) { collection = isArrayLike(collection) ? collection : values(collection); fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; var length = collection.length; if (fromIndex < 0) { fromIndex = nativeMax(length + fromIndex, 0); } return isString(collection) ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) : (!!length && baseIndexOf(collection, value, fromIndex) > -1); } /** * Invokes the method at `path` of each element in `collection`, returning * an array of the results of each invoked method. Any additional arguments * are provided to each invoked method. If `path` is a function, it's invoked * for, and `this` bound to, each element in `collection`. * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Array|Function|string} path The path of the method to invoke or * the function invoked per iteration. * @param {...*} [args] The arguments to invoke each method with. * @returns {Array} Returns the array of results. * @example * * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); * // => [[1, 5, 7], [1, 2, 3]] * * _.invokeMap([123, 456], String.prototype.split, ''); * // => [['1', '2', '3'], ['4', '5', '6']] */ var invokeMap = baseRest(function(collection, path, args) { var index = -1, isFunc = typeof path == 'function', result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value) { result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); }); return result; }); /** * Creates an object composed of keys generated from the results of running * each element of `collection` thru `iteratee`. The corresponding value of * each key is the last element responsible for generating the key. The * iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The iteratee to transform keys. * @returns {Object} Returns the composed aggregate object. * @example * * var array = [ * { 'dir': 'left', 'code': 97 }, * { 'dir': 'right', 'code': 100 } * ]; * * _.keyBy(array, function(o) { * return String.fromCharCode(o.code); * }); * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } * * _.keyBy(array, 'dir'); * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } */ var keyBy = createAggregator(function(result, value, key) { baseAssignValue(result, key, value); }); /** * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, * `template`, `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * * function square(n) { * return n * n; * } * * _.map([4, 8], square); * // => [16, 64] * * _.map({ 'a': 4, 'b': 8 }, square); * // => [16, 64] (iteration order is not guaranteed) * * var users = [ * { 'user': 'barney' }, * { 'user': 'fred' } * ]; * * // The `_.property` iteratee shorthand. * _.map(users, 'user'); * // => ['barney', 'fred'] */ function map(collection, iteratee) { var func = isArray(collection) ? arrayMap : baseMap; return func(collection, getIteratee(iteratee, 3)); } /** * This method is like `_.sortBy` except that it allows specifying the sort * orders of the iteratees to sort by. If `orders` is unspecified, all values * are sorted in ascending order. Otherwise, specify an order of "desc" for * descending or "asc" for ascending sort order of corresponding values. * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] * The iteratees to sort by. * @param {string[]} [orders] The sort orders of `iteratees`. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. * @returns {Array} Returns the new sorted array. * @example * * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 34 }, * { 'user': 'fred', 'age': 40 }, * { 'user': 'barney', 'age': 36 } * ]; * * // Sort by `user` in ascending order and by `age` in descending order. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ function orderBy(collection, iteratees, orders, guard) { if (collection == null) { return []; } if (!isArray(iteratees)) { iteratees = iteratees == null ? [] : [iteratees]; } orders = guard ? undefined : orders; if (!isArray(orders)) { orders = orders == null ? [] : [orders]; } return baseOrderBy(collection, iteratees, orders); } /** * Creates an array of elements split into two groups, the first of which * contains elements `predicate` returns truthy for, the second of which * contains elements `predicate` returns falsey for. The predicate is * invoked with one argument: (value). * * @static * @memberOf _ * @since 3.0.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the array of grouped elements. * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': false }, * { 'user': 'fred', 'age': 40, 'active': true }, * { 'user': 'pebbles', 'age': 1, 'active': false } * ]; * * _.partition(users, function(o) { return o.active; }); * // => objects for [['fred'], ['barney', 'pebbles']] * * // The `_.matches` iteratee shorthand. * _.partition(users, { 'age': 1, 'active': false }); * // => objects for [['pebbles'], ['barney', 'fred']] * * // The `_.matchesProperty` iteratee shorthand. * _.partition(users, ['active', false]); * // => objects for [['barney', 'pebbles'], ['fred']] * * // The `_.property` iteratee shorthand. * _.partition(users, 'active'); * // => objects for [['fred'], ['barney', 'pebbles']] */ var partition = createAggregator(function(result, value, key) { result[key ? 0 : 1].push(value); }, function() { return [[], []]; }); /** * Reduces `collection` to a value which is the accumulated result of running * each element in `collection` thru `iteratee`, where each successive * invocation is supplied the return value of the previous. If `accumulator` * is not given, the first element of `collection` is used as the initial * value. The iteratee is invoked with four arguments: * (accumulator, value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.reduce`, `_.reduceRight`, and `_.transform`. * * The guarded methods are: * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, * and `sortBy` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. * @see _.reduceRight * @example * * _.reduce([1, 2], function(sum, n) { * return sum + n; * }, 0); * // => 3 * * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { * (result[value] || (result[value] = [])).push(key); * return result; * }, {}); * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) */ function reduce(collection, iteratee, accumulator) { var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); } /** * This method is like `_.reduce` except that it iterates over elements of * `collection` from right to left. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. * @see _.reduce * @example * * var array = [[0, 1], [2, 3], [4, 5]]; * * _.reduceRight(array, function(flattened, other) { * return flattened.concat(other); * }, []); * // => [4, 5, 2, 3, 0, 1] */ function reduceRight(collection, iteratee, accumulator) { var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3; return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); } /** * The opposite of `_.filter`; this method returns the elements of `collection` * that `predicate` does **not** return truthy for. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.filter * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': false }, * { 'user': 'fred', 'age': 40, 'active': true } * ]; * * _.reject(users, function(o) { return !o.active; }); * // => objects for ['fred'] * * // The `_.matches` iteratee shorthand. * _.reject(users, { 'age': 40, 'active': true }); * // => objects for ['barney'] * * // The `_.matchesProperty` iteratee shorthand. * _.reject(users, ['active', false]); * // => objects for ['fred'] * * // The `_.property` iteratee shorthand. * _.reject(users, 'active'); * // => objects for ['barney'] */ function reject(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; return func(collection, negate(getIteratee(predicate, 3))); } /** * Gets a random element from `collection`. * * @static * @memberOf _ * @since 2.0.0 * @category Collection * @param {Array|Object} collection The collection to sample. * @returns {*} Returns the random element. * @example * * _.sample([1, 2, 3, 4]); * // => 2 */ function sample(collection) { var func = isArray(collection) ? arraySample : baseSample; return func(collection); } /** * Gets `n` random elements at unique keys from `collection` up to the * size of `collection`. * * @static * @memberOf _ * @since 4.0.0 * @category Collection * @param {Array|Object} collection The collection to sample. * @param {number} [n=1] The number of elements to sample. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the random elements. * @example * * _.sampleSize([1, 2, 3], 2); * // => [3, 1] * * _.sampleSize([1, 2, 3], 4); * // => [2, 3, 1] */ function sampleSize(collection, n, guard) { if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { n = 1; } else { n = toInteger(n); } var func = isArray(collection) ? arraySampleSize : baseSampleSize; return func(collection, n); } /** * Creates an array of shuffled values, using a version of the * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to shuffle. * @returns {Array} Returns the new shuffled array. * @example * * _.shuffle([1, 2, 3, 4]); * // => [4, 1, 3, 2] */ function shuffle(collection) { var func = isArray(collection) ? arrayShuffle : baseShuffle; return func(collection); } /** * Gets the size of `collection` by returning its length for array-like * values or the number of own enumerable string keyed properties for objects. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns the collection size. * @example * * _.size([1, 2, 3]); * // => 3 * * _.size({ 'a': 1, 'b': 2 }); * // => 2 * * _.size('pebbles'); * // => 7 */ function size(collection) { if (collection == null) { return 0; } if (isArrayLike(collection)) { return isString(collection) ? stringSize(collection) : collection.length; } var tag = getTag(collection); if (tag == mapTag || tag == setTag) { return collection.size; } return baseKeys(collection).length; } /** * Checks if `predicate` returns truthy for **any** element of `collection`. * Iteration is stopped once `predicate` returns truthy. The predicate is * invoked with three arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. * @example * * _.some([null, 0, 'yes', false], Boolean); * // => true * * var users = [ * { 'user': 'barney', 'active': true }, * { 'user': 'fred', 'active': false } * ]; * * // The `_.matches` iteratee shorthand. * _.some(users, { 'user': 'barney', 'active': false }); * // => false * * // The `_.matchesProperty` iteratee shorthand. * _.some(users, ['active', false]); * // => true * * // The `_.property` iteratee shorthand. * _.some(users, 'active'); * // => true */ function some(collection, predicate, guard) { var func = isArray(collection) ? arraySome : baseSome; if (guard && isIterateeCall(collection, predicate, guard)) { predicate = undefined; } return func(collection, getIteratee(predicate, 3)); } /** * 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': 30 }, * { 'user': 'barney', 'age': 34 } * ]; * * _.sortBy(users, [function(o) { return o.user; }]); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] * * _.sortBy(users, ['user', 'age']); * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['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), []); }); /*------------------------------------------------------------------------*/ /** * 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 = ctxNow || function() { return root.Date.now(); }; /*------------------------------------------------------------------------*/ /** * The opposite of `_.before`; this method creates a function that invokes * `func` once it's called `n` or more times. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {number} n The number of calls before `func` is invoked. * @param {Function} func The function to restrict. * @returns {Function} Returns the new restricted function. * @example * * var saves = ['profile', 'settings']; * * var done = _.after(saves.length, function() { * console.log('done saving!'); * }); * * _.forEach(saves, function(type) { * asyncSave({ 'type': type, 'complete': done }); * }); * // => Logs 'done saving!' after the two async saves have completed. */ function after(n, func) { if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } n = toInteger(n); return function() { if (--n < 1) { return func.apply(this, arguments); } }; } /** * Creates a function that invokes `func`, with up to `n` arguments, * ignoring any additional arguments. * * @static * @memberOf _ * @since 3.0.0 * @category Function * @param {Function} func The function to cap arguments for. * @param {number} [n=func.length] The arity cap. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.ary(parseInt, 1)); * // => [6, 8, 10] */ function ary(func, n, guard) { n = guard ? undefined : n; n = (func && n == null) ? func.length : n; return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); } /** * Creates a function that invokes `func`, with the `this` binding and arguments * of the created function, while it's called less than `n` times. Subsequent * calls to the created function return the result of the last `func` invocation. * * @static * @memberOf _ * @since 3.0.0 * @category Function * @param {number} n The number of calls at which `func` is no longer invoked. * @param {Function} func The function to restrict. * @returns {Function} Returns the new restricted function. * @example * * jQuery(element).on('click', _.before(5, addContactToList)); * // => Allows adding up to 4 contacts to the list. */ function before(n, func) { var result; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } n = toInteger(n); return function() { if (--n > 0) { result = func.apply(this, arguments); } if (n <= 1) { func = undefined; } return result; }; } /** * Creates a function that invokes `func` with the `this` binding of `thisArg` * and `partials` prepended to the arguments it receives. * * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to bind. * @param {*} thisArg The `this` binding of `func`. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new bound function. * @example * * function greet(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; * } * * var object = { 'user': 'fred' }; * * var bound = _.bind(greet, object, 'hi'); * bound('!'); * // => 'hi fred!' * * // Bound with placeholders. * var bound = _.bind(greet, object, _, '!'); * bound('hi'); * // => 'hi fred!' */ var bind = baseRest(function(func, thisArg, partials) { var bitmask = WRAP_BIND_FLAG; if (partials.length) { var holders = replaceHolders(partials, getHolder(bind)); bitmask |= WRAP_PARTIAL_FLAG; } return createWrap(func, bitmask, thisArg, partials, holders); }); /** * Creates a function that invokes the method at `object[key]` with `partials` * prepended to the arguments it receives. * * This method differs from `_.bind` by allowing bound functions to reference * methods that may be redefined or don't yet exist. See * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) * for more details. * * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. * * @static * @memberOf _ * @since 0.10.0 * @category Function * @param {Object} object The object to invoke the method on. * @param {string} key The key of the method. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new bound function. * @example * * var object = { * 'user': 'fred', * 'greet': function(greeting, punctuation) { * return greeting + ' ' + this.user + punctuation; * } * }; * * var bound = _.bindKey(object, 'greet', 'hi'); * bound('!'); * // => 'hi fred!' * * object.greet = function(greeting, punctuation) { * return greeting + 'ya ' + this.user + punctuation; * }; * * bound('!'); * // => 'hiya fred!' * * // Bound with placeholders. * var bound = _.bindKey(object, 'greet', _, '!'); * bound('hi'); * // => 'hiya fred!' */ var bindKey = baseRest(function(object, key, partials) { var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; if (partials.length) { var holders = replaceHolders(partials, getHolder(bindKey)); bitmask |= WRAP_PARTIAL_FLAG; } return createWrap(key, bitmask, object, partials, holders); }); /** * Creates a function that accepts arguments of `func` and either invokes * `func` returning its result, if at least `arity` number of arguments have * been provided, or returns a function that accepts the remaining `func` * arguments, and so on. The arity of `func` may be specified if `func.length` * is not sufficient. * * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for provided arguments. * * **Note:** This method doesn't set the "length" property of curried functions. * * @static * @memberOf _ * @since 2.0.0 * @category Function * @param {Function} func The function to curry. * @param {number} [arity=func.length] The arity of `func`. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Function} Returns the new curried function. * @example * * var abc = function(a, b, c) { * return [a, b, c]; * }; * * var curried = _.curry(abc); * * curried(1)(2)(3); * // => [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; } /** * This method is like `_.curry` except that arguments are applied to `func` * in the manner of `_.partialRight` instead of `_.partial`. * * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for provided arguments. * * **Note:** This method doesn't set the "length" property of curried functions. * * @static * @memberOf _ * @since 3.0.0 * @category Function * @param {Function} func The function to curry. * @param {number} [arity=func.length] The arity of `func`. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Function} Returns the new curried function. * @example * * var abc = function(a, b, c) { * return [a, b, c]; * }; * * var curried = _.curryRight(abc); * * curried(3)(2)(1); * // => [1, 2, 3] * * curried(2, 3)(1); * // => [1, 2, 3] * * curried(1, 2, 3); * // => [1, 2, 3] * * // Curried with placeholders. * curried(3)(1, _)(2); * // => [1, 2, 3] */ function curryRight(func, arity, guard) { arity = guard ? undefined : arity; var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curryRight.placeholder; return result; } /** * 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, timeWaiting = wait - timeSinceLastCall; return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; } 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. clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } } if (timerId === undefined) { timerId = setTimeout(timerExpired, wait); } return result; } debounced.cancel = cancel; debounced.flush = flush; return debounced; } /** * Defers invoking the `func` until the current call stack has cleared. Any * additional arguments are provided to `func` when it's invoked. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to defer. * @param {...*} [args] The arguments to invoke `func` with. * @returns {number} Returns the timer id. * @example * * _.defer(function(text) { * console.log(text); * }, 'deferred'); * // => Logs 'deferred' after one millisecond. */ var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); }); /** * Invokes `func` after `wait` milliseconds. Any additional arguments are * provided to `func` when it's invoked. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to delay. * @param {number} wait The number of milliseconds to delay invocation. * @param {...*} [args] The arguments to invoke `func` with. * @returns {number} Returns the timer id. * @example * * _.delay(function(text) { * console.log(text); * }, 1000, 'later'); * // => Logs 'later' after one second. */ var delay = baseRest(function(func, wait, args) { return baseDelay(func, toNumber(wait) || 0, args); }); /** * Creates a function that invokes `func` with arguments reversed. * * @static * @memberOf _ * @since 4.0.0 * @category Function * @param {Function} func The function to flip arguments for. * @returns {Function} Returns the new flipped function. * @example * * var flipped = _.flip(function() { * return _.toArray(arguments); * }); * * flipped('a', 'b', 'c', 'd'); * // => ['d', 'c', 'b', 'a'] */ function flip(func) { return createWrap(func, WRAP_FLIP_FLAG); } /** * 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; /** * Creates a function that negates the result of the predicate `func`. The * `func` predicate is invoked with the `this` binding and arguments of the * created function. * * @static * @memberOf _ * @since 3.0.0 * @category Function * @param {Function} predicate The predicate to negate. * @returns {Function} Returns the new negated function. * @example * * function isEven(n) { * return n % 2 == 0; * } * * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); * // => [1, 3, 5] */ function negate(predicate) { if (typeof predicate != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } return function() { var args = arguments; switch (args.length) { case 0: return !predicate.call(this); case 1: return !predicate.call(this, args[0]); case 2: return !predicate.call(this, args[0], args[1]); case 3: return !predicate.call(this, args[0], args[1], args[2]); } return !predicate.apply(this, args); }; } /** * Creates a function that is restricted to invoking `func` once. Repeat calls * to the function return the value of the first invocation. The `func` is * invoked with the `this` binding and arguments of the created function. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to restrict. * @returns {Function} Returns the new restricted function. * @example * * var initialize = _.once(createApplication); * initialize(); * initialize(); * // => `createApplication` is invoked once */ function once(func) { return before(2, func); } /** * Creates a function that invokes `func` with its arguments transformed. * * @static * @since 4.0.0 * @memberOf _ * @category Function * @param {Function} func The function to wrap. * @param {...(Function|Function[])} [transforms=[_.identity]] * The argument transforms. * @returns {Function} Returns the new function. * @example * * function doubled(n) { * return n * 2; * } * * function square(n) { * return n * n; * } * * var func = _.overArgs(function(x, y) { * return [x, y]; * }, [square, doubled]); * * func(9, 3); * // => [81, 6] * * func(10, 5); * // => [100, 10] */ var overArgs = castRest(function(func, transforms) { transforms = (transforms.length == 1 && isArray(transforms[0])) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); var funcsLength = transforms.length; return baseRest(function(args) { var index = -1, length = nativeMin(args.length, funcsLength); while (++index < length) { args[index] = transforms[index].call(this, args[index]); } return apply(func, this, args); }); }); /** * Creates a function that invokes `func` with `partials` prepended to the * arguments it receives. This method is like `_.bind` except it does **not** * alter the `this` binding. * * The `_.partial.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. * * **Note:** This method doesn't set the "length" property of partially * applied functions. * * @static * @memberOf _ * @since 0.2.0 * @category Function * @param {Function} func The function to partially apply arguments to. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new partially applied function. * @example * * function greet(greeting, name) { * return greeting + ' ' + name; * } * * var sayHelloTo = _.partial(greet, 'hello'); * sayHelloTo('fred'); * // => 'hello fred' * * // Partially applied with placeholders. * var greetFred = _.partial(greet, _, 'fred'); * greetFred('hi'); * // => 'hi fred' */ var partial = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partial)); return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); }); /** * This method is like `_.partial` except that partially applied arguments * are appended to the arguments it receives. * * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic * builds, may be used as a placeholder for partially applied arguments. * * **Note:** This method doesn't set the "length" property of partially * applied functions. * * @static * @memberOf _ * @since 1.0.0 * @category Function * @param {Function} func The function to partially apply arguments to. * @param {...*} [partials] The arguments to be partially applied. * @returns {Function} Returns the new partially applied function. * @example * * function greet(greeting, name) { * return greeting + ' ' + name; * } * * var greetFred = _.partialRight(greet, 'fred'); * greetFred('hi'); * // => 'hi fred' * * // Partially applied with placeholders. * var sayHelloTo = _.partialRight(greet, 'hello', _); * sayHelloTo('fred'); * // => 'hello fred' */ var partialRight = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partialRight)); return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); /** * Creates a function that invokes `func` with arguments arranged according * to the specified `indexes` where the argument value at the first index is * provided as the first argument, the argument value at the second index is * provided as the second argument, and so on. * * @static * @memberOf _ * @since 3.0.0 * @category Function * @param {Function} func The function to rearrange arguments for. * @param {...(number|number[])} indexes The arranged argument indexes. * @returns {Function} Returns the new function. * @example * * var rearged = _.rearg(function(a, b, c) { * return [a, b, c]; * }, [2, 0, 1]); * * rearged('b', 'c', 'a') * // => ['a', 'b', 'c'] */ var rearg = flatRest(function(func, indexes) { return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); }); /** * Creates a function that invokes `func` with the `this` binding of the * created function and arguments from `start` and beyond provided as * an array. * * **Note:** This method is based on the * [rest parameter](https://mdn.io/rest_parameters). * * @static * @memberOf _ * @since 4.0.0 * @category Function * @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. * @example * * var say = _.rest(function(what, names) { * return what + ' ' + _.initial(names).join(', ') + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); * }); * * say('hello', 'fred', 'barney', 'pebbles'); * // => 'hello fred, barney, & pebbles' */ function rest(func, start) { if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } start = start === undefined ? start : toInteger(start); return baseRest(func, start); } /** * Creates a function that invokes `func` with the `this` binding of the * create function and an array of arguments much like * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). * * **Note:** This method is based on the * [spread operator](https://mdn.io/spread_operator). * * @static * @memberOf _ * @since 3.2.0 * @category Function * @param {Function} func The function to spread arguments over. * @param {number} [start=0] The start position of the spread. * @returns {Function} Returns the new function. * @example * * var say = _.spread(function(who, what) { * return who + ' says ' + what; * }); * * say(['fred', 'hello']); * // => 'fred says hello' * * var numbers = Promise.all([ * Promise.resolve(40), * Promise.resolve(36) * ]); * * numbers.then(_.spread(function(x, y) { * return x + y; * })); * // => a Promise of 76 */ function spread(func, start) { if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } start = start == null ? 0 : nativeMax(toInteger(start), 0); return baseRest(function(args) { var array = args[start], otherArgs = castSlice(args, 0, start); if (array) { arrayPush(otherArgs, array); } return apply(func, this, otherArgs); }); } /** * Creates a throttled function that only invokes `func` at most once per * every `wait` milliseconds. The throttled 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 * throttled function. Subsequent calls to the throttled 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 throttled 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 `_.throttle` and `_.debounce`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to throttle. * @param {number} [wait=0] The number of milliseconds to throttle invocations to. * @param {Object} [options={}] The options object. * @param {boolean} [options.leading=true] * Specify invoking on the leading edge of the timeout. * @param {boolean} [options.trailing=true] * Specify invoking on the trailing edge of the timeout. * @returns {Function} Returns the new throttled function. * @example * * // Avoid excessively updating the position while scrolling. * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); * * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); * jQuery(element).on('click', throttled); * * // Cancel the trailing throttled invocation. * jQuery(window).on('popstate', throttled.cancel); */ function throttle(func, wait, options) { var leading = true, trailing = true; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } if (isObject(options)) { leading = 'leading' in options ? !!options.leading : leading; trailing = 'trailing' in options ? !!options.trailing : trailing; } return debounce(func, wait, { 'leading': leading, 'maxWait': wait, 'trailing': trailing }); } /** * Creates a function that accepts up to one argument, ignoring any * additional arguments. * * @static * @memberOf _ * @since 4.0.0 * @category Function * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.unary(parseInt)); * // => [6, 8, 10] */ function unary(func) { return ary(func, 1); } /** * Creates a function that provides `value` to `wrapper` as its first * argument. Any additional arguments provided to the function are appended * to those provided to the `wrapper`. The wrapper is invoked with the `this` * binding of the created function. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {*} value The value to wrap. * @param {Function} [wrapper=identity] The wrapper function. * @returns {Function} Returns the new function. * @example * * var p = _.wrap(_.escape, function(func, text) { * return '<p>' + func(text) + '</p>'; * }); * * p('fred, barney, & pebbles'); * // => '<p>fred, barney, & pebbles</p>' */ function wrap(value, wrapper) { return partial(castFunction(wrapper), value); } /*------------------------------------------------------------------------*/ /** * Casts `value` as an array if it's not one. * * @static * @memberOf _ * @since 4.4.0 * @category Lang * @param {*} value The value to inspect. * @returns {Array} Returns the cast array. * @example * * _.castArray(1); * // => [1] * * _.castArray({ 'a': 1 }); * // => [{ 'a': 1 }] * * _.castArray('abc'); * // => ['abc'] * * _.castArray(null); * // => [null] * * _.castArray(undefined); * // => [undefined] * * _.castArray(); * // => [] * * var array = [1, 2, 3]; * console.log(_.castArray(array) === array); * // => true */ function castArray() { if (!arguments.length) { return []; } var value = arguments[0]; return isArray(value) ? value : [value]; } /** * Creates a shallow clone of `value`. * * **Note:** This method is loosely based on the * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) * and supports cloning arrays, array buffers, booleans, date objects, maps, * numbers, `Object` objects, regexes, sets, strings, symbols, and typed * arrays. The own enumerable properties of `arguments` objects are cloned * as plain objects. An empty object is returned for uncloneable values such * as error objects, functions, DOM nodes, and WeakMaps. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to clone. * @returns {*} Returns the cloned value. * @see _.cloneDeep * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; * * var shallow = _.clone(objects); * console.log(shallow[0] === objects[0]); * // => true */ function clone(value) { return baseClone(value, CLONE_SYMBOLS_FLAG); } /** * This method is like `_.clone` except that it accepts `customizer` which * is invoked to produce the cloned value. If `customizer` returns `undefined`, * cloning is handled by the method instead. The `customizer` is invoked with * up to four arguments; (value [, index|key, object, stack]). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to clone. * @param {Function} [customizer] The function to customize cloning. * @returns {*} Returns the cloned value. * @see _.cloneDeepWith * @example * * function customizer(value) { * if (_.isElement(value)) { * return value.cloneNode(false); * } * } * * var el = _.cloneWith(document.body, customizer); * * console.log(el === document.body); * // => false * console.log(el.nodeName); * // => 'BODY' * console.log(el.childNodes.length); * // => 0 */ function cloneWith(value, customizer) { customizer = typeof customizer == 'function' ? customizer : undefined; return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); } /** * This method is like `_.clone` except that it recursively clones `value`. * * @static * @memberOf _ * @since 1.0.0 * @category Lang * @param {*} value The value to recursively clone. * @returns {*} Returns the deep cloned value. * @see _.clone * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; * * var deep = _.cloneDeep(objects); * console.log(deep[0] === objects[0]); * // => false */ function cloneDeep(value) { return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } /** * This method is like `_.cloneWith` except that it recursively clones `value`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to recursively clone. * @param {Function} [customizer] The function to customize cloning. * @returns {*} Returns the deep cloned value. * @see _.cloneWith * @example * * function customizer(value) { * if (_.isElement(value)) { * return value.cloneNode(true); * } * } * * var el = _.cloneDeepWith(document.body, customizer); * * console.log(el === document.body); * // => false * console.log(el.nodeName); * // => 'BODY' * console.log(el.childNodes.length); * // => 20 */ function cloneDeepWith(value, customizer) { customizer = typeof customizer == 'function' ? customizer : undefined; return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); } /** * Checks if `object` conforms to `source` by invoking the predicate * properties of `source` with the corresponding property values of `object`. * * **Note:** This method is equivalent to `_.conforms` when `source` is * partially applied. * * @static * @memberOf _ * @since 4.14.0 * @category Lang * @param {Object} object The object to inspect. * @param {Object} source The object of property predicates to conform to. * @returns {boolean} Returns `true` if `object` conforms, else `false`. * @example * * var object = { 'a': 1, 'b': 2 }; * * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); * // => true * * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); * // => false */ function conformsTo(object, source) { return source == null || baseConformsTo(object, source, keys(source)); } /** * 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 greater than `other`. * * @static * @memberOf _ * @since 3.9.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is greater than `other`, * else `false`. * @see _.lt * @example * * _.gt(3, 1); * // => true * * _.gt(3, 3); * // => false * * _.gt(1, 3); * // => false */ var gt = createRelationalOperation(baseGt); /** * Checks if `value` is greater than or equal to `other`. * * @static * @memberOf _ * @since 3.9.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is greater than or equal to * `other`, else `false`. * @see _.lte * @example * * _.gte(3, 1); * // => true * * _.gte(3, 3); * // => true * * _.gte(1, 3); * // => false */ var gte = createRelationalOperation(function(value, other) { return value >= 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 classified as an `ArrayBuffer` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. * @example * * _.isArrayBuffer(new ArrayBuffer(2)); * // => true * * _.isArrayBuffer(new Array(2)); * // => false */ var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; /** * 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); } /** * 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); } /** * Checks if `value` is classified as a boolean primitive or object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. * @example * * _.isBoolean(false); * // => true * * _.isBoolean(null); * // => false */ function isBoolean(value) { return value === true || value === false || (isObjectLike(value) && baseGetTag(value) == boolTag); } /** * 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; /** * Checks if `value` is classified as a `Date` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a date object, else `false`. * @example * * _.isDate(new Date); * // => true * * _.isDate('Mon April 23 2012'); * // => false */ var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; /** * Checks if `value` is likely a DOM element. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. * @example * * _.isElement(document.body); * // => true * * _.isElement('<body>'); * // => false */ function isElement(value) { return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); } /** * 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; } /** * 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); } /** * This method is like `_.isEqual` except that it accepts `customizer` which * is invoked to compare values. If `customizer` returns `undefined`, comparisons * are handled by the method instead. The `customizer` is invoked with up to * six arguments: (objValue, othValue [, index|key, object, other, stack]). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * function isGreeting(value) { * return /^h(?:i|ello)$/.test(value); * } * * function customizer(objValue, othValue) { * if (isGreeting(objValue) && isGreeting(othValue)) { * return true; * } * } * * var array = ['hello', 'goodbye']; * var other = ['hi', 'goodbye']; * * _.isEqualWith(array, other, customizer); * // => true */ function isEqualWith(value, other, customizer) { customizer = typeof customizer == 'function' ? customizer : undefined; var result = customizer ? customizer(value, other) : undefined; return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; } /** * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, * `SyntaxError`, `TypeError`, or `URIError` object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an error object, else `false`. * @example * * _.isError(new Error); * // => true * * _.isError(Error); * // => false */ function isError(value) { if (!isObjectLike(value)) { return false; } var tag = baseGetTag(value); return tag == errorTag || tag == domExcTag || (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); } /** * Checks if `value` is a finite primitive number. * * **Note:** This method is based on * [`Number.isFinite`](https://mdn.io/Number/isFinite). * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. * @example * * _.isFinite(3); * // => true * * _.isFinite(Number.MIN_VALUE); * // => true * * _.isFinite(Infinity); * // => false * * _.isFinite('3'); * // => false */ function isFinite(value) { return typeof value == 'number' && nativeIsFinite(value); } /** * 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 an integer. * * **Note:** This method is based on * [`Number.isInteger`](https://mdn.io/Number/isInteger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an integer, else `false`. * @example * * _.isInteger(3); * // => true * * _.isInteger(Number.MIN_VALUE); * // => false * * _.isInteger(Infinity); * // => false * * _.isInteger('3'); * // => false */ function isInteger(value) { return typeof value == 'number' && value == toInteger(value); } /** * 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 `Map` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * * _.isMap(new Map); * // => true * * _.isMap(new WeakMap); * // => false */ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; /** * Performs a partial deep comparison between `object` and `source` to * determine if `object` contains equivalent property values. * * **Note:** This method is equivalent to `_.matches` when `source` is * partially applied. * * Partial comparisons will match empty array and empty object `source` * values against any array or object value, respectively. See `_.isEqual` * for a list of supported value comparisons. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @returns {boolean} Returns `true` if `object` is a match, else `false`. * @example * * var object = { 'a': 1, 'b': 2 }; * * _.isMatch(object, { 'b': 2 }); * // => true * * _.isMatch(object, { 'b': 1 }); * // => false */ function isMatch(object, source) { return object === source || baseIsMatch(object, source, getMatchData(source)); } /** * This method is like `_.isMatch` except that it accepts `customizer` which * is invoked to compare values. If `customizer` returns `undefined`, comparisons * are handled by the method instead. The `customizer` is invoked with five * arguments: (objValue, srcValue, index|key, object, source). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. * @example * * function isGreeting(value) { * return /^h(?:i|ello)$/.test(value); * } * * function customizer(objValue, srcValue) { * if (isGreeting(objValue) && isGreeting(srcValue)) { * return true; * } * } * * var object = { 'greeting': 'hello' }; * var source = { 'greeting': 'hi' }; * * _.isMatchWith(object, source, customizer); * // => true */ function isMatchWith(object, source, customizer) { customizer = typeof customizer == 'function' ? customizer : undefined; return baseIsMatch(object, source, getMatchData(source), customizer); } /** * 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; } /** * Checks if `value` is a pristine native function. * * **Note:** This method can't reliably detect native functions in the presence * of the core-js package because core-js circumvents this kind of detection. * Despite multiple requests, the core-js maintainer has made it clear: any * attempt to fix the detection will be obstructed. As a result, we're left * with little choice but to throw an error. Unfortunately, this also affects * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), * which rely on core-js. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. * @example * * _.isNative(Array.prototype.push); * // => true * * _.isNative(_); * // => false */ function isNative(value) { if (isMaskable(value)) { throw new Error(CORE_ERROR_TEXT); } return baseIsNative(value); } /** * Checks if `value` is `null`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `null`, else `false`. * @example * * _.isNull(null); * // => true * * _.isNull(void 0); * // => false */ function isNull(value) { return value === null; } /** * 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; } /** * 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); } /** * 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; } /** * Checks if `value` is classified as a `RegExp` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. * @example * * _.isRegExp(/abc/); * // => true * * _.isRegExp('/abc/'); * // => false */ var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; /** * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 * double precision number which isn't the result of a rounded unsafe integer. * * **Note:** This method is based on * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. * @example * * _.isSafeInteger(3); * // => true * * _.isSafeInteger(Number.MIN_VALUE); * // => false * * _.isSafeInteger(Infinity); * // => false * * _.isSafeInteger('3'); * // => false */ function isSafeInteger(value) { return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; } /** * Checks if `value` is classified as a `Set` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * * _.isSet(new Set); * // => true * * _.isSet(new WeakSet); * // => false */ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; /** * 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); } /** * 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); } /** * 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; /** * Checks if `value` is `undefined`. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. * @example * * _.isUndefined(void 0); * // => true * * _.isUndefined(null); * // => false */ function isUndefined(value) { return value === undefined; } /** * Checks if `value` is classified as a `WeakMap` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. * @example * * _.isWeakMap(new WeakMap); * // => true * * _.isWeakMap(new Map); * // => false */ function isWeakMap(value) { return isObjectLike(value) && getTag(value) == weakMapTag; } /** * Checks if `value` is classified as a `WeakSet` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. * @example * * _.isWeakSet(new WeakSet); * // => true * * _.isWeakSet(new Set); * // => false */ function isWeakSet(value) { return isObjectLike(value) && baseGetTag(value) == weakSetTag; } /** * Checks if `value` is less than `other`. * * @static * @memberOf _ * @since 3.9.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is less than `other`, * else `false`. * @see _.gt * @example * * _.lt(1, 3); * // => true * * _.lt(3, 3); * // => false * * _.lt(3, 1); * // => false */ var lt = createRelationalOperation(baseLt); /** * Checks if `value` is less than or equal to `other`. * * @static * @memberOf _ * @since 3.9.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is less than or equal to * `other`, else `false`. * @see _.gte * @example * * _.lte(1, 3); * // => true * * _.lte(3, 3); * // => true * * _.lte(3, 1); * // => false */ var lte = createRelationalOperation(function(value, other) { return value <= other; }); /** * Converts `value` to an array. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to convert. * @returns {Array} Returns the converted array. * @example * * _.toArray({ 'a': 1, 'b': 2 }); * // => [1, 2] * * _.toArray('abc'); * // => ['a', 'b', 'c'] * * _.toArray(1); * // => [] * * _.toArray(null); * // => [] */ function toArray(value) { if (!value) { return []; } if (isArrayLike(value)) { return isString(value) ? stringToArray(value) : copyArray(value); } if (symIterator && value[symIterator]) { return iteratorToArray(value[symIterator]()); } var tag = getTag(value), func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); return func(value); } /** * 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; } /** * 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; } /** * Converts `value` to an integer suitable for use as the length of an * array-like object. * * **Note:** This method is 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 convert. * @returns {number} Returns the converted integer. * @example * * _.toLength(3.2); * // => 3 * * _.toLength(Number.MIN_VALUE); * // => 0 * * _.toLength(Infinity); * // => 4294967295 * * _.toLength('3.2'); * // => 3 */ function toLength(value) { return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; } /** * 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); } /** * Converts `value` to a plain object flattening inherited enumerable string * keyed properties of `value` to own properties of the plain object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to convert. * @returns {Object} Returns the converted plain object. * @example * * function Foo() { * this.b = 2; * } * * Foo.prototype.c = 3; * * _.assign({ 'a': 1 }, new Foo); * // => { 'a': 1, 'b': 2 } * * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); * // => { 'a': 1, 'b': 2, 'c': 3 } */ function toPlainObject(value) { return copyObject(value, keysIn(value)); } /** * Converts `value` to a safe integer. A safe integer can be compared and * represented correctly. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted integer. * @example * * _.toSafeInteger(3.2); * // => 3 * * _.toSafeInteger(Number.MIN_VALUE); * // => 0 * * _.toSafeInteger(Infinity); * // => 9007199254740991 * * _.toSafeInteger('3.2'); * // => 3 */ function toSafeInteger(value) { return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : (value === 0 ? value : 0); } /** * 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); } /*------------------------------------------------------------------------*/ /** * Assigns own enumerable string keyed properties of source objects to the * destination object. Source objects are applied from left to right. * Subsequent sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object` and is loosely based on * [`Object.assign`](https://mdn.io/Object/assign). * * @static * @memberOf _ * @since 0.10.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @see _.assignIn * @example * * function Foo() { * this.a = 1; * } * * function Bar() { * this.c = 3; * } * * Foo.prototype.b = 2; * Bar.prototype.d = 4; * * _.assign({ 'a': 0 }, new Foo, new Bar); * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { if (isPrototype(source) || isArrayLike(source)) { copyObject(source, keys(source), object); return; } for (var key in source) { if (hasOwnProperty.call(source, key)) { assignValue(object, key, source[key]); } } }); /** * This method is like `_.assign` except that it iterates over own and * inherited source properties. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 4.0.0 * @alias extend * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @see _.assign * @example * * function Foo() { * this.a = 1; * } * * function Bar() { * this.c = 3; * } * * Foo.prototype.b = 2; * Bar.prototype.d = 4; * * _.assignIn({ 'a': 0 }, new Foo, new Bar); * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } */ var assignIn = createAssigner(function(object, source) { copyObject(source, keysIn(source), object); }); /** * This method is like `_.assignIn` except that it accepts `customizer` * which is invoked to produce the assigned values. If `customizer` returns * `undefined`, assignment is handled by the method instead. The `customizer` * is invoked with five arguments: (objValue, srcValue, key, object, source). * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 4.0.0 * @alias extendWith * @category Object * @param {Object} object The destination object. * @param {...Object} sources The source objects. * @param {Function} [customizer] The function to customize assigned values. * @returns {Object} Returns `object`. * @see _.assignWith * @example * * function customizer(objValue, srcValue) { * return _.isUndefined(objValue) ? srcValue : objValue; * } * * var defaults = _.partialRight(_.assignInWith, customizer); * * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { copyObject(source, keysIn(source), object, customizer); }); /** * This method is like `_.assign` except that it accepts `customizer` * which is invoked to produce the assigned values. If `customizer` returns * `undefined`, assignment is handled by the method instead. The `customizer` * is invoked with five arguments: (objValue, srcValue, key, object, source). * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The destination object. * @param {...Object} sources The source objects. * @param {Function} [customizer] The function to customize assigned values. * @returns {Object} Returns `object`. * @see _.assignInWith * @example * * function customizer(objValue, srcValue) { * return _.isUndefined(objValue) ? srcValue : objValue; * } * * var defaults = _.partialRight(_.assignWith, customizer); * * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ var assignWith = createAssigner(function(object, source, srcIndex, customizer) { copyObject(source, keys(source), object, customizer); }); /** * Creates an array of values corresponding to `paths` of `object`. * * @static * @memberOf _ * @since 1.0.0 * @category Object * @param {Object} object The object to iterate over. * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Array} Returns the picked values. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; * * _.at(object, ['a[0].b.c', 'a[1]']); * // => [3, 4] */ var at = flatRest(baseAt); /** * Creates an object that inherits from the `prototype` object. If a * `properties` object is given, its own enumerable string keyed properties * are assigned to the created object. * * @static * @memberOf _ * @since 2.3.0 * @category Object * @param {Object} prototype The object to inherit from. * @param {Object} [properties] The properties to assign to the object. * @returns {Object} Returns the new object. * @example * * function Shape() { * this.x = 0; * this.y = 0; * } * * function Circle() { * Shape.call(this); * } * * Circle.prototype = _.create(Shape.prototype, { * 'constructor': Circle * }); * * var circle = new Circle; * circle instanceof Circle; * // => true * * circle instanceof Shape; * // => true */ function create(prototype, properties) { var result = baseCreate(prototype); return properties == null ? result : baseAssign(result, properties); } /** * Assigns own and inherited enumerable string keyed properties of source * objects to the destination object for all destination properties that * resolve to `undefined`. Source objects are applied from left to right. * Once a property is set, additional values of the same property are ignored. * * **Note:** This method mutates `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @see _.defaultsDeep * @example * * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ var defaults = baseRest(function(object, sources) { object = Object(object); var index = -1; var length = sources.length; var guard = length > 2 ? sources[2] : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { length = 1; } while (++index < length) { var source = sources[index]; var props = keysIn(source); var propsIndex = -1; var propsLength = props.length; while (++propsIndex < propsLength) { var key = props[propsIndex]; var value = object[key]; if (value === undefined || (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { object[key] = source[key]; } } } return object; }); /** * This method is like `_.defaults` except that it recursively assigns * default properties. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 3.10.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @see _.defaults * @example * * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); * // => { 'a': { 'b': 2, 'c': 3 } } */ var defaultsDeep = baseRest(function(args) { args.push(undefined, customDefaultsMerge); return apply(mergeWith, undefined, args); }); /** * This method is like `_.find` except that it returns the key of the first * element `predicate` returns truthy for instead of the element itself. * * @static * @memberOf _ * @since 1.1.0 * @category Object * @param {Object} object The object to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example * * var users = { * 'barney': { 'age': 36, 'active': true }, * 'fred': { 'age': 40, 'active': false }, * 'pebbles': { 'age': 1, 'active': true } * }; * * _.findKey(users, function(o) { return o.age < 40; }); * // => 'barney' (iteration order is not guaranteed) * * // The `_.matches` iteratee shorthand. * _.findKey(users, { 'age': 1, 'active': true }); * // => 'pebbles' * * // The `_.matchesProperty` iteratee shorthand. * _.findKey(users, ['active', false]); * // => 'fred' * * // The `_.property` iteratee shorthand. * _.findKey(users, 'active'); * // => 'barney' */ function findKey(object, predicate) { return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); } /** * This method is like `_.findKey` except that it iterates over elements of * a collection in the opposite order. * * @static * @memberOf _ * @since 2.0.0 * @category Object * @param {Object} object The object to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {string|undefined} Returns the key of the matched element, * else `undefined`. * @example * * var users = { * 'barney': { 'age': 36, 'active': true }, * 'fred': { 'age': 40, 'active': false }, * 'pebbles': { 'age': 1, 'active': true } * }; * * _.findLastKey(users, function(o) { return o.age < 40; }); * // => returns 'pebbles' assuming `_.findKey` returns 'barney' * * // The `_.matches` iteratee shorthand. * _.findLastKey(users, { 'age': 36, 'active': true }); * // => 'barney' * * // The `_.matchesProperty` iteratee shorthand. * _.findLastKey(users, ['active', false]); * // => 'fred' * * // The `_.property` iteratee shorthand. * _.findLastKey(users, 'active'); * // => 'pebbles' */ function findLastKey(object, predicate) { return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); } /** * Iterates over own and inherited enumerable string keyed properties of an * object and invokes `iteratee` for each property. The iteratee is invoked * with three arguments: (value, key, object). Iteratee functions may exit * iteration early by explicitly returning `false`. * * @static * @memberOf _ * @since 0.3.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. * @see _.forInRight * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.forIn(new Foo, function(value, key) { * console.log(key); * }); * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). */ function forIn(object, iteratee) { return object == null ? object : baseFor(object, getIteratee(iteratee, 3), keysIn); } /** * This method is like `_.forIn` except that it iterates over properties of * `object` in the opposite order. * * @static * @memberOf _ * @since 2.0.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. * @see _.forIn * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.forInRight(new Foo, function(value, key) { * console.log(key); * }); * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. */ function forInRight(object, iteratee) { return object == null ? object : baseForRight(object, getIteratee(iteratee, 3), keysIn); } /** * Iterates over own enumerable string keyed properties of an object and * invokes `iteratee` for each property. The iteratee is invoked with three * arguments: (value, key, object). Iteratee functions may exit iteration * early by explicitly returning `false`. * * @static * @memberOf _ * @since 0.3.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. * @see _.forOwnRight * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.forOwn(new Foo, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forOwn(object, iteratee) { return object && baseForOwn(object, getIteratee(iteratee, 3)); } /** * This method is like `_.forOwn` except that it iterates over properties of * `object` in the opposite order. * * @static * @memberOf _ * @since 2.0.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. * @see _.forOwn * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.forOwnRight(new Foo, function(value, key) { * console.log(key); * }); * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. */ function forOwnRight(object, iteratee) { return object && baseForOwnRight(object, getIteratee(iteratee, 3)); } /** * Creates an array of function property names from own enumerable properties * of `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to inspect. * @returns {Array} Returns the function names. * @see _.functionsIn * @example * * function Foo() { * this.a = _.constant('a'); * this.b = _.constant('b'); * } * * Foo.prototype.c = _.constant('c'); * * _.functions(new Foo); * // => ['a', 'b'] */ function functions(object) { return object == null ? [] : baseFunctions(object, keys(object)); } /** * Creates an array of function property names from own and inherited * enumerable properties of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to inspect. * @returns {Array} Returns the function names. * @see _.functions * @example * * function Foo() { * this.a = _.constant('a'); * this.b = _.constant('b'); * } * * Foo.prototype.c = _.constant('c'); * * _.functionsIn(new Foo); * // => ['a', 'b', 'c'] */ function functionsIn(object) { return object == null ? [] : baseFunctions(object, keysIn(object)); } /** * 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; } /** * Checks if `path` is a direct property of `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = { 'a': { 'b': 2 } }; * var other = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.has(object, 'a'); * // => true * * _.has(object, 'a.b'); * // => true * * _.has(object, ['a', 'b']); * // => true * * _.has(other, 'a'); * // => false */ function has(object, path) { return object != null && hasPath(object, path, baseHas); } /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b'); * // => true * * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); * // => false */ function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } /** * Creates an object composed of the inverted keys and values of `object`. * If `object` contains duplicate values, subsequent values overwrite * property assignments of previous values. * * @static * @memberOf _ * @since 0.7.0 * @category Object * @param {Object} object The object to invert. * @returns {Object} Returns the new inverted object. * @example * * var object = { 'a': 1, 'b': 2, 'c': 1 }; * * _.invert(object); * // => { '1': 'c', '2': 'b' } */ var invert = createInverter(function(result, value, key) { if (value != null && typeof value.toString != 'function') { value = nativeObjectToString.call(value); } result[value] = key; }, constant(identity)); /** * This method is like `_.invert` except that the inverted object is generated * from the results of running each element of `object` thru `iteratee`. The * corresponding inverted value of each inverted key is an array of keys * responsible for generating the inverted value. The iteratee is invoked * with one argument: (value). * * @static * @memberOf _ * @since 4.1.0 * @category Object * @param {Object} object The object to invert. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Object} Returns the new inverted object. * @example * * var object = { 'a': 1, 'b': 2, 'c': 1 }; * * _.invertBy(object); * // => { '1': ['a', 'c'], '2': ['b'] } * * _.invertBy(object, function(value) { * return 'group' + value; * }); * // => { 'group1': ['a', 'c'], 'group2': ['b'] } */ var invertBy = createInverter(function(result, value, key) { if (value != null && typeof value.toString != 'function') { value = nativeObjectToString.call(value); } if (hasOwnProperty.call(result, value)) { result[value].push(key); } else { result[value] = [key]; } }, getIteratee); /** * Invokes the method at `path` of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the method to invoke. * @param {...*} [args] The arguments to invoke the method with. * @returns {*} Returns the result of the invoked method. * @example * * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; * * _.invoke(object, 'a[0].b.c.slice', 1, 3); * // => [2, 3] */ var invoke = baseRest(baseInvoke); /** * 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); } /** * 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); } /** * The opposite of `_.mapValues`; this method creates an object with the * same values as `object` and keys generated by running each own enumerable * string keyed property of `object` thru `iteratee`. The iteratee is invoked * with three arguments: (value, key, object). * * @static * @memberOf _ * @since 3.8.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapValues * @example * * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { * return key + value; * }); * // => { 'a1': 1, 'b2': 2 } */ function mapKeys(object, iteratee) { var result = {}; iteratee = getIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { baseAssignValue(result, iteratee(value, key, object), value); }); return result; } /** * Creates an object with the same keys as `object` and values generated * by running each own enumerable string keyed property of `object` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, key, object). * * @static * @memberOf _ * @since 2.4.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapKeys * @example * * var users = { * 'fred': { 'user': 'fred', 'age': 40 }, * 'pebbles': { 'user': 'pebbles', 'age': 1 } * }; * * _.mapValues(users, function(o) { return o.age; }); * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) * * // The `_.property` iteratee shorthand. * _.mapValues(users, 'age'); * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) */ function mapValues(object, iteratee) { var result = {}; iteratee = getIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { baseAssignValue(result, key, iteratee(value, key, object)); }); return result; } /** * 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); }); /** * This method is like `_.merge` except that it accepts `customizer` which * is invoked to produce the merged values of the destination and source * properties. If `customizer` returns `undefined`, merging is handled by the * method instead. The `customizer` is invoked with six arguments: * (objValue, srcValue, key, object, source, stack). * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The destination object. * @param {...Object} sources The source objects. * @param {Function} customizer The function to customize assigned values. * @returns {Object} Returns `object`. * @example * * function customizer(objValue, srcValue) { * if (_.isArray(objValue)) { * return objValue.concat(srcValue); * } * } * * var object = { 'a': [1], 'b': [2] }; * var other = { 'a': [3], 'b': [4] }; * * _.mergeWith(object, other, customizer); * // => { 'a': [1, 3], 'b': [2, 4] } */ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { baseMerge(object, source, srcIndex, customizer); }); /** * 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; }); /** * The opposite of `_.pickBy`; this method creates an object composed of * the own and inherited enumerable string keyed properties of `object` that * `predicate` doesn't return truthy for. The predicate is invoked with two * arguments: (value, key). * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The source object. * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.omitBy(object, _.isNumber); * // => { 'b': '2' } */ function omitBy(object, predicate) { return pickBy(object, negate(getIteratee(predicate))); } /** * Creates an object composed of the picked `object` properties. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ var pick = flatRest(function(object, paths) { return object == null ? {} : basePick(object, paths); }); /** * Creates an object composed of the `object` properties `predicate` returns * truthy for. The predicate is invoked with two arguments: (value, key). * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The source object. * @param {Function} [predicate=_.identity] The function invoked per property. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.pickBy(object, _.isNumber); * // => { 'a': 1, 'c': 3 } */ function pickBy(object, predicate) { if (object == null) { return {}; } var props = arrayMap(getAllKeysIn(object), function(prop) { return [prop]; }); predicate = getIteratee(predicate); return basePickBy(object, props, function(value, path) { return predicate(value, path[0]); }); } /** * This method is like `_.get` except that if the resolved value is a * function it's invoked with the `this` binding of its parent object and * its result is returned. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to resolve. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; * * _.result(object, 'a[0].b.c1'); * // => 3 * * _.result(object, 'a[0].b.c2'); * // => 4 * * _.result(object, 'a[0].b.c3', 'default'); * // => 'default' * * _.result(object, 'a[0].b.c3', _.constant('default')); * // => 'default' */ function result(object, path, defaultValue) { path = castPath(path, object); var index = -1, length = path.length; // Ensure the loop is entered when path is empty. if (!length) { length = 1; object = undefined; } while (++index < length) { var value = object == null ? undefined : object[toKey(path[index])]; if (value === undefined) { index = length; value = defaultValue; } object = isFunction(value) ? value.call(object) : value; } return object; } /** * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, * it's created. Arrays are created for missing index properties while objects * are created for all other missing properties. Use `_.setWith` to customize * `path` creation. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @returns {Object} Returns `object`. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.set(object, 'a[0].b.c', 4); * console.log(object.a[0].b.c); * // => 4 * * _.set(object, ['x', '0', 'y', 'z'], 5); * console.log(object.x[0].y.z); * // => 5 */ function set(object, path, value) { return object == null ? object : baseSet(object, path, value); } /** * This method is like `_.set` except that it accepts `customizer` which is * invoked to produce the objects of `path`. If `customizer` returns `undefined` * path creation is handled by the method instead. The `customizer` is invoked * with three arguments: (nsValue, key, nsObject). * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @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 assigned values. * @returns {Object} Returns `object`. * @example * * var object = {}; * * _.setWith(object, '[0][1]', 'a', Object); * // => { '0': { '1': 'a' } } */ function setWith(object, path, value, customizer) { customizer = typeof customizer == 'function' ? customizer : undefined; return object == null ? object : baseSet(object, path, value, customizer); } /** * Creates an array of own enumerable string keyed-value pairs for `object` * which can be consumed by `_.fromPairs`. If `object` is a map or set, its * entries are returned. * * @static * @memberOf _ * @since 4.0.0 * @alias entries * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.toPairs(new Foo); * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) */ var toPairs = createToPairs(keys); /** * Creates an array of own and inherited enumerable string keyed-value pairs * for `object` which can be consumed by `_.fromPairs`. If `object` is a map * or set, its entries are returned. * * @static * @memberOf _ * @since 4.0.0 * @alias entriesIn * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.toPairsIn(new Foo); * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) */ var toPairsIn = createToPairs(keysIn); /** * An alternative to `_.reduce`; this method transforms `object` to a new * `accumulator` object which is the result of running each of its own * enumerable string keyed properties thru `iteratee`, with each invocation * potentially mutating the `accumulator` object. If `accumulator` is not * provided, a new object with the same `[[Prototype]]` will be used. The * iteratee is invoked with four arguments: (accumulator, value, key, object). * Iteratee functions may exit iteration early by explicitly returning `false`. * * @static * @memberOf _ * @since 1.3.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The custom accumulator value. * @returns {*} Returns the accumulated value. * @example * * _.transform([2, 3, 4], function(result, n) { * result.push(n *= n); * return n % 2 == 0; * }, []); * // => [4, 9] * * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { * (result[value] || (result[value] = [])).push(key); * }, {}); * // => { '1': ['a', 'c'], '2': ['b'] } */ function transform(object, iteratee, accumulator) { var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object); iteratee = getIteratee(iteratee, 4); if (accumulator == null) { var Ctor = object && object.constructor; if (isArrLike) { accumulator = isArr ? new Ctor : []; } else if (isObject(object)) { accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; } else { accumulator = {}; } } (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { return iteratee(accumulator, value, index, object); }); return accumulator; } /** * Removes the property at `path` of `object`. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to unset. * @returns {boolean} Returns `true` if the property is deleted, else `false`. * @example * * var object = { 'a': [{ 'b': { 'c': 7 } }] }; * _.unset(object, 'a[0].b.c'); * // => true * * console.log(object); * // => { 'a': [{ 'b': {} }] }; * * _.unset(object, ['a', '0', 'b', 'c']); * // => true * * console.log(object); * // => { 'a': [{ 'b': {} }] }; */ function unset(object, path) { return object == null ? true : baseUnset(object, path); } /** * This method is like `_.set` except that accepts `updater` to produce the * value to set. Use `_.updateWith` to customize `path` creation. The `updater` * is invoked with one argument: (value). * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 4.6.0 * @category Object * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {Function} updater The function to produce the updated value. * @returns {Object} Returns `object`. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.update(object, 'a[0].b.c', function(n) { return n * n; }); * console.log(object.a[0].b.c); * // => 9 * * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); * console.log(object.x[0].y.z); * // => 0 */ function update(object, path, updater) { return object == null ? object : baseUpdate(object, path, castFunction(updater)); } /** * This method is like `_.update` except that it accepts `customizer` which is * invoked to produce the objects of `path`. If `customizer` returns `undefined` * path creation is handled by the method instead. The `customizer` is invoked * with three arguments: (nsValue, key, nsObject). * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 4.6.0 * @category Object * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {Function} updater The function to produce the updated value. * @param {Function} [customizer] The function to customize assigned values. * @returns {Object} Returns `object`. * @example * * var object = {}; * * _.updateWith(object, '[0][1]', _.constant('a'), Object); * // => { '0': { '1': 'a' } } */ function updateWith(object, path, updater, customizer) { customizer = typeof customizer == 'function' ? customizer : undefined; return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); } /** * Creates an array of the own enumerable string keyed property values of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property values. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.values(new Foo); * // => [1, 2] (iteration order is not guaranteed) * * _.values('hi'); * // => ['h', 'i'] */ function values(object) { return object == null ? [] : baseValues(object, keys(object)); } /** * Creates an array of the own and inherited enumerable string keyed property * values 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 values. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.valuesIn(new Foo); * // => [1, 2, 3] (iteration order is not guaranteed) */ function valuesIn(object) { return object == null ? [] : baseValues(object, keysIn(object)); } /*------------------------------------------------------------------------*/ /** * Clamps `number` within the inclusive `lower` and `upper` bounds. * * @static * @memberOf _ * @since 4.0.0 * @category Number * @param {number} number The number to clamp. * @param {number} [lower] The lower bound. * @param {number} upper The upper bound. * @returns {number} Returns the clamped number. * @example * * _.clamp(-10, -5, 5); * // => -5 * * _.clamp(10, -5, 5); * // => 5 */ function clamp(number, lower, upper) { if (upper === undefined) { upper = lower; lower = undefined; } if (upper !== undefined) { upper = toNumber(upper); upper = upper === upper ? upper : 0; } if (lower !== undefined) { lower = toNumber(lower); lower = lower === lower ? lower : 0; } return baseClamp(toNumber(number), lower, upper); } /** * Checks if `n` is between `start` and up to, but not including, `end`. If * `end` is not specified, it's set to `start` with `start` then set to `0`. * If `start` is greater than `end` the params are swapped to support * negative ranges. * * @static * @memberOf _ * @since 3.3.0 * @category Number * @param {number} number The number to check. * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @returns {boolean} Returns `true` if `number` is in the range, else `false`. * @see _.range, _.rangeRight * @example * * _.inRange(3, 2, 4); * // => true * * _.inRange(4, 8); * // => true * * _.inRange(4, 2); * // => false * * _.inRange(2, 2); * // => false * * _.inRange(1.2, 2); * // => true * * _.inRange(5.2, 4); * // => false * * _.inRange(-3, -2, -6); * // => true */ function inRange(number, start, end) { start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { end = toFinite(end); } number = toNumber(number); return baseInRange(number, start, end); } /** * Produces a random number between the inclusive `lower` and `upper` bounds. * If only one argument is provided a number between `0` and the given number * is returned. If `floating` is `true`, or either `lower` or `upper` are * floats, a floating-point number is returned instead of an integer. * * **Note:** JavaScript follows the IEEE-754 standard for resolving * floating-point values which can produce unexpected results. * * @static * @memberOf _ * @since 0.7.0 * @category Number * @param {number} [lower=0] The lower bound. * @param {number} [upper=1] The upper bound. * @param {boolean} [floating] Specify returning a floating-point number. * @returns {number} Returns the random number. * @example * * _.random(0, 5); * // => an integer between 0 and 5 * * _.random(5); * // => also an integer between 0 and 5 * * _.random(5, true); * // => a floating-point number between 0 and 5 * * _.random(1.2, 5.2); * // => a floating-point number between 1.2 and 5.2 */ function random(lower, upper, floating) { if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { upper = floating = undefined; } if (floating === undefined) { if (typeof upper == 'boolean') { floating = upper; upper = undefined; } else if (typeof lower == 'boolean') { floating = lower; lower = undefined; } } if (lower === undefined && upper === undefined) { lower = 0; upper = 1; } else { lower = toFinite(lower); if (upper === undefined) { upper = lower; lower = 0; } else { upper = toFinite(upper); } } if (lower > upper) { var temp = lower; lower = upper; upper = temp; } if (floating || lower % 1 || upper % 1) { var rand = nativeRandom(); return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); } return baseRandom(lower, upper); } /*------------------------------------------------------------------------*/ /** * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the camel cased string. * @example * * _.camelCase('Foo Bar'); * // => 'fooBar' * * _.camelCase('--foo-bar--'); * // => 'fooBar' * * _.camelCase('__FOO_BAR__'); * // => 'fooBar' */ var camelCase = createCompounder(function(result, word, index) { word = word.toLowerCase(); return result + (index ? capitalize(word) : word); }); /** * Converts the first character of `string` to upper case and the remaining * to lower case. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to capitalize. * @returns {string} Returns the capitalized string. * @example * * _.capitalize('FRED'); * // => 'Fred' */ function capitalize(string) { return upperFirst(toString(string).toLowerCase()); } /** * Deburrs `string` by converting * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) * letters to basic Latin letters and removing * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to deburr. * @returns {string} Returns the deburred string. * @example * * _.deburr('déjà vu'); * // => 'deja vu' */ function deburr(string) { string = toString(string); return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); } /** * Checks if `string` ends with the given target string. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. * @param {number} [position=string.length] The position to search up to. * @returns {boolean} Returns `true` if `string` ends with `target`, * else `false`. * @example * * _.endsWith('abc', 'c'); * // => true * * _.endsWith('abc', 'b'); * // => false * * _.endsWith('abc', 'b', 2); * // => true */ function endsWith(string, target, position) { string = toString(string); target = baseToString(target); var length = string.length; position = position === undefined ? length : baseClamp(toInteger(position), 0, length); var end = position; position -= target.length; return position >= 0 && string.slice(position, end) == target; } /** * Converts the characters "&", "<", ">", '"', and "'" in `string` to their * corresponding HTML entities. * * **Note:** No other characters are escaped. To escape additional * characters use a third-party library like [_he_](https://mths.be/he). * * Though the ">" character is escaped for symmetry, characters like * ">" and "/" don't need escaping in HTML and have no special meaning * unless they're part of a tag or unquoted attribute value. See * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) * (under "semi-related fun fact") for more details. * * When working with HTML you should always * [quote attribute values](http://wonko.com/post/html-escaping) to reduce * XSS vectors. * * @static * @since 0.1.0 * @memberOf _ * @category String * @param {string} [string=''] The string to escape. * @returns {string} Returns the escaped string. * @example * * _.escape('fred, barney, & pebbles'); * // => 'fred, barney, & pebbles' */ function escape(string) { string = toString(string); return (string && reHasUnescapedHtml.test(string)) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string; } /** * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to escape. * @returns {string} Returns the escaped string. * @example * * _.escapeRegExp('[lodash](https://lodash.com/)'); * // => '\[lodash\]\(https://lodash\.com/\)' */ function escapeRegExp(string) { string = toString(string); return (string && reHasRegExpChar.test(string)) ? string.replace(reRegExpChar, '\\$&') : string; } /** * Converts `string` to * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the kebab cased string. * @example * * _.kebabCase('Foo Bar'); * // => 'foo-bar' * * _.kebabCase('fooBar'); * // => 'foo-bar' * * _.kebabCase('__FOO_BAR__'); * // => 'foo-bar' */ var kebabCase = createCompounder(function(result, word, index) { return result + (index ? '-' : '') + word.toLowerCase(); }); /** * Converts `string`, as space separated words, to lower case. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the lower cased string. * @example * * _.lowerCase('--Foo-Bar--'); * // => 'foo bar' * * _.lowerCase('fooBar'); * // => 'foo bar' * * _.lowerCase('__FOO_BAR__'); * // => 'foo bar' */ var lowerCase = createCompounder(function(result, word, index) { return result + (index ? ' ' : '') + word.toLowerCase(); }); /** * Converts the first character of `string` to lower case. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the converted string. * @example * * _.lowerFirst('Fred'); * // => 'fred' * * _.lowerFirst('FRED'); * // => 'fRED' */ var lowerFirst = createCaseFirst('toLowerCase'); /** * Pads `string` on the left and right sides if it's shorter than `length`. * Padding characters are truncated if they can't be evenly divided by `length`. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to pad. * @param {number} [length=0] The padding length. * @param {string} [chars=' '] The string used as padding. * @returns {string} Returns the padded string. * @example * * _.pad('abc', 8); * // => ' abc ' * * _.pad('abc', 8, '_-'); * // => '_-abc_-_' * * _.pad('abc', 3); * // => 'abc' */ function pad(string, length, chars) { string = toString(string); length = toInteger(length); var strLength = length ? stringSize(string) : 0; if (!length || strLength >= length) { return string; } var mid = (length - strLength) / 2; return ( createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars) ); } /** * Pads `string` on the right side if it's shorter than `length`. Padding * characters are truncated if they exceed `length`. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to pad. * @param {number} [length=0] The padding length. * @param {string} [chars=' '] The string used as padding. * @returns {string} Returns the padded string. * @example * * _.padEnd('abc', 6); * // => 'abc ' * * _.padEnd('abc', 6, '_-'); * // => 'abc_-_' * * _.padEnd('abc', 3); * // => 'abc' */ function padEnd(string, length, chars) { string = toString(string); length = toInteger(length); var strLength = length ? stringSize(string) : 0; return (length && strLength < length) ? (string + createPadding(length - strLength, chars)) : string; } /** * Pads `string` on the left side if it's shorter than `length`. Padding * characters are truncated if they exceed `length`. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to pad. * @param {number} [length=0] The padding length. * @param {string} [chars=' '] The string used as padding. * @returns {string} Returns the padded string. * @example * * _.padStart('abc', 6); * // => ' abc' * * _.padStart('abc', 6, '_-'); * // => '_-_abc' * * _.padStart('abc', 3); * // => 'abc' */ function padStart(string, length, chars) { string = toString(string); length = toInteger(length); var strLength = length ? stringSize(string) : 0; return (length && strLength < length) ? (createPadding(length - strLength, chars) + string) : string; } /** * Converts `string` to an integer of the specified radix. If `radix` is * `undefined` or `0`, a `radix` of `10` is used unless `value` is a * hexadecimal, in which case a `radix` of `16` is used. * * **Note:** This method aligns with the * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. * * @static * @memberOf _ * @since 1.1.0 * @category String * @param {string} string The string to convert. * @param {number} [radix=10] The radix to interpret `value` by. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {number} Returns the converted integer. * @example * * _.parseInt('08'); * // => 8 * * _.map(['6', '08', '10'], _.parseInt); * // => [6, 8, 10] */ function parseInt(string, radix, guard) { if (guard || radix == null) { radix = 0; } else if (radix) { radix = +radix; } return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); } /** * Repeats the given string `n` times. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to repeat. * @param {number} [n=1] The number of times to repeat the string. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {string} Returns the repeated string. * @example * * _.repeat('*', 3); * // => '***' * * _.repeat('abc', 2); * // => 'abcabc' * * _.repeat('abc', 0); * // => '' */ function repeat(string, n, guard) { if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { n = 1; } else { n = toInteger(n); } return baseRepeat(toString(string), n); } /** * Replaces matches for `pattern` in `string` with `replacement`. * * **Note:** This method is based on * [`String#replace`](https://mdn.io/String/replace). * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to modify. * @param {RegExp|string} pattern The pattern to replace. * @param {Function|string} replacement The match replacement. * @returns {string} Returns the modified string. * @example * * _.replace('Hi Fred', 'Fred', 'Barney'); * // => 'Hi Barney' */ function replace() { var args = arguments, string = toString(args[0]); return args.length < 3 ? string : string.replace(args[1], args[2]); } /** * Converts `string` to * [snake case](https://en.wikipedia.org/wiki/Snake_case). * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the snake cased string. * @example * * _.snakeCase('Foo Bar'); * // => 'foo_bar' * * _.snakeCase('fooBar'); * // => 'foo_bar' * * _.snakeCase('--FOO-BAR--'); * // => 'foo_bar' */ var snakeCase = createCompounder(function(result, word, index) { return result + (index ? '_' : '') + word.toLowerCase(); }); /** * Splits `string` by `separator`. * * **Note:** This method is based on * [`String#split`](https://mdn.io/String/split). * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to split. * @param {RegExp|string} separator The separator pattern to split by. * @param {number} [limit] The length to truncate results to. * @returns {Array} Returns the string segments. * @example * * _.split('a-b-c', '-', 2); * // => ['a', 'b'] */ function split(string, separator, limit) { if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { separator = limit = undefined; } limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; if (!limit) { return []; } string = toString(string); if (string && ( typeof separator == 'string' || (separator != null && !isRegExp(separator)) )) { separator = baseToString(separator); if (!separator && hasUnicode(string)) { return castSlice(stringToArray(string), 0, limit); } } return string.split(separator, limit); } /** * Converts `string` to * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). * * @static * @memberOf _ * @since 3.1.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the start cased string. * @example * * _.startCase('--foo-bar--'); * // => 'Foo Bar' * * _.startCase('fooBar'); * // => 'Foo Bar' * * _.startCase('__FOO_BAR__'); * // => 'FOO BAR' */ var startCase = createCompounder(function(result, word, index) { return result + (index ? ' ' : '') + upperFirst(word); }); /** * Checks if `string` starts with the given target string. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to inspect. * @param {string} [target] The string to search for. * @param {number} [position=0] The position to search from. * @returns {boolean} Returns `true` if `string` starts with `target`, * else `false`. * @example * * _.startsWith('abc', 'a'); * // => true * * _.startsWith('abc', 'b'); * // => false * * _.startsWith('abc', 'b', 1); * // => true */ function startsWith(string, target, position) { string = toString(string); position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); target = baseToString(target); return string.slice(position, position + target.length) == target; } /** * Creates a compiled template function that can interpolate data properties * in "interpolate" delimiters, HTML-escape interpolated data properties in * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data * properties may be accessed as free variables in the template. If a setting * object is given, it takes precedence over `_.templateSettings` values. * * **Note:** In the development build `_.template` utilizes * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) * for easier debugging. * * For more information on precompiling templates see * [lodash's custom builds documentation](https://lodash.com/custom-builds). * * For more information on Chrome extension sandboxes see * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). * * @static * @since 0.1.0 * @memberOf _ * @category String * @param {string} [string=''] The template string. * @param {Object} [options={}] The options object. * @param {RegExp} [options.escape=_.templateSettings.escape] * The HTML "escape" delimiter. * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] * The "evaluate" delimiter. * @param {Object} [options.imports=_.templateSettings.imports] * An object to import into the template as free variables. * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] * The "interpolate" delimiter. * @param {string} [options.sourceURL='lodash.templateSources[n]'] * The sourceURL of the compiled template. * @param {string} [options.variable='obj'] * The data object variable name. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Function} Returns the compiled template function. * @example * * // Use the "interpolate" delimiter to create a compiled template. * var compiled = _.template('hello <%= user %>!'); * compiled({ 'user': 'fred' }); * // => 'hello fred!' * * // Use the HTML "escape" delimiter to escape data property values. * var compiled = _.template('<b><%- value %></b>'); * compiled({ 'value': '<script>' }); * // => '<b><script></b>' * * // Use the "evaluate" delimiter to execute JavaScript and generate HTML. * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); * compiled({ 'users': ['fred', 'barney'] }); * // => '<li>fred</li><li>barney</li>' * * // Use the internal `print` function in "evaluate" delimiters. * var compiled = _.template('<% print("hello " + user); %>!'); * compiled({ 'user': 'barney' }); * // => 'hello barney!' * * // Use the ES template literal delimiter as an "interpolate" delimiter. * // Disable support by replacing the "interpolate" delimiter. * var compiled = _.template('hello ${ user }!'); * compiled({ 'user': 'pebbles' }); * // => 'hello pebbles!' * * // Use backslashes to treat delimiters as plain text. * var compiled = _.template('<%= "\\<%- value %\\>" %>'); * compiled({ 'value': 'ignored' }); * // => '<%- value %>' * * // Use the `imports` option to import `jQuery` as `jq`. * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; * var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); * compiled({ 'users': ['fred', 'barney'] }); * // => '<li>fred</li><li>barney</li>' * * // Use the `sourceURL` option to specify a custom sourceURL for the template. * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); * compiled(data); * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector. * * // Use the `variable` option to ensure a with-statement isn't used in the compiled template. * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); * compiled.source; * // => function(data) { * // var __t, __p = ''; * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!'; * // return __p; * // } * * // Use custom template delimiters. * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; * var compiled = _.template('hello {{ user }}!'); * compiled({ 'user': 'mustache' }); * // => 'hello mustache!' * * // Use the `source` property to inline compiled templates for meaningful * // line numbers in error messages and stack traces. * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ * var JST = {\ * "main": ' + _.template(mainText).source + '\ * };\ * '); */ function template(string, options, guard) { // Based on John Resig's `tmpl` implementation // (http://ejohn.org/blog/javascript-micro-templating/) // and Laura Doktorova's doT.js (https://github.com/olado/doT). var settings = lodash.templateSettings; if (guard && isIterateeCall(string, options, guard)) { options = undefined; } string = toString(string); options = assignInWith({}, options, settings, customDefaultsAssignIn); var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys); var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '"; // Compile the regexp to match each delimiter. var reDelimiters = RegExp( (options.escape || reNoMatch).source + '|' + interpolate.source + '|' + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + (options.evaluate || reNoMatch).source + '|$' , 'g'); // Use a sourceURL for easier debugging. // The sourceURL gets injected into the source that's eval-ed, so be careful // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in // and escape the comment, thus injecting code that gets evaled. var sourceURL = '//# sourceURL=' + (hasOwnProperty.call(options, 'sourceURL') ? (options.sourceURL + '').replace(/\s/g, ' ') : ('lodash.templateSources[' + (++templateCounter) + ']') ) + '\n'; string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { interpolateValue || (interpolateValue = esTemplateValue); // Escape characters that can't be included in string literals. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); // Replace delimiters with snippets. if (escapeValue) { isEscaping = true; source += "' +\n__e(" + escapeValue + ") +\n'"; } if (evaluateValue) { isEvaluating = true; source += "';\n" + evaluateValue + ";\n__p += '"; } if (interpolateValue) { source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; } index = offset + match.length; // The JS engine embedded in Adobe products needs `match` returned in // order to produce the correct `offset` value. return match; }); source += "';\n"; // If `variable` is not specified wrap a with-statement around the generated // code to add the data object to the top of the scope chain. var variable = hasOwnProperty.call(options, 'variable') && options.variable; if (!variable) { source = 'with (obj) {\n' + source + '\n}\n'; } // Cleanup code by stripping empty strings. source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) .replace(reEmptyStringMiddle, '$1') .replace(reEmptyStringTrailing, '$1;'); // Frame code as the function body. source = 'function(' + (variable || 'obj') + ') {\n' + (variable ? '' : 'obj || (obj = {});\n' ) + "var __t, __p = ''" + (isEscaping ? ', __e = _.escape' : '' ) + (isEvaluating ? ', __j = Array.prototype.join;\n' + "function print() { __p += __j.call(arguments, '') }\n" : ';\n' ) + source + 'return __p\n}'; var result = attempt(function() { return Function(importsKeys, sourceURL + 'return ' + source) .apply(undefined, importsValues); }); // Provide the compiled function's source by its `toString` method or // the `source` property as a convenience for inlining compiled templates. result.source = source; if (isError(result)) { throw result; } return result; } /** * Converts `string`, as a whole, to lower case just like * [String#toLowerCase](https://mdn.io/toLowerCase). * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the lower cased string. * @example * * _.toLower('--Foo-Bar--'); * // => '--foo-bar--' * * _.toLower('fooBar'); * // => 'foobar' * * _.toLower('__FOO_BAR__'); * // => '__foo_bar__' */ function toLower(value) { return toString(value).toLowerCase(); } /** * Converts `string`, as a whole, to upper case just like * [String#toUpperCase](https://mdn.io/toUpperCase). * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the upper cased string. * @example * * _.toUpper('--foo-bar--'); * // => '--FOO-BAR--' * * _.toUpper('fooBar'); * // => 'FOOBAR' * * _.toUpper('__foo_bar__'); * // => '__FOO_BAR__' */ function toUpper(value) { return toString(value).toUpperCase(); } /** * Removes leading and trailing whitespace or specified characters from `string`. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to trim. * @param {string} [chars=whitespace] The characters to trim. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {string} Returns the trimmed string. * @example * * _.trim(' abc '); * // => 'abc' * * _.trim('-_-abc-_-', '_-'); * // => 'abc' * * _.map([' foo ', ' bar '], _.trim); * // => ['foo', 'bar'] */ function trim(string, chars, guard) { string = toString(string); if (string && (guard || chars === undefined)) { return string.replace(reTrim, ''); } if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1; return castSlice(strSymbols, start, end).join(''); } /** * Removes trailing whitespace or specified characters from `string`. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to trim. * @param {string} [chars=whitespace] The characters to trim. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {string} Returns the trimmed string. * @example * * _.trimEnd(' abc '); * // => ' abc' * * _.trimEnd('-_-abc-_-', '_-'); * // => '-_-abc' */ function trimEnd(string, chars, guard) { string = toString(string); if (string && (guard || chars === undefined)) { return string.replace(reTrimEnd, ''); } if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; return castSlice(strSymbols, 0, end).join(''); } /** * Removes leading whitespace or specified characters from `string`. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to trim. * @param {string} [chars=whitespace] The characters to trim. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {string} Returns the trimmed string. * @example * * _.trimStart(' abc '); * // => 'abc ' * * _.trimStart('-_-abc-_-', '_-'); * // => 'abc-_-' */ function trimStart(string, chars, guard) { string = toString(string); if (string && (guard || chars === undefined)) { return string.replace(reTrimStart, ''); } if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars)); return castSlice(strSymbols, start).join(''); } /** * Truncates `string` if it's longer than the given maximum string length. * The last characters of the truncated string are replaced with the omission * string which defaults to "...". * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to truncate. * @param {Object} [options={}] The options object. * @param {number} [options.length=30] The maximum string length. * @param {string} [options.omission='...'] The string to indicate text is omitted. * @param {RegExp|string} [options.separator] The separator pattern to truncate to. * @returns {string} Returns the truncated string. * @example * * _.truncate('hi-diddly-ho there, neighborino'); * // => 'hi-diddly-ho there, neighbo...' * * _.truncate('hi-diddly-ho there, neighborino', { * 'length': 24, * 'separator': ' ' * }); * // => 'hi-diddly-ho there,...' * * _.truncate('hi-diddly-ho there, neighborino', { * 'length': 24, * 'separator': /,? +/ * }); * // => 'hi-diddly-ho there...' * * _.truncate('hi-diddly-ho there, neighborino', { * 'omission': ' [...]' * }); * // => 'hi-diddly-ho there, neig [...]' */ function truncate(string, options) { var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; if (isObject(options)) { var separator = 'separator' in options ? options.separator : separator; length = 'length' in options ? toInteger(options.length) : length; omission = 'omission' in options ? baseToString(options.omission) : omission; } string = toString(string); var strLength = string.length; if (hasUnicode(string)) { var strSymbols = stringToArray(string); strLength = strSymbols.length; } if (length >= strLength) { return string; } var end = length - stringSize(omission); if (end < 1) { return omission; } var result = strSymbols ? castSlice(strSymbols, 0, end).join('') : string.slice(0, end); if (separator === undefined) { return result + omission; } if (strSymbols) { end += (result.length - end); } if (isRegExp(separator)) { if (string.slice(end).search(separator)) { var match, substring = result; if (!separator.global) { separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g'); } separator.lastIndex = 0; while ((match = separator.exec(substring))) { var newEnd = match.index; } result = result.slice(0, newEnd === undefined ? end : newEnd); } } else if (string.indexOf(baseToString(separator), end) != end) { var index = result.lastIndexOf(separator); if (index > -1) { result = result.slice(0, index); } } return result + omission; } /** * The inverse of `_.escape`; this method converts the HTML entities * `&`, `<`, `>`, `"`, and `'` in `string` to * their corresponding characters. * * **Note:** No other HTML entities are unescaped. To unescape additional * HTML entities use a third-party library like [_he_](https://mths.be/he). * * @static * @memberOf _ * @since 0.6.0 * @category String * @param {string} [string=''] The string to unescape. * @returns {string} Returns the unescaped string. * @example * * _.unescape('fred, barney, & pebbles'); * // => 'fred, barney, & pebbles' */ function unescape(string) { string = toString(string); return (string && reHasEscapedHtml.test(string)) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string; } /** * Converts `string`, as space separated words, to upper case. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the upper cased string. * @example * * _.upperCase('--foo-bar'); * // => 'FOO BAR' * * _.upperCase('fooBar'); * // => 'FOO BAR' * * _.upperCase('__foo_bar__'); * // => 'FOO BAR' */ var upperCase = createCompounder(function(result, word, index) { return result + (index ? ' ' : '') + word.toUpperCase(); }); /** * Converts the first character of `string` to upper case. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the converted string. * @example * * _.upperFirst('fred'); * // => 'Fred' * * _.upperFirst('FRED'); * // => 'FRED' */ var upperFirst = createCaseFirst('toUpperCase'); /** * Splits `string` into an array of its words. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to inspect. * @param {RegExp|string} [pattern] The pattern to match words. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the words of `string`. * @example * * _.words('fred, barney, & pebbles'); * // => ['fred', 'barney', 'pebbles'] * * _.words('fred, barney, & pebbles', /[^, ]+/g); * // => ['fred', 'barney', '&', 'pebbles'] */ function words(string, pattern, guard) { string = toString(string); pattern = guard ? undefined : pattern; if (pattern === undefined) { return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); } return string.match(pattern) || []; } /*------------------------------------------------------------------------*/ /** * Attempts to invoke `func`, returning either the result or the caught error * object. Any additional arguments are provided to `func` when it's invoked. * * @static * @memberOf _ * @since 3.0.0 * @category Util * @param {Function} func The function to attempt. * @param {...*} [args] The arguments to invoke `func` with. * @returns {*} Returns the `func` result or error object. * @example * * // Avoid throwing errors for invalid selectors. * var elements = _.attempt(function(selector) { * return document.querySelectorAll(selector); * }, '>_>'); * * if (_.isError(elements)) { * elements = []; * } */ var attempt = baseRest(function(func, args) { try { return apply(func, undefined, args); } catch (e) { return isError(e) ? e : new Error(e); } }); /** * Binds methods of an object to the object itself, overwriting the existing * method. * * **Note:** This method doesn't set the "length" property of bound functions. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {Object} object The object to bind and assign the bound methods to. * @param {...(string|string[])} methodNames The object method names to bind. * @returns {Object} Returns `object`. * @example * * var view = { * 'label': 'docs', * 'click': function() { * console.log('clicked ' + this.label); * } * }; * * _.bindAll(view, ['click']); * jQuery(element).on('click', view.click); * // => Logs 'clicked docs' when clicked. */ var bindAll = flatRest(function(object, methodNames) { arrayEach(methodNames, function(key) { key = toKey(key); baseAssignValue(object, key, bind(object[key], object)); }); return object; }); /** * Creates a function that iterates over `pairs` and invokes the corresponding * function of the first predicate to return truthy. The predicate-function * pairs are invoked with the `this` binding and arguments of the created * function. * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {Array} pairs The predicate-function pairs. * @returns {Function} Returns the new composite function. * @example * * var func = _.cond([ * [_.matches({ 'a': 1 }), _.constant('matches A')], * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], * [_.stubTrue, _.constant('no match')] * ]); * * func({ 'a': 1, 'b': 2 }); * // => 'matches A' * * func({ 'a': 0, 'b': 1 }); * // => 'matches B' * * func({ 'a': '1', 'b': '2' }); * // => 'no match' */ function cond(pairs) { var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee(); pairs = !length ? [] : arrayMap(pairs, function(pair) { if (typeof pair[1] != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } return [toIteratee(pair[0]), pair[1]]; }); return baseRest(function(args) { var index = -1; while (++index < length) { var pair = pairs[index]; if (apply(pair[0], this, args)) { return apply(pair[1], this, args); } } }); } /** * Creates a function that invokes the predicate properties of `source` with * the corresponding property values of a given object, returning `true` if * all predicates return truthy, else `false`. * * **Note:** The created function is equivalent to `_.conformsTo` with * `source` partially applied. * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {Object} source The object of property predicates to conform to. * @returns {Function} Returns the new spec function. * @example * * var objects = [ * { 'a': 2, 'b': 1 }, * { 'a': 1, 'b': 2 } * ]; * * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); * // => [{ 'a': 1, 'b': 2 }] */ function conforms(source) { return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); } /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } /** * Checks `value` to determine whether a default value should be returned in * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, * or `undefined`. * * @static * @memberOf _ * @since 4.14.0 * @category Util * @param {*} value The value to check. * @param {*} defaultValue The default value. * @returns {*} Returns the resolved value. * @example * * _.defaultTo(1, 10); * // => 1 * * _.defaultTo(undefined, 10); * // => 10 */ function defaultTo(value, defaultValue) { return (value == null || value !== value) ? defaultValue : value; } /** * 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(); /** * This method is like `_.flow` except that it creates a function that * invokes the given functions from right to left. * * @static * @since 3.0.0 * @memberOf _ * @category Util * @param {...(Function|Function[])} [funcs] The functions to invoke. * @returns {Function} Returns the new composite function. * @see _.flow * @example * * function square(n) { * return n * n; * } * * var addSquare = _.flowRight([square, _.add]); * addSquare(1, 2); * // => 9 */ var flowRight = createFlow(true); /** * 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; } /** * Creates a function that invokes `func` with the arguments of the created * function. If `func` is a property name, the created function returns the * property value for a given element. If `func` is an array or object, the * created function returns `true` for elements that contain the equivalent * source properties, otherwise it returns `false`. * * @static * @since 4.0.0 * @memberOf _ * @category Util * @param {*} [func=_.identity] The value to convert to a callback. * @returns {Function} Returns the callback. * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false } * ]; * * // The `_.matches` iteratee shorthand. * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); * // => [{ 'user': 'barney', 'age': 36, 'active': true }] * * // The `_.matchesProperty` iteratee shorthand. * _.filter(users, _.iteratee(['user', 'fred'])); * // => [{ 'user': 'fred', 'age': 40 }] * * // The `_.property` iteratee shorthand. * _.map(users, _.iteratee('user')); * // => ['barney', 'fred'] * * // Create custom iteratee shorthands. * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { * return !_.isRegExp(func) ? iteratee(func) : function(string) { * return func.test(string); * }; * }); * * _.filter(['abc', 'def'], /ef/); * // => ['def'] */ function iteratee(func) { return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); } /** * Creates a function that performs a partial deep comparison between a given * object and `source`, returning `true` if the given object has equivalent * property values, else `false`. * * **Note:** The created function is equivalent to `_.isMatch` with `source` * partially applied. * * Partial comparisons will match empty array and empty object `source` * values against any array or object value, respectively. See `_.isEqual` * for a list of supported value comparisons. * * **Note:** Multiple values can be checked by combining several matchers * using `_.overSome` * * @static * @memberOf _ * @since 3.0.0 * @category Util * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. * @example * * var objects = [ * { 'a': 1, 'b': 2, 'c': 3 }, * { 'a': 4, 'b': 5, 'c': 6 } * ]; * * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); * // => [{ 'a': 4, 'b': 5, 'c': 6 }] * * // Checking for several possible values * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matches(source) { return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); } /** * Creates a function that performs a partial deep comparison between the * value at `path` of a given object to `srcValue`, returning `true` if the * object value is equivalent, else `false`. * * **Note:** Partial comparisons will match empty array and empty object * `srcValue` values against any array or object value, respectively. See * `_.isEqual` for a list of supported value comparisons. * * **Note:** Multiple values can be checked by combining several matchers * using `_.overSome` * * @static * @memberOf _ * @since 3.2.0 * @category Util * @param {Array|string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. * @example * * var objects = [ * { 'a': 1, 'b': 2, 'c': 3 }, * { 'a': 4, 'b': 5, 'c': 6 } * ]; * * _.find(objects, _.matchesProperty('a', 4)); * // => { 'a': 4, 'b': 5, 'c': 6 } * * // Checking for several possible values * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); } /** * Creates a function that invokes the method at `path` of a given object. * Any additional arguments are provided to the invoked method. * * @static * @memberOf _ * @since 3.7.0 * @category Util * @param {Array|string} path The path of the method to invoke. * @param {...*} [args] The arguments to invoke the method with. * @returns {Function} Returns the new invoker function. * @example * * var objects = [ * { 'a': { 'b': _.constant(2) } }, * { 'a': { 'b': _.constant(1) } } * ]; * * _.map(objects, _.method('a.b')); * // => [2, 1] * * _.map(objects, _.method(['a', 'b'])); * // => [2, 1] */ var method = baseRest(function(path, args) { return function(object) { return baseInvoke(object, path, args); }; }); /** * The opposite of `_.method`; this method creates a function that invokes * the method at a given path of `object`. Any additional arguments are * provided to the invoked method. * * @static * @memberOf _ * @since 3.7.0 * @category Util * @param {Object} object The object to query. * @param {...*} [args] The arguments to invoke the method with. * @returns {Function} Returns the new invoker function. * @example * * var array = _.times(3, _.constant), * object = { 'a': array, 'b': array, 'c': array }; * * _.map(['a[2]', 'c[0]'], _.methodOf(object)); * // => [2, 0] * * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); * // => [2, 0] */ var methodOf = baseRest(function(object, args) { return function(path) { return baseInvoke(object, path, args); }; }); /** * Adds all own enumerable string keyed function properties of a source * object to the destination object. If `object` is a function, then methods * are added to its prototype as well. * * **Note:** Use `_.runInContext` to create a pristine `lodash` function to * avoid conflicts caused by modifying the original. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {Function|Object} [object=lodash] The destination object. * @param {Object} source The object of functions to add. * @param {Object} [options={}] The options object. * @param {boolean} [options.chain=true] Specify whether mixins are chainable. * @returns {Function|Object} Returns `object`. * @example * * function vowels(string) { * return _.filter(string, function(v) { * return /[aeiou]/i.test(v); * }); * } * * _.mixin({ 'vowels': vowels }); * _.vowels('fred'); * // => ['e'] * * _('fred').vowels().value(); * // => ['e'] * * _.mixin({ 'vowels': vowels }, { 'chain': false }); * _('fred').vowels(); * // => ['e'] */ function mixin(object, source, options) { var props = keys(source), methodNames = baseFunctions(source, props); if (options == null && !(isObject(source) && (methodNames.length || !props.length))) { options = source; source = object; object = this; methodNames = baseFunctions(source, keys(source)); } var chain = !(isObject(options) && 'chain' in options) || !!options.chain, isFunc = isFunction(object); arrayEach(methodNames, function(methodName) { var func = source[methodName]; object[methodName] = func; if (isFunc) { object.prototype[methodName] = function() { var chainAll = this.__chain__; if (chain || chainAll) { var result = object(this.__wrapped__), actions = result.__actions__ = copyArray(this.__actions__); actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); result.__chain__ = chainAll; return result; } return func.apply(object, arrayPush([this.value()], arguments)); }; } }); return object; } /** * Reverts the `_` variable to its previous value and returns a reference to * the `lodash` function. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @returns {Function} Returns the `lodash` function. * @example * * var lodash = _.noConflict(); */ function noConflict() { if (root._ === this) { root._ = oldDash; } return this; } /** * This method returns `undefined`. * * @static * @memberOf _ * @since 2.3.0 * @category Util * @example * * _.times(2, _.noop); * // => [undefined, undefined] */ function noop() { // No operation performed. } /** * Creates a function that gets the argument at index `n`. If `n` is negative, * the nth argument from the end is returned. * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {number} [n=0] The index of the argument to return. * @returns {Function} Returns the new pass-thru function. * @example * * var func = _.nthArg(1); * func('a', 'b', 'c', 'd'); * // => 'b' * * var func = _.nthArg(-2); * func('a', 'b', 'c', 'd'); * // => 'c' */ function nthArg(n) { n = toInteger(n); return baseRest(function(args) { return baseNth(args, n); }); } /** * Creates a function that invokes `iteratees` with the arguments it receives * and returns their results. * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {...(Function|Function[])} [iteratees=[_.identity]] * The iteratees to invoke. * @returns {Function} Returns the new function. * @example * * var func = _.over([Math.max, Math.min]); * * func(1, 2, 3, 4); * // => [4, 1] */ var over = createOver(arrayMap); /** * Creates a function that checks if **all** of the `predicates` return * truthy when invoked with the arguments it receives. * * Following shorthands are possible for providing predicates. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {...(Function|Function[])} [predicates=[_.identity]] * The predicates to check. * @returns {Function} Returns the new function. * @example * * var func = _.overEvery([Boolean, isFinite]); * * func('1'); * // => true * * func(null); * // => false * * func(NaN); * // => false */ var overEvery = createOver(arrayEvery); /** * Creates a function that checks if **any** of the `predicates` return * truthy when invoked with the arguments it receives. * * Following shorthands are possible for providing predicates. * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {...(Function|Function[])} [predicates=[_.identity]] * The predicates to check. * @returns {Function} Returns the new function. * @example * * var func = _.overSome([Boolean, isFinite]); * * func('1'); * // => true * * func(null); * // => true * * func(NaN); * // => false * * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) */ var overSome = createOver(arraySome); /** * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. * @example * * var objects = [ * { 'a': { 'b': 2 } }, * { 'a': { 'b': 1 } } * ]; * * _.map(objects, _.property('a.b')); * // => [2, 1] * * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } /** * The opposite of `_.property`; this method creates a function that returns * the value at a given path of `object`. * * @static * @memberOf _ * @since 3.0.0 * @category Util * @param {Object} object The object to query. * @returns {Function} Returns the new accessor function. * @example * * var array = [0, 1, 2], * object = { 'a': array, 'b': array, 'c': array }; * * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); * // => [2, 0] * * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); * // => [2, 0] */ function propertyOf(object) { return function(path) { return object == null ? undefined : baseGet(object, path); }; } /** * Creates an array of numbers (positive and/or negative) progressing from * `start` up to, but not including, `end`. A step of `-1` is used if a negative * `start` is specified without an `end` or `step`. If `end` is not specified, * it's set to `start` with `start` then set to `0`. * * **Note:** JavaScript follows the IEEE-754 standard for resolving * floating-point values which can produce unexpected results. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. * @returns {Array} Returns the range of numbers. * @see _.inRange, _.rangeRight * @example * * _.range(4); * // => [0, 1, 2, 3] * * _.range(-4); * // => [0, -1, -2, -3] * * _.range(1, 5); * // => [1, 2, 3, 4] * * _.range(0, 20, 5); * // => [0, 5, 10, 15] * * _.range(0, -4, -1); * // => [0, -1, -2, -3] * * _.range(1, 4, 0); * // => [1, 1, 1] * * _.range(0); * // => [] */ var range = createRange(); /** * This method is like `_.range` except that it populates values in * descending order. * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. * @returns {Array} Returns the range of numbers. * @see _.inRange, _.range * @example * * _.rangeRight(4); * // => [3, 2, 1, 0] * * _.rangeRight(-4); * // => [-3, -2, -1, 0] * * _.rangeRight(1, 5); * // => [4, 3, 2, 1] * * _.rangeRight(0, 20, 5); * // => [15, 10, 5, 0] * * _.rangeRight(0, -4, -1); * // => [-3, -2, -1, 0] * * _.rangeRight(1, 4, 0); * // => [1, 1, 1] * * _.rangeRight(0); * // => [] */ var rangeRight = createRange(true); /** * 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; } /** * This method returns a new empty object. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Object} Returns the new empty object. * @example * * var objects = _.times(2, _.stubObject); * * console.log(objects); * // => [{}, {}] * * console.log(objects[0] === objects[1]); * // => false */ function stubObject() { return {}; } /** * This method returns an empty string. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {string} Returns the empty string. * @example * * _.times(2, _.stubString); * // => ['', ''] */ function stubString() { return ''; } /** * This method returns `true`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `true`. * @example * * _.times(2, _.stubTrue); * // => [true, true] */ function stubTrue() { return true; } /** * Invokes the iteratee `n` times, returning an array of the results of * each invocation. The iteratee is invoked with one argument; (index). * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {number} n The number of times to invoke `iteratee`. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the array of results. * @example * * _.times(3, String); * // => ['0', '1', '2'] * * _.times(4, _.constant(0)); * // => [0, 0, 0, 0] */ function times(n, iteratee) { n = toInteger(n); if (n < 1 || n > MAX_SAFE_INTEGER) { return []; } var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH); iteratee = getIteratee(iteratee); n -= MAX_ARRAY_LENGTH; var result = baseTimes(length, iteratee); while (++index < n) { iteratee(index); } return result; } /** * Converts `value` to a property path array. * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {*} value The value to convert. * @returns {Array} Returns the new property path array. * @example * * _.toPath('a.b.c'); * // => ['a', 'b', 'c'] * * _.toPath('a[0].b.c'); * // => ['a', '0', 'b', 'c'] */ function toPath(value) { if (isArray(value)) { return arrayMap(value, toKey); } return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); } /** * Generates a unique ID. If `prefix` is given, the ID is appended to it. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {string} [prefix=''] The value to prefix the ID with. * @returns {string} Returns the unique ID. * @example * * _.uniqueId('contact_'); * // => 'contact_104' * * _.uniqueId(); * // => '105' */ function uniqueId(prefix) { var id = ++idCounter; return toString(prefix) + id; } /*------------------------------------------------------------------------*/ /** * Adds two numbers. * * @static * @memberOf _ * @since 3.4.0 * @category Math * @param {number} augend The first number in an addition. * @param {number} addend The second number in an addition. * @returns {number} Returns the total. * @example * * _.add(6, 4); * // => 10 */ var add = createMathOperation(function(augend, addend) { return augend + addend; }, 0); /** * Computes `number` rounded up to `precision`. * * @static * @memberOf _ * @since 3.10.0 * @category Math * @param {number} number The number to round up. * @param {number} [precision=0] The precision to round up to. * @returns {number} Returns the rounded up number. * @example * * _.ceil(4.006); * // => 5 * * _.ceil(6.004, 2); * // => 6.01 * * _.ceil(6040, -2); * // => 6100 */ var ceil = createRound('ceil'); /** * Divide two numbers. * * @static * @memberOf _ * @since 4.7.0 * @category Math * @param {number} dividend The first number in a division. * @param {number} divisor The second number in a division. * @returns {number} Returns the quotient. * @example * * _.divide(6, 4); * // => 1.5 */ var divide = createMathOperation(function(dividend, divisor) { return dividend / divisor; }, 1); /** * Computes `number` rounded down to `precision`. * * @static * @memberOf _ * @since 3.10.0 * @category Math * @param {number} number The number to round down. * @param {number} [precision=0] The precision to round down to. * @returns {number} Returns the rounded down number. * @example * * _.floor(4.006); * // => 4 * * _.floor(0.046, 2); * // => 0.04 * * _.floor(4060, -2); * // => 4000 */ var floor = createRound('floor'); /** * Computes the maximum value of `array`. If `array` is empty or falsey, * `undefined` is returned. * * @static * @since 0.1.0 * @memberOf _ * @category Math * @param {Array} array The array to iterate over. * @returns {*} Returns the maximum value. * @example * * _.max([4, 2, 8, 6]); * // => 8 * * _.max([]); * // => undefined */ function max(array) { return (array && array.length) ? baseExtremum(array, identity, baseGt) : undefined; } /** * This method is like `_.max` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which * the value is ranked. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the maximum value. * @example * * var objects = [{ 'n': 1 }, { 'n': 2 }]; * * _.maxBy(objects, function(o) { return o.n; }); * // => { 'n': 2 } * * // The `_.property` iteratee shorthand. * _.maxBy(objects, 'n'); * // => { 'n': 2 } */ function maxBy(array, iteratee) { return (array && array.length) ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) : undefined; } /** * Computes the mean of the values in `array`. * * @static * @memberOf _ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. * @returns {number} Returns the mean. * @example * * _.mean([4, 2, 8, 6]); * // => 5 */ function mean(array) { return baseMean(array, identity); } /** * This method is like `_.mean` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the value to be averaged. * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.7.0 * @category Math * @param {Array} array The array to iterate over. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the mean. * @example * * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; * * _.meanBy(objects, function(o) { return o.n; }); * // => 5 * * // The `_.property` iteratee shorthand. * _.meanBy(objects, 'n'); * // => 5 */ function meanBy(array, iteratee) { return baseMean(array, getIteratee(iteratee, 2)); } /** * Computes the minimum value of `array`. If `array` is empty or falsey, * `undefined` is returned. * * @static * @since 0.1.0 * @memberOf _ * @category Math * @param {Array} array The array to iterate over. * @returns {*} Returns the minimum value. * @example * * _.min([4, 2, 8, 6]); * // => 2 * * _.min([]); * // => undefined */ function min(array) { return (array && array.length) ? baseExtremum(array, identity, baseLt) : undefined; } /** * This method is like `_.min` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which * the value is ranked. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the minimum value. * @example * * var objects = [{ 'n': 1 }, { 'n': 2 }]; * * _.minBy(objects, function(o) { return o.n; }); * // => { 'n': 1 } * * // The `_.property` iteratee shorthand. * _.minBy(objects, 'n'); * // => { 'n': 1 } */ function minBy(array, iteratee) { return (array && array.length) ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) : undefined; } /** * Multiply two numbers. * * @static * @memberOf _ * @since 4.7.0 * @category Math * @param {number} multiplier The first number in a multiplication. * @param {number} multiplicand The second number in a multiplication. * @returns {number} Returns the product. * @example * * _.multiply(6, 4); * // => 24 */ var multiply = createMathOperation(function(multiplier, multiplicand) { return multiplier * multiplicand; }, 1); /** * Computes `number` rounded to `precision`. * * @static * @memberOf _ * @since 3.10.0 * @category Math * @param {number} number The number to round. * @param {number} [precision=0] The precision to round to. * @returns {number} Returns the rounded number. * @example * * _.round(4.006); * // => 4 * * _.round(4.006, 2); * // => 4.01 * * _.round(4060, -2); * // => 4100 */ var round = createRound('round'); /** * Subtract two numbers. * * @static * @memberOf _ * @since 4.0.0 * @category Math * @param {number} minuend The first number in a subtraction. * @param {number} subtrahend The second number in a subtraction. * @returns {number} Returns the difference. * @example * * _.subtract(6, 4); * // => 2 */ var subtract = createMathOperation(function(minuend, subtrahend) { return minuend - subtrahend; }, 0); /** * Computes the sum of the values in `array`. * * @static * @memberOf _ * @since 3.4.0 * @category Math * @param {Array} array The array to iterate over. * @returns {number} Returns the sum. * @example * * _.sum([4, 2, 8, 6]); * // => 20 */ function sum(array) { return (array && array.length) ? baseSum(array, identity) : 0; } /** * This method is like `_.sum` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the value to be summed. * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {number} Returns the sum. * @example * * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; * * _.sumBy(objects, function(o) { return o.n; }); * // => 20 * * // The `_.property` iteratee shorthand. * _.sumBy(objects, 'n'); * // => 20 */ function sumBy(array, iteratee) { return (array && array.length) ? baseSum(array, getIteratee(iteratee, 2)) : 0; } /*------------------------------------------------------------------------*/ // Add methods that return wrapped values in chain sequences. lodash.after = after; lodash.ary = ary; lodash.assign = assign; lodash.assignIn = assignIn; lodash.assignInWith = assignInWith; lodash.assignWith = assignWith; lodash.at = at; lodash.before = before; lodash.bind = bind; lodash.bindAll = bindAll; lodash.bindKey = bindKey; lodash.castArray = castArray; lodash.chain = chain; lodash.chunk = chunk; lodash.compact = compact; lodash.concat = concat; lodash.cond = cond; lodash.conforms = conforms; lodash.constant = constant; lodash.countBy = countBy; lodash.create = create; lodash.curry = curry; lodash.curryRight = curryRight; lodash.debounce = debounce; lodash.defaults = defaults; lodash.defaultsDeep = defaultsDeep; lodash.defer = defer; lodash.delay = delay; lodash.difference = difference; lodash.differenceBy = differenceBy; lodash.differenceWith = differenceWith; lodash.drop = drop; lodash.dropRight = dropRight; lodash.dropRightWhile = dropRightWhile; lodash.dropWhile = dropWhile; lodash.fill = fill; lodash.filter = filter; lodash.flatMap = flatMap; lodash.flatMapDeep = flatMapDeep; lodash.flatMapDepth = flatMapDepth; lodash.flatten = flatten; lodash.flattenDeep = flattenDeep; lodash.flattenDepth = flattenDepth; lodash.flip = flip; lodash.flow = flow; lodash.flowRight = flowRight; lodash.fromPairs = fromPairs; lodash.functions = functions; lodash.functionsIn = functionsIn; lodash.groupBy = groupBy; lodash.initial = initial; lodash.intersection = intersection; lodash.intersectionBy = intersectionBy; lodash.intersectionWith = intersectionWith; lodash.invert = invert; lodash.invertBy = invertBy; lodash.invokeMap = invokeMap; lodash.iteratee = iteratee; lodash.keyBy = keyBy; lodash.keys = keys; lodash.keysIn = keysIn; lodash.map = map; lodash.mapKeys = mapKeys; lodash.mapValues = mapValues; lodash.matches = matches; lodash.matchesProperty = matchesProperty; lodash.memoize = memoize; lodash.merge = merge; lodash.mergeWith = mergeWith; lodash.method = method; lodash.methodOf = methodOf; lodash.mixin = mixin; lodash.negate = negate; lodash.nthArg = nthArg; lodash.omit = omit; lodash.omitBy = omitBy; lodash.once = once; lodash.orderBy = orderBy; lodash.over = over; lodash.overArgs = overArgs; lodash.overEvery = overEvery; lodash.overSome = overSome; lodash.partial = partial; lodash.partialRight = partialRight; lodash.partition = partition; lodash.pick = pick; lodash.pickBy = pickBy; lodash.property = property; lodash.propertyOf = propertyOf; lodash.pull = pull; lodash.pullAll = pullAll; lodash.pullAllBy = pullAllBy; lodash.pullAllWith = pullAllWith; lodash.pullAt = pullAt; lodash.range = range; lodash.rangeRight = rangeRight; lodash.rearg = rearg; lodash.reject = reject; lodash.remove = remove; lodash.rest = rest; lodash.reverse = reverse; lodash.sampleSize = sampleSize; lodash.set = set; lodash.setWith = setWith; lodash.shuffle = shuffle; lodash.slice = slice; lodash.sortBy = sortBy; lodash.sortedUniq = sortedUniq; lodash.sortedUniqBy = sortedUniqBy; lodash.split = split; lodash.spread = spread; lodash.tail = tail; lodash.take = take; lodash.takeRight = takeRight; lodash.takeRightWhile = takeRightWhile; lodash.takeWhile = takeWhile; lodash.tap = tap; lodash.throttle = throttle; lodash.thru = thru; lodash.toArray = toArray; lodash.toPairs = toPairs; lodash.toPairsIn = toPairsIn; lodash.toPath = toPath; lodash.toPlainObject = toPlainObject; lodash.transform = transform; lodash.unary = unary; lodash.union = union; lodash.unionBy = unionBy; lodash.unionWith = unionWith; lodash.uniq = uniq; lodash.uniqBy = uniqBy; lodash.uniqWith = uniqWith; lodash.unset = unset; lodash.unzip = unzip; lodash.unzipWith = unzipWith; lodash.update = update; lodash.updateWith = updateWith; lodash.values = values; lodash.valuesIn = valuesIn; lodash.without = without; lodash.words = words; lodash.wrap = wrap; lodash.xor = xor; lodash.xorBy = xorBy; lodash.xorWith = xorWith; lodash.zip = zip; lodash.zipObject = zipObject; lodash.zipObjectDeep = zipObjectDeep; lodash.zipWith = zipWith; // Add aliases. lodash.entries = toPairs; lodash.entriesIn = toPairsIn; lodash.extend = assignIn; lodash.extendWith = assignInWith; // Add methods to `lodash.prototype`. mixin(lodash, lodash); /*------------------------------------------------------------------------*/ // Add methods that return unwrapped values in chain sequences. lodash.add = add; lodash.attempt = attempt; lodash.camelCase = camelCase; lodash.capitalize = capitalize; lodash.ceil = ceil; lodash.clamp = clamp; lodash.clone = clone; lodash.cloneDeep = cloneDeep; lodash.cloneDeepWith = cloneDeepWith; lodash.cloneWith = cloneWith; lodash.conformsTo = conformsTo; lodash.deburr = deburr; lodash.defaultTo = defaultTo; lodash.divide = divide; lodash.endsWith = endsWith; lodash.eq = eq; lodash.escape = escape; lodash.escapeRegExp = escapeRegExp; lodash.every = every; lodash.find = find; lodash.findIndex = findIndex; lodash.findKey = findKey; lodash.findLast = findLast; lodash.findLastIndex = findLastIndex; lodash.findLastKey = findLastKey; lodash.floor = floor; lodash.forEach = forEach; lodash.forEachRight = forEachRight; lodash.forIn = forIn; lodash.forInRight = forInRight; lodash.forOwn = forOwn; lodash.forOwnRight = forOwnRight; lodash.get = get; lodash.gt = gt; lodash.gte = gte; lodash.has = has; lodash.hasIn = hasIn; lodash.head = head; lodash.identity = identity; lodash.includes = includes; lodash.indexOf = indexOf; lodash.inRange = inRange; lodash.invoke = invoke; lodash.isArguments = isArguments; lodash.isArray = isArray; lodash.isArrayBuffer = isArrayBuffer; lodash.isArrayLike = isArrayLike; lodash.isArrayLikeObject = isArrayLikeObject; lodash.isBoolean = isBoolean; lodash.isBuffer = isBuffer; lodash.isDate = isDate; lodash.isElement = isElement; lodash.isEmpty = isEmpty; lodash.isEqual = isEqual; lodash.isEqualWith = isEqualWith; lodash.isError = isError; lodash.isFinite = isFinite; lodash.isFunction = isFunction; lodash.isInteger = isInteger; lodash.isLength = isLength; lodash.isMap = isMap; lodash.isMatch = isMatch; lodash.isMatchWith = isMatchWith; lodash.isNaN = isNaN; lodash.isNative = isNative; lodash.isNil = isNil; lodash.isNull = isNull; lodash.isNumber = isNumber; lodash.isObject = isObject; lodash.isObjectLike = isObjectLike; lodash.isPlainObject = isPlainObject; lodash.isRegExp = isRegExp; lodash.isSafeInteger = isSafeInteger; lodash.isSet = isSet; lodash.isString = isString; lodash.isSymbol = isSymbol; lodash.isTypedArray = isTypedArray; lodash.isUndefined = isUndefined; lodash.isWeakMap = isWeakMap; lodash.isWeakSet = isWeakSet; lodash.join = join; lodash.kebabCase = kebabCase; lodash.last = last; lodash.lastIndexOf = lastIndexOf; lodash.lowerCase = lowerCase; lodash.lowerFirst = lowerFirst; lodash.lt = lt; lodash.lte = lte; lodash.max = max; lodash.maxBy = maxBy; lodash.mean = mean; lodash.meanBy = meanBy; lodash.min = min; lodash.minBy = minBy; lodash.stubArray = stubArray; lodash.stubFalse = stubFalse; lodash.stubObject = stubObject; lodash.stubString = stubString; lodash.stubTrue = stubTrue; lodash.multiply = multiply; lodash.nth = nth; lodash.noConflict = noConflict; lodash.noop = noop; lodash.now = now; lodash.pad = pad; lodash.padEnd = padEnd; lodash.padStart = padStart; lodash.parseInt = parseInt; lodash.random = random; lodash.reduce = reduce; lodash.reduceRight = reduceRight; lodash.repeat = repeat; lodash.replace = replace; lodash.result = result; lodash.round = round; lodash.runInContext = runInContext; lodash.sample = sample; lodash.size = size; lodash.snakeCase = snakeCase; lodash.some = some; lodash.sortedIndex = sortedIndex; lodash.sortedIndexBy = sortedIndexBy; lodash.sortedIndexOf = sortedIndexOf; lodash.sortedLastIndex = sortedLastIndex; lodash.sortedLastIndexBy = sortedLastIndexBy; lodash.sortedLastIndexOf = sortedLastIndexOf; lodash.startCase = startCase; lodash.startsWith = startsWith; lodash.subtract = subtract; lodash.sum = sum; lodash.sumBy = sumBy; lodash.template = template; lodash.times = times; lodash.toFinite = toFinite; lodash.toInteger = toInteger; lodash.toLength = toLength; lodash.toLower = toLower; lodash.toNumber = toNumber; lodash.toSafeInteger = toSafeInteger; lodash.toString = toString; lodash.toUpper = toUpper; lodash.trim = trim; lodash.trimEnd = trimEnd; lodash.trimStart = trimStart; lodash.truncate = truncate; lodash.unescape = unescape; lodash.uniqueId = uniqueId; lodash.upperCase = upperCase; lodash.upperFirst = upperFirst; // Add aliases. lodash.each = forEach; lodash.eachRight = forEachRight; lodash.first = head; mixin(lodash, (function() { var source = {}; baseForOwn(lodash, function(func, methodName) { if (!hasOwnProperty.call(lodash.prototype, methodName)) { source[methodName] = func; } }); return source; }()), { 'chain': false }); /*------------------------------------------------------------------------*/ /** * The semantic version number. * * @static * @memberOf _ * @type {string} */ lodash.VERSION = VERSION; // Assign default placeholders. arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) { lodash[methodName].placeholder = lodash; }); // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. arrayEach(['drop', 'take'], function(methodName, index) { LazyWrapper.prototype[methodName] = function(n) { n = n === undefined ? 1 : nativeMax(toInteger(n), 0); var result = (this.__filtered__ && !index) ? new LazyWrapper(this) : this.clone(); if (result.__filtered__) { result.__takeCount__ = nativeMin(n, result.__takeCount__); } else { result.__views__.push({ 'size': nativeMin(n, MAX_ARRAY_LENGTH), 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') }); } return result; }; LazyWrapper.prototype[methodName + 'Right'] = function(n) { return this.reverse()[methodName](n).reverse(); }; }); // Add `LazyWrapper` methods that accept an `iteratee` value. arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) { var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; LazyWrapper.prototype[methodName] = function(iteratee) { var result = this.clone(); result.__iteratees__.push({ 'iteratee': getIteratee(iteratee, 3), 'type': type }); result.__filtered__ = result.__filtered__ || isFilter; return result; }; }); // Add `LazyWrapper` methods for `_.head` and `_.last`. arrayEach(['head', 'last'], function(methodName, index) { var takeName = 'take' + (index ? 'Right' : ''); LazyWrapper.prototype[methodName] = function() { return this[takeName](1).value()[0]; }; }); // Add `LazyWrapper` methods for `_.initial` and `_.tail`. arrayEach(['initial', 'tail'], function(methodName, index) { var dropName = 'drop' + (index ? '' : 'Right'); LazyWrapper.prototype[methodName] = function() { return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); }; }); LazyWrapper.prototype.compact = function() { return this.filter(identity); }; LazyWrapper.prototype.find = function(predicate) { return this.filter(predicate).head(); }; LazyWrapper.prototype.findLast = function(predicate) { return this.reverse().find(predicate); }; LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { if (typeof path == 'function') { return new LazyWrapper(this); } return this.map(function(value) { return baseInvoke(value, path, args); }); }); LazyWrapper.prototype.reject = function(predicate) { return this.filter(negate(getIteratee(predicate))); }; LazyWrapper.prototype.slice = function(start, end) { start = toInteger(start); var result = this; if (result.__filtered__ && (start > 0 || end < 0)) { return new LazyWrapper(result); } if (start < 0) { result = result.takeRight(-start); } else if (start) { result = result.drop(start); } if (end !== undefined) { end = toInteger(end); result = end < 0 ? result.dropRight(-end) : result.take(end - start); } return result; }; LazyWrapper.prototype.takeRightWhile = function(predicate) { return this.reverse().takeWhile(predicate).reverse(); }; LazyWrapper.prototype.toArray = function() { return this.take(MAX_ARRAY_LENGTH); }; // Add `LazyWrapper` methods to `lodash.prototype`. baseForOwn(LazyWrapper.prototype, function(func, methodName) { var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName], retUnwrapped = isTaker || /^find/.test(methodName); if (!lodashFunc) { return; } lodash.prototype[methodName] = function() { var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee = args[0], useLazy = isLazy || isArray(value); var interceptor = function(value) { var result = lodashFunc.apply(lodash, arrayPush([value], args)); return (isTaker && chainAll) ? result[0] : result; }; if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) { // Avoid lazy use if the iteratee has a "length" value other than `1`. isLazy = useLazy = false; } var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid; if (!retUnwrapped && useLazy) { value = onlyLazy ? value : new LazyWrapper(this); var result = func.apply(value, args); result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); return new LodashWrapper(result, chainAll); } if (isUnwrapped && onlyLazy) { return func.apply(this, args); } result = this.thru(interceptor); return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result; }; }); // Add `Array` methods to `lodash.prototype`. arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', retUnwrapped = /^(?:pop|shift)$/.test(methodName); lodash.prototype[methodName] = function() { var args = arguments; if (retUnwrapped && !this.__chain__) { var value = this.value(); return func.apply(isArray(value) ? value : [], args); } return this[chainName](function(value) { return func.apply(isArray(value) ? value : [], args); }); }; }); // Map minified method names to their real names. baseForOwn(LazyWrapper.prototype, function(func, methodName) { var lodashFunc = lodash[methodName]; if (lodashFunc) { var key = lodashFunc.name + ''; if (!hasOwnProperty.call(realNames, key)) { realNames[key] = []; } realNames[key].push({ 'name': methodName, 'func': lodashFunc }); } }); realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{ 'name': 'wrapper', 'func': undefined }]; // Add methods to `LazyWrapper`. LazyWrapper.prototype.clone = lazyClone; LazyWrapper.prototype.reverse = lazyReverse; LazyWrapper.prototype.value = lazyValue; // Add chain sequence methods to the `lodash` wrapper. lodash.prototype.at = wrapperAt; lodash.prototype.chain = wrapperChain; lodash.prototype.commit = wrapperCommit; lodash.prototype.next = wrapperNext; lodash.prototype.plant = wrapperPlant; lodash.prototype.reverse = wrapperReverse; lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; // Add lazy aliases. lodash.prototype.first = lodash.prototype.head; if (symIterator) { lodash.prototype[symIterator] = wrapperToIterator; } return lodash; }); /*--------------------------------------------------------------------------*/ // Export lodash. var _ = runInContext(); // Some AMD build optimizers, like r.js, check for condition patterns like: if (true) { // Expose Lodash on the global object to prevent errors when Lodash is // loaded by a script tag in the presence of an AMD loader. // See http://requirejs.org/docs/errors.html#mismatch for more details. // Use `_.noConflict` to remove Lodash from the global object. root._ = _; // Define as an anonymous module so, through path mapping, it can be // referenced as the "underscore" module. !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { return _; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } // Check for `exports` after `define` in case a build optimizer adds it. else if (freeModule) { // Export for Node.js. (freeModule.exports = _)._ = _; // Export for CommonJS support. freeExports._ = _; } else { // Export to the global object. root._ = _; } }.call(this)); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(27), __webpack_require__(64)(module))) /***/ }), /* 4104 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = Widget; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _jsonSchemaFormCore = __webpack_require__(902); var _TooltipTrigger = _interopRequireDefault(__webpack_require__(55)); var _widgets = _interopRequireDefault(__webpack_require__(905)); var _errors = __webpack_require__(397); var _properties = __webpack_require__(96); var _condition = _interopRequireDefault(__webpack_require__(904)); var _WidgetComponent = _interopRequireDefault(__webpack_require__(4105)); 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 getWidget(displayMode, widgetId, customWidgets) { // resolve the widget id depending on the display mode var id = displayMode ? "".concat(widgetId, "_").concat(displayMode) : widgetId; // Get the widget and fallback to default mode widget if not found var widget = customWidgets[id] || _widgets["default"][id]; if (!widget) { widget = customWidgets[widgetId] || _widgets["default"][widgetId]; } return widget; } function isUpdating() { var updatingKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var key = arguments.length > 1 ? arguments[1] : undefined; if (updatingKeys.length === 0 || !key) { return false; } // we need to support current and parent path var serializedKey = key.join('.'); return updatingKeys.some(function (path) { return serializedKey.startsWith(path); }); } function Widget(props) { var _props$schema = props.schema, condition = _props$schema.condition, key = _props$schema.key, options = _props$schema.options, type = _props$schema.type, validationMessage = _props$schema.validationMessage, widget = _props$schema.widget, displayMode = _props$schema.displayMode, tooltip = _props$schema.tooltip, tooltipPlacement = _props$schema.tooltipPlacement; var widgetId = widget || type; if (widgetId === 'hidden' || !(0, _condition["default"])(condition, props.properties, key)) { return null; } var WidgetImpl = getWidget(props.displayMode || displayMode, widgetId, props.widgets); if (!WidgetImpl) { return /*#__PURE__*/_react["default"].createElement("p", { className: "text-danger" }, "Widget not found ", widgetId); } var id = _jsonSchemaFormCore.sfPath.name(key, props.idSeparator || '_', props.id); var error = (0, _errors.getError)(props.errors, props.schema); var errorMessage = validationMessage || error; var all = _objectSpread(_objectSpread({}, props), {}, { id: id, key: id, options: options, errorMessage: errorMessage, isValid: !error, value: (0, _properties.getValue)(props.properties, props.schema), valueIsUpdating: isUpdating(props.updating, props.schema.key) }); if (tooltip) { return /*#__PURE__*/_react["default"].createElement(_TooltipTrigger["default"], { className: _WidgetComponent["default"].tooltip, label: tooltip, tooltipPlacement: tooltipPlacement || 'left' }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(WidgetImpl, all))); } return /*#__PURE__*/_react["default"].createElement(WidgetImpl, all); } if (process.env.NODE_ENV !== 'production') { Widget.propTypes = { displayMode: _propTypes["default"].string, errors: _propTypes["default"].object, id: _propTypes["default"].string, idSeparator: _propTypes["default"].string, properties: _propTypes["default"].object, schema: _propTypes["default"].shape({ condition: _propTypes["default"].arrayOf(_propTypes["default"].shape({ path: _propTypes["default"].string, values: _propTypes["default"].array, strategy: _propTypes["default"].string, shouldBe: _propTypes["default"].bool })), displayMode: _propTypes["default"].string, key: _propTypes["default"].array, options: _propTypes["default"].object, tooltip: _propTypes["default"].string, tooltipPlacement: _propTypes["default"].string, type: _propTypes["default"].string, validationMessage: _propTypes["default"].string, widget: _propTypes["default"].string }).isRequired, updating: _propTypes["default"].arrayOf(_propTypes["default"].shape({ path: _propTypes["default"].string })), widgets: _propTypes["default"].object }; } Widget.defaultProps = { widgets: {} }; Widget.displayName = 'Widget'; //# sourceMappingURL=Widget.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4105 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tooltip":"Widget-component__tooltip___2-D5f"}; /***/ }), /* 4106 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _CollapsibleFieldset = _interopRequireDefault(__webpack_require__(4107)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _CollapsibleFieldset["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4107 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultTitle = defaultTitle; exports["default"] = createCollapsibleFieldset; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _CollapsiblePanel = _interopRequireDefault(__webpack_require__(1167)); var _get = _interopRequireDefault(__webpack_require__(208)); var _Widget = _interopRequireDefault(__webpack_require__(153)); var _generateId = __webpack_require__(61); var _CollapsibleFieldset = _interopRequireDefault(__webpack_require__(4108)); 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; } /** * @return {Arary<string>} itemkey * @param {Array<string>} key within an array */ function getDrillKey(key) { var stopped = false; return key.reduceRight(function (acc, value) { if (stopped) { return acc; } if (typeof value === 'number') { // finished stopped = true; return acc; } acc.splice(0, 0, value); return acc; }, []); } function defaultTitle(formData, schema, options) { var title = (schema.items || []).reduce(function (acc, item) { var value; if (item.key) { var lastKey = getDrillKey(item.key); value = (0, _get["default"])(formData, lastKey.join('.')); } if (item.items) { var sub = defaultTitle(formData, item, options); if (sub) { acc.push(sub); } } if (item.titleMap && item.titleMap.length > 0) { var mappedValue = item.titleMap.find(function (map) { return map.value === value; }); if (mappedValue) { acc.push(mappedValue.name); } } else if (value) { acc.push(value); } return acc; }, []); if (title.length > 0) { var _schema$options; return title.join((options === null || options === void 0 ? void 0 : options.separator) || ((_schema$options = schema.options) === null || _schema$options === void 0 ? void 0 : _schema$options.separator) || ', '); } return schema.title; } /** * createCollapsibleFieldset create a widget with a title function * @param {function} title the function called by the component to compute the title * @return {function} CollapsibleFieldset react component */ function createCollapsibleFieldset() { var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultTitle; function CollapsibleFieldset(props) { function toggle(event) { event.stopPropagation(); event.preventDefault(); var payload = { schema: props.schema, value: _objectSpread(_objectSpread({}, props.value), {}, { isClosed: !props.value.isClosed }) }; props.onChange(event, payload); } var id = props.id, schema = props.schema, value = props.value, actions = props.actions, restProps = _objectWithoutProperties(props, ["id", "schema", "value", "actions"]); var items = schema.items; var displayAction = actions.map(function (action) { return _objectSpread(_objectSpread({}, action), {}, { displayMode: _CollapsiblePanel["default"].displayModes.TYPE_ACTION }); }); return /*#__PURE__*/_react["default"].createElement("fieldset", { className: (0, _classnames["default"])('form-group', _CollapsibleFieldset["default"]['collapsible-panel'], 'collapsible-panel') }, /*#__PURE__*/_react["default"].createElement(_CollapsiblePanel["default"], { id: "".concat(id), header: [{ label: title(value, schema) }, displayAction], onToggle: toggle, expanded: !value.isClosed }, schema.description ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", { key: "description", className: "help-block", id: (0, _generateId.generateDescriptionId)(id) }, schema.description)) : '', items.map(function (itemSchema, index) { return /*#__PURE__*/_react["default"].createElement(_Widget["default"], _extends({}, restProps, { id: id, key: index, schema: itemSchema, value: value })); }))); } CollapsibleFieldset.defaultProps = { value: {}, actions: [] }; CollapsibleFieldset.isCloseable = true; if (process.env.NODE_ENV !== 'production') { CollapsibleFieldset.propTypes = { id: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ items: _propTypes["default"].array.isRequired, description: _propTypes["default"].string }).isRequired, value: _propTypes["default"].object, actions: _propTypes["default"].array }; } return CollapsibleFieldset; } //# sourceMappingURL=CollapsibleFieldset.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4108 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"collapsible-panel":"CollapsibleFieldset__collapsible-panel___2Og4p"}; /***/ }), /* 4109 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Columns = _interopRequireDefault(__webpack_require__(4110)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Columns["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4110 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = Columns; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _Widget = _interopRequireDefault(__webpack_require__(153)); var _Columns = _interopRequireDefault(__webpack_require__(4111)); 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 Columns(props) { var schema = props.schema, restProps = _objectWithoutProperties(props, ["schema"]); return /*#__PURE__*/_react["default"].createElement("div", { className: (0, _classnames["default"])('tf-columns', _Columns["default"]['tf-columns']) }, schema.title && /*#__PURE__*/_react["default"].createElement("legend", null, schema.title), /*#__PURE__*/_react["default"].createElement("div", { className: (0, _classnames["default"])('tf-columns-items', _Columns["default"].items) }, schema.items.map(function (colSchema, index) { return /*#__PURE__*/_react["default"].createElement(_Widget["default"], _extends({}, restProps, { key: index, schema: colSchema })); }))); } if (process.env.NODE_ENV !== 'production') { Columns.propTypes = { schema: _propTypes["default"].shape({ items: _propTypes["default"].array.isRequired, title: _propTypes["default"].string }).isRequired }; } //# sourceMappingURL=Columns.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4111 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tf-columns":"Columns__tf-columns___13rr7","items":"Columns__items___11Ybt"}; /***/ }), /* 4112 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "FieldsetTextMode", { enumerable: true, get: function get() { return _TextMode["default"]; } }); exports["default"] = void 0; var _Fieldset = _interopRequireDefault(__webpack_require__(4113)); var _TextMode = _interopRequireDefault(__webpack_require__(4114)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Fieldset["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4113 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = Fieldset; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _Widget = _interopRequireDefault(__webpack_require__(153)); 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 Fieldset(props) { var schema = props.schema, restProps = _objectWithoutProperties(props, ["schema"]); var title = schema.title, items = schema.items, options = schema.options; return /*#__PURE__*/_react["default"].createElement("fieldset", { className: "form-group" }, title && /*#__PURE__*/_react["default"].createElement("legend", { className: (0, _classnames["default"])({ 'sr-only': options && options.hideTitle }) }, title), items.map(function (itemSchema, index) { return /*#__PURE__*/_react["default"].createElement(_Widget["default"], _extends({}, restProps, { key: index, schema: itemSchema })); })); } if (process.env.NODE_ENV !== 'production') { Fieldset.propTypes = { schema: _propTypes["default"].shape({ title: _propTypes["default"].string, items: _propTypes["default"].array.isRequired, options: _propTypes["default"].shape({ hideTitle: _propTypes["default"].bool }) }).isRequired }; } //# sourceMappingURL=Fieldset.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4114 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = FieldsetTextMode; var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _Widget = _interopRequireDefault(__webpack_require__(153)); 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 FieldsetTextMode(props) { var schema = props.schema, restProps = _objectWithoutProperties(props, ["schema"]); var title = schema.title, items = schema.items; var definitionList = /*#__PURE__*/_react["default"].createElement("dl", null, items.map(function (itemSchema, index) { return /*#__PURE__*/_react["default"].createElement(_Widget["default"], _extends({}, restProps, { key: index, schema: itemSchema })); })); if (title) { return /*#__PURE__*/_react["default"].createElement("div", { className: "form-group" }, /*#__PURE__*/_react["default"].createElement("dt", { className: "tf-title-text-mode" }, title), /*#__PURE__*/_react["default"].createElement("dd", null, definitionList)); } return definitionList; } if (process.env.NODE_ENV !== 'production') { FieldsetTextMode.propTypes = { schema: _propTypes["default"].shape({ title: _propTypes["default"].string, items: _propTypes["default"].array.isRequired }).isRequired }; } //# sourceMappingURL=TextMode.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4115 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Tabs = _interopRequireDefault(__webpack_require__(4116)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Tabs["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4116 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { 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__(7)); var _react = _interopRequireWildcard(__webpack_require__(0)); var _TabBar = _interopRequireDefault(__webpack_require__(299)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _reactI18next = __webpack_require__(10); var _Widget = _interopRequireDefault(__webpack_require__(153)); var _validation = __webpack_require__(551); var _Tabs = _interopRequireDefault(__webpack_require__(4117)); var _constants = __webpack_require__(73); 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 _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 _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 _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 Tabs(props) { var _useState = (0, _react.useState)(0), _useState2 = _slicedToArray(_useState, 2), selectedKey = _useState2[0], setSelectedKey = _useState2[1]; var _useTranslation = (0, _reactI18next.useTranslation)(_constants.I18N_DOMAIN_FORMS), t = _useTranslation.t; var schema = props.schema, restProps = _objectWithoutProperties(props, ["schema"]); var tabs = schema.items.map(function (item, index) { var tabIsValid = (0, _validation.isValid)(item, restProps.errors); return { key: index, label: item.title, className: (0, _classnames["default"])(_defineProperty({}, _Tabs["default"]['has-error'], !tabIsValid)), 'aria-label': tabIsValid ? undefined : "".concat(item.title, " (").concat(t('TF_TABS_HAS_ERRORS', { defaultValue: 'has errors' }), ")"), children: /*#__PURE__*/_react["default"].createElement(_Widget["default"], _extends({}, restProps, { schema: _objectSpread(_objectSpread({ widget: 'fieldset' }, item), {}, { options: _objectSpread(_objectSpread({}, item.options), {}, { hideTitle: true }) }) })) }; }); return /*#__PURE__*/_react["default"].createElement(_TabBar["default"], { className: (0, _classnames["default"])(_Tabs["default"]['tf-tabs'], 'tf-tabs'), id: "".concat(restProps.id, "-tabs"), items: tabs, onSelect: function onSelect(_, item) { return setSelectedKey(item.key); }, selectedKey: selectedKey }); } if (process.env.NODE_ENV !== 'production') { Tabs.propTypes = { errors: _propTypes["default"].object, schema: _propTypes["default"].shape({ items: _propTypes["default"].arrayOf(_propTypes["default"].shape({ title: _propTypes["default"].string.isRequired, items: _propTypes["default"].array.isRequired })).isRequired }).isRequired }; } var _default = Tabs; exports["default"] = _default; //# sourceMappingURL=Tabs.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4117 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tf-tabs":"Tabs__tf-tabs___3d0cX","has-error":"Tabs__has-error___1fasK"}; /***/ }), /* 4118 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "Button", { enumerable: true, get: function get() { return _Button["default"]; } }); Object.defineProperty(exports, "Buttons", { enumerable: true, get: function get() { return _Buttons["default"]; } }); var _Button = _interopRequireDefault(__webpack_require__(4119)); var _Buttons = _interopRequireDefault(__webpack_require__(1626)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } //# sourceMappingURL=index.js.map /***/ }), /* 4119 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = Button; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _SingleButton = _interopRequireDefault(__webpack_require__(1625)); var _generateId = __webpack_require__(61); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function Button(props) { var id = props.id, errorMessage = props.errorMessage, isValid = props.isValid, onTrigger = props.onTrigger, schema = props.schema; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { descriptionId: descriptionId, description: schema.description, errorId: errorId, errorMessage: errorMessage, isValid: isValid, required: schema.required }, /*#__PURE__*/_react["default"].createElement(_SingleButton["default"], { id: id, onTrigger: onTrigger, schema: schema })); } if (process.env.NODE_ENV !== 'production') { Button.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onTrigger: _propTypes["default"].func, schema: _SingleButton["default"].propTypes.schema }; } Button.defaultProps = { schema: {} }; //# sourceMappingURL=Button.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4120 */ /***/ (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 _reactI18next = __webpack_require__(10); var _reactBootstrap = __webpack_require__(1573); var _OverlayTrigger = _interopRequireDefault(__webpack_require__(700)); var _Icon = _interopRequireDefault(__webpack_require__(19)); var _Message = _interopRequireDefault(__webpack_require__(887)); var _constants = __webpack_require__(73); var _FieldTemplate = _interopRequireDefault(__webpack_require__(1622)); 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 Label(props) { return /*#__PURE__*/_react["default"].createElement("label", { htmlFor: props.id, className: "control-label" }, props.label); } if (process.env.NODE_ENV !== 'production') { Label.propTypes = { id: _propTypes["default"].string, label: _propTypes["default"].string }; } function FieldTemplate(props) { var _useTranslation = (0, _reactI18next.useTranslation)(_constants.I18N_DOMAIN_FORMS), t = _useTranslation.t; var groupsClassNames = (0, _classnames["default"])('form-group', _FieldTemplate["default"].template, props.className, _defineProperty({ 'has-error': !props.isValid, required: props.required }, _FieldTemplate["default"].updating, props.valueIsUpdating)); var title = /*#__PURE__*/_react["default"].createElement(Label, { id: props.id, label: props.label }); if (props.hint) { title = /*#__PURE__*/_react["default"].createElement("div", { className: _FieldTemplate["default"]['field-template-title'] }, title, /*#__PURE__*/_react["default"].createElement(_OverlayTrigger["default"], { overlayId: "".concat(props.id, "-hint-overlay"), overlayPlacement: props.hint.overlayPlacement || 'right', overlayComponent: props.hint.overlayComponent }, /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Button, { id: "".concat(props.id, "-hint"), bsStyle: "link", className: props.hint.className, "aria-label": t('FIELD_TEMPLATE_HINT_LABEL', { defaultValue: 'Display the input {{inputLabel}} hint', inputLabel: props.label }), "aria-haspopup": true }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], { name: props.hint.icon || 'talend-info-circle' })))); } var labelAfter = props.hint ? false : props.labelAfter; return /*#__PURE__*/_react["default"].createElement("div", { className: groupsClassNames, "aria-busy": props.valueIsUpdating }, props.label && !labelAfter && title, props.children, props.label && labelAfter && title, /*#__PURE__*/_react["default"].createElement(_Message["default"], { description: props.description, descriptionId: props.descriptionId, errorId: props.errorId, errorMessage: props.errorMessage, isValid: props.isValid })); } if (process.env.NODE_ENV !== 'production') { FieldTemplate.propTypes = { children: _propTypes["default"].node, hint: _propTypes["default"].shape({ icon: _propTypes["default"].string, className: _propTypes["default"].string, overlayComponent: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].string]).isRequired, overlayPlacement: _propTypes["default"].string }), className: _propTypes["default"].string, description: _propTypes["default"].string, descriptionId: _propTypes["default"].string.isRequired, errorId: _propTypes["default"].string.isRequired, errorMessage: _propTypes["default"].string, id: _propTypes["default"].string, isValid: _propTypes["default"].bool, label: _propTypes["default"].string, labelAfter: _propTypes["default"].bool, required: _propTypes["default"].bool, valueIsUpdating: _propTypes["default"].bool }; } FieldTemplate.defaultProps = { isValid: true }; FieldTemplate.displayName = 'FieldTemplate'; var _default = FieldTemplate; exports["default"] = _default; //# sourceMappingURL=FieldTemplate.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4121 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tf-buttons":"Buttons__tf-buttons___3jWlg","left":"Buttons__left___2Ga-V","right":"Buttons__right___3LuJl"}; /***/ }), /* 4122 */ /***/ (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"]; } }); Object.defineProperty(exports, "CheckBoxes", { enumerable: true, get: function get() { return _CheckBoxes["default"]; } }); Object.defineProperty(exports, "TextModeCheckBox", { enumerable: true, get: function get() { return _TextMode["default"]; } }); var _CheckBox = _interopRequireDefault(__webpack_require__(4123)); var _CheckBoxes = _interopRequireDefault(__webpack_require__(4124)); var _TextMode = _interopRequireDefault(__webpack_require__(4125)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } //# sourceMappingURL=index.js.map /***/ }), /* 4123 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = CheckBox; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _SimpleCheckBox = _interopRequireDefault(__webpack_require__(1627)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function CheckBox(props) { var id = props.id, isValid = props.isValid, errorMessage = props.errorMessage, onChange = props.onChange, onFinish = props.onFinish, schema = props.schema, value = props.value, valueIsUpdating = props.valueIsUpdating; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { id: id, hint: schema.hint, className: schema.className, description: schema.description, descriptionId: descriptionId, errorId: errorId, errorMessage: errorMessage, isValid: isValid, required: schema.required, valueIsUpdating: valueIsUpdating }, /*#__PURE__*/_react["default"].createElement(_SimpleCheckBox["default"], { describedby: "".concat(descriptionId, " ").concat(errorId), disabled: schema.disabled || valueIsUpdating, id: id, isValid: isValid, label: schema.title || value, onChange: onChange, onFinish: onFinish, schema: schema, value: value })); } if (process.env.NODE_ENV !== 'production') { CheckBox.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ hint: _propTypes["default"].shape({ icon: _propTypes["default"].string, className: _propTypes["default"].string, overlayComponent: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].string]).isRequired, overlayPlacement: _propTypes["default"].string }), className: _propTypes["default"].string, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, required: _propTypes["default"].bool, title: _propTypes["default"].string }), value: _propTypes["default"].bool, valueIsUpdating: _propTypes["default"].bool }; } CheckBox.defaultProps = { isValid: true, schema: {}, value: false }; //# sourceMappingURL=CheckBox.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4124 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = CheckBoxes; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _SimpleCheckBox = _interopRequireDefault(__webpack_require__(1627)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function getValues() { var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var itemValue = arguments.length > 1 ? arguments[1] : undefined; var checked = arguments.length > 2 ? arguments[2] : undefined; if (checked) { return value.concat(itemValue); } var filteredValue = value.filter(function (nextValue) { return nextValue !== itemValue; }); return filteredValue.length ? filteredValue : undefined; } function CheckBoxes(props) { var id = props.id, isValid = props.isValid, errorMessage = props.errorMessage, _onChange = props.onChange, _onFinish = props.onFinish, schema = props.schema, value = props.value, valueIsUpdating = props.valueIsUpdating; var description = schema.description, title = schema.title, titleMap = schema.titleMap; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { id: id, hint: schema.hint, className: schema.className, description: description, descriptionId: descriptionId, errorId: errorId, errorMessage: errorMessage, isValid: isValid, label: title, required: schema.required, valueIsUpdating: valueIsUpdating }, titleMap.map(function (item, index) { return /*#__PURE__*/_react["default"].createElement(_SimpleCheckBox["default"], { describedby: "".concat(descriptionId, " ").concat(errorId), disabled: schema.disabled || valueIsUpdating, id: id, key: index, isValid: isValid, label: item.name, onChange: function onChange(event, payload) { return _onChange(event, { schema: payload.schema, value: getValues(value, item.value, payload.value) }); }, onFinish: function onFinish(event, payload) { return _onFinish(event, { schema: payload.schema, value: getValues(value, item.value, payload.value) }); }, schema: schema, value: value && value.includes(item.value), index: index }); })); } if (process.env.NODE_ENV !== 'production') { CheckBoxes.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ hint: _propTypes["default"].shape({ icon: _propTypes["default"].string, className: _propTypes["default"].string, overlayComponent: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].string]).isRequired, overlayPlacement: _propTypes["default"].string }), description: _propTypes["default"].string, disabled: _propTypes["default"].bool, required: _propTypes["default"].bool, title: _propTypes["default"].string, titleMap: _propTypes["default"].arrayOf(_propTypes["default"].shape({ name: _propTypes["default"].string, value: _propTypes["default"].string })), className: _propTypes["default"].string }), value: _propTypes["default"].arrayOf(_propTypes["default"].string), valueIsUpdating: _propTypes["default"].bool }; } CheckBoxes.defaultProps = { isValid: true, schema: {} }; //# sourceMappingURL=CheckBoxes.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4125 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = TextModeCheckBox; 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 _TextMode = _interopRequireDefault(__webpack_require__(1624)); var _TextMode2 = _interopRequireDefault(__webpack_require__(4126)); 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 TextModeCheckBox(_ref) { var id = _ref.id, schema = _ref.schema, value = _ref.value; return /*#__PURE__*/_react["default"].createElement(_TextMode["default"], { id: id, label: schema.title || value, className: _TextMode2["default"].checkbox }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], { "aria-label": value, "aria-hidden": false, name: value ? 'talend-check' : 'talend-cross', className: (0, _classnames["default"])(_TextMode2["default"].icon, _defineProperty({}, _TextMode2["default"].cross, !value)) })); } if (process.env.NODE_ENV !== 'production') { TextModeCheckBox.propTypes = { id: _propTypes["default"].string, schema: _propTypes["default"].shape({ title: _propTypes["default"].string }).isRequired, value: _propTypes["default"].bool }; } //# sourceMappingURL=TextMode.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4126 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"checkbox":"TextMode__checkbox___1Fzy5","icon":"TextMode__icon___3yeYH","cross":"TextMode__cross___3WG3j","has-success":"TextMode__has-success___1iYlU","has-warning":"TextMode__has-warning___3S70P","has-error":"TextMode__has-error___2EspN"}; /***/ }), /* 4127 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "CodeTextMode", { enumerable: true, get: function get() { return _TextMode["default"]; } }); exports["default"] = void 0; var _Code = _interopRequireDefault(__webpack_require__(4128)); var _TextMode = _interopRequireDefault(__webpack_require__(4131)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Code["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4128 */ /***/ (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 _reactI18next = __webpack_require__(10); var _keycode = _interopRequireDefault(__webpack_require__(34)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _TextArea = _interopRequireDefault(__webpack_require__(1628)); var _generateId = __webpack_require__(61); var _translate = _interopRequireDefault(__webpack_require__(116)); var _constants = __webpack_require__(73); 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 _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 CodeWidget = _TextArea["default"]; var AceEditor; var DEFAULT_SET_OPTIONS = { enableBasicAutocompletion: true, enableLiveAutocompletion: true, enableSnippets: true }; var WrappedTextArea = /*#__PURE__*/function (_React$PureComponent) { _inherits(WrappedTextArea, _React$PureComponent); var _super = _createSuper(WrappedTextArea); function WrappedTextArea() { var _this; _classCallCheck(this, WrappedTextArea); _this = _super.call(this); // eslint-disable-next-line no-console console.warn('CodeWidget react-ace not found, fallback to Textarea'); return _this; } _createClass(WrappedTextArea, [{ key: "render", value: function render() { return /*#__PURE__*/_react["default"].createElement(_TextArea["default"], this.props); } }]); return WrappedTextArea; }(_react["default"].PureComponent); // eslint-disable-next-line react/no-multi-comp var Code = /*#__PURE__*/function (_React$Component) { _inherits(Code, _React$Component); var _super2 = _createSuper(Code); function Code(props) { var _this2; _classCallCheck(this, Code); _this2 = _super2.call(this, props); _this2.onChange = _this2.onChange.bind(_assertThisInitialized(_this2)); _this2.onFinish = _this2.onFinish.bind(_assertThisInitialized(_this2)); _this2.onLoad = _this2.onLoad.bind(_assertThisInitialized(_this2)); _this2.onBlur = _this2.onBlur.bind(_assertThisInitialized(_this2)); _this2.onKeyDown = _this2.onKeyDown.bind(_assertThisInitialized(_this2)); // this hold the last time the ESC is pressed to offer an escape solution from keyboard trap _this2.lastEsc = null; return _this2; } _createClass(Code, [{ key: "componentDidUpdate", value: function componentDidUpdate() { this.attachTextareaAttributes(); } }, { key: "onChange", value: function onChange(value, event) { this.props.onChange(event, { schema: this.props.schema, value: value }); } }, { key: "onFinish", value: function onFinish(event) { this.props.onFinish(event, { schema: this.props.schema }); } }, { key: "onKeyDown", value: function onKeyDown(event) { if (event.keyCode === _keycode["default"].codes.esc) { var now = Date.now(); if (this.lastEsc && this.lastEsc - now < 1000) { this.lastEsc = null; this.ref.focus(); this.editor.textInput.getElement().setAttribute('tabindex', -1); } else { this.lastEsc = now; } } else { this.lastEsc = null; } } }, { key: "onBlur", value: function onBlur() { this.editor.textInput.getElement().removeAttribute('tabindex'); } }, { key: "onLoad", value: function onLoad(editor) { this.editor = editor; this.attachTextareaAttributes(); } }, { key: "attachTextareaAttributes", value: function attachTextareaAttributes() { if (this.editor) { var textarea = this.editor.textInput.getElement(); textarea.setAttribute('id', this.props.id); textarea.setAttribute('aria-describedby', "".concat(this.ids.instructionsId, " ").concat(this.ids.descriptionId, " ").concat(this.ids.errorId)); } } }, { key: "render", value: function render() { var _this3 = this; var _this$props = this.props, id = _this$props.id, isValid = _this$props.isValid, errorMessage = _this$props.errorMessage, schema = _this$props.schema, value = _this$props.value, valueIsUpdating = _this$props.valueIsUpdating, t = _this$props.t; var autoFocus = schema.autoFocus, description = schema.description, options = schema.options, _schema$readOnly = schema.readOnly, readOnly = _schema$readOnly === void 0 ? false : _schema$readOnly, title = schema.title; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); var instructionsId = (0, _generateId.generateId)(id, 'instructions'); this.ids = { descriptionId: descriptionId, errorId: errorId, instructionsId: instructionsId }; return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: description, descriptionId: descriptionId, errorId: errorId, errorMessage: errorMessage, id: id, isValid: isValid, label: title, required: schema.required, valueIsUpdating: valueIsUpdating }, /*#__PURE__*/_react["default"].createElement("div", { // eslint-disable-line jsx-a11y/no-static-element-interactions id: id && "".concat(id, "-editor-container"), onBlur: this.onBlur, onKeyDown: this.onKeyDown, ref: function ref(_ref) { _this3.ref = _ref; }, tabIndex: "-1" }, /*#__PURE__*/_react["default"].createElement("div", { id: instructionsId, className: "sr-only" }, t('TF_CODE_ESCAPE', { defaultValue: 'To focus out of the editor, press ESC key twice.' })), /*#__PURE__*/_react["default"].createElement(AceEditor, _extends({ key: "ace", className: "tf-widget-code form-control", editorProps: { $blockScrolling: Infinity } // https://github.com/securingsincity/react-ace/issues/29 , focus: autoFocus, name: "".concat(id, "_wrapper"), mode: options && options.language, onBlur: this.onFinish, onLoad: this.onLoad, onChange: this.onChange // disabled is not supported by ace use readonly // https://github.com/ajaxorg/ace/issues/406 , readOnly: readOnly || schema.disabled || valueIsUpdating, setOptions: DEFAULT_SET_OPTIONS, showGutter: false, showPrintMargin: false, theme: "chrome", value: value, width: "auto" }, options)))); } }]); return Code; }(_react["default"].Component); if (process.env.NODE_ENV !== 'production') { WrappedTextArea.propTypes = _TextArea["default"].propTypes; Code.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, options: _propTypes["default"].object, readOnly: _propTypes["default"].bool, required: _propTypes["default"].bool, title: _propTypes["default"].string, type: _propTypes["default"].string }), t: _propTypes["default"].func, value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]), valueIsUpdating: _propTypes["default"].bool }; } Code.defaultProps = { isValid: true, schema: {}, t: (0, _translate["default"])() }; try { /* eslint-disable global-require, import/no-extraneous-dependencies */ AceEditor = __webpack_require__(635)["default"]; __webpack_require__(1057); // https://github.com/securingsincity/react-ace/issues/95 /* eslint-enable global-require, import/no-extraneous-dependencies */ CodeWidget = Code; } catch (error) { CodeWidget = WrappedTextArea; } var _default = (0, _reactI18next.withTranslation)(_constants.I18N_DOMAIN_FORMS)(CodeWidget); exports["default"] = _default; //# sourceMappingURL=Code.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4129 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = TextArea; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /* eslint-disable jsx-a11y/no-autofocus */ function TextArea(_ref) { var id = _ref.id, isValid = _ref.isValid, errorMessage = _ref.errorMessage, _onChange = _ref.onChange, onFinish = _ref.onFinish, schema = _ref.schema, value = _ref.value, valueIsUpdating = _ref.valueIsUpdating; var autoFocus = schema.autoFocus, description = schema.description, _schema$disabled = schema.disabled, disabled = _schema$disabled === void 0 ? false : _schema$disabled, placeholder = schema.placeholder, _schema$readOnly = schema.readOnly, readOnly = _schema$readOnly === void 0 ? false : _schema$readOnly, _schema$rows = schema.rows, rows = _schema$rows === void 0 ? 5 : _schema$rows, title = schema.title; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { hint: schema.hint, className: schema.className, description: description, descriptionId: descriptionId, errorId: errorId, errorMessage: errorMessage, id: id, isValid: isValid, label: title, labelAfter: true, required: schema.required, valueIsUpdating: valueIsUpdating }, /*#__PURE__*/_react["default"].createElement("textarea", { id: id, autoFocus: autoFocus, className: "form-control", disabled: disabled || valueIsUpdating, placeholder: placeholder, onBlur: function onBlur(event) { return onFinish(event, { schema: schema }); }, onChange: function onChange(event) { return _onChange(event, { schema: schema, value: event.target.value }); }, readOnly: readOnly, rows: rows, value: value // eslint-disable-next-line jsx-a11y/aria-proptypes , "aria-invalid": !isValid, "aria-required": schema.required, "aria-describedby": "".concat(descriptionId, " ").concat(errorId) })); } if (process.env.NODE_ENV !== 'production') { TextArea.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ className: _propTypes["default"].string, autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, placeholder: _propTypes["default"].string, readOnly: _propTypes["default"].bool, required: _propTypes["default"].bool, rows: _propTypes["default"].number, title: _propTypes["default"].string, hint: _propTypes["default"].shape({ icon: _propTypes["default"].string, className: _propTypes["default"].string, overlayComponent: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].string]).isRequired, overlayPlacement: _propTypes["default"].string }) }), value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]), valueIsUpdating: _propTypes["default"].bool }; } TextArea.defaultProps = { isValid: true, schema: {}, value: '' }; //# sourceMappingURL=TextArea.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4130 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = TextMode; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _FieldTemplate = __webpack_require__(43); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function TextMode(_ref) { var id = _ref.id, schema = _ref.schema, value = _ref.value; var _schema$rows = schema.rows, rows = _schema$rows === void 0 ? 5 : _schema$rows, title = schema.title; return /*#__PURE__*/_react["default"].createElement(_FieldTemplate.TextMode, { id: id, label: title }, /*#__PURE__*/_react["default"].createElement("pre", { style: { height: "".concat(rows * 2, "rem"), fontSize: 'inherit' } }, value)); } if (process.env.NODE_ENV !== 'production') { TextMode.propTypes = { id: _propTypes["default"].string, schema: _propTypes["default"].shape({ rows: _propTypes["default"].number, title: _propTypes["default"].string }), value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]) }; } TextMode.defaultProps = { schema: {}, value: '' }; //# sourceMappingURL=TextMode.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4131 */ /***/ (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 _FieldTemplate = __webpack_require__(43); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } /* eslint-disable import/no-mutable-exports */ function TextModeCode(_ref) { var id = _ref.id, schema = _ref.schema, value = _ref.value, options = _ref.options; return /*#__PURE__*/_react["default"].createElement(_FieldTemplate.TextMode, { id: id, label: schema.title }, /*#__PURE__*/_react["default"].createElement("pre", { style: options }, value)); } if (process.env.NODE_ENV !== 'production') { TextModeCode.propTypes = { id: _propTypes["default"].string, options: _propTypes["default"].object, schema: _propTypes["default"].shape({ title: _propTypes["default"].string }), value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]) }; } TextModeCode.defaultProps = { schema: {} }; var _default = TextModeCode; exports["default"] = _default; //# sourceMappingURL=TextMode.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4132 */ /***/ (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 _react = _interopRequireWildcard(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _Datalist = _interopRequireDefault(__webpack_require__(1177)); var _omit = _interopRequireDefault(__webpack_require__(547)); var _get = _interopRequireDefault(__webpack_require__(208)); var _has = _interopRequireDefault(__webpack_require__(4133)); var _reactI18next = __webpack_require__(10); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _translate = _interopRequireDefault(__webpack_require__(116)); var _constants = __webpack_require__(73); var _trigger = _interopRequireDefault(__webpack_require__(396)); var _constants2 = __webpack_require__(1630); var _generateId = __webpack_require__(61); 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 _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) || _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 _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 escapeRegexCharacters(str) { return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } var PROPS_TO_OMIT = ['schema', 'errorMessage', 'errors', 'isValid', 'onChange', 'onFinish', 'onTrigger', 'properties', 'resolveName']; var Datalist = /*#__PURE__*/function (_Component) { _inherits(Datalist, _Component); var _super = _createSuper(Datalist); function Datalist(props) { var _this; _classCallCheck(this, Datalist); _this = _super.call(this, props); _this.state = {}; _this.onChange = _this.onChange.bind(_assertThisInitialized(_this)); _this.getTitleMap = _this.getTitleMap.bind(_assertThisInitialized(_this)); _this.callTrigger = _this.callTrigger.bind(_assertThisInitialized(_this)); _this.onTrigger = _this.onTrigger.bind(_assertThisInitialized(_this)); return _this; } _createClass(Datalist, [{ key: "componentDidMount", value: function componentDidMount() { this.callTrigger({ type: _constants2.DID_MOUNT }); } /** * On change callback * We call onFinish to trigger validation on datalist item selection * @param event * @param payload */ }, { key: "onChange", value: function onChange(event, payload) { var mergedSchema = this.props.schema; // with the possibility to have async suggestions, on restricted values inputs // the validation doesn't have the enum list as it is not in the jsonSchema // so we rebuild it with current titleMap from async call if (mergedSchema.restricted && !mergedSchema.schema["enum"]) { mergedSchema = _objectSpread(_objectSpread({}, mergedSchema), {}, { schema: _objectSpread(_objectSpread({}, mergedSchema.schema), {}, { "enum": this.getTitleMap().map(function (entry) { return entry.value; }) }) }); } var payloadWithSchema = _objectSpread(_objectSpread({}, payload), {}, { schema: _objectSpread({}, mergedSchema) }); if (this.hasTitleMap()) { payloadWithSchema = _objectSpread(_objectSpread({}, payloadWithSchema), {}, { schema: _objectSpread(_objectSpread({}, payloadWithSchema.schema), {}, { titleMap: this.getTitleMap() }) }); } this.callTrigger(event); this.props.onChange(event, payloadWithSchema); this.props.onFinish(event, payloadWithSchema); } }, { key: "onTrigger", value: function onTrigger(event, trigger) { return this.props.onTrigger(event, { trigger: trigger, schema: this.props.schema, errors: this.props.errors, properties: this.props.properties }); } }, { key: "getTitleMap", value: function getTitleMap() { var _this2 = this; var titleMap = this.state.titleMap || (0, _get["default"])(this.props, 'schema.options.titleMap') || (0, _get["default"])(this.props, 'schema.titleMap') || []; var isMultiSection = (0, _get["default"])(this.props, 'schema.options.isMultiSection', false); var restricted = this.props.schema.restricted; var type = this.props.schema.schema.type; var propsValue = this.props.value; if (restricted || !propsValue) { return titleMap; } var titleMapFind = titleMap; var isMultiple = type === 'array'; var values = isMultiple ? propsValue : [propsValue]; if (isMultiSection) { titleMapFind = titleMap.reduce(function (prev, current) { prev.push.apply(prev, _toConsumableArray(current.suggestions)); return prev; }, []); } var additionalOptions = values.filter(function (value) { return !titleMapFind.find(function (option) { return option.value === value; }); }).map(function (value) { return _this2.addCustomValue(value, isMultiSection); }).reduce(function (acc, titleMapEntry) { acc.push(titleMapEntry); return acc; }, []); return titleMap.concat(additionalOptions); } }, { key: "hasTitleMap", value: function hasTitleMap() { return (0, _has["default"])(this.state, 'titleMap') || (0, _has["default"])(this.props, 'schema.options.titleMap') || (0, _has["default"])(this.props, 'schema.titleMap'); } }, { key: "addCustomValue", value: function addCustomValue(value, isMultiSection) { if (isMultiSection) { return { title: this.props.t('TF_DATALIST_CUSTOM_SECTION', { defaultValue: 'CUSTOM' }), suggestions: [{ name: this.props.resolveName(value), value: value }] }; } return { name: this.props.resolveName(value), value: value }; } }, { key: "callTrigger", value: function callTrigger(event) { var _this3 = this; (0, _trigger["default"])(event, { eventNames: [event.type], triggersDefinitions: this.props.schema.triggers, onTrigger: this.onTrigger, onLoading: function onLoading(isLoading) { return _this3.setState({ isLoading: isLoading }); }, onResponse: function onResponse(data) { return _this3.setState(data); } }); } }, { key: "render", value: function render() { var props = (0, _omit["default"])(this.props, PROPS_TO_OMIT); var descriptionId = (0, _generateId.generateDescriptionId)(this.props.id); var errorId = (0, _generateId.generateErrorId)(this.props.id); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { hint: this.props.schema.hint, className: this.props.schema.className, description: this.props.schema.description, descriptionId: descriptionId, errorId: errorId, errorMessage: this.props.errorMessage, id: this.props.id, isValid: this.props.isValid, label: this.props.schema.title, required: this.props.schema.required, valueIsUpdating: this.props.valueIsUpdating }, /*#__PURE__*/_react["default"].createElement(_Datalist["default"], _extends({}, props, this.state, { dataFeature: this.props.schema.dataFeature, className: "form-control-container", autoFocus: this.props.schema.autoFocus, disabled: this.props.schema.disabled || this.props.valueIsUpdating, multiSection: (0, _get["default"])(this.props, 'schema.options.isMultiSection', false), onChange: this.onChange, onFocus: this.callTrigger, placeholder: this.props.schema.placeholder, readOnly: this.props.schema.readOnly || false, titleMap: this.getTitleMap(), inputProps: { 'aria-invalid': !this.props.isValid, 'aria-required': this.props.schema.required, 'aria-describedby': "".concat(descriptionId, " ").concat(errorId) } }))); } }]); return Datalist; }(_react.Component); Datalist.displayName = 'Datalist field'; Datalist.defaultProps = { resolveName: function resolveName(value) { return value; }, value: '', t: (0, _translate["default"])() }; if (process.env.NODE_ENV !== 'production') { Datalist.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, onTrigger: _propTypes["default"].func, errors: _propTypes["default"].object, properties: _propTypes["default"].object, resolveName: _propTypes["default"].func, schema: _propTypes["default"].shape({ schema: _propTypes["default"].shape({ "enum": _propTypes["default"].array, type: _propTypes["default"].string }), triggers: _propTypes["default"].arrayOf(_propTypes["default"].shape({ onEvent: _propTypes["default"].string })), autoFocus: _propTypes["default"].bool, dataFeature: _propTypes["default"].string, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, placeholder: _propTypes["default"].string, readOnly: _propTypes["default"].bool, required: _propTypes["default"].bool, restricted: _propTypes["default"].bool, className: _propTypes["default"].string, title: _propTypes["default"].string, titleMap: _propTypes["default"].arrayOf(_propTypes["default"].shape({ name: _propTypes["default"].string.isRequired, value: _propTypes["default"].string.isRequired })), hint: _propTypes["default"].shape({ icon: _propTypes["default"].string, className: _propTypes["default"].string, overlayComponent: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].string]).isRequired, overlayPlacement: _propTypes["default"].string }), options: _propTypes["default"].shape({ isMultiSection: _propTypes["default"].bool, titleMap: _propTypes["default"].arrayOf(_propTypes["default"].shape({ title: _propTypes["default"].string.isRequired, suggestions: _propTypes["default"].arrayOf(_propTypes["default"].shape({ name: _propTypes["default"].string.isRequired, value: _propTypes["default"].string.isRequired })) })) }) }), value: _propTypes["default"].string, valueIsUpdating: _propTypes["default"].bool, t: _propTypes["default"].func }; } var _default = (0, _reactI18next.withTranslation)(_constants.I18N_DOMAIN_FORMS)(Datalist); exports["default"] = _default; //# sourceMappingURL=Datalist.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4133 */ /***/ (function(module, exports, __webpack_require__) { var baseHas = __webpack_require__(4134), hasPath = __webpack_require__(4135); /** * Checks if `path` is a direct property of `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = { 'a': { 'b': 2 } }; * var other = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.has(object, 'a'); * // => true * * _.has(object, 'a.b'); * // => true * * _.has(object, ['a', 'b']); * // => true * * _.has(other, 'a'); * // => false */ function has(object, path) { return object != null && hasPath(object, path, baseHas); } module.exports = has; /***/ }), /* 4134 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.has` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { return object != null && hasOwnProperty.call(object, key); } module.exports = baseHas; /***/ }), /* 4135 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(538), isArguments = __webpack_require__(548), isArray = __webpack_require__(173), isIndex = __webpack_require__(1610), isLength = __webpack_require__(891), toKey = __webpack_require__(877); /** * 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; /***/ }), /* 4136 */ /***/ (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 _get = _interopRequireDefault(__webpack_require__(208)); var _reactI18next = __webpack_require__(10); var _trigger = _interopRequireDefault(__webpack_require__(396)); var _constants = __webpack_require__(1630); var _FieldTemplate = __webpack_require__(43); var _constants2 = __webpack_require__(73); var _translate = _interopRequireDefault(__webpack_require__(116)); var _TextMode = _interopRequireDefault(__webpack_require__(4137)); 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 TextMode = /*#__PURE__*/function (_React$Component) { _inherits(TextMode, _React$Component); var _super = _createSuper(TextMode); function TextMode(props) { var _this; _classCallCheck(this, TextMode); _this = _super.call(this, props); _this.state = {}; return _this; } _createClass(TextMode, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; var onTrigger = function onTrigger(event, trigger) { return _this2.props.onTrigger(event, { trigger: trigger, schema: _this2.props.schema, errors: _this2.props.errors, properties: _this2.props.properties }); }; (0, _trigger["default"])(null, { eventNames: [_constants.DID_MOUNT, _constants.FOCUS], triggersDefinitions: this.props.schema.triggers, onTrigger: onTrigger, onLoading: function onLoading(isLoading) { return _this2.setState({ isLoading: isLoading }); }, onResponse: function onResponse(data) { return _this2.setState(data); } }); } }, { key: "render", value: function render() { var _this$props = this.props, id = _this$props.id, schema = _this$props.schema, value = _this$props.value, t = _this$props.t; var title = schema.title, options = schema.options; var titleEntry; if (options && options.isMultiSection) { options.titleMap.find(function (section) { titleEntry = section.suggestions.find(function (entry) { return entry.value === value; }); return !!titleEntry; }); } else { var titleMap = (0, _get["default"])(this.state, 'titleMap') || (0, _get["default"])(this.props, 'schema.titleMap') || []; titleEntry = titleMap.find(function (entry) { return entry.value === value; }); } var displayValue = titleEntry && titleEntry.name || value; if (value && this.state.isLoading) { displayValue = /*#__PURE__*/_react["default"].createElement("span", { className: _TextMode["default"].loading, "aria-busy": "true" }, value, " ", "(".concat(t('DATALIST_WIDGET_LOADING_LABELS', { defaultValue: 'loading labels' }), ")")); } return /*#__PURE__*/_react["default"].createElement(_FieldTemplate.TextMode, { id: id, label: title }, displayValue); } }]); return TextMode; }(_react["default"].Component); if (process.env.NODE_ENV !== 'production') { TextMode.propTypes = { errors: _propTypes["default"].object, id: _propTypes["default"].string, onTrigger: _propTypes["default"].func, properties: _propTypes["default"].object, schema: _propTypes["default"].shape({ options: _propTypes["default"].shape({ isMultiSection: _propTypes["default"].bool, titleMap: _propTypes["default"].array }), title: _propTypes["default"].string, titleMap: _propTypes["default"].arrayOf(_propTypes["default"].shape({ name: _propTypes["default"].string.isRequired, value: _propTypes["default"].string.isRequired })), triggers: _propTypes["default"].array, type: _propTypes["default"].string }), t: _propTypes["default"].func, value: _propTypes["default"].string }; } TextMode.defaultProps = { schema: {}, value: '', t: (0, _translate["default"])() }; var _default = (0, _reactI18next.withTranslation)(_constants2.I18N_DOMAIN_FORMS)(TextMode); exports["default"] = _default; //# sourceMappingURL=TextMode.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4137 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"loading":"TextMode__loading___2yk6M","object-blink":"TextMode__object-blink___25FES","skeleton-blink":"TextMode__skeleton-blink___1OcW9"}; /***/ }), /* 4138 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "DateWidget", { enumerable: true, get: function get() { return _Date["default"]; } }); Object.defineProperty(exports, "DateTimeWidget", { enumerable: true, get: function get() { return _DateTime["default"]; } }); Object.defineProperty(exports, "TimeWidget", { enumerable: true, get: function get() { return _Time["default"]; } }); var _Date = _interopRequireDefault(__webpack_require__(4139)); var _DateTime = _interopRequireDefault(__webpack_require__(4140)); var _Time = _interopRequireDefault(__webpack_require__(4141)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } //# sourceMappingURL=index.js.map /***/ }), /* 4139 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { 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 _react = _interopRequireWildcard(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _memoizeOne = _interopRequireDefault(__webpack_require__(362)); var _DateTimePickers = __webpack_require__(478); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _Date = __webpack_require__(1631); var _generateId = __webpack_require__(61); var _properties = __webpack_require__(96); 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 _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) || _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; } var memorizedIsoStrToDate = (0, _memoizeOne["default"])(_Date.isoStrToDate); function DateWidget(props) { var errorMessage = props.errorMessage, id = props.id, isValid = props.isValid, onChange = props.onChange, onFinish = props.onFinish, options = props.options, schema = props.schema, value = props.value, valueIsUpdating = props.valueIsUpdating; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); var convertedValue = schema.schema.format === 'iso-datetime' ? memorizedIsoStrToDate(value) : value; var _useState = (0, _react.useState)({ errorMessage: '' }), _useState2 = _slicedToArray(_useState, 2), state = _useState2[0], setState = _useState2[1]; function onDateChange(event, _ref) { var nextErrorMessage = _ref.errorMessage, date = _ref.date, textInput = _ref.textInput; setState({ errorMessage: nextErrorMessage }); var fieldValue = date; if (!nextErrorMessage && date) { fieldValue = (0, _Date.convertDate)(date, textInput, props.schema.schema); } var payload = { schema: schema, value: fieldValue }; onChange(event, payload); if (!nextErrorMessage) { onFinish(event, payload); } } function onBlur(event) { onFinish(event, { schema: schema }); } return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: schema.description, descriptionId: descriptionId, errorId: errorId, errorMessage: state.errorMessage || errorMessage, id: id, isValid: isValid, label: schema.title, required: schema.required, valueIsUpdating: valueIsUpdating }, /*#__PURE__*/_react["default"].createElement(_DateTimePickers.InputDatePicker, _extends({ autoFocus: schema.autoFocus, dateFormat: options.dateFormat, disabled: schema.disabled || valueIsUpdating, placeholder: schema.placeholder, id: id, onChange: onDateChange, onBlur: onBlur, readOnly: schema.readOnly, value: convertedValue, useUTC: options.useUTC // eslint-disable-next-line jsx-a11y/aria-proptypes , "aria-invalid": !isValid, "aria-required": schema.required, "aria-describedby": "".concat(descriptionId, " ").concat(errorId) }, (0, _properties.extractDataAttributes)(schema)))); } DateWidget.displayName = 'Date Widget'; DateWidget.defaultProps = { options: {} }; if (process.env.NODE_ENV !== 'production') { DateWidget.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, options: _propTypes["default"].shape({ dateFormat: _propTypes["default"].string, useUTC: _propTypes["default"].string }), schema: _propTypes["default"].shape({ autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, format: _propTypes["default"].string, placeholder: _propTypes["default"].string, readOnly: _propTypes["default"].bool, required: _propTypes["default"].bool, title: _propTypes["default"].string, schema: _propTypes["default"].shape({ format: _propTypes["default"].string, type: _propTypes["default"].string }) }), value: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string, _propTypes["default"].instanceOf(Date)]), valueIsUpdating: _propTypes["default"].bool }; } var _default = DateWidget; exports["default"] = _default; //# sourceMappingURL=Date.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4140 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { 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"] = DateTimeWidget; var _react = _interopRequireWildcard(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _DateTimePickers = __webpack_require__(478); var _Date = __webpack_require__(1631); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); 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 _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 DateTimeWidget(props) { var errorMessage = props.errorMessage, id = props.id, isValid = props.isValid, onChange = props.onChange, onFinish = props.onFinish, options = props.options, schema = props.schema, value = props.value, valueIsUpdating = props.valueIsUpdating; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); var convertedValue = schema.schema.format === 'iso-datetime' ? (0, _Date.isoStrToDate)(value) : value; var _useState = (0, _react.useState)({ errorMessage: '' }), _useState2 = _slicedToArray(_useState, 2), state = _useState2[0], setState = _useState2[1]; function onDateTimeChange(event, _ref) { var nextErrorMessage = _ref.errorMessage, datetime = _ref.datetime, textInput = _ref.textInput; setState({ errorMessage: nextErrorMessage }); var result = datetime; if (!nextErrorMessage && datetime) { result = (0, _Date.convertDate)(datetime, textInput, props.schema.schema); } else if (!nextErrorMessage && datetime === null) { result = ''; } var payload = { schema: schema, value: result }; onChange(event, payload); if (!nextErrorMessage) { onFinish(event, payload); } } function onBlur(event) { onFinish(event, { schema: schema }); } return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: schema.description, descriptionId: descriptionId, errorId: errorId, errorMessage: state.errorMessage || errorMessage, id: id, isValid: isValid, label: schema.title, required: !!schema.required, valueIsUpdating: valueIsUpdating }, /*#__PURE__*/_react["default"].createElement(_DateTimePickers.InputDateTimePicker, { id: id, autoFocus: schema.autoFocus, disabled: schema.disabled || valueIsUpdating, readOnly: schema.readOnly, onBlur: onBlur, onChange: onDateTimeChange, dateFormat: options.dateFormat, useSeconds: options.useSeconds, useUTC: options.useUTC, timezone: options.timezone, value: convertedValue // eslint-disable-next-line jsx-a11y/aria-proptypes , "aria-invalid": !isValid, "aria-required": !!schema.required, "aria-describedby": "".concat(descriptionId, " ").concat(errorId) })); } DateTimeWidget.displayName = 'DateTimeWidget'; DateTimeWidget.defaultProps = { options: {} }; if (process.env.NODE_ENV !== 'production') { DateTimeWidget.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, options: _propTypes["default"].shape({ dateFormat: _propTypes["default"].string, useSeconds: _propTypes["default"].bool, timezone: _propTypes["default"].string, useUTC: _propTypes["default"].bool }), schema: _propTypes["default"].shape({ autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, format: _propTypes["default"].string, placeholder: _propTypes["default"].string, readOnly: _propTypes["default"].bool, required: _propTypes["default"].bool, title: _propTypes["default"].string, schema: _propTypes["default"].shape({ type: _propTypes["default"].string, format: _propTypes["default"].string }) }), value: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string, _propTypes["default"].instanceOf(Date)]), valueIsUpdating: _propTypes["default"].bool }; } //# sourceMappingURL=DateTime.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4141 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { 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 _react = _interopRequireWildcard(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _DateTimePickers = __webpack_require__(478); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); 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 _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 TimeWidget(_ref) { var errorMessage = _ref.errorMessage, id = _ref.id, isValid = _ref.isValid, _ref$options = _ref.options, options = _ref$options === void 0 ? {} : _ref$options, onChange = _ref.onChange, onFinish = _ref.onFinish, schema = _ref.schema, value = _ref.value, valueIsUpdating = _ref.valueIsUpdating; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); var _useState = (0, _react.useState)({ errorMessage: '' }), _useState2 = _slicedToArray(_useState, 2), state = _useState2[0], setState = _useState2[1]; function onBlur(event) { onFinish(event, { schema: schema }); } function onTimeChange(event, _ref2) { var nextErrorMessage = _ref2.errorMessage, textInput = _ref2.textInput; setState({ errorMessage: nextErrorMessage }); var payload = { schema: schema, value: textInput }; onChange(event, payload); if (!nextErrorMessage) { onFinish(event, payload); } } return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: schema.description, descriptionId: descriptionId, errorId: errorId, errorMessage: state.errorMessage || errorMessage, id: id, isValid: isValid && !state.errorMessage, label: schema.title, required: schema.required, valueIsUpdating: valueIsUpdating }, /*#__PURE__*/_react["default"].createElement(_DateTimePickers.InputTimePicker, { id: id, autoFocus: schema.autoFocus, disabled: schema.disabled || valueIsUpdating, readOnly: schema.readOnly, value: value, useSeconds: options.useSeconds, onBlur: onBlur, onChange: onTimeChange })); } TimeWidget.displayName = 'TimeWidget'; if (process.env.NODE_ENV !== 'production') { TimeWidget.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, options: _propTypes["default"].shape({ dateFormat: _propTypes["default"].string, useUTC: _propTypes["default"].bool }), schema: _propTypes["default"].shape({ autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, format: _propTypes["default"].string, placeholder: _propTypes["default"].string, readOnly: _propTypes["default"].bool, required: _propTypes["default"].bool, title: _propTypes["default"].string, schema: _propTypes["default"].shape({ type: _propTypes["default"].string }) }), value: _propTypes["default"].string, valueIsUpdating: _propTypes["default"].bool }; } var _default = TimeWidget; exports["default"] = _default; //# sourceMappingURL=Time.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4142 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _EnumerationWidget = _interopRequireDefault(__webpack_require__(4143)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _EnumerationWidget["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4143 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.EnumerationForm = exports.enumerationStates = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _keycode = _interopRequireDefault(__webpack_require__(34)); var _isEmpty2 = _interopRequireDefault(__webpack_require__(4144)); var _Enumeration = _interopRequireDefault(__webpack_require__(789)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _reactI18next = __webpack_require__(10); var _FocusManager = _interopRequireDefault(__webpack_require__(163)); var _utils = __webpack_require__(4145); var _constants = __webpack_require__(73); var _translate = _interopRequireDefault(__webpack_require__(116)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); 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 _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 _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 _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 enumerationStates = { DISPLAY_MODE_DEFAULT: 'DISPLAY_MODE_DEFAULT', DISPLAY_MODE_ADD: 'DISPLAY_MODE_ADD', DISPLAY_MODE_SEARCH: 'DISPLAY_MODE_SEARCH', DISPLAY_MODE_EDIT: 'DISPLAY_MODE_EDIT', DISPLAY_MODE_SELECTED: 'DISPLAY_MODE_SELECTED', IMPORT_MODE_APPEND: 'IMPORT_MODE_APPEND', IMPORT_MODE_OVERWRITE: 'IMPORT_MODE_OVERWRITE' }; exports.enumerationStates = enumerationStates; var ENUMERATION_SEARCH_ACTION = 'ENUMERATION_SEARCH_ACTION'; var ENUMERATION_NEXT_PAGE_ACTION = 'ENUMERATION_NEXT_PAGE_ACTION'; var ENUMERATION_ADD_ACTION = 'ENUMERATION_ADD_ACTION'; var ENUMERATION_REMOVE_ACTION = 'ENUMERATION_REMOVE_ACTION'; var ENUMERATION_RENAME_ACTION = 'ENUMERATION_RENAME_ACTION'; var ITEMS_DEFAULT_HEIGHT = 33; var ENUMERATION_IMPORT_FILE_ACTION = 'ENUMERATION_IMPORT_FILE_ACTION'; /* For this widget we distinguish 2 modes : - Connected mode. All items are passed via props by callee There are no computation of items here, all computation is done by the callee application - Non-connected Mode : Note: The item's index retrieved on event is different than the one in the global state list The items display is computed on frontend-side Add, Remove, Edit, Submit, Search actions imply a computation on frontend side. This is the case for story book for example. There is a special method isConnectedMode() indicating in what mode we are */ var EnumerationForm = /*#__PURE__*/function (_React$Component) { _inherits(EnumerationForm, _React$Component); var _super = _createSuper(EnumerationForm); _createClass(EnumerationForm, null, [{ key: "getItemHeight", value: function getItemHeight() { return ITEMS_DEFAULT_HEIGHT; } }, { key: "parseStringValueToArray", value: function parseStringValueToArray(values) { return values.split(',').map(function (value) { return value.trim(); }); } }, { key: "updateItemValidateDisabled", value: function updateItemValidateDisabled(value, valueExist) { return { currentEdit: { validate: { disabled: value.value === '' || !!valueExist } } }; } }]); function EnumerationForm(props) { var _this; _classCallCheck(this, EnumerationForm); _this = _super.call(this, props); var t = props.t; _this.timerSearch = null; _this.allowDuplicate = false; _this.allowImport = false; var disabledAction = props.schema ? props.schema.disabled : false; _this.importFileHandler = _this.importFileHandler.bind(_assertThisInitialized(_this)); if (props.schema) { _this.allowDuplicate = !!props.schema.allowDuplicates; _this.allowImport = !!props.schema.allowImport; } _this.addInputs = [{ disabled: true, label: t('ENUMERATION_WIDGET_VALIDATE_AND_ADD', { defaultValue: 'Validate and Add' }), icon: 'talend-check-plus', id: 'validate-and-add', key: 'validateAdd', onClick: _this.onValidateAndAddHandler.bind(_assertThisInitialized(_this)) }, { disabled: true, label: t('ENUMERATION_WIDGET_VALIDATE', { defaultValue: 'Validate' }), icon: 'talend-check', id: 'validate', key: 'validate', onClick: _this.onSingleAddHandler.bind(_assertThisInitialized(_this)) }, { label: t('ENUMERATION_WIDGET_ABORT', { defaultValue: 'Abort' }), icon: 'talend-cross', id: 'abort', key: 'abort', onClick: _this.onAbortHandler.bind(_assertThisInitialized(_this)) }]; _this.searchInputsActions = [{ label: t('ENUMERATION_WIDGET_ABORT', { defaultValue: 'Abort' }), icon: 'talend-cross', id: 'abort', key: 'abort', onClick: _this.onAbortHandler.bind(_assertThisInitialized(_this)) }]; _this.loadingInputsActions = [{ label: t('ENUMERATION_WIDGET_LOADING', { defaultValue: 'Loading' }), icon: 'talend-cross', inProgress: true, id: 'loading' }]; _this.itemEditActions = [{ disabled: true, label: t('ENUMERATION_WIDGET_VALIDATE', { defaultValue: 'Validate' }), icon: 'talend-check', id: 'validate', onClick: _this.onSubmitItem.bind(_assertThisInitialized(_this)) }, { disabled: false, label: t('ENUMERATION_WIDGET_ABORT', { defaultValue: 'Abort' }), icon: 'talend-cross', id: 'abort', onClick: _this.onAbortItem.bind(_assertThisInitialized(_this)) }]; _this.defaultActions = [{ disabled: disabledAction, label: t('ENUMERATION_WIDGET_EDIT', { defaultValue: 'Edit' }), icon: 'talend-pencil', id: 'edit', onClick: _this.onEnterEditModeItem.bind(_assertThisInitialized(_this)) }, { disabled: disabledAction, label: t('ENUMERATION_WIDGET_REMOVE_VALUE', { defaultValue: 'Remove value' }), icon: 'talend-trash', id: 'delete', onClick: _this.onDeleteItem.bind(_assertThisInitialized(_this)) }]; _this.defaultHeaderActions = [{ disabled: false, label: t('ENUMERATION_WIDGET_SEARCH_VALUES', { defaultValue: 'Search for specific values' }), icon: 'talend-search', id: 'search', onClick: _this.changeDisplayToSearchMode.bind(_assertThisInitialized(_this)) }]; if (_this.allowImport) { var dataFeature = _this.props.schema['data-feature']; _this.defaultHeaderActions.push({ disabled: disabledAction, label: t('ENUMERATION_WIDGET_IMPORT_FROM_FILE', { defaultValue: 'Import values from a file' }), icon: 'talend-download', id: 'upload', onClick: _this.onImportButtonClick.bind(_assertThisInitialized(_this)), 'data-feature': dataFeature ? dataFeature.importFile : undefined, displayMode: 'dropdown', items: [{ label: t('ENUMERATION_WIDGET_ADD_FROM_FILE', { defaultValue: 'Add values from a file' }), id: 'append-uploading', onClick: _this.onImportAppendClick.bind(_assertThisInitialized(_this)), 'data-feature': dataFeature ? dataFeature.addFromFile : undefined }, { label: t('ENUMERATION_WIDGET_OVERWRITE_VALUES', { defaultValue: 'Overwrite existing values' }), id: 'overwrite-uploading', onClick: _this.onImportOverwriteClick.bind(_assertThisInitialized(_this)), 'data-feature': dataFeature ? dataFeature.overwriteExisting : undefined }] }); } _this.defaultHeaderActions.push({ label: t('ENUMERATION_WIDGET_ADD_ITEM', { defaultValue: 'Add item' }), icon: 'talend-plus', id: 'add', disabled: disabledAction, onClick: _this.changeDisplayToAddMode.bind(_assertThisInitialized(_this)) }); _this.selectedHeaderActions = [{ disabled: disabledAction, label: t('ENUMERATION_WIDGET_REMOVE_SELECTED_VALUES', { defaultValue: 'Remove selected values' }), icon: 'talend-trash', id: 'delete', onClick: _this.onDeleteItems.bind(_assertThisInitialized(_this)) }]; var defaultDisplayMode = enumerationStates.DISPLAY_MODE_DEFAULT; if (props.schema && props.schema.displayMode) { defaultDisplayMode = props.schema.displayMode; } _this.state = { inputRef: _this.setInputRef.bind(_assertThisInitialized(_this)), displayMode: defaultDisplayMode, searchCriteria: '', required: props.schema && props.schema.required || false, headerDefault: _this.defaultHeaderActions, headerSelected: _this.selectedHeaderActions, headerInput: _this.addInputs, items: (props.value || []).map(function (item) { return { id: item.id, values: item.values }; }), itemsProp: { key: 'values', getItemHeight: EnumerationForm.getItemHeight, onSubmitItem: _this.onSubmitItem.bind(_assertThisInitialized(_this)), onAbortItem: _this.onAbortItem.bind(_assertThisInitialized(_this)), onChangeItem: _this.onChangeItem.bind(_assertThisInitialized(_this)), onSelectItem: !disabledAction ? _this.onSelectItem.bind(_assertThisInitialized(_this)) : function () {}, onLoadData: _this.onLoadData.bind(_assertThisInitialized(_this)), actionsDefault: _this.defaultActions, actionsEdit: _this.itemEditActions }, onInputChange: _this.onInputChange.bind(_assertThisInitialized(_this)), onAddKeyDown: _this.onAddKeyDown.bind(_assertThisInitialized(_this)) }; _this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this)); return _this; } _createClass(EnumerationForm, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (nextProps.value) { this.setState(function (prevState) { return _objectSpread(_objectSpread({}, prevState), {}, { items: nextProps.value }); }); } } }, { key: "onBlur", value: function onBlur(event) { var _this$props = this.props, schema = _this$props.schema, onFinish = _this$props.onFinish; onFinish(event, { schema: schema }); } }, { key: "onChange", value: function onChange(event, payload) { var _this$props2 = this.props, schema = _this$props2.schema, onFinish = _this$props2.onFinish, onChange = _this$props2.onChange; onChange(event, payload); onFinish(event, { schema: schema }); } }, { key: "onImportAppendClick", value: function onImportAppendClick() { this.setState(function (state) { return _objectSpread(_objectSpread({}, state), {}, { importMode: enumerationStates.IMPORT_MODE_APPEND }); }, this.simulateClickInputFile.bind(this)); } }, { key: "onImportOverwriteClick", value: function onImportOverwriteClick() { this.setState(function (state) { return _objectSpread(_objectSpread({}, state), {}, { importMode: enumerationStates.IMPORT_MODE_OVERWRITE }); }, this.simulateClickInputFile.bind(this)); } // default mode }, { key: "onEnterEditModeItem", value: function onEnterEditModeItem(event, value) { var _this2 = this; this.setState(function (prevState) { var items = (0, _utils.resetItems)(_toConsumableArray(prevState.items)); var item = items[value.index]; // if there is a search criteria, retrieve correct item from state in non-connected mode if (prevState.searchCriteria && !_this2.isConnectedMode()) { item = _this2.getItemInSearchMode(prevState.searchCriteria, value.index, items); } item.displayMode = enumerationStates.DISPLAY_MODE_EDIT; // resetting errors items[value.index].error = ''; // reset selection items = items.map(function (currentItem) { return _objectSpread(_objectSpread({}, currentItem), {}, { isSelected: false }); }); // exit from selected mode to not display 0 values selected var displayMode = prevState.displayMode; if (displayMode === enumerationStates.DISPLAY_MODE_SELECTED) { displayMode = enumerationStates.DISPLAY_MODE_DEFAULT; } var validation = EnumerationForm.updateItemValidateDisabled(item.values[0]); return _objectSpread({ items: items, displayMode: displayMode }, validation); }); } }, { key: "onSearchEditModeItem", value: function onSearchEditModeItem(event, value) { this.setState(function (prevState) { var items = (0, _utils.resetItems)(_toConsumableArray(prevState.items)); var item = items[value.index]; item.displayMode = enumerationStates.DISPLAY_MODE_EDIT; // reset selection items = items.map(function (currentItem) { return _objectSpread(_objectSpread({}, currentItem), {}, { isSelected: false }); }); var validation = EnumerationForm.updateItemValidateDisabled(item.values[0]); return _objectSpread({ items: items, displayMode: enumerationStates.DISPLAY_MODE_EDIT }, validation); }); } }, { key: "onDeleteItem", value: function onDeleteItem(event, value) { var _this3 = this; // dont want to fire select item on icon click event.stopPropagation(); var schema = this.props.schema; if (this.isConnectedMode()) { // loading this.setState(function (prevState) { return { itemsProp: _objectSpread(_objectSpread({}, prevState.itemsProp), {}, { actionsDefault: _this3.loadingInputsActions }) }; }); this.props.onTrigger(event, { trigger: { ids: [this.state.items[value.index].id], action: ENUMERATION_REMOVE_ACTION }, schema: schema }).then(function () { var payload = { schema: schema, value: _this3.state.items.filter(function (item, index) { return index !== value.index; }) }; _this3.onChange(event, payload); })["finally"](function () { _this3.onDeleteItemHandler(); }); } else { this.setState(function (prevState) { var items = (0, _utils.resetItems)(_toConsumableArray(prevState.items)); var indexToRemove = value.index; var sc = prevState.searchCriteria; if (sc) { // retrieve correct item when in non-connected mode indexToRemove = _this3.getIndexToRemoveInSearchMode(sc, value.index, items); } items[indexToRemove].displayMode = enumerationStates.DISPLAY_MODE_DEFAULT; items.splice(indexToRemove, 1); var countItems = items.filter(function (item) { return item.isSelected; }).length; var displayMode = prevState.displayMode; if (countItems === 0 && displayMode === enumerationStates.DISPLAY_MODE_SELECTED) { displayMode = enumerationStates.DISPLAY_MODE_DEFAULT; } var payload = { schema: schema, value: items }; _this3.onChange(event, payload); return { displayMode: displayMode }; }); } } }, { key: "onDeleteItemHandler", value: function onDeleteItemHandler() { var _this4 = this; this.setState(function (prevState) { var newState = { itemsProp: _objectSpread(_objectSpread({}, prevState.itemsProp), {}, { actionsDefault: _this4.defaultActions }) }; if (prevState.displayMode !== enumerationStates.DISPLAY_MODE_SEARCH) { newState.displayMode = enumerationStates.DISPLAY_MODE_DEFAULT; } return newState; }); } }, { key: "onAbortItem", value: function onAbortItem(event, value) { this.setState(function (prevState) { var items = _toConsumableArray(prevState.items); items[value.index].displayMode = enumerationStates.DISPLAY_MODE_DEFAULT; // resetting error as it was not saved items[value.index].error = ''; return { items: items, displayMode: enumerationStates.DISPLAY_MODE_DEFAULT }; }); } }, { key: "onChangeItem", value: function onChangeItem(event, value) { var _this5 = this; var t = this.props.t; // if the value exist add an error this.setState(function (prevState) { var valueExist = _this5.valueAlreadyExist(value.value, prevState); var items = _toConsumableArray(prevState.items); items[value.index].error = ''; if (valueExist) { items[value.index].error = t('ENUMERATION_WIDGET_DUPLICATION_ERROR', { defaultValue: 'This term is already in the list' }); } var validation = EnumerationForm.updateItemValidateDisabled(value, valueExist); return _objectSpread({ items: items }, validation); }); } }, { key: "onSubmitItem", value: function onSubmitItem(event, value) { var _this6 = this; // dont want to fire select item on icon click event.preventDefault(); event.stopPropagation(); var schema = this.props.schema; if (this.isConnectedMode()) { this.setState(function (prevState) { return { itemsProp: _objectSpread(_objectSpread({}, prevState.itemsProp), {}, { actionsEdit: _this6.loadingInputsActions }) }; }); var formattedValue = EnumerationForm.parseStringValueToArray(value.value); this.props.onTrigger(event, { trigger: { id: this.state.items[value.index].id, index: value.index, value: formattedValue, action: ENUMERATION_RENAME_ACTION }, schema: schema }).then(function () { var payload = { schema: schema, value: _this6.state.items.map(function (item, index) { if (index === value.index) { return _objectSpread(_objectSpread({}, item), {}, { values: formattedValue }); } return item; }) }; _this6.onChange(event, payload); })["finally"](function () { _this6.itemSubmitHandler(); }); } else { var items = _toConsumableArray(this.state.items); var item = items[value.index]; if (this.state.searchCriteria) { // retrieve correct item when in non-connected mode item = this.getItemInSearchMode(this.state.searchCriteria, value.index, items); } item.displayMode = enumerationStates.DISPLAY_MODE_DEFAULT; var valueExist = this.valueAlreadyExist(value.value, this.state); // if the value is empty, no value update is done if (value.value && !valueExist) { item.values = EnumerationForm.parseStringValueToArray(value.value); } if (valueExist) { item.error = this.props.t('ENUMERATION_WIDGET_DUPLICATION_ERROR', { defaultValue: 'This term is already in the list' }); } var payload = { schema: schema, value: items }; this.onChange(event, payload); } } }, { key: "onInputChange", value: function onInputChange(event, value) { var _this7 = this; if (this.state.displayMode === enumerationStates.DISPLAY_MODE_ADD) { this.updateHeaderInputDisabled(value.value); } if (this.state.displayMode === enumerationStates.DISPLAY_MODE_SEARCH) { if (this.timerSearch !== null) { clearTimeout(this.timerSearch); } this.timerSearch = setTimeout(function () { var schema = _this7.props.schema; _this7.timerSearch = null; if (_this7.isConnectedMode()) { _this7.setState({ headerInput: _this7.loadingInputsActions }); _this7.props.onTrigger(event, { trigger: { value: value.value, action: ENUMERATION_SEARCH_ACTION }, schema: schema }).then(function (items) { var payload = { schema: schema, value: items.map(function (item) { return { id: item.id, values: item.values }; }) }; _this7.onChange(event, payload); _this7.onSearchHandler(value.value); }); } else { _this7.setState({ searchCriteria: value.value }); } }, 400); } } }, { key: "onLazyHandler", value: function onLazyHandler() { var headerActions; if (this.state.searchCriteria) { headerActions = this.searchInputsActions; } else { headerActions = this.defaultHeaderActions; } this.setState({ headerDefault: this.defaultHeaderActions, headerInput: headerActions }); } }, { key: "onSearchHandler", value: function onSearchHandler(value) { var _this8 = this; this.setState(function (prevState) { return { headerInput: _this8.searchInputsActions, searchCriteria: value, // since onSearchHandler() is processed asynchronously, // the line below is mandatory to refresh the items (highlight them) items: _toConsumableArray(prevState.items) }; }); } }, { key: "onAbortHandler", value: function onAbortHandler() { var _this9 = this; if (this.state.displayMode === enumerationStates.DISPLAY_MODE_ADD) { this.updateHeaderInputDisabled(''); } var schema = this.props.schema; if (this.isConnectedMode()) { this.setState({ headerDefault: this.loadingInputsActions }); this.props.onTrigger(event, { trigger: { value: '', action: ENUMERATION_SEARCH_ACTION }, schema: schema }).then(function (items) { var payload = { schema: schema, value: items.map(function (item) { return { id: item.id, values: item.values }; }) }; _this9.onChange(event, payload); _this9.onConnectedAbortHandler(); }); } else { this.onConnectedAbortHandler(); } } }, { key: "onConnectedAbortHandler", value: function onConnectedAbortHandler() { this.setState({ headerDefault: this.defaultHeaderActions, searchCriteria: null, displayMode: enumerationStates.DISPLAY_MODE_DEFAULT }); } }, { key: "onAddKeyDown", value: function onAddKeyDown(event, value) { if (event.keyCode === (0, _keycode["default"])('enter')) { event.stopPropagation(); event.preventDefault(); if (this.state.displayMode === enumerationStates.DISPLAY_MODE_ADD) { this.onValidateAndAddHandler(event, value); } } if (event.keyCode === (0, _keycode["default"])('escape')) { event.stopPropagation(); event.preventDefault(); this.onAbortHandler(); } } }, { key: "onSelectItem", value: function onSelectItem(item, event) { var _this10 = this; // needed to access to the original event in a asynchronous way // https://fb.me/react-event-pooling event.persist(); this.setState(function (prevState) { var itemsSelected = (0, _utils.resetItems)(_toConsumableArray(prevState.items)); if (event.ctrlKey || event.metaKey) { itemsSelected = (0, _utils.manageCtrlKey)(item.index, itemsSelected); } else if (event.shiftKey) { itemsSelected = (0, _utils.manageShiftKey)(item.index, itemsSelected); } else if (!itemsSelected[item.index].isSelected) { itemsSelected = itemsSelected.map(function (currentItem) { return _objectSpread(_objectSpread({}, currentItem), {}, { isSelected: false }); }); itemsSelected[item.index].isSelected = true; } else { // deselect the given items itemsSelected[item.index].isSelected = !itemsSelected[item.index].isSelected; } var countItems = itemsSelected.filter(function (currentItem) { return currentItem.isSelected; }).length; // if unselect all, return to default mode if (countItems === 0) { return { items: itemsSelected, displayMode: enumerationStates.DISPLAY_MODE_DEFAULT }; } return { items: itemsSelected, displayMode: enumerationStates.DISPLAY_MODE_SELECTED, itemsProp: _objectSpread(_objectSpread({}, prevState.itemsProp), {}, { actionsDefault: _this10.defaultActions }) }; }); } }, { key: "onDeleteItems", value: function onDeleteItems(event) { var _this11 = this; var schema = this.props.schema; var itemsToDelete = []; this.state.items.forEach(function (item) { if (item.isSelected) { itemsToDelete.push(item.id); } }); if (this.isConnectedMode()) { // loading this.setState({ headerSelected: this.loadingInputsActions }); this.props.onTrigger(event, { trigger: { ids: itemsToDelete, action: ENUMERATION_REMOVE_ACTION }, schema: schema }).then(function () { var payload = { schema: schema, value: _this11.state.items.filter(function (item) { return !item.isSelected; }) }; _this11.onChange(event, payload); _this11.onDeleteItemsHandler(); }); } else { this.setState(function (prevState) { var result = (0, _utils.deleteSelectedItems)(_toConsumableArray(prevState.items)); var payload = { schema: schema, value: result }; _this11.onChange(event, payload); return { displayMode: enumerationStates.DISPLAY_MODE_DEFAULT }; }); } } }, { key: "onDeleteItemsHandler", value: function onDeleteItemsHandler() { this.setState({ displayMode: enumerationStates.DISPLAY_MODE_DEFAULT, headerSelected: this.selectedHeaderActions }); } }, { key: "onAddHandler", value: function onAddHandler(event, value, successHandler, failHandler) { var _this12 = this; var isSingleAdd = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; var schema = this.props.schema; if (!value.value) { this.setState({ displayMode: enumerationStates.DISPLAY_MODE_DEFAULT }); return; } if (this.isConnectedMode()) { this.setState({ headerInput: this.loadingInputsActions }); this.props.onTrigger(event, { trigger: { value: EnumerationForm.parseStringValueToArray(value.value), action: ENUMERATION_ADD_ACTION }, schema: schema }).then(function (newDocument) { var payload = { schema: _this12.props.schema, value: _this12.props.value.concat(newDocument) }; _this12.onChange(event, payload); _this12.input.focus(); successHandler(); }, function () { failHandler(); }); } else if (!this.valueAlreadyExist(value.value, this.state)) { var payload = { schema: schema, value: this.state.items.concat([{ values: EnumerationForm.parseStringValueToArray(value.value) }]) }; this.onChange(event, payload); if (isSingleAdd) { successHandler(); } this.updateHeaderInputDisabled(''); } } }, { key: "onValidateAndAddHandler", value: function onValidateAndAddHandler(event, value) { this.onAddHandler(event, value, this.validateAndAddSuccessHandler.bind(this), this.addFailHandler.bind(this)); } }, { key: "onSingleAddHandler", value: function onSingleAddHandler(event, value) { this.onAddHandler(event, value, this.addSuccessHandler.bind(this), this.addFailHandler.bind(this), true); } // lazy loading }, { key: "onLoadData", value: function onLoadData() { var _this13 = this; if (this.isConnectedMode()) { var schema = this.props.schema; this.setState({ headerDefault: this.loadingInputsActions, headerInput: this.loadingInputsActions }); this.props.onTrigger(event, { trigger: { value: this.state.searchCriteria, action: ENUMERATION_NEXT_PAGE_ACTION, numberItems: this.state.items.length }, schema: schema }).then(function (items) { var payload = { schema: schema, value: _this13.props.value.concat(items.map(function (item) { return { id: item.id, values: item.values }; })) }; _this13.onChange(event, payload); })["finally"](function () { _this13.onLazyHandler(); }); } } }, { key: "onImportButtonClick", value: function onImportButtonClick() { if (this.state.items.length === 0) { this.setState(function (state) { return _objectSpread(_objectSpread({}, state), {}, { importMode: enumerationStates.IMPORT_MODE_APPEND }); }, this.simulateClickInputFile.bind(this)); } } }, { key: "setInputRef", value: function setInputRef(input) { this.input = input; } }, { key: "getItemSelectedInSearchMode", value: function getItemSelectedInSearchMode(searchCriteria, index) { var searchedItems = this.searchItems(searchCriteria); return searchedItems[index]; } }, { key: "getItemInSearchMode", value: function getItemInSearchMode(searchCriteria, index, items) { var selectedItem = this.getItemSelectedInSearchMode(searchCriteria, index); return items.find(function (currentItem) { return currentItem.values[0] === selectedItem.values[0]; }); } }, { key: "getIndexToRemoveInSearchMode", value: function getIndexToRemoveInSearchMode(searchCriteria, index, items) { var selectedItem = this.getItemSelectedInSearchMode(searchCriteria, index); return items.findIndex(function (currentItem) { return currentItem.values[0] === selectedItem.values[0]; }); } }, { key: "isConnectedMode", value: function isConnectedMode() { return !!(this.props.properties && this.props.properties.connectedMode); } }, { key: "itemSubmitHandler", value: function itemSubmitHandler() { var _this14 = this; this.setState(function (prevState) { return { itemsProp: _objectSpread(_objectSpread({}, prevState.itemsProp), {}, { actionsEdit: _this14.itemEditActions }), items: (0, _utils.resetItems)(_toConsumableArray(prevState.items)) }; }); } }, { key: "addSuccessHandler", value: function addSuccessHandler() { this.setState({ displayMode: enumerationStates.DISPLAY_MODE_DEFAULT }); } }, { key: "validateAndAddSuccessHandler", value: function validateAndAddSuccessHandler() { this.setState({ inputValue: '', headerInput: this.addInputs }); this.input.focus(); } }, { key: "addFailHandler", value: function addFailHandler() { this.setState({ headerInput: this.addInputs }); } /** * simulateClickInputFile - simulate the click on the hidden input * */ }, { key: "simulateClickInputFile", value: function simulateClickInputFile() { var _this15 = this; if (this.state.importMode) { // timeout to allow to lost the focus on the dropdown setTimeout(function () { _this15.inputFile.click(); // when we close the file dialog focus is still on the import icon. // The tooltip still appears. // we force to remove the current focus on the icon document.activeElement.blur(); }); } } /** * importFile - importFile * * @param {Event} event Event trigger when the user change the input file */ }, { key: "importFile", value: function importFile(event) { var _this16 = this; var schema = this.props.schema; if (this.isConnectedMode()) { this.setState({ headerDefault: this.loadingInputsActions }); return this.props.onTrigger(event, { trigger: { value: event.target.files[0], action: ENUMERATION_IMPORT_FILE_ACTION, importMode: this.state.importMode, label: this.props.properties.label }, schema: schema }).then(function (items) { if (!(0, _isEmpty2["default"])(items)) { var payload = { schema: schema, value: items.map(function (item) { return { id: item.id, values: item.values }; }) }; _this16.onChange(event, payload); } })["finally"](function () { _this16.resetInputFile(); _this16.importFileHandler(); }); } return Promise.resolve(); } }, { key: "resetInputFile", value: function resetInputFile() { // reinit the input file this.inputFile.value = ''; } /** * importFileHandler - Action after the upload * */ }, { key: "importFileHandler", value: function importFileHandler() { this.setState({ headerDefault: this.defaultHeaderActions, importMode: '' }); } }, { key: "searchItems", value: function searchItems(searchCriteria) { if (!searchCriteria) { return this.state.items; } var searchedItems = []; this.state.items.forEach(function (item) { if (item.values && item.values[0] && item.values[0].toLowerCase().includes(searchCriteria.toLowerCase())) { searchedItems.push(item); } }); return searchedItems; } }, { key: "changeDisplayToAddMode", value: function changeDisplayToAddMode() { var _this17 = this; this.setState(function (prevState) { return { items: (0, _utils.resetItems)(_toConsumableArray(prevState.items)), headerInput: _this17.addInputs, displayMode: enumerationStates.DISPLAY_MODE_ADD }; }); } }, { key: "changeDisplayToSearchMode", value: function changeDisplayToSearchMode() { var _this18 = this; this.setState(function (prevState) { return { items: (0, _utils.resetItems)(_toConsumableArray(prevState.items)), headerInput: _this18.searchInputsActions, displayMode: enumerationStates.DISPLAY_MODE_SEARCH }; }); } }, { key: "valueAlreadyExist", value: function valueAlreadyExist(value, state) { return !this.allowDuplicate && state.items.find(function (item) { return item.values[0] === value; }); } }, { key: "updateHeaderInputDisabled", value: function updateHeaderInputDisabled(value) { var _this19 = this; var t = this.props.t; this.setState(function (prevState) { // checking if the value already exist var valueExist = _this19.valueAlreadyExist(value, prevState); var _prevState$headerInpu = _slicedToArray(prevState.headerInput, 3), validateAndAddAction = _prevState$headerInpu[0], validateAction = _prevState$headerInpu[1], abortAction = _prevState$headerInpu[2]; // in this case, we could have the loading state that implied we have just one icon if (!validateAction && !abortAction) { // returning null in setState prevent re-rendering // see here for documentation https://reactjs.org/blog/2017/09/26/react-v16.0.html#breaking-changes return null; } validateAndAddAction.disabled = value === '' || valueExist; validateAction.disabled = value === '' || valueExist; var headerError = ''; if (valueExist) { headerError = t('ENUMERATION_WIDGET_DUPLICATION_ERROR', { defaultValue: 'This term is already in the list' }); } return { headerInput: [validateAndAddAction, validateAction, abortAction], headerError: headerError, inputValue: value }; }); } }, { key: "renderImportFile", value: function renderImportFile() { var _this20 = this; return /*#__PURE__*/_react["default"].createElement("input", { type: "file", ref: function ref(element) { _this20.inputFile = element; }, onChange: function onChange(event) { _this20.importFile(event); }, className: (0, _classnames["default"])('hidden') }); } }, { key: "render", value: function render() { var items = this.state.items; // filter items only in non-connected mode, since in connected mode items are up-to-date if (!this.isConnectedMode()) { items = this.searchItems(this.state.searchCriteria); } var stateToShow = _objectSpread(_objectSpread({}, this.state), {}, { items: items }); var _this$props$schema = this.props.schema, description = _this$props$schema.description, required = _this$props$schema.required, title = _this$props$schema.title; var _this$props3 = this.props, errorMessage = _this$props3.errorMessage, isValid = _this$props3.isValid; return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: description, label: title, required: required, isValid: isValid, errorMessage: errorMessage }, this.allowImport && this.renderImportFile(), /*#__PURE__*/_react["default"].createElement(_FocusManager["default"], { onFocusOut: this.onBlur }, /*#__PURE__*/_react["default"].createElement(_Enumeration["default"], stateToShow))); } }]); return EnumerationForm; }(_react["default"].Component); exports.EnumerationForm = EnumerationForm; if (process.env.NODE_ENV !== 'production') { EnumerationForm.propTypes = { errorMessage: _propTypes["default"].string, isValid: _propTypes["default"].bool, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, onTrigger: _propTypes["default"].func.isRequired, properties: _propTypes["default"].object, schema: _propTypes["default"].object, t: _propTypes["default"].func, value: _propTypes["default"].arrayOf(_propTypes["default"].shape({ id: _propTypes["default"].string, values: _propTypes["default"].arrayOf(_propTypes["default"].string) })) }; } EnumerationForm.defaultProps = { t: (0, _translate["default"])() }; var _default = (0, _reactI18next.withTranslation)(_constants.I18N_DOMAIN_FORMS)(EnumerationForm); exports["default"] = _default; //# sourceMappingURL=EnumerationWidget.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4144 */ /***/ (function(module, exports, __webpack_require__) { var baseKeys = __webpack_require__(1612), getTag = __webpack_require__(550), isArguments = __webpack_require__(548), isArray = __webpack_require__(173), isArrayLike = __webpack_require__(894), isBuffer = __webpack_require__(890), isPrototype = __webpack_require__(549), isTypedArray = __webpack_require__(1611); /** `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; /***/ }), /* 4145 */ /***/ (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 /***/ }), /* 4146 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _File = _interopRequireDefault(__webpack_require__(4147)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _File["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4147 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.FileWidget = exports.PRESIGNED_URL_TRIGGER_ACTION = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _reactI18next = __webpack_require__(10); var _noop = _interopRequireDefault(__webpack_require__(4148)); var _Skeleton = _interopRequireDefault(__webpack_require__(77)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); var _properties = __webpack_require__(96); var _constants = __webpack_require__(73); var _File = _interopRequireDefault(__webpack_require__(4149)); 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 _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 PRESIGNED_URL_TRIGGER_ACTION = 'generatePresignedURL'; exports.PRESIGNED_URL_TRIGGER_ACTION = PRESIGNED_URL_TRIGGER_ACTION; var BASE64_NAME = ';name='; var BASE64_PREFIX = ';base64,'; /** * Extract the file name from the value * @param {string} value The base64 value of the file. * Looks like `data:text/xml;name=test.xml;base64,PD94bWwgdmVyc2l...` * @param {Object} schema The widget schema to get triggers. * @returns {string} The file name, for example: `test.xml`. */ function getFileName(value, schema) { if (value && value.indexOf(BASE64_NAME) !== -1) { return value.slice(value.indexOf(BASE64_NAME) + BASE64_NAME.length, value.indexOf(BASE64_PREFIX)); } if (value && schema && schema.triggers) { var uploadTrigger = schema.triggers.find(function (trigger) { return trigger.action === PRESIGNED_URL_TRIGGER_ACTION; }); if (uploadTrigger) { return atob(value.split('.')[1]); } } return value; } /** * Add the file name to the data url. * @param {string} value The base64 value of the file. * Looks like `data:text/xml;base64,PD94bWwgdmVyc2l...` * @param {string} fileName The file name, for exemple `test.xml`. * @returns {(string|undefined)} the base 64 encoding of the file with the file name within. * Looks like `data:text/xml;name=test.xml;base64,PD94bWwgdmVyc2l...` * Or undefined if value is undefined. */ function getBase64(value, fileName) { if (value && value.indexOf(BASE64_NAME) === -1) { var fileNamePos = value.indexOf(BASE64_PREFIX); if (fileNamePos !== -1) { return [value.slice(0, fileNamePos), BASE64_NAME, fileName, value.slice(fileNamePos)].join(''); } } return value; } var FileWidget = /*#__PURE__*/function (_React$Component) { _inherits(FileWidget, _React$Component); var _super = _createSuper(FileWidget); _createClass(FileWidget, null, [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps, prevState) { var schema = nextProps.schema, value = nextProps.value; var fileName = getFileName(value, schema); if (prevState.fileName !== fileName) { // Update file name if file is changed return { fileName: fileName }; } return null; } }]); function FileWidget(props) { var _this; _classCallCheck(this, FileWidget); _this = _super.call(this, props); _this.onChange = _this.onChange.bind(_assertThisInitialized(_this)); // Extract file name from form properties _this.state = { fileName: getFileName(props.value), loading: false }; return _this; } _createClass(FileWidget, [{ key: "onChange", value: function onChange(event) { var _this2 = this; event.persist(); var fileList = event.target.files; if (fileList.length > 0) { var file = fileList[0]; var _this$props = this.props, onTrigger = _this$props.onTrigger, schema = _this$props.schema; if (schema.triggers && schema.triggers.some(function (trigger) { return trigger.action === PRESIGNED_URL_TRIGGER_ACTION; })) { this.setState({ loading: true }); Promise.all(schema.triggers.map(function (trigger) { if (trigger.action === PRESIGNED_URL_TRIGGER_ACTION && trigger.onEvent === 'change') { return onTrigger(event, { trigger: trigger, schema: schema }); } return Promise.resolve(); }))["finally"](function () { return _this2.setState({ loading: false }); }); } else { var reader = new FileReader(); reader.onload = function () { var data = getBase64(reader.result, file.name); _this2.updateFileData(event, data, file.name); }; reader.readAsDataURL(file); } } else { this.updateFileData(event, '', ''); } } /** * call onChange and update value * @param {Event} event The event * @param {String} data The base 64 representation of the file * @param {String} fileName The file name to add in the form field */ }, { key: "updateFileData", value: function updateFileData(event, data, fileName) { var schema = this.props.schema; this.props.onChange(event, { schema: schema, value: data }); this.setState({ fileName: fileName }); } }, { key: "render", value: function render() { var _this$props2 = this.props, id = _this$props2.id, isValid = _this$props2.isValid, errorMessage = _this$props2.errorMessage, onFinish = _this$props2.onFinish, schema = _this$props2.schema, valueIsUpdating = _this$props2.valueIsUpdating; var accept = schema.accept, autoFocus = schema.autoFocus, description = schema.description, _schema$disabled = schema.disabled, disabled = _schema$disabled === void 0 ? false : _schema$disabled, placeholder = schema.placeholder, _schema$readOnly = schema.readOnly, readOnly = _schema$readOnly === void 0 ? false : _schema$readOnly, title = schema.title, required = schema.required; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: description, descriptionId: descriptionId, errorId: errorId, errorMessage: errorMessage, id: id, isValid: isValid, label: title, labelAfter: false, required: required, valueIsUpdating: valueIsUpdating }, /*#__PURE__*/_react["default"].createElement("div", { className: _File["default"].file }, this.state.loading && /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], { className: _File["default"]['file-skeleton'], type: _Skeleton["default"].TYPES.text, size: _Skeleton["default"].SIZES.xlarge }), !this.state.loading && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("input", { id: "input-".concat(id), accept: accept, autoFocus: autoFocus, className: "form-control ".concat(_File["default"]['file-input']), disabled: disabled || valueIsUpdating, onBlur: function onBlur(event) { return onFinish(event, { schema: schema }); }, onChange: this.onChange, placeholder: placeholder, readOnly: readOnly, type: "file" // eslint-disable-next-line jsx-a11y/aria-proptypes , "aria-invalid": !isValid, "aria-required": schema.required, "aria-describedby": "".concat(descriptionId, " ").concat(errorId) }), /*#__PURE__*/_react["default"].createElement("input", _extends({ name: "input-filename-".concat(id), className: "form-control ".concat(_File["default"]['file-replace']), value: this.state.fileName, onChange: _noop["default"], type: "text", placeholder: placeholder, tabIndex: "-1", autoComplete: "off" }, (0, _properties.extractDataAttributes)(schema)))))); } }]); return FileWidget; }(_react["default"].Component); exports.FileWidget = FileWidget; if (process.env.NODE_ENV !== 'production') { FileWidget.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, onTrigger: _propTypes["default"].func, required: _propTypes["default"].bool, schema: _propTypes["default"].shape({ accept: _propTypes["default"].string, autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, placeholder: _propTypes["default"].string, readOnly: _propTypes["default"].bool, required: _propTypes["default"].bool, title: _propTypes["default"].string, type: _propTypes["default"].string, triggers: _propTypes["default"].arrayOf(_propTypes["default"].object) }), value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]), valueIsUpdating: _propTypes["default"].bool }; } FileWidget.defaultProps = { isValid: true, schema: {} }; var _default = (0, _reactI18next.withTranslation)(_constants.I18N_DOMAIN_FORMS)(FileWidget); exports["default"] = _default; //# sourceMappingURL=File.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4148 */ /***/ (function(module, exports) { /** * This method returns `undefined`. * * @static * @memberOf _ * @since 2.3.0 * @category Util * @example * * _.times(2, _.noop); * // => [undefined, undefined] */ function noop() { // No operation performed. } module.exports = noop; /***/ }), /* 4149 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"file":"File__file___1d9dM","file-skeleton":"File__file-skeleton___1yIso","file-input":"File__file-input___aE5hR","file-replace":"File__file-replace___1joic"}; /***/ }), /* 4150 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _KeyValue = _interopRequireDefault(__webpack_require__(4151)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _KeyValue["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4151 */ /***/ (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 _last = _interopRequireDefault(__webpack_require__(900)); var _Widget = _interopRequireDefault(__webpack_require__(153)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _KeyValue = _interopRequireDefault(__webpack_require__(4152)); 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; } /** * Default part (key or value) schema */ var defaultPartSchema = { schema: { type: 'string' }, type: 'text' }; /** * Adapt part (key or value) schema * @param parentSchema The KeyValue schema * @param part 'key' or 'value' */ function getPartSchema(parentSchema, part) { var childKey = parentSchema.key.concat(part); var childrenSchemas = parentSchema.items || []; var childSchema = childrenSchemas.find(function (item) { return (0, _last["default"])(item.key) === part; }); if (!childSchema) { childSchema = {}; } return _objectSpread(_objectSpread(_objectSpread({}, defaultPartSchema), childSchema), {}, { key: childKey, autoFocus: parentSchema.autoFocus || childSchema.autoFocus, disabled: parentSchema.disabled || childSchema.disabled, readOnly: parentSchema.readOnly || childSchema.readOnly }); } function KeyValue(_ref) { var id = _ref.id, isValid = _ref.isValid, errorMessage = _ref.errorMessage, onChange = _ref.onChange, onFinish = _ref.onFinish, schema = _ref.schema, value = _ref.value, valueIsUpdating = _ref.valueIsUpdating, restProps = _objectWithoutProperties(_ref, ["id", "isValid", "errorMessage", "onChange", "onFinish", "schema", "value", "valueIsUpdating"]); var description = schema.description, title = schema.title; var keySchema = getPartSchema(schema, 'key'); var valueSchema = getPartSchema(schema, 'value'); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: description, errorMessage: errorMessage, id: id, isValid: isValid, label: title, required: schema.required, valueIsUpdating: valueIsUpdating }, /*#__PURE__*/_react["default"].createElement("dl", { className: _KeyValue["default"]['key-value'] }, /*#__PURE__*/_react["default"].createElement("dt", null, /*#__PURE__*/_react["default"].createElement(_Widget["default"], _extends({}, restProps, { onChange: onChange, onFinish: onFinish, schema: keySchema, value: value.key }))), /*#__PURE__*/_react["default"].createElement("dd", null, /*#__PURE__*/_react["default"].createElement(_Widget["default"], _extends({}, restProps, { onChange: onChange, onFinish: onFinish, schema: valueSchema, value: value.value }))))); } KeyValue.defaultProps = { value: {} }; if (process.env.NODE_ENV !== 'production') { KeyValue.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, key: _propTypes["default"].arrayOf(_propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number])), items: _propTypes["default"].array, readOnly: _propTypes["default"].bool, required: _propTypes["default"].bool, title: _propTypes["default"].string }), value: _propTypes["default"].shape({ key: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]), value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]) }), valueIsUpdating: _propTypes["default"].bool }; } var _default = KeyValue; exports["default"] = _default; //# sourceMappingURL=KeyValue.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4152 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"key-value":"KeyValue__key-value___12i8L"}; /***/ }), /* 4153 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "TextModeComparator", { enumerable: true, get: function get() { return _TextMode["default"]; } }); exports["default"] = void 0; var _Comparator = _interopRequireDefault(__webpack_require__(1632)); var _TextMode = _interopRequireDefault(__webpack_require__(4157)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Comparator["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4154 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = Text; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _get = _interopRequireDefault(__webpack_require__(208)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); var _properties = __webpack_require__(96); 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 Text(props) { var id = props.id, isValid = props.isValid, errorMessage = props.errorMessage, _onChange = props.onChange, onFinish = props.onFinish, schema = props.schema, value = props.value, valueIsUpdating = props.valueIsUpdating; var autoComplete = schema.autoComplete, autoFocus = schema.autoFocus, description = schema.description, _schema$disabled = schema.disabled, disabled = _schema$disabled === void 0 ? false : _schema$disabled, placeholder = schema.placeholder, _schema$readOnly = schema.readOnly, readOnly = _schema$readOnly === void 0 ? false : _schema$readOnly, title = schema.title, type = schema.type, rest = _objectWithoutProperties(schema, ["autoComplete", "autoFocus", "description", "disabled", "placeholder", "readOnly", "title", "type"]); if (type === 'hidden') { return /*#__PURE__*/_react["default"].createElement("input", { id: id, type: type, value: value }); } var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { hint: schema.hint, className: schema.className, description: description, descriptionId: descriptionId, errorId: errorId, errorMessage: errorMessage, id: id, isValid: isValid, label: title, labelAfter: true, required: schema.required, valueIsUpdating: valueIsUpdating }, /*#__PURE__*/_react["default"].createElement("input", _extends({ id: id, autoComplete: autoComplete, autoFocus: autoFocus, className: "form-control", disabled: disabled || valueIsUpdating, onBlur: function onBlur(event) { return onFinish(event, { schema: schema }); }, onChange: function onChange(event) { return _onChange(event, { schema: schema, value: (0, _properties.convertValue)(type, event.target.value) }); }, placeholder: placeholder, readOnly: readOnly, type: type, value: value, min: (0, _get["default"])(schema, 'schema.minimum'), max: (0, _get["default"])(schema, 'schema.maximum'), step: (0, _get["default"])(schema, 'schema.step') // eslint-disable-next-line jsx-a11y/aria-proptypes , "aria-invalid": !isValid, "aria-required": (0, _get["default"])(schema, 'required'), "aria-describedby": "".concat(descriptionId, " ").concat(errorId) }, (0, _properties.extractDataAttributes)(rest)))); } if (process.env.NODE_ENV !== 'production') { Text.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ className: _propTypes["default"].string, autoComplete: _propTypes["default"].string, autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, placeholder: _propTypes["default"].string, readOnly: _propTypes["default"].bool, required: _propTypes["default"].bool, title: _propTypes["default"].string, hint: _propTypes["default"].shape({ icon: _propTypes["default"].string, className: _propTypes["default"].string, overlayComponent: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].string]).isRequired, overlayPlacement: _propTypes["default"].string }), type: _propTypes["default"].string, schema: _propTypes["default"].object }), value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]), valueIsUpdating: _propTypes["default"].bool }; } Text.defaultProps = { isValid: true, schema: {}, value: '' }; //# sourceMappingURL=Text.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4155 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = TextMode; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _FieldTemplate = __webpack_require__(43); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function TextMode(props) { var id = props.id, schema = props.schema, value = props.value; var title = schema.title, type = schema.type; return /*#__PURE__*/_react["default"].createElement(_FieldTemplate.TextMode, { id: id, label: title }, type === 'password' && value ? '**********' : value); } if (process.env.NODE_ENV !== 'production') { TextMode.propTypes = { id: _propTypes["default"].string, schema: _propTypes["default"].shape({ title: _propTypes["default"].string, type: _propTypes["default"].string }), value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]) }; } TextMode.defaultProps = { schema: {}, value: '' }; //# sourceMappingURL=TextMode.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4156 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"comparator":"Comparator__comparator___3C9eT","operator":"Comparator__operator___1TGK8","selected":"Comparator__selected___Be5Jw","symbol":"Comparator__symbol____q1cs","name":"Comparator__name___1W47S"}; /***/ }), /* 4157 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = TextMode; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _Icon = _interopRequireDefault(__webpack_require__(19)); var _Comparator = __webpack_require__(1632); var _FieldTemplate = __webpack_require__(43); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function TextMode(props) { var id = props.id, schema = props.schema, value = props.value; var iconName = _Comparator.ICONS_MAPPING[value.operator]; return /*#__PURE__*/_react["default"].createElement(_FieldTemplate.TextMode, { id: id, label: schema.title }, iconName && /*#__PURE__*/_react["default"].createElement(_Icon["default"], { name: iconName }), !iconName && value.operator, "".concat(value.operator ? ' ' : '').concat(value.value || '')); } if (process.env.NODE_ENV !== 'production') { TextMode.propTypes = { id: _propTypes["default"].string, schema: _propTypes["default"].shape({ title: _propTypes["default"].string }), value: _propTypes["default"].shape({ operator: _propTypes["default"].string, value: _propTypes["default"].string }) }; } TextMode.defaultProps = { schema: {}, value: { operator: '', value: '' } }; //# sourceMappingURL=TextMode.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4158 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ListView = _interopRequireDefault(__webpack_require__(4159)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _ListView["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4159 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.ListViewWidget = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _keycode = _interopRequireDefault(__webpack_require__(34)); var _ListView = _interopRequireDefault(__webpack_require__(499)); var _reactI18next = __webpack_require__(10); var _constants = __webpack_require__(73); var _translate = _interopRequireDefault(__webpack_require__(116)); var _ListView2 = __webpack_require__(4160); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); 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 _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); } var DISPLAY_MODE_DEFAULT = 'DISPLAY_MODE_DEFAULT'; var DISPLAY_MODE_SEARCH = 'DISPLAY_MODE_SEARCH'; var DEFAULT_ITEM_HEIGHT = 33; var ListViewWidget = /*#__PURE__*/function (_React$Component) { _inherits(ListViewWidget, _React$Component); var _super = _createSuper(ListViewWidget); function ListViewWidget(props) { var _this; _classCallCheck(this, ListViewWidget); _this = _super.call(this, props); var t = props.t; _this.defaultHeaderActions = [{ id: "".concat(props.id, "-search"), icon: 'talend-search', label: t('LISTVIEW_WIDGET_SEARCH', { defaultValue: 'Search for specific values' }), onClick: _this.switchToSearchMode.bind(_assertThisInitialized(_this)) }]; _this.defaultSearchHeaderActions = [{ id: 'abort', icon: 'talend-cross', label: t('LISTVIEW_WIDGET_ABORT', { defaultValue: 'Abort' }), onClick: _this.switchToDefaultMode.bind(_assertThisInitialized(_this)) }]; _this.state = _objectSpread(_objectSpread({}, (0, _ListView2.initItems)(props.schema, props.value, null, _this.onToggleItem.bind(_assertThisInitialized(_this)))), {}, { getItemHeight: function getItemHeight() { return DEFAULT_ITEM_HEIGHT; }, headerDefault: _this.defaultHeaderActions, onAddKeyDown: _this.onInputKeyDown.bind(_assertThisInitialized(_this)), onInputChange: _this.onInputChange.bind(_assertThisInitialized(_this)), onToggleAll: _this.onToggleAll.bind(_assertThisInitialized(_this)) }); return _this; } /** * On new schema : we redefine the items * On new value : we update the check status * @param { Object } schema The new mergedSchema * @param { Array } value The new value */ _createClass(ListViewWidget, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(_ref) { var _this2 = this; var schema = _ref.schema, value = _ref.value; if (schema !== this.props.schema) { this.setState(function (oldState) { return (0, _ListView2.initItems)(schema, value, oldState.searchCriteria, _this2.onToggleItem.bind(_this2)); }); } else if (value !== this.props.value) { this.setState(function (oldState) { return (0, _ListView2.updateItems)(oldState.items, value, oldState.searchCriteria); }); } } /** * Propagate a ListView value change * @param { Object } event The event that triggered the change * @param { Array } newValue The new Value */ }, { key: "onChange", value: function onChange(event, newValue) { var value = newValue.length ? newValue : undefined; var payload = { schema: this.props.schema, value: value }; this.props.onChange(event, payload); this.props.onFinish(event, payload); } /** * Search input change * @param { Object } event The change event * @param { Array } value */ }, { key: "onInputChange", value: function onInputChange(event, _ref2) { var _this3 = this; var value = _ref2.value; clearTimeout(this.timerSearch); this.timerSearch = setTimeout(function () { _this3.setState(function (oldState) { return (0, _ListView2.getItemsProps)(oldState.items, value); }); }, 400); } /** * Search input ENTER/ESC management * @param { Object } event The keydown event */ }, { key: "onInputKeyDown", value: function onInputKeyDown(event) { if (event.keyCode === (0, _keycode["default"])('enter')) { event.stopPropagation(); event.preventDefault(); } else if (event.keyCode === (0, _keycode["default"])('escape')) { clearTimeout(this.timerSearch); event.stopPropagation(); event.preventDefault(); this.switchToDefaultMode(); } } /** * Toggle an item * @param { Object } event The toggle event * @param { Object } changedItem The item to toggle */ }, { key: "onToggleItem", value: function onToggleItem(event, changedItem) { var value = this.state.items.filter(function (item) { if (changedItem === item) { return !item.checked; } return item.checked; }).map(function (item) { return item.value; }); this.onChange(event, value); } /** * Toggle all displayed items * - Filtered items : toggle only the displayed items * - No filter : toggle all items * @param { Object } event the toggle event */ }, { key: "onToggleAll", value: function onToggleAll(event) { var _this4 = this; var checkedItems; if (this.state.searchCriteria && this.state.toggleAllChecked) { // User uncheck with filter : we remove filtered items from checked list checkedItems = this.state.items.filter(function (item) { return item.checked && !_this4.state.displayedItems.includes(item); }); } else if (this.state.searchCriteria && !this.state.toggleAllChecked) { // User check with filter : we add filtered items in checked list checkedItems = this.state.items.filter(function (item) { return item.checked || _this4.state.displayedItems.includes(item); }); } else if (this.state.toggleAllChecked) { // User uncheck all items checkedItems = []; } else { // User check all items checkedItems = this.state.items; } this.onChange(event, checkedItems.map(function (item) { return item.value; })); } /** * Switch header to search mode */ }, { key: "switchToSearchMode", value: function switchToSearchMode() { this.setState({ headerInput: this.defaultSearchHeaderActions, displayMode: DISPLAY_MODE_SEARCH }); } /** * Switch header to default mode. * Reset display to no filter */ }, { key: "switchToDefaultMode", value: function switchToDefaultMode() { var _this5 = this; this.setState(function (oldState) { return _objectSpread(_objectSpread({}, (0, _ListView2.getItemsProps)(oldState.items)), {}, { headerInput: _this5.defaultHeaderActions, displayMode: DISPLAY_MODE_DEFAULT }); }); } }, { key: "render", value: function render() { var descriptionId = (0, _generateId.generateDescriptionId)(this.props.id); var errorId = (0, _generateId.generateErrorId)(this.props.id); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: this.props.schema.description, descriptionId: descriptionId, errorId: errorId, errorMessage: this.props.errorMessage, id: this.props.id, isValid: this.props.isValid, required: this.props.schema.required, valueIsUpdating: this.props.valueIsUpdating }, /*#__PURE__*/_react["default"].createElement(_ListView["default"], _extends({}, this.state, { id: this.props.id, items: this.state.displayedItems, t: this.props.t, containerProps: { 'aria-describedby': "".concat(descriptionId, " ").concat(errorId) } }))); } }]); return ListViewWidget; }(_react["default"].Component); exports.ListViewWidget = ListViewWidget; ListViewWidget.defaultProps = { value: [], t: (0, _translate["default"])() }; if (process.env.NODE_ENV !== 'production') { ListViewWidget.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ description: _propTypes["default"].string, disabled: _propTypes["default"].bool, placeholder: _propTypes["default"].string, required: _propTypes["default"].bool, title: _propTypes["default"].string, titleMap: _propTypes["default"].arrayOf(_propTypes["default"].shape({ name: _propTypes["default"].string.isRequired, value: _propTypes["default"].string.isRequired })) }), value: _propTypes["default"].arrayOf(_propTypes["default"].string), valueIsUpdating: _propTypes["default"].bool, t: _propTypes["default"].func }; } var _default = (0, _reactI18next.withTranslation)(_constants.I18N_DOMAIN_FORMS)(ListViewWidget); exports["default"] = _default; //# sourceMappingURL=ListView.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4160 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getItemsProps = getItemsProps; exports.initItems = initItems; exports.updateItems = updateItems; 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; } /** * Define * - the displayed items from all items and filter criteria * - the toggleAll status from displayed items checked status * @param { Array } items All the items * @param { string } searchCriteria The filter criteria * @returns { Object } The items related state */ function getItemsProps(items, searchCriteria) { var displayedItems = searchCriteria ? items.filter(function (item) { return item.label.toLowerCase().includes(searchCriteria.toLowerCase()); }) : items; var toggleAllChecked = displayedItems.every(function (item) { return item.checked; }); return { displayedItems: displayedItems, items: items, searchCriteria: searchCriteria, toggleAllChecked: toggleAllChecked }; } /** * Define the items from schema, and init the items related state * @param { Object } schema The merged schema * @param { Array } value the listView value * @param { string } searchCriteria The filter criteria * @param { function } onChange The toggle callback * @returns { Object } The items related state */ function initItems(schema, value, searchCriteria, onChange) { var items = schema.titleMap.map(function (option, index) { return { checked: value.indexOf(option.value) !== -1, index: index, label: option.name, onChange: onChange, value: option.value }; }); return _objectSpread(_objectSpread({}, getItemsProps(items, searchCriteria)), {}, { emptyLabel: schema.emptyLabel, headerLabel: schema.title, noResultLabel: schema.noResultLabel, required: schema.required, searchPlaceholder: schema.placeholder }); } /** * Update the check status of the list items * @param { Array } items The listView items * @param { Array } value The listView value * @param { string } searchCriteria The filter criteria * @returns { Object } The items related state */ function updateItems(items, value, searchCriteria) { function updateChecked(item) { var checked = value.includes(item.value); if (item.checked !== checked) { return _objectSpread(_objectSpread({}, item), {}, { checked: checked }); } return item; } var newItems = items.map(updateChecked); return getItemsProps(newItems, searchCriteria); } //# sourceMappingURL=ListView.utils.js.map /***/ }), /* 4161 */ /***/ (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 _keycode = _interopRequireDefault(__webpack_require__(34)); var _get = _interopRequireDefault(__webpack_require__(208)); var _Typeahead = _interopRequireDefault(__webpack_require__(364)); var _Badge = _interopRequireDefault(__webpack_require__(191)); var _FocusManager = _interopRequireDefault(__webpack_require__(163)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); var _MultiSelectTag = _interopRequireDefault(__webpack_require__(4162)); var _trigger = _interopRequireDefault(__webpack_require__(396)); 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 escapeRegexCharacters(str) { return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } function getNewItemText(value) { return "".concat(value, " (new)"); } function getLabel(titleMap, value, defaultName) { var itemConf = titleMap.find(function (item) { return item.value === value; }); if (itemConf) { return itemConf.name; } return defaultName || value; } var MultiSelectTag = /*#__PURE__*/function (_React$Component) { _inherits(MultiSelectTag, _React$Component); var _super = _createSuper(MultiSelectTag); function MultiSelectTag(props) { var _this; _classCallCheck(this, MultiSelectTag); _this = _super.call(this, props); _this.state = { value: '' }; _this.theme = { container: _MultiSelectTag["default"].typeahead, itemsContainer: _MultiSelectTag["default"]['items-container'], itemsList: _MultiSelectTag["default"].items }; _this.onChange = _this.onChange.bind(_assertThisInitialized(_this)); _this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this)); _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this)); _this.onRemoveTag = _this.onRemoveTag.bind(_assertThisInitialized(_this)); _this.onAddTag = _this.onAddTag.bind(_assertThisInitialized(_this)); _this.onTrigger = _this.onTrigger.bind(_assertThisInitialized(_this)); _this.resetSuggestions = _this.resetSuggestions.bind(_assertThisInitialized(_this)); return _this; } /** * On Tags value change, we update suggestions if they are displayed * @param { Object } nextProps The new props */ _createClass(MultiSelectTag, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (nextProps.value === this.props.value) { return; } if (this.state.suggestions) { this.updateSuggestions(undefined, nextProps); } } /** * Manage suggestion selection * @param { object } event * @param { number } highlightedItemIndex * @param { number } newHighlightedItemIndex */ }, { key: "onKeyDown", value: function onKeyDown(event, _ref) { var highlightedItemIndex = _ref.highlightedItemIndex, newHighlightedItemIndex = _ref.newHighlightedItemIndex; switch (event.which) { case _keycode["default"].codes.enter: event.preventDefault(); // suggestions are displayed and an item has the focus : we select it if (Number.isInteger(highlightedItemIndex)) { this.onAddTag(event, { itemIndex: highlightedItemIndex }); } break; case _keycode["default"].codes.down: case _keycode["default"].codes.up: event.preventDefault(); this.setState({ focusedItemIndex: newHighlightedItemIndex }); break; case _keycode["default"].codes.backspace: if (!this.state.value && this.props.value.length) { this.onRemoveTag(event, this.props.value.length - 1); } break; default: break; } } /** * Update suggestions on input value change * @param { object } event The input change event * @param { string } value The new input value */ }, { key: "onChange", value: function onChange(event, _ref2) { var value = _ref2.value; this.updateSuggestions(value); } }, { key: "onTrigger", value: function onTrigger(event, trigger) { return this.props.onTrigger(event, { trigger: trigger, schema: this.props.schema, errors: this.props.errors, properties: this.props.properties }); } /** * Update suggestions on input focus */ }, { key: "onFocus", value: function onFocus(event) { var _this2 = this; this.updateSuggestions(); (0, _trigger["default"])(event, { eventNames: [event.type], triggersDefinitions: this.props.schema.triggers, onTrigger: this.onTrigger, onLoading: function onLoading(isLoading) { return _this2.setState({ isLoading: isLoading }); }, onResponse: function onResponse(data) { return _this2.setState(data); } }).then(function () { return _this2.updateSuggestions(); }); } /** * Add a new tag * @param { object } event The user event * @param { number } itemIndex The selected suggestion index */ }, { key: "onAddTag", value: function onAddTag(event, _ref3) { var itemIndex = _ref3.itemIndex; var currentValue = this.state.value; var selectedOption = this.state.suggestions[itemIndex].value; var isCreation = getNewItemText(currentValue) === selectedOption; var newValue = isCreation ? currentValue : selectedOption; var payload = { schema: this.props.schema, value: this.props.value.concat(newValue) }; this.props.onChange(event, payload); this.props.onFinish(event, payload); this.updateSuggestions(''); } /** * Remove a tag * @param { object } event The user event * @param { number } itemIndex The tag index */ }, { key: "onRemoveTag", value: function onRemoveTag(event, itemIndex) { var value = this.props.value.slice(0); value.splice(itemIndex, 1); var payload = { schema: this.props.schema, value: value }; this.props.onChange(event, payload); this.props.onFinish(event, payload); } /** * Resolve the title map. * The dummy version is that it's provided in schema. But with async titleMap loading, * we store them in state. * If we have something in state, it means that it comes from async load, * considered as more important that schema. * @param props * @returns {*|Array} */ }, { key: "getTitleMap", value: function getTitleMap(props) { return this.state.titleMap || (0, _get["default"])(props, 'schema.titleMap') || this.props.schema.titleMap || []; } /** * Remove all suggestions */ }, { key: "resetSuggestions", value: function resetSuggestions() { this.setState({ suggestions: undefined, focusedItemIndex: undefined }); } /** * Update suggestions * - remove current tags values * - filter based on input value * @param { string } value The new input value. If not provided, it uses the current input value. * @param { object } props The props to use. If not provided, it uses this.props. */ }, { key: "updateSuggestions", value: function updateSuggestions(value, props) { var _this3 = this; this.setState(function (oldState) { var currentValue = value === undefined ? oldState.value : value; var currentProps = props === undefined ? _this3.props : props; var suggestions = _this3.getTitleMap(currentProps).map(function (item) { return { value: item.value, title: item.name }; }).filter(function (item) { return !currentProps.value.includes(item.value); }); if (currentValue) { var escapedValue = escapeRegexCharacters(currentValue.trim()); var exactMatchRx = new RegExp("^".concat(escapedValue, "$"), 'i'); var similarValueRx = new RegExp(escapedValue, 'i'); suggestions = suggestions.filter(function (item) { return similarValueRx.test(item.title); }); if (!suggestions.some(function (item) { return exactMatchRx.test(item.title); }) && currentProps.schema.restricted === false && !currentProps.value.includes(currentValue)) { suggestions.push({ value: currentValue, title: getNewItemText(currentValue) }); } } return { focusedItemIndex: suggestions.length ? 0 : undefined, suggestions: suggestions, value: currentValue }; }); } }, { key: "render", value: function render() { var _this4 = this; var _this$props = this.props, id = _this$props.id, isValid = _this$props.isValid, errorMessage = _this$props.errorMessage, schema = _this$props.schema, valueIsUpdating = _this$props.valueIsUpdating; var names = this.props.resolveName(this.props.value); var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: schema.description, descriptionId: descriptionId, errorId: errorId, errorMessage: errorMessage, id: id, isValid: isValid, label: schema.title, required: schema.required, valueIsUpdating: valueIsUpdating }, /*#__PURE__*/_react["default"].createElement("div", { className: "".concat(_MultiSelectTag["default"].wrapper, " form-control") }, this.props.value.map(function (val, index) { var label = getLabel(_this4.getTitleMap(), val, names[index]); var badgeProps = { label: label, key: index }; if (!schema.readOnly && !schema.disabled) { badgeProps.onDelete = function (event) { return _this4.onRemoveTag(event, index); }; } return /*#__PURE__*/_react["default"].createElement(_Badge["default"], badgeProps); }), /*#__PURE__*/_react["default"].createElement(_FocusManager["default"], { onFocusOut: this.resetSuggestions, className: _MultiSelectTag["default"]['focus-manager'] }, /*#__PURE__*/_react["default"].createElement(_Typeahead["default"], { id: id, autoFocus: schema.autoFocus || false, disabled: schema.disabled || valueIsUpdating, focusedItemIndex: this.state.focusedItemIndex, isLoading: this.state.isLoading, items: this.state.suggestions, multiSection: false, onChange: this.onChange, onFocus: this.onFocus, onKeyDown: this.onKeyDown, onSelect: this.onAddTag, placeholder: schema.placeholder, readOnly: schema.readOnly || false, theme: this.theme, value: this.state.value, caret: true, inputProps: { 'aria-invalid': !isValid, 'aria-required': schema.required, 'aria-describedby': "".concat(descriptionId, " ").concat(errorId) } })))); } }]); return MultiSelectTag; }(_react["default"].Component); exports["default"] = MultiSelectTag; if (process.env.NODE_ENV !== 'production') { MultiSelectTag.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, errors: _propTypes["default"].object, resolveName: _propTypes["default"].func, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, onTrigger: _propTypes["default"].func.isRequired, properties: _propTypes["default"].object, required: _propTypes["default"].bool, schema: _propTypes["default"].shape({ autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, placeholder: _propTypes["default"].string, readOnly: _propTypes["default"].bool, required: _propTypes["default"].bool, restricted: _propTypes["default"].bool, title: _propTypes["default"].string, titleMap: _propTypes["default"].arrayOf(_propTypes["default"].shape({ name: _propTypes["default"].string.isRequired, value: _propTypes["default"].string.isRequired })), triggers: _propTypes["default"].arrayOf(_propTypes["default"].shape({ onEvent: _propTypes["default"].string })) }), value: _propTypes["default"].arrayOf(_propTypes["default"].string), valueIsUpdating: _propTypes["default"].bool }; } MultiSelectTag.defaultProps = { isValid: true, resolveName: function resolveName(value) { return value; }, schema: {}, value: [] }; //# sourceMappingURL=MultiSelectTag.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4162 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"wrapper":"MultiSelectTag__wrapper___131P8","focus-manager":"MultiSelectTag__focus-manager___21FC7","typeahead":"MultiSelectTag__typeahead___35VcQ","items-container":"MultiSelectTag__items-container___2MUMD","items":"MultiSelectTag__items___1RXT6"}; /***/ }), /* 4163 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = MultiSelectTagTextMode; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _Badge = _interopRequireDefault(__webpack_require__(191)); var _FieldTemplate = __webpack_require__(43); var _TextMode = _interopRequireDefault(__webpack_require__(4164)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function getLabel(titleMap, value) { var itemConf = titleMap.find(function (item) { return item.value === value; }); if (itemConf) { return itemConf.name; } return value; } function MultiSelectTagTextMode(_ref) { var id = _ref.id, schema = _ref.schema, value = _ref.value; var title = schema.title; return /*#__PURE__*/_react["default"].createElement(_FieldTemplate.TextMode, { id: id, label: title }, /*#__PURE__*/_react["default"].createElement("ul", { "aria-labelledby": id, className: _TextMode["default"]['tc-badge-list'] }, value.map(function (val, index) { return /*#__PURE__*/_react["default"].createElement("li", null, /*#__PURE__*/_react["default"].createElement(_Badge["default"], { key: index, label: getLabel(schema.titleMap, val) })); }))); } if (process.env.NODE_ENV !== 'production') { MultiSelectTagTextMode.propTypes = { id: _propTypes["default"].string, schema: _propTypes["default"].shape({ title: _propTypes["default"].string, titleMap: _propTypes["default"].arrayOf(_propTypes["default"].shape({ name: _propTypes["default"].string.isRequired, value: _propTypes["default"].string.isRequired })) }).isRequired, value: _propTypes["default"].arrayOf(_propTypes["default"].string) }; } MultiSelectTagTextMode.defaultProps = { value: [] }; //# sourceMappingURL=TextMode.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4164 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"tc-badge-list":"TextMode__tc-badge-list___AK6XG"}; /***/ }), /* 4165 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _NestedListView = _interopRequireDefault(__webpack_require__(4166)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _NestedListView["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4166 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.NestedListViewWidget = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _keycode = _interopRequireDefault(__webpack_require__(34)); var _ListView = _interopRequireDefault(__webpack_require__(499)); var _reactI18next = __webpack_require__(10); var _constants = __webpack_require__(73); var _translate = _interopRequireDefault(__webpack_require__(116)); var _NestedListView = __webpack_require__(4167); var _generateId = __webpack_require__(61); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _NestedListView2 = _interopRequireDefault(__webpack_require__(4168)); 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 _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); } var DISPLAY_MODE_DEFAULT = 'DISPLAY_MODE_DEFAULT'; var DISPLAY_MODE_SEARCH = 'DISPLAY_MODE_SEARCH'; var DEFAULT_ITEM_HEIGHT = 33; var getItemHeight = function getItemHeight() { return DEFAULT_ITEM_HEIGHT; }; var NestedListViewWidget = /*#__PURE__*/function (_React$Component) { _inherits(NestedListViewWidget, _React$Component); var _super = _createSuper(NestedListViewWidget); function NestedListViewWidget(props) { var _this; _classCallCheck(this, NestedListViewWidget); _this = _super.call(this, props); var t = props.t, value = props.value, schema = props.schema, id = props.id; _this.defaultHeaderActions = [{ id: "".concat(id, "-search"), icon: 'talend-search', label: t('LISTVIEW_WIDGET_SEARCH', { defaultValue: 'Search for specific values' }), onClick: _this.switchToSearchMode.bind(_assertThisInitialized(_this)) }]; _this.defaultSearchHeaderActions = [{ id: 'abort', icon: 'talend-cross', label: t('LISTVIEW_WIDGET_ABORT', { defaultValue: 'Abort' }), onClick: _this.switchToDefaultMode.bind(_assertThisInitialized(_this)) }]; _this.onInputKeyDown = _this.onInputKeyDown.bind(_assertThisInitialized(_this)); _this.onInputChange = _this.onInputChange.bind(_assertThisInitialized(_this)); var callbacks = { onExpandToggle: _this.onExpandToggle.bind(_assertThisInitialized(_this)), onParentChange: _this.onParentChange.bind(_assertThisInitialized(_this)), onCheck: _this.onCheck.bind(_assertThisInitialized(_this)) }; _this.items = (0, _NestedListView.prepareItemsFromSchema)(schema, callbacks); _this.value = value; _this.state = { searchCriteria: null, displayedItems: (0, _NestedListView.getDisplayedItems)(_this.items, _this.value) }; return _this; } /** * Click callback to toggle the expanded status of children elements * @param {Object} event * @param {Object} item */ _createClass(NestedListViewWidget, [{ key: "onExpandToggle", value: function onExpandToggle(event, item) { var _this2 = this; this.items = this.items.map(function (fieldItem) { if (fieldItem.key === item.key) { return _objectSpread(_objectSpread({}, fieldItem), {}, { expanded: !fieldItem.expanded }); } return fieldItem; }); this.setState(function (_ref) { var searchCriteria = _ref.searchCriteria; return { displayedItems: (0, _NestedListView.getDisplayedItems)(_this2.items, _this2.value, searchCriteria) }; }); } /** * Handle checked item (parent) in the ListView change * @param { Object } event The event that triggered the change * @param { Object } item */ }, { key: "onParentChange", value: function onParentChange(event, item) { var _this3 = this; var availableOptions = this.props.schema.schema.properties[item.key].items["enum"]; // Toggle all values this.value = _objectSpread(_objectSpread({}, this.value), {}, _defineProperty({}, item.key, (this.value[item.key] || []).length === 0 ? availableOptions : [])); this.setState(function (_ref2) { var searchCriteria = _ref2.searchCriteria; return { displayedItems: (0, _NestedListView.getDisplayedItems)(_this3.items, _this3.value, searchCriteria) }; }, function () { return _this3.onChange(event); }); } /** * Handle checked item (child) in the ListView change * @param { Object } event * @param { Object } item * @param { Object } parent */ }, { key: "onCheck", value: function onCheck(event, item, parent) { var _this4 = this; var key = parent.key; if (!(key in this.value)) { this.value[key] = []; } this.value[key] = this.value[key].includes(item.value) ? this.value[key].filter(function (storedValue) { return storedValue !== item.value; }) // Unselect : this.value[key].concat(item.value); // Select this.setState(function (_ref3) { var searchCriteria = _ref3.searchCriteria; return { displayedItems: (0, _NestedListView.getDisplayedItems)(_this4.items, _this4.value, searchCriteria) }; }, function () { return _this4.onChange(event); }); } /** * Propagate a ListView value change * @param { Object } event The event that triggered the change * @param { Object } newValue The new Value */ }, { key: "onChange", value: function onChange(event) { var payload = { schema: this.props.schema, value: this.value }; this.props.onChange(event, payload); this.props.onFinish(event, payload); } /** * Search input change * @param { Object } event * @param { Object } item */ }, { key: "onInputChange", value: function onInputChange(event, item) { var _this5 = this; clearTimeout(this.timerSearch); this.timerSearch = setTimeout(function () { var searchCriteria = item.value; _this5.setState({ searchCriteria: searchCriteria, displayedItems: (0, _NestedListView.getDisplayedItems)(_this5.items, _this5.value, searchCriteria) }); }, 400); } /** * Search input ENTER/ESC management * @param { Object } event The keydown event */ }, { key: "onInputKeyDown", value: function onInputKeyDown(event) { if (event.keyCode === (0, _keycode["default"])('enter')) { event.preventDefault(); } else if (event.keyCode === (0, _keycode["default"])('escape')) { clearTimeout(this.timerSearch); event.preventDefault(); this.switchToDefaultMode(); } } /** * Switch header to search mode */ }, { key: "switchToSearchMode", value: function switchToSearchMode() { this.setState({ headerInput: this.defaultSearchHeaderActions, displayMode: DISPLAY_MODE_SEARCH }); } /** * Switch header to default mode. * Reset display to no filter */ }, { key: "switchToDefaultMode", value: function switchToDefaultMode() { var searchCriteria = null; this.setState({ displayedItems: (0, _NestedListView.getDisplayedItems)(this.items, this.value, searchCriteria), searchCriteria: searchCriteria, headerInput: this.defaultHeaderActions, displayMode: DISPLAY_MODE_DEFAULT }); } }, { key: "render", value: function render() { var _this$props = this.props, id = _this$props.id, schema = _this$props.schema; return /*#__PURE__*/_react["default"].createElement("div", { className: _NestedListView2["default"]['nested-list-view'] }, /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: schema.description, descriptionId: (0, _generateId.generateDescriptionId)(id), errorId: (0, _generateId.generateErrorId)(id), errorMessage: this.props.errorMessage, id: id, isValid: this.props.isValid, required: schema.required, valueIsUpdating: this.props.valueIsUpdating }, /*#__PURE__*/_react["default"].createElement(_ListView["default"], _extends({}, this.state, { getItemHeight: schema.autosize ? null : getItemHeight, id: this.props.id, items: this.state.displayedItems, headerDefault: this.defaultHeaderActions, onAddKeyDown: this.onInputKeyDown, onInputChange: this.onInputChange, headerLabel: schema.title, required: schema.required, searchPlaceholder: schema.placeholder, showToggleAll: false })))); } }]); return NestedListViewWidget; }(_react["default"].Component); exports.NestedListViewWidget = NestedListViewWidget; NestedListViewWidget.defaultProps = { value: {}, t: (0, _translate["default"])() }; if (process.env.NODE_ENV !== 'production') { NestedListViewWidget.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ schema: _propTypes["default"].object, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, placeholder: _propTypes["default"].string, required: _propTypes["default"].bool, title: _propTypes["default"].string, autosize: _propTypes["default"].bool }), value: _propTypes["default"].object, valueIsUpdating: _propTypes["default"].bool, t: _propTypes["default"].func }; } var _default = (0, _reactI18next.withTranslation)(_constants.I18N_DOMAIN_FORMS)(NestedListViewWidget); exports["default"] = _default; //# sourceMappingURL=NestedListView.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4167 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getDisplayedItems = getDisplayedItems; exports.prepareItemsFromSchema = prepareItemsFromSchema; 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; } /** * Check if an item as children, use as filter * @param {Object} item * @returns {Boolean} */ function hasChildren(item) { return item.children.length > 0; } /** * Build the ListView component props to match current state's values * @param {Array} items * @param {Object} value * @param {String} searchCriteria * @returns {Array} */ function getDisplayedItems(items, value, searchCriteria) { var textFilter; if (searchCriteria) { textFilter = function textFilter(_ref) { var label = _ref.label; return label.toLowerCase().includes(searchCriteria.toLowerCase()); }; } return items.map(function (item) { var newChildren = item.children.map(function (child) { return _objectSpread(_objectSpread({}, child), {}, { checked: (value[item.key] || []).includes(child.value) }); }); return _objectSpread(_objectSpread({}, item), {}, { checked: newChildren.some(function (child) { return child.checked; }), children: textFilter ? newChildren.filter(textFilter) : newChildren }); }).filter(hasChildren); } /** * Prepare items from schema to be used within ListView * @param {Object} schema * @param {Object} callbacks * @param {Function} callbacks.onExpandToggle * @param {Function} callbacks.onParentChange * @param {Function} callbacks.onCheck * @returns {Array} */ function prepareItemsFromSchema(schema, callbacks) { var onExpandToggle = callbacks.onExpandToggle, onParentChange = callbacks.onParentChange, onCheck = callbacks.onCheck; return schema.items.map(function (item) { var key = item.key[item.key.length - 1]; return { label: item.title, expanded: false, key: key, onExpandToggle: onExpandToggle, onChange: onParentChange, children: item.titleMap.map(function (option) { return { label: option.name, value: option.value, onChange: onCheck }; }) }; }); } //# sourceMappingURL=NestedListView.utils.js.map /***/ }), /* 4168 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"nested-list-view":"NestedListView__nested-list-view___3Zy_r"}; /***/ }), /* 4169 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = Radios; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); var _properties = __webpack_require__(96); 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 Radios(_ref) { var id = _ref.id, isValid = _ref.isValid, errorMessage = _ref.errorMessage, _onChange = _ref.onChange, onFinish = _ref.onFinish, schema = _ref.schema, value = _ref.value, valueIsUpdating = _ref.valueIsUpdating; var autoFocus = schema.autoFocus, description = schema.description, _schema$disabled = schema.disabled, disabled = _schema$disabled === void 0 ? false : _schema$disabled, inline = schema.inline, title = schema.title, rest = _objectWithoutProperties(schema, ["autoFocus", "description", "disabled", "inline", "title"]); var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); var radioClassNames = (0, _classnames["default"])({ radio: !inline, 'radio-inline': inline, disabled: disabled }); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { id: id, hint: schema.hint, className: schema.className, description: description, descriptionId: descriptionId, errorId: errorId, errorMessage: errorMessage, isValid: isValid, label: title, required: schema.required, valueIsUpdating: valueIsUpdating }, schema.titleMap && schema.titleMap.map(function (option, index) { return /*#__PURE__*/_react["default"].createElement("div", { className: radioClassNames, key: index }, /*#__PURE__*/_react["default"].createElement("label", null, /*#__PURE__*/_react["default"].createElement("input", _extends({ id: "".concat(id, "-").concat(index), autoFocus: autoFocus, checked: option.value === value, disabled: disabled || valueIsUpdating, name: id, onBlur: function onBlur(event) { return onFinish(event, { schema: schema }); }, onChange: function onChange(event) { return _onChange(event, { schema: schema, value: option.value }); }, type: "radio", value: option.value // eslint-disable-next-line jsx-a11y/aria-proptypes , "aria-invalid": !isValid, "aria-describedby": "".concat(descriptionId, " ").concat(errorId) }, (0, _properties.extractDataAttributes)(rest, index))), /*#__PURE__*/_react["default"].createElement("span", null, option.name))); })); } if (process.env.NODE_ENV !== 'production') { Radios.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ className: _propTypes["default"].string, autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, inline: _propTypes["default"].bool, required: _propTypes["default"].bool, title: _propTypes["default"].string, titleMap: _propTypes["default"].arrayOf(_propTypes["default"].shape({ name: _propTypes["default"].string.isRequired, value: _propTypes["default"].string.isRequired })), hint: _propTypes["default"].shape({ icon: _propTypes["default"].string, className: _propTypes["default"].string, overlayComponent: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].string]).isRequired, overlayPlacement: _propTypes["default"].string }) }), value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]), valueIsUpdating: _propTypes["default"].bool }; } Radios.defaultProps = { isValid: true, schema: {} }; //# sourceMappingURL=Radios.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4170 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _RadioOrSelect = _interopRequireDefault(__webpack_require__(4171)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _RadioOrSelect["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4171 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = RadioOrSelect; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _Radios = _interopRequireDefault(__webpack_require__(1635)); var _Select = _interopRequireDefault(__webpack_require__(1636)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var MAX_TO_RADIO = 2; function RadioOrSelect(props) { if (props.schema.titleMap && props.schema.titleMap.length <= MAX_TO_RADIO) { return /*#__PURE__*/_react["default"].createElement(_Radios["default"], props); } return /*#__PURE__*/_react["default"].createElement(_Select["default"], props); } if (process.env.NODE_ENV !== 'production') { RadioOrSelect.propTypes = { schema: _propTypes["default"].shape({ titleMap: _propTypes["default"].array }) }; } RadioOrSelect.defaultProps = { schema: {} }; //# sourceMappingURL=RadioOrSelect.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4172 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = Select; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); var _properties = __webpack_require__(96); 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 getSelectedOptions(select, multiple) { if (multiple) { return Array.prototype.slice.call(select.options).filter(function (option) { return option.selected; }).map(function (option) { return option.value; }); } return select.value; } function Select(_ref) { var id = _ref.id, isValid = _ref.isValid, errorMessage = _ref.errorMessage, _onChange = _ref.onChange, onFinish = _ref.onFinish, schema = _ref.schema, value = _ref.value, valueIsUpdating = _ref.valueIsUpdating; var autoFocus = schema.autoFocus, description = schema.description, _schema$disabled = schema.disabled, disabled = _schema$disabled === void 0 ? false : _schema$disabled, placeholder = schema.placeholder, _schema$readOnly = schema.readOnly, readOnly = _schema$readOnly === void 0 ? false : _schema$readOnly, title = schema.title, rest = _objectWithoutProperties(schema, ["autoFocus", "description", "disabled", "placeholder", "readOnly", "title"]); var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); var multiple = schema.schema.type === 'array' && schema.schema.uniqueItems; return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: description, errorMessage: errorMessage, descriptionId: descriptionId, errorId: errorId, id: id, isValid: isValid, label: title, labelAfter: true, required: schema.required, valueIsUpdating: valueIsUpdating }, /*#__PURE__*/_react["default"].createElement("select", _extends({ id: id, multiple: multiple, autoFocus: autoFocus, className: "form-control", disabled: disabled || valueIsUpdating, onChange: function onChange(event) { var payload = { schema: schema, value: getSelectedOptions(event.target, multiple) }; _onChange(event, payload); onFinish(event, payload); }, readOnly: readOnly, value: value // eslint-disable-next-line jsx-a11y/aria-proptypes , "aria-invalid": !isValid, "aria-required": schema.required, "aria-describedby": "".concat(descriptionId, " ").concat(errorId) }, (0, _properties.extractDataAttributes)(rest)), placeholder ? /*#__PURE__*/_react["default"].createElement("option", { disabled: true, value: "" }, placeholder) : null, schema.titleMap && schema.titleMap.map(function (option, index) { var optionProps = { key: index, value: option.value }; return /*#__PURE__*/_react["default"].createElement("option", optionProps, option.name); }))); } if (process.env.NODE_ENV !== 'production') { Select.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, placeholder: _propTypes["default"].string, readOnly: _propTypes["default"].bool, required: _propTypes["default"].bool, schema: _propTypes["default"].shape({ type: _propTypes["default"].string, uniqueItems: _propTypes["default"].bool }), title: _propTypes["default"].string, titleMap: _propTypes["default"].arrayOf(_propTypes["default"].shape({ name: _propTypes["default"].string.isRequired, value: _propTypes["default"].string.isRequired })), type: _propTypes["default"].string }), value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number, _propTypes["default"].array]), valueIsUpdating: _propTypes["default"].bool }; } Select.defaultProps = { isValid: true, schema: {}, value: '' }; //# sourceMappingURL=Select.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4173 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = TextMode; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _FieldTemplate = __webpack_require__(43); var _TextModeArrayTemplate = _interopRequireDefault(__webpack_require__(1623)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function TextMode(props) { if (Array.isArray(props.value)) { return /*#__PURE__*/_react["default"].createElement(_TextModeArrayTemplate["default"], props); } var id = props.id, schema = props.schema, value = props.value; var title = schema.title; return /*#__PURE__*/_react["default"].createElement(_FieldTemplate.TextMode, { id: id, label: title }, value); } if (process.env.NODE_ENV !== 'production') { TextMode.propTypes = { id: _propTypes["default"].string, schema: _propTypes["default"].shape({ title: _propTypes["default"].string }), value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]) }; } TextMode.defaultProps = { schema: {}, value: '' }; //# sourceMappingURL=TextMode.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4174 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ResourcePicker = _interopRequireDefault(__webpack_require__(4175)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _ResourcePicker["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4175 */ /***/ (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 _ResourcePicker = _interopRequireDefault(__webpack_require__(1500)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); var _constants = __webpack_require__(4176); 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 _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) || _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 _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 ResourcePicker = /*#__PURE__*/function (_Component) { _inherits(ResourcePicker, _Component); var _super = _createSuper(ResourcePicker); function ResourcePicker(props) { var _this; _classCallCheck(this, ResourcePicker); _this = _super.call(this, props); _this.onChange = _this.onChange.bind(_assertThisInitialized(_this)); _this.onFilter = _this.onFilter.bind(_assertThisInitialized(_this)); _this.nameFilterChanged = _this.nameFilterChanged.bind(_assertThisInitialized(_this)); _this.stateFilterChanged = _this.stateFilterChanged.bind(_assertThisInitialized(_this)); _this.sortOptionChanged = _this.sortOptionChanged.bind(_assertThisInitialized(_this)); _this.isItemSelected = _this.isItemSelected.bind(_assertThisInitialized(_this)); _this.onRowClick = _this.onRowClick.bind(_assertThisInitialized(_this)); _this.state = { filters: { name: '', certified: false, favorites: false, selection: false, selected: [] } }; return _this; } _createClass(ResourcePicker, [{ key: "componentDidMount", value: function componentDidMount() { this.onFilter(); } }, { key: "onChange", value: function onChange(event, value) { var schema = this.props.schema; this.props.onChange(event, { schema: schema, value: value }); this.props.onFinish(event, { schema: schema, value: value }); } }, { key: "onFilter", value: function onFilter(event) { var _this2 = this; this.setState({ isLoading: true }, function () { _this2.onTrigger(event, _constants.FILTER, { filters: _this2.state.filters }).then(function (data) { return _this2.setState(data); })["finally"](function () { return _this2.setState({ isLoading: false }); }); }); } }, { key: "onTrigger", value: function onTrigger(event, eventName, payload) { var _this$props = this.props, schema = _this$props.schema, properties = _this$props.properties, errors = _this$props.errors; var trigger = schema.triggers && schema.triggers.find(function (trig) { return trig.onEvent === eventName; }); if (trigger) { return this.props.onTrigger(event, _objectSpread({ trigger: trigger, schema: schema, properties: properties, errors: errors }, payload)); } return Promise.resolve(); } }, { key: "onRowClick", value: function onRowClick(event, _ref) { var id = _ref.id; var selected = _toConsumableArray(this.state.filters.selected); var index = selected.findIndex(function (i) { return i === id; }); var multi = this.props.schema.multi; if (!multi) { selected = []; } if (index > -1) { if (multi || !this.props.schema.required) { selected.splice(index, 1); } else { // in single selection if the resource is already selected do nothing return; } } else { selected.push(id); } var value = multi ? selected : selected[0]; this.setState(function (oldState) { return { filters: _objectSpread(_objectSpread({}, oldState.filters), {}, { selected: selected }) }; }); this.onChange(event, value); this.onTrigger(event, _constants.CHANGE, { value: value }); } }, { key: "isItemSelected", value: function isItemSelected(_ref2) { var id = _ref2.id; return this.state.filters.selected.includes(id); } }, { key: "stateFilterChanged", value: function stateFilterChanged(option, value) { var _this3 = this; this.setState(function (state) { return _objectSpread(_objectSpread({}, state), {}, { filters: _objectSpread(_objectSpread({}, state.filters), {}, _defineProperty({}, option, value)) }); }, function () { return _this3.onFilter(null, _this3.state); }); } }, { key: "nameFilterChanged", value: function nameFilterChanged(event) { var _this4 = this; var target = event.target; if (target) { this.setState(function (state) { return _objectSpread(_objectSpread({}, state), {}, { filters: _objectSpread(_objectSpread({}, state.filters), {}, { name: target.value || '' }) }); }, function () { return _this4.onFilter(null, _this4.state); }); } } }, { key: "sortOptionChanged", value: function sortOptionChanged(option, value) { var _this5 = this; this.setState(function (state) { return _objectSpread(_objectSpread({}, state), {}, { filters: _objectSpread(_objectSpread({}, state.filters), {}, { orders: _objectSpread(_objectSpread({}, state.orders), {}, _defineProperty({}, option, value)) }) }); }, function () { return _this5.onFilter(null, _this5.state); }); } }, { key: "render", value: function render() { var _this6 = this; var orders = this.state.filters.orders; var _this$props2 = this.props, id = _this$props2.id, schema = _this$props2.schema, isValid = _this$props2.isValid, errorMessage = _this$props2.errorMessage; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); var toolbar = { name: { label: schema.placeholder, value: this.state.filters.name, onChange: this.nameFilterChanged }, state: { onChange: this.stateFilterChanged }, sort: { onChange: this.sortOptionChanged, orders: orders } }; if (schema.options) { var _schema$options = schema.options, filters = _schema$options.filters, sort = _schema$options.sort; if (filters) { filters.forEach(function (filter) { toolbar.state[filter] = _this6.state.filters[filter]; }); // only display the filter which are defined in the schema toolbar.state.types = _toConsumableArray(filters); } if (sort) { // only display the filter which are defined in the schema toolbar.sort.types = _toConsumableArray(sort); } } return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: schema.description, descriptionId: descriptionId, errorId: errorId, errorMessage: errorMessage, id: id, isValid: isValid, label: schema.title, required: schema.required }, /*#__PURE__*/_react["default"].createElement(_ResourcePicker["default"], _extends({}, this.props, this.state, { toolbar: toolbar, isSelected: this.isItemSelected, onRowClick: this.onRowClick // eslint-disable-next-line jsx-a11y/aria-proptypes , "aria-invalid": !isValid, "aria-required": schema.required, "aria-describedby": "".concat(descriptionId, " ").concat(errorId) }))); } }]); return ResourcePicker; }(_react.Component); ResourcePicker.displayName = 'ResourcePicker field'; if (process.env.NODE_ENV !== 'production') { ResourcePicker.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, onTrigger: _propTypes["default"].func, properties: _propTypes["default"].object, errors: _propTypes["default"].object, schema: _propTypes["default"].shape({ schema: _propTypes["default"].shape({ type: _propTypes["default"].string }), description: _propTypes["default"].string, options: _propTypes["default"].shape({ filters: _propTypes["default"].array, sort: _propTypes["default"].array }), placeholder: _propTypes["default"].string, required: _propTypes["default"].bool, title: _propTypes["default"].string, triggers: _propTypes["default"].arrayOf(_propTypes["default"].shape({ onEvent: _propTypes["default"].string })), multi: _propTypes["default"].bool }) }; } var _default = ResourcePicker; exports["default"] = _default; //# sourceMappingURL=ResourcePicker.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4176 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FILTER = exports.CHANGE = void 0; var FILTER = 'filter'; exports.FILTER = FILTER; var CHANGE = 'change'; exports.CHANGE = CHANGE; //# sourceMappingURL=constants.js.map /***/ }), /* 4177 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "ToggleTextMode", { enumerable: true, get: function get() { return _TextMode["default"]; } }); exports["default"] = void 0; var _Toggle = _interopRequireDefault(__webpack_require__(4178)); var _TextMode = _interopRequireDefault(__webpack_require__(4179)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Toggle["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4178 */ /***/ (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 _Toggle = _interopRequireDefault(__webpack_require__(233)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); var _properties = __webpack_require__(96); 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 ToggleWidget(props) { var id = props.id, isValid = props.isValid, errorMessage = props.errorMessage, _onChange = props.onChange, onFinish = props.onFinish, schema = props.schema, value = props.value, valueIsUpdating = props.valueIsUpdating; var autoFocus = schema.autoFocus, description = schema.description, _schema$disabled = schema.disabled, disabled = _schema$disabled === void 0 ? false : _schema$disabled, title = schema.title; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: description, descriptionId: descriptionId, errorId: errorId, errorMessage: errorMessage, isValid: isValid, required: schema.required, valueIsUpdating: valueIsUpdating }, /*#__PURE__*/_react["default"].createElement(_Toggle["default"], _extends({ autoFocus: autoFocus, checked: value, disabled: disabled || valueIsUpdating, id: id, label: title, onChange: function onChange(event) { _onChange(event, { schema: schema, value: !value }); onFinish(event, { schema: schema, value: !value }); } // eslint-disable-next-line jsx-a11y/aria-proptypes , "aria-invalid": !isValid, "aria-required": schema.required, "aria-describedby": "".concat(descriptionId, " ").concat(errorId) }, (0, _properties.extractDataAttributes)(schema)))); } if (process.env.NODE_ENV !== 'production') { ToggleWidget.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, schema: _propTypes["default"].shape({ autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, required: _propTypes["default"].bool, title: _propTypes["default"].string }), value: _propTypes["default"].bool, valueIsUpdating: _propTypes["default"].bool }; } var _default = ToggleWidget; exports["default"] = _default; //# sourceMappingURL=Toggle.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4179 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = TextModeToggle; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _Toggle = _interopRequireDefault(__webpack_require__(233)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function TextModeToggle(props) { return /*#__PURE__*/_react["default"].createElement("div", { className: (0, _classnames["default"])('form-group', props.className) }, /*#__PURE__*/_react["default"].createElement("dt", null, /*#__PURE__*/_react["default"].createElement("label", { htmlFor: props.id, className: "control-label sr-only" }, props.schema.title), /*#__PURE__*/_react["default"].createElement("div", { "aria-hidden": true }, /*#__PURE__*/_react["default"].createElement(_Toggle["default"], { checked: props.value, disabled: true, label: props.schema.title }))), /*#__PURE__*/_react["default"].createElement("dd", { id: props.id, className: "sr-only" }, String(props.value))); } TextModeToggle.defaultProps = { value: false }; if (process.env.NODE_ENV !== 'production') { TextModeToggle.propTypes = { className: _propTypes["default"].string, value: _propTypes["default"].bool, id: _propTypes["default"].string.isRequired, schema: _propTypes["default"].shape({ required: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, title: _propTypes["default"].string }) }; } //# sourceMappingURL=TextMode.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4180 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _omit = _interopRequireDefault(__webpack_require__(547)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _UIForm = _interopRequireDefault(__webpack_require__(4181)); var _propTypes2 = __webpack_require__(901); 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 _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 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; } /** * add error object on a formSchema if it doesn't exist * @param {FormSchema} formSchema * @return {FormSchema} */ function addErrorObject(formSchema) { if (!formSchema.errors) { return _objectSpread({ errors: {} }, formSchema); } return formSchema; } /** * reinit liveState with empty errors if it doesn't exist * @param {FormSchema} newFormSchema * @param {State} prevState * @return {State} */ var reinitLiveState = function reinitLiveState(newFormSchema) { return function () { return { liveState: addErrorObject(newFormSchema) }; }; }; /** * update live state with new properties derived from user interacting * with the form * @param {Object} properties * @param {State} prevState * @return {State} */ var setLiveStateProperties = function setLiveStateProperties(properties) { return function (prevState) { return _objectSpread(_objectSpread({}, prevState), {}, { liveState: _objectSpread(_objectSpread({}, prevState.liveState), {}, { properties: properties }) }); }; }; /** * update liveState formSchema with errors * @param {Object} errors * @param {State} prevState * @return {State} */ var setLiveStateErrors = function setLiveStateErrors(errors) { return function (prevState) { return _objectSpread(_objectSpread({}, prevState), {}, { liveState: _objectSpread(_objectSpread({}, prevState.liveState), {}, { errors: errors }) }); }; }; /** * update initialState with liveState after a user submission of the form * @param {Object} newProperties * @param {State} prevState * @return {State} */ var setLiveAsInitialState = function setLiveAsInitialState(prevState) { return _objectSpread(_objectSpread({}, prevState), {}, { initialState: prevState.liveState }); }; /** * update liveState with initialState, reseting form * @param {State} prevState * @return {State} */ var setInitialStateAsLiveState = function setInitialStateAsLiveState(prevState) { return _objectSpread(_objectSpread({}, prevState), {}, { liveState: prevState.initialState }); }; var UIForm = /*#__PURE__*/function (_React$Component) { _inherits(UIForm, _React$Component); var _super = _createSuper(UIForm); function UIForm(props) { var _this; _classCallCheck(this, UIForm); _this = _super.call(this, props); _this.state = { initialState: addErrorObject(_this.props.data), // eslint-disable-line react/no-unused-state liveState: addErrorObject(_this.props.data) }; _this.onChange = _this.onChange.bind(_assertThisInitialized(_this)); _this.onTrigger = _this.onTrigger.bind(_assertThisInitialized(_this)); _this.onReset = _this.onReset.bind(_assertThisInitialized(_this)); _this.onSubmit = _this.onSubmit.bind(_assertThisInitialized(_this)); _this.setErrors = _this.setErrors.bind(_assertThisInitialized(_this)); return _this; } /** * Update live and initialState with the new schema * @param nextProps */ _createClass(UIForm, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(nextProps) { if (nextProps.data !== this.props.data) { this.setState(reinitLiveState(nextProps.data)); } if (nextProps.initialData !== this.props.initialData) { this.setState({ initialState: addErrorObject(nextProps.initialData), // eslint-disable-line react/no-unused-state liveState: addErrorObject(nextProps.initialData) }); } } /** * Update the model and validation * If onChange is provided, it is triggered * @param event The change event * @param payload { schema, value, error } The change payload * schema: The schema * value: The new value * error: The validation error */ }, { key: "onChange", value: function onChange(event, payload) { this.setState(setLiveStateProperties(payload.properties)); if (this.props.onChange) { this.props.onChange(event, payload); } } /** * On user submit change local state and call this.props.onSubmit * @param event submit event * @param {Object} properties * @param {Object} mergedSchema */ }, { key: "onSubmit", value: function onSubmit(event, properties, mergedSchema) { this.setState(setLiveAsInitialState); if (typeof this.props.onSubmit === 'function') { this.props.onSubmit(event, properties, mergedSchema); } } /** * On user reset change local state and call this.props.onReset */ }, { key: "onReset", value: function onReset(event) { this.setState(setInitialStateAsLiveState); if (typeof this.props.onReset === 'function') { this.props.onReset(event); } } }, { key: "onTrigger", value: function onTrigger(event, payload) { var _this2 = this; return this.props.onTrigger(event, payload).then(function (data) { var liveState = _this2.state.liveState; if (data.errors) { var errors = data.errors; if (typeof data.errors === 'function') { errors = data.errors(liveState.errors); } _this2.setErrors(event, errors); } if (data.properties) { var properties = data.properties; if (typeof properties === 'function') { properties = properties(liveState.properties); } var schema = payload.schema, value = payload.value, oldProperties = payload.oldProperties; _this2.onChange(event, { schema: schema, value: value, oldProperties: oldProperties, properties: properties, formData: properties }); } return data; }); } /** * Set all fields validation in state * @param errors the validation errors * @param callback callback to call after setState */ }, { key: "setErrors", value: function setErrors(event, errors, callback) { this.setState(setLiveStateErrors(errors), callback); if (this.props.onErrors) { this.props.onErrors(event, errors); } } }, { key: "render", value: function render() { var props = (0, _omit["default"])(this.props, 'data'); return /*#__PURE__*/_react["default"].createElement(_UIForm["default"], _extends({}, this.state.liveState, props, { onChange: this.onChange, onTrigger: this.onTrigger, onSubmit: this.onSubmit, onReset: this.onReset, setErrors: this.setErrors }), this.props.children); } }]); return UIForm; }(_react["default"].Component); exports["default"] = UIForm; _defineProperty(UIForm, "displayName", 'Container(UIForm)'); if (process.env.NODE_ENV !== 'production') { UIForm.propTypes = _objectSpread(_objectSpread({}, _propTypes2.formPropTypes), {}, { /** * if initial data is present set initial state with it * if not use juste data * if initial data update * update initialData and liveData with it */ initialData: _propTypes["default"].shape({ /** Json schema that specify the data model */ jsonSchema: _propTypes["default"].object, /** UI schema that specify how to render the fields */ uiSchema: _propTypes["default"].array, /** * Form fields values. * Note that it should contains @definitionName for triggers. */ properties: _propTypes["default"].object, /** * Form fields errors. */ errors: _propTypes["default"].object }), /** Form schema configuration */ data: _propTypes["default"].shape({ /** Json schema that specify the data model */ jsonSchema: _propTypes["default"].object, /** UI schema that specify how to render the fields */ uiSchema: _propTypes["default"].array, /** * Form fields values. * Note that it should contains @definitionName for triggers. */ properties: _propTypes["default"].object, /** * Form fields errors. */ errors: _propTypes["default"].object }), /** * Actions buttons to display at the bottom of the form. * If not provided, a single submit button is displayed. */ actions: _UIForm["default"].propTypes.actions, /** * Custom validation function. * Prototype: function customValidation(schema, value, properties) * Return format : errorMessage String | falsy * This is triggered on fields that has their uiSchema > customValidation : true */ customValidation: _propTypes["default"].func, /** * The change callback. * Prototype: function onChange(event, { schema, value, properties }) */ onChange: _propTypes["default"].func, /** * The errors callback. * Prototype: function onErrors(event, errors) */ onErrors: _propTypes["default"].func, /** * Trigger callback. * Prototype: function onTrigger(event, { trigger, schema, properties }) */ onTrigger: _propTypes["default"].func, /** Custom templates */ templates: _propTypes["default"].object, /** Custom widgets */ widgets: _propTypes["default"].object, /** Display mode: example 'text' */ displayMode: _propTypes["default"].string }); } //# sourceMappingURL=UIForm.container.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4181 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.UIFormComponent = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _react = _interopRequireDefault(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(1)); var _tv = _interopRequireDefault(__webpack_require__(1620)); var _reactI18next = __webpack_require__(10); var _FormTemplate = __webpack_require__(1605); var _merge = _interopRequireDefault(__webpack_require__(1638)); var _propTypes2 = __webpack_require__(901); var _validation = __webpack_require__(551); var _Widget = _interopRequireDefault(__webpack_require__(153)); var _Buttons = _interopRequireDefault(__webpack_require__(1626)); var _properties = __webpack_require__(96); var _errors = __webpack_require__(397); var _lang = _interopRequireDefault(__webpack_require__(1637)); var _customFormats = _interopRequireDefault(__webpack_require__(906)); var _constants = __webpack_require__(73); __webpack_require__(116); var _UIForm = _interopRequireDefault(__webpack_require__(886)); 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 _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 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 _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); } 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 UIFormComponent = /*#__PURE__*/function (_React$Component) { _inherits(UIFormComponent, _React$Component); var _super = _createSuper(UIFormComponent); function UIFormComponent(props) { var _this; _classCallCheck(this, UIFormComponent); _this = _super.call(this, props); var jsonSchema = props.jsonSchema, uiSchema = props.uiSchema; var state = {}; if (Object.keys(jsonSchema).length) { _extends(state, (0, _merge["default"])(jsonSchema, uiSchema)); } state.widgets = _objectSpread(_objectSpread({}, state.widgets), props.widgets); _this.state = state; _this.onChange = _this.onChange.bind(_assertThisInitialized(_this)); _this.onFinish = _this.onFinish.bind(_assertThisInitialized(_this)); _this.onSubmit = _this.onSubmit.bind(_assertThisInitialized(_this)); _this.onTrigger = _this.onTrigger.bind(_assertThisInitialized(_this)); _this.onActionClick = _this.onActionClick.bind(_assertThisInitialized(_this)); _this.focusFirstError = _this.focusFirstError.bind(_assertThisInitialized(_this)); _this.setFormRef = _this.setFormRef.bind(_assertThisInitialized(_this)); // control the tv4 language here. var language = (0, _lang["default"])(props.t); var languageId = props.id || '@talend'; if (props.language != null) { _extends(language, props.language); // Force update of language by id even if already set _tv["default"].addLanguage(languageId, language); _tv["default"].language(languageId); } if (!_tv["default"].language(languageId)) { _tv["default"].addLanguage(languageId, language); _tv["default"].language(languageId); // set it } var allFormats = _extends((0, _customFormats["default"])(props.t), props.customFormats); _tv["default"].addFormat(allFormats); return _this; } /** * Update the state with the new schema. * @param jsonSchema * @param uiSchema */ _createClass(UIFormComponent, [{ key: "componentWillReceiveProps", value: function componentWillReceiveProps(_ref) { var jsonSchema = _ref.jsonSchema, uiSchema = _ref.uiSchema; if (!jsonSchema || !uiSchema || this.props.jsonSchema === jsonSchema && this.props.uiSchema === uiSchema) { return; } if (Object.keys(jsonSchema).length) { var merged = (0, _merge["default"])(jsonSchema, uiSchema); this.setState(_objectSpread(_objectSpread({}, merged), {}, { widgets: _objectSpread(_objectSpread({}, merged.widgets), this.props.widgets) })); } } /** * Fire onChange callback while interacting with form fields * @param event The event that triggered the callback * @param schema The payload field schema * @param value The payload new value */ }, { key: "onChange", value: function onChange(event, _ref2) { var schema = _ref2.schema, value = _ref2.value; var newProperties = (0, _properties.mutateValue)(this.props.properties, schema, value); this.props.onChange(event, { schema: schema, value: value, oldProperties: this.props.properties, properties: newProperties, formData: newProperties }); } /** * Perform validation and triggers when user has finished to change a value * @param event The event that triggered the callback * @param schema The payload field schema * @param value The new value, provided if not already taken into account * @param deepValidation Validate the subItems * Most of the time, this value is not provided. It will be taken from props.properties * This allows to perform triggers/validation while changing a value * (ex: add an element in array) * @param widgetChangeErrors Change errors hook, allows any widget to manipulate the errors map * (ex: shift the errors in array elements on remove) */ }, { key: "onFinish", value: function onFinish(event, _ref3) { var schema = _ref3.schema, value = _ref3.value; var _ref4 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, _ref4$deepValidation = _ref4.deepValidation, deepValidation = _ref4$deepValidation === void 0 ? false : _ref4$deepValidation, widgetChangeErrors = _ref4.widgetChangeErrors; // get property value var newValue; if (value !== undefined) { newValue = value; } else { newValue = (0, _properties.getValue)(this.props.properties, schema); } // validate value. This validation can be deep if schema is an object or an array var widgetErrors = (0, _validation.validateSingle)(schema, newValue, this.props.properties, this.props.customValidation, deepValidation); var hasErrors = Object.values(widgetErrors).find(Boolean); // update errors map var errors = Object.entries(widgetErrors).reduce(function (accu, _ref5) { var _ref6 = _slicedToArray(_ref5, 2), errorKey = _ref6[0], errorValue = _ref6[1]; var errorSchema = { key: errorKey }; return errorValue ? (0, _errors.addError)(accu, errorSchema, errorValue) : (0, _errors.removeError)(accu, errorSchema); }, this.props.errors); // widget error modifier if (widgetChangeErrors) { errors = widgetChangeErrors(errors); } // commit errors this.props.setErrors(event, errors); if (!hasErrors && schema.triggers && schema.triggers.length) { var formData = this.props.properties; if (value !== undefined) { formData = (0, _properties.mutateValue)(formData, schema, value); } var propertyName = schema.key.join('.'); if (this.props.moz) { schema.key.forEach(function (key, index) { if (index !== schema.key.length - 1) { formData = formData[key]; } }); propertyName = schema.key[schema.key.length - 1]; this.onTrigger(event, { formData: formData, formId: this.props.id, propertyName: propertyName, value: value }); } else { var trigger = schema.triggers.find(function (t) { return t.onEvent === undefined; }); if (trigger) { this.onTrigger(event, { trigger: trigger, schema: schema, properties: formData, errors: errors, value: value }); } } } } /** * Triggers an onTrigger callback that is allowed to modify the form * @param event The event that triggered the callback * @param payload The trigger payload * trigger The type of trigger * schema The field schema */ }, { key: "onTrigger", value: function onTrigger(event, payload) { var onTrigger = this.props.onTrigger; if (!onTrigger) { return null; } if (this.props.moz) { return onTrigger(payload.formData, payload.formId, payload.propertyName, payload.value); } if (!payload.trigger) { throw new Error('onTrigger payload do not have required trigger property'); } return onTrigger(event, _objectSpread({ properties: this.props.properties, errors: this.props.errors }, payload)); } }, { key: "onActionClick", value: function onActionClick(actionOnClick) { var _this2 = this; if (typeof actionOnClick === 'function') { return function (event, data) { return actionOnClick(event, _objectSpread(_objectSpread({}, data), {}, { formData: _this2.props.properties, properties: _this2.props.properties })); }; } return function () {}; } /** * Triggers submit callback if form is valid * @param event the submit event */ }, { key: "onSubmit", value: function onSubmit(event) { if (this.props.onSubmit) { event.preventDefault(); } var mergedSchema = this.state.mergedSchema; var _this$props = this.props, properties = _this$props.properties, customValidation = _this$props.customValidation; var newErrors = (0, _validation.validateAll)(mergedSchema, properties, customValidation); Object.entries(this.props.errors).filter(function (entry) { return entry[0] in newErrors; }).reduce(function (accu, _ref7) { var _ref8 = _slicedToArray(_ref7, 2), key = _ref8[0], value = _ref8[1]; // eslint-disable-next-line no-param-reassign accu[key] = value; return accu; }, newErrors); var errors = Object.entries(newErrors).filter(function (entry) { return entry[1]; }).reduce(function (accu, _ref9) { var _ref10 = _slicedToArray(_ref9, 2), key = _ref10[0], value = _ref10[1]; // eslint-disable-next-line no-param-reassign accu[key] = value; return accu; }, {}); var isValid = !Object.keys(errors).length; this.props.setErrors(event, errors, !isValid ? this.focusFirstError : undefined); if (this.props.onSubmit && isValid) { if (this.props.moz) { this.props.onSubmit(null, { formData: properties }); } else { this.props.onSubmit(event, properties, mergedSchema); } } return isValid; } }, { key: "setFormRef", value: function setFormRef(element) { this.formRef = element; } }, { key: "focusFirstError", value: function focusFirstError() { if (!this.formRef) { return; } var elementWithError = this.formRef.querySelector('[aria-invalid="true"]'); if (elementWithError) { elementWithError.focus(); } } }, { key: "render", value: function render() { var _this3 = this; var _this$props2 = this.props, onSubmitEnter = _this$props2.onSubmitEnter, onSubmitLeave = _this$props2.onSubmitLeave, properties = _this$props2.properties; var actions = this.props.actions || [{ bsStyle: 'primary', label: 'Submit', type: 'submit', widget: 'button', position: 'right' }]; if (!this.state.mergedSchema) { return null; } if (onSubmitEnter) { actions = actions.map(function (action) { if (action.type === 'submit') { return _objectSpread(_objectSpread({}, action), {}, { onMouseEnter: function onMouseEnter(event) { return onSubmitEnter(event, properties); }, onMouseLeave: onSubmitLeave }); } return action; }); } var formTemplate = this.props.displayMode === 'text' ? _FormTemplate.TextModeFormTemplate : _FormTemplate.DefaultFormTemplate; var widgetsRenderer = function widgetsRenderer() { return _this3.state.mergedSchema.map(function (nextSchema, index) { return /*#__PURE__*/_react["default"].createElement(_Widget["default"], { id: _this3.props.id, idSeparator: _this3.props.idSeparator, key: index, onChange: _this3.onChange, onFinish: _this3.onFinish, onTrigger: _this3.onTrigger, schema: nextSchema, properties: _this3.props.properties, errors: _this3.props.errors, templates: _this3.props.templates, widgets: _this3.state.widgets, displayMode: _this3.props.displayMode, updating: _this3.props.updating }); }); }; var buttonsRenderer = function buttonsRenderer() { if (actions.length === 0) { return null; } return /*#__PURE__*/_react["default"].createElement("div", { className: (0, _classnames["default"])(_UIForm["default"]['form-actions'], 'tf-actions-wrapper'), key: "form-buttons" }, /*#__PURE__*/_react["default"].createElement(_Buttons["default"], { id: "".concat(_this3.props.id, "-actions"), onTrigger: _this3.onTrigger, className: _this3.props.buttonBlockClass, schema: { items: actions }, onClick: _this3.onActionClick, getComponent: _this3.props.getComponent })); }; return /*#__PURE__*/_react["default"].createElement("form", { acceptCharset: this.props.acceptCharset, action: this.props.action, autoComplete: this.props.autoComplete, className: (0, _classnames["default"])('tf-uiform', _UIForm["default"].uiform, this.props.className), encType: this.props.encType, id: this.props.id, method: this.props.method, name: this.props.name, noValidate: this.props.noHtml5Validate, onReset: this.props.onReset, onSubmit: this.onSubmit, target: this.props.target, ref: this.setFormRef }, formTemplate({ children: this.props.children, widgetsRenderer: widgetsRenderer, buttonsRenderer: buttonsRenderer })); } }]); return UIFormComponent; }(_react["default"].Component); exports.UIFormComponent = UIFormComponent; _defineProperty(UIFormComponent, "displayName", 'TalendUIForm'); var I18NUIForm = (0, _reactI18next.withTranslation)(_constants.I18N_DOMAIN_FORMS)(UIFormComponent); if (process.env.NODE_ENV !== 'production') { I18NUIForm.propTypes = _objectSpread(_objectSpread({}, _propTypes2.formPropTypes), {}, { /** Form definition: Json schema that specify the data model */ jsonSchema: _propTypes["default"].object.isRequired, // eslint-disable-line react/forbid-prop-types /** Form definition: UI schema that specify how to render the fields */ uiSchema: _propTypes["default"].array.isRequired, // eslint-disable-line react/forbid-prop-types /** * Form definition: Form fields values. * Note that it should contains @definitionName for triggers. */ properties: _propTypes["default"].object.isRequired, // eslint-disable-line react/forbid-prop-types /** Form definition: The forms errors { [fieldKey]: errorMessage } */ errors: _propTypes["default"].object.isRequired, // eslint-disable-line react/forbid-prop-types /** * Actions buttons to display at the bottom of the form. * If not provided, a single submit button is displayed. */ actions: _propTypes["default"].arrayOf(_Buttons["default"].propTypes.schema), /** * User callback: Custom validation function. * Prototype: function customValidation(schema, value, properties) * Return format : errorMessage String | falsy * This is triggered on fields that has their uiSchema > customValidation : true */ customValidation: _propTypes["default"].func, /* * Form definition: Custom formats */ customFormats: _propTypes["default"].object, /** * User callback: Trigger * Prototype: function onTrigger(event, { trigger, schema, properties }) */ onTrigger: _propTypes["default"].func, /** Custom templates */ templates: _propTypes["default"].object, /** Custom widgets */ widgets: _propTypes["default"].object, /** Display mode: example 'text' */ displayMode: _propTypes["default"].string, /** State management impl: The change callback */ onChange: _propTypes["default"].func.isRequired, /** State management impl: Set All fields validations errors */ setErrors: _propTypes["default"].func, getComponent: _propTypes["default"].func, onSubmitEnter: _propTypes["default"].func, onSubmitLeave: _propTypes["default"].func }); UIFormComponent.propTypes = I18NUIForm.propTypes; } I18NUIForm.defaultProps = { noHtml5Validate: true, buttonBlockClass: 'form-actions', properties: {} }; UIFormComponent.defaultProps = I18NUIForm.defaultProps; var _default = I18NUIForm; exports["default"] = _default; //# sourceMappingURL=UIForm.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4182 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _fields = _interopRequireDefault(__webpack_require__(4183)); var _templates = _interopRequireDefault(__webpack_require__(4184)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = { fields: _fields["default"], templates: _templates["default"] }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4183 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Input = _interopRequireDefault(__webpack_require__(1598)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = { Input: _Input["default"] }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4184 */ /***/ (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 _FieldTemplate = _interopRequireDefault(__webpack_require__(1599)); var utils = _interopRequireWildcard(__webpack_require__(1600)); 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 = { FieldTemplate: _FieldTemplate["default"], utils: utils }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4185 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"container":"FormSkeleton__container___39SPo","form-content":"FormSkeleton__form-content___Ntprp","form-content-wrapper":"FormSkeleton__form-content-wrapper___3JLE4","submit-wrapper":"FormSkeleton__submit-wrapper___1p86W","submit":"FormSkeleton__submit___3UVS0"}; /***/ }), /* 4186 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = FormSwitcher; var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(7)); var _UIForm = __webpack_require__(1604); var _FormSkeleton = _interopRequireDefault(__webpack_require__(1639)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var Form = function Form() { return /*#__PURE__*/_react["default"].createElement("div", { className: "alert alert-danger" }, "Error: You should compile using FORM_MOZ to use deprecated Form"); }; if (process.env.FORM_MOZ) { // eslint-disable-next-line global-require Form = __webpack_require__(1597); // eslint-disable-next-line no-console console.warn('FORM_MOZ is deprecated and will be removed in the next major release'); } function FormSwitcher(props) { if (props.loading) { return /*#__PURE__*/_react["default"].createElement(_FormSkeleton["default"], props); } if (props.data && !Array.isArray(props.data.uiSchema)) { return /*#__PURE__*/_react["default"].createElement(Form, props); } return /*#__PURE__*/_react["default"].createElement(_UIForm.UIForm, props); } FormSwitcher.propTypes = { loading: _propTypes["default"].bool, data: _propTypes["default"].shape({ uiSchema: _propTypes["default"].oneOfType([_propTypes["default"].array, _propTypes["default"].object]) }) }; //# sourceMappingURL=FormSwitcher.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4187 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = validate; var _ajv = _interopRequireDefault(__webpack_require__(4188)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function validate(jsonSchema, data) { if (!data || !jsonSchema) { return false; } var validator = new _ajv["default"]().compile(jsonSchema); return validator && validator(data); } //# sourceMappingURL=validate.js.map /***/ }), /* 4188 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var compileSchema = __webpack_require__(4189) , resolve = __webpack_require__(907) , Cache = __webpack_require__(4193) , SchemaObject = __webpack_require__(1640) , stableStringify = __webpack_require__(1641) , formats = __webpack_require__(4194) , rules = __webpack_require__(4195) , $dataMetaSchema = __webpack_require__(4216) , util = __webpack_require__(320); module.exports = Ajv; Ajv.prototype.validate = validate; Ajv.prototype.compile = compile; Ajv.prototype.addSchema = addSchema; Ajv.prototype.addMetaSchema = addMetaSchema; Ajv.prototype.validateSchema = validateSchema; Ajv.prototype.getSchema = getSchema; Ajv.prototype.removeSchema = removeSchema; Ajv.prototype.addFormat = addFormat; Ajv.prototype.errorsText = errorsText; Ajv.prototype._addSchema = _addSchema; Ajv.prototype._compile = _compile; Ajv.prototype.compileAsync = __webpack_require__(4217); var customKeyword = __webpack_require__(4218); Ajv.prototype.addKeyword = customKeyword.add; Ajv.prototype.getKeyword = customKeyword.get; Ajv.prototype.removeKeyword = customKeyword.remove; Ajv.prototype.validateKeyword = customKeyword.validate; var errorClasses = __webpack_require__(909); Ajv.ValidationError = errorClasses.Validation; Ajv.MissingRefError = errorClasses.MissingRef; Ajv.$dataMetaSchema = $dataMetaSchema; var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; var META_SUPPORT_DATA = ['/properties']; /** * Creates validator instance. * Usage: `Ajv(opts)` * @param {Object} opts optional options * @return {Object} ajv instance */ function Ajv(opts) { if (!(this instanceof Ajv)) return new Ajv(opts); opts = this._opts = util.copy(opts) || {}; setLogger(this); this._schemas = {}; this._refs = {}; this._fragments = {}; this._formats = formats(opts.format); this._cache = opts.cache || new Cache; this._loadingSchemas = {}; this._compilations = []; this.RULES = rules(); this._getId = chooseGetId(opts); opts.loopRequired = opts.loopRequired || Infinity; if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; if (opts.serialize === undefined) opts.serialize = stableStringify; this._metaOpts = getMetaSchemaOptions(this); if (opts.formats) addInitialFormats(this); addDefaultMetaSchema(this); if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); addInitialSchemas(this); } /** * Validate data using schema * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. * @this Ajv * @param {String|Object} schemaKeyRef key, ref or schema object * @param {Any} data to be validated * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). */ function validate(schemaKeyRef, data) { var v; if (typeof schemaKeyRef == 'string') { v = this.getSchema(schemaKeyRef); if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); } else { var schemaObj = this._addSchema(schemaKeyRef); v = schemaObj.validate || this._compile(schemaObj); } var valid = v(data); if (v.$async !== true) this.errors = v.errors; return valid; } /** * Create validating function for passed schema. * @this Ajv * @param {Object} schema schema object * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. * @return {Function} validating function */ function compile(schema, _meta) { var schemaObj = this._addSchema(schema, undefined, _meta); return schemaObj.validate || this._compile(schemaObj); } /** * Adds schema to the instance. * @this Ajv * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. * @return {Ajv} this for method chaining */ function addSchema(schema, key, _skipValidation, _meta) { if (Array.isArray(schema)){ for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta); return this; } var id = this._getId(schema); if (id !== undefined && typeof id != 'string') throw new Error('schema id must be string'); key = resolve.normalizeId(key || id); checkUnique(this, key); this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true); return this; } /** * Add schema that will be used to validate other schemas * options in META_IGNORE_OPTIONS are alway set to false * @this Ajv * @param {Object} schema schema object * @param {String} key optional schema key * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema * @return {Ajv} this for method chaining */ function addMetaSchema(schema, key, skipValidation) { this.addSchema(schema, key, skipValidation, true); return this; } /** * Validate schema * @this Ajv * @param {Object} schema schema to validate * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid * @return {Boolean} true if schema is valid */ function validateSchema(schema, throwOrLogError) { var $schema = schema.$schema; if ($schema !== undefined && typeof $schema != 'string') throw new Error('$schema must be a string'); $schema = $schema || this._opts.defaultMeta || defaultMeta(this); if (!$schema) { this.logger.warn('meta-schema not available'); this.errors = null; return true; } var valid = this.validate($schema, schema); if (!valid && throwOrLogError) { var message = 'schema is invalid: ' + this.errorsText(); if (this._opts.validateSchema == 'log') this.logger.error(message); else throw new Error(message); } return valid; } function defaultMeta(self) { var meta = self._opts.meta; self._opts.defaultMeta = typeof meta == 'object' ? self._getId(meta) || meta : self.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined; return self._opts.defaultMeta; } /** * Get compiled schema from the instance by `key` or `ref`. * @this Ajv * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id). * @return {Function} schema validating function (with property `schema`). */ function getSchema(keyRef) { var schemaObj = _getSchemaObj(this, keyRef); switch (typeof schemaObj) { case 'object': return schemaObj.validate || this._compile(schemaObj); case 'string': return this.getSchema(schemaObj); case 'undefined': return _getSchemaFragment(this, keyRef); } } function _getSchemaFragment(self, ref) { var res = resolve.schema.call(self, { schema: {} }, ref); if (res) { var schema = res.schema , root = res.root , baseId = res.baseId; var v = compileSchema.call(self, schema, root, undefined, baseId); self._fragments[ref] = new SchemaObject({ ref: ref, fragment: true, schema: schema, root: root, baseId: baseId, validate: v }); return v; } } function _getSchemaObj(self, keyRef) { keyRef = resolve.normalizeId(keyRef); return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef]; } /** * Remove cached schema(s). * If no parameter is passed all schemas but meta-schemas are removed. * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. * Even if schema is referenced by other schemas it still can be removed as other schemas have local references. * @this Ajv * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object * @return {Ajv} this for method chaining */ function removeSchema(schemaKeyRef) { if (schemaKeyRef instanceof RegExp) { _removeAllSchemas(this, this._schemas, schemaKeyRef); _removeAllSchemas(this, this._refs, schemaKeyRef); return this; } switch (typeof schemaKeyRef) { case 'undefined': _removeAllSchemas(this, this._schemas); _removeAllSchemas(this, this._refs); this._cache.clear(); return this; case 'string': var schemaObj = _getSchemaObj(this, schemaKeyRef); if (schemaObj) this._cache.del(schemaObj.cacheKey); delete this._schemas[schemaKeyRef]; delete this._refs[schemaKeyRef]; return this; case 'object': var serialize = this._opts.serialize; var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef; this._cache.del(cacheKey); var id = this._getId(schemaKeyRef); if (id) { id = resolve.normalizeId(id); delete this._schemas[id]; delete this._refs[id]; } } return this; } function _removeAllSchemas(self, schemas, regex) { for (var keyRef in schemas) { var schemaObj = schemas[keyRef]; if (!schemaObj.meta && (!regex || regex.test(keyRef))) { self._cache.del(schemaObj.cacheKey); delete schemas[keyRef]; } } } /* @this Ajv */ function _addSchema(schema, skipValidation, meta, shouldAddSchema) { if (typeof schema != 'object' && typeof schema != 'boolean') throw new Error('schema should be object or boolean'); var serialize = this._opts.serialize; var cacheKey = serialize ? serialize(schema) : schema; var cached = this._cache.get(cacheKey); if (cached) return cached; shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; var id = resolve.normalizeId(this._getId(schema)); if (id && shouldAddSchema) checkUnique(this, id); var willValidate = this._opts.validateSchema !== false && !skipValidation; var recursiveMeta; if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema))) this.validateSchema(schema, true); var localRefs = resolve.ids.call(this, schema); var schemaObj = new SchemaObject({ id: id, schema: schema, localRefs: localRefs, cacheKey: cacheKey, meta: meta }); if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj; this._cache.put(cacheKey, schemaObj); if (willValidate && recursiveMeta) this.validateSchema(schema, true); return schemaObj; } /* @this Ajv */ function _compile(schemaObj, root) { if (schemaObj.compiling) { schemaObj.validate = callValidate; callValidate.schema = schemaObj.schema; callValidate.errors = null; callValidate.root = root ? root : callValidate; if (schemaObj.schema.$async === true) callValidate.$async = true; return callValidate; } schemaObj.compiling = true; var currentOpts; if (schemaObj.meta) { currentOpts = this._opts; this._opts = this._metaOpts; } var v; try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); } catch(e) { delete schemaObj.validate; throw e; } finally { schemaObj.compiling = false; if (schemaObj.meta) this._opts = currentOpts; } schemaObj.validate = v; schemaObj.refs = v.refs; schemaObj.refVal = v.refVal; schemaObj.root = v.root; return v; /* @this {*} - custom context, see passContext option */ function callValidate() { /* jshint validthis: true */ var _validate = schemaObj.validate; var result = _validate.apply(this, arguments); callValidate.errors = _validate.errors; return result; } } function chooseGetId(opts) { switch (opts.schemaId) { case 'auto': return _get$IdOrId; case 'id': return _getId; default: return _get$Id; } } /* @this Ajv */ function _getId(schema) { if (schema.$id) this.logger.warn('schema $id ignored', schema.$id); return schema.id; } /* @this Ajv */ function _get$Id(schema) { if (schema.id) this.logger.warn('schema id ignored', schema.id); return schema.$id; } function _get$IdOrId(schema) { if (schema.$id && schema.id && schema.$id != schema.id) throw new Error('schema $id is different from id'); return schema.$id || schema.id; } /** * Convert array of error message objects to string * @this Ajv * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used. * @param {Object} options optional options with properties `separator` and `dataVar`. * @return {String} human readable string with all errors descriptions */ function errorsText(errors, options) { errors = errors || this.errors; if (!errors) return 'No errors'; options = options || {}; var separator = options.separator === undefined ? ', ' : options.separator; var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; var text = ''; for (var i=0; i<errors.length; i++) { var e = errors[i]; if (e) text += dataVar + e.dataPath + ' ' + e.message + separator; } return text.slice(0, -separator.length); } /** * Add custom format * @this Ajv * @param {String} name format name * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid) * @return {Ajv} this for method chaining */ function addFormat(name, format) { if (typeof format == 'string') format = new RegExp(format); this._formats[name] = format; return this; } function addDefaultMetaSchema(self) { var $dataSchema; if (self._opts.$data) { $dataSchema = __webpack_require__(4221); self.addMetaSchema($dataSchema, $dataSchema.$id, true); } if (self._opts.meta === false) return; var metaSchema = __webpack_require__(1647); if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA); self.addMetaSchema(metaSchema, META_SCHEMA_ID, true); self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID; } function addInitialSchemas(self) { var optsSchemas = self._opts.schemas; if (!optsSchemas) return; if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas); else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key); } function addInitialFormats(self) { for (var name in self._opts.formats) { var format = self._opts.formats[name]; self.addFormat(name, format); } } function checkUnique(self, id) { if (self._schemas[id] || self._refs[id]) throw new Error('schema with key or id "' + id + '" already exists'); } function getMetaSchemaOptions(self) { var metaOpts = util.copy(self._opts); for (var i=0; i<META_IGNORE_OPTIONS.length; i++) delete metaOpts[META_IGNORE_OPTIONS[i]]; return metaOpts; } function setLogger(self) { var logger = self._opts.logger; if (logger === false) { self.logger = {log: noop, warn: noop, error: noop}; } else { if (logger === undefined) logger = console; if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error)) throw new Error('logger must implement log, warn and error methods'); self.logger = logger; } } function noop() {} /***/ }), /* 4189 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var resolve = __webpack_require__(907) , util = __webpack_require__(320) , errorClasses = __webpack_require__(909) , stableStringify = __webpack_require__(1641); var validateGenerator = __webpack_require__(1642); /** * Functions below are used inside compiled validations function */ var ucs2length = util.ucs2length; var equal = __webpack_require__(908); // this error is thrown by async schemas to return validation errors via exception var ValidationError = errorClasses.Validation; module.exports = compile; /** * Compiles schema to validation function * @this Ajv * @param {Object} schema schema object * @param {Object} root object with information about the root schema for this schema * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution * @param {String} baseId base ID for IDs in the schema * @return {Function} validation function */ function compile(schema, root, localRefs, baseId) { /* jshint validthis: true, evil: true */ /* eslint no-shadow: 0 */ var self = this , opts = this._opts , refVal = [ undefined ] , refs = {} , patterns = [] , patternsHash = {} , defaults = [] , defaultsHash = {} , customRules = []; root = root || { schema: schema, refVal: refVal, refs: refs }; var c = checkCompiling.call(this, schema, root, baseId); var compilation = this._compilations[c.index]; if (c.compiling) return (compilation.callValidate = callValidate); var formats = this._formats; var RULES = this.RULES; try { var v = localCompile(schema, root, localRefs, baseId); compilation.validate = v; var cv = compilation.callValidate; if (cv) { cv.schema = v.schema; cv.errors = null; cv.refs = v.refs; cv.refVal = v.refVal; cv.root = v.root; cv.$async = v.$async; if (opts.sourceCode) cv.source = v.source; } return v; } finally { endCompiling.call(this, schema, root, baseId); } /* @this {*} - custom context, see passContext option */ function callValidate() { /* jshint validthis: true */ var validate = compilation.validate; var result = validate.apply(this, arguments); callValidate.errors = validate.errors; return result; } function localCompile(_schema, _root, localRefs, baseId) { var isRoot = !_root || (_root && _root.schema == _schema); if (_root.schema != root.schema) return compile.call(self, _schema, _root, localRefs, baseId); var $async = _schema.$async === true; var sourceCode = validateGenerator({ isTop: true, schema: _schema, isRoot: isRoot, baseId: baseId, root: _root, schemaPath: '', errSchemaPath: '#', errorPath: '""', MissingRefError: errorClasses.MissingRef, RULES: RULES, validate: validateGenerator, util: util, resolve: resolve, resolveRef: resolveRef, usePattern: usePattern, useDefault: useDefault, useCustomRule: useCustomRule, opts: opts, formats: formats, logger: self.logger, self: self }); sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + sourceCode; if (opts.processCode) sourceCode = opts.processCode(sourceCode); // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); var validate; try { var makeValidate = new Function( 'self', 'RULES', 'formats', 'root', 'refVal', 'defaults', 'customRules', 'equal', 'ucs2length', 'ValidationError', sourceCode ); validate = makeValidate( self, RULES, formats, root, refVal, defaults, customRules, equal, ucs2length, ValidationError ); refVal[0] = validate; } catch(e) { self.logger.error('Error compiling schema, function code:', sourceCode); throw e; } validate.schema = _schema; validate.errors = null; validate.refs = refs; validate.refVal = refVal; validate.root = isRoot ? validate : _root; if ($async) validate.$async = true; if (opts.sourceCode === true) { validate.source = { code: sourceCode, patterns: patterns, defaults: defaults }; } return validate; } function resolveRef(baseId, ref, isRoot) { ref = resolve.url(baseId, ref); var refIndex = refs[ref]; var _refVal, refCode; if (refIndex !== undefined) { _refVal = refVal[refIndex]; refCode = 'refVal[' + refIndex + ']'; return resolvedRef(_refVal, refCode); } if (!isRoot && root.refs) { var rootRefId = root.refs[ref]; if (rootRefId !== undefined) { _refVal = root.refVal[rootRefId]; refCode = addLocalRef(ref, _refVal); return resolvedRef(_refVal, refCode); } } refCode = addLocalRef(ref); var v = resolve.call(self, localCompile, root, ref); if (v === undefined) { var localSchema = localRefs && localRefs[ref]; if (localSchema) { v = resolve.inlineRef(localSchema, opts.inlineRefs) ? localSchema : compile.call(self, localSchema, root, localRefs, baseId); } } if (v === undefined) { removeLocalRef(ref); } else { replaceLocalRef(ref, v); return resolvedRef(v, refCode); } } function addLocalRef(ref, v) { var refId = refVal.length; refVal[refId] = v; refs[ref] = refId; return 'refVal' + refId; } function removeLocalRef(ref) { delete refs[ref]; } function replaceLocalRef(ref, v) { var refId = refs[ref]; refVal[refId] = v; } function resolvedRef(refVal, code) { return typeof refVal == 'object' || typeof refVal == 'boolean' ? { code: code, schema: refVal, inline: true } : { code: code, $async: refVal && !!refVal.$async }; } function usePattern(regexStr) { var index = patternsHash[regexStr]; if (index === undefined) { index = patternsHash[regexStr] = patterns.length; patterns[index] = regexStr; } return 'pattern' + index; } function useDefault(value) { switch (typeof value) { case 'boolean': case 'number': return '' + value; case 'string': return util.toQuotedString(value); case 'object': if (value === null) return 'null'; var valueStr = stableStringify(value); var index = defaultsHash[valueStr]; if (index === undefined) { index = defaultsHash[valueStr] = defaults.length; defaults[index] = value; } return 'default' + index; } } function useCustomRule(rule, schema, parentSchema, it) { if (self._opts.validateSchema !== false) { var deps = rule.definition.dependencies; if (deps && !deps.every(function(keyword) { return Object.prototype.hasOwnProperty.call(parentSchema, keyword); })) throw new Error('parent schema must have all required keywords: ' + deps.join(',')); var validateSchema = rule.definition.validateSchema; if (validateSchema) { var valid = validateSchema(schema); if (!valid) { var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); if (self._opts.validateSchema == 'log') self.logger.error(message); else throw new Error(message); } } } var compile = rule.definition.compile , inline = rule.definition.inline , macro = rule.definition.macro; var validate; if (compile) { validate = compile.call(self, schema, parentSchema, it); } else if (macro) { validate = macro.call(self, schema, parentSchema, it); if (opts.validateSchema !== false) self.validateSchema(validate, true); } else if (inline) { validate = inline.call(self, it, rule.keyword, schema, parentSchema); } else { validate = rule.definition.validate; if (!validate) return; } if (validate === undefined) throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); var index = customRules.length; customRules[index] = validate; return { code: 'customRule' + index, validate: validate }; } } /** * Checks if the schema is currently compiled * @this Ajv * @param {Object} schema schema to compile * @param {Object} root root object * @param {String} baseId base schema ID * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) */ function checkCompiling(schema, root, baseId) { /* jshint validthis: true */ var index = compIndex.call(this, schema, root, baseId); if (index >= 0) return { index: index, compiling: true }; index = this._compilations.length; this._compilations[index] = { schema: schema, root: root, baseId: baseId }; return { index: index, compiling: false }; } /** * Removes the schema from the currently compiled list * @this Ajv * @param {Object} schema schema to compile * @param {Object} root root object * @param {String} baseId base schema ID */ function endCompiling(schema, root, baseId) { /* jshint validthis: true */ var i = compIndex.call(this, schema, root, baseId); if (i >= 0) this._compilations.splice(i, 1); } /** * Index of schema compilation in the currently compiled list * @this Ajv * @param {Object} schema schema to compile * @param {Object} root root object * @param {String} baseId base schema ID * @return {Integer} compilation index */ function compIndex(schema, root, baseId) { /* jshint validthis: true */ for (var i=0; i<this._compilations.length; i++) { var c = this._compilations[i]; if (c.schema == schema && c.root == root && c.baseId == baseId) return i; } return -1; } function patternCode(i, patterns) { return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');'; } function defaultCode(i) { return 'var default' + i + ' = defaults[' + i + '];'; } function refValCode(i, refVal) { return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];'; } function customRuleCode(i) { return 'var customRule' + i + ' = customRules[' + i + '];'; } function vars(arr, statement) { if (!arr.length) return ''; var code = ''; for (var i=0; i<arr.length; i++) code += statement(i, arr); return code; } /***/ }), /* 4190 */ /***/ (function(module, exports, __webpack_require__) { /** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ (function (global, factory) { true ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (factory((global.URI = global.URI || {}))); }(this, (function (exports) { 'use strict'; function merge() { for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { sets[_key] = arguments[_key]; } if (sets.length > 1) { sets[0] = sets[0].slice(0, -1); var xl = sets.length - 1; for (var x = 1; x < xl; ++x) { sets[x] = sets[x].slice(1, -1); } sets[xl] = sets[xl].slice(1); return sets.join(''); } else { return sets[0]; } } function subexp(str) { return "(?:" + str + ")"; } function typeOf(o) { return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); } function toUpperCase(str) { return str.toUpperCase(); } function toArray(obj) { return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; } function assign(target, source) { var obj = target; if (source) { for (var key in source) { obj[key] = source[key]; } } return obj; } function buildExps(isIRI) { var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", //subset, excludes bidi control characters IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), //relaxed parsing rules IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), // 6( h16 ":" ) ls32 IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32 IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32 IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32 IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), //[ *5( h16 ":" ) h16 ] "::" h16 IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), //[ *6( h16 ":" ) h16 ] "::" IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), //RFC 6874 IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), //RFC 6874 IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), //RFC 6874, with relaxed parsing rules IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), //RFC 6874 REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), //simplified PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; return { NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), UNRESERVED: new RegExp(UNRESERVED$$, "g"), OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules }; } var URI_PROTOCOL = buildExps(false); var IRI_PROTOCOL = buildExps(true); var slicedToArray = function () { function sliceIterator(arr, i) { 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"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var toConsumableArray = function (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); } }; /** Highest positive signed 32-bit float value */ var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 /** Bootstring parameters */ var base = 36; var tMin = 1; var tMax = 26; var skew = 38; var damp = 700; var initialBias = 72; var initialN = 128; // 0x80 var delimiter = '-'; // '\x2D' /** Regular expressions */ var regexPunycode = /^xn--/; var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators /** Error messages */ var errors = { 'overflow': 'Overflow: input needs wider integers to process', 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', 'invalid-input': 'Invalid input' }; /** Convenience shortcuts */ var baseMinusTMin = base - tMin; var floor = Math.floor; var stringFromCharCode = String.fromCharCode; /*--------------------------------------------------------------------------*/ /** * A generic error utility function. * @private * @param {String} type The error type. * @returns {Error} Throws a `RangeError` with the applicable error message. */ function error$1(type) { throw new RangeError(errors[type]); } /** * A generic `Array#map` utility function. * @private * @param {Array} array The array to iterate over. * @param {Function} callback The function that gets called for every array * item. * @returns {Array} A new array of values returned by the callback function. */ function map(array, fn) { var result = []; var length = array.length; while (length--) { result[length] = fn(array[length]); } return result; } /** * A simple `Array#map`-like wrapper to work with domain name strings or email * addresses. * @private * @param {String} domain The domain name or email address. * @param {Function} callback The function that gets called for every * character. * @returns {Array} A new string of characters returned by the callback * function. */ function mapDomain(string, fn) { var parts = string.split('@'); var result = ''; if (parts.length > 1) { // In email addresses, only the domain name should be punycoded. Leave // the local part (i.e. everything up to `@`) intact. result = parts[0] + '@'; string = parts[1]; } // Avoid `split(regex)` for IE8 compatibility. See #17. string = string.replace(regexSeparators, '\x2E'); var labels = string.split('.'); var encoded = map(labels, fn).join('.'); return result + encoded; } /** * Creates an array containing the numeric code points of each Unicode * character in the string. While JavaScript uses UCS-2 internally, * this function will convert a pair of surrogate halves (each of which * UCS-2 exposes as separate characters) into a single code point, * matching UTF-16. * @see `punycode.ucs2.encode` * @see <https://mathiasbynens.be/notes/javascript-encoding> * @memberOf punycode.ucs2 * @name decode * @param {String} string The Unicode input string (UCS-2). * @returns {Array} The new array of code points. */ function ucs2decode(string) { var output = []; var counter = 0; var length = string.length; while (counter < length) { var value = string.charCodeAt(counter++); if (value >= 0xD800 && value <= 0xDBFF && counter < length) { // It's a high surrogate, and there is a next character. var extra = string.charCodeAt(counter++); if ((extra & 0xFC00) == 0xDC00) { // Low surrogate. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); } else { // It's an unmatched surrogate; only append this code unit, in case the // next code unit is the high surrogate of a surrogate pair. output.push(value); counter--; } } else { output.push(value); } } return output; } /** * Creates a string based on an array of numeric code points. * @see `punycode.ucs2.decode` * @memberOf punycode.ucs2 * @name encode * @param {Array} codePoints The array of numeric code points. * @returns {String} The new Unicode string (UCS-2). */ var ucs2encode = function ucs2encode(array) { return String.fromCodePoint.apply(String, toConsumableArray(array)); }; /** * Converts a basic code point into a digit/integer. * @see `digitToBasic()` * @private * @param {Number} codePoint The basic numeric code point value. * @returns {Number} The numeric value of a basic code point (for use in * representing integers) in the range `0` to `base - 1`, or `base` if * the code point does not represent a value. */ var basicToDigit = function basicToDigit(codePoint) { if (codePoint - 0x30 < 0x0A) { return codePoint - 0x16; } if (codePoint - 0x41 < 0x1A) { return codePoint - 0x41; } if (codePoint - 0x61 < 0x1A) { return codePoint - 0x61; } return base; }; /** * Converts a digit/integer into a basic code point. * @see `basicToDigit()` * @private * @param {Number} digit The numeric value of a basic code point. * @returns {Number} The basic code point whose value (when used for * representing integers) is `digit`, which needs to be in the range * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is * used; else, the lowercase form is used. The behavior is undefined * if `flag` is non-zero and `digit` has no uppercase form. */ var digitToBasic = function digitToBasic(digit, flag) { // 0..25 map to ASCII a..z or A..Z // 26..35 map to ASCII 0..9 return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); }; /** * Bias adaptation function as per section 3.4 of RFC 3492. * https://tools.ietf.org/html/rfc3492#section-3.4 * @private */ var adapt = function adapt(delta, numPoints, firstTime) { var k = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { delta = floor(delta / baseMinusTMin); } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }; /** * Converts a Punycode string of ASCII-only symbols to a string of Unicode * symbols. * @memberOf punycode * @param {String} input The Punycode string of ASCII-only symbols. * @returns {String} The resulting string of Unicode symbols. */ var decode = function decode(input) { // Don't use UCS-2. var output = []; var inputLength = input.length; var i = 0; var n = initialN; var bias = initialBias; // Handle the basic code points: let `basic` be the number of input code // points before the last delimiter, or `0` if there is none, then copy // the first basic code points to the output. var basic = input.lastIndexOf(delimiter); if (basic < 0) { basic = 0; } for (var j = 0; j < basic; ++j) { // if it's not a basic code point if (input.charCodeAt(j) >= 0x80) { error$1('not-basic'); } output.push(input.charCodeAt(j)); } // Main decoding loop: start just after the last delimiter if any basic code // points were copied; start at the beginning otherwise. for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ // `index` is the index of the next character to be consumed. // Decode a generalized variable-length integer into `delta`, // which gets added to `i`. The overflow checking is easier // if we increase `i` as we go, then subtract off its starting // value at the end to obtain `delta`. var oldi = i; for (var w = 1, k = base;; /* no condition */k += base) { if (index >= inputLength) { error$1('invalid-input'); } var digit = basicToDigit(input.charCodeAt(index++)); if (digit >= base || digit > floor((maxInt - i) / w)) { error$1('overflow'); } i += digit * w; var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; if (digit < t) { break; } var baseMinusT = base - t; if (w > floor(maxInt / baseMinusT)) { error$1('overflow'); } w *= baseMinusT; } var out = output.length + 1; bias = adapt(i - oldi, out, oldi == 0); // `i` was supposed to wrap around from `out` to `0`, // incrementing `n` each time, so we'll fix that now: if (floor(i / out) > maxInt - n) { error$1('overflow'); } n += floor(i / out); i %= out; // Insert `n` at position `i` of the output. output.splice(i++, 0, n); } return String.fromCodePoint.apply(String, output); }; /** * Converts a string of Unicode symbols (e.g. a domain name label) to a * Punycode string of ASCII-only symbols. * @memberOf punycode * @param {String} input The string of Unicode symbols. * @returns {String} The resulting Punycode string of ASCII-only symbols. */ var encode = function encode(input) { var output = []; // Convert the input in UCS-2 to an array of Unicode code points. input = ucs2decode(input); // Cache the length. var inputLength = input.length; // Initialize the state. var n = initialN; var delta = 0; var bias = initialBias; // Handle the basic code points. var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var _currentValue2 = _step.value; if (_currentValue2 < 0x80) { output.push(stringFromCharCode(_currentValue2)); } } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator.return) { _iterator.return(); } } finally { if (_didIteratorError) { throw _iteratorError; } } } var basicLength = output.length; var handledCPCount = basicLength; // `handledCPCount` is the number of code points that have been handled; // `basicLength` is the number of basic code points. // Finish the basic string with a delimiter unless it's empty. if (basicLength) { output.push(delimiter); } // Main encoding loop: while (handledCPCount < inputLength) { // All non-basic code points < n have been handled already. Find the next // larger one: var m = maxInt; var _iteratorNormalCompletion2 = true; var _didIteratorError2 = false; var _iteratorError2 = undefined; try { for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { var currentValue = _step2.value; if (currentValue >= n && currentValue < m) { m = currentValue; } } // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, // but guard against overflow. } catch (err) { _didIteratorError2 = true; _iteratorError2 = err; } finally { try { if (!_iteratorNormalCompletion2 && _iterator2.return) { _iterator2.return(); } } finally { if (_didIteratorError2) { throw _iteratorError2; } } } var handledCPCountPlusOne = handledCPCount + 1; if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { error$1('overflow'); } delta += (m - n) * handledCPCountPlusOne; n = m; var _iteratorNormalCompletion3 = true; var _didIteratorError3 = false; var _iteratorError3 = undefined; try { for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { var _currentValue = _step3.value; if (_currentValue < n && ++delta > maxInt) { error$1('overflow'); } if (_currentValue == n) { // Represent delta as a generalized variable-length integer. var q = delta; for (var k = base;; /* no condition */k += base) { var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; if (q < t) { break; } var qMinusT = q - t; var baseMinusT = base - t; output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); q = floor(qMinusT / baseMinusT); } output.push(stringFromCharCode(digitToBasic(q, 0))); bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); delta = 0; ++handledCPCount; } } } catch (err) { _didIteratorError3 = true; _iteratorError3 = err; } finally { try { if (!_iteratorNormalCompletion3 && _iterator3.return) { _iterator3.return(); } } finally { if (_didIteratorError3) { throw _iteratorError3; } } } ++delta; ++n; } return output.join(''); }; /** * Converts a Punycode string representing a domain name or an email address * to Unicode. Only the Punycoded parts of the input will be converted, i.e. * it doesn't matter if you call it on a string that has already been * converted to Unicode. * @memberOf punycode * @param {String} input The Punycoded domain name or email address to * convert to Unicode. * @returns {String} The Unicode representation of the given Punycode * string. */ var toUnicode = function toUnicode(input) { return mapDomain(input, function (string) { return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; }); }; /** * Converts a Unicode string representing a domain name or an email address to * Punycode. Only the non-ASCII parts of the domain name will be converted, * i.e. it doesn't matter if you call it with a domain that's already in * ASCII. * @memberOf punycode * @param {String} input The domain name or email address to convert, as a * Unicode string. * @returns {String} The Punycode representation of the given domain name or * email address. */ var toASCII = function toASCII(input) { return mapDomain(input, function (string) { return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; }); }; /*--------------------------------------------------------------------------*/ /** Define the public API */ var punycode = { /** * A string representing the current Punycode.js version number. * @memberOf punycode * @type String */ 'version': '2.1.0', /** * An object of methods to convert from JavaScript's internal character * representation (UCS-2) to Unicode code points, and back. * @see <https://mathiasbynens.be/notes/javascript-encoding> * @memberOf punycode * @type Object */ 'ucs2': { 'decode': ucs2decode, 'encode': ucs2encode }, 'decode': decode, 'encode': encode, 'toASCII': toASCII, 'toUnicode': toUnicode }; /** * URI.js * * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. * @author <a href="mailto:gary.court@gmail.com">Gary Court</a> * @see http://github.com/garycourt/uri-js */ /** * Copyright 2011 Gary Court. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. 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. * * THIS SOFTWARE IS PROVIDED BY GARY COURT ``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 GARY COURT OR * CONTRIBUTORS 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. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of Gary Court. */ var SCHEMES = {}; function pctEncChar(chr) { var c = chr.charCodeAt(0); var e = void 0; if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); return e; } function pctDecChars(str) { var newStr = ""; var i = 0; var il = str.length; while (i < il) { var c = parseInt(str.substr(i + 1, 2), 16); if (c < 128) { newStr += String.fromCharCode(c); i += 3; } else if (c >= 194 && c < 224) { if (il - i >= 6) { var c2 = parseInt(str.substr(i + 4, 2), 16); newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); } else { newStr += str.substr(i, 6); } i += 6; } else if (c >= 224) { if (il - i >= 9) { var _c = parseInt(str.substr(i + 4, 2), 16); var c3 = parseInt(str.substr(i + 7, 2), 16); newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); } else { newStr += str.substr(i, 9); } i += 9; } else { newStr += str.substr(i, 3); i += 3; } } return newStr; } function _normalizeComponentEncoding(components, protocol) { function decodeUnreserved(str) { var decStr = pctDecChars(str); return !decStr.match(protocol.UNRESERVED) ? str : decStr; } if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); return components; } function _stripLeadingZeros(str) { return str.replace(/^0*(.*)/, "$1") || "0"; } function _normalizeIPv4(host, protocol) { var matches = host.match(protocol.IPV4ADDRESS) || []; var _matches = slicedToArray(matches, 2), address = _matches[1]; if (address) { return address.split(".").map(_stripLeadingZeros).join("."); } else { return host; } } function _normalizeIPv6(host, protocol) { var matches = host.match(protocol.IPV6ADDRESS) || []; var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2]; if (address) { var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1]; var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; var lastFields = last.split(":").map(_stripLeadingZeros); var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); var fieldCount = isLastFieldIPv4Address ? 7 : 8; var lastFieldsStart = lastFields.length - fieldCount; var fields = Array(fieldCount); for (var x = 0; x < fieldCount; ++x) { fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; } if (isLastFieldIPv4Address) { fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); } var allZeroFields = fields.reduce(function (acc, field, index) { if (!field || field === "0") { var lastLongest = acc[acc.length - 1]; if (lastLongest && lastLongest.index + lastLongest.length === index) { lastLongest.length++; } else { acc.push({ index: index, length: 1 }); } } return acc; }, []); var longestZeroFields = allZeroFields.sort(function (a, b) { return b.length - a.length; })[0]; var newHost = void 0; if (longestZeroFields && longestZeroFields.length > 1) { var newFirst = fields.slice(0, longestZeroFields.index); var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); newHost = newFirst.join(":") + "::" + newLast.join(":"); } else { newHost = fields.join(":"); } if (zone) { newHost += "%" + zone; } return newHost; } else { return host; } } var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; function parse(uriString) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var components = {}; var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; var matches = uriString.match(URI_PARSE); if (matches) { if (NO_MATCH_IS_UNDEFINED) { //store each component components.scheme = matches[1]; components.userinfo = matches[3]; components.host = matches[4]; components.port = parseInt(matches[5], 10); components.path = matches[6] || ""; components.query = matches[7]; components.fragment = matches[8]; //fix port number if (isNaN(components.port)) { components.port = matches[5]; } } else { //IE FIX for improper RegExp matching //store each component components.scheme = matches[1] || undefined; components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; components.port = parseInt(matches[5], 10); components.path = matches[6] || ""; components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; //fix port number if (isNaN(components.port)) { components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; } } if (components.host) { //normalize IP hosts components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); } //determine reference type if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { components.reference = "same-document"; } else if (components.scheme === undefined) { components.reference = "relative"; } else if (components.fragment === undefined) { components.reference = "absolute"; } else { components.reference = "uri"; } //check for reference errors if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { components.error = components.error || "URI is not a " + options.reference + " reference."; } //find scheme handler var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; //check if scheme can't handle IRIs if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { //if host component is a domain name if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { //convert Unicode IDN -> ASCII IDN try { components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); } catch (e) { components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; } } //convert IRI -> URI _normalizeComponentEncoding(components, URI_PROTOCOL); } else { //normalize encodings _normalizeComponentEncoding(components, protocol); } //perform scheme specific parsing if (schemeHandler && schemeHandler.parse) { schemeHandler.parse(components, options); } } else { components.error = components.error || "URI can not be parsed."; } return components; } function _recomposeAuthority(components, options) { var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; var uriTokens = []; if (components.userinfo !== undefined) { uriTokens.push(components.userinfo); uriTokens.push("@"); } if (components.host !== undefined) { //normalize IP hosts, add brackets and escape zone separator for IPv6 uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; })); } if (typeof components.port === "number") { uriTokens.push(":"); uriTokens.push(components.port.toString(10)); } return uriTokens.length ? uriTokens.join("") : undefined; } var RDS1 = /^\.\.?\//; var RDS2 = /^\/\.(\/|$)/; var RDS3 = /^\/\.\.(\/|$)/; var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; function removeDotSegments(input) { var output = []; while (input.length) { if (input.match(RDS1)) { input = input.replace(RDS1, ""); } else if (input.match(RDS2)) { input = input.replace(RDS2, "/"); } else if (input.match(RDS3)) { input = input.replace(RDS3, "/"); output.pop(); } else if (input === "." || input === "..") { input = ""; } else { var im = input.match(RDS5); if (im) { var s = im[0]; input = input.slice(s.length); output.push(s); } else { throw new Error("Unexpected dot segment condition"); } } } return output.join(""); } function serialize(components) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; var uriTokens = []; //find scheme handler var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; //perform scheme specific serialization if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); if (components.host) { //if host component is an IPv6 address if (protocol.IPV6ADDRESS.test(components.host)) {} //TODO: normalize IPv6 address as per RFC 5952 //if host component is a domain name else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { //convert IDN via punycode try { components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); } catch (e) { components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; } } } //normalize encoding _normalizeComponentEncoding(components, protocol); if (options.reference !== "suffix" && components.scheme) { uriTokens.push(components.scheme); uriTokens.push(":"); } var authority = _recomposeAuthority(components, options); if (authority !== undefined) { if (options.reference !== "suffix") { uriTokens.push("//"); } uriTokens.push(authority); if (components.path && components.path.charAt(0) !== "/") { uriTokens.push("/"); } } if (components.path !== undefined) { var s = components.path; if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { s = removeDotSegments(s); } if (authority === undefined) { s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" } uriTokens.push(s); } if (components.query !== undefined) { uriTokens.push("?"); uriTokens.push(components.query); } if (components.fragment !== undefined) { uriTokens.push("#"); uriTokens.push(components.fragment); } return uriTokens.join(""); //merge tokens into a string } function resolveComponents(base, relative) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var skipNormalization = arguments[3]; var target = {}; if (!skipNormalization) { base = parse(serialize(base, options), options); //normalize base components relative = parse(serialize(relative, options), options); //normalize relative components } options = options || {}; if (!options.tolerant && relative.scheme) { target.scheme = relative.scheme; //target.authority = relative.authority; target.userinfo = relative.userinfo; target.host = relative.host; target.port = relative.port; target.path = removeDotSegments(relative.path || ""); target.query = relative.query; } else { if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { //target.authority = relative.authority; target.userinfo = relative.userinfo; target.host = relative.host; target.port = relative.port; target.path = removeDotSegments(relative.path || ""); target.query = relative.query; } else { if (!relative.path) { target.path = base.path; if (relative.query !== undefined) { target.query = relative.query; } else { target.query = base.query; } } else { if (relative.path.charAt(0) === "/") { target.path = removeDotSegments(relative.path); } else { if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { target.path = "/" + relative.path; } else if (!base.path) { target.path = relative.path; } else { target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; } target.path = removeDotSegments(target.path); } target.query = relative.query; } //target.authority = base.authority; target.userinfo = base.userinfo; target.host = base.host; target.port = base.port; } target.scheme = base.scheme; } target.fragment = relative.fragment; return target; } function resolve(baseURI, relativeURI, options) { var schemelessOptions = assign({ scheme: 'null' }, options); return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); } function normalize(uri, options) { if (typeof uri === "string") { uri = serialize(parse(uri, options), options); } else if (typeOf(uri) === "object") { uri = parse(serialize(uri, options), options); } return uri; } function equal(uriA, uriB, options) { if (typeof uriA === "string") { uriA = serialize(parse(uriA, options), options); } else if (typeOf(uriA) === "object") { uriA = serialize(uriA, options); } if (typeof uriB === "string") { uriB = serialize(parse(uriB, options), options); } else if (typeOf(uriB) === "object") { uriB = serialize(uriB, options); } return uriA === uriB; } function escapeComponent(str, options) { return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); } function unescapeComponent(str, options) { return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); } var handler = { scheme: "http", domainHost: true, parse: function parse(components, options) { //report missing host if (!components.host) { components.error = components.error || "HTTP URIs must have a host."; } return components; }, serialize: function serialize(components, options) { //normalize the default port if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { components.port = undefined; } //normalize the empty path if (!components.path) { components.path = "/"; } //NOTE: We do not parse query strings for HTTP URIs //as WWW Form Url Encoded query strings are part of the HTML4+ spec, //and not the HTTP spec. return components; } }; var handler$1 = { scheme: "https", domainHost: handler.domainHost, parse: handler.parse, serialize: handler.serialize }; var O = {}; var isIRI = true; //RFC 3986 var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded //RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = //const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; //const WSP$$ = "[\\x20\\x09]"; //const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) //const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext //const VCHAR$$ = "[\\x21-\\x7E]"; //const WSP$$ = "[\\x20\\x09]"; //const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext //const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); //const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); //const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; var UNRESERVED = new RegExp(UNRESERVED$$, "g"); var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); var NOT_HFVALUE = NOT_HFNAME; function decodeUnreserved(str) { var decStr = pctDecChars(str); return !decStr.match(UNRESERVED) ? str : decStr; } var handler$2 = { scheme: "mailto", parse: function parse$$1(components, options) { var mailtoComponents = components; var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; mailtoComponents.path = undefined; if (mailtoComponents.query) { var unknownHeaders = false; var headers = {}; var hfields = mailtoComponents.query.split("&"); for (var x = 0, xl = hfields.length; x < xl; ++x) { var hfield = hfields[x].split("="); switch (hfield[0]) { case "to": var toAddrs = hfield[1].split(","); for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { to.push(toAddrs[_x]); } break; case "subject": mailtoComponents.subject = unescapeComponent(hfield[1], options); break; case "body": mailtoComponents.body = unescapeComponent(hfield[1], options); break; default: unknownHeaders = true; headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); break; } } if (unknownHeaders) mailtoComponents.headers = headers; } mailtoComponents.query = undefined; for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { var addr = to[_x2].split("@"); addr[0] = unescapeComponent(addr[0]); if (!options.unicodeSupport) { //convert Unicode IDN -> ASCII IDN try { addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); } catch (e) { mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; } } else { addr[1] = unescapeComponent(addr[1], options).toLowerCase(); } to[_x2] = addr.join("@"); } return mailtoComponents; }, serialize: function serialize$$1(mailtoComponents, options) { var components = mailtoComponents; var to = toArray(mailtoComponents.to); if (to) { for (var x = 0, xl = to.length; x < xl; ++x) { var toAddr = String(to[x]); var atIdx = toAddr.lastIndexOf("@"); var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); var domain = toAddr.slice(atIdx + 1); //convert IDN via punycode try { domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); } catch (e) { components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; } to[x] = localPart + "@" + domain; } components.path = to.join(","); } var headers = mailtoComponents.headers = mailtoComponents.headers || {}; if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; if (mailtoComponents.body) headers["body"] = mailtoComponents.body; var fields = []; for (var name in headers) { if (headers[name] !== O[name]) { fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); } } if (fields.length) { components.query = fields.join("&"); } return components; } }; var URN_PARSE = /^([^\:]+)\:(.*)/; //RFC 2141 var handler$3 = { scheme: "urn", parse: function parse$$1(components, options) { var matches = components.path && components.path.match(URN_PARSE); var urnComponents = components; if (matches) { var scheme = options.scheme || urnComponents.scheme || "urn"; var nid = matches[1].toLowerCase(); var nss = matches[2]; var urnScheme = scheme + ":" + (options.nid || nid); var schemeHandler = SCHEMES[urnScheme]; urnComponents.nid = nid; urnComponents.nss = nss; urnComponents.path = undefined; if (schemeHandler) { urnComponents = schemeHandler.parse(urnComponents, options); } } else { urnComponents.error = urnComponents.error || "URN can not be parsed."; } return urnComponents; }, serialize: function serialize$$1(urnComponents, options) { var scheme = options.scheme || urnComponents.scheme || "urn"; var nid = urnComponents.nid; var urnScheme = scheme + ":" + (options.nid || nid); var schemeHandler = SCHEMES[urnScheme]; if (schemeHandler) { urnComponents = schemeHandler.serialize(urnComponents, options); } var uriComponents = urnComponents; var nss = urnComponents.nss; uriComponents.path = (nid || options.nid) + ":" + nss; return uriComponents; } }; var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; //RFC 4122 var handler$4 = { scheme: "urn:uuid", parse: function parse(urnComponents, options) { var uuidComponents = urnComponents; uuidComponents.uuid = uuidComponents.nss; uuidComponents.nss = undefined; if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { uuidComponents.error = uuidComponents.error || "UUID is not valid."; } return uuidComponents; }, serialize: function serialize(uuidComponents, options) { var urnComponents = uuidComponents; //normalize UUID urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); return urnComponents; } }; SCHEMES[handler.scheme] = handler; SCHEMES[handler$1.scheme] = handler$1; SCHEMES[handler$2.scheme] = handler$2; SCHEMES[handler$3.scheme] = handler$3; SCHEMES[handler$4.scheme] = handler$4; exports.SCHEMES = SCHEMES; exports.pctEncChar = pctEncChar; exports.pctDecChars = pctDecChars; exports.parse = parse; exports.removeDotSegments = removeDotSegments; exports.serialize = serialize; exports.resolveComponents = resolveComponents; exports.resolve = resolve; exports.normalize = normalize; exports.equal = equal; exports.escapeComponent = escapeComponent; exports.unescapeComponent = unescapeComponent; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=uri.all.js.map /***/ }), /* 4191 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // https://mathiasbynens.be/notes/javascript-encoding // https://github.com/bestiejs/punycode.js - punycode.ucs2.decode module.exports = function ucs2length(str) { var length = 0 , len = str.length , pos = 0 , value; while (pos < len) { length++; value = str.charCodeAt(pos++); if (value >= 0xD800 && value <= 0xDBFF && pos < len) { // high surrogate, and there is a next character value = str.charCodeAt(pos); if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate } } return length; }; /***/ }), /* 4192 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var traverse = module.exports = function (schema, opts, cb) { // Legacy support for v0.3.1 and earlier. if (typeof opts == 'function') { cb = opts; opts = {}; } cb = opts.cb || cb; var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; var post = cb.post || function() {}; _traverse(opts, pre, post, schema, '', schema); }; traverse.keywords = { additionalItems: true, items: true, contains: true, additionalProperties: true, propertyNames: true, not: true }; traverse.arrayKeywords = { items: true, allOf: true, anyOf: true, oneOf: true }; traverse.propsKeywords = { definitions: true, properties: true, patternProperties: true, dependencies: true }; traverse.skipKeywords = { default: true, enum: true, const: true, required: true, maximum: true, minimum: true, exclusiveMaximum: true, exclusiveMinimum: true, multipleOf: true, maxLength: true, minLength: true, pattern: true, format: true, maxItems: true, minItems: true, uniqueItems: true, maxProperties: true, minProperties: true }; function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { if (schema && typeof schema == 'object' && !Array.isArray(schema)) { pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); for (var key in schema) { var sch = schema[key]; if (Array.isArray(sch)) { if (key in traverse.arrayKeywords) { for (var i=0; i<sch.length; i++) _traverse(opts, pre, post, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i); } } else if (key in traverse.propsKeywords) { if (sch && typeof sch == 'object') { for (var prop in sch) _traverse(opts, pre, post, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop); } } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) { _traverse(opts, pre, post, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema); } } post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); } } function escapeJsonPtr(str) { return str.replace(/~/g, '~0').replace(/\//g, '~1'); } /***/ }), /* 4193 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Cache = module.exports = function Cache() { this._cache = {}; }; Cache.prototype.put = function Cache_put(key, value) { this._cache[key] = value; }; Cache.prototype.get = function Cache_get(key) { return this._cache[key]; }; Cache.prototype.del = function Cache_del(key) { delete this._cache[key]; }; Cache.prototype.clear = function Cache_clear() { this._cache = {}; }; /***/ }), /* 4194 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(320); var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31]; var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i; var HOSTNAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i; var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; var URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; // uri-template: https://tools.ietf.org/html/rfc6570 var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; // For the source: https://gist.github.com/dperini/729294 // For test cases: https://mathiasbynens.be/demo/url-regex // @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. // var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; module.exports = formats; function formats(mode) { mode = mode == 'full' ? 'full' : 'fast'; return util.copy(formats[mode]); } formats.fast = { // date: http://tools.ietf.org/html/rfc3339#section-5.6 date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i, 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, 'uri-template': URITEMPLATE, url: URL, // email (sources from jsen validator): // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, hostname: HOSTNAME, // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-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-f]{1,4}:){5}(?:(?:(?::[0-9a-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-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-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-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-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-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-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-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-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-f]{1,4}){1,7})|(?:(?::[0-9a-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*$/i, regex: regex, // uuid: http://tools.ietf.org/html/rfc4122 uuid: UUID, // JSON-pointer: https://tools.ietf.org/html/rfc6901 // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A 'json-pointer': JSON_POINTER, 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 'relative-json-pointer': RELATIVE_JSON_POINTER }; formats.full = { date: date, time: time, 'date-time': date_time, uri: uri, 'uri-reference': URIREF, 'uri-template': URITEMPLATE, url: URL, email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, hostname: hostname, ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-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-f]{1,4}:){5}(?:(?:(?::[0-9a-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-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-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-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-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-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-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-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-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-f]{1,4}){1,7})|(?:(?::[0-9a-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*$/i, regex: regex, uuid: UUID, 'json-pointer': JSON_POINTER, 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, 'relative-json-pointer': RELATIVE_JSON_POINTER }; function isLeapYear(year) { // https://tools.ietf.org/html/rfc3339#appendix-C return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } function date(str) { // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 var matches = str.match(DATE); if (!matches) return false; var year = +matches[1]; var month = +matches[2]; var day = +matches[3]; return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); } function time(str, full) { var matches = str.match(TIME); if (!matches) return false; var hour = matches[1]; var minute = matches[2]; var second = matches[3]; var timeZone = matches[5]; return ((hour <= 23 && minute <= 59 && second <= 59) || (hour == 23 && minute == 59 && second == 60)) && (!full || timeZone); } var DATE_TIME_SEPARATOR = /t|\s/i; function date_time(str) { // http://tools.ietf.org/html/rfc3339#section-5.6 var dateTime = str.split(DATE_TIME_SEPARATOR); return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); } function hostname(str) { // https://tools.ietf.org/html/rfc1034#section-3.5 // https://tools.ietf.org/html/rfc1123#section-2 return str.length <= 255 && HOSTNAME.test(str); } var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." return NOT_URI_FRAGMENT.test(str) && URI.test(str); } var Z_ANCHOR = /[^\\]\\Z/; function regex(str) { if (Z_ANCHOR.test(str)) return false; try { new RegExp(str); return true; } catch(e) { return false; } } /***/ }), /* 4195 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var ruleModules = __webpack_require__(4196) , toHash = __webpack_require__(320).toHash; module.exports = function rules() { var RULES = [ { type: 'number', rules: [ { 'maximum': ['exclusiveMaximum'] }, { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] }, { type: 'string', rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] }, { type: 'array', rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] }, { type: 'object', rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames', { 'properties': ['additionalProperties', 'patternProperties'] } ] }, { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] } ]; var ALL = [ 'type', '$comment' ]; var KEYWORDS = [ '$schema', '$id', 'id', '$data', '$async', 'title', 'description', 'default', 'definitions', 'examples', 'readOnly', 'writeOnly', 'contentMediaType', 'contentEncoding', 'additionalItems', 'then', 'else' ]; var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ]; RULES.all = toHash(ALL); RULES.types = toHash(TYPES); RULES.forEach(function (group) { group.rules = group.rules.map(function (keyword) { var implKeywords; if (typeof keyword == 'object') { var key = Object.keys(keyword)[0]; implKeywords = keyword[key]; keyword = key; implKeywords.forEach(function (k) { ALL.push(k); RULES.all[k] = true; }); } ALL.push(keyword); var rule = RULES.all[keyword] = { keyword: keyword, code: ruleModules[keyword], implements: implKeywords }; return rule; }); RULES.all.$comment = { keyword: '$comment', code: ruleModules.$comment }; if (group.type) RULES.types[group.type] = group; }); RULES.keywords = toHash(ALL.concat(KEYWORDS)); RULES.custom = {}; return RULES; }; /***/ }), /* 4196 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; //all requires must be explicit because browserify won't work with dynamic requires module.exports = { '$ref': __webpack_require__(4197), allOf: __webpack_require__(4198), anyOf: __webpack_require__(4199), '$comment': __webpack_require__(4200), const: __webpack_require__(4201), contains: __webpack_require__(4202), dependencies: __webpack_require__(4203), 'enum': __webpack_require__(4204), format: __webpack_require__(4205), 'if': __webpack_require__(4206), items: __webpack_require__(4207), maximum: __webpack_require__(1643), minimum: __webpack_require__(1643), maxItems: __webpack_require__(1644), minItems: __webpack_require__(1644), maxLength: __webpack_require__(1645), minLength: __webpack_require__(1645), maxProperties: __webpack_require__(1646), minProperties: __webpack_require__(1646), multipleOf: __webpack_require__(4208), not: __webpack_require__(4209), oneOf: __webpack_require__(4210), pattern: __webpack_require__(4211), properties: __webpack_require__(4212), propertyNames: __webpack_require__(4213), required: __webpack_require__(4214), uniqueItems: __webpack_require__(4215), validate: __webpack_require__(1642) }; /***/ }), /* 4197 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_ref(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $async, $refCode; if ($schema == '#' || $schema == '#/') { if (it.isRoot) { $async = it.async; $refCode = 'validate'; } else { $async = it.root.schema.$async === true; $refCode = 'root.refVal[0]'; } } else { var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); if ($refVal === undefined) { var $message = it.MissingRefError.message(it.baseId, $schema); if (it.opts.missingRefs == 'fail') { it.logger.error($message); var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' '; } if (it.opts.verbose) { out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } if ($breakOnError) { out += ' if (false) { '; } } else if (it.opts.missingRefs == 'ignore') { it.logger.warn($message); if ($breakOnError) { out += ' if (true) { '; } } else { throw new it.MissingRefError(it.baseId, $schema, $message); } } else if ($refVal.inline) { var $it = it.util.copy(it); $it.level++; var $nextValid = 'valid' + $it.level; $it.schema = $refVal.schema; $it.schemaPath = ''; $it.errSchemaPath = $schema; var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); out += ' ' + ($code) + ' '; if ($breakOnError) { out += ' if (' + ($nextValid) + ') { '; } } else { $async = $refVal.$async === true || (it.async && $refVal.$async !== false); $refCode = $refVal.code; } } if ($refCode) { var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; if (it.opts.passContext) { out += ' ' + ($refCode) + '.call(this, '; } else { out += ' ' + ($refCode) + '( '; } out += ' ' + ($data) + ', (dataPath || \'\')'; if (it.errorPath != '""') { out += ' + ' + (it.errorPath); } var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) '; var __callValidate = out; out = $$outStack.pop(); if ($async) { if (!it.async) throw new Error('async schema referenced by sync schema'); if ($breakOnError) { out += ' var ' + ($valid) + '; '; } out += ' try { await ' + (__callValidate) + '; '; if ($breakOnError) { out += ' ' + ($valid) + ' = true; '; } out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; '; if ($breakOnError) { out += ' ' + ($valid) + ' = false; '; } out += ' } '; if ($breakOnError) { out += ' if (' + ($valid) + ') { '; } } else { out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } '; if ($breakOnError) { out += ' else { '; } } } return out; } /***/ }), /* 4198 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_allOf(it, $keyword, $ruleType) { var out = ' '; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $it = it.util.copy(it); var $closingBraces = ''; $it.level++; var $nextValid = 'valid' + $it.level; var $currentBaseId = $it.baseId, $allSchemasEmpty = true; var arr1 = $schema; if (arr1) { var $sch, $i = -1, l1 = arr1.length - 1; while ($i < l1) { $sch = arr1[$i += 1]; if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { $allSchemasEmpty = false; $it.schema = $sch; $it.schemaPath = $schemaPath + '[' + $i + ']'; $it.errSchemaPath = $errSchemaPath + '/' + $i; out += ' ' + (it.validate($it)) + ' '; $it.baseId = $currentBaseId; if ($breakOnError) { out += ' if (' + ($nextValid) + ') { '; $closingBraces += '}'; } } } } if ($breakOnError) { if ($allSchemasEmpty) { out += ' if (true) { '; } else { out += ' ' + ($closingBraces.slice(0, -1)) + ' '; } } out = it.util.cleanUpCode(out); return out; } /***/ }), /* 4199 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_anyOf(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $errs = 'errs__' + $lvl; var $it = it.util.copy(it); var $closingBraces = ''; $it.level++; var $nextValid = 'valid' + $it.level; var $noEmptySchema = $schema.every(function($sch) { return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all)); }); if ($noEmptySchema) { var $currentBaseId = $it.baseId; out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; var $wasComposite = it.compositeRule; it.compositeRule = $it.compositeRule = true; var arr1 = $schema; if (arr1) { var $sch, $i = -1, l1 = arr1.length - 1; while ($i < l1) { $sch = arr1[$i += 1]; $it.schema = $sch; $it.schemaPath = $schemaPath + '[' + $i + ']'; $it.errSchemaPath = $errSchemaPath + '/' + $i; out += ' ' + (it.validate($it)) + ' '; $it.baseId = $currentBaseId; out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; $closingBraces += '}'; } } it.compositeRule = $it.compositeRule = $wasComposite; out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; if (it.opts.messages !== false) { out += ' , message: \'should match some schema in anyOf\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError(vErrors); '; } else { out += ' validate.errors = vErrors; return false; '; } } out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; if (it.opts.allErrors) { out += ' } '; } out = it.util.cleanUpCode(out); } else { if ($breakOnError) { out += ' if (true) { '; } } return out; } /***/ }), /* 4200 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_comment(it, $keyword, $ruleType) { var out = ' '; var $schema = it.schema[$keyword]; var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $comment = it.util.toQuotedString($schema); if (it.opts.$comment === true) { out += ' console.log(' + ($comment) + ');'; } else if (typeof it.opts.$comment == 'function') { out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; } return out; } /***/ }), /* 4201 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_const(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; $schemaValue = 'schema' + $lvl; } else { $schemaValue = $schema; } if (!$isData) { out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; } out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; if (it.opts.messages !== false) { out += ' , message: \'should be equal to constant\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += ' }'; if ($breakOnError) { out += ' else { '; } return out; } /***/ }), /* 4202 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_contains(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $errs = 'errs__' + $lvl; var $it = it.util.copy(it); var $closingBraces = ''; $it.level++; var $nextValid = 'valid' + $it.level; var $idx = 'i' + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = 'data' + $dataNxt, $currentBaseId = it.baseId, $nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all)); out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; if ($nonEmptySchema) { var $wasComposite = it.compositeRule; it.compositeRule = $it.compositeRule = true; $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath; out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); var $passData = $data + '[' + $idx + ']'; $it.dataPathArr[$dataNxt] = $idx; var $code = it.validate($it); $it.baseId = $currentBaseId; if (it.util.varOccurences($code, $nextData) < 2) { out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; } else { out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; } out += ' if (' + ($nextValid) + ') break; } '; it.compositeRule = $it.compositeRule = $wasComposite; out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; } else { out += ' if (' + ($data) + '.length == 0) {'; } var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; if (it.opts.messages !== false) { out += ' , message: \'should contain a valid item\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += ' } else { '; if ($nonEmptySchema) { out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; } if (it.opts.allErrors) { out += ' } '; } out = it.util.cleanUpCode(out); return out; } /***/ }), /* 4203 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_dependencies(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $errs = 'errs__' + $lvl; var $it = it.util.copy(it); var $closingBraces = ''; $it.level++; var $nextValid = 'valid' + $it.level; var $schemaDeps = {}, $propertyDeps = {}, $ownProperties = it.opts.ownProperties; for ($property in $schema) { var $sch = $schema[$property]; var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; $deps[$property] = $sch; } out += 'var ' + ($errs) + ' = errors;'; var $currentErrorPath = it.errorPath; out += 'var missing' + ($lvl) + ';'; for (var $property in $propertyDeps) { $deps = $propertyDeps[$property]; if ($deps.length) { out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; if ($ownProperties) { out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; } if ($breakOnError) { out += ' && ( '; var arr1 = $deps; if (arr1) { var $propertyKey, $i = -1, l1 = arr1.length - 1; while ($i < l1) { $propertyKey = arr1[$i += 1]; if ($i) { out += ' || '; } var $prop = it.util.getProperty($propertyKey), $useData = $data + $prop; out += ' ( ( ' + ($useData) + ' === undefined '; if ($ownProperties) { out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; } out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; } } out += ')) { '; var $propertyPath = 'missing' + $lvl, $missingProperty = '\' + ' + $propertyPath + ' + \''; if (it.opts._errorDataPathProperty) { it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; } var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \'should have '; if ($deps.length == 1) { out += 'property ' + (it.util.escapeQuotes($deps[0])); } else { out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); } out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } } else { out += ' ) { '; var arr2 = $deps; if (arr2) { var $propertyKey, i2 = -1, l2 = arr2.length - 1; while (i2 < l2) { $propertyKey = arr2[i2 += 1]; var $prop = it.util.getProperty($propertyKey), $missingProperty = it.util.escapeQuotes($propertyKey), $useData = $data + $prop; if (it.opts._errorDataPathProperty) { it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); } out += ' if ( ' + ($useData) + ' === undefined '; if ($ownProperties) { out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; } out += ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \'should have '; if ($deps.length == 1) { out += 'property ' + (it.util.escapeQuotes($deps[0])); } else { out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); } out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; } } } out += ' } '; if ($breakOnError) { $closingBraces += '}'; out += ' else { '; } } } it.errorPath = $currentErrorPath; var $currentBaseId = $it.baseId; for (var $property in $schemaDeps) { var $sch = $schemaDeps[$property]; if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; if ($ownProperties) { out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; } out += ') { '; $it.schema = $sch; $it.schemaPath = $schemaPath + it.util.getProperty($property); $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); out += ' ' + (it.validate($it)) + ' '; $it.baseId = $currentBaseId; out += ' } '; if ($breakOnError) { out += ' if (' + ($nextValid) + ') { '; $closingBraces += '}'; } } } if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; } out = it.util.cleanUpCode(out); return out; } /***/ }), /* 4204 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_enum(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; $schemaValue = 'schema' + $lvl; } else { $schemaValue = $schema; } var $i = 'i' + $lvl, $vSchema = 'schema' + $lvl; if (!$isData) { out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; } out += 'var ' + ($valid) + ';'; if ($isData) { out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; } out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; if ($isData) { out += ' } '; } out += ' if (!' + ($valid) + ') { '; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; if (it.opts.messages !== false) { out += ' , message: \'should be equal to one of the allowed values\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += ' }'; if ($breakOnError) { out += ' else { '; } return out; } /***/ }), /* 4205 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_format(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); if (it.opts.format === false) { if ($breakOnError) { out += ' if (true) { '; } return out; } var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; $schemaValue = 'schema' + $lvl; } else { $schemaValue = $schema; } var $unknownFormats = it.opts.unknownFormats, $allowUnknown = Array.isArray($unknownFormats); if ($isData) { var $format = 'format' + $lvl, $isObject = 'isObject' + $lvl, $formatType = 'formatType' + $lvl; out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; if (it.async) { out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; } out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; if ($isData) { out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; } out += ' ('; if ($unknownFormats != 'ignore') { out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; if ($allowUnknown) { out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; } out += ') || '; } out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; if (it.async) { out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; } else { out += ' ' + ($format) + '(' + ($data) + ') '; } out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; } else { var $format = it.formats[$schema]; if (!$format) { if ($unknownFormats == 'ignore') { it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); if ($breakOnError) { out += ' if (true) { '; } return out; } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { if ($breakOnError) { out += ' if (true) { '; } return out; } else { throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); } } var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; var $formatType = $isObject && $format.type || 'string'; if ($isObject) { var $async = $format.async === true; $format = $format.validate; } if ($formatType != $ruleType) { if ($breakOnError) { out += ' if (true) { '; } return out; } if ($async) { if (!it.async) throw new Error('async format in sync schema'); var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; } else { out += ' if (! '; var $formatRef = 'formats' + it.util.getProperty($schema); if ($isObject) $formatRef += '.validate'; if (typeof $format == 'function') { out += ' ' + ($formatRef) + '(' + ($data) + ') '; } else { out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; } out += ') { '; } } var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; if ($isData) { out += '' + ($schemaValue); } else { out += '' + (it.util.toQuotedString($schema)); } out += ' } '; if (it.opts.messages !== false) { out += ' , message: \'should match format "'; if ($isData) { out += '\' + ' + ($schemaValue) + ' + \''; } else { out += '' + (it.util.escapeQuotes($schema)); } out += '"\' '; } if (it.opts.verbose) { out += ' , schema: '; if ($isData) { out += 'validate.schema' + ($schemaPath); } else { out += '' + (it.util.toQuotedString($schema)); } out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += ' } '; if ($breakOnError) { out += ' else { '; } return out; } /***/ }), /* 4206 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_if(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $errs = 'errs__' + $lvl; var $it = it.util.copy(it); $it.level++; var $nextValid = 'valid' + $it.level; var $thenSch = it.schema['then'], $elseSch = it.schema['else'], $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)), $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)), $currentBaseId = $it.baseId; if ($thenPresent || $elsePresent) { var $ifClause; $it.createErrors = false; $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath; out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; var $wasComposite = it.compositeRule; it.compositeRule = $it.compositeRule = true; out += ' ' + (it.validate($it)) + ' '; $it.baseId = $currentBaseId; $it.createErrors = true; out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; it.compositeRule = $it.compositeRule = $wasComposite; if ($thenPresent) { out += ' if (' + ($nextValid) + ') { '; $it.schema = it.schema['then']; $it.schemaPath = it.schemaPath + '.then'; $it.errSchemaPath = it.errSchemaPath + '/then'; out += ' ' + (it.validate($it)) + ' '; $it.baseId = $currentBaseId; out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; if ($thenPresent && $elsePresent) { $ifClause = 'ifClause' + $lvl; out += ' var ' + ($ifClause) + ' = \'then\'; '; } else { $ifClause = '\'then\''; } out += ' } '; if ($elsePresent) { out += ' else { '; } } else { out += ' if (!' + ($nextValid) + ') { '; } if ($elsePresent) { $it.schema = it.schema['else']; $it.schemaPath = it.schemaPath + '.else'; $it.errSchemaPath = it.errSchemaPath + '/else'; out += ' ' + (it.validate($it)) + ' '; $it.baseId = $currentBaseId; out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; if ($thenPresent && $elsePresent) { $ifClause = 'ifClause' + $lvl; out += ' var ' + ($ifClause) + ' = \'else\'; '; } else { $ifClause = '\'else\''; } out += ' } '; } out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; if (it.opts.messages !== false) { out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError(vErrors); '; } else { out += ' validate.errors = vErrors; return false; '; } } out += ' } '; if ($breakOnError) { out += ' else { '; } out = it.util.cleanUpCode(out); } else { if ($breakOnError) { out += ' if (true) { '; } } return out; } /***/ }), /* 4207 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_items(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $errs = 'errs__' + $lvl; var $it = it.util.copy(it); var $closingBraces = ''; $it.level++; var $nextValid = 'valid' + $it.level; var $idx = 'i' + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = 'data' + $dataNxt, $currentBaseId = it.baseId; out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; if (Array.isArray($schema)) { var $additionalItems = it.schema.additionalItems; if ($additionalItems === false) { out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; var $currErrSchemaPath = $errSchemaPath; $errSchemaPath = it.errSchemaPath + '/additionalItems'; out += ' if (!' + ($valid) + ') { '; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; if (it.opts.messages !== false) { out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; } if (it.opts.verbose) { out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += ' } '; $errSchemaPath = $currErrSchemaPath; if ($breakOnError) { $closingBraces += '}'; out += ' else { '; } } var arr1 = $schema; if (arr1) { var $sch, $i = -1, l1 = arr1.length - 1; while ($i < l1) { $sch = arr1[$i += 1]; if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; var $passData = $data + '[' + $i + ']'; $it.schema = $sch; $it.schemaPath = $schemaPath + '[' + $i + ']'; $it.errSchemaPath = $errSchemaPath + '/' + $i; $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); $it.dataPathArr[$dataNxt] = $i; var $code = it.validate($it); $it.baseId = $currentBaseId; if (it.util.varOccurences($code, $nextData) < 2) { out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; } else { out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; } out += ' } '; if ($breakOnError) { out += ' if (' + ($nextValid) + ') { '; $closingBraces += '}'; } } } } if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) { $it.schema = $additionalItems; $it.schemaPath = it.schemaPath + '.additionalItems'; $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); var $passData = $data + '[' + $idx + ']'; $it.dataPathArr[$dataNxt] = $idx; var $code = it.validate($it); $it.baseId = $currentBaseId; if (it.util.varOccurences($code, $nextData) < 2) { out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; } else { out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; } if ($breakOnError) { out += ' if (!' + ($nextValid) + ') break; '; } out += ' } } '; if ($breakOnError) { out += ' if (' + ($nextValid) + ') { '; $closingBraces += '}'; } } } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath; out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); var $passData = $data + '[' + $idx + ']'; $it.dataPathArr[$dataNxt] = $idx; var $code = it.validate($it); $it.baseId = $currentBaseId; if (it.util.varOccurences($code, $nextData) < 2) { out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; } else { out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; } if ($breakOnError) { out += ' if (!' + ($nextValid) + ') break; '; } out += ' }'; } if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; } out = it.util.cleanUpCode(out); return out; } /***/ }), /* 4208 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_multipleOf(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; $schemaValue = 'schema' + $lvl; } else { $schemaValue = $schema; } out += 'var division' + ($lvl) + ';if ('; if ($isData) { out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; } out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; if (it.opts.multipleOfPrecision) { out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; } else { out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; } out += ' ) '; if ($isData) { out += ' ) '; } out += ' ) { '; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; if (it.opts.messages !== false) { out += ' , message: \'should be multiple of '; if ($isData) { out += '\' + ' + ($schemaValue); } else { out += '' + ($schemaValue) + '\''; } } if (it.opts.verbose) { out += ' , schema: '; if ($isData) { out += 'validate.schema' + ($schemaPath); } else { out += '' + ($schema); } out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += '} '; if ($breakOnError) { out += ' else { '; } return out; } /***/ }), /* 4209 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_not(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $errs = 'errs__' + $lvl; var $it = it.util.copy(it); $it.level++; var $nextValid = 'valid' + $it.level; if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath; out += ' var ' + ($errs) + ' = errors; '; var $wasComposite = it.compositeRule; it.compositeRule = $it.compositeRule = true; $it.createErrors = false; var $allErrorsOption; if ($it.opts.allErrors) { $allErrorsOption = $it.opts.allErrors; $it.opts.allErrors = false; } out += ' ' + (it.validate($it)) + ' '; $it.createErrors = true; if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; it.compositeRule = $it.compositeRule = $wasComposite; out += ' if (' + ($nextValid) + ') { '; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; if (it.opts.messages !== false) { out += ' , message: \'should NOT be valid\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; if (it.opts.allErrors) { out += ' } '; } } else { out += ' var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; if (it.opts.messages !== false) { out += ' , message: \'should NOT be valid\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; if ($breakOnError) { out += ' if (false) { '; } } return out; } /***/ }), /* 4210 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_oneOf(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $errs = 'errs__' + $lvl; var $it = it.util.copy(it); var $closingBraces = ''; $it.level++; var $nextValid = 'valid' + $it.level; var $currentBaseId = $it.baseId, $prevValid = 'prevValid' + $lvl, $passingSchemas = 'passingSchemas' + $lvl; out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; var $wasComposite = it.compositeRule; it.compositeRule = $it.compositeRule = true; var arr1 = $schema; if (arr1) { var $sch, $i = -1, l1 = arr1.length - 1; while ($i < l1) { $sch = arr1[$i += 1]; if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { $it.schema = $sch; $it.schemaPath = $schemaPath + '[' + $i + ']'; $it.errSchemaPath = $errSchemaPath + '/' + $i; out += ' ' + (it.validate($it)) + ' '; $it.baseId = $currentBaseId; } else { out += ' var ' + ($nextValid) + ' = true; '; } if ($i) { out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; $closingBraces += '}'; } out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; } } it.compositeRule = $it.compositeRule = $wasComposite; out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; if (it.opts.messages !== false) { out += ' , message: \'should match exactly one schema in oneOf\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError(vErrors); '; } else { out += ' validate.errors = vErrors; return false; '; } } out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; if (it.opts.allErrors) { out += ' } '; } return out; } /***/ }), /* 4211 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_pattern(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; $schemaValue = 'schema' + $lvl; } else { $schemaValue = $schema; } var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); out += 'if ( '; if ($isData) { out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; } out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; if ($isData) { out += '' + ($schemaValue); } else { out += '' + (it.util.toQuotedString($schema)); } out += ' } '; if (it.opts.messages !== false) { out += ' , message: \'should match pattern "'; if ($isData) { out += '\' + ' + ($schemaValue) + ' + \''; } else { out += '' + (it.util.escapeQuotes($schema)); } out += '"\' '; } if (it.opts.verbose) { out += ' , schema: '; if ($isData) { out += 'validate.schema' + ($schemaPath); } else { out += '' + (it.util.toQuotedString($schema)); } out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += '} '; if ($breakOnError) { out += ' else { '; } return out; } /***/ }), /* 4212 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_properties(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $errs = 'errs__' + $lvl; var $it = it.util.copy(it); var $closingBraces = ''; $it.level++; var $nextValid = 'valid' + $it.level; var $key = 'key' + $lvl, $idx = 'idx' + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = 'data' + $dataNxt, $dataProperties = 'dataProperties' + $lvl; var $schemaKeys = Object.keys($schema || {}), $pProperties = it.schema.patternProperties || {}, $pPropertyKeys = Object.keys($pProperties), $aProperties = it.schema.additionalProperties, $someProperties = $schemaKeys.length || $pPropertyKeys.length, $noAdditional = $aProperties === false, $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, $removeAdditional = it.opts.removeAdditional, $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; var $required = it.schema.required; if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; if ($ownProperties) { out += ' var ' + ($dataProperties) + ' = undefined;'; } if ($checkAdditional) { if ($ownProperties) { out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; } else { out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; } if ($someProperties) { out += ' var isAdditional' + ($lvl) + ' = !(false '; if ($schemaKeys.length) { if ($schemaKeys.length > 8) { out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; } else { var arr1 = $schemaKeys; if (arr1) { var $propertyKey, i1 = -1, l1 = arr1.length - 1; while (i1 < l1) { $propertyKey = arr1[i1 += 1]; out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; } } } } if ($pPropertyKeys.length) { var arr2 = $pPropertyKeys; if (arr2) { var $pProperty, $i = -1, l2 = arr2.length - 1; while ($i < l2) { $pProperty = arr2[$i += 1]; out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; } } } out += ' ); if (isAdditional' + ($lvl) + ') { '; } if ($removeAdditional == 'all') { out += ' delete ' + ($data) + '[' + ($key) + ']; '; } else { var $currentErrorPath = it.errorPath; var $additionalProperty = '\' + ' + $key + ' + \''; if (it.opts._errorDataPathProperty) { it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); } if ($noAdditional) { if ($removeAdditional) { out += ' delete ' + ($data) + '[' + ($key) + ']; '; } else { out += ' ' + ($nextValid) + ' = false; '; var $currErrSchemaPath = $errSchemaPath; $errSchemaPath = it.errSchemaPath + '/additionalProperties'; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \''; if (it.opts._errorDataPathProperty) { out += 'is an invalid additional property'; } else { out += 'should NOT have additional properties'; } out += '\' '; } if (it.opts.verbose) { out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } $errSchemaPath = $currErrSchemaPath; if ($breakOnError) { out += ' break; '; } } } else if ($additionalIsSchema) { if ($removeAdditional == 'failing') { out += ' var ' + ($errs) + ' = errors; '; var $wasComposite = it.compositeRule; it.compositeRule = $it.compositeRule = true; $it.schema = $aProperties; $it.schemaPath = it.schemaPath + '.additionalProperties'; $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); var $passData = $data + '[' + $key + ']'; $it.dataPathArr[$dataNxt] = $key; var $code = it.validate($it); $it.baseId = $currentBaseId; if (it.util.varOccurences($code, $nextData) < 2) { out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; } else { out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; } out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; it.compositeRule = $it.compositeRule = $wasComposite; } else { $it.schema = $aProperties; $it.schemaPath = it.schemaPath + '.additionalProperties'; $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); var $passData = $data + '[' + $key + ']'; $it.dataPathArr[$dataNxt] = $key; var $code = it.validate($it); $it.baseId = $currentBaseId; if (it.util.varOccurences($code, $nextData) < 2) { out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; } else { out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; } if ($breakOnError) { out += ' if (!' + ($nextValid) + ') break; '; } } } it.errorPath = $currentErrorPath; } if ($someProperties) { out += ' } '; } out += ' } '; if ($breakOnError) { out += ' if (' + ($nextValid) + ') { '; $closingBraces += '}'; } } var $useDefaults = it.opts.useDefaults && !it.compositeRule; if ($schemaKeys.length) { var arr3 = $schemaKeys; if (arr3) { var $propertyKey, i3 = -1, l3 = arr3.length - 1; while (i3 < l3) { $propertyKey = arr3[i3 += 1]; var $sch = $schema[$propertyKey]; if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { var $prop = it.util.getProperty($propertyKey), $passData = $data + $prop, $hasDefault = $useDefaults && $sch.default !== undefined; $it.schema = $sch; $it.schemaPath = $schemaPath + $prop; $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); var $code = it.validate($it); $it.baseId = $currentBaseId; if (it.util.varOccurences($code, $nextData) < 2) { $code = it.util.varReplace($code, $nextData, $passData); var $useData = $passData; } else { var $useData = $nextData; out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; } if ($hasDefault) { out += ' ' + ($code) + ' '; } else { if ($requiredHash && $requiredHash[$propertyKey]) { out += ' if ( ' + ($useData) + ' === undefined '; if ($ownProperties) { out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; } out += ') { ' + ($nextValid) + ' = false; '; var $currentErrorPath = it.errorPath, $currErrSchemaPath = $errSchemaPath, $missingProperty = it.util.escapeQuotes($propertyKey); if (it.opts._errorDataPathProperty) { it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); } $errSchemaPath = it.errSchemaPath + '/required'; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \''; if (it.opts._errorDataPathProperty) { out += 'is a required property'; } else { out += 'should have required property \\\'' + ($missingProperty) + '\\\''; } out += '\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } $errSchemaPath = $currErrSchemaPath; it.errorPath = $currentErrorPath; out += ' } else { '; } else { if ($breakOnError) { out += ' if ( ' + ($useData) + ' === undefined '; if ($ownProperties) { out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; } out += ') { ' + ($nextValid) + ' = true; } else { '; } else { out += ' if (' + ($useData) + ' !== undefined '; if ($ownProperties) { out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; } out += ' ) { '; } } out += ' ' + ($code) + ' } '; } } if ($breakOnError) { out += ' if (' + ($nextValid) + ') { '; $closingBraces += '}'; } } } } if ($pPropertyKeys.length) { var arr4 = $pPropertyKeys; if (arr4) { var $pProperty, i4 = -1, l4 = arr4.length - 1; while (i4 < l4) { $pProperty = arr4[i4 += 1]; var $sch = $pProperties[$pProperty]; if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { $it.schema = $sch; $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); if ($ownProperties) { out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; } else { out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; } out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); var $passData = $data + '[' + $key + ']'; $it.dataPathArr[$dataNxt] = $key; var $code = it.validate($it); $it.baseId = $currentBaseId; if (it.util.varOccurences($code, $nextData) < 2) { out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; } else { out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; } if ($breakOnError) { out += ' if (!' + ($nextValid) + ') break; '; } out += ' } '; if ($breakOnError) { out += ' else ' + ($nextValid) + ' = true; '; } out += ' } '; if ($breakOnError) { out += ' if (' + ($nextValid) + ') { '; $closingBraces += '}'; } } } } } if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; } out = it.util.cleanUpCode(out); return out; } /***/ }), /* 4213 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_propertyNames(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $errs = 'errs__' + $lvl; var $it = it.util.copy(it); var $closingBraces = ''; $it.level++; var $nextValid = 'valid' + $it.level; out += 'var ' + ($errs) + ' = errors;'; if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath; var $key = 'key' + $lvl, $idx = 'idx' + $lvl, $i = 'i' + $lvl, $invalidName = '\' + ' + $key + ' + \'', $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = 'data' + $dataNxt, $dataProperties = 'dataProperties' + $lvl, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; if ($ownProperties) { out += ' var ' + ($dataProperties) + ' = undefined; '; } if ($ownProperties) { out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; } else { out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; } out += ' var startErrs' + ($lvl) + ' = errors; '; var $passData = $key; var $wasComposite = it.compositeRule; it.compositeRule = $it.compositeRule = true; var $code = it.validate($it); $it.baseId = $currentBaseId; if (it.util.varOccurences($code, $nextData) < 2) { out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; } else { out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; } it.compositeRule = $it.compositeRule = $wasComposite; out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '<errors; ' + ($i) + '++) { vErrors[' + ($i) + '].propertyName = ' + ($key) + '; } var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('propertyNames') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { propertyName: \'' + ($invalidName) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \'property name \\\'' + ($invalidName) + '\\\' is invalid\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError(vErrors); '; } else { out += ' validate.errors = vErrors; return false; '; } } if ($breakOnError) { out += ' break; '; } out += ' } }'; } if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; } out = it.util.cleanUpCode(out); return out; } /***/ }), /* 4214 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_required(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; $schemaValue = 'schema' + $lvl; } else { $schemaValue = $schema; } var $vSchema = 'schema' + $lvl; if (!$isData) { if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) { var $required = []; var arr1 = $schema; if (arr1) { var $property, i1 = -1, l1 = arr1.length - 1; while (i1 < l1) { $property = arr1[i1 += 1]; var $propertySch = it.schema.properties[$property]; if (!($propertySch && (it.opts.strictKeywords ? typeof $propertySch == 'object' && Object.keys($propertySch).length > 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) { $required[$required.length] = $property; } } } } else { var $required = $schema; } } if ($isData || $required.length) { var $currentErrorPath = it.errorPath, $loopRequired = $isData || $required.length >= it.opts.loopRequired, $ownProperties = it.opts.ownProperties; if ($breakOnError) { out += ' var missing' + ($lvl) + '; '; if ($loopRequired) { if (!$isData) { out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; } var $i = 'i' + $lvl, $propertyPath = 'schema' + $lvl + '[' + $i + ']', $missingProperty = '\' + ' + $propertyPath + ' + \''; if (it.opts._errorDataPathProperty) { it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); } out += ' var ' + ($valid) + ' = true; '; if ($isData) { out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; } out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; if ($ownProperties) { out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; } out += '; if (!' + ($valid) + ') break; } '; if ($isData) { out += ' } '; } out += ' if (!' + ($valid) + ') { '; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \''; if (it.opts._errorDataPathProperty) { out += 'is a required property'; } else { out += 'should have required property \\\'' + ($missingProperty) + '\\\''; } out += '\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += ' } else { '; } else { out += ' if ( '; var arr2 = $required; if (arr2) { var $propertyKey, $i = -1, l2 = arr2.length - 1; while ($i < l2) { $propertyKey = arr2[$i += 1]; if ($i) { out += ' || '; } var $prop = it.util.getProperty($propertyKey), $useData = $data + $prop; out += ' ( ( ' + ($useData) + ' === undefined '; if ($ownProperties) { out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; } out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; } } out += ') { '; var $propertyPath = 'missing' + $lvl, $missingProperty = '\' + ' + $propertyPath + ' + \''; if (it.opts._errorDataPathProperty) { it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; } var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \''; if (it.opts._errorDataPathProperty) { out += 'is a required property'; } else { out += 'should have required property \\\'' + ($missingProperty) + '\\\''; } out += '\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += ' } else { '; } } else { if ($loopRequired) { if (!$isData) { out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; } var $i = 'i' + $lvl, $propertyPath = 'schema' + $lvl + '[' + $i + ']', $missingProperty = '\' + ' + $propertyPath + ' + \''; if (it.opts._errorDataPathProperty) { it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); } if ($isData) { out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \''; if (it.opts._errorDataPathProperty) { out += 'is a required property'; } else { out += 'should have required property \\\'' + ($missingProperty) + '\\\''; } out += '\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; } out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; if ($ownProperties) { out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; } out += ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \''; if (it.opts._errorDataPathProperty) { out += 'is a required property'; } else { out += 'should have required property \\\'' + ($missingProperty) + '\\\''; } out += '\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; if ($isData) { out += ' } '; } } else { var arr3 = $required; if (arr3) { var $propertyKey, i3 = -1, l3 = arr3.length - 1; while (i3 < l3) { $propertyKey = arr3[i3 += 1]; var $prop = it.util.getProperty($propertyKey), $missingProperty = it.util.escapeQuotes($propertyKey), $useData = $data + $prop; if (it.opts._errorDataPathProperty) { it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); } out += ' if ( ' + ($useData) + ' === undefined '; if ($ownProperties) { out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; } out += ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \''; if (it.opts._errorDataPathProperty) { out += 'is a required property'; } else { out += 'should have required property \\\'' + ($missingProperty) + '\\\''; } out += '\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; } } } } it.errorPath = $currentErrorPath; } else if ($breakOnError) { out += ' if (true) {'; } return out; } /***/ }), /* 4215 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; $schemaValue = 'schema' + $lvl; } else { $schemaValue = $schema; } if (($schema || $isData) && it.opts.uniqueItems !== false) { if ($isData) { out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; } out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; var $itemType = it.schema.items && it.schema.items.type, $typeIsArray = Array.isArray($itemType); if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; } else { out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); out += ' if (' + (it.util[$method]($itemType, 'item', true)) + ') continue; '; if ($typeIsArray) { out += ' if (typeof item == \'string\') item = \'"\' + item; '; } out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; } out += ' } '; if ($isData) { out += ' } '; } out += ' if (!' + ($valid) + ') { '; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; if (it.opts.messages !== false) { out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; } if (it.opts.verbose) { out += ' , schema: '; if ($isData) { out += 'validate.schema' + ($schemaPath); } else { out += '' + ($schema); } out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += ' } '; if ($breakOnError) { out += ' else { '; } } else { if ($breakOnError) { out += ' if (true) { '; } } return out; } /***/ }), /* 4216 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var KEYWORDS = [ 'multipleOf', 'maximum', 'exclusiveMaximum', 'minimum', 'exclusiveMinimum', 'maxLength', 'minLength', 'pattern', 'additionalItems', 'maxItems', 'minItems', 'uniqueItems', 'maxProperties', 'minProperties', 'required', 'additionalProperties', 'enum', 'format', 'const' ]; module.exports = function (metaSchema, keywordsJsonPointers) { for (var i=0; i<keywordsJsonPointers.length; i++) { metaSchema = JSON.parse(JSON.stringify(metaSchema)); var segments = keywordsJsonPointers[i].split('/'); var keywords = metaSchema; var j; for (j=1; j<segments.length; j++) keywords = keywords[segments[j]]; for (j=0; j<KEYWORDS.length; j++) { var key = KEYWORDS[j]; var schema = keywords[key]; if (schema) { keywords[key] = { anyOf: [ schema, { $ref: 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#' } ] }; } } } return metaSchema; }; /***/ }), /* 4217 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var MissingRefError = __webpack_require__(909).MissingRef; module.exports = compileAsync; /** * Creates validating function for passed schema with asynchronous loading of missing schemas. * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema. * @this Ajv * @param {Object} schema schema object * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function. * @return {Promise} promise that resolves with a validating function. */ function compileAsync(schema, meta, callback) { /* eslint no-shadow: 0 */ /* global Promise */ /* jshint validthis: true */ var self = this; if (typeof this._opts.loadSchema != 'function') throw new Error('options.loadSchema should be a function'); if (typeof meta == 'function') { callback = meta; meta = undefined; } var p = loadMetaSchemaOf(schema).then(function () { var schemaObj = self._addSchema(schema, undefined, meta); return schemaObj.validate || _compileAsync(schemaObj); }); if (callback) { p.then( function(v) { callback(null, v); }, callback ); } return p; function loadMetaSchemaOf(sch) { var $schema = sch.$schema; return $schema && !self.getSchema($schema) ? compileAsync.call(self, { $ref: $schema }, true) : Promise.resolve(); } function _compileAsync(schemaObj) { try { return self._compile(schemaObj); } catch(e) { if (e instanceof MissingRefError) return loadMissingSchema(e); throw e; } function loadMissingSchema(e) { var ref = e.missingSchema; if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved'); var schemaPromise = self._loadingSchemas[ref]; if (!schemaPromise) { schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref); schemaPromise.then(removePromise, removePromise); } return schemaPromise.then(function (sch) { if (!added(ref)) { return loadMetaSchemaOf(sch).then(function () { if (!added(ref)) self.addSchema(sch, ref, undefined, meta); }); } }).then(function() { return _compileAsync(schemaObj); }); function removePromise() { delete self._loadingSchemas[ref]; } function added(ref) { return self._refs[ref] || self._schemas[ref]; } } } } /***/ }), /* 4218 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; var customRuleCode = __webpack_require__(4219); var definitionSchema = __webpack_require__(4220); module.exports = { add: addKeyword, get: getKeyword, remove: removeKeyword, validate: validateKeyword }; /** * Define custom keyword * @this Ajv * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. * @return {Ajv} this for method chaining */ function addKeyword(keyword, definition) { /* jshint validthis: true */ /* eslint no-shadow: 0 */ var RULES = this.RULES; if (RULES.keywords[keyword]) throw new Error('Keyword ' + keyword + ' is already defined'); if (!IDENTIFIER.test(keyword)) throw new Error('Keyword ' + keyword + ' is not a valid identifier'); if (definition) { this.validateKeyword(definition, true); var dataType = definition.type; if (Array.isArray(dataType)) { for (var i=0; i<dataType.length; i++) _addRule(keyword, dataType[i], definition); } else { _addRule(keyword, dataType, definition); } var metaSchema = definition.metaSchema; if (metaSchema) { if (definition.$data && this._opts.$data) { metaSchema = { anyOf: [ metaSchema, { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#' } ] }; } definition.validateSchema = this.compile(metaSchema, true); } } RULES.keywords[keyword] = RULES.all[keyword] = true; function _addRule(keyword, dataType, definition) { var ruleGroup; for (var i=0; i<RULES.length; i++) { var rg = RULES[i]; if (rg.type == dataType) { ruleGroup = rg; break; } } if (!ruleGroup) { ruleGroup = { type: dataType, rules: [] }; RULES.push(ruleGroup); } var rule = { keyword: keyword, definition: definition, custom: true, code: customRuleCode, implements: definition.implements }; ruleGroup.rules.push(rule); RULES.custom[keyword] = rule; } return this; } /** * Get keyword * @this Ajv * @param {String} keyword pre-defined or custom keyword. * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise. */ function getKeyword(keyword) { /* jshint validthis: true */ var rule = this.RULES.custom[keyword]; return rule ? rule.definition : this.RULES.keywords[keyword] || false; } /** * Remove keyword * @this Ajv * @param {String} keyword pre-defined or custom keyword. * @return {Ajv} this for method chaining */ function removeKeyword(keyword) { /* jshint validthis: true */ var RULES = this.RULES; delete RULES.keywords[keyword]; delete RULES.all[keyword]; delete RULES.custom[keyword]; for (var i=0; i<RULES.length; i++) { var rules = RULES[i].rules; for (var j=0; j<rules.length; j++) { if (rules[j].keyword == keyword) { rules.splice(j, 1); break; } } } return this; } /** * Validate keyword definition * @this Ajv * @param {Object} definition keyword definition object. * @param {Boolean} throwError true to throw exception if definition is invalid * @return {boolean} validation result */ function validateKeyword(definition, throwError) { validateKeyword.errors = null; var v = this._validateKeyword = this._validateKeyword || this.compile(definitionSchema, true); if (v(definition)) return true; validateKeyword.errors = v.errors; if (throwError) throw new Error('custom keyword definition is invalid: ' + this.errorsText(v.errors)); else return false; } /***/ }), /* 4219 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function generate_custom(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $errorKeyword; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $errs = 'errs__' + $lvl; var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; $schemaValue = 'schema' + $lvl; } else { $schemaValue = $schema; } var $rule = this, $definition = 'definition' + $lvl, $rDef = $rule.definition, $closingBraces = ''; var $compile, $inline, $macro, $ruleValidate, $validateCode; if ($isData && $rDef.$data) { $validateCode = 'keywordValidate' + $lvl; var $validateSchema = $rDef.validateSchema; out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; } else { $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); if (!$ruleValidate) return; $schemaValue = 'validate.schema' + $schemaPath; $validateCode = $ruleValidate.code; $compile = $rDef.compile; $inline = $rDef.inline; $macro = $rDef.macro; } var $ruleErrs = $validateCode + '.errors', $i = 'i' + $lvl, $ruleErr = 'ruleErr' + $lvl, $asyncKeyword = $rDef.async; if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); if (!($inline || $macro)) { out += '' + ($ruleErrs) + ' = null;'; } out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; if ($isData && $rDef.$data) { $closingBraces += '}'; out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; if ($validateSchema) { $closingBraces += '}'; out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; } } if ($inline) { if ($rDef.statements) { out += ' ' + ($ruleValidate.validate) + ' '; } else { out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; } } else if ($macro) { var $it = it.util.copy(it); var $closingBraces = ''; $it.level++; var $nextValid = 'valid' + $it.level; $it.schema = $ruleValidate.validate; $it.schemaPath = ''; var $wasComposite = it.compositeRule; it.compositeRule = $it.compositeRule = true; var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); it.compositeRule = $it.compositeRule = $wasComposite; out += ' ' + ($code); } else { var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; out += ' ' + ($validateCode) + '.call( '; if (it.opts.passContext) { out += 'this'; } else { out += 'self'; } if ($compile || $rDef.schema === false) { out += ' , ' + ($data) + ' '; } else { out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; } out += ' , (dataPath || \'\')'; if (it.errorPath != '""') { out += ' + ' + (it.errorPath); } var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; var def_callRuleValidate = out; out = $$outStack.pop(); if ($rDef.errors === false) { out += ' ' + ($valid) + ' = '; if ($asyncKeyword) { out += 'await '; } out += '' + (def_callRuleValidate) + '; '; } else { if ($asyncKeyword) { $ruleErrs = 'customErrors' + $lvl; out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; } else { out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; } } } if ($rDef.modifying) { out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; } out += '' + ($closingBraces); if ($rDef.valid) { if ($breakOnError) { out += ' if (true) { '; } } else { out += ' if ( '; if ($rDef.valid === undefined) { out += ' !'; if ($macro) { out += '' + ($nextValid); } else { out += '' + ($valid); } } else { out += ' ' + (!$rDef.valid) + ' '; } out += ') { '; $errorKeyword = $rule.keyword; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } var __err = out; out = $$outStack.pop(); if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { out += ' validate.errors = [' + (__err) + ']; return false; '; } } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } var def_customError = out; out = $$outStack.pop(); if ($inline) { if ($rDef.errors) { if ($rDef.errors != 'full') { out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } '; if (it.opts.verbose) { out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; '; } out += ' } '; } } else { if ($rDef.errors === false) { out += ' ' + (def_customError) + ' '; } else { out += ' if (' + ($errs) + ' == errors) { ' + (def_customError) + ' } else { for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; } '; if (it.opts.verbose) { out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; '; } out += ' } } '; } } } else if ($macro) { out += ' var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; if (it.opts.messages !== false) { out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; } if (it.opts.verbose) { out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { out += ' {} '; } out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError(vErrors); '; } else { out += ' validate.errors = vErrors; return false; '; } } } else { if ($rDef.errors === false) { out += ' ' + (def_customError) + ' '; } else { out += ' if (Array.isArray(' + ($ruleErrs) + ')) { if (vErrors === null) vErrors = ' + ($ruleErrs) + '; else vErrors = vErrors.concat(' + ($ruleErrs) + '); errors = vErrors.length; for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \'\') + ' + (it.errorPath) + '; ' + ($ruleErr) + '.schemaPath = "' + ($errSchemaPath) + '"; '; if (it.opts.verbose) { out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; '; } out += ' } } else { ' + (def_customError) + ' } '; } } out += ' } '; if ($breakOnError) { out += ' else { '; } } return out; } /***/ }), /* 4220 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var metaSchema = __webpack_require__(1647); module.exports = { $id: 'https://github.com/epoberezkin/ajv/blob/master/lib/definition_schema.js', definitions: { simpleTypes: metaSchema.definitions.simpleTypes }, type: 'object', dependencies: { schema: ['validate'], $data: ['validate'], statements: ['inline'], valid: {not: {required: ['macro']}} }, properties: { type: metaSchema.properties.type, schema: {type: 'boolean'}, statements: {type: 'boolean'}, dependencies: { type: 'array', items: {type: 'string'} }, metaSchema: {type: 'object'}, modifying: {type: 'boolean'}, valid: {type: 'boolean'}, $data: {type: 'boolean'}, async: {type: 'boolean'}, errors: { anyOf: [ {type: 'boolean'}, {const: 'full'} ] } } }; /***/ }), /* 4221 */ /***/ (function(module, exports) { module.exports = {"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false} /***/ }), /* 4222 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(1648), baseClone = __webpack_require__(1649), baseUnset = __webpack_require__(4279), castPath = __webpack_require__(925), copyObject = __webpack_require__(323), customOmitClone = __webpack_require__(4289), flatRest = __webpack_require__(4290), getAllKeysIn = __webpack_require__(1664); /** 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; /***/ }), /* 4223 */ /***/ (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; /***/ }), /* 4224 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(554); /** 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; /***/ }), /* 4225 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(554); /** * 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; /***/ }), /* 4226 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(554); /** * 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; /***/ }), /* 4227 */ /***/ (function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(554); /** * 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; /***/ }), /* 4228 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(553); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /* 4229 */ /***/ (function(module, exports) { /** * 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; } module.exports = stackDelete; /***/ }), /* 4230 */ /***/ (function(module, exports) { /** * 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); } module.exports = stackGet; /***/ }), /* 4231 */ /***/ (function(module, exports) { /** * 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); } module.exports = stackHas; /***/ }), /* 4232 */ /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(553), Map = __webpack_require__(911), MapCache = __webpack_require__(913); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * 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; } module.exports = stackSet; /***/ }), /* 4233 */ /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(912), isMasked = __webpack_require__(4236), isObject = __webpack_require__(209), toSource = __webpack_require__(1651); /** * 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; /***/ }), /* 4234 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(322); /** 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; /***/ }), /* 4235 */ /***/ (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; /***/ }), /* 4236 */ /***/ (function(module, exports, __webpack_require__) { var coreJsData = __webpack_require__(4237); /** 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; /***/ }), /* 4237 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(154); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; /***/ }), /* 4238 */ /***/ (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; /***/ }), /* 4239 */ /***/ (function(module, exports, __webpack_require__) { var Hash = __webpack_require__(4240), ListCache = __webpack_require__(553), Map = __webpack_require__(911); /** * 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; /***/ }), /* 4240 */ /***/ (function(module, exports, __webpack_require__) { var hashClear = __webpack_require__(4241), hashDelete = __webpack_require__(4242), hashGet = __webpack_require__(4243), hashHas = __webpack_require__(4244), hashSet = __webpack_require__(4245); /** * 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; /***/ }), /* 4241 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(555); /** * 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; /***/ }), /* 4242 */ /***/ (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; /***/ }), /* 4243 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(555); /** 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; /***/ }), /* 4244 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(555); /** 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; /***/ }), /* 4245 */ /***/ (function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(555); /** 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; /***/ }), /* 4246 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(556); /** * 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; /***/ }), /* 4247 */ /***/ (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; /***/ }), /* 4248 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(556); /** * 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; /***/ }), /* 4249 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(556); /** * 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; /***/ }), /* 4250 */ /***/ (function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(556); /** * 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; /***/ }), /* 4251 */ /***/ (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; /***/ }), /* 4252 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(323), keys = __webpack_require__(915); /** * The base implementation of `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssign(object, source) { return object && copyObject(source, keys(source), object); } module.exports = baseAssign; /***/ }), /* 4253 */ /***/ (function(module, exports) { /** * 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; } module.exports = baseTimes; /***/ }), /* 4254 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(321), isObjectLike = __webpack_require__(174); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * 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; } module.exports = baseIsArguments; /***/ }), /* 4255 */ /***/ (function(module, exports) { /** * 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 = stubFalse; /***/ }), /* 4256 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(321), isLength = __webpack_require__(1656), isObjectLike = __webpack_require__(174); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', 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 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; /** * 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)]; } module.exports = baseIsTypedArray; /***/ }), /* 4257 */ /***/ (function(module, exports, __webpack_require__) { var isPrototype = __webpack_require__(920), nativeKeys = __webpack_require__(4258); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * 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; } module.exports = baseKeys; /***/ }), /* 4258 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(1657); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /* 4259 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(323), keysIn = __webpack_require__(400); /** * The base implementation of `_.assignIn` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssignIn(object, source) { return object && copyObject(source, keysIn(source), object); } module.exports = baseAssignIn; /***/ }), /* 4260 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(209), isPrototype = __webpack_require__(920), nativeKeysIn = __webpack_require__(4261); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keysIn` 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 baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } module.exports = baseKeysIn; /***/ }), /* 4261 */ /***/ (function(module, exports) { /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } module.exports = nativeKeysIn; /***/ }), /* 4262 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(323), getSymbols = __webpack_require__(921); /** * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbols(source, object) { return copyObject(source, getSymbols(source), object); } module.exports = copySymbols; /***/ }), /* 4263 */ /***/ (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; /***/ }), /* 4264 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(323), getSymbolsIn = __webpack_require__(1661); /** * Copies own and inherited symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbolsIn(source, object) { return copyObject(source, getSymbolsIn(source), object); } module.exports = copySymbolsIn; /***/ }), /* 4265 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(258), root = __webpack_require__(154); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); module.exports = DataView; /***/ }), /* 4266 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(258), root = __webpack_require__(154); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }), /* 4267 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(258), root = __webpack_require__(154); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /* 4268 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(258), root = __webpack_require__(154); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /* 4269 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Initializes an array clone. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the initialized clone. */ function initCloneArray(array) { var length = array.length, result = new array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result; } module.exports = initCloneArray; /***/ }), /* 4270 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(924), cloneDataView = __webpack_require__(4271), cloneRegExp = __webpack_require__(4272), cloneSymbol = __webpack_require__(4273), cloneTypedArray = __webpack_require__(1666); /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; 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]'; /** * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ function initCloneByTag(object, tag, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: return cloneArrayBuffer(object); case boolTag: case dateTag: return new Ctor(+object); case dataViewTag: return cloneDataView(object, isDeep); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: return cloneTypedArray(object, isDeep); case mapTag: return new Ctor; case numberTag: case stringTag: return new Ctor(object); case regexpTag: return cloneRegExp(object); case setTag: return new Ctor; case symbolTag: return cloneSymbol(object); } } module.exports = initCloneByTag; /***/ }), /* 4271 */ /***/ (function(module, exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(924); /** * Creates a clone of `dataView`. * * @private * @param {Object} dataView The data view to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned data view. */ function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } module.exports = cloneDataView; /***/ }), /* 4272 */ /***/ (function(module, exports) { /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** * Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } module.exports = cloneRegExp; /***/ }), /* 4273 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(322); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a clone of the `symbol` object. * * @private * @param {Object} symbol The symbol object to clone. * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } module.exports = cloneSymbol; /***/ }), /* 4274 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(209); /** 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; /***/ }), /* 4275 */ /***/ (function(module, exports, __webpack_require__) { var baseIsMap = __webpack_require__(4276), baseUnary = __webpack_require__(918), nodeUtil = __webpack_require__(919); /* Node.js helper references. */ var nodeIsMap = nodeUtil && nodeUtil.isMap; /** * Checks if `value` is classified as a `Map` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * * _.isMap(new Map); * // => true * * _.isMap(new WeakMap); * // => false */ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; module.exports = isMap; /***/ }), /* 4276 */ /***/ (function(module, exports, __webpack_require__) { var getTag = __webpack_require__(559), isObjectLike = __webpack_require__(174); /** `Object#toString` result references. */ var mapTag = '[object Map]'; /** * The base implementation of `_.isMap` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. */ function baseIsMap(value) { return isObjectLike(value) && getTag(value) == mapTag; } module.exports = baseIsMap; /***/ }), /* 4277 */ /***/ (function(module, exports, __webpack_require__) { var baseIsSet = __webpack_require__(4278), baseUnary = __webpack_require__(918), nodeUtil = __webpack_require__(919); /* Node.js helper references. */ var nodeIsSet = nodeUtil && nodeUtil.isSet; /** * Checks if `value` is classified as a `Set` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * * _.isSet(new Set); * // => true * * _.isSet(new WeakSet); * // => false */ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; module.exports = isSet; /***/ }), /* 4278 */ /***/ (function(module, exports, __webpack_require__) { var getTag = __webpack_require__(559), isObjectLike = __webpack_require__(174); /** `Object#toString` result references. */ var setTag = '[object Set]'; /** * The base implementation of `_.isSet` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. */ function baseIsSet(value) { return isObjectLike(value) && getTag(value) == setTag; } module.exports = baseIsSet; /***/ }), /* 4279 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(925), last = __webpack_require__(4286), parent = __webpack_require__(4287), toKey = __webpack_require__(1669); /** * The base implementation of `_.unset`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The property path to unset. * @returns {boolean} Returns `true` if the property is deleted, else `false`. */ function baseUnset(object, path) { path = castPath(path, object); object = parent(object, path); return object == null || delete object[toKey(last(path))]; } module.exports = baseUnset; /***/ }), /* 4280 */ /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(175), isSymbol = __webpack_require__(926); /** 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; /***/ }), /* 4281 */ /***/ (function(module, exports, __webpack_require__) { var memoizeCapped = __webpack_require__(4282); /** 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; /***/ }), /* 4282 */ /***/ (function(module, exports, __webpack_require__) { var memoize = __webpack_require__(4283); /** 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; /***/ }), /* 4283 */ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(913); /** 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; /***/ }), /* 4284 */ /***/ (function(module, exports, __webpack_require__) { var baseToString = __webpack_require__(4285); /** * 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; /***/ }), /* 4285 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(322), arrayMap = __webpack_require__(1648), isArray = __webpack_require__(175), isSymbol = __webpack_require__(926); /** 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; /***/ }), /* 4286 */ /***/ (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; /***/ }), /* 4287 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(1668), baseSlice = __webpack_require__(4288); /** * Gets the parent value at `path` of `object`. * * @private * @param {Object} object The object to query. * @param {Array} path The path to get the parent value of. * @returns {*} Returns the parent value. */ function parent(object, path) { return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); } module.exports = parent; /***/ }), /* 4288 */ /***/ (function(module, exports) { /** * The base implementation of `_.slice` without an iteratee call guard. * * @private * @param {Array} array The array to slice. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the slice of `array`. */ function baseSlice(array, start, end) { var index = -1, length = array.length; if (start < 0) { start = -start > length ? 0 : (length + start); } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : ((end - start) >>> 0); start >>>= 0; var result = Array(length); while (++index < length) { result[index] = array[index + start]; } return result; } module.exports = baseSlice; /***/ }), /* 4289 */ /***/ (function(module, exports, __webpack_require__) { var isPlainObject = __webpack_require__(1670); /** * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain * objects. * * @private * @param {*} value The value to inspect. * @param {string} key The key of the property to inspect. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. */ function customOmitClone(value) { return isPlainObject(value) ? undefined : value; } module.exports = customOmitClone; /***/ }), /* 4290 */ /***/ (function(module, exports, __webpack_require__) { var flatten = __webpack_require__(4291), overRest = __webpack_require__(1671), setToString = __webpack_require__(1672); /** * 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; /***/ }), /* 4291 */ /***/ (function(module, exports, __webpack_require__) { var baseFlatten = __webpack_require__(4292); /** * Flattens `array` a single level deep. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to flatten. * @returns {Array} Returns the new flattened array. * @example * * _.flatten([1, [2, [3, [4]], 5]]); * // => [1, 2, [3, [4]], 5] */ function flatten(array) { var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } module.exports = flatten; /***/ }), /* 4292 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(922), isFlattenable = __webpack_require__(4293); /** * 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; /***/ }), /* 4293 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(322), isArguments = __webpack_require__(916), isArray = __webpack_require__(175); /** Built-in value references. */ var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; /** * Checks if `value` is a flattenable `arguments` object or array. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } module.exports = isFlattenable; /***/ }), /* 4294 */ /***/ (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; /***/ }), /* 4295 */ /***/ (function(module, exports, __webpack_require__) { var constant = __webpack_require__(4296), defineProperty = __webpack_require__(1653), identity = __webpack_require__(1673); /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !defineProperty ? identity : function(func, string) { return defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(string), 'writable': true }); }; module.exports = baseSetToString; /***/ }), /* 4296 */ /***/ (function(module, exports) { /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } module.exports = constant; /***/ }), /* 4297 */ /***/ (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; /***/ }), /* 4298 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPathWithArrayIndex = getPathWithArrayIndex; exports.extractParameters = extractParameters; exports.createCacheKey = createCacheKey; exports.toJSON = toJSON; exports.toQueryParam = toQueryParam; exports["default"] = createTriggers; var _isEqual = _interopRequireDefault(__webpack_require__(4299)); var _merge = _interopRequireDefault(__webpack_require__(4311)); var _reactCmf = _interopRequireDefault(__webpack_require__(263)); var _flatten = _interopRequireDefault(__webpack_require__(1678)); var _defaultRegistry = _interopRequireDefault(__webpack_require__(1679)); 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); } var mergeCSRFToken = _reactCmf["default"].middlewares.http.csrf.mergeCSRFToken; var DEFAULT_HEADERS = { 'Content-Type': 'application/json', Accept: 'application/json' }; function passthroughTrigger(_ref) { var error = _ref.error, trigger = _ref.trigger, body = _ref.body; // eslint-disable-next-line no-console console.error("".concat(JSON.stringify(trigger), " doesnt exists or fails with error ").concat(error || '-')); return body; } /** * array are describe without their index * use the schema to guess the path to use * to get the value in the properties * @param {string} specPath the path provided by the trigger * @param {Object} schema the schema of the current field * @return {string} path to get the value in properties */ function getPathWithArrayIndex(specPath, schema) { if (!schema) { return specPath; } var contextualPathItems = schema.key; if (!specPath || !contextualPathItems) { return specPath; } var keyIndex = 0; var schemaKey = schema.key; return specPath.split('.').reduce(function (acc, current) { if (acc) { acc += '.'; } if (current.endsWith('[]')) { acc += "".concat(current.substring(0, current.length - 1)).concat(schemaKey[keyIndex + 1], "]"); keyIndex += 2; } else { acc += current; keyIndex += 1; } return acc; }, ''); } /** * extract parameters from properties * @param {Array} parameters required * @param {Object} properties source of the data * @param {Object} schema of the current field the trigger is executed * @return {Object} payload of the trigger */ function extractParameters(parameters, properties, schema) { if (!parameters || !Array.isArray(parameters)) { return {}; } var flattenProps = (0, _flatten["default"])(properties, { includeObjects: true }); return parameters.reduce(function (acc, param) { var path = getPathWithArrayIndex(param.path, schema); var value = flattenProps[path]; if (_typeof(value) === 'object') { Object.keys(value).filter(function (key) { return _typeof(value[key]) !== 'object'; }).forEach(function (key) { acc["".concat(param.key).concat(key)] = value[key]; }); } else { acc[param.key] = value; } return acc; }, {}); } function createCacheKey(trigger) { if (trigger.type !== 'suggestions' || (trigger.parameters || []).length === 0) { return undefined; } return "".concat(trigger.type, ":").concat(trigger.family, ":").concat(trigger.action, ":").concat((trigger.parameters || []).map(function (it) { return it.path; }).join(':')); } function toJSON(resp) { if (!resp.ok || resp.status >= 300) { return resp.text().then(function (error) { var json; try { json = JSON.parse(error); } catch (e) { json = { error: error }; } throw json; }); } return resp.json(); } function toQueryParam(obj) { return Object.keys(obj).map(function (key) { return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(obj[key])); }).join('&'); } // customRegistry can be used to add extensions or custom trigger // (not portable accross integrations) function createTriggers(_ref2) { var url = _ref2.url, customRegistry = _ref2.customRegistry, _ref2$lang = _ref2.lang, lang = _ref2$lang === void 0 ? 'en' : _ref2$lang, headers = _ref2.headers, fetchConfig = _ref2.fetchConfig, _ref2$security = _ref2.security, security = _ref2$security === void 0 ? {} : _ref2$security; if (!url) { throw new Error('url params is required to createTriggers'); } var cache = {}; var actualHeaders = (0, _merge["default"])({}, DEFAULT_HEADERS, headers); return function onDefaultTrigger(event, _ref3) { var trigger = _ref3.trigger, schema = _ref3.schema, properties = _ref3.properties, errors = _ref3.errors; var services = _objectSpread(_objectSpread({}, _defaultRegistry["default"]), customRegistry); var parameters = extractParameters(trigger.parameters, properties, schema); var cacheKey = createCacheKey(trigger); if (cacheKey) { if (cache[cacheKey] && cache[cacheKey].result && (0, _isEqual["default"])(cache[cacheKey].parameters, parameters)) { return Promise.resolve(cache[cacheKey].result); } else if (cache[cacheKey]) { delete cache[cacheKey]; } } function onSuccess(body) { var result = (services[trigger.type] || passthroughTrigger)({ body: body, errors: errors, event: event, properties: properties, schema: schema, trigger: trigger }); if (body.cacheable) { cache[cacheKey] = { parameters: parameters, result: result }; } return result; } function onError(error) { return services.error({ error: error, errors: errors, properties: properties, schema: schema, trigger: trigger }); } if (trigger.remote === false) { var result = onSuccess({}); if (result && result.then) { return result["catch"](onError); } return new Promise(function (resolve) { return resolve(result); }); } var config = _reactCmf["default"].sagas.http.getDefaultConfig() || {}; var httpSecurity = config.security || {}; if (security.CSRFTokenCookieKey || security.CSRFTokenHeaderKey) { httpSecurity = security; } var fetchUrl = "".concat(url, "?").concat(toQueryParam({ lang: lang, action: trigger.action, family: trigger.family, type: trigger.type })); return fetch(fetchUrl, mergeCSRFToken({ security: httpSecurity })(_objectSpread({ method: 'POST', headers: actualHeaders, body: JSON.stringify(parameters), credentials: 'include' }, fetchConfig))).then(toJSON).then(onSuccess)["catch"](onError); }; } //# sourceMappingURL=createTriggers.js.map /***/ }), /* 4299 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(4300); /** * 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; /***/ }), /* 4300 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(4301), isObjectLike = __webpack_require__(174); /** * 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; /***/ }), /* 4301 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(910), equalArrays = __webpack_require__(1675), equalByTag = __webpack_require__(4307), equalObjects = __webpack_require__(4310), getTag = __webpack_require__(559), isArray = __webpack_require__(175), isBuffer = __webpack_require__(557), isTypedArray = __webpack_require__(917); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * 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); } module.exports = baseIsEqualDeep; /***/ }), /* 4302 */ /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(913), setCacheAdd = __webpack_require__(4303), setCacheHas = __webpack_require__(4304); /** * * 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; /***/ }), /* 4303 */ /***/ (function(module, exports) { /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * 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; } module.exports = setCacheAdd; /***/ }), /* 4304 */ /***/ (function(module, exports) { /** * 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); } module.exports = setCacheHas; /***/ }), /* 4305 */ /***/ (function(module, exports) { /** * 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; } module.exports = arraySome; /***/ }), /* 4306 */ /***/ (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; /***/ }), /* 4307 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(322), Uint8Array = __webpack_require__(1665), eq = __webpack_require__(399), equalArrays = __webpack_require__(1675), mapToArray = __webpack_require__(4308), setToArray = __webpack_require__(4309); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]'; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * 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; } module.exports = equalByTag; /***/ }), /* 4308 */ /***/ (function(module, exports) { /** * 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; } module.exports = mapToArray; /***/ }), /* 4309 */ /***/ (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; /***/ }), /* 4310 */ /***/ (function(module, exports, __webpack_require__) { var getAllKeys = __webpack_require__(1662); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * 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; } } // Check that cyclic values are equal. var objStacked = stack.get(object); var othStacked = stack.get(other); if (objStacked && othStacked) { return objStacked == other && othStacked == object; } 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; } module.exports = equalObjects; /***/ }), /* 4311 */ /***/ (function(module, exports, __webpack_require__) { var baseMerge = __webpack_require__(4312), createAssigner = __webpack_require__(4318); /** * 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; /***/ }), /* 4312 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(910), assignMergeValue = __webpack_require__(1676), baseFor = __webpack_require__(4313), baseMergeDeep = __webpack_require__(4315), isObject = __webpack_require__(209), keysIn = __webpack_require__(400), safeGet = __webpack_require__(1677); /** * The base implementation of `_.merge` without support for multiple sources. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {number} srcIndex The index of `source`. * @param {Function} [customizer] The function to customize merged values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } baseFor(source, function(srcValue, key) { stack || (stack = new Stack); if (isObject(srcValue)) { baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { newValue = srcValue; } assignMergeValue(object, key, newValue); } }, keysIn); } module.exports = baseMerge; /***/ }), /* 4313 */ /***/ (function(module, exports, __webpack_require__) { var createBaseFor = __webpack_require__(4314); /** * 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; /***/ }), /* 4314 */ /***/ (function(module, exports) { /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } module.exports = createBaseFor; /***/ }), /* 4315 */ /***/ (function(module, exports, __webpack_require__) { var assignMergeValue = __webpack_require__(1676), cloneBuffer = __webpack_require__(1658), cloneTypedArray = __webpack_require__(1666), copyArray = __webpack_require__(1659), initCloneObject = __webpack_require__(1667), isArguments = __webpack_require__(916), isArray = __webpack_require__(175), isArrayLikeObject = __webpack_require__(4316), isBuffer = __webpack_require__(557), isFunction = __webpack_require__(912), isObject = __webpack_require__(209), isPlainObject = __webpack_require__(1670), isTypedArray = __webpack_require__(917), safeGet = __webpack_require__(1677), toPlainObject = __webpack_require__(4317); /** * A specialized version of `baseMerge` for arrays and objects which performs * deep merges and tracks traversed objects enabling objects with circular * references to be merged. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {string} key The key of the value to merge. * @param {number} srcIndex The index of `source`. * @param {Function} mergeFunc The function to merge values. * @param {Function} [customizer] The function to customize assigned values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, (key + ''), object, source, stack) : undefined; var isCommon = newValue === undefined; if (isCommon) { var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || isFunction(objValue)) { newValue = initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack['delete'](srcValue); } assignMergeValue(object, key, newValue); } module.exports = baseMergeDeep; /***/ }), /* 4316 */ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(558), isObjectLike = __webpack_require__(174); /** * 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; /***/ }), /* 4317 */ /***/ (function(module, exports, __webpack_require__) { var copyObject = __webpack_require__(323), keysIn = __webpack_require__(400); /** * Converts `value` to a plain object flattening inherited enumerable string * keyed properties of `value` to own properties of the plain object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to convert. * @returns {Object} Returns the converted plain object. * @example * * function Foo() { * this.b = 2; * } * * Foo.prototype.c = 3; * * _.assign({ 'a': 1 }, new Foo); * // => { 'a': 1, 'b': 2 } * * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); * // => { 'a': 1, 'b': 2, 'c': 3 } */ function toPlainObject(value) { return copyObject(value, keysIn(value)); } module.exports = toPlainObject; /***/ }), /* 4318 */ /***/ (function(module, exports, __webpack_require__) { var baseRest = __webpack_require__(4319), isIterateeCall = __webpack_require__(4320); /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } module.exports = createAssigner; /***/ }), /* 4319 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(1673), overRest = __webpack_require__(1671), setToString = __webpack_require__(1672); /** * 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; /***/ }), /* 4320 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(399), isArrayLike = __webpack_require__(558), isIndex = __webpack_require__(1655), isObject = __webpack_require__(209); /** * 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; /***/ }), /* 4321 */ /***/ (function(module, exports, __webpack_require__) { var baseClone = __webpack_require__(1649); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4; /** * This method is like `_.clone` except that it recursively clones `value`. * * @static * @memberOf _ * @since 1.0.0 * @category Lang * @param {*} value The value to recursively clone. * @returns {*} Returns the deep cloned value. * @see _.clone * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; * * var deep = _.cloneDeep(objects); * console.log(deep[0] === objects[0]); * // => false */ function cloneDeep(value) { return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } module.exports = cloneDeep; /***/ }), /* 4322 */ /***/ (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 _Datalist = _interopRequireDefault(__webpack_require__(1629)); var _MultiSelectTag = _interopRequireDefault(__webpack_require__(1634)); var _MultiSelect = _interopRequireWildcard(__webpack_require__(4323)); var _NameResolver = _interopRequireDefault(__webpack_require__(4326)); 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 }; } /* eslint-disable import/prefer-default-export */ var _default = { datalist: (0, _NameResolver["default"])(_Datalist["default"]), multiSelectTag: (0, _NameResolver["default"])(_MultiSelectTag["default"]), multiSelect: (0, _NameResolver["default"])(_MultiSelect["default"]), multiSelect_text: (0, _NameResolver["default"])(_MultiSelect.MultiSelectTextMode) }; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4323 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "MultiSelectTextMode", { enumerable: true, get: function get() { return _TextMode["default"]; } }); exports["default"] = void 0; var _MultiSelect = _interopRequireDefault(__webpack_require__(4324)); var _TextMode = _interopRequireDefault(__webpack_require__(4325)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _MultiSelect["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4324 */ /***/ (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__(534)); var _react = _interopRequireDefault(__webpack_require__(0)); var _MultiSelect = _interopRequireDefault(__webpack_require__(1378)); var _FieldTemplate = _interopRequireDefault(__webpack_require__(43)); var _generateId = __webpack_require__(61); var _trigger = _interopRequireDefault(__webpack_require__(396)); 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); } var MultiSelectField = /*#__PURE__*/function (_React$Component) { _inherits(MultiSelectField, _React$Component); var _super = _createSuper(MultiSelectField); function MultiSelectField(props) { var _this; _classCallCheck(this, MultiSelectField); _this = _super.call(this, props); _this.state = {}; _this.onTrigger = _this.onTrigger.bind(_assertThisInitialized(_this)); _this.onTriggerResult = _this.onTriggerResult.bind(_assertThisInitialized(_this)); _this.onChange = _this.onChange.bind(_assertThisInitialized(_this)); _this.getTitleMap = _this.getTitleMap.bind(_assertThisInitialized(_this)); return _this; } _createClass(MultiSelectField, [{ key: "componentDidMount", value: function componentDidMount() { this.onTrigger({ type: 'didMount' }); } }, { key: "onTrigger", value: function onTrigger(event) { var _this2 = this; (0, _trigger["default"])(event, { eventNames: [event.type], triggersDefinitions: this.props.schema.triggers, onTrigger: this.onTriggerResult, onLoading: function onLoading(isLoading) { return _this2.setState({ isLoading: isLoading }); }, onResponse: function onResponse(data) { return _this2.setState(data); } }); } }, { key: "onTriggerResult", value: function onTriggerResult(event, trigger) { return this.props.onTrigger(event, { trigger: trigger, schema: this.props.schema, errors: this.props.errors, properties: this.props.properties }); } }, { key: "onChange", value: function onChange(event, selected) { var payload = { schema: _objectSpread(_objectSpread({}, this.props.schema), {}, { titleMap: this.getTitleMap() }), value: selected }; this.props.onChange(event, payload); this.props.onFinish(event, payload); } }, { key: "getTitleMap", value: function getTitleMap() { if (this.state.titleMap) { return this.state.titleMap; } var titleMap = this.props.schema.titleMap; if (titleMap && Object.keys(titleMap).length > 0) { return titleMap; } var _this$props$value = this.props.value, value = _this$props$value === void 0 ? [] : _this$props$value; var names = this.props.resolveName(value); return value.map(function (nextVal, index) { return { name: names[index], value: nextVal }; }); } }, { key: "getChildrenErrorMessage", value: function getChildrenErrorMessage() { var errors = this.props.errors.errors; if (!errors || errors.length === 0) { return undefined; } var key = this.props.schema.key.toString(); return Object.entries(errors).filter(function (entry) { return entry[0].startsWith(key); }).map(function (entry) { return entry[1]; }).join(', '); } }, { key: "render", value: function render() { var _this$props = this.props, id = _this$props.id, isValid = _this$props.isValid, errorMessage = _this$props.errorMessage, schema = _this$props.schema; var descriptionId = (0, _generateId.generateDescriptionId)(id); var errorId = (0, _generateId.generateErrorId)(id); var errorMsg = errorMessage || this.getChildrenErrorMessage(); var isDeepValid = isValid && !errorMsg; return /*#__PURE__*/_react["default"].createElement(_FieldTemplate["default"], { description: schema.description, descriptionId: descriptionId, errorId: errorId, errorMessage: errorMsg, id: id, isValid: isDeepValid, label: schema.title, required: schema.required }, /*#__PURE__*/_react["default"].createElement(_MultiSelect["default"], { id: id, autoFocus: schema.autoFocus, disabled: schema.disabled, required: schema.required, placeholder: schema.placeholder, readOnly: schema.readOnly, restricted: schema.restricted, onBlur: this.onTrigger, onChange: this.onChange, onFocus: this.onTrigger, options: this.getTitleMap(), selected: this.props.value, isLoading: this.state.isLoading })); } }]); return MultiSelectField; }(_react["default"].Component); exports["default"] = MultiSelectField; if (process.env.NODE_ENV !== 'production') { MultiSelectField.propTypes = { id: _propTypes["default"].string, isValid: _propTypes["default"].bool, errorMessage: _propTypes["default"].string, errors: _propTypes["default"].object, onChange: _propTypes["default"].func.isRequired, onFinish: _propTypes["default"].func.isRequired, onTrigger: _propTypes["default"].func.isRequired, properties: _propTypes["default"].object, resolveName: _propTypes["default"].func, schema: _propTypes["default"].shape({ autoFocus: _propTypes["default"].bool, description: _propTypes["default"].string, disabled: _propTypes["default"].bool, key: _propTypes["default"].array, placeholder: _propTypes["default"].string, readOnly: _propTypes["default"].bool, required: _propTypes["default"].bool, restricted: _propTypes["default"].bool, title: _propTypes["default"].string, titleMap: _propTypes["default"].arrayOf(_propTypes["default"].shape({ name: _propTypes["default"].string.isRequired, value: _propTypes["default"].string.isRequired })), triggers: _propTypes["default"].arrayOf(_propTypes["default"].shape({ onEvent: _propTypes["default"].string })) }), value: _propTypes["default"].arrayOf(_propTypes["default"].string) }; } MultiSelectField.defaultProps = { isValid: true, schema: {}, value: [], resolveName: function resolveName(value) { return value; } }; //# sourceMappingURL=MultiSelect.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4325 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = MultiSelectTextMode; var _propTypes = _interopRequireDefault(__webpack_require__(534)); var _react = _interopRequireDefault(__webpack_require__(0)); var _Badge = _interopRequireDefault(__webpack_require__(191)); var _FieldTemplate = __webpack_require__(43); var _VirtualizedList = _interopRequireDefault(__webpack_require__(247)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function renderItem(props) { var item = _VirtualizedList["default"].rowUtils.getRowData(props.parent, props.index); return /*#__PURE__*/_react["default"].createElement(_Badge["default"], { style: props.style, key: props.index, label: item.name, selected: true }); } renderItem.height = 35; renderItem.propTypes = { parent: _propTypes["default"].object, style: _propTypes["default"].object, index: _propTypes["default"].number }; function MultiSelectTextMode(props) { var names = props.resolveName(props.value); var titleMap = props.value.map(function (nextVal, index) { return { name: names[index], value: nextVal }; }); return /*#__PURE__*/_react["default"].createElement(_FieldTemplate.TextMode, { id: props.id, label: props.schema.title }, /*#__PURE__*/_react["default"].createElement("div", { style: { height: 300 } }, /*#__PURE__*/_react["default"].createElement(_VirtualizedList["default"], { type: "tc-multiselect", rowHeight: props.itemViewRender.rowHeight, rowRenderers: { 'tc-multiselect': props.itemViewRender }, collection: titleMap }))); } if (process.env.NODE_ENV !== 'production') { MultiSelectTextMode.propTypes = { itemViewRender: _propTypes["default"].func, id: _propTypes["default"].string, resolveName: _propTypes["default"].func, schema: _propTypes["default"].shape({ title: _propTypes["default"].string, titleMap: _propTypes["default"].arrayOf(_propTypes["default"].shape({ name: _propTypes["default"].string.isRequired, value: _propTypes["default"].string.isRequired })) }).isRequired, value: _propTypes["default"].arrayOf(_propTypes["default"].string) }; } MultiSelectTextMode.defaultProps = { value: [], itemViewRender: renderItem, resolveName: function resolveName(value) { return value; } }; //# sourceMappingURL=TextMode.component.js.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) /***/ }), /* 4326 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _NameResolver = _interopRequireDefault(__webpack_require__(4327)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _NameResolver["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4327 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = withNameResolver; var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(534)); var _properties = __webpack_require__(96); 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 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 withNameResolver(WrappedComponent) { function NameResolver(props) { function resolveName(value) { // create schema to get entry name from internal properties var key = Array.from(props.schema.key); key[key.length - 1] = "$".concat(key[key.length - 1], "_name"); var nameSchema = _objectSpread(_objectSpread({}, props.schema), {}, { key: key }); return (0, _properties.getValue)(props.properties, nameSchema) || value; } return /*#__PURE__*/_react["default"].createElement(WrappedComponent, _extends({}, props, { resolveName: resolveName })); } NameResolver.displayName = "NameResolver(".concat(WrappedComponent.displayName, ")"); NameResolver.propTypes = { properties: _propTypes["default"].object, schema: _propTypes["default"].shape({ key: _propTypes["default"].array }) }; return NameResolver; } //# sourceMappingURL=NameResolver.component.js.map /***/ }), /* 4328 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactCmf = __webpack_require__(263); var _errors = __webpack_require__(397); var _errors2 = _interopRequireDefault(_errors); var _kit = __webpack_require__(1674); var _kit2 = _interopRequireDefault(_kit); var _defaultRegistry = __webpack_require__(1679); var _defaultRegistry2 = _interopRequireDefault(_defaultRegistry); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function NoSelectedComponent() { return _react2.default.createElement( 'div', null, _react2.default.createElement( 'h1', null, 'No component selected' ), _react2.default.createElement( 'p', null, 'Click on a component to see its form' ) ); } /** * Copyright (C) 2006-2024 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 Detail(props) { var notSelected = null; var submitted = null; var form = null; var validationWithSuccessFeedback = function validationWithSuccessFeedback(_ref) { var trigger = _ref.trigger, schema = _ref.schema, body = _ref.body, errors = _ref.errors; if (body.status === 'OK' && trigger.type === 'healthcheck') { props.onNotification({ id: 'healthcheck_' + new Date().getTime(), title: 'Success', message: body.comment || 'Trigger ' + trigger.type + ' / ' + trigger.family + ' / ' + trigger.action + ' succeeded' }); } return _defaultRegistry2.default.validation({ schema: schema, body: body, errors: errors }); }; var registry = { healthcheck: validationWithSuccessFeedback, built_in_suggestable: function built_in_suggestable() { return { titleMap: Array(10).fill().map(function (x, i) { return { name: 'Proposal ' + i, value: 'value_' + i }; }) }; } }; if (!props.definitionURL) { notSelected = _react2.default.createElement(NoSelectedComponent, null); } else { var lang = new URLSearchParams(window.location.search).get('language') || 'en'; form = _react2.default.createElement(_reactCmf.Inject, { id: 'detail-form', componentId: 'detail-form', component: 'ComponentForm', definitionURL: '/api/v1' + props.definitionURL + (props.definitionURL.indexOf('?') > 0 ? '&' : '?') + 'language=' + lang, triggerURL: '/api/v1/application/action', lang: lang, customTriggers: registry }); if (props.submitted) { var configuration = _kit2.default.flatten(props.uiSpec.properties); submitted = _react2.default.createElement( 'div', null, _react2.default.createElement( 'pre', null, JSON.stringify(configuration, undefined, 2) ) ); } } return _react2.default.createElement( 'div', null, _react2.default.createElement( 'div', { className: 'col-md-6' }, notSelected, form ), _react2.default.createElement( 'div', { className: 'col-md-6' }, submitted ) ); } exports.default = Detail; /***/ }), /* 4329 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin module.exports = {"App":"App__App___3Jj_y"}; /***/ }), /* 4330 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ComponentForm = _interopRequireDefault(__webpack_require__(870)); var _ComponentForm2 = _interopRequireDefault(__webpack_require__(4331)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } _ComponentForm["default"].sagas = _ComponentForm2["default"]; var _default = _ComponentForm["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 4331 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fetchDefinition = fetchDefinition; exports.onDidMount = onDidMount; exports.onFormSubmit = onFormSubmit; exports.checkFormComponentId = checkFormComponentId; exports.handleSetDirtyState = handleSetDirtyState; exports.handle = handle; exports["default"] = void 0; var _effects = __webpack_require__(157); var _reactCmf = _interopRequireDefault(__webpack_require__(263)); var _immutable = __webpack_require__(81); var _get = _interopRequireDefault(__webpack_require__(927)); var _ComponentForm = _interopRequireDefault(__webpack_require__(870)); var _ComponentForm2 = __webpack_require__(4332); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _marked = /*#__PURE__*/regeneratorRuntime.mark(fetchDefinition), _marked2 = /*#__PURE__*/regeneratorRuntime.mark(onDidMount), _marked3 = /*#__PURE__*/regeneratorRuntime.mark(onFormSubmit), _marked4 = /*#__PURE__*/regeneratorRuntime.mark(handleSetDirtyState), _marked5 = /*#__PURE__*/regeneratorRuntime.mark(handle); 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; } /** * @param {Action{definitionURL: String, uiSpecPath: String, componentId: String }} action */ function fetchDefinition(action) { var _yield$call, data, response, formSpec; return regeneratorRuntime.wrap(function fetchDefinition$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: _context.next = 2; return (0, _effects.call)(_reactCmf["default"].sagas.http.get, action.definitionURL); case 2: _yield$call = _context.sent; data = _yield$call.data; response = _yield$call.response; if (response.ok) { _context.next = 10; break; } _context.next = 8; return (0, _effects.put)(_ComponentForm["default"].setStateAction(function (prev) { return prev.set('jsonSchema').set('uiSchema').set('response', response).set('dirty', false); }, action.componentId)); case 8: _context.next = 18; break; case 10: if (!action.uiSpecPath) { _context.next = 16; break; } formSpec = (0, _get["default"])(data, action.uiSpecPath); _context.next = 14; return (0, _effects.put)(_ComponentForm["default"].setStateAction(_objectSpread({ definition: data, initialState: formSpec }, formSpec), action.componentId)); case 14: _context.next = 18; break; case 16: _context.next = 18; return (0, _effects.put)(_ComponentForm["default"].setStateAction(_objectSpread({ initialState: data }, data), action.componentId)); case 18: case "end": return _context.stop(); } } }, _marked); } function onDidMount(_ref) { var _ref$componentId, componentId, definitionURL, uiSpecPath, jsonSchema; return regeneratorRuntime.wrap(function onDidMount$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: _ref$componentId = _ref.componentId, componentId = _ref$componentId === void 0 ? 'default' : _ref$componentId, definitionURL = _ref.definitionURL, uiSpecPath = _ref.uiSpecPath; _context2.next = 3; return (0, _effects.select)(function (state) { return _ComponentForm["default"].getState(state, componentId).get('jsonSchema'); }); case 3: jsonSchema = _context2.sent; if (jsonSchema) { _context2.next = 7; break; } _context2.next = 7; return fetchDefinition({ definitionURL: definitionURL, componentId: componentId, uiSpecPath: uiSpecPath }); case 7: case "end": return _context2.stop(); } } }, _marked2); } function onFormSubmit(componentId, submitURL, action) { var prevState, getReduxState, _yield$call2, response, data; return regeneratorRuntime.wrap(function onFormSubmit$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: getReduxState = function _getReduxState() { return prevState; }; if (!(action.componentId !== componentId)) { _context3.next = 3; break; } return _context3.abrupt("return"); case 3: _context3.next = 5; return (0, _effects.select)(); case 5: prevState = _context3.sent; _context3.next = 8; return (0, _effects.put)(_ComponentForm["default"].setStateAction(function (prev) { return prev.setIn(['initialState', 'jsonSchema'], prev.get('jsonSchema')).setIn(['initialState', 'uiSchema'], prev.get('uiSchema')).setIn(['initialState', 'properties'], (0, _immutable.fromJS)(action.properties)); }, componentId)(undefined, getReduxState)); case 8: if (submitURL) { _context3.next = 10; break; } return _context3.abrupt("return"); case 10: _context3.next = 12; return (0, _effects.call)(_reactCmf["default"].sagas.http.post, submitURL, action.properties); case 12: _yield$call2 = _context3.sent; response = _yield$call2.response; data = _yield$call2.data; _context3.next = 17; return (0, _effects.put)({ type: response.ok ? _ComponentForm["default"].ON_SUBMIT_SUCCEED : _ComponentForm["default"].ON_SUBMIT_FAILED, data: data, formData: action.properties, response: response, componentId: componentId }); case 17: case "end": return _context3.stop(); } } }, _marked3); } /** * check that the formId and action type match with the provided actions * @param {String} componentId * @return {(Action{type: String, componentid: String}) => Bool} */ function checkFormComponentId(componentId, actionType) { return function matchActionComponentid(action) { return action.type === actionType && action.componentId === componentId; }; } /** * This function handle a change of the dirty state for a given component form id * @param {object} reduxAction with a componentId (string) & the dirtyState (boolean) to apply */ function handleSetDirtyState(_ref2) { var componentId, dirty, componentFormState; return regeneratorRuntime.wrap(function handleSetDirtyState$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: componentId = _ref2.componentId, dirty = _ref2.dirty; _context4.next = 3; return (0, _effects.select)(_ComponentForm["default"].getState, componentId); case 3: componentFormState = _context4.sent; _context4.next = 6; return (0, _effects.put)(_ComponentForm["default"].setStateAction(componentFormState.set('dirty', !!dirty), componentId)); case 6: case "end": return _context4.stop(); } } }, _marked4); } function handle(props) { return regeneratorRuntime.wrap(function handle$(_context5) { while (1) { switch (_context5.prev = _context5.next) { case 0: _context5.next = 2; return (0, _effects.call)(onDidMount, props); case 2: _context5.next = 4; return (0, _effects.takeLatest)(_ComponentForm2.COMPONENT_FORM_SET_DIRTY, handleSetDirtyState); case 4: _context5.next = 6; return (0, _effects.takeEvery)(checkFormComponentId(props.componentId, _ComponentForm["default"].ON_DEFINITION_URL_CHANGED), fetchDefinition); case 6: _context5.next = 8; return (0, _effects.takeLatest)(_ComponentForm["default"].ON_SUBMIT, onFormSubmit, props.componentId, props.submitURL); case 8: _context5.next = 10; return (0, _effects.take)('DO_NOT_QUIT'); case 10: case "end": return _context5.stop(); } } }, _marked5); } var _default = { 'ComponentForm#default': handle }; exports["default"] = _default; //# sourceMappingURL=ComponentForm.sagas.js.map /***/ }), /* 4332 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setComponentFormDirtyState = setComponentFormDirtyState; exports["default"] = exports.COMPONENT_FORM_SET_DIRTY = 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); } var COMPONENT_FORM_SET_DIRTY = 'COMPONENT_FORM_SET_DIRTY'; /** * This action will change for a given componentForm name his dirty status * @param {string} componentId the component form id * @param {boolean} dirty the dirty state to apply */ exports.COMPONENT_FORM_SET_DIRTY = COMPONENT_FORM_SET_DIRTY; function setComponentFormDirtyState(componentId, dirty) { if (typeof dirty !== 'boolean') { throw new Error("ComponentForm dirty state should be a boolean, received \"".concat(dirty, "\"(").concat(_typeof(dirty), ") instead")); } return { componentId: componentId, dirty: dirty, type: COMPONENT_FORM_SET_DIRTY }; } var _default = { setComponentFormDirtyState: setComponentFormDirtyState }; exports["default"] = _default; //# sourceMappingURL=ComponentForm.actions.js.map /***/ }), /* 4333 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _redux = __webpack_require__(181); var _reducers = __webpack_require__(4334); var _reducers2 = _interopRequireDefault(_reducers); var _reducers3 = __webpack_require__(4335); var _reducers4 = _interopRequireDefault(_reducers3); var _reducers5 = __webpack_require__(4336); var _reducers6 = _interopRequireDefault(_reducers5); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Copyright (C) 2006-2024 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. */ exports.default = { app: (0, _redux.combineReducers)({ componentsList: _reducers2.default, component: _reducers4.default, application: _reducers6.default }) }; /***/ }), /* 4334 */ /***/ (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-2024 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 = __webpack_require__(203); var _get2 = _interopRequireDefault(_get); var _constants = __webpack_require__(224); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function getCategory(node) { switch (node.$$type) { case 'component': return node.$$parent.$$parent; case 'family': return node.$$parent; case 'category': return node; default: return null; } } function getFamily(node) { switch (node.$$type) { case 'component': return node.$$parent; case 'family': return node; default: return null; } } function getComponent(node) { if (node.$$type === 'component') { return node; } return null; } function getPath(selectedNode) { return { category: selectedNode && getCategory(selectedNode), family: selectedNode && getFamily(selectedNode), component: selectedNode && getComponent(selectedNode), selectedNode: selectedNode }; } function updateToggle(tree, currentNode) { return tree.map(function (node) { if (currentNode.id === node.id) { return _extends({}, node, { isOpened: !node.isOpened }); } else { if (node.children) { return _extends({}, node, { children: updateToggle(node.children, currentNode) }); } return node; } }); } exports.default = function () { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var action = arguments[1]; switch (action.type) { case _constants.GET_COMPONENT_LIST_LOADING: return _extends({}, state, { isLoading: true, configurationSelected: action.configuration }); case _constants.GET_COMPONENT_LIST_OK: return _extends({}, state, { isLoading: false, categories: action.categories, error: undefined }); case _constants.GET_COMPONENT_LIST_ERROR: return _extends({}, state, { error: action.error }); case _constants.SELECT_COMPONENT_NODE: return _extends({}, state, { selectedId: action.node.id, selectedNode: action.node }); case _constants.TOGGLE_COMPONENT_NODE: return _extends({}, state, { categories: updateToggle(state.categories, action.node) }); case _constants.DOCUMENTATION_LOADED: return _extends({}, state, { documentation: action.documentation, displayDocumentation: true }); case _constants.CLOSE_DOCUMENTATION_MODAL: return _extends({}, state, { documentation: null, displayDocumentation: false }); default: return state; } }; /***/ }), /* 4335 */ /***/ (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-2024 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 _constants = __webpack_require__(224); exports.default = function () { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var action = arguments[1]; switch (action.type) { case _constants.GET_COMPONENT_LOADING: return _extends({}, state, { isLoading: true }); case _constants.GET_COMPONENT_OK: return _extends({}, state, { uiSpec: action.uiSpec, isLoading: false, submitted: false }); case _constants.CHANGE_COMPONENT_ERRORS: return _extends({}, state, { uiSpec: _extends({}, state.uiSpec, { errors: action.errors }) }); case _constants.CHANGE_COMPONENT_PROPERTIES: return _extends({}, state, { uiSpec: _extends({}, state.uiSpec, { properties: action.properties }) }); case _constants.SUBMIT_COMPONENT: return _extends({}, state, { uiSpec: _extends({}, state.uiSpec, { properties: action.properties }), submitted: true }); case _constants.BACK_TO_COMPONENT_EDIT: return _extends({}, state, { submitted: false }); default: return state; } }; /***/ }), /* 4336 */ /***/ (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-2024 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 _constants = __webpack_require__(224); function addNotification(notifications, notification) { if (!notification) { return notifications; } return notifications.concat([notification]); } function removeNotification(notifications, notification) { return notifications.filter(function (n) { return n != notification; }); } exports.default = function () { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { notifications: [] }; var action = arguments[1]; switch (action.type) { case _constants.ADD_NOTIFICATION: return _extends({}, state, { notifications: addNotification(state.notifications, action.notification) }); case _constants.REMOVE_NOTIFICATION: return _extends({}, state, { notifications: removeNotification(state.notifications, action.notification) }); case _constants.FAMILY_RELOADING: case _constants.FAMILY_RELOADED: case _constants.FAMILY_RELOADED_ERROR: case _constants.DOCUMENTATION_LOADING: case _constants.DOCUMENTATION_LOADED: case _constants.DOCUMENTATION_LOADED_ERROR: return _extends({}, state, { isLoading: action.type === _constants.FAMILY_RELOADING || action.type === _constants.DOCUMENTATION_LOADING, notifications: addNotification(state.notifications, action.notification) }); default: return state; } }; /***/ }) /******/ ]);</code></pre> <br/> <br/> <!--<div id="right-banner">--> <!--</div>--> <!--<div id="left-banner">--> <!--</div>--> <div class='clear'></div> </main> </div> <br/><br/> <div class="align-center">© 2015 - 2024 <a href="/legal-notice.php">Weber Informatics LLC</a> | <a href="/data-protection.php">Privacy Policy</a></div> <br/><br/><br/><br/><br/><br/> </body> </html>