/******/ (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, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // 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 = 729);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(493);
} else {}
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(9);
var core = __webpack_require__(43);
var hide = __webpack_require__(32);
var redefine = __webpack_require__(31);
var ctx = __webpack_require__(42);
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;
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
/**
* 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 (false) { var throwOnDirectAccess, isValidElement, REACT_ELEMENT_TYPE; } else {
// By explicitly using `prop-types` you are opting into new production behavior.
// http://fb-removeme.me/prop-types-in-prod
module.exports = __webpack_require__(492)();
}
/***/ }),
/* 3 */
/***/ (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");
}
};
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _defineProperty = __webpack_require__(241);
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;
};
}();
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _setPrototypeOf = __webpack_require__(500);
var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
var _create = __webpack_require__(496);
var _create2 = _interopRequireDefault(_create);
var _typeof2 = __webpack_require__(92);
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;
};
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof2 = __webpack_require__(92);
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;
};
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _assign = __webpack_require__(466);
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;
};
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(12);
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/* 9 */
/***/ (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
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _Expectation = __webpack_require__(229);
var _Expectation2 = _interopRequireDefault(_Expectation);
var _SpyUtils = __webpack_require__(228);
var _assert = __webpack_require__(143);
var _assert2 = _interopRequireDefault(_assert);
var _extend = __webpack_require__(468);
var _extend2 = _interopRequireDefault(_extend);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function expect(actual) {
return new _Expectation2.default(actual);
}
expect.createSpy = _SpyUtils.createSpy;
expect.spyOn = _SpyUtils.spyOn;
expect.isSpy = _SpyUtils.isSpy;
expect.restoreSpies = _SpyUtils.restoreSpies;
expect.assert = _assert2.default;
expect.extend = _extend2.default;
module.exports = expect;
/***/ }),
/* 11 */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (e) {
return true;
}
};
/***/ }),
/* 12 */
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__(123)('wks');
var uid = __webpack_require__(73);
var Symbol = __webpack_require__(9).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;
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _I18nUtils = __webpack_require__(17);
var I18nUtils = _interopRequireWildcard(_I18nUtils);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _ModelUtils = __webpack_require__(213);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ok = function ok(x) {
return typeof x !== 'undefined' && x != null;
};
function findSingleStatementByEntityIdValue(entity, property, entityId) {
if (!entity.claims || !entity.claims[property]) {
return null;
}
var claims = entity.claims[property];
// TODO: make use of rank
var candidates = claims.filter(function (statement) {
return statement.mainsnak && statement.mainsnak.datavalue && statement.mainsnak.datavalue.value && statement.mainsnak.datavalue.value.id === entityId;
});
if (candidates.length == 1) {
return candidates[0];
}
return null;
}
function getWikibaseItemRestrictions(propertyEntity, restrictionId, valuePropertyId) {
var statement = findSingleStatementByEntityIdValue(propertyEntity, 'P2302', restrictionId);
if (!statement) return [];
if (!statement.qualifiers || !statement.qualifiers[valuePropertyId]) return [];
var ok = function ok(x) {
return typeof x !== 'undefined' && x !== null;
};
return statement.qualifiers[valuePropertyId].map(function (qualifier) {
return qualifier.datavalue;
}).filter(ok).map(function (datavalue) {
return datavalue.value;
}).filter(ok).map(function (value) {
return value.id;
}).filter(ok);
}
function getStringRestriction(propertyEntity, restrictionId, valuePropertyId) {
var statement = findSingleStatementByEntityIdValue(propertyEntity, 'P2302', restrictionId);
if (!statement) return null;
if (!statement.qualifiers || !statement.qualifiers[valuePropertyId] || statement.qualifiers[valuePropertyId].length !== 1 || !statement.qualifiers[valuePropertyId][0].datavalue || !statement.qualifiers[valuePropertyId][0].datavalue.value) return null;
return statement.qualifiers[valuePropertyId][0].datavalue.value;
}
var UrlFormatter = function () {
function UrlFormatter(statement) {
(0, _classCallCheck3.default)(this, UrlFormatter);
this._format = statement.mainsnak.datavalue.value;
if (statement.qualifiers && statement.qualifiers.P1793 && statement.qualifiers.P1793.length === 0 && statement.qualifiers.P1793[0].datavalue && statement.qualifiers.P1793[0].datavalue.value) {
this._regexp = statement.qualifiers.P1793[0].datavalue.value;
} else {
this._regexp = null;
}
}
(0, _createClass3.default)(UrlFormatter, [{
key: 'hasRegexp',
value: function hasRegexp() {
return !!this._regexp;
}
}, {
key: 'isCompliant',
value: function isCompliant(value) {
return !this._regexp || new RegExp('^' + this._regexp + '$').test(value);
}
}, {
key: 'format',
value: function format(value) {
return this._format.replace('$1', value);
}
}]);
return UrlFormatter;
}();
var claimHasMainsnakValue = function claimHasMainsnakValue(statement) {
return statement.mainsnak && statement.mainsnak.datavalue && statement.mainsnak.datavalue.value;
};
var PropertyDescription = function () {
function PropertyDescription(propertyEntity) {
(0, _classCallCheck3.default)(this, PropertyDescription);
(0, _expect2.default)(propertyEntity).toBeAn('object');
(0, _expect2.default)(propertyEntity.id).toBeA('string', 'Missing ID in property entity object');
(0, _expect2.default)(propertyEntity.datatype).toBeA('string', 'Missing datatype in property entity object');
this.id = propertyEntity.id;
this.datatype = propertyEntity.datatype;
this.pageid = propertyEntity.pageid;
this.lastrevid = propertyEntity.lastrevid;
var translations = {};
if (propertyEntity.labels) {
Object.values(propertyEntity.labels).forEach(function (label) {
translations[label.language] = (0, _extends3.default)({}, translations[label.language], {
label: label.value
});
});
}
if (propertyEntity.descriptions) {
Object.values(propertyEntity.descriptions).forEach(function (description) {
translations[description.language] = (0, _extends3.default)({}, translations[description.language], {
description: description.value
});
});
}
var translated = I18nUtils.localize({}, translations);
for (var k in translated) {
this[k] = translated[k];
}this.allowedQualifiers = getWikibaseItemRestrictions(propertyEntity, 'Q21510851', 'P2306');
this.countries = (0, _ModelUtils.filterClaimsByRank)(propertyEntity.claims.P17).filter(claimHasMainsnakValue).map(function (claim) {
return claim.mainsnak.datavalue.value.id;
});
this.languageIds = [];
this.languageCodes = [];
if (propertyEntity.claims && propertyEntity.claims.P1630) {
this.urlFormatters = (0, _ModelUtils.filterClaimsByRank)(propertyEntity.claims.P1630).filter(claimHasMainsnakValue).map(function (statement) {
return new UrlFormatter(statement);
});
} else {
this.urlFormatters = [];
}
var oneOfConstrains = findSingleStatementByEntityIdValue(propertyEntity, 'P2302', 'Q21510859');
if (oneOfConstrains) {
var oneOfSnaks = [oneOfConstrains.qualifiers].filter(ok).flatMap(function (qualifiers) {
return qualifiers.P2305;
}).filter(ok);
this.oneOf = oneOfSnaks.filter(function (qualifier) {
return qualifier.snaktype === 'value';
}).map(function (qualifier) {
return qualifier.datavalue;
}).filter(ok).map(function (datavalue) {
return datavalue.value;
}).filter(ok).map(function (value) {
return value.id;
}).filter(ok);
}
var unitRestriction = findSingleStatementByEntityIdValue(propertyEntity, 'P2302', 'Q21514353');
if (unitRestriction) {
var quantityUnitsSnaks = [unitRestriction.qualifiers].filter(ok).flatMap(function (qualifiers) {
return qualifiers.P2305;
}).filter(ok);
this.quantityUnitEnabled = !(quantityUnitsSnaks.length === 1 && quantityUnitsSnaks[0].snaktype === 'novalue');
this.quantityUnits = quantityUnitsSnaks.filter(function (qualifier) {
return qualifier.snaktype === 'value';
}).map(function (qualifier) {
return qualifier.datavalue;
}).filter(ok).map(function (datavalue) {
return datavalue.value;
}).filter(ok).map(function (value) {
return value.id;
}).filter(ok);
}
this.regexp = getStringRestriction(propertyEntity, 'Q21502404', 'P1793');
this.sourceWebsites = (0, _ModelUtils.filterClaimsByRank)((propertyEntity.claims || {}).P1896).filter(claimHasMainsnakValue).map(function (statement) {
return statement.mainsnak.datavalue.value;
});
this.sourceWebsitesLanguages = (0, _ModelUtils.filterClaimsByRank)((propertyEntity.claims || {}).P1896).filter(claimHasMainsnakValue).filter(function (claim) {
return claim.qualifiers && claim.qualifiers.P407;
}).map(function (claim) {
return claim.qualifiers.P407;
}).flatMap(function (qualifiers) {
return qualifiers.filter(function (qualifier) {
return qualifier && qualifier.datavalue && qualifier.datavalue.value && qualifier.datavalue.value.id;
}).map(function (qualifier) {
return qualifier.datavalue.value.id;
});
});
}
(0, _createClass3.default)(PropertyDescription, [{
key: 'formatUrl',
value: function formatUrl(value) {
if (value === null || value === '') return '';
if (typeof value !== 'string') return;
var formatter = this.urlFormatters.find(function (formatter) {
return formatter.isCompliant(value);
});
if (formatter) return formatter.format(value);
}
}, {
key: 'hasLookupUrl',
value: function hasLookupUrl(entity) {
return I18nUtils.DEFAULT_LANGUAGES.findFirst(function (code) {
return !!entity.labels[code];
}) != null && this.sourceWebsites.length > 0;
}
}, {
key: 'getLookupUrl',
value: function getLookupUrl(entity) {
var langCode = I18nUtils.DEFAULT_LANGUAGES.findFirst(function (code) {
return entity.labels && entity.labels[code];
});
var label = entity.labels[langCode].value;
return 'https://www.google.ru/search?q=site%3A' + this.sourceWebsites[0] + ' ' + label;
}
}]);
return PropertyDescription;
}();
exports.default = PropertyDescription;
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var stylesInDom = {};
var memoize = function (fn) {
var memo;
return function () {
if (typeof memo === "undefined") memo = fn.apply(this, arguments);
return memo;
};
};
var isOldIE = memoize(function () {
// Test for IE <= 9 as proposed by Browserhacks
// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
// Tests for existence of standard globals is to allow style-loader
// to operate correctly into non-standard environments
// @see https://github.com/webpack-contrib/style-loader/issues/177
return window && document && document.all && !window.atob;
});
var getTarget = function (target) {
return document.querySelector(target);
};
var getElement = (function (fn) {
var memo = {};
return function(target) {
// If passing function in options, then use it for resolve "head" element.
// Useful for Shadow Root style i.e
// {
// insertInto: function () { return document.querySelector("#foo").shadowRoot }
// }
if (typeof target === 'function') {
return target();
}
if (typeof memo[target] === "undefined") {
var styleTarget = getTarget.call(this, target);
// Special case to return head of iframe instead of iframe itself
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
try {
// This will throw an exception if access to iframe is blocked
// due to cross-origin restrictions
styleTarget = styleTarget.contentDocument.head;
} catch(e) {
styleTarget = null;
}
}
memo[target] = styleTarget;
}
return memo[target]
};
})();
var singleton = null;
var singletonCounter = 0;
var stylesInsertedAtTop = [];
var fixUrls = __webpack_require__(411);
module.exports = function(list, options) {
if (typeof DEBUG !== "undefined" && DEBUG) {
if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
}
options = options || {};
options.attrs = typeof options.attrs === "object" ? options.attrs : {};
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
// tags it will allow on a page
if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
// By default, add <style> tags to the <head> element
if (!options.insertInto) options.insertInto = "head";
// By default, add <style> tags to the bottom of the target
if (!options.insertAt) options.insertAt = "bottom";
var styles = listToStyles(list, options);
addStylesToDom(styles, options);
return function update (newList) {
var mayRemove = [];
for (var i = 0; i < styles.length; i++) {
var item = styles[i];
var domStyle = stylesInDom[item.id];
domStyle.refs--;
mayRemove.push(domStyle);
}
if(newList) {
var newStyles = listToStyles(newList, options);
addStylesToDom(newStyles, options);
}
for (var i = 0; i < mayRemove.length; i++) {
var domStyle = mayRemove[i];
if(domStyle.refs === 0) {
for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
delete stylesInDom[domStyle.id];
}
}
};
};
function addStylesToDom (styles, options) {
for (var i = 0; i < styles.length; i++) {
var item = styles[i];
var domStyle = stylesInDom[item.id];
if(domStyle) {
domStyle.refs++;
for(var j = 0; j < domStyle.parts.length; j++) {
domStyle.parts[j](item.parts[j]);
}
for(; j < item.parts.length; j++) {
domStyle.parts.push(addStyle(item.parts[j], options));
}
} else {
var parts = [];
for(var j = 0; j < item.parts.length; j++) {
parts.push(addStyle(item.parts[j], options));
}
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
}
}
}
function listToStyles (list, options) {
var styles = [];
var newStyles = {};
for (var i = 0; i < list.length; i++) {
var item = list[i];
var id = options.base ? item[0] + options.base : item[0];
var css = item[1];
var media = item[2];
var sourceMap = item[3];
var part = {css: css, media: media, sourceMap: sourceMap};
if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
else newStyles[id].parts.push(part);
}
return styles;
}
function insertStyleElement (options, style) {
var target = getElement(options.insertInto)
if (!target) {
throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
}
var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
if (options.insertAt === "top") {
if (!lastStyleElementInsertedAtTop) {
target.insertBefore(style, target.firstChild);
} else if (lastStyleElementInsertedAtTop.nextSibling) {
target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
} else {
target.appendChild(style);
}
stylesInsertedAtTop.push(style);
} else if (options.insertAt === "bottom") {
target.appendChild(style);
} else if (typeof options.insertAt === "object" && options.insertAt.before) {
var nextSibling = getElement(options.insertInto + " " + options.insertAt.before);
target.insertBefore(style, nextSibling);
} else {
throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
}
}
function removeStyleElement (style) {
if (style.parentNode === null) return false;
style.parentNode.removeChild(style);
var idx = stylesInsertedAtTop.indexOf(style);
if(idx >= 0) {
stylesInsertedAtTop.splice(idx, 1);
}
}
function createStyleElement (options) {
var style = document.createElement("style");
if(options.attrs.type === undefined) {
options.attrs.type = "text/css";
}
addAttrs(style, options.attrs);
insertStyleElement(options, style);
return style;
}
function createLinkElement (options) {
var link = document.createElement("link");
if(options.attrs.type === undefined) {
options.attrs.type = "text/css";
}
options.attrs.rel = "stylesheet";
addAttrs(link, options.attrs);
insertStyleElement(options, link);
return link;
}
function addAttrs (el, attrs) {
Object.keys(attrs).forEach(function (key) {
el.setAttribute(key, attrs[key]);
});
}
function addStyle (obj, options) {
var style, update, remove, result;
// If a transform function was defined, run it on the css
if (options.transform && obj.css) {
result = options.transform(obj.css);
if (result) {
// If transform returns a value, use that instead of the original css.
// This allows running runtime transformations on the css.
obj.css = result;
} else {
// If the transform function returns a falsy value, don't add this css.
// This allows conditional loading of css
return function() {
// noop
};
}
}
if (options.singleton) {
var styleIndex = singletonCounter++;
style = singleton || (singleton = createStyleElement(options));
update = applyToSingletonTag.bind(null, style, styleIndex, false);
remove = applyToSingletonTag.bind(null, style, styleIndex, true);
} else if (
obj.sourceMap &&
typeof URL === "function" &&
typeof URL.createObjectURL === "function" &&
typeof URL.revokeObjectURL === "function" &&
typeof Blob === "function" &&
typeof btoa === "function"
) {
style = createLinkElement(options);
update = updateLink.bind(null, style, options);
remove = function () {
removeStyleElement(style);
if(style.href) URL.revokeObjectURL(style.href);
};
} else {
style = createStyleElement(options);
update = applyToTag.bind(null, style);
remove = function () {
removeStyleElement(style);
};
}
update(obj);
return function updateStyle (newObj) {
if (newObj) {
if (
newObj.css === obj.css &&
newObj.media === obj.media &&
newObj.sourceMap === obj.sourceMap
) {
return;
}
update(obj = newObj);
} else {
remove();
}
};
}
var replaceText = (function () {
var textStore = [];
return function (index, replacement) {
textStore[index] = replacement;
return textStore.filter(Boolean).join('\n');
};
})();
function applyToSingletonTag (style, index, remove, obj) {
var css = remove ? "" : obj.css;
if (style.styleSheet) {
style.styleSheet.cssText = replaceText(index, css);
} else {
var cssNode = document.createTextNode(css);
var childNodes = style.childNodes;
if (childNodes[index]) style.removeChild(childNodes[index]);
if (childNodes.length) {
style.insertBefore(cssNode, childNodes[index]);
} else {
style.appendChild(cssNode);
}
}
}
function applyToTag (style, obj) {
var css = obj.css;
var media = obj.media;
if(media) {
style.setAttribute("media", media)
}
if(style.styleSheet) {
style.styleSheet.cssText = css;
} else {
while(style.firstChild) {
style.removeChild(style.firstChild);
}
style.appendChild(document.createTextNode(css));
}
}
function updateLink (link, options, obj) {
var css = obj.css;
var sourceMap = obj.sourceMap;
/*
If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
and there is no publicPath defined then lets turn convertToAbsoluteUrls
on by default. Otherwise default to the convertToAbsoluteUrls option
directly
*/
var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
if (options.convertToAbsoluteUrls || autoFixUrls) {
css = fixUrls(css);
}
if (sourceMap) {
// http://stackoverflow.com/a/26603875
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
}
var blob = new Blob([css], { type: "text/css" });
var oldSrc = link.href;
link.href = URL.createObjectURL(blob);
if(oldSrc) URL.revokeObjectURL(oldSrc);
}
/***/ }),
/* 16 */
/***/ (function(module, exports) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
module.exports = function(useSourceMap) {
var list = [];
// return the list of modules as css string
list.toString = function toString() {
return this.map(function (item) {
var content = cssWithMappingToString(item, useSourceMap);
if(item[2]) {
return "@media " + item[2] + "{" + content + "}";
} else {
return content;
}
}).join("");
};
// import a list of modules into the list
list.i = function(modules, mediaQuery) {
if(typeof modules === "string")
modules = [[null, modules, ""]];
var alreadyImportedModules = {};
for(var i = 0; i < this.length; i++) {
var id = this[i][0];
if(typeof id === "number")
alreadyImportedModules[id] = true;
}
for(i = 0; i < modules.length; i++) {
var item = modules[i];
// skip already imported module
// this implementation is not 100% perfect for weird media query combinations
// when a module is imported multiple times with different media queries.
// I hope this will never occur (Hey this way we have smaller bundles)
if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
if(mediaQuery && !item[2]) {
item[2] = mediaQuery;
} else if(mediaQuery) {
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
}
list.push(item);
}
}
};
return list;
};
function cssWithMappingToString(item, useSourceMap) {
var content = item[1] || '';
var cssMapping = item[3];
if (!cssMapping) {
return content;
}
if (useSourceMap && typeof btoa === 'function') {
var sourceMapping = toComment(cssMapping);
var sourceURLs = cssMapping.sources.map(function (source) {
return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
});
return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
}
return [content].join('\n');
}
// Adapted from convert-source-map (MIT)
function toComment(sourceMap) {
// eslint-disable-next-line no-undef
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
return '/*# ' + data + ' */';
}
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LANGUAGE_TITLES = exports.API_PARAMETER_LANGUAGES = exports.DEFAULT_LANGUAGES = undefined;
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
exports.localize = localize;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var DEFAULT_LANGUAGES = exports.DEFAULT_LANGUAGES = [];
[mw.config.get('wgContentLanguage'), mw.config.get('wgUserLanguage'), 'en', 'ru'].forEach(function (code) {
if (DEFAULT_LANGUAGES.indexOf(code) === -1) DEFAULT_LANGUAGES.push(code);
});
var API_PARAMETER_LANGUAGES = exports.API_PARAMETER_LANGUAGES = DEFAULT_LANGUAGES.join('|');
var LANGUAGE_TITLES = exports.LANGUAGE_TITLES = function () {
var result = {};
for (var languageCode in jQuery.uls.data.languages) {
var languageOptions = jQuery.uls.data.languages[languageCode];
var languageTitle = languageOptions[2];
result[languageCode] = languageTitle;
}
return result;
}();
function localize(prototypeDictionaty, translations) {
var result = (0, _extends3.default)({}, prototypeDictionaty);
DEFAULT_LANGUAGES.forEach(function (languageCode) {
if (translations[languageCode]) {
result = (0, _extends3.default)({}, translations[languageCode], result);
}
});
return result;
}
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Snak = exports.Entity = exports.DataValue = exports.Claim = undefined;
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
exports.newStatementClaim = newStatementClaim;
exports.emptySnak = emptySnak;
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Claim = exports.Claim = {
mainsnak: _propTypes2.default.shape(Snak)
};
var claimIdCounters = 0;
function newStatementClaim(propertyDescription) {
(0, _expect2.default)(propertyDescription).toBeA(_PropertyDescription2.default);
return {
id: 'new#' + claimIdCounters++,
mainsnak: (0, _extends3.default)({}, emptySnak(), {
snaktype: 'value',
property: propertyDescription.id,
datatype: propertyDescription.datatype
}),
rank: 'normal',
type: 'statement'
};
}
var DataValue = exports.DataValue = {
type: _propTypes2.default.string,
value: _propTypes2.default.any
};
var Entity = exports.Entity = {
claims: _propTypes2.default.object
};
var Snak = exports.Snak = {
snaktype: _propTypes2.default.oneOf(['value', 'novalue', 'somevalue']),
property: _propTypes2.default.string.isRequired,
hash: _propTypes2.default.string,
datavalue: _propTypes2.default.shape(DataValue),
type: _propTypes2.default.string,
id: _propTypes2.default.string,
rank: _propTypes2.default.oneOf(['preferred', 'normal', 'deprecated'])
};
function emptySnak() {
return {};
}
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__(48);
var min = Math.min;
module.exports = function (it) {
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(8);
var IE8_DOM_DEFINE = __webpack_require__(275);
var toPrimitive = __webpack_require__(50);
var dP = Object.defineProperty;
exports.f = __webpack_require__(21) ? 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;
};
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(11)(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/* 22 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapProps", function() { return mapProps; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withProps", function() { return withProps; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withPropsOnChange", function() { return withPropsOnChange; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withHandlers", function() { return withHandlers; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultProps", function() { return defaultProps; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renameProp", function() { return renameProp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renameProps", function() { return renameProps; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flattenProp", function() { return flattenProp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withState", function() { return withState; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withStateHandlers", function() { return withStateHandlers; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withReducer", function() { return withReducer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "branch", function() { return branch; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderComponent", function() { return renderComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderNothing", function() { return renderNothing; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shouldUpdate", function() { return shouldUpdate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pure", function() { return pure; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onlyUpdateForKeys", function() { return onlyUpdateForKeys; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onlyUpdateForPropTypes", function() { return onlyUpdateForPropTypes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withContext", function() { return withContext; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getContext", function() { return getContext; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lifecycle", function() { return lifecycle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toClass", function() { return toClass; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setStatic", function() { return setStatic; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setPropTypes", function() { return setPropTypes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDisplayName", function() { return setDisplayName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDisplayName", function() { return getDisplayName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapDisplayName", function() { return wrapDisplayName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isClassComponent", function() { return isClassComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSink", function() { return createSink; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "componentFromProp", function() { return componentFromProp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nest", function() { return nest; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hoistStatics", function() { return hoistStatics; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "componentFromStream", function() { return componentFromStream; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "componentFromStreamWithConfig", function() { return componentFromStreamWithConfig; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapPropsStream", function() { return mapPropsStream; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapPropsStreamWithConfig", function() { return mapPropsStreamWithConfig; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEventHandler", function() { return createEventHandler; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEventHandlerWithConfig", function() { return createEventHandlerWithConfig; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setObservableConfig", function() { return configureObservable; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var fbjs_lib_shallowEqual__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76);
/* harmony import */ var fbjs_lib_shallowEqual__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fbjs_lib_shallowEqual__WEBPACK_IMPORTED_MODULE_1__);
/* harmony reexport (default from non-harmony) */ __webpack_require__.d(__webpack_exports__, "shallowEqual", function() { return fbjs_lib_shallowEqual__WEBPACK_IMPORTED_MODULE_1___default.a; });
/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(126);
/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var change_emitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(189);
/* harmony import */ var change_emitter__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(change_emitter__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(127);
var setStatic = function setStatic(key, value) {
return function (BaseComponent) {
/* eslint-disable no-param-reassign */
BaseComponent[key] = value;
/* eslint-enable no-param-reassign */
return BaseComponent;
};
};
var setDisplayName = function setDisplayName(displayName) {
return setStatic('displayName', displayName);
};
var getDisplayName = function getDisplayName(Component$$1) {
if (typeof Component$$1 === 'string') {
return Component$$1;
}
if (!Component$$1) {
return undefined;
}
return Component$$1.displayName || Component$$1.name || 'Component';
};
var wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) {
return hocName + '(' + getDisplayName(BaseComponent) + ')';
};
var mapProps = function mapProps(propsMapper) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
var MapProps = function MapProps(props) {
return factory(propsMapper(props));
};
if (false) {}
return MapProps;
};
};
var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
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 inherits = function (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 objectWithoutProperties = 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;
};
var possibleConstructorReturn = function (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;
};
var withProps = function withProps(input) {
var hoc = mapProps(function (props) {
return _extends({}, props, typeof input === 'function' ? input(props) : input);
});
if (false) {}
return hoc;
};
var pick = function pick(obj, keys) {
var result = {};
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (obj.hasOwnProperty(key)) {
result[key] = obj[key];
}
}
return result;
};
var withPropsOnChange = function withPropsOnChange(shouldMapOrKeys, propsMapper) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
var shouldMap = typeof shouldMapOrKeys === 'function' ? shouldMapOrKeys : function (props, nextProps) {
return !fbjs_lib_shallowEqual__WEBPACK_IMPORTED_MODULE_1___default()(pick(props, shouldMapOrKeys), pick(nextProps, shouldMapOrKeys));
};
var WithPropsOnChange = function (_Component) {
inherits(WithPropsOnChange, _Component);
function WithPropsOnChange() {
var _temp, _this, _ret;
classCallCheck(this, WithPropsOnChange);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.computedProps = propsMapper(_this.props), _temp), possibleConstructorReturn(_this, _ret);
}
WithPropsOnChange.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
if (shouldMap(this.props, nextProps)) {
this.computedProps = propsMapper(nextProps);
}
};
WithPropsOnChange.prototype.render = function render() {
return factory(_extends({}, this.props, this.computedProps));
};
return WithPropsOnChange;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
if (false) {}
return WithPropsOnChange;
};
};
var mapValues = function mapValues(obj, func) {
var result = {};
/* eslint-disable no-restricted-syntax */
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
result[key] = func(obj[key], key);
}
}
/* eslint-enable no-restricted-syntax */
return result;
};
/* eslint-disable no-console */
var withHandlers = function withHandlers(handlers) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
var WithHandlers = function (_Component) {
inherits(WithHandlers, _Component);
function WithHandlers() {
var _temp, _this, _ret;
classCallCheck(this, WithHandlers);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _initialiseProps.call(_this), _temp), possibleConstructorReturn(_this, _ret);
}
WithHandlers.prototype.componentWillReceiveProps = function componentWillReceiveProps() {
this.cachedHandlers = {};
};
WithHandlers.prototype.render = function render() {
return factory(_extends({}, this.props, this.handlers));
};
return WithHandlers;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
var _initialiseProps = function _initialiseProps() {
var _this2 = this;
this.cachedHandlers = {};
this.handlers = mapValues(typeof handlers === 'function' ? handlers(this.props) : handlers, function (createHandler, handlerName) {
return function () {
var cachedHandler = _this2.cachedHandlers[handlerName];
if (cachedHandler) {
return cachedHandler.apply(undefined, arguments);
}
var handler = createHandler(_this2.props);
_this2.cachedHandlers[handlerName] = handler;
if (false) {}
return handler.apply(undefined, arguments);
};
});
};
if (false) {}
return WithHandlers;
};
};
var defaultProps = function defaultProps(props) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
var DefaultProps = function DefaultProps(ownerProps) {
return factory(ownerProps);
};
DefaultProps.defaultProps = props;
if (false) {}
return DefaultProps;
};
};
var omit = function omit(obj, keys) {
var rest = objectWithoutProperties(obj, []);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (rest.hasOwnProperty(key)) {
delete rest[key];
}
}
return rest;
};
var renameProp = function renameProp(oldName, newName) {
var hoc = mapProps(function (props) {
var _babelHelpers$extends;
return _extends({}, omit(props, [oldName]), (_babelHelpers$extends = {}, _babelHelpers$extends[newName] = props[oldName], _babelHelpers$extends));
});
if (false) {}
return hoc;
};
var keys = Object.keys;
var mapKeys = function mapKeys(obj, func) {
return keys(obj).reduce(function (result, key) {
var val = obj[key];
/* eslint-disable no-param-reassign */
result[func(val, key)] = val;
/* eslint-enable no-param-reassign */
return result;
}, {});
};
var renameProps = function renameProps(nameMap) {
var hoc = mapProps(function (props) {
return _extends({}, omit(props, keys(nameMap)), mapKeys(pick(props, keys(nameMap)), function (_, oldName) {
return nameMap[oldName];
}));
});
if (false) {}
return hoc;
};
var flattenProp = function flattenProp(propName) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
var FlattenProp = function FlattenProp(props) {
return factory(_extends({}, props, props[propName]));
};
if (false) {}
return FlattenProp;
};
};
var withState = function withState(stateName, stateUpdaterName, initialState) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
var WithState = function (_Component) {
inherits(WithState, _Component);
function WithState() {
var _temp, _this, _ret;
classCallCheck(this, WithState);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {
stateValue: typeof initialState === 'function' ? initialState(_this.props) : initialState
}, _this.updateStateValue = function (updateFn, callback) {
return _this.setState(function (_ref) {
var stateValue = _ref.stateValue;
return {
stateValue: typeof updateFn === 'function' ? updateFn(stateValue) : updateFn
};
}, callback);
}, _temp), possibleConstructorReturn(_this, _ret);
}
WithState.prototype.render = function render() {
var _babelHelpers$extends;
return factory(_extends({}, this.props, (_babelHelpers$extends = {}, _babelHelpers$extends[stateName] = this.state.stateValue, _babelHelpers$extends[stateUpdaterName] = this.updateStateValue, _babelHelpers$extends)));
};
return WithState;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
if (false) {}
return WithState;
};
};
var withStateHandlers = function withStateHandlers(initialState, stateUpdaters) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
var WithStateHandlers = function (_Component) {
inherits(WithStateHandlers, _Component);
function WithStateHandlers() {
var _temp, _this, _ret;
classCallCheck(this, WithStateHandlers);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _initialiseProps.call(_this), _temp), possibleConstructorReturn(_this, _ret);
}
WithStateHandlers.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {
var propsChanged = nextProps !== this.props;
// the idea is to skip render if stateUpdater handler return undefined
// this allows to create no state update handlers with access to state and props
var stateChanged = !fbjs_lib_shallowEqual__WEBPACK_IMPORTED_MODULE_1___default()(nextState, this.state);
return propsChanged || stateChanged;
};
WithStateHandlers.prototype.render = function render() {
return factory(_extends({}, this.props, this.state, this.stateUpdaters));
};
return WithStateHandlers;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
var _initialiseProps = function _initialiseProps() {
var _this2 = this;
this.state = typeof initialState === 'function' ? initialState(this.props) : initialState;
this.stateUpdaters = mapValues(stateUpdaters, function (handler) {
return function (mayBeEvent) {
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
// Having that functional form of setState can be called async
// we need to persist SyntheticEvent
if (mayBeEvent && typeof mayBeEvent.persist === 'function') {
mayBeEvent.persist();
}
_this2.setState(function (state, props) {
return handler(state, props).apply(undefined, [mayBeEvent].concat(args));
});
};
});
};
if (false) {}
return WithStateHandlers;
};
};
var withReducer = function withReducer(stateName, dispatchName, reducer, initialState) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
var WithReducer = function (_Component) {
inherits(WithReducer, _Component);
function WithReducer() {
var _temp, _this, _ret;
classCallCheck(this, WithReducer);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {
stateValue: _this.initializeStateValue()
}, _this.dispatch = function (action) {
return _this.setState(function (_ref) {
var stateValue = _ref.stateValue;
return {
stateValue: reducer(stateValue, action)
};
});
}, _temp), possibleConstructorReturn(_this, _ret);
}
WithReducer.prototype.initializeStateValue = function initializeStateValue() {
if (initialState !== undefined) {
return typeof initialState === 'function' ? initialState(this.props) : initialState;
}
return reducer(undefined, { type: '@@recompose/INIT' });
};
WithReducer.prototype.render = function render() {
var _babelHelpers$extends;
return factory(_extends({}, this.props, (_babelHelpers$extends = {}, _babelHelpers$extends[stateName] = this.state.stateValue, _babelHelpers$extends[dispatchName] = this.dispatch, _babelHelpers$extends)));
};
return WithReducer;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
if (false) {}
return WithReducer;
};
};
var identity = function identity(Component$$1) {
return Component$$1;
};
var branch = function branch(test, left) {
var right = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : identity;
return function (BaseComponent) {
var leftFactory = void 0;
var rightFactory = void 0;
var Branch = function Branch(props) {
if (test(props)) {
leftFactory = leftFactory || Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(left(BaseComponent));
return leftFactory(props);
}
rightFactory = rightFactory || Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(right(BaseComponent));
return rightFactory(props);
};
if (false) {}
return Branch;
};
};
var renderComponent = function renderComponent(Component$$1) {
return function (_) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(Component$$1);
var RenderComponent = function RenderComponent(props) {
return factory(props);
};
if (false) {}
return RenderComponent;
};
};
var Nothing = function (_Component) {
inherits(Nothing, _Component);
function Nothing() {
classCallCheck(this, Nothing);
return possibleConstructorReturn(this, _Component.apply(this, arguments));
}
Nothing.prototype.render = function render() {
return null;
};
return Nothing;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
var renderNothing = function renderNothing(_) {
return Nothing;
};
var shouldUpdate = function shouldUpdate(test) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
var ShouldUpdate = function (_Component) {
inherits(ShouldUpdate, _Component);
function ShouldUpdate() {
classCallCheck(this, ShouldUpdate);
return possibleConstructorReturn(this, _Component.apply(this, arguments));
}
ShouldUpdate.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
return test(this.props, nextProps);
};
ShouldUpdate.prototype.render = function render() {
return factory(this.props);
};
return ShouldUpdate;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
if (false) {}
return ShouldUpdate;
};
};
var pure = function pure(BaseComponent) {
var hoc = shouldUpdate(function (props, nextProps) {
return !fbjs_lib_shallowEqual__WEBPACK_IMPORTED_MODULE_1___default()(props, nextProps);
});
if (false) {}
return hoc(BaseComponent);
};
var onlyUpdateForKeys = function onlyUpdateForKeys(propKeys) {
var hoc = shouldUpdate(function (props, nextProps) {
return !fbjs_lib_shallowEqual__WEBPACK_IMPORTED_MODULE_1___default()(pick(nextProps, propKeys), pick(props, propKeys));
});
if (false) {}
return hoc;
};
var onlyUpdateForPropTypes = function onlyUpdateForPropTypes(BaseComponent) {
var propTypes = BaseComponent.propTypes;
if (false) {}
var propKeys = Object.keys(propTypes || {});
var OnlyUpdateForPropTypes = onlyUpdateForKeys(propKeys)(BaseComponent);
if (false) {}
return OnlyUpdateForPropTypes;
};
var withContext = function withContext(childContextTypes, getChildContext) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
var WithContext = function (_Component) {
inherits(WithContext, _Component);
function WithContext() {
var _temp, _this, _ret;
classCallCheck(this, WithContext);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.getChildContext = function () {
return getChildContext(_this.props);
}, _temp), possibleConstructorReturn(_this, _ret);
}
WithContext.prototype.render = function render() {
return factory(this.props);
};
return WithContext;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
WithContext.childContextTypes = childContextTypes;
if (false) {}
return WithContext;
};
};
var getContext = function getContext(contextTypes) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
var GetContext = function GetContext(ownerProps, context) {
return factory(_extends({}, ownerProps, context));
};
GetContext.contextTypes = contextTypes;
if (false) {}
return GetContext;
};
};
/* eslint-disable no-console */
var lifecycle = function lifecycle(spec) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
if (false) {}
var Lifecycle = function (_Component) {
inherits(Lifecycle, _Component);
function Lifecycle() {
classCallCheck(this, Lifecycle);
return possibleConstructorReturn(this, _Component.apply(this, arguments));
}
Lifecycle.prototype.render = function render() {
return factory(_extends({}, this.props, this.state));
};
return Lifecycle;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
Object.keys(spec).forEach(function (hook) {
return Lifecycle.prototype[hook] = spec[hook];
});
if (false) {}
return Lifecycle;
};
};
var isClassComponent = function isClassComponent(Component$$1) {
return Boolean(Component$$1 && Component$$1.prototype && typeof Component$$1.prototype.render === 'function');
};
var toClass = function toClass(baseComponent) {
if (isClassComponent(baseComponent)) {
return baseComponent;
}
var ToClass = function (_Component) {
inherits(ToClass, _Component);
function ToClass() {
classCallCheck(this, ToClass);
return possibleConstructorReturn(this, _Component.apply(this, arguments));
}
ToClass.prototype.render = function render() {
if (typeof baseComponent === 'string') {
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(baseComponent, this.props);
}
return baseComponent(this.props, this.context);
};
return ToClass;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
ToClass.displayName = getDisplayName(baseComponent);
ToClass.propTypes = baseComponent.propTypes;
ToClass.contextTypes = baseComponent.contextTypes;
ToClass.defaultProps = baseComponent.defaultProps;
return ToClass;
};
var setPropTypes = function setPropTypes(propTypes) {
return setStatic('propTypes', propTypes);
};
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));
};
});
}
var createSink = function createSink(callback) {
return function (_Component) {
inherits(Sink, _Component);
function Sink() {
classCallCheck(this, Sink);
return possibleConstructorReturn(this, _Component.apply(this, arguments));
}
Sink.prototype.componentWillMount = function componentWillMount() {
callback(this.props);
};
Sink.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
callback(nextProps);
};
Sink.prototype.render = function render() {
return null;
};
return Sink;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
};
var componentFromProp = function componentFromProp(propName) {
var Component$$1 = function Component$$1(props) {
return Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(props[propName], omit(props, [propName]));
};
Component$$1.displayName = 'componentFromProp(' + propName + ')';
return Component$$1;
};
var nest = function nest() {
for (var _len = arguments.length, Components = Array(_len), _key = 0; _key < _len; _key++) {
Components[_key] = arguments[_key];
}
var factories = Components.map(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"]);
var Nest = function Nest(_ref) {
var props = objectWithoutProperties(_ref, []),
children = _ref.children;
return factories.reduceRight(function (child, factory) {
return factory(props, child);
}, children);
};
if (false) { var displayNames; }
return Nest;
};
var hoistStatics = function hoistStatics(higherOrderComponent) {
return function (BaseComponent) {
var NewComponent = higherOrderComponent(BaseComponent);
hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(NewComponent, BaseComponent);
return NewComponent;
};
};
var _config = {
fromESObservable: null,
toESObservable: null
};
var configureObservable = function configureObservable(c) {
_config = c;
};
var config = {
fromESObservable: function fromESObservable(observable) {
return typeof _config.fromESObservable === 'function' ? _config.fromESObservable(observable) : observable;
},
toESObservable: function toESObservable(stream) {
return typeof _config.toESObservable === 'function' ? _config.toESObservable(stream) : stream;
}
};
var componentFromStreamWithConfig = function componentFromStreamWithConfig(config$$1) {
return function (propsToVdom) {
return function (_Component) {
inherits(ComponentFromStream, _Component);
function ComponentFromStream() {
var _config$fromESObserva;
var _temp, _this, _ret;
classCallCheck(this, ComponentFromStream);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = { vdom: null }, _this.propsEmitter = Object(change_emitter__WEBPACK_IMPORTED_MODULE_3__["createChangeEmitter"])(), _this.props$ = config$$1.fromESObservable((_config$fromESObserva = {
subscribe: function subscribe(observer) {
var unsubscribe = _this.propsEmitter.listen(function (props) {
if (props) {
observer.next(props);
} else {
observer.complete();
}
});
return { unsubscribe: unsubscribe };
}
}, _config$fromESObserva[symbol_observable__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]] = function () {
return this;
}, _config$fromESObserva)), _this.vdom$ = config$$1.toESObservable(propsToVdom(_this.props$)), _temp), possibleConstructorReturn(_this, _ret);
}
// Stream of props
// Stream of vdom
ComponentFromStream.prototype.componentWillMount = function componentWillMount() {
var _this2 = this;
// Subscribe to child prop changes so we know when to re-render
this.subscription = this.vdom$.subscribe({
next: function next(vdom) {
_this2.setState({ vdom: vdom });
}
});
this.propsEmitter.emit(this.props);
};
ComponentFromStream.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
// Receive new props from the owner
this.propsEmitter.emit(nextProps);
};
ComponentFromStream.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {
return nextState.vdom !== this.state.vdom;
};
ComponentFromStream.prototype.componentWillUnmount = function componentWillUnmount() {
// Call without arguments to complete stream
this.propsEmitter.emit();
// Clean-up subscription before un-mounting
this.subscription.unsubscribe();
};
ComponentFromStream.prototype.render = function render() {
return this.state.vdom;
};
return ComponentFromStream;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
};
};
var componentFromStream = function componentFromStream(propsToVdom) {
return componentFromStreamWithConfig(config)(propsToVdom);
};
var identity$1 = function identity(t) {
return t;
};
var mapPropsStreamWithConfig = function mapPropsStreamWithConfig(config$$1) {
var componentFromStream = componentFromStreamWithConfig({
fromESObservable: identity$1,
toESObservable: identity$1
});
return function (transform) {
return function (BaseComponent) {
var factory = Object(react__WEBPACK_IMPORTED_MODULE_0__["createFactory"])(BaseComponent);
var fromESObservable = config$$1.fromESObservable,
toESObservable = config$$1.toESObservable;
return componentFromStream(function (props$) {
var _ref;
return _ref = {
subscribe: function subscribe(observer) {
var subscription = toESObservable(transform(fromESObservable(props$))).subscribe({
next: function next(childProps) {
return observer.next(factory(childProps));
}
});
return {
unsubscribe: function unsubscribe() {
return subscription.unsubscribe();
}
};
}
}, _ref[symbol_observable__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]] = function () {
return this;
}, _ref;
});
};
};
};
var mapPropsStream = function mapPropsStream(transform) {
var hoc = mapPropsStreamWithConfig(config)(transform);
if (false) {}
return hoc;
};
var createEventHandlerWithConfig = function createEventHandlerWithConfig(config$$1) {
return function () {
var _config$fromESObserva;
var emitter = Object(change_emitter__WEBPACK_IMPORTED_MODULE_3__["createChangeEmitter"])();
var stream = config$$1.fromESObservable((_config$fromESObserva = {
subscribe: function subscribe(observer) {
var unsubscribe = emitter.listen(function (value) {
return observer.next(value);
});
return { unsubscribe: unsubscribe };
}
}, _config$fromESObserva[symbol_observable__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]] = function () {
return this;
}, _config$fromESObserva));
return {
handler: emitter.emit,
stream: stream
};
};
};
var createEventHandler = createEventHandlerWithConfig(config);
// Higher-order component helpers
/***/ }),
/* 23 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flush", function() { return flush; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hydrate", function() { return hydrate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cx", function() { return cx; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRegisteredStyles", function() { return getRegisteredStyles; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "injectGlobal", function() { return injectGlobal; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyframes", function() { return keyframes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "css", function() { return css; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sheet", function() { return sheet; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "caches", function() { return caches; });
/* harmony import */ var create_emotion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(276);
var context = typeof global !== 'undefined' ? global : {};
var _createEmotion = Object(create_emotion__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(context),
flush = _createEmotion.flush,
hydrate = _createEmotion.hydrate,
cx = _createEmotion.cx,
merge = _createEmotion.merge,
getRegisteredStyles = _createEmotion.getRegisteredStyles,
injectGlobal = _createEmotion.injectGlobal,
keyframes = _createEmotion.keyframes,
css = _createEmotion.css,
sheet = _createEmotion.sheet,
caches = _createEmotion.caches;
//# sourceMappingURL=index.es.js.map
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(75)))
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _from = __webpack_require__(448);
var _from2 = _interopRequireDefault(_from);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = 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 (0, _from2.default)(arr);
}
};
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(49);
module.exports = function (it) {
return Object(defined(it));
};
/***/ }),
/* 26 */
/***/ (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;
};
/***/ }),
/* 27 */
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _I18nUtils = __webpack_require__(17);
var I18nUtils = _interopRequireWildcard(_I18nUtils);
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 en = {
buttonAddClaim: 'add claim',
buttonRemoveClaim: 'remove claim',
buttonUrlNavigate: 'open specified URL',
buttonCreateOrEdit: 'create or edit wikidata item',
buttonCreateOrEditPrefixCreate: 'create as: ',
buttonCreateOrEditPrefixEdit: 'edit as: ',
buttonOnWikidata: 'open specified wikidata item on wikidata website',
checkboxShowJulian: 'show in Julian calendar?',
checkboxShowJulianTitle: 'when displaying the date show in julian calendar. This option does not change the input format or the value stored',
confirmDeleteClaim: 'Remove the value of property «{label}»?',
dialogButtonUpdateLabelsText: 'Update labels',
dialogButtonUpdateLabelsLabel: 'Redownload properties, qualificator and objects labels and descriptions from Wikidata',
dialogButtonSaveText: 'Save',
dialogButtonSaveLabel: 'Close the dialog and save all changes to Wikidata',
dialogButtonCancelText: 'Cancel',
dialogButtonCancelLabel: 'Close the dialog and discard all changes (do not save)',
dialogAnalyzeChangesTitle: 'Analyze changes...',
dialogSaveChangesTitle: 'Saving changes to Wikidata...',
errorAnalyzeChanges: 'Unable to collect and analyze changes',
errorRemoveClaims: 'Unable to remove outdated statements from entity',
inputGlobeLatitudeLabel: 'Latitude',
inputGlobeLatitudeTitle: 'a latitude (decimal, no default, 9 digits after the dot and two before, signed)',
inputGlobeLongitudeLabel: 'Longitude',
inputGlobeLongitudeTitle: 'a longitude (decimal, no default, 9 digits after the dot and three before, signed)',
inputGlobeAltitudeLabel: 'Altitude',
inputGlobeAltitudeTitle: '',
inputGlobePrecisionLabel: 'Precision',
inputGlobePrecisionTitle: 'a precision (decimal, representing degrees of distance, defaults to 0, 9 digits after the dot and three before, unsigned, used to save the precision of the representation)',
inputGlobeGlobeLabel: 'Globe',
inputGlobeGlobeTitle: 'a coordinate system or globe (identified by an URI, defaults to the Earth, which means WGS84). Any such geodesic system must imply the globe for which it is used (and should be displayed as simply the globe in most cases)',
inputTimeAsGregorianLabel: 'Date in Gregorian calendar model',
inputTimeAsJulianLabel: 'Date in Julian calendar model',
inputTimeTimeLabel: 'Time (ISO notation)',
inputTimeTimeTitle: 'Date and time in ISO notation, including. E.g. "+1994-01-01T00:00:00Z"',
inputTimeTimeZoneLabel: 'Timezone (minutes)',
inputTimeTimeZoneTitle: 'The time zone offset against UTC, in minutes. May be given as an integer or string literal.',
inputTimeCalendarModelLabel: 'Calendar model',
inputTimeCalendarModelTitle: 'A calendar model, such as gregorian or julian',
inputTimePrecisionLabel: 'Precision',
inputTimePrecisionTitle: 'To what unit is the given date/time significant?',
labelLabels: 'Label and description',
labelLabel: 'Label',
labelDescription: 'Description',
labelAliases: 'Aliases',
placeholderAliases: 'Add “also known as”',
rank: {
deprecated: 'deprecated',
normal: 'normal',
preferred: 'preferred'
},
rankTitle: {
deprecated: 'used for a statement that contains information that may not be considered reliable or that is known to include errors. (For example, a statement that documents a wrong population figure that was published in some historic document. In this case the statement is not wrong – the historic document that is given as a reference really made the erroneous claim – but the statement should not be used in most cases.)',
normal: 'used for a statement that contains relevant information that is believed to be correct, but may be too extensive to be shown by default. (For example, historic population figures for Berlin over the course of many years.)',
preferred: 'used for a statement with the most important and most up-to-date information. Such a statement will be shown to all users and will be displayed in Wikipedia infoboxes by default. (For example, the most recent population figures for Berlin.)'
},
snakType: {
value: 'custom value',
novalue: 'no value',
somevalue: 'unknown value'
},
snakTypeTitle: {
value: 'is a marker for when there is a known value for the property that can be specified. ' + 'This is the default snak type when creating a snak/claim/statement.',
novalue: 'is a marker for when there certainly is no value for the property (example: if a human has no children, the corresponding item would receive this marker for ребёнок (P40)).' + ' Assigning the "no value" marker is a proper statement and is different to an item lacking a property.' + ' Latter implicates that it is unknown whether the property has no or some value (example: a missing human that may be dead or alive cannot be assigned дата смерти (P570) while, for consistency, a living human should feature дата смерти (P570) with the no value marker applied, clearly denoting that the human is not dead).',
somevalue: ' is a marker for when there is some value but the exact value is not known for the property. ' + '"Some value" means that there is nothing known for the value except that it should exist and not imply a negation of the claim (example: if the date of a human\'s death is completely unknown the item would receive this marker for death date (P570), denoting that the human is, in fact, dead — however, with the date of death being unknown).'
},
timePrecision0: '1 Gigayear',
timePrecision1: '100 Megayears',
timePrecision2: '10 Megayears',
timePrecision3: 'Megayear',
timePrecision4: '100 Kiloyears',
timePrecision5: '10 Kiloyears',
timePrecision6: 'Kiloyear',
timePrecision7: '100 years',
timePrecision8: '10 years',
timePrecision9: 'year',
timePrecision10: 'month',
timePrecision11: 'day',
timePrecision12: 'hour',
timePrecision13: 'minute',
timePrecision14: 'second',
timePrecisionOther: 'other'
};
var fr = {
dialogButtonUpdateLabelsText: 'Mettre à jour les libellés',
dialogButtonUpdateLabelsLabel: 'Recharger les labels et descriptions des propriétés, qualificatifs et objets',
dialogButtonSaveText: 'Enregistrer',
dialogButtonSaveLabel: 'Fermer la fenêtre en enregistrant les modifications sur Wikidata',
dialogButtonCancelText: 'Annuler',
dialogButtonCancelLabel: 'Fermer la fenêtre sans enregistrer'
};
var ru = {
buttonAddClaim: 'добавить утверждение',
buttonRemoveClaim: 'удалить утверждение',
buttonUrlNavigate: 'открыть указанный URL',
buttonCreateOrEdit: 'создать или редактировать элемент Викиданных',
buttonCreateOrEditPrefixCreate: 'создать: ',
buttonCreateOrEditPrefixEdit: 'редактировать: ',
buttonOnWikidata: 'открыть указанный элемент Викиданных на сайте Викиданных',
checkboxShowJulian: 'показывать по Юлианскому календарю',
checkboxShowJulianTitle: 'при отображении даты включать режим отображения по Юлианскому календарю. Данная опция не влияет на формат ввода или хранения.',
confirmDeleteClaim: 'Удалить значение свойства «{label}»?',
dialogButtonUpdateLabelsText: 'Обновить названия',
dialogButtonUpdateLabelsLabel: 'Заново загрузить названия полей, квалификаторов и объектов с Викиданных',
dialogButtonSaveText: 'Сохранить',
dialogButtonSaveLabel: 'Закрыть окно и сохранить все изменения в Викиданных',
dialogButtonCancelText: 'Отмена',
dialogButtonCancelLabel: 'Закрыть окно и отменить все изменения (не сохранять)',
dialogAnalyzeChangesTitle: 'Анализ изменений...',
dialogSaveChangesTitle: 'Сохранение изменений на Викиданных',
errorAnalyzeChanges: 'Произошла ошибка при анализе изменений',
errorRemoveClaims: 'Произошла ошибка при удалении устаревших утверждений из элемента',
inputGlobeLatitudeLabel: 'Широта',
inputGlobeLatitudeTitle: 'широта (десятичное число, значение по умолчанию не задано, 9 цифр после запятой и два до; знаковое)',
inputGlobeLongitudeLabel: 'Долгота',
inputGlobeLongitudeTitle: 'долгота (десятичное число, значение по умолчанию не задано, 9 цифр после запятой и три до; знаковое)',
inputGlobeAltitudeLabel: 'Высота',
inputGlobeAltitudeTitle: 'Высота (десятичное число, значение по умолчанию не задано, 9 цифр после запятой и два до; знаковое)',
inputGlobePrecisionLabel: 'Точность',
inputGlobePrecisionTitle: 'точность (десятичное число, representing degrees of distance, значение по умолчанию 0, 9 цифр после запятой и три до; знаковое, используется для указания точности представления георафической координаты)',
inputGlobeGlobeLabel: 'Глобус',
inputGlobeGlobeTitle: 'координатная система или глобус (указывается идентификатором, по умолчанию Земля, т. е. WGS84)',
inputTimeAsGregorianLabel: 'дата по григорианскому календарю (новый стиль)',
inputTimeAsJulianLabel: 'дата по юлианскому календарю (старый стиль)',
inputTimeTimeLabel: 'Дата и время (ISO-нотация)',
inputTimeTimeTitle: 'Дата и время в ISO-нотации, т. е. «+1994-01-01T00:00:00Z» по григорианскому календарю',
inputTimeTimeZoneLabel: 'Часовой пояс (в минутах)',
inputTimeTimeZoneTitle: 'Сдвиг часового пояса относительно UTC, в минутах',
inputTimePrecisionLabel: 'Точность',
inputTimePrecisionTitle: 'Какая наиболее точная значая единица для данного значения?',
inputTimeCalendarModelLabel: 'Календарь для отображения',
inputTimeCalendarModelTitle: 'Календарь, например, юлианский или григорианский',
labelLabels: 'Метка и описание',
labelLabel: 'Метка',
labelDescription: 'Описание',
labelAliases: 'Также известен как',
placeholderAliases: 'Добавить «также известен как»',
rank: {
deprecated: 'нерекомендуемый',
normal: 'нормальный',
preferred: 'предпочтительный'
},
rankTitle: {
deprecated: 'используется для утверждений, содержащих информацию, которую нельзя считать надёжной или которая содержит известные ошибки. (Например, утверждение сообщает о неверной численности населения, опубликованной в некоем историческом документе. В этом случае утверждение не является ложным — в историческом документе, указанном в качестве источника, действительно было сделано ошибочное заявление — но такое утверждение в большинстве случаев не стоит использовать.)',
normal: ' используется для утверждений, содержащих релевантную информацию, которая считается верной, но которой, возможно, слишком много для отображения по умолчанию. (Например, измерения исторической численности населения Берлина на протяжении множества лет.)',
preferred: 'используется для утверждений с наиболее важной и наиболее актуальной информацией. Такое утверждение будет показываться всем участникам и будет отображаться в шаблонах-карточках Википедии по умолчанию. (Например, самые последние сведения о численности населения Берлина.)'
},
snakType: {
value: 'своё значение',
novalue: 'значение не задано',
somevalue: 'неизвестное значение'
},
timePrecision0: 'гигагод',
timePrecision1: '100 мегалет',
timePrecision2: '10 мегалет',
timePrecision3: 'мегагод',
timePrecision4: '100 килолет',
timePrecision5: '10 килолет',
timePrecision6: 'килогод',
timePrecision7: 'век',
timePrecision8: '10 лет',
timePrecision9: 'год',
timePrecision10: 'месяц',
timePrecision11: 'день',
timePrecision12: 'час',
timePrecision13: 'минута',
timePrecision14: 'секунда',
timePrecisionOther: 'другое'
};
var translations = { en: en, fr: fr, ru: ru };
var result = I18nUtils.localize({}, translations);
exports.default = result;
/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getEntityIdDeferred = getEntityIdDeferred;
exports.isCommons = isCommons;
exports.isWikidata = isWikidata;
exports.purge = purge;
exports.purgeAsync = purgeAsync;
//import * as WEF_Utils from './utils';
//
var MW_SCRIPT_PATH = mw.config.get('wgScriptPath');
var WG_ARTICLE_ID = mw.config.get('wgArticleId');
var WG_PAGE_NAME = mw.config.get('wgPageName');
var WG_SERVER = mw.config.get('wgServer');
var WG_SITE_NAME = mw.config.get('wgSiteName');
var WG_TITLE = mw.config.get('wgTitle');
var WG_WIKIBASE_ITEM_ID = mw.config.get('wgWikibaseItemId');
function addPromises(api) {
var toPromise = function toPromise(origin) {
return function () {
var args = arguments;
return new Promise(function (resolve, reject) {
origin.apply(api, args).then(resolve).catch(reject);
});
};
};
api.getPromise = toPromise(api.get);
api.postPromise = toPromise(api.post);
api.postWithTokenPromise = toPromise(api.postWithToken);
api.postWithEditTokenPromise = toPromise(api.postWithEditToken);
return api;
}
var deferredEntityIdPromise = null;
function getEntityIdDeferred() {
if (deferredEntityIdPromise) {
return deferredEntityIdPromise;
}
deferredEntityIdPromise = new Promise(function (resolve, reject) {
if (!WG_ARTICLE_ID) {
reject('wgArticleId configuration variable is not set');
return;
}
if (isWikidata()) {
resolve(WG_TITLE);
return;
}
if (WG_WIKIBASE_ITEM_ID) {
resolve(WG_WIKIBASE_ITEM_ID);
return;
}
// more complicated case, need API call
new mw.Api().get({
action: 'query',
prop: 'pageprops',
pageids: WG_ARTICLE_ID
}).then(function (data) {
try {
var resolved = false;
if (data.query && data.query.pages) {
jQuery.each(data.query.pages, function (pageId, page) {
if (page.pageid && page.pageprops && page.pageprops.wikibase_item && page.pageid == WG_ARTICLE_ID) {
resolve(page.pageprops.wikibase_item);
resolved = true;
}
});
}
if (!resolved) {
resolve(null);
}
} catch (error) {
reject(error);
}
});
});
return deferredEntityIdPromise;
}
function getServerApiImpl() {
var api = new mw.Api();
if (typeof api.postWithEditToken === 'undefined') {
api.postWithEditToken = function (params, ajaxOptions) {
return this.postWithToken('edit', params, ajaxOptions);
};
}
return addPromises(api);
}
var serverApi = null;
var getServerApi = exports.getServerApi = function getServerApi() {
return serverApi === null ? serverApi = getServerApiImpl() : serverApi;
};
function getCommonsApiImpl() {
var api = void 0;
if (!isCommons()) {
api = new mw.ForeignApi('//commons.wikimedia.org/w/api.php');
} else {
api = new mw.Api();
}
if (typeof api.postWithEditToken === 'undefined') {
api.postWithEditToken = function (params, ajaxOptions) {
return this.postWithToken('edit', params, ajaxOptions);
};
}
return addPromises(api);
}
var commonsApi = null;
var getCommonsApi = exports.getCommonsApi = function getCommonsApi() {
return commonsApi === null ? commonsApi = getCommonsApiImpl() : commonsApi;
};
function isCommons() {
return WG_SITE_NAME === 'Wikimedia Commons';
}
function getWikidataApiImpl() {
var api = void 0;
if (!isWikidata()) {
api = new mw.ForeignApi('//www.wikidata.org/w/api.php');
} else {
api = new mw.Api();
}
if (typeof api.postWithEditToken === 'undefined') {
api.postWithEditToken = function (params, ajaxOptions) {
return this.postWithToken('edit', params, ajaxOptions);
};
}
return addPromises(api);
}
var wikidataApi = null;
var getWikidataApi = exports.getWikidataApi = function getWikidataApi() {
return wikidataApi === null ? wikidataApi = getWikidataApiImpl() : wikidataApi;
};
function isWikidata() {
return WG_SITE_NAME === 'Wikidata';
}
function purge() {
purgeAsync().then(function () {
var url = WG_SERVER + MW_SCRIPT_PATH + '/index.php?title=' + encodeURIComponent(WG_PAGE_NAME) + '&r=' + Math.random();
window.location.replace(url);
});
}
function purgeAsync() {
return new mw.Api().post({
action: 'purge',
titles: WG_PAGE_NAME
});
}
//export function wbGetEntities( params ) {
// params.action = 'wbgetentities';
// params.uselang = WEF_Utils.getDefaultLanguageCode();
//
// return new Promise( ( resolve, reject ) => {
// getWikidataApi()
// .post( params )
// .then( function( response ) {
// if ( response.error ) {
// console.log( 'Unable to call \'wbgetentities\': ' + response.error.info );
// reject( response.error );
// return;
// }
// resolve( response.entities );
// } ).fail( function( jqXHR, textStatus, errorThrown ) {
// // too bad :-(
// console.log( 'Unable to call \'wbgetentities\'' );
// console.log( textStatus );
// console.log( errorThrown );
// reject( errorThrown );
// return;
// } );
// } );
//}
/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
var fails = __webpack_require__(11);
var defined = __webpack_require__(49);
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 + '</' + tag + '>';
};
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);
};
/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(9);
var hide = __webpack_require__(32);
var has = __webpack_require__(38);
var SRC = __webpack_require__(73)('src');
var TO_STRING = 'toString';
var $toString = Function[TO_STRING];
var TPL = ('' + $toString).split(TO_STRING);
__webpack_require__(43).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);
});
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(20);
var createDesc = __webpack_require__(74);
module.exports = __webpack_require__(21) ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(410);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 34 */
/***/ (function(module, exports) {
var core = module.exports = { version: '2.5.7' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(38);
var toObject = __webpack_require__(25);
var IE_PROTO = __webpack_require__(186)('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;
};
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
var pIE = __webpack_require__(96);
var createDesc = __webpack_require__(74);
var toIObject = __webpack_require__(37);
var toPrimitive = __webpack_require__(50);
var has = __webpack_require__(38);
var IE8_DOM_DEFINE = __webpack_require__(275);
var gOPD = Object.getOwnPropertyDescriptor;
exports.f = __webpack_require__(21) ? 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]);
};
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(97);
var defined = __webpack_require__(49);
module.exports = function (it) {
return IObject(defined(it));
};
/***/ }),
/* 38 */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__(154)('wks');
var uid = __webpack_require__(105);
var Symbol = __webpack_require__(57).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;
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(11);
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);
});
};
/***/ }),
/* 41 */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(27);
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);
};
};
/***/ }),
/* 43 */
/***/ (function(module, exports) {
var core = module.exports = { version: '2.5.7' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
/* 44 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(0);
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
var prop_types = __webpack_require__(2);
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/PropTypes.js
var subscriptionShape = prop_types_default.a.shape({
trySubscribe: prop_types_default.a.func.isRequired,
tryUnsubscribe: prop_types_default.a.func.isRequired,
notifyNestedSubs: prop_types_default.a.func.isRequired,
isSubscribed: prop_types_default.a.func.isRequired
});
var storeShape = prop_types_default.a.shape({
subscribe: prop_types_default.a.func.isRequired,
dispatch: prop_types_default.a.func.isRequired,
getState: prop_types_default.a.func.isRequired
});
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/warning.js
/**
* 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 */
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Provider.js
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 didWarnAboutReceivingStore = false;
function warnAboutReceivingStore() {
if (didWarnAboutReceivingStore) {
return;
}
didWarnAboutReceivingStore = true;
warning('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');
}
function createProvider() {
var _Provider$childContex;
var storeKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'store';
var subKey = arguments[1];
var subscriptionKey = subKey || storeKey + 'Subscription';
var Provider = function (_Component) {
_inherits(Provider, _Component);
Provider.prototype.getChildContext = function getChildContext() {
var _ref;
return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref;
};
function Provider(props, context) {
_classCallCheck(this, Provider);
var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
_this[storeKey] = props.store;
return _this;
}
Provider.prototype.render = function render() {
return react["Children"].only(this.props.children);
};
return Provider;
}(react["Component"]);
if (false) {}
Provider.propTypes = {
store: storeShape.isRequired,
children: prop_types_default.a.element.isRequired
};
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = storeShape.isRequired, _Provider$childContex[subscriptionKey] = subscriptionShape, _Provider$childContex);
return Provider;
}
/* harmony default export */ var components_Provider = (createProvider());
// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/index.js
var hoist_non_react_statics = __webpack_require__(126);
var hoist_non_react_statics_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics);
// EXTERNAL MODULE: ./node_modules/invariant/browser.js
var browser = __webpack_require__(128);
var browser_default = /*#__PURE__*/__webpack_require__.n(browser);
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/Subscription.js
function Subscription_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
// encapsulates the subscription logic for connecting a component to the redux store, as
// well as nesting subscriptions of descendant components, so that we can ensure the
// ancestor components re-render before descendants
var CLEARED = null;
var nullListeners = {
notify: function notify() {}
};
function createListenerCollection() {
// the current/next pattern is copied from redux's createStore code.
// TODO: refactor+expose that code to be reusable here?
var current = [];
var next = [];
return {
clear: function clear() {
next = CLEARED;
current = CLEARED;
},
notify: function notify() {
var listeners = current = next;
for (var i = 0; i < listeners.length; i++) {
listeners[i]();
}
},
get: function get() {
return next;
},
subscribe: function subscribe(listener) {
var isSubscribed = true;
if (next === current) next = current.slice();
next.push(listener);
return function unsubscribe() {
if (!isSubscribed || current === CLEARED) return;
isSubscribed = false;
if (next === current) next = current.slice();
next.splice(next.indexOf(listener), 1);
};
}
};
}
var Subscription = function () {
function Subscription(store, parentSub, onStateChange) {
Subscription_classCallCheck(this, Subscription);
this.store = store;
this.parentSub = parentSub;
this.onStateChange = onStateChange;
this.unsubscribe = null;
this.listeners = nullListeners;
}
Subscription.prototype.addNestedSub = function addNestedSub(listener) {
this.trySubscribe();
return this.listeners.subscribe(listener);
};
Subscription.prototype.notifyNestedSubs = function notifyNestedSubs() {
this.listeners.notify();
};
Subscription.prototype.isSubscribed = function isSubscribed() {
return Boolean(this.unsubscribe);
};
Subscription.prototype.trySubscribe = function trySubscribe() {
if (!this.unsubscribe) {
this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);
this.listeners = createListenerCollection();
}
};
Subscription.prototype.tryUnsubscribe = function tryUnsubscribe() {
if (this.unsubscribe) {
this.unsubscribe();
this.unsubscribe = null;
this.listeners.clear();
this.listeners = nullListeners;
}
};
return Subscription;
}();
// CONCATENATED MODULE: ./node_modules/react-redux/es/components/connectAdvanced.js
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 connectAdvanced_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function connectAdvanced_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 connectAdvanced_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] = storeShape, _contextTypes[subscriptionKey] = subscriptionShape, _contextTypes);
var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = subscriptionShape, _childContextTypes);
return function wrapWithConnect(WrappedComponent) {
browser_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) {
connectAdvanced_inherits(Connect, _Component);
function Connect(props, context) {
connectAdvanced_classCallCheck(this, Connect);
var _this = connectAdvanced_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);
browser_default()(_this.store, 'Could not find "' + storeKey + '" in either the context or props of ' + ('"' + displayName + '". Either wrap the root component in a <Provider>, ') + ('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() {
browser_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 Subscription(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(react["createElement"])(WrappedComponent, this.addExtraProps(selector.props));
}
};
return Connect;
}(react["Component"]);
Connect.WrappedComponent = WrappedComponent;
Connect.displayName = displayName;
Connect.childContextTypes = childContextTypes;
Connect.contextTypes = contextTypes;
Connect.propTypes = contextTypes;
if (false) {}
return hoist_non_react_statics_default()(Connect, WrappedComponent);
};
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/shallowEqual.js
var hasOwn = Object.prototype.hasOwnProperty;
function is(x, y) {
if (x === y) {
return x !== 0 || y !== 0 || 1 / x === 1 / y;
} else {
return x !== x && y !== y;
}
}
function shallowEqual(objA, objB) {
if (is(objA, objB)) return true;
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
return false;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) return false;
for (var i = 0; i < keysA.length; i++) {
if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
return false;
}
}
return true;
}
// EXTERNAL MODULE: ./node_modules/redux/es/redux.js
var redux = __webpack_require__(124);
// EXTERNAL MODULE: ./node_modules/lodash-es/_freeGlobal.js
var _freeGlobal = __webpack_require__(279);
// CONCATENATED MODULE: ./node_modules/lodash-es/_root.js
/** 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["a" /* default */] || freeSelf || Function('return this')();
/* harmony default export */ var _root = (root);
// CONCATENATED MODULE: ./node_modules/lodash-es/_Symbol.js
/** Built-in value references. */
var Symbol = _root.Symbol;
/* harmony default export */ var _Symbol = (Symbol);
// CONCATENATED MODULE: ./node_modules/lodash-es/_getRawTag.js
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var _getRawTag_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 = _getRawTag_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;
}
/* harmony default export */ var _getRawTag = (getRawTag);
// CONCATENATED MODULE: ./node_modules/lodash-es/_objectToString.js
/** Used for built-in method references. */
var _objectToString_objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var _objectToString_nativeObjectToString = _objectToString_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 _objectToString_nativeObjectToString.call(value);
}
/* harmony default export */ var _objectToString = (objectToString);
// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGetTag.js
/** `Object#toString` result references. */
var nullTag = '[object Null]',
undefinedTag = '[object Undefined]';
/** Built-in value references. */
var _baseGetTag_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 (_baseGetTag_symToStringTag && _baseGetTag_symToStringTag in Object(value))
? _getRawTag(value)
: _objectToString(value);
}
/* harmony default export */ var _baseGetTag = (baseGetTag);
// CONCATENATED MODULE: ./node_modules/lodash-es/_overArg.js
/**
* 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));
};
}
/* harmony default export */ var _overArg = (overArg);
// CONCATENATED MODULE: ./node_modules/lodash-es/_getPrototype.js
/** Built-in value references. */
var getPrototype = _overArg(Object.getPrototypeOf, Object);
/* harmony default export */ var _getPrototype = (getPrototype);
// CONCATENATED MODULE: ./node_modules/lodash-es/isObjectLike.js
/**
* 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';
}
/* harmony default export */ var lodash_es_isObjectLike = (isObjectLike);
// CONCATENATED MODULE: ./node_modules/lodash-es/isPlainObject.js
/** `Object#toString` result references. */
var objectTag = '[object Object]';
/** Used for built-in method references. */
var funcProto = Function.prototype,
isPlainObject_objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var isPlainObject_hasOwnProperty = isPlainObject_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 (!lodash_es_isObjectLike(value) || _baseGetTag(value) != objectTag) {
return false;
}
var proto = _getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = isPlainObject_hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
funcToString.call(Ctor) == objectCtorString;
}
/* harmony default export */ var lodash_es_isPlainObject = (isPlainObject);
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/verifyPlainObject.js
function verifyPlainObject(value, displayName, methodName) {
if (!lodash_es_isPlainObject(value)) {
warning(methodName + '() in ' + displayName + ' must return a plain object. Instead received ' + value + '.');
}
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/wrapMapToProps.js
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 (false) {}
return props;
};
return proxy;
};
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mapDispatchToProps.js
function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {
return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined;
}
function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {
return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {
return { dispatch: dispatch };
}) : undefined;
}
function whenMapDispatchToPropsIsObject(mapDispatchToProps) {
return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) {
return Object(redux["bindActionCreators"])(mapDispatchToProps, dispatch);
}) : undefined;
}
/* harmony default export */ var connect_mapDispatchToProps = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]);
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mapStateToProps.js
function whenMapStateToPropsIsFunction(mapStateToProps) {
return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;
}
function whenMapStateToPropsIsMissing(mapStateToProps) {
return !mapStateToProps ? wrapMapToPropsConstant(function () {
return {};
}) : undefined;
}
/* harmony default export */ var connect_mapStateToProps = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]);
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mergeProps.js
var mergeProps_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 defaultMergeProps(stateProps, dispatchProps, ownProps) {
return mergeProps_extends({}, ownProps, stateProps, dispatchProps);
}
function wrapMergePropsFunc(mergeProps) {
return function initMergePropsProxy(dispatch, _ref) {
var displayName = _ref.displayName,
pure = _ref.pure,
areMergedPropsEqual = _ref.areMergedPropsEqual;
var hasRunOnce = false;
var mergedProps = void 0;
return function mergePropsProxy(stateProps, dispatchProps, ownProps) {
var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);
if (hasRunOnce) {
if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;
} else {
hasRunOnce = true;
mergedProps = nextMergedProps;
if (false) {}
}
return mergedProps;
};
};
}
function whenMergePropsIsFunction(mergeProps) {
return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;
}
function whenMergePropsIsOmitted(mergeProps) {
return !mergeProps ? function () {
return defaultMergeProps;
} : undefined;
}
/* harmony default export */ var connect_mergeProps = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]);
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/verifySubselectors.js
function verify(selector, methodName, displayName) {
if (!selector) {
throw new Error('Unexpected value for ' + methodName + ' in ' + displayName + '.');
} else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {
if (!selector.hasOwnProperty('dependsOnOwnProps')) {
warning('The selector for ' + methodName + ' of ' + displayName + ' did not specify a value for dependsOnOwnProps.');
}
}
}
function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {
verify(mapStateToProps, 'mapStateToProps', displayName);
verify(mapDispatchToProps, 'mapDispatchToProps', displayName);
verify(mergeProps, 'mergeProps', displayName);
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/selectorFactory.js
function selectorFactory_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 impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {
return function impureFinalPropsSelector(state, ownProps) {
return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);
};
}
function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {
var areStatesEqual = _ref.areStatesEqual,
areOwnPropsEqual = _ref.areOwnPropsEqual,
areStatePropsEqual = _ref.areStatePropsEqual;
var hasRunAtLeastOnce = false;
var state = void 0;
var ownProps = void 0;
var stateProps = void 0;
var dispatchProps = void 0;
var mergedProps = void 0;
function handleFirstCall(firstState, firstOwnProps) {
state = firstState;
ownProps = firstOwnProps;
stateProps = mapStateToProps(state, ownProps);
dispatchProps = mapDispatchToProps(dispatch, ownProps);
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
hasRunAtLeastOnce = true;
return mergedProps;
}
function handleNewPropsAndNewState() {
stateProps = mapStateToProps(state, ownProps);
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
return mergedProps;
}
function handleNewProps() {
if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
return mergedProps;
}
function handleNewState() {
var nextStateProps = mapStateToProps(state, ownProps);
var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);
stateProps = nextStateProps;
if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
return mergedProps;
}
function handleSubsequentCalls(nextState, nextOwnProps) {
var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);
var stateChanged = !areStatesEqual(nextState, state);
state = nextState;
ownProps = nextOwnProps;
if (propsChanged && stateChanged) return handleNewPropsAndNewState();
if (propsChanged) return handleNewProps();
if (stateChanged) return handleNewState();
return mergedProps;
}
return function pureFinalPropsSelector(nextState, nextOwnProps) {
return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);
};
}
// TODO: Add more comments
// If pure is true, the selector returned by selectorFactory will memoize its results,
// allowing connectAdvanced's shouldComponentUpdate to return false if final
// props have not changed. If false, the selector will always return a new
// object and shouldComponentUpdate will always return true.
function finalPropsSelectorFactory(dispatch, _ref2) {
var initMapStateToProps = _ref2.initMapStateToProps,
initMapDispatchToProps = _ref2.initMapDispatchToProps,
initMergeProps = _ref2.initMergeProps,
options = selectorFactory_objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);
var mapStateToProps = initMapStateToProps(dispatch, options);
var mapDispatchToProps = initMapDispatchToProps(dispatch, options);
var mergeProps = initMergeProps(dispatch, options);
if (false) {}
var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;
return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/connect.js
var connect_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 connect_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; }
/*
connect is a facade over connectAdvanced. It turns its args into a compatible
selectorFactory, which has the signature:
(dispatch, options) => (nextState, nextOwnProps) => nextFinalProps
connect passes its args to connectAdvanced as options, which will in turn pass them to
selectorFactory each time a Connect component instance is instantiated or hot reloaded.
selectorFactory returns a final props selector from its mapStateToProps,
mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,
mergePropsFactories, and pure args.
The resulting final props selector is called by the Connect component instance whenever
it receives new props or store state.
*/
function match(arg, factories, name) {
for (var i = factories.length - 1; i >= 0; i--) {
var result = factories[i](arg);
if (result) return result;
}
return function (dispatch, options) {
throw new Error('Invalid value of type ' + typeof arg + ' for ' + name + ' argument when connecting component ' + options.wrappedComponentName + '.');
};
}
function strictEqual(a, b) {
return a === b;
}
// createConnect with default args builds the 'official' connect behavior. Calling it with
// different options opens up some testing and extensibility scenarios
function createConnect() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
_ref$connectHOC = _ref.connectHOC,
connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,
_ref$mapStateToPropsF = _ref.mapStateToPropsFactories,
mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? connect_mapStateToProps : _ref$mapStateToPropsF,
_ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,
mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? connect_mapDispatchToProps : _ref$mapDispatchToPro,
_ref$mergePropsFactor = _ref.mergePropsFactories,
mergePropsFactories = _ref$mergePropsFactor === undefined ? connect_mergeProps : _ref$mergePropsFactor,
_ref$selectorFactory = _ref.selectorFactory,
selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;
return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {
var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
_ref2$pure = _ref2.pure,
pure = _ref2$pure === undefined ? true : _ref2$pure,
_ref2$areStatesEqual = _ref2.areStatesEqual,
areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,
_ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,
areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,
_ref2$areStatePropsEq = _ref2.areStatePropsEqual,
areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,
_ref2$areMergedPropsE = _ref2.areMergedPropsEqual,
areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,
extraOptions = connect_objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);
var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');
var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');
var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');
return connectHOC(selectorFactory, connect_extends({
// used in error messages
methodName: 'connect',
// used to compute Connect's displayName from the wrapped component's displayName.
getDisplayName: function getDisplayName(name) {
return 'Connect(' + name + ')';
},
// if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes
shouldHandleStateChanges: Boolean(mapStateToProps),
// passed through to selectorFactory
initMapStateToProps: initMapStateToProps,
initMapDispatchToProps: initMapDispatchToProps,
initMergeProps: initMergeProps,
pure: pure,
areStatesEqual: areStatesEqual,
areOwnPropsEqual: areOwnPropsEqual,
areStatePropsEqual: areStatePropsEqual,
areMergedPropsEqual: areMergedPropsEqual
}, extraOptions));
};
}
/* harmony default export */ var connect_connect = (createConnect());
// CONCATENATED MODULE: ./node_modules/react-redux/es/index.js
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "Provider", function() { return components_Provider; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "createProvider", function() { return createProvider; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return connectAdvanced; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "connect", function() { return connect_connect; });
/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _JQueryButton = __webpack_require__(138);
var _JQueryButton2 = _interopRequireDefault(_JQueryButton);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _ButtonCell = __webpack_require__(386);
var _ButtonCell2 = _interopRequireDefault(_ButtonCell);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ButtonCell = function (_PureComponent) {
(0, _inherits3.default)(ButtonCell, _PureComponent);
function ButtonCell() {
(0, _classCallCheck3.default)(this, ButtonCell);
return (0, _possibleConstructorReturn3.default)(this, (ButtonCell.__proto__ || Object.getPrototypeOf(ButtonCell)).apply(this, arguments));
}
(0, _createClass3.default)(ButtonCell, [{
key: 'render',
value: function render() {
var _props = this.props,
children = _props.children,
icon = _props.icon,
label = _props.label,
disabled = _props.disabled,
onClick = _props.onClick;
var child = _react2.default.createElement(_JQueryButton2.default, {
disabled: disabled,
icon: icon,
label: label,
onClick: onClick,
text: false });
return _react2.default.createElement(
'td',
{ className: _ButtonCell2.default.buttonCell },
typeof children === 'function' ? children(child) : child
);
}
}]);
return ButtonCell;
}(_react.PureComponent);
ButtonCell.propTypes = {
children: _propTypes2.default.func,
disabled: _propTypes2.default.bool,
icon: _propTypes2.default.string.isRequired,
label: _propTypes2.default.string,
onClick: _propTypes2.default.func.isRequired
};
exports.default = ButtonCell;
/***/ }),
/* 46 */
/***/ (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__(42);
var IObject = __webpack_require__(97);
var toObject = __webpack_require__(25);
var toLength = __webpack_require__(19);
var asc = __webpack_require__(169);
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;
};
};
/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {
// most Object methods by ES6 should accept primitives
var $export = __webpack_require__(1);
var core = __webpack_require__(43);
var fails = __webpack_require__(11);
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);
};
/***/ }),
/* 48 */
/***/ (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);
};
/***/ }),
/* 49 */
/***/ (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;
};
/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(12);
// 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");
};
/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.defaultMemoize = defaultMemoize;
exports.createSelectorCreator = createSelectorCreator;
exports.createStructuredSelector = createStructuredSelector;
function defaultEqualityCheck(a, b) {
return a === b;
}
function areArgumentsShallowlyEqual(equalityCheck, prev, next) {
if (prev === null || next === null || prev.length !== next.length) {
return false;
}
// Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
var length = prev.length;
for (var i = 0; i < length; i++) {
if (!equalityCheck(prev[i], next[i])) {
return false;
}
}
return true;
}
function defaultMemoize(func) {
var equalityCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultEqualityCheck;
var lastArgs = null;
var lastResult = null;
// we reference arguments instead of spreading them for performance reasons
return function () {
if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {
// apply arguments instead of spreading for performance.
lastResult = func.apply(null, arguments);
}
lastArgs = arguments;
return lastResult;
};
}
function getDependencies(funcs) {
var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;
if (!dependencies.every(function (dep) {
return typeof dep === 'function';
})) {
var dependencyTypes = dependencies.map(function (dep) {
return typeof dep;
}).join(', ');
throw new Error('Selector creators expect all input-selectors to be functions, ' + ('instead received the following types: [' + dependencyTypes + ']'));
}
return dependencies;
}
function createSelectorCreator(memoize) {
for (var _len = arguments.length, memoizeOptions = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
memoizeOptions[_key - 1] = arguments[_key];
}
return function () {
for (var _len2 = arguments.length, funcs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
funcs[_key2] = arguments[_key2];
}
var recomputations = 0;
var resultFunc = funcs.pop();
var dependencies = getDependencies(funcs);
var memoizedResultFunc = memoize.apply(undefined, [function () {
recomputations++;
// apply arguments instead of spreading for performance.
return resultFunc.apply(null, arguments);
}].concat(memoizeOptions));
// If a selector is called with the exact same arguments we don't need to traverse our dependencies again.
var selector = defaultMemoize(function () {
var params = [];
var length = dependencies.length;
for (var i = 0; i < length; i++) {
// apply arguments instead of spreading and mutate a local list of params for performance.
params.push(dependencies[i].apply(null, arguments));
}
// apply arguments instead of spreading for performance.
return memoizedResultFunc.apply(null, params);
});
selector.resultFunc = resultFunc;
selector.recomputations = function () {
return recomputations;
};
selector.resetRecomputations = function () {
return recomputations = 0;
};
return selector;
};
}
var createSelector = exports.createSelector = createSelectorCreator(defaultMemoize);
function createStructuredSelector(selectors) {
var selectorCreator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : createSelector;
if (typeof selectors !== 'object') {
throw new Error('createStructuredSelector expects first argument to be an object ' + ('where each property is a selector, instead received a ' + typeof selectors));
}
var objectKeys = Object.keys(selectors);
return selectorCreator(objectKeys.map(function (key) {
return selectors[key];
}), function () {
for (var _len3 = arguments.length, values = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
values[_key3] = arguments[_key3];
}
return values.reduce(function (composition, value, index) {
composition[objectKeys[index]] = value;
return composition;
}, {});
});
}
/***/ }),
/* 52 */
/***/ (function(module, exports, __webpack_require__) {
var Map = __webpack_require__(254);
var $export = __webpack_require__(1);
var shared = __webpack_require__(123)('metadata');
var store = shared.store || (shared.store = new (__webpack_require__(251))());
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
};
/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (__webpack_require__(21)) {
var LIBRARY = __webpack_require__(59);
var global = __webpack_require__(9);
var fails = __webpack_require__(11);
var $export = __webpack_require__(1);
var $typed = __webpack_require__(112);
var $buffer = __webpack_require__(163);
var ctx = __webpack_require__(42);
var anInstance = __webpack_require__(67);
var propertyDesc = __webpack_require__(74);
var hide = __webpack_require__(32);
var redefineAll = __webpack_require__(65);
var toInteger = __webpack_require__(48);
var toLength = __webpack_require__(19);
var toIndex = __webpack_require__(249);
var toAbsoluteIndex = __webpack_require__(71);
var toPrimitive = __webpack_require__(50);
var has = __webpack_require__(38);
var classof = __webpack_require__(95);
var isObject = __webpack_require__(12);
var toObject = __webpack_require__(25);
var isArrayIter = __webpack_require__(172);
var create = __webpack_require__(70);
var getPrototypeOf = __webpack_require__(35);
var gOPN = __webpack_require__(69).f;
var getIterFn = __webpack_require__(170);
var uid = __webpack_require__(73);
var wks = __webpack_require__(13);
var createArrayMethod = __webpack_require__(46);
var createArrayIncludes = __webpack_require__(122);
var speciesConstructor = __webpack_require__(115);
var ArrayIterators = __webpack_require__(167);
var Iterators = __webpack_require__(82);
var $iterDetect = __webpack_require__(118);
var setSpecies = __webpack_require__(68);
var arrayFill = __webpack_require__(168);
var arrayCopyWithin = __webpack_require__(259);
var $DP = __webpack_require__(20);
var $GOPD = __webpack_require__(36);
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 */ };
/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
exports.constructLabel = constructLabel;
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _LabelDescriptionProvider = __webpack_require__(210);
var _LabelDescriptionProvider2 = _interopRequireDefault(_LabelDescriptionProvider);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function constructLabel(entityId, labelDescription, appendEntityId) {
if (!labelDescription || !labelDescription.label) return entityId;
var result = labelDescription.label;
if (appendEntityId) {
result += ' (' + entityId + ')';
}
return result;
}
var EntityLabel = function (_PureComponent) {
(0, _inherits3.default)(EntityLabel, _PureComponent);
function EntityLabel() {
(0, _classCallCheck3.default)(this, EntityLabel);
return (0, _possibleConstructorReturn3.default)(this, (EntityLabel.__proto__ || Object.getPrototypeOf(EntityLabel)).apply(this, arguments));
}
(0, _createClass3.default)(EntityLabel, [{
key: 'render',
value: function render() {
var _props = this.props,
appendEntityId = _props.appendEntityId,
entityId = _props.entityId;
if (!entityId) return null;
return _react2.default.createElement(
_LabelDescriptionProvider2.default,
{ entityId: entityId },
function (labelDescription) {
return constructLabel(entityId, labelDescription, appendEntityId);
}
);
}
}]);
return EntityLabel;
}(_react.PureComponent);
EntityLabel.propTypes = {
appendEntityId: _propTypes2.default.bool,
entityId: _propTypes2.default.string.isRequired
};
EntityLabel.defaultProps = {
appendEntityId: false
};
exports.default = EntityLabel;
/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _defineProperty = __webpack_require__(241);
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;
};
/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(63);
var IE8_DOM_DEFINE = __webpack_require__(240);
var toPrimitive = __webpack_require__(160);
var dP = Object.defineProperty;
exports.f = __webpack_require__(62) ? 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;
};
/***/ }),
/* 57 */
/***/ (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
/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {
// 22.1.3.31 Array.prototype[@@unscopables]
var UNSCOPABLES = __webpack_require__(13)('unscopables');
var ArrayProto = Array.prototype;
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(32)(ArrayProto, UNSCOPABLES, {});
module.exports = function (key) {
ArrayProto[UNSCOPABLES][key] = true;
};
/***/ }),
/* 59 */
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/* 60 */
/***/ (function(module, exports, __webpack_require__) {
var META = __webpack_require__(73)('meta');
var isObject = __webpack_require__(12);
var has = __webpack_require__(38);
var setDesc = __webpack_require__(20).f;
var id = 0;
var isExtensible = Object.isExtensible || function () {
return true;
};
var FREEZE = !__webpack_require__(11)(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
};
/***/ }),
/* 61 */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/* 62 */
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(94)(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/* 63 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(79);
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(57);
var core = __webpack_require__(34);
var ctx = __webpack_require__(161);
var hide = __webpack_require__(80);
var has = __webpack_require__(61);
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;
/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {
var redefine = __webpack_require__(31);
module.exports = function (target, src, safe) {
for (var key in src) redefine(target, key, src[key], safe);
return target;
};
/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {
var ctx = __webpack_require__(42);
var call = __webpack_require__(261);
var isArrayIter = __webpack_require__(172);
var anObject = __webpack_require__(8);
var toLength = __webpack_require__(19);
var getIterFn = __webpack_require__(170);
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;
/***/ }),
/* 67 */
/***/ (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;
};
/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(9);
var dP = __webpack_require__(20);
var DESCRIPTORS = __webpack_require__(21);
var SPECIES = __webpack_require__(13)('species');
module.exports = function (KEY) {
var C = global[KEY];
if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
configurable: true,
get: function () { return this; }
});
};
/***/ }),
/* 69 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__(273);
var hiddenKeys = __webpack_require__(185).concat('length', 'prototype');
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return $keys(O, hiddenKeys);
};
/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(8);
var dPs = __webpack_require__(272);
var enumBugKeys = __webpack_require__(185);
var IE_PROTO = __webpack_require__(186)('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__(188)('iframe');
var i = enumBugKeys.length;
var lt = '<';
var gt = '>';
var iframeDocument;
iframe.style.display = 'none';
__webpack_require__(184).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);
};
/***/ }),
/* 71 */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(48);
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);
};
/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(273);
var enumBugKeys = __webpack_require__(185);
module.exports = Object.keys || function keys(O) {
return $keys(O, enumBugKeys);
};
/***/ }),
/* 73 */
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/* 74 */
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/* 75 */
/***/ (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;
/***/ }),
/* 76 */
/***/ (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.
*
* @typechecks
*
*/
/*eslint-disable no-self-compare */
var hasOwnProperty = Object.prototype.hasOwnProperty;
/**
* 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
*/
function is(x, y) {
// SameValue algorithm
if (x === y) {
// Steps 1-5, 7-10
// Steps 6.b-6.e: +0 != -0
// Added the nonzero y check to make Flow happy, but it is redundant
return x !== 0 || y !== 0 || 1 / x === 1 / y;
} else {
// Step 6.a: NaN == NaN
return x !== x && y !== y;
}
}
/**
* Performs equality by iterating through keys on an object and returning false
* when any key has values which are not strictly equal between the arguments.
* Returns true when the values of all keys are strictly equal.
*/
function shallowEqual(objA, objB) {
if (is(objA, objB)) {
return true;
}
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
return false;
}
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.
for (var i = 0; i < keysA.length; i++) {
if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
return false;
}
}
return true;
}
module.exports = shallowEqual;
/***/ }),
/* 77 */
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(235);
var defined = __webpack_require__(158);
module.exports = function (it) {
return IObject(defined(it));
};
/***/ }),
/* 78 */
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/* 79 */
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/* 80 */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(56);
var createDesc = __webpack_require__(93);
module.exports = __webpack_require__(62) ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/* 81 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(12);
module.exports = function (it, TYPE) {
if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
return it;
};
/***/ }),
/* 82 */
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/* 83 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
var defined = __webpack_require__(49);
var fails = __webpack_require__(11);
var spaces = __webpack_require__(182);
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;
/***/ }),
/* 84 */
/***/ (function(module, exports, __webpack_require__) {
var def = __webpack_require__(20).f;
var has = __webpack_require__(38);
var TAG = __webpack_require__(13)('toStringTag');
module.exports = function (it, tag, stat) {
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};
/***/ }),
/* 85 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _I18nUtils = __webpack_require__(17);
var I18nUtils = _interopRequireWildcard(_I18nUtils);
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 en = {
buttonTitleReferences: 'View and edit references (sources) of the claim',
buttonTitleRemoveQualifier: 'Remove reference property value',
confirmRemoveSnakTemplate: 'Remove reference property „{snakPropertyLabel}“ ({snakPropertyId}) value?',
dialogTitle: 'View and edit references (sources) of the claim — WE-Framework',
dialogButtonAddLabel: 'Add',
dialogButtonAddTitle: 'Add new reference to the list',
dialogButtonCloseLabel: 'Close',
dialogButtonCloseTitle: 'Close the dialog',
dialogLabelAddRecentlyUsed: 'Quick add recently used sources',
placehoderSelect: 'Select property to add to reference'
};
var ru = {
buttonTitleReferences: 'Просмотр и редактирование источников для утверждения',
buttonTitleRemoveQualifier: 'Удалить значение свойства для источника',
confirmRemoveSnakTemplate: 'Удалить значение свойства «{snakPropertyLabel}» ({snakPropertyId}) источника?',
dialogTitle: 'Просмотр и редактирование источников для утверждения — WE-Framework',
dialogButtonAddLabel: 'Добавить',
dialogButtonAddTitle: 'Добавить новую сноску на источник в список',
dialogButtonCloseLabel: 'Закрыть',
dialogButtonCloseTitle: 'Закрыть диалоговое окно',
dialogLabelAddRecentlyUsed: 'Быстрое добавление недавно использованных источников',
placehoderSelect: 'Выберите свойство для добавления к ссылке'
};
var translations = { en: en, ru: ru };
var result = I18nUtils.localize({}, translations);
exports.default = result;
/***/ }),
/* 86 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _CacheValuesProvider = __webpack_require__(136);
var _CacheValuesProvider2 = _interopRequireDefault(_CacheValuesProvider);
var _deepEqual = __webpack_require__(211);
var _deepEqual2 = _interopRequireDefault(_deepEqual);
var _reselect = __webpack_require__(51);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propertyDescriptionCache = __webpack_require__(214);
var _propertyDescriptionCache2 = _interopRequireDefault(_propertyDescriptionCache);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _StringPropertyValuesProvider = __webpack_require__(377);
var _StringPropertyValuesProvider2 = _interopRequireDefault(_StringPropertyValuesProvider);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var EMPTY_ARRAY = [];
var intern = function intern(x) {
return Array.isArray(x) && x.length === 0 ? EMPTY_ARRAY : x;
};
var calcCountryFlags = function calcCountryFlags(countriesCache, countries) {
return intern(countries.map(function (country) {
return countriesCache[country];
}).filter(function (cacheItem) {
return !!cacheItem;
}).flatMap(function (cacheItem) {
return cacheItem.P41 || EMPTY_ARRAY;
}));
};
var calcCountryLanguageIds = function calcCountryLanguageIds(countriesCache, countries) {
return intern(countries.map(function (country) {
return countriesCache[country];
}).filter(function (cacheItem) {
return !!cacheItem;
}).flatMap(function (cacheItem) {
return cacheItem.P37 || EMPTY_ARRAY;
}));
};
var PropertyDescriptionsProvider = function (_PureComponent) {
(0, _inherits3.default)(PropertyDescriptionsProvider, _PureComponent);
function PropertyDescriptionsProvider() {
var _ref;
var _temp, _this, _ret;
(0, _classCallCheck3.default)(this, PropertyDescriptionsProvider);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PropertyDescriptionsProvider.__proto__ || Object.getPrototypeOf(PropertyDescriptionsProvider)).call.apply(_ref, [this].concat(args))), _this), _this.propertyDescriptionMemoizeCache = {}, _this.memoize = (0, _reselect.defaultMemoize)(function (propertyIds, propertyDescriptionCache, countriesCache, languagesCache) {
// TODO: report bug in eslint!
/* eslint no-invalid-this: 0 */
var echancedCache = {};
propertyIds.forEach(function (propertyId) {
var propertyDescription = propertyDescriptionCache[propertyId];
if (propertyDescription == null) return null;
(0, _expect2.default)(propertyDescription).toBeA(_PropertyDescription2.default);
var countryFlags = calcCountryFlags(countriesCache, propertyDescription.countries);
var countryLanguageIds = calcCountryLanguageIds(countriesCache, propertyDescription.countries);
var languageIds = propertyDescription.sourceWebsitesLanguages;
if (!languageIds || languageIds.length === 0) {
languageIds = countryLanguageIds;
}
var languageCodes = intern(languageIds.filter(function (entityId) {
return !!languagesCache[entityId];
}).filter(function (entityId) {
return !!languagesCache[entityId].P424;
}).flatMap(function (entityId) {
return languagesCache[entityId].P424;
}));
var result = (0, _extends3.default)({}, propertyDescription, {
countryFlags: countryFlags,
languageIds: languageIds,
languageCodes: languageCodes
});
Object.setPrototypeOf(result, _PropertyDescription2.default.prototype);
var perPropertyCache = _this.propertyDescriptionMemoizeCache;
var previous = perPropertyCache[propertyId];
if (!!previous && (0, _deepEqual2.default)(previous, result)) {
echancedCache[propertyId] = previous;
} else {
echancedCache[propertyId] = result;
perPropertyCache[propertyId] = result;
}
});
return echancedCache;
}), _this.memoizeAllLanguageIds = (0, _reselect.defaultMemoize)(function (ids1, ids2) {
return intern([].concat((0, _toConsumableArray3.default)(new Set([].concat((0, _toConsumableArray3.default)(ids1), (0, _toConsumableArray3.default)(ids2))))));
}), _this.memoizeAllCountriesLanguageIds = (0, _reselect.defaultMemoize)(function (countriesCache, countries) {
return intern(calcCountryLanguageIds(countriesCache, countries));
}), _this.memoizeCountries = (0, _reselect.defaultMemoize)(function (propertyIds, cache) {
return intern(propertyIds.filter(function (propertyId) {
return !!cache[propertyId];
}).map(function (propertyId) {
return cache[propertyId];
}).flatMap(function (propertyDescription) {
return propertyDescription.countries;
}));
}), _this.memoizeSourceWebsitesLanguages = (0, _reselect.defaultMemoize)(function (propertyIds, cache) {
return intern(propertyIds.filter(function (propertyId) {
return !!cache[propertyId];
}).map(function (propertyId) {
return cache[propertyId];
}).flatMap(function (propertyDescription) {
return propertyDescription.sourceWebsitesLanguages;
}));
}), _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
(0, _createClass3.default)(PropertyDescriptionsProvider, [{
key: 'render',
value: function render() {
var _this2 = this;
var _props = this.props,
children = _props.children,
propertyIds = _props.propertyIds;
return _react2.default.createElement(
_CacheValuesProvider2.default,
{
cache: _propertyDescriptionCache2.default,
cacheKeys: propertyIds },
function (propertyDescriptionCache) {
if (!propertyDescriptionCache) return children(null);
var countries = _this2.memoizeCountries(propertyIds, propertyDescriptionCache);
return _react2.default.createElement(
_StringPropertyValuesProvider2.default,
{ entityIds: countries },
function (countriesCache) {
var countriesOfficialLanguagesIds = _this2.memoizeAllCountriesLanguageIds(countriesCache, countries);
(0, _expect2.default)(countriesOfficialLanguagesIds).toBeAn('array');
var sourceWebsitesLanguagesIds = _this2.memoizeSourceWebsitesLanguages(propertyIds, propertyDescriptionCache);
(0, _expect2.default)(countriesOfficialLanguagesIds).toBeAn('array');
var allLanguageIds = _this2.memoizeAllLanguageIds(countriesOfficialLanguagesIds, sourceWebsitesLanguagesIds);
(0, _expect2.default)(countriesOfficialLanguagesIds).toBeAn('array');
return _react2.default.createElement(
_StringPropertyValuesProvider2.default,
{ entityIds: allLanguageIds },
function (languagesCache) {
return children(_this2.memoize(propertyIds, propertyDescriptionCache, countriesCache, languagesCache));
}
);
}
);
}
);
}
}]);
return PropertyDescriptionsProvider;
}(_react.PureComponent);
PropertyDescriptionsProvider.propTypes = {
children: _propTypes2.default.func.isRequired,
propertyIds: _propTypes2.default.arrayOf(_propTypes2.default.string).isRequired
};
exports.default = PropertyDescriptionsProvider;
/***/ }),
/* 87 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _I18nUtils = __webpack_require__(17);
var en = {
buttonLabelAddQualifier: 'add qualifier',
buttonLabelRemoveQualifier: 'remove qualifier',
confirmRemoveQualifierTemplate: 'Remove the qualifier „{qualifierPropertyLabel}“ ({qualifierPropertyId})' + ' of the property „{claimPropertyLabel}“ ({claimPropertyId})?',
placehoderAutosuggest: 'Enter text to lookup…',
placehoderSelect: 'Select qualifier type…',
optionOther: 'Add other qualifier…',
optionSuffixUnsupported: ' (unsupported)'
};
var ru = {
buttonLabelAddQualifier: 'добавить квалификатор',
buttonLabelRemoveQualifier: 'удалить квалификатор',
confirmRemoveQualifierTemplate: 'Удалить квалификатор «{qualifierPropertyLabel}» ({qualifierPropertyId})' + ' свойства «{claimPropertyLabel}» ({claimPropertyId})?',
placehoderAutosuggest: 'Введите текст для поиска квалификатора…',
placehoderSelect: 'Выберите тип квалификатора…',
optionOther: 'Добавить другой квалификатор…',
optionSuffixUnsupported: ' (не поддерживается)'
};
var translations = { en: en, ru: ru };
var result = (0, _I18nUtils.localize)({}, translations);
exports.default = result;
/***/ }),
/* 88 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function () {
return (startTimestamp + (counter++).toString(36) + performance.now().toString(36).replace(/[^a-z]+/g, '') + Math.random().toString(36).replace(/[^a-z]+/g, '') + Math.random().toString(36).replace(/[^a-z]+/g, '') + Math.random().toString(36).replace(/[^a-z]+/g, '') + Math.random().toString(36).replace(/[^a-z]+/g, '')).substring(0, 40);
};
var counter = 0;
var startTimestamp = Date.now().toString(36);
/***/ }),
/* 89 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _animations = __webpack_require__(383);
var _animations2 = _interopRequireDefault(_animations);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var AnimatedTr = function AnimatedTr(_ref) {
var children = _ref.children,
className = _ref.className,
etc = (0, _objectWithoutProperties3.default)(_ref, ['children', 'className']);
var resultClassName = className ? className + ' ' + _animations2.default.animatedFateIn : _animations2.default.animatedFateIn;
return _react2.default.createElement(
'tr',
(0, _extends3.default)({ className: resultClassName }, etc),
children
);
};
AnimatedTr.propTypes = {
className: _propTypes2.default.string,
children: _propTypes2.default.node
};
exports.default = AnimatedTr;
/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TabShape = exports.SpecialShape = exports.FieldsetShape = exports.FieldShape = exports.EditorShape = exports.ChildrenContainer = undefined;
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ChildrenContainer = exports.ChildrenContainer = {
fields: _propTypes2.default.arrayOf(_propTypes2.default.shape(FieldShape)),
fieldsets: _propTypes2.default.arrayOf(_propTypes2.default.shape(FieldsetShape)),
specials: _propTypes2.default.arrayOf(_propTypes2.default.shape(SpecialShape))
};
var EditorShape = exports.EditorShape = {
dialogTitle: _propTypes2.default.string.isRequired,
linkText: _propTypes2.default.string.isRequired,
tabs: _propTypes2.default.arrayOf(_propTypes2.default.shape(TabShape))
};
var FieldShape = exports.FieldShape = {
property: _propTypes2.default.string.isRequired
};
var FieldsetShape = exports.FieldsetShape = (0, _extends3.default)({
key: _propTypes2.default.string,
labelEntity: _propTypes2.default.string,
labelEntityId: _propTypes2.default.string
}, ChildrenContainer);
var SpecialShape = exports.SpecialShape = {
key: _propTypes2.default.string,
type: _propTypes2.default.string.isRequired
};
var TabShape = exports.TabShape = (0, _extends3.default)({
label: _propTypes2.default.string,
labelEntityId: _propTypes2.default.string,
key: _propTypes2.default.string
}, ChildrenContainer);
/***/ }),
/* 91 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _I18nUtils = __webpack_require__(17);
var en = {
tabGeneral: 'general',
tabBirthAndDeath: 'birth & death',
tabEducationAndScience: 'education & science',
tabMedia: 'media',
externalLinksLinkText: 'WEF: External IDs',
externalLinksDialogTitle: 'External IDs and links — WE-Framework',
frbrEditionLinkText: 'WEF: FRBR Edition',
frbrEditionDialogTitle: 'FRBR Edition data — WE-Framework',
frbrWorkLinkText: 'WEF: FRBR Work',
frbrWorkDialogTitle: 'FRBR Work data — WE-Framework',
personLinkText: 'WEF: Person',
personDialogTitle: 'Person data — WE-Framework',
taxonLinkText: 'WEF: Taxon',
taxonDialogTitle: 'Taxon data — WE-Framework'
};
var fr = {
tabGeneral: 'général',
tabBirthAndDeath: 'naissance et mort',
tabEducationAndScience: 'scolarité et science',
tabMedia: 'images, sons et vidéos',
personLinkText: 'WEF : Biographie',
personDialogTitle: 'Données biographiques — WE-Framework'
};
var ru = {
tabGeneral: 'основное',
tabBirthAndDeath: 'рождение и смерть',
tabEducationAndScience: 'образование и наука',
tabMedia: 'медиа',
externalLinksLinkText: 'WEF: Коды и cсылки',
externalLinksDialogTitle: 'Внешние идентификаторы и ссылки — WE-Framework',
frbrEditionLinkText: 'WEF: FRBR издание',
frbrEditionDialogTitle: 'Свойства издания (FRBR) — WE-Framework',
frbrWorkLinkText: 'WEF: FRBR работа',
frbrWorkDialogTitle: 'Свойства работы (FRBR) — WE-Framework',
personLinkText: 'WEF: Персона',
personDialogTitle: 'Свойства персоны — WE-Framework',
taxonLinkText: 'WEF: Таксон',
taxonDialogTitle: 'Свойства таксона — WE-Framework'
};
var translations = { en: en, fr: fr, ru: ru };
var result = (0, _I18nUtils.localize)({}, translations);
exports.default = result;
/***/ }),
/* 92 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _iterator = __webpack_require__(522);
var _iterator2 = _interopRequireDefault(_iterator);
var _symbol = __webpack_require__(510);
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);
};
/***/ }),
/* 93 */
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/* 94 */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (e) {
return true;
}
};
/***/ }),
/* 95 */
/***/ (function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(41);
var TAG = __webpack_require__(13)('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;
};
/***/ }),
/* 96 */
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(41);
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ }),
/* 98 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(301);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 99 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(333);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 100 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _typeof2 = __webpack_require__(92);
var _typeof3 = _interopRequireDefault(_typeof2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _Shapes = __webpack_require__(18);
var Shapes = _interopRequireWildcard(_Shapes);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = __webpack_require__(0);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var AbstractStringBasedDataValueEditor = function (_PureComponent) {
(0, _inherits3.default)(AbstractStringBasedDataValueEditor, _PureComponent);
function AbstractStringBasedDataValueEditor() {
(0, _classCallCheck3.default)(this, AbstractStringBasedDataValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (AbstractStringBasedDataValueEditor.__proto__ || Object.getPrototypeOf(AbstractStringBasedDataValueEditor)).apply(this, arguments));
_this.handleValueChange = _this.handleValueChange.bind(_this);
return _this;
}
(0, _createClass3.default)(AbstractStringBasedDataValueEditor, [{
key: 'handleValueChange',
value: function handleValueChange(value) {
var _props = this.props,
datavalue = _props.datavalue,
onDataValueChange = _props.onDataValueChange;
if (!(typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) !== 'string' && !value.length != !0) {
onDataValueChange((0, _extends3.default)({}, datavalue, {
type: AbstractStringBasedDataValueEditor.DATAVALUE_TYPE,
value: value
}));
} else {
onDataValueChange(null);
}
}
}]);
return AbstractStringBasedDataValueEditor;
}(_react.PureComponent);
AbstractStringBasedDataValueEditor.DATAVALUE_TYPE = 'string';
AbstractStringBasedDataValueEditor.propTypes = {
/* eslint react/no-unused-prop-types: 0 */
datavalue: _propTypes2.default.shape(Shapes.DataValue),
onDataValueChange: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default),
readOnly: _propTypes2.default.bool
};
AbstractStringBasedDataValueEditor.defaultProps = {
readOnly: false
};
exports.default = AbstractStringBasedDataValueEditor;
/***/ }),
/* 101 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(402).default;
/***/ }),
/* 102 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _AbstractQueuedCache2 = __webpack_require__(103);
var _AbstractQueuedCache3 = _interopRequireDefault(_AbstractQueuedCache2);
var _I18nUtils = __webpack_require__(17);
var _ApiUtils = __webpack_require__(29);
var _LabelDescription = __webpack_require__(436);
var _LabelDescription2 = _interopRequireDefault(_LabelDescription);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var TYPE = 'LABELDESCRIPTIONS';
var LabelDescriptionCache = function (_AbstractQueuedCache) {
(0, _inherits3.default)(LabelDescriptionCache, _AbstractQueuedCache);
function LabelDescriptionCache() {
(0, _classCallCheck3.default)(this, LabelDescriptionCache);
return (0, _possibleConstructorReturn3.default)(this, (LabelDescriptionCache.__proto__ || Object.getPrototypeOf(LabelDescriptionCache)).call(this, TYPE, false, 50));
}
(0, _createClass3.default)(LabelDescriptionCache, [{
key: 'isKeyValid',
value: function isKeyValid(cacheKey) {
return cacheKey.match(/^[PQ](\d+)$/i);
}
}, {
key: 'notifyMessage',
value: function notifyMessage(cacheKeys) {
return 'Fetching ' + cacheKeys.length + ' item(s) labels and descriptions from Wikidata';
}
}, {
key: 'buildRequestPromice',
value: function buildRequestPromice(cacheKeys) {
return (0, _ApiUtils.getWikidataApi)().getPromise({
action: 'wbgetentities',
languages: _I18nUtils.API_PARAMETER_LANGUAGES,
languagefallback: true,
props: 'labels|descriptions',
ids: cacheKeys.join('|')
});
}
}, {
key: 'convertResultToEntities',
value: function convertResultToEntities(result) {
var cacheUpdate = {};
Object.values(result.entities).forEach(function (entity) {
var labelDescription = new _LabelDescription2.default(entity);
cacheUpdate[entity.id] = labelDescription;
});
return cacheUpdate;
}
}]);
return LabelDescriptionCache;
}(_AbstractQueuedCache3.default);
var instance = new LabelDescriptionCache();
exports.default = instance;
/***/ }),
/* 103 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _findByKeysInObjectStore = __webpack_require__(219);
var _findByKeysInObjectStore2 = _interopRequireDefault(_findByKeysInObjectStore);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
var EMPTY_SET = Object.freeze(new Set());
var PAUSE_BEFORE_REQUEUE = 100;
var AbstractQueuedCache = function () {
function AbstractQueuedCache(type, useIndexedDb, maxBatch) {
var _this = this;
(0, _classCallCheck3.default)(this, AbstractQueuedCache);
this.type = type;
this.maxBatch = maxBatch;
this.notifyOptionsInProgress = { autoHide: false, tag: 'WE-F Cache: ' + type };
this.notifyOptionsSuccess = { autoHide: true, tag: 'WE-F Cache: ' + type };
this.notifyOptionsFailure = { autoHide: true, tag: 'WE-F Cache: ' + type };
this.dbQueue = new Set();
this.requestQueue = new Set();
this.queueState = 'WAITING';
this.queueHasNewElements = false;
this.nextBatch = EMPTY_SET;
this.useIndexedDb = useIndexedDb;
this.dbConnection = null;
if (useIndexedDb && indexedDB) {
var dbOpenRequest = indexedDB.open('WEF_CACHE_' + type, 1);
dbOpenRequest.onerror = function (err) {
mw.log.warn('Unable to open indexedDB');
mw.log.warn(err);
};
dbOpenRequest.onsuccess = function () {
console.debug('Successfully open indexedDB connection for database ' + type);
_this.dbConnection = dbOpenRequest.result;
};
dbOpenRequest.onupgradeneeded = function (event) {
var db = event.target.result;
db.createObjectStore('CACHE');
};
}
}
(0, _createClass3.default)(AbstractQueuedCache, [{
key: 'changeState',
value: function changeState(expectedState, newState) {
(0, _expect2.default)(this.queueState).toEqual(expectedState);
this.queueState = newState;
}
}, {
key: 'isKeyValid',
value: function isKeyValid(cacheKey) {
/* eslint no-unused-vars: 0 */
return true;
}
}, {
key: 'enchanceIndexedDbResult',
value: function enchanceIndexedDbResult(cachedValue) {
/* eslint no-unused-vars: 0 */
return cachedValue;
}
}, {
key: 'notifyMessage',
value: function notifyMessage(cacheKeys) {
/* eslint no-unused-vars: 0 */
throw new Error('Child class need to implement notifyMessage( cacheKeys ) function');
}
}, {
key: 'buildRequestPromice',
value: function buildRequestPromice(cacheKeys) {
/* eslint no-unused-vars: 0 */
throw new Error('Child class need to implement buildRequestPromice( cacheKeys ) function');
}
}, {
key: 'convertResultToEntities',
value: function convertResultToEntities(result, cacheKeys) {
/* eslint no-unused-vars: 0 */
throw new Error('Child class need to implement convertResultToEntities( result, cacheKeys ) function');
}
}, {
key: 'getCache',
value: function getCache() {
(0, _expect2.default)(this.getState).toBeA('function', 'Provided getState argument value is not a function');
var data = this.getState()[this.type];
(0, _expect2.default)(data).toBeAn('object', 'Cache not found: ' + this.type);
var cache = data.cache;
(0, _expect2.default)(cache).toBeAn('object', 'Cache not found: ' + this.type);
return cache;
}
}, {
key: 'putToCache',
value: function putToCache(cacheUpdate) {
(0, _expect2.default)(this.dispatch).toBeA('function', 'Provided dispatch argument value is not a function');
(0, _expect2.default)(cacheUpdate).toBeAn('object', 'Provided cacheUpdate argument value is not a function');
this.dispatch({
type: 'CACHE_' + this.type + '_PUT',
cacheUpdate: cacheUpdate
});
}
}, {
key: 'actionQueue',
value: function actionQueue(cacheKeys) {
var _this2 = this;
(0, _expect2.default)(cacheKeys).toBeAn('array');
return function (dispatch, getState) {
(0, _expect2.default)(dispatch).toBeA('function');
(0, _expect2.default)(getState).toBeA('function');
_this2.dispatch = dispatch;
_this2.getState = getState;
var cache = _this2.getCache();
_this2.validateCacheKeys(cacheKeys);
var queued = false;
cacheKeys.forEach(function (cacheKey) {
if (!_this2.dbQueue.has(cacheKey) && !_this2.requestQueue.has(cacheKey) && !_this2.nextBatch.has(cacheKey)) {
_this2.dbQueue.add(cacheKey);
queued = true;
}
});
if (queued && _this2.queueState === 'WAITING') {
_this2.changeState('WAITING', 'SCHEDULED');
setTimeout(function () {
return _this2.checkIfDatabaseScanRequired();
}, PAUSE_BEFORE_REQUEUE);
}
};
}
}, {
key: 'validateCacheKeys',
value: function validateCacheKeys(cacheKeys) {
var _this3 = this;
/* eslint no-undef: 0 */
if (false) {}
}
}, {
key: 'checkIfDatabaseScanRequired',
value: function checkIfDatabaseScanRequired() {
var _this4 = this;
(0, _expect2.default)(this.queueState).toEqual('SCHEDULED');
var data = this.getState()[this.type];
(0, _expect2.default)(data).toBeAn('object', 'Cache not found: ' + this.type);
if (this.dbQueue.size !== 0) {
if (this.dbConnection) {
this.changeState('SCHEDULED', 'SCAN');
this.scanDatabase();
return;
} else {
this.dbQueue.forEach(function (cacheKey) {
return _this4.requestQueue.add(cacheKey);
});
this.dbQueue.clear();
}
}
if (this.requestQueue.size > 0) {
this.changeState('SCHEDULED', 'REQUEST');
this.queueNextBatch();
return;
}
this.changeState('SCHEDULED', 'WAITING');
}
}, {
key: 'scanDatabase',
value: function scanDatabase() {
var _this5 = this;
(0, _expect2.default)(this.queueState).toEqual('SCAN');
var cacheKeys = [].concat((0, _toConsumableArray3.default)(this.dbQueue));
var setCopy = new Set(cacheKeys);
this.scanDatabaseImpl(cacheKeys).finally(function () {
(0, _expect2.default)(_this5.queueState).toEqual('SCAN');
if ([].concat((0, _toConsumableArray3.default)(_this5.dbQueue)).some(function (cacheKey) {
return !setCopy.has(cacheKey);
})) {
// TODO: possible optimization: scan only new keys
_this5.scanDatabase();
} else {
_this5.dbQueue.forEach(function (cacheKey) {
return _this5.requestQueue.add(cacheKey);
});
_this5.dbQueue.clear();
_this5.changeState('SCAN', 'REQUEST');
_this5.queueNextBatch();
}
});
}
}, {
key: 'scanDatabaseImpl',
value: function scanDatabaseImpl(cacheKeys) {
var _this6 = this;
(0, _expect2.default)(cacheKeys).toBeAn('array');
(0, _expect2.default)(this.queueState).toEqual('SCAN');
var transaction = this.dbConnection.transaction(['CACHE'], 'readonly');
var objectStore = transaction.objectStore('CACHE');
return (0, _findByKeysInObjectStore2.default)(objectStore, cacheKeys).then(function (result) {
var keys = Object.keys(result);
if (keys.length > 0) {
var cacheUpdate = {};
keys.forEach(function (cacheKey) {
cacheUpdate[cacheKey] = _this6.enchanceIndexedDbResult(result[cacheKey]);
_this6.dbQueue.delete(cacheKey);
});
_this6.putToCache(cacheUpdate);
_this6.onCacheUpdateFromDatabase(cacheUpdate);
}
}).catch(function (exc) {
mw.log.warn('Unable to get values from indexedDB');
mw.log.warn(exc);
});
}
}, {
key: 'queueNextBatch',
value: function queueNextBatch() {
var _this7 = this;
(0, _expect2.default)(this.queueState).toEqual('REQUEST');
if (this.requestQueue.size === 0) {
this.changeState('REQUEST', 'SCHEDULED');
this.checkIfDatabaseScanRequired();
return;
}
var nextBatch = [].concat((0, _toConsumableArray3.default)(this.requestQueue)).slice(0, Math.min(this.maxBatch, this.requestQueue.size));
// remember so we can check on queue if element in progress of request
this.nextBatch = new Set(nextBatch);
if (this.requestQueue.size >= this.maxBatch) {
nextBatch.forEach(function (item) {
return _this7.requestQueue.delete(item);
});
} else {
this.requestQueue.clear();
}
var notifyMessage = this.notifyMessage(nextBatch);
mw.notify(notifyMessage + '…', this.notifyOptionsInProgress);
return this.buildRequestPromice(nextBatch).then(function (result) {
mw.notify(notifyMessage + '… Success.', _this7.notifyOptionsSuccess);
mw.log('Successfully received ' + nextBatch.length + ' cache ' + _this7.type + ' items: ' + nextBatch);
var cacheUpdate = _this7.convertResultToEntities(result, nextBatch);
(0, _expect2.default)(cacheUpdate).toBeAn('object');
_this7.putToCache(cacheUpdate);
_this7.storeInIndexDb(cacheUpdate);
_this7.onCacheUpdateFromRequest(cacheUpdate);
_this7.nextBatch = EMPTY_SET;
_this7.decideNextAction();
}).catch(function (error) {
mw.notify(notifyMessage + '… Failure. See console log output for details.', _this7.notifyOptionsFailure);
mw.log.error('Unable to batch request following items: ' + nextBatch);
mw.log.error(error);
_this7.nextBatch = EMPTY_SET;
_this7.decideNextAction();
});
}
}, {
key: 'decideNextAction',
value: function decideNextAction() {
var _this8 = this;
(0, _expect2.default)(this.queueState).toEqual('REQUEST');
if (this.queueHasNewElements) {
this.queueHasNewElements = false;
this.changeState('REQUEST', 'SCHEDULED');
setTimeout(function () {
return _this8.dispatch(_this8.actionDbScan());
}, PAUSE_BEFORE_REQUEUE);
} else {
this.queueNextBatch();
}
}
}, {
key: 'storeInIndexDb',
value: function storeInIndexDb(cacheResult) {
if (!this.dbConnection) return;
var objectStore = this.dbConnection.transaction(['CACHE'], 'readwrite').objectStore('CACHE');
Object.keys(cacheResult).forEach(function (cacheKey) {
objectStore.put(cacheResult[cacheKey], cacheKey);
});
}
}, {
key: 'onCacheUpdateFromDatabase',
value: function onCacheUpdateFromDatabase(cacheUpdate) {
/* eslint no-unused-vars: 0 */
}
}, {
key: 'onCacheUpdateFromRequest',
value: function onCacheUpdateFromRequest(cacheUpdate) {
/* eslint no-unused-vars: 0 */
}
}]);
return AbstractQueuedCache;
}();
exports.default = AbstractQueuedCache;
/***/ }),
/* 104 */
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
/***/ }),
/* 105 */
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/* 106 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(236);
var enumBugKeys = __webpack_require__(153);
module.exports = Object.keys || function keys(O) {
return $keys(O, enumBugKeys);
};
/***/ }),
/* 107 */
/***/ (function(module, exports) {
module.exports = true;
/***/ }),
/* 108 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $at = __webpack_require__(520)(true);
// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(238)(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 };
});
/***/ }),
/* 109 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.github.io/proposal-setmap-offrom/
var $export = __webpack_require__(1);
var aFunction = __webpack_require__(27);
var ctx = __webpack_require__(42);
var forOf = __webpack_require__(66);
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);
} });
};
/***/ }),
/* 110 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.github.io/proposal-setmap-offrom/
var $export = __webpack_require__(1);
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);
} });
};
/***/ }),
/* 111 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Forced replacement prototype accessors methods
module.exports = __webpack_require__(59) || !__webpack_require__(11)(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__(9)[K];
});
/***/ }),
/* 112 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(9);
var hide = __webpack_require__(32);
var uid = __webpack_require__(73);
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
};
/***/ }),
/* 113 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(9);
var $export = __webpack_require__(1);
var redefine = __webpack_require__(31);
var redefineAll = __webpack_require__(65);
var meta = __webpack_require__(60);
var forOf = __webpack_require__(66);
var anInstance = __webpack_require__(67);
var isObject = __webpack_require__(12);
var fails = __webpack_require__(11);
var $iterDetect = __webpack_require__(118);
var setToStringTag = __webpack_require__(84);
var inheritIfRequired = __webpack_require__(181);
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;
};
/***/ }),
/* 114 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(9);
var navigator = global.navigator;
module.exports = navigator && navigator.userAgent || '';
/***/ }),
/* 115 */
/***/ (function(module, exports, __webpack_require__) {
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
var anObject = __webpack_require__(8);
var aFunction = __webpack_require__(27);
var SPECIES = __webpack_require__(13)('species');
module.exports = function (O, D) {
var C = anObject(O).constructor;
var S;
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
/***/ }),
/* 116 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var hide = __webpack_require__(32);
var redefine = __webpack_require__(31);
var fails = __webpack_require__(11);
var defined = __webpack_require__(49);
var wks = __webpack_require__(13);
module.exports = function (KEY, length, exec) {
var SYMBOL = wks(KEY);
var fns = exec(defined, SYMBOL, ''[KEY]);
var strfn = fns[0];
var rxfn = fns[1];
if (fails(function () {
var O = {};
O[SYMBOL] = function () { return 7; };
return ''[KEY](O) != 7;
})) {
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); }
);
}
};
/***/ }),
/* 117 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.2.5.3 get RegExp.prototype.flags
var anObject = __webpack_require__(8);
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.unicode) result += 'u';
if (that.sticky) result += 'y';
return result;
};
/***/ }),
/* 118 */
/***/ (function(module, exports, __webpack_require__) {
var ITERATOR = __webpack_require__(13)('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;
};
/***/ }),
/* 119 */
/***/ (function(module, exports, __webpack_require__) {
// 7.2.8 IsRegExp(argument)
var isObject = __webpack_require__(12);
var cof = __webpack_require__(41);
var MATCH = __webpack_require__(13)('match');
module.exports = function (it) {
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};
/***/ }),
/* 120 */
/***/ (function(module, exports, __webpack_require__) {
// 7.2.2 IsArray(argument)
var cof = __webpack_require__(41);
module.exports = Array.isArray || function isArray(arg) {
return cof(arg) == 'Array';
};
/***/ }),
/* 121 */
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/* 122 */
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__(37);
var toLength = __webpack_require__(19);
var toAbsoluteIndex = __webpack_require__(71);
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;
};
};
/***/ }),
/* 123 */
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__(43);
var global = __webpack_require__(9);
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__(59) ? 'pure' : 'global',
copyright: '© 2018 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/* 124 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return bindActionCreators; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return applyMiddleware; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__DO_NOT_USE__ActionTypes", function() { return ActionTypes; });
/* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(190);
/**
* 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' + Math.random().toString(36).substring(7).split('').join('.'),
REPLACE: '@@redux/REPLACE' + Math.random().toString(36).substring(7).split('').join('.')
};
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;
};
/**
* @param {any} obj The object to inspect.
* @returns {boolean} True if the argument appears to be a plain object.
*/
function isPlainObject(obj) {
if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) return false;
var proto = obj;
while (Object.getPrototypeOf(proto) !== null) {
proto = Object.getPrototypeOf(proto);
}
return Object.getPrototypeOf(obj) === proto;
}
/**
* 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() {
if (isDispatching) {
throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
}
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 the listener to be a function.');
}
if (isDispatching) {
throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
}
var isSubscribed = true;
ensureCanMutateNextListeners();
nextListeners.push(listener);
return function unsubscribe() {
if (!isSubscribed) {
return;
}
if (isDispatching) {
throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
}
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 (!isPlainObject(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.REPLACE });
}
/**
* 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 === 'undefined' ? 'undefined' : _typeof(observer)) !== 'object' || observer === null) {
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[symbol_observable__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]] = 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[symbol_observable__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]] = observable, _ref2;
}
/**
* 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);
} catch (e) {} // eslint-disable-line no-empty
}
function getUndefinedStateErrorMessage(key, action) {
var actionType = action && action.type;
var actionDescription = actionType && 'action "' + String(actionType) + '"' || 'an action';
return 'Given ' + actionDescription + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';
}
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
var reducerKeys = Object.keys(reducers);
var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
if (reducerKeys.length === 0) {
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
}
if (!isPlainObject(inputState)) {
return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
}
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
});
unexpectedKeys.forEach(function (key) {
unexpectedKeyCache[key] = true;
});
if (action && action.type === ActionTypes.REPLACE) return;
if (unexpectedKeys.length > 0) {
return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
}
}
function assertReducerShape(reducers) {
Object.keys(reducers).forEach(function (key) {
var reducer = reducers[key];
var initialState = reducer(undefined, { type: ActionTypes.INIT });
if (typeof initialState === 'undefined') {
throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');
}
var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
if (typeof reducer(undefined, { type: type }) === 'undefined') {
throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');
}
});
}
/**
* Turns an object whose values are different reducer functions, into a single
* reducer function. It will call every child reducer, and gather their results
* into a single state object, whose keys correspond to the keys of the passed
* reducer functions.
*
* @param {Object} reducers An object whose values correspond to different
* reducer functions that need to be combined into one. One handy way to obtain
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
* undefined for any action. Instead, they should return their initial state
* if the state passed to them was undefined, and the current state for any
* unrecognized action.
*
* @returns {Function} A reducer function that invokes every reducer inside the
* passed object, and builds a state object with the same shape.
*/
function combineReducers(reducers) {
var reducerKeys = Object.keys(reducers);
var finalReducers = {};
for (var i = 0; i < reducerKeys.length; i++) {
var key = reducerKeys[i];
if (false) {}
if (typeof reducers[key] === 'function') {
finalReducers[key] = reducers[key];
}
}
var finalReducerKeys = Object.keys(finalReducers);
var unexpectedKeyCache = void 0;
if (false) {}
var shapeAssertionError = void 0;
try {
assertReducerShape(finalReducers);
} catch (e) {
shapeAssertionError = e;
}
return function combination() {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var action = arguments[1];
if (shapeAssertionError) {
throw shapeAssertionError;
}
if (false) { var warningMessage; }
var hasChanged = false;
var nextState = {};
for (var _i = 0; _i < finalReducerKeys.length; _i++) {
var _key = finalReducerKeys[_i];
var reducer = finalReducers[_key];
var previousStateForKey = state[_key];
var nextStateForKey = reducer(previousStateForKey, action);
if (typeof nextStateForKey === 'undefined') {
var errorMessage = getUndefinedStateErrorMessage(_key, action);
throw new Error(errorMessage);
}
nextState[_key] = nextStateForKey;
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
}
return hasChanged ? nextState : state;
};
}
function bindActionCreator(actionCreator, dispatch) {
return function () {
return dispatch(actionCreator.apply(this, arguments));
};
}
/**
* Turns an object whose values are action creators, into an object with the
* same keys, but with every function wrapped into a `dispatch` call so they
* may be invoked directly. This is just a convenience method, as you can call
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
*
* For convenience, you can also pass a single function as the first argument,
* and get a function in return.
*
* @param {Function|Object} actionCreators An object whose values are action
* creator functions. One handy way to obtain it is to use ES6 `import * as`
* syntax. You may also pass a single function.
*
* @param {Function} dispatch The `dispatch` function available on your Redux
* store.
*
* @returns {Function|Object} The object mimicking the original object, but with
* every action creator wrapped into the `dispatch` call. If you passed a
* function as `actionCreators`, the return value will also be a single
* function.
*/
function bindActionCreators(actionCreators, dispatch) {
if (typeof actionCreators === 'function') {
return bindActionCreator(actionCreators, dispatch);
}
if ((typeof actionCreators === 'undefined' ? 'undefined' : _typeof(actionCreators)) !== 'object' || actionCreators === null) {
throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators === 'undefined' ? 'undefined' : _typeof(actionCreators)) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
}
var keys = Object.keys(actionCreators);
var boundActionCreators = {};
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var actionCreator = actionCreators[key];
if (typeof actionCreator === 'function') {
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
}
}
return boundActionCreators;
}
/**
* 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));
};
});
}
/**
* Creates a store enhancer that applies middleware to the dispatch method
* of the Redux store. This is handy for a variety of tasks, such as expressing
* asynchronous actions in a concise manner, or logging every action payload.
*
* See `redux-thunk` package as an example of the Redux middleware.
*
* Because middleware is potentially asynchronous, this should be the first
* store enhancer in the composition chain.
*
* Note that each middleware will be given the `dispatch` and `getState` functions
* as named arguments.
*
* @param {...Function} middlewares The middleware chain to be applied.
* @returns {Function} A store enhancer applying the middleware.
*/
function applyMiddleware() {
for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
middlewares[_key] = arguments[_key];
}
return function (createStore) {
return function () {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
var store = createStore.apply(undefined, args);
var _dispatch = function dispatch() {
throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
};
var middlewareAPI = {
getState: store.getState,
dispatch: function dispatch() {
return _dispatch.apply(undefined, arguments);
}
};
var chain = middlewares.map(function (middleware) {
return middleware(middlewareAPI);
});
_dispatch = compose.apply(undefined, chain)(store.dispatch);
return _extends({}, store, {
dispatch: _dispatch
});
};
};
}
/*
* 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 (false) {}
/***/ }),
/* 125 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function checkDCE() {
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
) {
return;
}
if (false) {}
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 (true) {
// DCE check should happen before ReactDOM bundle executes so that
// DevTools can report bad minification during injection.
checkDCE();
module.exports = __webpack_require__(462);
} else {}
/***/ }),
/* 126 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
(function (global, factory) {
true ? module.exports = factory() :
undefined;
}(this, (function () {
'use strict';
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);
return 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;
};
})));
/***/ }),
/* 127 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(277);
/* 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 {}
var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
/* harmony default export */ __webpack_exports__["a"] = (result);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(75), __webpack_require__(222)(module)))
/***/ }),
/* 128 */
/***/ (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.
*/
/**
* 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 (false) {}
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;
/***/ }),
/* 129 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _Shapes = __webpack_require__(18);
var Shapes = _interopRequireWildcard(_Shapes);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _SelectSnakTypeButtonCell = __webpack_require__(310);
var _SelectSnakTypeButtonCell2 = _interopRequireDefault(_SelectSnakTypeButtonCell);
var _SnakValueEditorFactory = __webpack_require__(135);
var _SnakValueEditorFactory2 = _interopRequireDefault(_SnakValueEditorFactory);
var _core3 = __webpack_require__(33);
var _core4 = _interopRequireDefault(_core3);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var NotAValueSnakReplacementCell = function NotAValueSnakReplacementCell(_ref) {
var onClick = _ref.onClick,
snaktype = _ref.snaktype;
return _react2.default.createElement(
'td',
{ colSpan: _SnakValueEditorFactory2.default.TABLE_COLUMNS, title: _core2.default.snakTypeTitle[snaktype] },
_react2.default.createElement(
'span',
{ className: _core4.default.wef_snak_replacement_label, onClick: onClick },
_core2.default.snakType[snaktype]
)
);
};
NotAValueSnakReplacementCell.propTypes = {
onClick: _propTypes2.default.func,
snaktype: _propTypes2.default.string
};
NotAValueSnakReplacementCell.defautPropTypes = {
snaktype: 'value'
};
var SnakEditorTableRowPart = function (_PureComponent) {
(0, _inherits3.default)(SnakEditorTableRowPart, _PureComponent);
function SnakEditorTableRowPart() {
(0, _classCallCheck3.default)(this, SnakEditorTableRowPart);
var _this = (0, _possibleConstructorReturn3.default)(this, (SnakEditorTableRowPart.__proto__ || Object.getPrototypeOf(SnakEditorTableRowPart)).apply(this, arguments));
_this.handleSnakTypeChange = _this.handleSnakTypeChange.bind(_this);
return _this;
}
(0, _createClass3.default)(SnakEditorTableRowPart, [{
key: 'handleSnakTypeChange',
value: function handleSnakTypeChange(snaktype) {
var onSnakChange = this.props.onSnakChange;
if (onSnakChange) {
onSnakChange((0, _extends3.default)({}, this.props.snak, {
snaktype: snaktype
}));
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
onSnakChange = _props.onSnakChange,
propertyDescription = _props.propertyDescription,
readOnly = _props.readOnly,
snak = _props.snak;
if (readOnly) {
return snak.snaktype === 'value' ? _react2.default.createElement(
_react2.default.Fragment,
null,
_react2.default.createElement('td', null),
_react2.default.createElement(_SnakValueEditorFactory2.default, {
className: _core4.default.wef_snak_replacement_label,
onSnakChange: onSnakChange,
propertyDescription: propertyDescription,
readOnly: true,
snak: snak })
) : _react2.default.createElement(
_react2.default.Fragment,
null,
_react2.default.createElement('td', null),
_react2.default.createElement(NotAValueSnakReplacementCell, { snaktype: snak.snaktype })
);
}
return [_react2.default.createElement(_SelectSnakTypeButtonCell2.default, {
key: 'snaktype',
onChange: this.handleSnakTypeChange,
value: snak.snaktype }), snak.snaktype === 'value' ? _react2.default.createElement(_SnakValueEditorFactory2.default, {
key: 'valueEditor',
onSnakChange: onSnakChange,
propertyDescription: propertyDescription,
snak: snak }) : _react2.default.createElement(NotAValueSnakReplacementCell, {
key: 'valueEditor',
snaktype: snak.snaktype })];
}
}]);
return SnakEditorTableRowPart;
}(_react.PureComponent);
SnakEditorTableRowPart.TABLE_COLUMNS = _SnakValueEditorFactory2.default.TABLE_COLUMNS + 1;
SnakEditorTableRowPart.propTypes = {
onSnakChange: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default).isRequired,
readOnly: _propTypes2.default.bool,
snak: _propTypes2.default.shape(Shapes.Snak)
};
SnakEditorTableRowPart.defaultProps = {
snak: {
snaktype: 'value'
},
readOnly: false
};
exports.default = SnakEditorTableRowPart;
/***/ }),
/* 130 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(321);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 131 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _AutocompleteMode = __webpack_require__(324);
var _AutocompleteMode2 = _interopRequireDefault(_AutocompleteMode);
var _Shapes = __webpack_require__(18);
var _EntityLabel = __webpack_require__(54);
var _EntityLabel2 = _interopRequireDefault(_EntityLabel);
var _GoToWikidataButtonCell = __webpack_require__(319);
var _GoToWikidataButtonCell2 = _interopRequireDefault(_GoToWikidataButtonCell);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _SelectMode = __webpack_require__(318);
var _SelectMode2 = _interopRequireDefault(_SelectMode);
var _WikibaseItem = __webpack_require__(130);
var _WikibaseItem2 = _interopRequireDefault(_WikibaseItem);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var WikibaseItemDataValueEditor = function (_PureComponent) {
(0, _inherits3.default)(WikibaseItemDataValueEditor, _PureComponent);
function WikibaseItemDataValueEditor() {
(0, _classCallCheck3.default)(this, WikibaseItemDataValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (WikibaseItemDataValueEditor.__proto__ || Object.getPrototypeOf(WikibaseItemDataValueEditor)).apply(this, arguments));
_this.state = {
selectMode: _SelectMode2.default.isCompatibleWithProps(_this.props)
};
_this.handleOtherSelect = function () {
return _this.setState({ selectMode: false });
};
return _this;
}
(0, _createClass3.default)(WikibaseItemDataValueEditor, [{
key: 'render',
value: function render() {
var _props = this.props,
datavalue = _props.datavalue,
readOnly = _props.readOnly,
etc = (0, _objectWithoutProperties3.default)(_props, ['datavalue', 'readOnly']);
var currentValue = ((datavalue || {}).value || {}).id || '';
var className = _WikibaseItem2.default['wef_datavalue_' + WikibaseItemDataValueEditor.DATATYPE];
if (readOnly) {
return _react2.default.createElement(
'td',
{
className: className + ' ' + _WikibaseItem2.default['wef_datavalue_' + WikibaseItemDataValueEditor.DATATYPE + '_readonly'],
colSpan: 12 },
currentValue && _react2.default.createElement(
'a',
{ href: 'https://www.wikidata.org/wiki/' + currentValue },
_react2.default.createElement(_EntityLabel2.default, { entityId: currentValue })
)
);
}
var selectMode = this.state.selectMode;
return _react2.default.createElement(
_react2.default.Fragment,
null,
_react2.default.createElement(
'td',
{ className: className, colSpan: 11 },
selectMode ? _react2.default.createElement(_SelectMode2.default, (0, _extends3.default)({ datavalue: datavalue, onOtherSelect: this.handleOtherSelect }, etc)) : _react2.default.createElement(_AutocompleteMode2.default, (0, _extends3.default)({ datavalue: datavalue }, etc))
),
_react2.default.createElement(_GoToWikidataButtonCell2.default, { entityId: currentValue })
);
}
}]);
return WikibaseItemDataValueEditor;
}(_react.PureComponent);
WikibaseItemDataValueEditor.DATATYPE = 'wikibase-item';
WikibaseItemDataValueEditor.DATAVALUE_TYPE = 'wikibase-entityid';
WikibaseItemDataValueEditor.propTypes = {
datavalue: _propTypes2.default.shape(_Shapes.DataValue),
onDataValueChange: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default),
readOnly: _propTypes2.default.bool
};
WikibaseItemDataValueEditor.defaultProps = {
readOnly: false
};
exports.default = WikibaseItemDataValueEditor;
/***/ }),
/* 132 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(125);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
/*!
* reactjs-popup v1.1.1
* (c) 2018-present Youssouf EL AZIZI <[email protected]>
* Released under the MIT License.
*/
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 _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 _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,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
function _possibleConstructorReturn(self, call) {
if (call && (typeof call === "object" || typeof call === "function")) {
return call;
}
return _assertThisInitialized(self);
}
/* Algo to calculate position
1. center position for popup content : the center of the trigger will be the center of the content content
so the popup content position will be like this :
top => the y of the center for the trigger element : trigger.top + trigger.height/2
left => the x of the center for the trigger element : trigger.left + trigger.width/2
2. translate position according to the first position attribute passed in the function argument
for example :
position = 'left top'
we need to handle the first argument in the position: 'left' => that's mean we need to translate the popup content according to the X axis by - content.width/2
3.translate position according to the first position attribute passed in the function argument
for example :
position = 'left top'
the second argument 'top' => translate popup content by + content.height*4/5
*/
function calculatePosition(triggerBounding, ContentBounding, position, arrow, offset) {
var margin = arrow ? 8 : 0;
var MarginX = margin + offset.offsetX;
var MarginY = margin + offset.offsetY;
var args = position.split(" "); // the step N 1 : center the popup content => ok
var CenterTop = triggerBounding.top + triggerBounding.height / 2;
var CenterLeft = triggerBounding.left + triggerBounding.width / 2;
var height = ContentBounding.height,
width = ContentBounding.width;
var top = CenterTop - height / 2;
var left = CenterLeft - width / 2;
var transform = "";
var arrowTop = "0%";
var arrowLeft = "0%"; // the step N 2 : => ok
switch (args[0]) {
case "top":
top -= height / 2 + triggerBounding.height / 2 + MarginY;
transform = "rotate(45deg)";
arrowTop = "100%";
arrowLeft = "50%";
break;
case "bottom":
top += height / 2 + triggerBounding.height / 2 + MarginY;
transform = "rotate(225deg)";
arrowLeft = "50%";
break;
case "left":
left -= width / 2 + triggerBounding.width / 2 + MarginX;
transform = " rotate(-45deg)";
arrowLeft = "100%";
arrowTop = "50%";
break;
case "right":
left += width / 2 + triggerBounding.width / 2 + MarginX;
transform = "rotate(135deg)";
arrowTop = "50%";
break;
}
switch (args[1]) {
case "top":
top = triggerBounding.top;
arrowTop = triggerBounding.height / 2 + "px";
break;
case "bottom":
top = triggerBounding.top - height + triggerBounding.height;
arrowTop = height - triggerBounding.height / 2 + "px";
break;
case "left":
left = triggerBounding.left;
arrowLeft = triggerBounding.width / 2 + "px";
break;
case "right":
left = triggerBounding.left - width + triggerBounding.width;
arrowLeft = width - triggerBounding.width / 2 + "px";
break;
}
return {
top: top,
left: left,
transform: transform,
arrowLeft: arrowLeft,
arrowTop: arrowTop
};
}
var styles = {
popupContent: {
tooltip: {
position: "absolute",
zIndex: "2",
width: "200px",
background: "rgb(255, 255, 255)",
border: "1px solid rgb(187, 187, 187)",
boxShadow: "rgba(0, 0, 0, 0.2) 0px 1px 3px",
padding: "5px"
},
modal: {
position: "relative",
background: "rgb(255, 255, 255)",
width: "50%",
margin: "auto",
border: "1px solid rgb(187, 187, 187)",
padding: "5px"
}
},
popupArrow: {
height: "10px",
width: "10px",
position: "absolute",
background: "rgb(255, 255, 255)",
transform: "rotate(45deg)",
margin: "-5px",
zIndex: "-1",
boxShadow: "rgba(0, 0, 0, 0.2) 1px 1px 1px"
},
overlay: {
tooltip: {
position: "fixed",
top: "0",
bottom: "0",
left: "0",
right: "0"
},
modal: {
position: "fixed",
top: "0",
bottom: "0",
left: "0",
right: "0",
background: "rgba(0, 0, 0,0.5)",
display: "flex",
zIndex: "999"
}
}
};
var Popup =
/*#__PURE__*/
function (_React$PureComponent) {
_inherits(Popup, _React$PureComponent);
function Popup(props) {
var _this;
_classCallCheck(this, Popup);
_this = _possibleConstructorReturn(this, (Popup.__proto__ || Object.getPrototypeOf(Popup)).call(this, props));
Object.defineProperty(_assertThisInitialized(_this), "state", {
configurable: true,
enumerable: true,
writable: true,
value: {
isOpen: _this.props.open || _this.props.defaultOpen,
modal: _this.props.modal ? true : !_this.props.trigger // we create this modal state because the popup can't be a tooltip if the trigger prop doesn't existe
}
});
Object.defineProperty(_assertThisInitialized(_this), "lockScroll", {
configurable: true,
enumerable: true,
writable: true,
value: function value() {
if (_this.state.modal && _this.props.lockScroll) document.getElementsByTagName("body")[0].style.overflow = "hidden";
}
});
Object.defineProperty(_assertThisInitialized(_this), "resetScroll", {
configurable: true,
enumerable: true,
writable: true,
value: function value() {
if (_this.state.modal && _this.props.lockScroll) document.getElementsByTagName("body")[0].style.overflow = "auto";
}
});
Object.defineProperty(_assertThisInitialized(_this), "togglePopup", {
configurable: true,
enumerable: true,
writable: true,
value: function value() {
if (_this.state.isOpen) _this.closePopup();else _this.openPopup();
}
});
Object.defineProperty(_assertThisInitialized(_this), "openPopup", {
configurable: true,
enumerable: true,
writable: true,
value: function value() {
if (_this.state.isOpen) return;
_this.setState({
isOpen: true
}, function () {
_this.setPosition();
_this.props.onOpen();
_this.lockScroll();
});
}
});
Object.defineProperty(_assertThisInitialized(_this), "closePopup", {
configurable: true,
enumerable: true,
writable: true,
value: function value() {
if (!_this.state.isOpen) return;
_this.setState({
isOpen: false
}, function () {
_this.props.onClose();
_this.resetScroll();
});
}
});
Object.defineProperty(_assertThisInitialized(_this), "onMouseEnter", {
configurable: true,
enumerable: true,
writable: true,
value: function value() {
clearTimeout(_this.timeOut);
var mouseEnterDelay = _this.props.mouseEnterDelay;
_this.timeOut = setTimeout(function () {
return _this.openPopup();
}, mouseEnterDelay);
}
});
Object.defineProperty(_assertThisInitialized(_this), "onMouseLeave", {
configurable: true,
enumerable: true,
writable: true,
value: function value() {
clearTimeout(_this.timeOut);
var mouseLeaveDelay = _this.props.mouseLeaveDelay;
_this.timeOut = setTimeout(function () {
return _this.closePopup();
}, mouseLeaveDelay);
}
});
Object.defineProperty(_assertThisInitialized(_this), "setPosition", {
configurable: true,
enumerable: true,
writable: true,
value: function value() {
var _this$props = _this.props,
arrow = _this$props.arrow,
position = _this$props.position,
offsetX = _this$props.offsetX,
offsetY = _this$props.offsetY;
var modal = _this.state.modal;
if (modal) return;
var helper = _this.HelperEl.getBoundingClientRect();
var trigger = _this.TriggerEl.getBoundingClientRect();
var content = _this.ContentEl.getBoundingClientRect();
var cords = calculatePosition(trigger, content, position, arrow, {
offsetX: offsetX,
offsetY: offsetY
});
_this.ContentEl.style.top = cords.top - helper.top + "px";
_this.ContentEl.style.left = cords.left - helper.left + "px";
if (arrow) {
_this.ArrowEl.style["transform"] = cords.transform;
_this.ArrowEl.style["-ms-transform"] = cords.transform;
_this.ArrowEl.style["-webkit-transform"] = cords.transform;
_this.ArrowEl.style.top = cords.arrowTop;
_this.ArrowEl.style.left = cords.arrowLeft;
}
if (window.getComputedStyle(_this.TriggerEl, null).getPropertyValue("position") == "static" || window.getComputedStyle(_this.TriggerEl, null).getPropertyValue("position") == "") _this.TriggerEl.style.position = "relative";
}
});
Object.defineProperty(_assertThisInitialized(_this), "addWarperAction", {
configurable: true,
enumerable: true,
writable: true,
value: function value() {
var _this$props2 = _this.props,
contentStyle = _this$props2.contentStyle,
className = _this$props2.className,
on = _this$props2.on;
var modal = _this.state.modal;
var popupContentStyle = modal ? styles.popupContent.modal : styles.popupContent.tooltip;
var childrenElementProps = {
className: "popup-content ".concat(className),
style: Object.assign({}, popupContentStyle, contentStyle),
ref: _this.setContentRef,
onClick: function onClick(e) {
e.stopPropagation();
}
};
if (!modal && on.indexOf("hover") >= 0) {
childrenElementProps.onMouseEnter = _this.onMouseEnter;
childrenElementProps.onMouseLeave = _this.onMouseLeave;
}
return childrenElementProps;
}
});
Object.defineProperty(_assertThisInitialized(_this), "renderTrigger", {
configurable: true,
enumerable: true,
writable: true,
value: function value() {
var triggerProps = {
key: "T"
};
var _this$props3 = _this.props,
on = _this$props3.on,
trigger = _this$props3.trigger;
var onAsArray = Array.isArray(on) ? on : [on];
for (var i = 0, len = onAsArray.length; i < len; i++) {
switch (onAsArray[i]) {
case "click":
triggerProps.onClick = _this.togglePopup;
break;
case "hover":
triggerProps.onMouseEnter = _this.onMouseEnter;
triggerProps.onMouseLeave = _this.onMouseLeave;
case "focus":
triggerProps.onFocus = _this.onMouseEnter;
break;
}
}
if (typeof trigger === "function") return react__WEBPACK_IMPORTED_MODULE_0___default.a.cloneElement(trigger(_this.state.isOpen), triggerProps);
return react__WEBPACK_IMPORTED_MODULE_0___default.a.cloneElement(trigger, triggerProps);
}
});
Object.defineProperty(_assertThisInitialized(_this), "renderContent", {
configurable: true,
enumerable: true,
writable: true,
value: function value() {
var _this$props4 = _this.props,
arrow = _this$props4.arrow,
arrowStyle = _this$props4.arrowStyle;
var modal = _this.state.modal;
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", _extends({}, _this.addWarperAction(), {
key: "C"
}), arrow && !modal && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
ref: _this.setArrowRef,
style: Object.assign({}, styles.popupArrow, arrowStyle)
}), typeof _this.props.children === "function" ? _this.props.children(_this.closePopup, _this.state.isOpen) : _this.props.children);
}
});
_this.setTriggerRef = function (r) {
return _this.TriggerEl = r;
};
_this.setContentRef = function (r) {
return _this.ContentEl = r;
};
_this.setArrowRef = function (r) {
return _this.ArrowEl = r;
};
_this.setHelperRef = function (r) {
return _this.HelperEl = r;
};
_this.timeOut = 0;
return _this;
}
_createClass(Popup, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this2 = this;
var _props = this.props,
closeOnEscape = _props.closeOnEscape,
defaultOpen = _props.defaultOpen;
if (defaultOpen) this.setPosition();
if (closeOnEscape) {
window.addEventListener("keyup", function (e) {
if (e.key === "Escape") _this2.closePopup();
});
}
}
}, {
key: "componentWillReceiveProps",
value: function componentWillReceiveProps(nextProps) {
if (this.props.open === nextProps.open) return;
if (nextProps.open) this.openPopup();else this.closePopup();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
// kill any function to execute if the component is unmounted
clearTimeout(this.timeOut);
}
}, {
key: "render",
value: function render() {
var _props2 = this.props,
overlayStyle = _props2.overlayStyle,
closeOnDocumentClick = _props2.closeOnDocumentClick,
on = _props2.on;
var modal = this.state.modal;
var overlay = this.state.isOpen && !(on.indexOf("hover") >= 0);
var ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip;
return [this.state.isOpen && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
key: "H",
style: {
position: "absolute",
top: "0px",
left: "0px"
},
ref: this.setHelperRef
}), overlay && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
key: "O",
className: "popup-overlay",
style: Object.assign({}, ovStyle, overlayStyle),
onClick: closeOnDocumentClick ? this.closePopup : undefined
}, modal && this.renderContent()), this.state.isOpen && !modal && this.renderContent(), !!this.props.trigger && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Ref, {
innerRef: this.setTriggerRef,
key: "R"
}, this.renderTrigger())];
}
}]);
return Popup;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.PureComponent);
Object.defineProperty(Popup, "defaultProps", {
configurable: true,
enumerable: true,
writable: true,
value: {
children: function children() {
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, " Your Content Here !!");
},
trigger: null,
onOpen: function onOpen() {},
onClose: function onClose() {},
defaultOpen: false,
open: false,
closeOnDocumentClick: true,
closeOnEscape: true,
on: ["click"],
contentStyle: {},
arrowStyle: {},
overlayStyle: {},
className: "",
position: "bottom center",
modal: false,
lockScroll: false,
arrow: true,
offsetX: 0,
offsetY: 0,
mouseEnterDelay: 100,
mouseLeaveDelay: 100
}
});
if (false) { var PropTypes; }
var Ref =
/*#__PURE__*/
function (_React$PureComponent2) {
_inherits(Ref, _React$PureComponent2);
function Ref(props) {
_classCallCheck(this, Ref);
return _possibleConstructorReturn(this, (Ref.__proto__ || Object.getPrototypeOf(Ref)).call(this, props));
}
_createClass(Ref, [{
key: "componentDidMount",
value: function componentDidMount() {
var innerRef = this.props.innerRef;
if (innerRef) innerRef(Object(react_dom__WEBPACK_IMPORTED_MODULE_1__["findDOMNode"])(this));
}
}, {
key: "render",
value: function render() {
var children = this.props.children;
return react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.only(children);
}
}]);
return Ref;
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.PureComponent);
/* harmony default export */ __webpack_exports__["default"] = (Popup);
/***/ }),
/* 133 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _I18nUtils = __webpack_require__(17);
var I18nUtils = _interopRequireWildcard(_I18nUtils);
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 en = {
calendarModel: {
'http://www.wikidata.org/entity/Q1985786': 'Julian',
'http://www.wikidata.org/entity/Q1985727': 'Gregorian'
},
labelPrecision: 'precision',
labelCalendar: 'calendar',
labelSetManually: 'set manually',
labelWillBeDisplayedAs: 'will be displayed as:',
precision: ['1 Gigayear', '100 Megayears', '10 Megayears', 'Megayear', '100 Kiloyears', '10 Kiloyears', 'Kiloyear', '100 years', '10 years', 'year', 'month', 'day', 'hour', 'minute', 'second']
};
var ru = {
calendarModel: {
'http://www.wikidata.org/entity/Q1985786': 'Юлианский',
'http://www.wikidata.org/entity/Q1985727': 'Грегорианский'
},
labelPrecision: 'точность',
labelCalendar: 'календарь',
labelSetManually: 'установить вручную',
labelWillBeDisplayedAs: 'будет отображаться как:',
precision: ['гигагод', '100 мегалет', '10 мегалет', 'мегагод', '100 килолет', '10 килолет', 'килогод', 'век', '10 лет', 'год', 'месяц', 'день', 'час', 'минута', 'секунда']
};
var translations = { en: en, ru: ru };
var result = I18nUtils.localize({}, translations);
exports.default = result;
/***/ }),
/* 134 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(373);
/***/ }),
/* 135 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SUPPORTED_DATATYPES = undefined;
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _Shapes = __webpack_require__(18);
var Shapes = _interopRequireWildcard(_Shapes);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _CommonsMediaDataValueEditor = __webpack_require__(374);
var _CommonsMediaDataValueEditor2 = _interopRequireDefault(_CommonsMediaDataValueEditor);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _ExternalIdDataValueEditor = __webpack_require__(351);
var _ExternalIdDataValueEditor2 = _interopRequireDefault(_ExternalIdDataValueEditor);
var _MonolingualTextDataValueEditor = __webpack_require__(349);
var _MonolingualTextDataValueEditor2 = _interopRequireDefault(_MonolingualTextDataValueEditor);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _QuantityDataValueEditor = __webpack_require__(201);
var _QuantityDataValueEditor2 = _interopRequireDefault(_QuantityDataValueEditor);
var _StringDataValueEditor = __webpack_require__(337);
var _StringDataValueEditor2 = _interopRequireDefault(_StringDataValueEditor);
var _TimeDataValueEditor = __webpack_require__(336);
var _TimeDataValueEditor2 = _interopRequireDefault(_TimeDataValueEditor);
var _UnsupportedDataValueEditor = __webpack_require__(331);
var _UnsupportedDataValueEditor2 = _interopRequireDefault(_UnsupportedDataValueEditor);
var _UrlDataValueEditor = __webpack_require__(328);
var _UrlDataValueEditor2 = _interopRequireDefault(_UrlDataValueEditor);
var _WikibaseItemDataValueEditor = __webpack_require__(131);
var _WikibaseItemDataValueEditor2 = _interopRequireDefault(_WikibaseItemDataValueEditor);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SUPPORTED_DATATYPES = exports.SUPPORTED_DATATYPES = ['external-id', 'commonsMedia', 'monolingualtext', 'quantity', 'string', 'time', 'url', 'wikibase-item'];
var SnakValueEditorFactory = function (_PureComponent) {
(0, _inherits3.default)(SnakValueEditorFactory, _PureComponent);
function SnakValueEditorFactory() {
(0, _classCallCheck3.default)(this, SnakValueEditorFactory);
var _this = (0, _possibleConstructorReturn3.default)(this, (SnakValueEditorFactory.__proto__ || Object.getPrototypeOf(SnakValueEditorFactory)).apply(this, arguments));
_this.handleDataValueChange = _this.handleDataValueChange.bind(_this);
return _this;
}
(0, _createClass3.default)(SnakValueEditorFactory, [{
key: 'handleDataValueChange',
value: function handleDataValueChange(datavalue) {
var _props = this.props,
propertyDescription = _props.propertyDescription,
snak = _props.snak;
(0, _expect2.default)(snak).toBeAn('object');
(0, _expect2.default)(propertyDescription.datatype).toBeA('string');
this.props.onSnakChange((0, _extends3.default)({}, snak, {
datavalue: datavalue,
datatype: propertyDescription.datatype
}));
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props,
propertyDescription = _props2.propertyDescription,
readOnly = _props2.readOnly,
snak = _props2.snak;
var dataType = propertyDescription.datatype;
(0, _expect2.default)(propertyDescription.datatype).toBeA('string');
var dataValueEditorProps = {
datavalue: snak.datavalue,
readOnly: readOnly,
onDataValueChange: this.handleDataValueChange,
propertyDescription: propertyDescription
};
switch (dataType) {
case 'external-id':
return _react2.default.createElement(_ExternalIdDataValueEditor2.default, dataValueEditorProps);
case 'commonsMedia':
return _react2.default.createElement(_CommonsMediaDataValueEditor2.default, dataValueEditorProps);
case 'monolingualtext':
return _react2.default.createElement(_MonolingualTextDataValueEditor2.default, dataValueEditorProps);
case 'quantity':
return _react2.default.createElement(_QuantityDataValueEditor2.default, dataValueEditorProps);
case 'string':
return _react2.default.createElement(_StringDataValueEditor2.default, dataValueEditorProps);
case 'time':
return _react2.default.createElement(_TimeDataValueEditor2.default, dataValueEditorProps);
case 'url':
return _react2.default.createElement(_UrlDataValueEditor2.default, dataValueEditorProps);
case 'wikibase-item':
return _react2.default.createElement(_WikibaseItemDataValueEditor2.default, dataValueEditorProps);
// case "wikibase-item":
default:
return _react2.default.createElement(_UnsupportedDataValueEditor2.default, { datavalue: snak.datavalue, propertyDescription: propertyDescription });
}
}
}]);
return SnakValueEditorFactory;
}(_react.PureComponent);
SnakValueEditorFactory.TABLE_COLUMNS = 12;
SnakValueEditorFactory.propTypes = {
readOnly: _propTypes2.default.bool,
onSnakChange: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default).isRequired,
snak: _propTypes2.default.shape(Shapes.Snak)
};
SnakValueEditorFactory.defaultProps = {
readOnly: false
};
exports.default = SnakValueEditorFactory;
/***/ }),
/* 136 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _reactRedux = __webpack_require__(44);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = __webpack_require__(0);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var EMPTY_OBJECT = {};
var CacheValuesProvider = function (_PureComponent) {
(0, _inherits3.default)(CacheValuesProvider, _PureComponent);
function CacheValuesProvider() {
var _ref;
var _temp, _this, _ret;
(0, _classCallCheck3.default)(this, CacheValuesProvider);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CacheValuesProvider.__proto__ || Object.getPrototypeOf(CacheValuesProvider)).call.apply(_ref, [this].concat(args))), _this), _this.previousResult = {}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
(0, _createClass3.default)(CacheValuesProvider, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _props = this.props,
cacheData = _props.cacheData,
cacheKeys = _props.cacheKeys,
queue = _props.queue;
if (cacheKeys) {
var missing = cacheKeys.filter(function (cacheKey) {
return cacheData[cacheKey] === undefined;
});
if (missing.length > 0) queue(missing);
}
}
}, {
key: 'memoizeResult',
value: function memoizeResult(cacheData, cacheKeys) {
var _this2 = this;
var hasChanges = false;
var newResult = {};
cacheKeys.forEach(function (key) {
newResult[key] = cacheData[key];
if (_this2.previousResult[key] !== newResult[key]) {
hasChanges = true;
}
});
if (hasChanges) {
this.previousResult = newResult;
}
return this.previousResult;
}
}, {
key: 'render',
value: function render() {
var child = this.props.children;
(0, _expect2.default)(child).toBeA('function');
var _props2 = this.props,
cacheKeys = _props2.cacheKeys,
cacheData = _props2.cacheData;
if (!cacheKeys) return child(EMPTY_OBJECT);
// limit cache return and memoize result for react speed-up
var limitedCache = this.memoizeResult(cacheData, cacheKeys);
return child(limitedCache);
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
var _props3 = this.props,
cacheData = _props3.cacheData,
cacheKeys = _props3.cacheKeys,
queue = _props3.queue;
if (prevProps.cacheKeys !== cacheKeys && !!cacheKeys) {
var missing = cacheKeys.filter(function (cacheKey) {
return cacheData[cacheKey] === undefined;
});
if (missing.length > 0) queue(missing);
}
}
}]);
return CacheValuesProvider;
}(_react.PureComponent);
CacheValuesProvider.propTypes = {
cacheData: _propTypes2.default.object.isRequired,
cacheKeys: _propTypes2.default.arrayOf(_propTypes2.default.string),
children: _propTypes2.default.func.isRequired,
queue: _propTypes2.default.func.isRequired
};
var mapStateToProps = function mapStateToProps(state, ownProps) {
return {
cacheData: state[ownProps.cache.type].cache
};
};
var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
return {
queue: function queue(cacheKeys) {
return dispatch(ownProps.cache.actionQueue(cacheKeys));
}
};
};
var CacheValuesProviderConnected = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(CacheValuesProvider);
exports.default = CacheValuesProviderConnected;
/***/ }),
/* 137 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
exports.constructDescription = constructDescription;
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _LabelDescriptionProvider = __webpack_require__(210);
var _LabelDescriptionProvider2 = _interopRequireDefault(_LabelDescriptionProvider);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function constructDescription(labelDescription) {
return (labelDescription || {}).description || null;
}
var EntityLabel = function (_PureComponent) {
(0, _inherits3.default)(EntityLabel, _PureComponent);
function EntityLabel() {
(0, _classCallCheck3.default)(this, EntityLabel);
return (0, _possibleConstructorReturn3.default)(this, (EntityLabel.__proto__ || Object.getPrototypeOf(EntityLabel)).apply(this, arguments));
}
(0, _createClass3.default)(EntityLabel, [{
key: 'render',
value: function render() {
var entityId = this.props.entityId;
if (!entityId) return null;
return _react2.default.createElement(
_LabelDescriptionProvider2.default,
{ entityId: entityId },
constructDescription
);
}
}]);
return EntityLabel;
}(_react.PureComponent);
EntityLabel.propTypes = {
entityId: _propTypes2.default.string.isRequired
};
exports.default = EntityLabel;
/***/ }),
/* 138 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var JQueryButton = function (_PureComponent) {
(0, _inherits3.default)(JQueryButton, _PureComponent);
function JQueryButton() {
(0, _classCallCheck3.default)(this, JQueryButton);
return (0, _possibleConstructorReturn3.default)(this, (JQueryButton.__proto__ || Object.getPrototypeOf(JQueryButton)).apply(this, arguments));
}
(0, _createClass3.default)(JQueryButton, [{
key: 'render',
value: function render() {
// opimize JQuery alike behavious by direct rendering into HTML
var _props = this.props,
disabled = _props.disabled,
className = _props.className,
icon = _props.icon,
label = _props.label,
onClick = _props.onClick,
text = _props.text,
title = _props.title;
var cn = ['ui-button', 'ui-widget', 'ui-state-default', 'ui-corner-all'];
if (disabled) {
cn.push('ui-button-disabled');cn.push('ui-state-disabled');
}
if (!text) cn.push('ui-button-icon-only');
if (className) cn.push(className);
return _react2.default.createElement(
'button',
{
'aria-disabled': 'false',
className: cn.join(' '),
onClick: onClick,
role: 'button',
title: title || label },
icon && _react2.default.createElement('span', { className: 'ui-button-icon-primary ui-icon ' + (icon || '') }),
text && _react2.default.createElement(
'span',
{ className: 'ui-button-text' },
label
)
);
}
}]);
return JQueryButton;
}(_react.PureComponent);
JQueryButton.propTypes = {
className: _propTypes2.default.string,
onClick: _propTypes2.default.func.isRequired,
disabled: _propTypes2.default.bool,
icon: _propTypes2.default.string,
label: _propTypes2.default.string,
text: _propTypes2.default.bool,
title: _propTypes2.default.string
};
exports.default = JQueryButton;
/***/ }),
/* 139 */
/***/ (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;
}
/***/ }),
/* 140 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _reactRedux = __webpack_require__(44);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = __webpack_require__(0);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var CacheValueProvider = function (_PureComponent) {
(0, _inherits3.default)(CacheValueProvider, _PureComponent);
function CacheValueProvider() {
(0, _classCallCheck3.default)(this, CacheValueProvider);
return (0, _possibleConstructorReturn3.default)(this, (CacheValueProvider.__proto__ || Object.getPrototypeOf(CacheValueProvider)).apply(this, arguments));
}
(0, _createClass3.default)(CacheValueProvider, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _props = this.props,
cacheData = _props.cacheData,
cacheKey = _props.cacheKey,
queue = _props.queue;
if (!!cacheKey && typeof cacheData[cacheKey] === 'undefined') {
queue(cacheKey);
}
}
}, {
key: 'render',
value: function render() {
var child = this.props.children;
(0, _expect2.default)(child).toBeA('function');
var _props2 = this.props,
cacheKey = _props2.cacheKey,
cacheData = _props2.cacheData;
var result = cacheKey ? child(cacheData[cacheKey]) : child(null);
return result || null;
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
var _props3 = this.props,
cacheData = _props3.cacheData,
cacheKey = _props3.cacheKey,
queue = _props3.queue;
if (prevProps.cacheKey !== cacheKey && !!cacheKey && typeof cacheData[cacheKey] === 'undefined') {
queue(cacheKey);
}
}
}]);
return CacheValueProvider;
}(_react.PureComponent);
CacheValueProvider.propTypes = {
cacheData: _propTypes2.default.object.isRequired,
cacheKey: _propTypes2.default.string,
children: _propTypes2.default.func.isRequired,
queue: _propTypes2.default.func.isRequired
};
var mapStateToProps = function mapStateToProps(state, ownProps) {
return {
cacheData: state[ownProps.cache.type].cache
};
};
var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
return {
queue: function queue(cacheKey) {
return dispatch(ownProps.cache.actionQueue([cacheKey]));
}
};
};
var CacheValueProviderConnected = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(CacheValueProvider);
exports.default = CacheValueProviderConnected;
/***/ }),
/* 141 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _FormShapes = __webpack_require__(90);
var _I18nUtils = __webpack_require__(17);
var _reselect = __webpack_require__(51);
var _ErrorBoundary = __webpack_require__(419);
var _ErrorBoundary2 = _interopRequireDefault(_ErrorBoundary);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _FieldsetBuilder = __webpack_require__(418);
var _FieldsetBuilder2 = _interopRequireDefault(_FieldsetBuilder);
var _i18n = __webpack_require__(417);
var _i18n2 = _interopRequireDefault(_i18n);
var _LanguageSelectContainer = __webpack_require__(416);
var _LanguageSelectContainer2 = _interopRequireDefault(_LanguageSelectContainer);
var _PropertyClaimContainer = __webpack_require__(389);
var _PropertyClaimContainer2 = _interopRequireDefault(_PropertyClaimContainer);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _PropertyDescriptionsProvider = __webpack_require__(86);
var _PropertyDescriptionsProvider2 = _interopRequireDefault(_PropertyDescriptionsProvider);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _SparqlPropertyGroup = __webpack_require__(291);
var _SparqlPropertyGroup2 = _interopRequireDefault(_SparqlPropertyGroup);
var _core = __webpack_require__(33);
var _core2 = _interopRequireDefault(_core);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// https://medium.com/@fsufitch/is-javascript-array-sort-stable-46b90822543f
function stableSort(arr, cmp) {
cmp = cmp ? cmp : function (a, b) {
if (a < b) return -1;
if (a > b) return 1;
return 0;
};
var stabilizedThis = arr.map(function (el, index) {
return [el, index];
});
var stableCmp = function stableCmp(a, b) {
var order = cmp(a[0], b[0]);
if (order != 0) return order;
return a[1] - b[1];
};
stabilizedThis.sort(stableCmp);
for (var i = 0; i < arr.length; i++) {
arr[i] = stabilizedThis[i][0];
}
return arr;
}
function compare(a, b) {
if (typeof a === 'undefined' && typeof b === 'undefined') return 0;
if (typeof a === 'undefined' && typeof b !== 'undefined') return 1;
if (typeof a !== 'undefined' && typeof b === 'undefined') return -1;
if (a < b) {
return -1;
} else if (a > b) {
return 1;
} else {
return 0;
}
}
var compareByLabel = function compareByLabel(a, b) {
return compare(a.label, b.label);
};
function compareLanguageCodes(a, b) {
var empty = function empty(x) {
return typeof x === 'undefined' || x === null || x.length == 0;
};
var has = function has(arr, item) {
return !empty(arr) && arr.indexOf(item) !== -1;
};
if (empty(a) && empty(b)) return 0;
for (var i = 0; i < _I18nUtils.DEFAULT_LANGUAGES.length; i++) {
var lc = _I18nUtils.DEFAULT_LANGUAGES[i];
if (has(a, lc) && !has(b, lc)) return -1;
if (!has(a, lc) && has(b, lc)) return +1;
}
// other items by labels
return 0;
}
var compareByLanguageCodes = function compareByLanguageCodes(a, b) {
return compareLanguageCodes(a.languageCodes, b.languageCodes);
};
var ChildrenBuilder = function (_PureComponent) {
(0, _inherits3.default)(ChildrenBuilder, _PureComponent);
function ChildrenBuilder() {
(0, _classCallCheck3.default)(this, ChildrenBuilder);
var _this = (0, _possibleConstructorReturn3.default)(this, (ChildrenBuilder.__proto__ || Object.getPrototypeOf(ChildrenBuilder)).apply(this, arguments));
_this.filter = (0, _reselect.defaultMemoize)(function (cache, sorted, originalTerm) {
if (!originalTerm || originalTerm.trim() === '') return sorted;
var term = originalTerm.trim().toLowerCase();
var toFilter = sorted.map(function (field) {
return (0, _extends3.default)({}, field, cache[field.property]);
});
var result = [];
var filter = function filter(fieldF, checkF) {
toFilter = toFilter.filter(function (item) {
var fieldValue = fieldF(item);
if (typeof fieldValue === 'string' && checkF(fieldValue.toLowerCase())) {
result.push(item);
return false;
}
return true;
});
};
// TODO: aliases? other languages?
filter(function (item) {
return item.label;
}, function (value) {
return value.startsWith(term);
});
filter(function (item) {
return item.description;
}, function (value) {
return value.startsWith(term);
});
filter(function (item) {
return item.label;
}, function (value) {
return value.indexOf(term) !== -1;
});
filter(function (item) {
return item.description;
}, function (value) {
return value.indexOf(term) !== -1;
});
return result.map(function (item) {
return { property: item.property };
});
});
_this.sort = (0, _reselect.defaultMemoize)(function (cache, fields, sortBy) {
var result = fields.map(function (field) {
return (0, _extends3.default)({}, field, cache[field.property]);
});
for (var sortByIndex = sortBy.length - 1; sortByIndex >= 0; sortByIndex--) {
var sortMethod = sortBy[sortByIndex];
if (!sortMethod) continue;
switch (sortMethod) {
case 'language':
stableSort(result, compareByLanguageCodes);break;
case 'label':
stableSort(result, compareByLabel);break;
default:
mw.log('Unknown sort method: ' + sortMethod);break;
}
}
return result.map(function (item) {
return { property: item.property };
});
});
_this.state = {
displayEmpty: true,
quickSearchTerm: ''
};
_this.handleDisplayEmptyToggle = function () {
return _this.setState(function (state) {
return { displayEmpty: !state.displayEmpty };
});
};
_this.handleQuickSearchTermChange = function (event) {
return _this.setState({ quickSearchTerm: event.target.value || '' });
};
return _this;
}
(0, _createClass3.default)(ChildrenBuilder, [{
key: 'render',
value: function render() {
return _react2.default.createElement(
_react2.default.Fragment,
null,
this.renderSpecials(),
this.renderFields(),
this.renderFieldsets()
);
}
}, {
key: 'renderField',
value: function renderField(field, propertyDescription) {
var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
(0, _expect2.default)(field).toBeAn('object');
var propertyId = field.property;
(0, _expect2.default)(propertyId).toBeAn('string', 'Property attribute is not specified in field description: ' + JSON.stringify(field));
if (!propertyDescription || !propertyDescription.label) {
return _react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'td',
{ colSpan: 99 },
_react2.default.createElement(
'i',
null,
'Loading property description of ',
propertyId,
'...'
)
)
);
}
(0, _expect2.default)(propertyDescription).toBeA(_PropertyDescription2.default);
return _react2.default.createElement(_PropertyClaimContainer2.default, (0, _extends3.default)({}, props, {
propertyDescription: propertyDescription }));
}
}, {
key: 'renderFields',
value: function renderFields() {
var _this2 = this;
var _props = this.props,
fields = _props.fields,
parentLabelEntityId = _props.parentLabelEntityId,
quickSearch = _props.quickSearch,
sortBy = _props.sortBy;
var _state = this.state,
displayEmpty = _state.displayEmpty,
quickSearchTerm = _state.quickSearchTerm;
if (!fields || fields.length == 0) return null;
return _react2.default.createElement(
_PropertyDescriptionsProvider2.default,
{ propertyIds: fields.map(function (field) {
return field.property;
}) },
function (cache) {
var sorted = !!sortBy && sortBy.length > 0 ? _this2.sort(cache, fields, sortBy) : fields;
var filtered = _this2.filter(cache, sorted, quickSearchTerm);
return _react2.default.createElement(
'table',
{ className: _core2.default.wef_table },
quickSearch && _react2.default.createElement(
'thead',
{ className: _core2.default.quickSearch, key: 'quickSearch' },
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'td',
{ colSpan: 99 },
_react2.default.createElement(
'table',
null,
_react2.default.createElement(
'tbody',
null,
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'td',
null,
_react2.default.createElement(
'label',
null,
'\xA0\xA0',
_i18n2.default.labelQuickSearchTerm,
'\xA0\xA0\xA0',
_react2.default.createElement('input', {
onChange: _this2.handleQuickSearchTermChange,
type: 'text',
value: quickSearchTerm })
)
),
_react2.default.createElement(
'td',
null,
'\xA0\xA0\xA0\xA0\xA0'
),
_react2.default.createElement(
'td',
null,
_react2.default.createElement(
'label',
null,
'\xA0\xA0',
_i18n2.default.labelDisplayEmpty,
'\xA0\xA0\xA0',
_react2.default.createElement('input', {
checked: displayEmpty,
onChange: _this2.handleDisplayEmptyToggle,
type: 'checkbox' })
)
)
)
)
)
)
)
),
_react2.default.createElement(
'tbody',
null,
filtered.map(function (field) {
return _react2.default.createElement(
_ErrorBoundary2.default,
{ description: 'field: ' + JSON.stringify(field), key: field.property },
_this2.renderField(field, cache[field.property], {
displayEmpty: true,
displayLabel: fields.length !== 1 || parentLabelEntityId !== field.property
})
);
})
)
);
}
);
}
}, {
key: 'renderFieldsets',
value: function renderFieldsets() {
var fieldsets = this.props.fieldsets;
if (!fieldsets || fieldsets.length === 0) return null;
return fieldsets.map(function (fieldset, index) {
return _react2.default.createElement(
_ErrorBoundary2.default,
{ description: 'fieldset: ' + JSON.stringify(fieldset), key: fieldset.key || 'fieldset-' + index },
_react2.default.createElement(_FieldsetBuilder2.default, { fieldset: fieldset })
);
});
}
}, {
key: 'renderSpecials',
value: function renderSpecials() {
var specials = this.props.specials;
if (!specials || specials.length == 0) return null;
return specials.map(function (special) {
var key = special.key,
type = special.type;
if (type === 'LabelsAndDescriptionArea') {
return _react2.default.createElement(_LanguageSelectContainer2.default, { key: key || type });
}
if (type === 'SparqlPropertyGroup') {
return _react2.default.createElement(_SparqlPropertyGroup2.default, (0, _extends3.default)({}, special, { key: key || type }));
}
return _react2.default.createElement(
'span',
{ key: key || type },
'unsupported special type: ',
type
);
});
}
}]);
return ChildrenBuilder;
}(_react.PureComponent);
ChildrenBuilder.propTypes = (0, _extends3.default)({}, _FormShapes.ChildrenContainer, {
quickSearch: _propTypes2.default.bool,
// can be used to hide claim property label
parentLabelEntityId: _propTypes2.default.string,
sortBy: _propTypes2.default.arrayOf(_propTypes2.default.string)
});
ChildrenBuilder.defaultProps = {
parentLabelEntityId: null,
quickSearch: false
};
exports.default = ChildrenBuilder;
/***/ }),
/* 142 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _AbstractQueuedCache2 = __webpack_require__(103);
var _AbstractQueuedCache3 = _interopRequireDefault(_AbstractQueuedCache2);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _findByKeysInObjectStore = __webpack_require__(219);
var _findByKeysInObjectStore2 = _interopRequireDefault(_findByKeysInObjectStore);
var _lastRevisionCache = __webpack_require__(429);
var _lastRevisionCache2 = _interopRequireDefault(_lastRevisionCache);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* To use this class each result entry MUST have pageid and lastrevid fields
* (otherwise it WILL be rerequested on each iteration)
*/
var AbstractQueuedCacheWithPostcheck = function (_AbstractQueuedCache) {
(0, _inherits3.default)(AbstractQueuedCacheWithPostcheck, _AbstractQueuedCache);
function AbstractQueuedCacheWithPostcheck() {
(0, _classCallCheck3.default)(this, AbstractQueuedCacheWithPostcheck);
var _this = (0, _possibleConstructorReturn3.default)(this, (AbstractQueuedCacheWithPostcheck.__proto__ || Object.getPrototypeOf(AbstractQueuedCacheWithPostcheck)).apply(this, arguments));
if (_this.useIndexedDb) {
_lastRevisionCache2.default.addCacheUpdateCallback(_this.onLastRevisionsFetched.bind(_this));
}
_this.pageid2cacheKey = {};
return _this;
}
(0, _createClass3.default)(AbstractQueuedCacheWithPostcheck, [{
key: 'onCacheUpdateFromDatabase',
value: function onCacheUpdateFromDatabase(cacheUpdate) {
var _this2 = this;
(0, _expect2.default)(this.dbConnection).toBeTruthy();
var lastRevisionsCacheData = _lastRevisionCache2.default.cache;
var pageidsToQueue = [];
Object.keys(cacheUpdate).forEach(function (cacheKey) {
var entity = cacheUpdate[cacheKey];
var pageid = entity.pageid;
var dbLastRevisionId = entity.lastrevid;
if (!pageid || !dbLastRevisionId) {
_this2.requestQueue.add(cacheKey);
return;
}
var realLastRevisionId = lastRevisionsCacheData[pageid];
if (realLastRevisionId === undefined) {
pageidsToQueue.push(pageid);
_this2.pageid2cacheKey[pageid] = cacheKey;
} else if (realLastRevisionId !== dbLastRevisionId) {
_this2.requestQueue.add(cacheKey);
}
});
if (this.requestQueue.size !== 0 && this.queueState === 'WAITING') {
this.queueState = 'REQUEST';
this.queueNextBatch(this.dispatch);
}
_lastRevisionCache2.default.doQueue(pageidsToQueue);
}
}, {
key: 'onLastRevisionsFetched',
value: function onLastRevisionsFetched(lastRevisionsFetched) {
var _this3 = this;
if (!this.dbConnection) return;
var transaction = this.dbConnection.transaction(['CACHE']);
var objectStore = transaction.objectStore('CACHE');
var cacheKeysToCheck = Object.keys(lastRevisionsFetched).map(function (pageid) {
return _this3.pageid2cacheKey[pageid];
}).filter(function (x) {
return x !== undefined;
});
(0, _findByKeysInObjectStore2.default)(objectStore, cacheKeysToCheck).then(function (result) {
Object.keys(result).forEach(function (cacheKey) {
var dbEntity = result[cacheKey];
var dbpageid = dbEntity.pageid;
var dblastrevid = dbEntity.lastrevid;
if (!dbpageid || dblastrevid !== lastRevisionsFetched[dbpageid]) {
_this3.requestQueue.add(cacheKey);
}
});
if (_this3.requestQueue.size !== 0 && _this3.queueState === 'WAITING') {
_this3.queueState = 'REQUEST';
_this3.queueNextBatch(_this3.dispatch);
}
});
Object.keys(lastRevisionsFetched).forEach(function (pageid) {
return delete _this3.pageid2cacheKey[pageid];
});
}
}]);
return AbstractQueuedCacheWithPostcheck;
}(_AbstractQueuedCache3.default);
exports.default = AbstractQueuedCacheWithPostcheck;
/***/ }),
/* 143 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _objectInspect = __webpack_require__(482);
var _objectInspect2 = _interopRequireDefault(_objectInspect);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var formatString = function formatString(string, args) {
var index = 0;
return string.replace(/%s/g, function () {
return (0, _objectInspect2.default)(args[index++]);
});
};
var assert = function assert(condition, createMessage) {
for (var _len = arguments.length, extraArgs = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
extraArgs[_key - 2] = arguments[_key];
}
if (condition) return;
var message = typeof createMessage === 'string' ? formatString(createMessage, extraArgs) : createMessage(extraArgs);
throw new Error(message);
};
exports.default = assert;
/***/ }),
/* 144 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__(490);
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
/***/ }),
/* 145 */
/***/ (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;
/***/ }),
/* 146 */
/***/ (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.
*
*/
/**
* 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 (false) {}
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;
/***/ }),
/* 147 */
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/* 148 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(57);
var core = __webpack_require__(34);
var LIBRARY = __webpack_require__(107);
var wksExt = __webpack_require__(149);
var defineProperty = __webpack_require__(56).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) });
};
/***/ }),
/* 149 */
/***/ (function(module, exports, __webpack_require__) {
exports.f = __webpack_require__(39);
/***/ }),
/* 150 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(513);
var global = __webpack_require__(57);
var hide = __webpack_require__(80);
var Iterators = __webpack_require__(78);
var TO_STRING_TAG = __webpack_require__(39)('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;
}
/***/ }),
/* 151 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(158);
module.exports = function (it) {
return Object(defined(it));
};
/***/ }),
/* 152 */
/***/ (function(module, exports, __webpack_require__) {
var def = __webpack_require__(56).f;
var has = __webpack_require__(61);
var TAG = __webpack_require__(39)('toStringTag');
module.exports = function (it, tag, stat) {
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};
/***/ }),
/* 153 */
/***/ (function(module, exports) {
// IE 8- don't enum bug keys
module.exports = (
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
/***/ }),
/* 154 */
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__(34);
var global = __webpack_require__(57);
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__(107) ? 'pure' : 'global',
copyright: '© 2018 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/* 155 */
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__(154)('keys');
var uid = __webpack_require__(105);
module.exports = function (key) {
return shared[key] || (shared[key] = uid(key));
};
/***/ }),
/* 156 */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/* 157 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(63);
var dPs = __webpack_require__(518);
var enumBugKeys = __webpack_require__(153);
var IE_PROTO = __webpack_require__(155)('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__(239)('iframe');
var i = enumBugKeys.length;
var lt = '<';
var gt = '>';
var iframeDocument;
iframe.style.display = 'none';
__webpack_require__(515).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);
};
/***/ }),
/* 158 */
/***/ (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;
};
/***/ }),
/* 159 */
/***/ (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);
};
/***/ }),
/* 160 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(79);
// 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");
};
/***/ }),
/* 161 */
/***/ (function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(523);
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);
};
};
/***/ }),
/* 162 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var DialogWrapper = function (_PureComponent) {
(0, _inherits3.default)(DialogWrapper, _PureComponent);
function DialogWrapper() {
(0, _classCallCheck3.default)(this, DialogWrapper);
var _this = (0, _possibleConstructorReturn3.default)(this, (DialogWrapper.__proto__ || Object.getPrototypeOf(DialogWrapper)).apply(this, arguments));
_this.state = { manuallyResized: false };
_this.ref = _react2.default.createRef();
_this.handleResize = _this.handleResize.bind(_this);
_this.resizeToFit = _this.resizeToFit.bind(_this);
return _this;
}
(0, _createClass3.default)(DialogWrapper, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _props = this.props,
buttons = _props.buttons,
className = _props.className,
minWidth = _props.minWidth,
onBeforeClose = _props.onBeforeClose,
onClose = _props.onClose;
jQuery(this.ref.current).dialog({
autoOpen: true,
autoResize: true,
beforeClose: onBeforeClose,
buttons: buttons,
close: onClose,
dialogClass: className,
minWidth: minWidth,
open: this.resizeToFit,
resizeStart: this.handleResize,
// workaround for content shrinking bug in jQuery
// inspired by https://stackoverflow.com/a/49965986/1885756
resize: function resize() {
jQuery(this).closest('.ui-dialog-content').css('width', 'unset');
}
});
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
jQuery(this.ref.current).dialog('destroy');
}
}, {
key: 'close',
value: function close() {
jQuery(this.ref.current).dialog('close');
}
}, {
key: 'open',
value: function open() {
jQuery(this.ref.current).dialog('open');
}
}, {
key: 'handleResize',
value: function handleResize() {
this.setState({ manuallyResized: true });
jQuery(this.ref.current).dialog('option', 'dialogClass', 'manuallyResized' + (this.props.className ? ' ' + this.props.className : ''));
}
// shouldComponentUpdate() {
// return false;
// }
}, {
key: 'render',
value: function render() {
var _props2 = this.props,
children = _props2.children,
title = _props2.title;
return _react2.default.createElement(
'div',
{ ref: this.ref, title: title },
children
);
}
}, {
key: 'resizeToFit',
value: function resizeToFit() {
if (!this.state.manuallyResized) {
var wrapped = jQuery(this.ref.current);
if (wrapped.parent().height() > $(window).height()) {
wrapped.height($(window).height() * 0.7);
}
}
}
}]);
return DialogWrapper;
}(_react.PureComponent);
DialogWrapper.propTypes = {
buttons: _propTypes2.default.arrayOf(_propTypes2.default.object),
children: _propTypes2.default.node,
className: _propTypes2.default.string,
minWidth: _propTypes2.default.number,
onBeforeClose: _propTypes2.default.func,
onClose: _propTypes2.default.func,
title: _propTypes2.default.string
};
exports.default = DialogWrapper;
/***/ }),
/* 163 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(9);
var DESCRIPTORS = __webpack_require__(21);
var LIBRARY = __webpack_require__(59);
var $typed = __webpack_require__(112);
var hide = __webpack_require__(32);
var redefineAll = __webpack_require__(65);
var fails = __webpack_require__(11);
var anInstance = __webpack_require__(67);
var toInteger = __webpack_require__(48);
var toLength = __webpack_require__(19);
var toIndex = __webpack_require__(249);
var gOPN = __webpack_require__(69).f;
var dP = __webpack_require__(20).f;
var arrayFill = __webpack_require__(168);
var setToStringTag = __webpack_require__(84);
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;
/***/ }),
/* 164 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 25.4.1.5 NewPromiseCapability(C)
var aFunction = __webpack_require__(27);
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);
};
/***/ }),
/* 165 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(9);
var macrotask = __webpack_require__(166).set;
var Observer = global.MutationObserver || global.WebKitMutationObserver;
var process = global.process;
var Promise = global.Promise;
var isNode = __webpack_require__(41)(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;
};
};
/***/ }),
/* 166 */
/***/ (function(module, exports, __webpack_require__) {
var ctx = __webpack_require__(42);
var invoke = __webpack_require__(268);
var html = __webpack_require__(184);
var cel = __webpack_require__(188);
var global = __webpack_require__(9);
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__(41)(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
};
/***/ }),
/* 167 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var addToUnscopables = __webpack_require__(58);
var step = __webpack_require__(258);
var Iterators = __webpack_require__(82);
var toIObject = __webpack_require__(37);
// 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__(176)(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');
/***/ }),
/* 168 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
var toObject = __webpack_require__(25);
var toAbsoluteIndex = __webpack_require__(71);
var toLength = __webpack_require__(19);
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;
};
/***/ }),
/* 169 */
/***/ (function(module, exports, __webpack_require__) {
// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
var speciesConstructor = __webpack_require__(636);
module.exports = function (original, length) {
return new (speciesConstructor(original))(length);
};
/***/ }),
/* 170 */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(95);
var ITERATOR = __webpack_require__(13)('iterator');
var Iterators = __webpack_require__(82);
module.exports = __webpack_require__(43).getIteratorMethod = function (it) {
if (it != undefined) return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ }),
/* 171 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $defineProperty = __webpack_require__(20);
var createDesc = __webpack_require__(74);
module.exports = function (object, index, value) {
if (index in object) $defineProperty.f(object, index, createDesc(0, value));
else object[index] = value;
};
/***/ }),
/* 172 */
/***/ (function(module, exports, __webpack_require__) {
// check on default Array iterator
var Iterators = __webpack_require__(82);
var ITERATOR = __webpack_require__(13)('iterator');
var ArrayProto = Array.prototype;
module.exports = function (it) {
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};
/***/ }),
/* 173 */
/***/ (function(module, exports, __webpack_require__) {
var MATCH = __webpack_require__(13)('match');
module.exports = function (KEY) {
var re = /./;
try {
'/./'[KEY](re);
} catch (e) {
try {
re[MATCH] = false;
return !'/./'[KEY](re);
} catch (f) { /* empty */ }
} return true;
};
/***/ }),
/* 174 */
/***/ (function(module, exports, __webpack_require__) {
// helper for String#{startsWith, endsWith, includes}
var isRegExp = __webpack_require__(119);
var defined = __webpack_require__(49);
module.exports = function (that, searchString, NAME) {
if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
return String(defined(that));
};
/***/ }),
/* 175 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var create = __webpack_require__(70);
var descriptor = __webpack_require__(74);
var setToStringTag = __webpack_require__(84);
var IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(32)(IteratorPrototype, __webpack_require__(13)('iterator'), function () { return this; });
module.exports = function (Constructor, NAME, next) {
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
setToStringTag(Constructor, NAME + ' Iterator');
};
/***/ }),
/* 176 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__(59);
var $export = __webpack_require__(1);
var redefine = __webpack_require__(31);
var hide = __webpack_require__(32);
var Iterators = __webpack_require__(82);
var $iterCreate = __webpack_require__(175);
var setToStringTag = __webpack_require__(84);
var getPrototypeOf = __webpack_require__(35);
var ITERATOR = __webpack_require__(13)('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;
};
/***/ }),
/* 177 */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(48);
var defined = __webpack_require__(49);
// 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;
};
};
/***/ }),
/* 178 */
/***/ (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;
/***/ }),
/* 179 */
/***/ (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;
};
/***/ }),
/* 180 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toInteger = __webpack_require__(48);
var defined = __webpack_require__(49);
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;
};
/***/ }),
/* 181 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(12);
var setPrototypeOf = __webpack_require__(183).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;
};
/***/ }),
/* 182 */
/***/ (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';
/***/ }),
/* 183 */
/***/ (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__(12);
var anObject = __webpack_require__(8);
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__(42)(Function.call, __webpack_require__(36).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
};
/***/ }),
/* 184 */
/***/ (function(module, exports, __webpack_require__) {
var document = __webpack_require__(9).document;
module.exports = document && document.documentElement;
/***/ }),
/* 185 */
/***/ (function(module, exports) {
// IE 8- don't enum bug keys
module.exports = (
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
/***/ }),
/* 186 */
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__(123)('keys');
var uid = __webpack_require__(73);
module.exports = function (key) {
return shared[key] || (shared[key] = uid(key));
};
/***/ }),
/* 187 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(9);
var core = __webpack_require__(43);
var LIBRARY = __webpack_require__(59);
var wksExt = __webpack_require__(274);
var defineProperty = __webpack_require__(20).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) });
};
/***/ }),
/* 188 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(12);
var document = __webpack_require__(9).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) : {};
};
/***/ }),
/* 189 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var createChangeEmitter = exports.createChangeEmitter = function createChangeEmitter() {
var currentListeners = [];
var nextListeners = currentListeners;
function ensureCanMutateNextListeners() {
if (nextListeners === currentListeners) {
nextListeners = currentListeners.slice();
}
}
function listen(listener) {
if (typeof listener !== 'function') {
throw new Error('Expected listener to be a function.');
}
var isSubscribed = true;
ensureCanMutateNextListeners();
nextListeners.push(listener);
return function () {
if (!isSubscribed) {
return;
}
isSubscribed = false;
ensureCanMutateNextListeners();
var index = nextListeners.indexOf(listener);
nextListeners.splice(index, 1);
};
}
function emit() {
currentListeners = nextListeners;
var listeners = currentListeners;
for (var i = 0; i < listeners.length; i++) {
listeners[i].apply(listeners, arguments);
}
}
return {
listen: listen,
emit: emit
};
};
/***/ }),
/* 190 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(280);
/* 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 {}
var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
/* harmony default export */ __webpack_exports__["a"] = (result);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(75), __webpack_require__(222)(module)))
/***/ }),
/* 191 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(292);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 192 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ButtonCell = __webpack_require__(45);
var _ButtonCell2 = _interopRequireDefault(_ButtonCell);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _reactjsPopup = __webpack_require__(132);
var _reactjsPopup2 = _interopRequireDefault(_reactjsPopup);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _RankSelect = __webpack_require__(296);
var _RankSelect2 = _interopRequireDefault(_RankSelect);
var _core3 = __webpack_require__(33);
var _core4 = _interopRequireDefault(_core3);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var icons = {
preferred: 'ui-icon-arrowthickstop-1-n',
normal: 'ui-icon-arrowthick-2-n-s',
deprecated: 'ui-icon-arrowthickstop-1-s'
};
var SelectRankButtonCell = function (_PureComponent) {
(0, _inherits3.default)(SelectRankButtonCell, _PureComponent);
function SelectRankButtonCell() {
(0, _classCallCheck3.default)(this, SelectRankButtonCell);
var _this = (0, _possibleConstructorReturn3.default)(this, (SelectRankButtonCell.__proto__ || Object.getPrototypeOf(SelectRankButtonCell)).apply(this, arguments));
_this.state = {
open: false
};
_this.handleClick = function () {
return _this.setState(function (state) {
return { open: !state.open };
});
};
_this.handleChange = _this.handleChange.bind(_this);
return _this;
}
(0, _createClass3.default)(SelectRankButtonCell, [{
key: 'handleChange',
value: function handleChange(value) {
this.setState({
open: false
});
if (value !== this.props.value) {
var onChange = this.props.onChange;
if (onChange) onChange.apply(undefined, arguments);
}
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
var _props = this.props,
disabled = _props.disabled,
value = _props.value;
return _react2.default.createElement(
_ButtonCell2.default,
{
className: _core4.default.wef_select_rank_button,
disabled: disabled,
icon: icons[value],
label: _core2.default.rank[value],
onClick: this.handleClick,
text: false },
function (children) {
return _react2.default.createElement(
_reactjsPopup2.default,
{
arrow: false,
contentStyle: { padding: 0 },
open: _this2.state.open,
position: 'bottom left',
trigger: children },
_react2.default.createElement(_RankSelect2.default, {
onChange: _this2.handleChange,
value: value })
);
}
);
}
}]);
return SelectRankButtonCell;
}(_react.PureComponent);
SelectRankButtonCell.propTypes = {
disabled: _propTypes2.default.bool,
onChange: _propTypes2.default.func.isRequired,
value: _propTypes2.default.oneOf(['deprecated', 'normal', 'preferred'])
};
SelectRankButtonCell.defaultProps = {
disabled: false,
value: 'value'
};
exports.default = SelectRankButtonCell;
/***/ }),
/* 193 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ButtonCell = __webpack_require__(45);
var _ButtonCell2 = _interopRequireDefault(_ButtonCell);
var _i18n = __webpack_require__(87);
var _i18n2 = _interopRequireDefault(_i18n);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var QualifierSelectButtonCell = function (_PureComponent) {
(0, _inherits3.default)(QualifierSelectButtonCell, _PureComponent);
function QualifierSelectButtonCell() {
(0, _classCallCheck3.default)(this, QualifierSelectButtonCell);
return (0, _possibleConstructorReturn3.default)(this, (QualifierSelectButtonCell.__proto__ || Object.getPrototypeOf(QualifierSelectButtonCell)).apply(this, arguments));
}
(0, _createClass3.default)(QualifierSelectButtonCell, [{
key: 'render',
value: function render() {
var _props = this.props,
disabled = _props.disabled,
onClick = _props.onClick;
return _react2.default.createElement(_ButtonCell2.default, {
disabled: disabled,
icon: 'ui-icon-tag',
label: _i18n2.default.buttonAddQualifier,
onClick: onClick });
}
}]);
return QualifierSelectButtonCell;
}(_react.PureComponent);
QualifierSelectButtonCell.propTypes = {
disabled: _propTypes2.default.bool,
onClick: _propTypes2.default.func.isRequired
};
QualifierSelectButtonCell.defaultProps = {
disabled: false
};
exports.default = QualifierSelectButtonCell;
/***/ }),
/* 194 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _CacheValueProvider = __webpack_require__(140);
var _CacheValueProvider2 = _interopRequireDefault(_CacheValueProvider);
var _propertiesBySparqlCache = __webpack_require__(216);
var _propertiesBySparqlCache2 = _interopRequireDefault(_propertiesBySparqlCache);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var PropertiesBySparqlProvider = function (_PureComponent) {
(0, _inherits3.default)(PropertiesBySparqlProvider, _PureComponent);
function PropertiesBySparqlProvider() {
(0, _classCallCheck3.default)(this, PropertiesBySparqlProvider);
return (0, _possibleConstructorReturn3.default)(this, (PropertiesBySparqlProvider.__proto__ || Object.getPrototypeOf(PropertiesBySparqlProvider)).apply(this, arguments));
}
(0, _createClass3.default)(PropertiesBySparqlProvider, [{
key: 'render',
value: function render() {
var _props = this.props,
children = _props.children,
sparql = _props.sparql;
return _react2.default.createElement(
_CacheValueProvider2.default,
{
cache: _propertiesBySparqlCache2.default,
cacheKey: sparql },
children
);
}
}]);
return PropertiesBySparqlProvider;
}(_react.PureComponent);
PropertiesBySparqlProvider.propTypes = {
children: _propTypes2.default.func.isRequired,
sparql: _propTypes2.default.string.isRequired
};
exports.default = PropertiesBySparqlProvider;
/***/ }),
/* 195 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _Shapes = __webpack_require__(18);
var _ClaimReferencesEditorDialog = __webpack_require__(306);
var _ClaimReferencesEditorDialog2 = _interopRequireDefault(_ClaimReferencesEditorDialog);
var _reselect = __webpack_require__(51);
var _i18n = __webpack_require__(85);
var _i18n2 = _interopRequireDefault(_i18n);
var _JQueryButton = __webpack_require__(138);
var _JQueryButton2 = _interopRequireDefault(_JQueryButton);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _references = __webpack_require__(98);
var _references2 = _interopRequireDefault(_references);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ClaimReferencesButtonCell = function (_PureComponent) {
(0, _inherits3.default)(ClaimReferencesButtonCell, _PureComponent);
function ClaimReferencesButtonCell() {
(0, _classCallCheck3.default)(this, ClaimReferencesButtonCell);
var _this = (0, _possibleConstructorReturn3.default)(this, (ClaimReferencesButtonCell.__proto__ || Object.getPrototypeOf(ClaimReferencesButtonCell)).apply(this, arguments));
_this.state = {
displayEditor: false
};
_this.labelMemoize = (0, _reselect.defaultMemoize)(function (claim) {
return '[' + ((claim || {}).references || []).length + ']';
});
_this.handleClick = function () {
return _this.setState(function (state) {
return { displayEditor: !state.displayEditor };
});
};
return _this;
}
(0, _createClass3.default)(ClaimReferencesButtonCell, [{
key: 'render',
value: function render() {
var _props = this.props,
claim = _props.claim,
onClaimUpdate = _props.onClaimUpdate;
return _react2.default.createElement(
'td',
{ className: _references2.default.referencesButtonCell },
_react2.default.createElement(_JQueryButton2.default, {
className: _references2.default.referencesButton,
icon: null,
label: this.labelMemoize(claim),
onClick: this.handleClick,
text: true,
title: _i18n2.default.buttonTitleReferences }),
this.state.displayEditor && _react2.default.createElement(_ClaimReferencesEditorDialog2.default, {
claim: claim,
onClaimUpdate: onClaimUpdate,
onCloseClick: this.handleClick })
);
}
}]);
return ClaimReferencesButtonCell;
}(_react.PureComponent);
ClaimReferencesButtonCell.propTypes = {
claim: _propTypes2.default.shape(_Shapes.Claim).isRequired,
onClaimUpdate: _propTypes2.default.func.isRequired
};
exports.default = ClaimReferencesButtonCell;
/***/ }),
/* 196 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _PropertyLabelCell = __webpack_require__(312);
var _PropertyLabelCell2 = _interopRequireDefault(_PropertyLabelCell);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var PropertyLabelCell = function (_PureComponent) {
(0, _inherits3.default)(PropertyLabelCell, _PureComponent);
function PropertyLabelCell() {
(0, _classCallCheck3.default)(this, PropertyLabelCell);
return (0, _possibleConstructorReturn3.default)(this, (PropertyLabelCell.__proto__ || Object.getPrototypeOf(PropertyLabelCell)).apply(this, arguments));
}
(0, _createClass3.default)(PropertyLabelCell, [{
key: 'render',
value: function render() {
var _props$propertyDescri = this.props.propertyDescription,
label = _props$propertyDescri.label,
description = _props$propertyDescri.description,
id = _props$propertyDescri.id;
return _react2.default.createElement(
'th',
{ className: _PropertyLabelCell2.default.wef_property_label },
_react2.default.createElement(
'a',
{
href: '//www.wikidata.org/wiki/Property:' + id,
rel: 'noopener noreferrer',
target: '_blank',
title: description },
label || id
)
);
}
}]);
return PropertyLabelCell;
}(_react.PureComponent);
PropertyLabelCell.propTypes = {
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default)
};
exports.default = PropertyLabelCell;
/***/ }),
/* 197 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _generateRandomString = __webpack_require__(88);
var _generateRandomString2 = _interopRequireDefault(_generateRandomString);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _SnakAddButtonCell = __webpack_require__(316);
var _SnakAddButtonCell2 = _interopRequireDefault(_SnakAddButtonCell);
var _SnakRemoveButtonCell = __webpack_require__(314);
var _SnakRemoveButtonCell2 = _interopRequireDefault(_SnakRemoveButtonCell);
var _SnakTableRow = __webpack_require__(313);
var _SnakTableRow2 = _interopRequireDefault(_SnakTableRow);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SnaksArrayEditor = function (_PureComponent) {
(0, _inherits3.default)(SnaksArrayEditor, _PureComponent);
function SnaksArrayEditor() {
(0, _classCallCheck3.default)(this, SnaksArrayEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (SnaksArrayEditor.__proto__ || Object.getPrototypeOf(SnaksArrayEditor)).apply(this, arguments));
_this.emptySnakHash = (0, _generateRandomString2.default)();
_this.handleEmptySnakChange = _this.handleEmptySnakChange.bind(_this);
_this.handleSnakAdd = _this.handleSnakAdd.bind(_this);
_this.handleSnakAddTwice = _this.handleSnakAddTwice.bind(_this);
return _this;
}
(0, _createClass3.default)(SnaksArrayEditor, [{
key: 'handleEmptySnakChange',
value: function handleEmptySnakChange(snak) {
var _props$propertyDescri = this.props.propertyDescription,
datatype = _props$propertyDescri.datatype,
id = _props$propertyDescri.id;
this.props.onSnaksArrayUpdate([(0, _extends3.default)({}, snak, {
property: id,
datatype: datatype
})]);
}
}, {
key: 'handleSnakAdd',
value: function handleSnakAdd() {
var _props$propertyDescri2 = this.props.propertyDescription,
datatype = _props$propertyDescri2.datatype,
id = _props$propertyDescri2.id;
this.props.onSnaksArrayUpdate([].concat((0, _toConsumableArray3.default)(this.props.snaksArray), [{
snaktype: 'value',
property: id,
hash: (0, _generateRandomString2.default)(),
datatype: datatype
}]));
}
}, {
key: 'handleSnakAddTwice',
value: function handleSnakAddTwice() {
var _props$propertyDescri3 = this.props.propertyDescription,
datatype = _props$propertyDescri3.datatype,
id = _props$propertyDescri3.id;
this.props.onSnaksArrayUpdate([].concat((0, _toConsumableArray3.default)(this.props.snaksArray), [{
snaktype: 'value',
property: id,
hash: (0, _generateRandomString2.default)(),
datatype: datatype
}, {
snaktype: 'value',
property: id,
hash: (0, _generateRandomString2.default)(),
datatype: datatype
}]));
}
}, {
key: 'handleSnakChangeF',
value: function handleSnakChangeF(index) {
var _this2 = this;
var _props$propertyDescri4 = this.props.propertyDescription,
datatype = _props$propertyDescri4.datatype,
id = _props$propertyDescri4.id;
return function (snak) {
return _this2.props.onSnaksArrayUpdate(_this2.props.snaksArray.map(function (item, i) {
return i === index ? (0, _extends3.default)({}, snak, {
property: id,
datatype: datatype
}) : item;
}));
};
}
}, {
key: 'handleSnakRemoveF',
value: function handleSnakRemoveF(indexToDelete) {
var _this3 = this;
return function () {
return _this3.props.onSnaksArrayUpdate(_this3.props.snaksArray.filter(function (item, i) {
return i !== indexToDelete;
}));
};
}
}, {
key: 'render',
value: function render() {
var _this4 = this;
var _props = this.props,
displayEmpty = _props.displayEmpty,
displayLabels = _props.displayLabels,
propertyDescription = _props.propertyDescription,
readOnly = _props.readOnly,
removeButtonLabel = _props.removeButtonLabel,
removeButtonConfirmMessage = _props.removeButtonConfirmMessage,
snaksArray = _props.snaksArray;
if (!snaksArray || snaksArray.length == 0) {
if (!displayEmpty) return null;
var _props$propertyDescri5 = this.props.propertyDescription,
datatype = _props$propertyDescri5.datatype,
id = _props$propertyDescri5.id;
return _react2.default.createElement(
'tbody',
null,
_react2.default.createElement(_SnakTableRow2.default, {
displayLabel: displayLabels,
firstCell: _react2.default.createElement(_SnakAddButtonCell2.default, { onClick: this.handleSnakAddTwice }),
lastCell: _react2.default.createElement('td', null),
onSnakChange: this.handleEmptySnakChange,
propertyDescription: propertyDescription,
qualifier: {
snaktype: 'value',
property: id,
hash: this.emptySnakHash,
datatype: datatype
} })
);
}
(0, _expect2.default)(snaksArray).toBeAn('array');
return _react2.default.createElement(
'tbody',
null,
snaksArray.map(function (snak, index) {
return _react2.default.createElement(_SnakTableRow2.default, {
displayLabel: displayLabels,
firstCell: index === 0 ? _react2.default.createElement(_SnakAddButtonCell2.default, { onClick: _this4.handleSnakAdd }) : _react2.default.createElement('td', null),
key: snak.hash,
lastCell: _react2.default.createElement(_SnakRemoveButtonCell2.default, {
confirmMessage: removeButtonConfirmMessage,
label: removeButtonLabel,
onClick: _this4.handleSnakRemoveF(index) }),
onSnakChange: _this4.handleSnakChangeF(index),
propertyDescription: propertyDescription,
readOnly: readOnly,
snak: snak });
})
);
}
}]);
return SnaksArrayEditor;
}(_react.PureComponent);
SnaksArrayEditor.propTypes = {
snaksArray: _propTypes2.default.array,
displayEmpty: _propTypes2.default.bool,
displayLabels: _propTypes2.default.bool,
onSnaksArrayUpdate: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default).isRequired,
readOnly: _propTypes2.default.bool.isRequired,
removeButtonLabel: _propTypes2.default.string.isRequired,
removeButtonConfirmMessage: _propTypes2.default.string.isRequired
};
SnaksArrayEditor.defaultProps = {
displayEmpty: false,
displayLabels: true
};
exports.default = SnaksArrayEditor;
/***/ }),
/* 198 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _defineProperty2 = __webpack_require__(55);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _extends3 = __webpack_require__(7);
var _extends4 = _interopRequireDefault(_extends3);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _PropertyDescriptionsProvider = __webpack_require__(86);
var _PropertyDescriptionsProvider2 = _interopRequireDefault(_PropertyDescriptionsProvider);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _SnaksArrayEditor = __webpack_require__(197);
var _SnaksArrayEditor2 = _interopRequireDefault(_SnaksArrayEditor);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SnaksMapEditor = function (_PureComponent) {
(0, _inherits3.default)(SnaksMapEditor, _PureComponent);
function SnaksMapEditor() {
(0, _classCallCheck3.default)(this, SnaksMapEditor);
return (0, _possibleConstructorReturn3.default)(this, (SnaksMapEditor.__proto__ || Object.getPrototypeOf(SnaksMapEditor)).apply(this, arguments));
}
(0, _createClass3.default)(SnaksMapEditor, [{
key: 'handleSnaksArrayUpdateF',
value: function handleSnaksArrayUpdateF(propertyDescription) {
var _this2 = this;
return function (snaksArray) {
_this2.props.onSnaksMapUpdate((0, _extends4.default)({}, _this2.props.snaksMap, (0, _defineProperty3.default)({}, propertyDescription.id, snaksArray)));
};
}
}, {
key: 'render',
value: function render() {
var _this3 = this;
var _props = this.props,
ignorePropertyIds = _props.ignorePropertyIds,
readOnly = _props.readOnly,
removeButtonLabel = _props.removeButtonLabel,
removeButtonConfirmMessageF = _props.removeButtonConfirmMessageF,
snaksMap = _props.snaksMap;
if (!snaksMap) return null;
var propertyIds = Object.keys(snaksMap).filter(function (propertyId) {
return ignorePropertyIds.indexOf(propertyId) === -1;
});
return _react2.default.createElement(
_PropertyDescriptionsProvider2.default,
{ propertyIds: propertyIds },
function (cache) {
return propertyIds.map(function (propertyId) {
var propertyDescription = cache[propertyId];
if (typeof propertyDescription === 'undefined') {
return _react2.default.createElement(PropertyIsLoadingTBody, {
key: propertyId,
propertyId: propertyId });
}
(0, _expect2.default)(propertyDescription).toBeA(_PropertyDescription2.default);
var removeButtonConfirmMessage = removeButtonConfirmMessageF(propertyDescription);
return _react2.default.createElement(_SnaksArrayEditor2.default, {
key: propertyId,
onSnaksArrayUpdate: _this3.handleSnaksArrayUpdateF(propertyDescription),
propertyDescription: propertyDescription,
readOnly: readOnly,
removeButtonConfirmMessage: removeButtonConfirmMessage,
removeButtonLabel: removeButtonLabel,
snaksArray: snaksMap[propertyId] });
});
}
);
}
}]);
return SnaksMapEditor;
}(_react.PureComponent);
SnaksMapEditor.propTypes = {
ignorePropertyIds: _propTypes2.default.arrayOf(_propTypes2.default.string),
onSnaksMapUpdate: _propTypes2.default.func.isRequired,
snaksMap: _propTypes2.default.object,
readOnly: _propTypes2.default.bool,
removeButtonLabel: _propTypes2.default.string.isRequired,
removeButtonConfirmMessageF: _propTypes2.default.func.isRequired
};
SnaksMapEditor.defaultProps = {
ignorePropertyIds: [],
readOnly: false
};
exports.default = SnaksMapEditor;
var PropertyIsLoadingTBody = function (_PureComponent2) {
(0, _inherits3.default)(PropertyIsLoadingTBody, _PureComponent2);
function PropertyIsLoadingTBody() {
(0, _classCallCheck3.default)(this, PropertyIsLoadingTBody);
return (0, _possibleConstructorReturn3.default)(this, (PropertyIsLoadingTBody.__proto__ || Object.getPrototypeOf(PropertyIsLoadingTBody)).apply(this, arguments));
}
(0, _createClass3.default)(PropertyIsLoadingTBody, [{
key: 'render',
value: function render() {
var propertyId = this.props.propertyId;
return _react2.default.createElement(
'tbody',
{ key: propertyId },
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'td',
{ colSpan: _SnaksArrayEditor2.default.TABLE_COLUMNS },
_react2.default.createElement(
'i',
null,
'Loading property description of ',
propertyId,
'...'
)
)
)
);
}
}]);
return PropertyIsLoadingTBody;
}(_react.PureComponent);
PropertyIsLoadingTBody.propTypes = {
propertyId: _propTypes2.default.string.isRequired
};
/***/ }),
/* 199 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _CacheValuesProvider = __webpack_require__(136);
var _CacheValuesProvider2 = _interopRequireDefault(_CacheValuesProvider);
var _labelDescriptionCache = __webpack_require__(102);
var _labelDescriptionCache2 = _interopRequireDefault(_labelDescriptionCache);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var LabelDescriptionsProvider = function (_PureComponent) {
(0, _inherits3.default)(LabelDescriptionsProvider, _PureComponent);
function LabelDescriptionsProvider() {
(0, _classCallCheck3.default)(this, LabelDescriptionsProvider);
return (0, _possibleConstructorReturn3.default)(this, (LabelDescriptionsProvider.__proto__ || Object.getPrototypeOf(LabelDescriptionsProvider)).apply(this, arguments));
}
(0, _createClass3.default)(LabelDescriptionsProvider, [{
key: 'render',
value: function render() {
var _props = this.props,
children = _props.children,
entityIds = _props.entityIds;
return _react2.default.createElement(
_CacheValuesProvider2.default,
{
cache: _labelDescriptionCache2.default,
cacheKeys: entityIds },
children
);
}
}]);
return LabelDescriptionsProvider;
}(_react.PureComponent);
LabelDescriptionsProvider.propTypes = {
children: _propTypes2.default.func.isRequired,
entityIds: _propTypes2.default.arrayOf(_propTypes2.default.string).isRequired
};
exports.default = LabelDescriptionsProvider;
/***/ }),
/* 200 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var DEFAULT_CALENDAR_MODEL = exports.DEFAULT_CALENDAR_MODEL = 'http://www.wikidata.org/entity/Q1985727';
var CALENDAR_MODELS = exports.CALENDAR_MODELS = ['http://www.wikidata.org/entity/Q1985786', // Юлианский
'http://www.wikidata.org/entity/Q1985727'];
var DEFAULT_PRECISION = exports.DEFAULT_PRECISION = 11;
var PRECISIONS = exports.PRECISIONS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
/***/ }),
/* 201 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.MODES = undefined;
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _BoundariesValueEditor = __webpack_require__(346);
var _BoundariesValueEditor2 = _interopRequireDefault(_BoundariesValueEditor);
var _Shapes = __webpack_require__(18);
var _EntityLabel = __webpack_require__(54);
var _EntityLabel2 = _interopRequireDefault(_EntityLabel);
var _ExactValueEditor = __webpack_require__(345);
var _ExactValueEditor2 = _interopRequireDefault(_ExactValueEditor);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _ModeSelect = __webpack_require__(344);
var _ModeSelect2 = _interopRequireDefault(_ModeSelect);
var _PlusMinusValueEditor = __webpack_require__(340);
var _PlusMinusValueEditor2 = _interopRequireDefault(_PlusMinusValueEditor);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _Quantity = __webpack_require__(339);
var _Quantity2 = _interopRequireDefault(_Quantity);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var MODES = exports.MODES = {
exact: _ExactValueEditor2.default,
plusMinus: _PlusMinusValueEditor2.default,
boundaries: _BoundariesValueEditor2.default
};
function detectAppropriateMode(datavalue) {
if (datavalue === undefined || datavalue === null || datavalue.value === undefined || datavalue.value === null) {
return 'exact';
}
var value = datavalue.value;
return Object.keys(MODES).find(function (mode) {
return MODES[mode].canBeUsedForValue(value);
});
}
var QuantityDataValueEditor = function (_PureComponent) {
(0, _inherits3.default)(QuantityDataValueEditor, _PureComponent);
function QuantityDataValueEditor() {
(0, _classCallCheck3.default)(this, QuantityDataValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (QuantityDataValueEditor.__proto__ || Object.getPrototypeOf(QuantityDataValueEditor)).apply(this, arguments));
_this.state = {
mode: detectAppropriateMode(_this.props.datavalue)
};
_this.handleModeChange = _this.handleModeChange.bind(_this);
_this.handleValueChange = _this.handleValueChange.bind(_this);
return _this;
}
(0, _createClass3.default)(QuantityDataValueEditor, [{
key: 'handleModeChange',
value: function handleModeChange(newMode) {
(0, _expect2.default)(newMode).toBeA('string');
this.setState({
mode: newMode
});
}
}, {
key: 'handleValueChange',
value: function handleValueChange(value) {
this.props.onDataValueChange((0, _extends3.default)({}, this.props.datavalue, {
type: 'quantity',
value: (0, _extends3.default)({}, value, {
unit: value && value.unit ? value.unit : '1'
})
}));
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
datavalue = _props.datavalue,
propertyDescription = _props.propertyDescription,
readOnly = _props.readOnly;
var mode = this.state.mode;
var editor = MODES[mode];
(0, _expect2.default)(editor).toBeA('function');
var value = (datavalue || {}).value || {};
var unit = value.unit || '1';
var classNames = [_Quantity2.default['wef_datavalue_quantity']];
if (readOnly) classNames.push(_Quantity2.default['wef_datavalue_quantity_readonly']);
if (readOnly) {
return _react2.default.createElement(
_react2.default.Fragment,
null,
_react2.default.createElement(
'td',
{ className: classNames.join(' '), colSpan: 12 },
_react2.default.createElement(editor, {
onValueChange: this.handleValueChange,
readOnly: true,
value: value
}),
_react2.default.createElement(
'a',
{
href: unit,
rel: 'noopener noreferrer',
target: '_blank' },
_react2.default.createElement(_EntityLabel2.default, {
entityId: unit.substr('http://www.wikidata.org/entity/'.length) })
)
)
);
}
(0, _expect2.default)(propertyDescription.quantityUnitEnabled).toBeA('boolean');
return _react2.default.createElement(
'td',
{ className: classNames.join(' '), colSpan: 12 },
_react2.default.createElement(
'table',
null,
_react2.default.createElement(
'tbody',
null,
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'td',
{ className: _Quantity2.default.modeselect },
_react2.default.createElement(_ModeSelect2.default, { mode: mode, onSelect: this.handleModeChange, value: value })
),
_react2.default.createElement(editor, {
onValueChange: this.handleValueChange,
value: value
})
),
propertyDescription.quantityUnitEnabled && _react2.default.createElement('td', { className: _Quantity2.default.unitselect })
)
)
);
}
}]);
return QuantityDataValueEditor;
}(_react.PureComponent);
QuantityDataValueEditor.propTypes = {
datavalue: _propTypes2.default.shape(_Shapes.DataValue),
onDataValueChange: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default),
readOnly: _propTypes2.default.bool
};
QuantityDataValueEditor.defaultProps = {
readOnly: false
};
exports.default = QuantityDataValueEditor;
/***/ }),
/* 202 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var calculateRgba = exports.calculateRgba = function calculateRgba(color, opacity) {
if (color[0] === '#') {
color = color.slice(1);
}
if (color.length === 3) {
var res = '';
color.split('').forEach(function (c) {
res += c;
res += c;
});
color = res;
}
var rgbValues = color.match(/.{2}/g).map(function (hex) {
return parseInt(hex, 16);
}).join(', ');
return 'rgba(' + rgbValues + ', ' + opacity + ')';
};
});
/***/ }),
/* 203 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactSpinners = __webpack_require__(134);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var MediawikiPreview = function (_Component) {
(0, _inherits3.default)(MediawikiPreview, _Component);
function MediawikiPreview() {
(0, _classCallCheck3.default)(this, MediawikiPreview);
var _this = (0, _possibleConstructorReturn3.default)(this, (MediawikiPreview.__proto__ || Object.getPrototypeOf(MediawikiPreview)).apply(this, arguments));
_this.state = {
html: null
};
_this.loadHtml = _this.loadHtml.bind(_this);
// initial loading
_this.loadHtml();
return _this;
}
(0, _createClass3.default)(MediawikiPreview, [{
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
if (prevProps.wikitext !== this.props.wikitext) {
this.setState({ html: null });
this.loadHtml();
}
}
}, {
key: 'loadHtml',
value: function loadHtml() {
var _this2 = this;
if (!this.props.wikitext) return;
var wikitext = this.props.wikitext;
new mw.Api().post({
action: 'parse',
contentmodel: 'wikitext',
disablelimitreport: true,
disableeditsection: true,
format: 'json',
prop: 'text',
text: wikitext
}).then(function (result) {
if (result.error) {
console.log(result);
mw.notify('Unable to expand templates: ' + result.error.info);
return;
}
if (_this2.props.wikitext === wikitext) {
_this2.setState({ html: result.parse.text['*'] });
}
});
}
}, {
key: 'render',
value: function render() {
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "wikitext" }] */
var _props = this.props,
spinnerSize = _props.spinnerSize,
wikitext = _props.wikitext,
other = (0, _objectWithoutProperties3.default)(_props, ['spinnerSize', 'wikitext']);
if (this.state.html) {
return _react2.default.createElement('div', (0, _extends3.default)({ dangerouslySetInnerHTML: { __html: this.state.html } }, other));
}
return _react2.default.createElement(_reactSpinners.ClipLoader, (0, _extends3.default)({ size: spinnerSize / 1.4 }, other));
}
}]);
return MediawikiPreview;
}(_react.Component);
MediawikiPreview.propTypes = {
spinnerSize: _propTypes2.default.number,
wikitext: _propTypes2.default.string.isRequired
};
exports.default = MediawikiPreview;
/***/ }),
/* 204 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(379);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 205 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _defineProperty2 = __webpack_require__(55);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _extends3 = __webpack_require__(7);
var _extends4 = _interopRequireDefault(_extends3);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _AnimatedTr = __webpack_require__(89);
var _AnimatedTr2 = _interopRequireDefault(_AnimatedTr);
var _Shapes = __webpack_require__(18);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _generateRandomString = __webpack_require__(88);
var _generateRandomString2 = _interopRequireDefault(_generateRandomString);
var _i18n = __webpack_require__(87);
var _i18n2 = _interopRequireDefault(_i18n);
var _NewQualifierAutosuggest = __webpack_require__(381);
var _NewQualifierAutosuggest2 = _interopRequireDefault(_NewQualifierAutosuggest);
var _NewQualifierSelect = __webpack_require__(378);
var _NewQualifierSelect2 = _interopRequireDefault(_NewQualifierSelect);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _SnaksMapEditor = __webpack_require__(198);
var _SnaksMapEditor2 = _interopRequireDefault(_SnaksMapEditor);
var _ClaimQualifiersTable = __webpack_require__(308);
var _ClaimQualifiersTable2 = _interopRequireDefault(_ClaimQualifiersTable);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ClaimQualifiersTable = function (_PureComponent) {
(0, _inherits3.default)(ClaimQualifiersTable, _PureComponent);
function ClaimQualifiersTable() {
(0, _classCallCheck3.default)(this, ClaimQualifiersTable);
var _this = (0, _possibleConstructorReturn3.default)(this, (ClaimQualifiersTable.__proto__ || Object.getPrototypeOf(ClaimQualifiersTable)).apply(this, arguments));
_this.state = {
hiddenBehindLabel: true,
addQualifierMode: _this.props.defaultAddQuailifier ? _this.props.allowedQualifiers.length > 0 ? 'SELECT' : 'AUTOSUGGEST' : 'HIDDEN'
};
var claimPropertyDescription = _this.props.claimPropertyDescription;
_this.confirmRemoveQualifierTemplate = _i18n2.default.confirmRemoveQualifierTemplate.replace('{claimPropertyId}', claimPropertyDescription.id).replace('{claimPropertyLabel}', claimPropertyDescription.label || claimPropertyDescription.id);
_this.handleQualifierAdd = _this.handleQualifierAdd.bind(_this);
_this.handleQualifiersUpdate = _this.handleQualifiersUpdate.bind(_this);
_this.removeButtonConfirmMessageF = _this.removeButtonConfirmMessageF.bind(_this);
_this.showFromBehindLabel = _this.showFromBehindLabel.bind(_this);
return _this;
}
(0, _createClass3.default)(ClaimQualifiersTable, [{
key: 'handleQualifierAdd',
value: function handleQualifierAdd(propertyId) {
if (propertyId === 'OTHER') {
// switch from simple select to complex autosuggest
this.setState({
addQualifierMode: 'AUTOSUGGEST'
});
return;
}
var claim = this.props.claim;
var qualifiers = claim.qualifiers || {};
var propertyQualifiers = qualifiers[propertyId] || [];
this.setState({
addQualifierMode: 'HIDDEN'
});
this.props.onClaimUpdate((0, _extends4.default)({}, claim, {
qualifiers: (0, _extends4.default)({}, qualifiers, (0, _defineProperty3.default)({}, propertyId, [].concat((0, _toConsumableArray3.default)(propertyQualifiers), [{
snaktype: 'value',
property: propertyId,
hash: (0, _generateRandomString2.default)()
}])))
}));
}
}, {
key: 'showFromBehindLabel',
value: function showFromBehindLabel() {
if (this.state.hiddenBehindLabel) {
this.setState({
hiddenBehindLabel: false
});
}
}
}, {
key: 'showQualifierSelect',
value: function showQualifierSelect() {
var allowedQualifiers = this.props.allowedQualifiers;
this.setState({
addQualifierMode: allowedQualifiers.length > 0 ? 'SELECT' : 'AUTOSUGGEST'
});
}
}, {
key: 'handleQualifiersUpdate',
value: function handleQualifiersUpdate(qualifiers) {
this.props.onClaimUpdate((0, _extends4.default)({}, this.props.claim, {
qualifiers: qualifiers
}));
}
}, {
key: 'removeButtonConfirmMessageF',
value: function removeButtonConfirmMessageF(qualifierPropertyDescription) {
(0, _expect2.default)(qualifierPropertyDescription).toBeA(_PropertyDescription2.default);
return this.confirmRemoveQualifierTemplate.replace('{qualifierPropertyId}', qualifierPropertyDescription.id).replace('{qualifierPropertyLabel}', qualifierPropertyDescription.label || qualifierPropertyDescription.id);
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
allowedQualifiers = _props.allowedQualifiers,
claim = _props.claim,
disabledQualifiers = _props.disabledQualifiers;
var _state = this.state,
addQualifierMode = _state.addQualifierMode,
hiddenBehindLabel = _state.hiddenBehindLabel;
var qualifiers = claim.qualifiers || {};
var alreadyPresentQualifiers = Object.keys(qualifiers).filter(function (propertyId) {
return qualifiers[propertyId].length > 0;
});
return _react2.default.createElement(
'table',
{
className: _ClaimQualifiersTable2.default.wef_claim_qualifiers_table,
onClick: this.showFromBehindLabel },
_react2.default.createElement(_SnaksMapEditor2.default, {
addButtonLabel: _i18n2.default.buttonLabelAddQualifier,
ignorePropertyIds: disabledQualifiers,
onSnaksMapUpdate: this.handleQualifiersUpdate,
readOnly: hiddenBehindLabel,
removeButtonConfirmMessageF: this.removeButtonConfirmMessageF,
removeButtonLabel: _i18n2.default.buttonLabelRemoveQualifier,
snaksMap: qualifiers }),
addQualifierMode === 'SELECT' && _react2.default.createElement(
'tbody',
{ className: _ClaimQualifiersTable2.default.wef_claim_new_qualifier },
_react2.default.createElement(
_AnimatedTr2.default,
null,
_react2.default.createElement(
'th',
{ colSpan: 2 },
_react2.default.createElement(_NewQualifierSelect2.default, {
allowedQualifiers: allowedQualifiers,
alreadyPresent: alreadyPresentQualifiers,
onSelect: this.handleQualifierAdd })
),
_react2.default.createElement('td', null)
)
),
addQualifierMode === 'AUTOSUGGEST' && _react2.default.createElement(
'tbody',
{ className: _ClaimQualifiersTable2.default.wef_claim_new_qualifier },
_react2.default.createElement(
_AnimatedTr2.default,
null,
_react2.default.createElement(
'th',
{ colSpan: 2 },
_react2.default.createElement(_NewQualifierAutosuggest2.default, { onSelect: this.handleQualifierAdd })
),
_react2.default.createElement('td', null)
)
)
);
}
}]);
return ClaimQualifiersTable;
}(_react.PureComponent);
ClaimQualifiersTable.propTypes = {
allowedQualifiers: _propTypes2.default.arrayOf(_propTypes2.default.string),
defaultAddQuailifier: _propTypes2.default.bool.isRequired,
disabledQualifiers: _propTypes2.default.arrayOf(_propTypes2.default.string),
claim: _propTypes2.default.shape(_Shapes.Claim).isRequired,
claimPropertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default).isRequired,
onClaimUpdate: _propTypes2.default.func.isRequired
};
ClaimQualifiersTable.defaultProps = {
allowedQualifiers: [],
disabledQualifiers: []
};
exports.default = ClaimQualifiersTable;
/***/ }),
/* 206 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ButtonCell = __webpack_require__(45);
var _ButtonCell2 = _interopRequireDefault(_ButtonCell);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ClaimDeleteButtonCell = function (_PureComponent) {
(0, _inherits3.default)(ClaimDeleteButtonCell, _PureComponent);
function ClaimDeleteButtonCell() {
(0, _classCallCheck3.default)(this, ClaimDeleteButtonCell);
var _this = (0, _possibleConstructorReturn3.default)(this, (ClaimDeleteButtonCell.__proto__ || Object.getPrototypeOf(ClaimDeleteButtonCell)).apply(this, arguments));
_this.handleClick = _this.handleClick.bind(_this);
return _this;
}
(0, _createClass3.default)(ClaimDeleteButtonCell, [{
key: 'handleClick',
value: function handleClick() {
var _props = this.props,
propertyId = _props.propertyId,
propertyLabel = _props.propertyLabel;
var question = _core2.default.confirmDeleteClaim //
.replace('{code}', propertyId) //
.replace('{label}', propertyLabel);
if (confirm(question)) {
this.props.onClaimDelete();
}
}
}, {
key: 'render',
value: function render() {
var disabled = this.props.disabled;
return _react2.default.createElement(_ButtonCell2.default, {
disabled: disabled,
icon: 'ui-icon-trash',
label: _core2.default.buttonRemoveClaim,
onClick: this.handleClick });
}
}]);
return ClaimDeleteButtonCell;
}(_react.PureComponent);
ClaimDeleteButtonCell.propTypes = {
disabled: _propTypes2.default.bool,
onClaimDelete: _propTypes2.default.func.isRequired,
propertyId: _propTypes2.default.string.isRequired,
propertyLabel: _propTypes2.default.string.isRequired
};
ClaimDeleteButtonCell.defaultProps = {
disabled: false
};
exports.default = ClaimDeleteButtonCell;
/***/ }),
/* 207 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ButtonCell = __webpack_require__(45);
var _ButtonCell2 = _interopRequireDefault(_ButtonCell);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ClaimAddButtonCell = function (_PureComponent) {
(0, _inherits3.default)(ClaimAddButtonCell, _PureComponent);
function ClaimAddButtonCell() {
(0, _classCallCheck3.default)(this, ClaimAddButtonCell);
return (0, _possibleConstructorReturn3.default)(this, (ClaimAddButtonCell.__proto__ || Object.getPrototypeOf(ClaimAddButtonCell)).apply(this, arguments));
}
(0, _createClass3.default)(ClaimAddButtonCell, [{
key: 'render',
value: function render() {
var _props = this.props,
disabled = _props.disabled,
onClick = _props.onClick;
return _react2.default.createElement(_ButtonCell2.default, {
disabled: disabled,
icon: 'ui-icon-plus',
label: _core2.default.buttonAddClaim,
onClick: onClick });
}
}]);
return ClaimAddButtonCell;
}(_react.PureComponent);
ClaimAddButtonCell.propTypes = {
disabled: _propTypes2.default.bool,
onClick: _propTypes2.default.func.isRequired
};
ClaimAddButtonCell.defaultProps = {
disabled: false
};
exports.default = ClaimAddButtonCell;
/***/ }),
/* 208 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _slicedToArray2 = __webpack_require__(215);
var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _selectors = __webpack_require__(403);
var selectors = _interopRequireWildcard(_selectors);
var _I18nUtils = __webpack_require__(17);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactAutosuggest = __webpack_require__(101);
var _reactAutosuggest2 = _interopRequireDefault(_reactAutosuggest);
var _reselect = __webpack_require__(51);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _LanguageAutocomplete = __webpack_require__(391);
var _LanguageAutocomplete2 = _interopRequireDefault(_LanguageAutocomplete);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var LanguageAutocomplete = function (_Component) {
(0, _inherits3.default)(LanguageAutocomplete, _Component);
function LanguageAutocomplete() {
(0, _classCallCheck3.default)(this, LanguageAutocomplete);
var _this = (0, _possibleConstructorReturn3.default)(this, (LanguageAutocomplete.__proto__ || Object.getPrototypeOf(LanguageAutocomplete)).apply(this, arguments));
_this.getEmptySuggestions = selectors.createEmptySuggestionsSelector();
/* we don't need to immediately update component when emptySuggestions
* changed -- so it is not in state */
_this.emptySuggestions = _this.getEmptySuggestions(_this.props.provided);
_this.state = {
value: _this.props.value,
suggestions: _this.emptySuggestions
};
_this.handleChange = _this.handleChange.bind(_this);
_this.paramsF = (0, _reselect.defaultMemoize)(function (value) {
return {
autoComplete: 'false',
className: _LanguageAutocomplete2.default['wef_languageSelect'],
onChange: _this.handleChange,
type: 'text',
value: value
};
});
_this.handleSuggestionsClearRequested = _this.handleSuggestionsClearRequested.bind(_this);
_this.handleSuggestionsFetchRequested = _this.handleSuggestionsFetchRequested.bind(_this);
_this.renderSuggestion = _this.renderSuggestion.bind(_this);
return _this;
}
(0, _createClass3.default)(LanguageAutocomplete, [{
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
if (prevProps.provided !== this.props.provided) {
this.emptySuggestions = this.getEmptySuggestions(this.props.provided);
}
if (prevProps.value !== this.props.value) {
this.setState({
value: this.props.value
});
}
}
}, {
key: 'handleSuggestionsClearRequested',
value: function handleSuggestionsClearRequested() {
this.setState({ suggestions: this.emptySuggestions });
}
}, {
key: 'handleSuggestionsFetchRequested',
value: function handleSuggestionsFetchRequested(_ref) {
var value = _ref.value;
var result = [].concat((0, _toConsumableArray3.default)(_I18nUtils.DEFAULT_LANGUAGES));
var added = new Set(result);
var codeNotYetIncluded = function codeNotYetIncluded(code) {
return !added.has(code);
};
var add = function add(code) {
added.add(code);result.push(code);
};
// iterate over codes first
Object.keys(_I18nUtils.LANGUAGE_TITLES).filter(codeNotYetIncluded).filter(function (code) {
return code.startsWith(value);
}).forEach(add);
Object.keys(_I18nUtils.LANGUAGE_TITLES).filter(codeNotYetIncluded).filter(function (code) {
return code.includes(value);
}).forEach(add);
Object.entries(_I18nUtils.LANGUAGE_TITLES).filter(function (_ref2) {
var _ref3 = (0, _slicedToArray3.default)(_ref2, 2),
code = _ref3[0],
title = _ref3[1];
return codeNotYetIncluded(code) && !!title && title.includes(value);
}).forEach(function (_ref4) {
var _ref5 = (0, _slicedToArray3.default)(_ref4, 1),
code = _ref5[0];
return add(code);
});
this.setState({ suggestions: result });
}
}, {
key: 'getSuggestionValue',
value: function getSuggestionValue(data) {
return data ? data : '';
}
}, {
key: 'handleChange',
value: function handleChange(event, _ref6) {
var newValue = _ref6.newValue;
this.setState({
value: newValue
});
if (!!newValue
// should be correct code: either in known languages or in provided array
&& (_I18nUtils.LANGUAGE_TITLES[newValue] || this.props.provided.indexOf(newValue) !== -1)) {
this.props.onChange(newValue);
}
}
}, {
key: 'render',
value: function render() {
var params = this.paramsF(this.state.value);
return _react2.default.createElement(_reactAutosuggest2.default, {
getSuggestionValue: this.getSuggestionValue,
inputProps: params,
onSuggestionsClearRequested: this.handleSuggestionsClearRequested,
onSuggestionsFetchRequested: this.handleSuggestionsFetchRequested,
renderSuggestion: this.renderSuggestion,
suggestions: this.state.suggestions,
theme: _LanguageAutocomplete2.default });
}
}, {
key: 'renderSuggestion',
value: function renderSuggestion(data, _ref7) {
var query = _ref7.query;
var string = data + (_I18nUtils.LANGUAGE_TITLES[data] ? ' — ' + _I18nUtils.LANGUAGE_TITLES[data] : '');
var spans = [];
string.split(query).forEach(function (substr, index, array) {
if (substr) {
spans.push(_react2.default.createElement(
'span',
{ key: 'i' + index + 'n' },
substr
));
}
if (index !== array.length - 1) {
spans.push(_react2.default.createElement(
'span',
{ className: _LanguageAutocomplete2.default.highlight, key: 'i' + index + 'b' },
query
));
}
});
return _react2.default.createElement(
'div',
{ className: _LanguageAutocomplete2.default.suggestionContent },
_react2.default.createElement(
'span',
{ className: _LanguageAutocomplete2.default.suggestionContentText + (this.props.provided.indexOf(data) !== -1 ? ' ' + _LanguageAutocomplete2.default.provided : '') },
spans
)
);
}
}]);
return LanguageAutocomplete;
}(_react.Component);
LanguageAutocomplete.propTypes = {
provided: _propTypes2.default.arrayOf(_propTypes2.default.string),
onChange: _propTypes2.default.func.isRequired,
value: _propTypes2.default.string
};
LanguageAutocomplete.defaultProps = {
provided: [],
value: _I18nUtils.DEFAULT_LANGUAGES[0]
};
exports.default = LanguageAutocomplete;
/***/ }),
/* 209 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.aliasValues = exports.aliasesFromEntityByLanguage = exports.descriptionValue = exports.descriptionFromEntityByLanguage = exports.labelValue = exports.labelFromEntityByLanguage = exports.listLabelalikeLanguages = undefined;
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _reselect = __webpack_require__(51);
var _I18nUtils = __webpack_require__(17);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var EMPTY_ARRAY = [];
var EMPTY_OBJECT = {};
var EMPTY_STRING = '';
var labelalikesFromEntity = function labelalikesFromEntity(entityElementName) {
return function (entity) {
return entity[entityElementName] || EMPTY_OBJECT;
};
};
var labelsFromEntity = labelalikesFromEntity('labels');
var descriptionsFromEntity = labelalikesFromEntity('descriptions');
var aliasesFromEntity = labelalikesFromEntity('aliases');
/* 3 different instances of the same thing -- since cache size is 1 */
var allLanguagesFromLabels = (0, _reselect.defaultMemoize)(function (labelalike) {
return Object.keys(labelalike);
});
var allLanguagesFromDescriptions = (0, _reselect.defaultMemoize)(function (labelalike) {
return Object.keys(labelalike);
});
var allLanguagesFromAliases = (0, _reselect.defaultMemoize)(function (labelalike) {
return Object.keys(labelalike);
});
var listLabelalikeLanguages = exports.listLabelalikeLanguages = (0, _reselect.createSelector)(function (entity) {
return allLanguagesFromLabels(labelsFromEntity(entity));
}, function (entity) {
return allLanguagesFromDescriptions(labelsFromEntity(entity));
}, function (entity) {
return allLanguagesFromAliases(labelsFromEntity(entity));
}, function (fromLabels, fromDescriptions, fromAliases) {
var result = [].concat((0, _toConsumableArray3.default)(_I18nUtils.DEFAULT_LANGUAGES));
var languages = new Set();
fromLabels.forEach(function (langCode) {
return languages.add(langCode);
});
fromDescriptions.forEach(function (langCode) {
return languages.add(langCode);
});
fromAliases.forEach(function (langCode) {
return languages.add(langCode);
});
// remove DEFAULT_LANGUAGES from set
result.forEach(function (langCode) {
return languages.delete(langCode);
});
var sorted = Array.from(languages);
sorted.sort();
sorted.forEach(function (langCode) {
return result.push(langCode);
});
return result;
});
var labelFromEntityByLanguage = exports.labelFromEntityByLanguage = (0, _reselect.defaultMemoize)(function (entity, language) {
var allLanguages = labelsFromEntity(entity) || EMPTY_OBJECT;
return allLanguages[language] || EMPTY_OBJECT;
});
var labelValue = exports.labelValue = function labelValue(labelObject) {
return (labelObject || EMPTY_OBJECT).value || EMPTY_STRING;
};
var descriptionFromEntityByLanguage = exports.descriptionFromEntityByLanguage = (0, _reselect.defaultMemoize)(function (entity, language) {
var allLanguages = descriptionsFromEntity(entity) || EMPTY_OBJECT;
return allLanguages[language] || EMPTY_OBJECT;
});
var descriptionValue = exports.descriptionValue = function descriptionValue(labelObject) {
return (labelObject || EMPTY_OBJECT).value || EMPTY_STRING;
};
var aliasesFromEntityByLanguage = exports.aliasesFromEntityByLanguage = (0, _reselect.defaultMemoize)(function (entity, language) {
var allLanguages = aliasesFromEntity(entity) || EMPTY_OBJECT;
return allLanguages[language] || EMPTY_ARRAY;
});
var aliasValues = exports.aliasValues = (0, _reselect.createSelector)(function (aliasObjects) {
return aliasObjects || EMPTY_ARRAY;
}, function (aliasObjects) {
return aliasObjects.map(function (alias) {
return alias.value;
});
});
/***/ }),
/* 210 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _CacheValueProvider = __webpack_require__(140);
var _CacheValueProvider2 = _interopRequireDefault(_CacheValueProvider);
var _labelDescriptionCache = __webpack_require__(102);
var _labelDescriptionCache2 = _interopRequireDefault(_labelDescriptionCache);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var LabelDescriptionProvider = function (_PureComponent) {
(0, _inherits3.default)(LabelDescriptionProvider, _PureComponent);
function LabelDescriptionProvider() {
(0, _classCallCheck3.default)(this, LabelDescriptionProvider);
return (0, _possibleConstructorReturn3.default)(this, (LabelDescriptionProvider.__proto__ || Object.getPrototypeOf(LabelDescriptionProvider)).apply(this, arguments));
}
(0, _createClass3.default)(LabelDescriptionProvider, [{
key: 'render',
value: function render() {
var _props = this.props,
children = _props.children,
entityId = _props.entityId;
return _react2.default.createElement(
_CacheValueProvider2.default,
{
cache: _labelDescriptionCache2.default,
cacheKey: entityId },
children
);
}
}]);
return LabelDescriptionProvider;
}(_react.PureComponent);
LabelDescriptionProvider.propTypes = {
children: _propTypes2.default.func.isRequired,
entityId: _propTypes2.default.string.isRequired
};
exports.default = LabelDescriptionProvider;
/***/ }),
/* 211 */
/***/ (function(module, exports, __webpack_require__) {
var pSlice = Array.prototype.slice;
var objectKeys = __webpack_require__(425);
var isArguments = __webpack_require__(424);
var deepEqual = module.exports = function (actual, expected, opts) {
if (!opts) opts = {};
// 7.1. All identical values are equivalent, as determined by ===.
if (actual === expected) {
return true;
} else if (actual instanceof Date && expected instanceof Date) {
return actual.getTime() === expected.getTime();
// 7.3. Other pairs that do not both pass typeof value == 'object',
// equivalence is determined by ==.
} else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') {
return opts.strict ? actual === expected : actual == expected;
// 7.4. For all other Object pairs, including Array objects, equivalence is
// determined by having the same number of owned properties (as verified
// with Object.prototype.hasOwnProperty.call), the same set of keys
// (although not necessarily the same order), equivalent values for every
// corresponding key, and an identical 'prototype' property. Note: this
// accounts for both named and indexed properties on Arrays.
} else {
return objEquiv(actual, expected, opts);
}
}
function isUndefinedOrNull(value) {
return value === null || value === undefined;
}
function isBuffer (x) {
if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false;
if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
return false;
}
if (x.length > 0 && typeof x[0] !== 'number') return false;
return true;
}
function objEquiv(a, b, opts) {
var i, key;
if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
return false;
// an identical 'prototype' property.
if (a.prototype !== b.prototype) return false;
//[[User:Vlsergey|<span style="color: #00F;">V</span><span style="color:#00D;">l</span><span style="color:#00B;">S</span><span style="color:#009;">e</span><span style="color:#007;">rg</span>ey]] <sup>([[User talk:Vlsergey|трёп]])</sup>I've managed to break Object.keys through screwy arguments passing.
// Converting to array solves the problem.
if (isArguments(a)) {
if (!isArguments(b)) {
return false;
}
a = pSlice.call(a);
b = pSlice.call(b);
return deepEqual(a, b, opts);
}
if (isBuffer(a)) {
if (!isBuffer(b)) {
return false;
}
if (a.length !== b.length) return false;
for (i = 0; i < a.length; i++) {
if (a[i] !== b[i]) return false;
}
return true;
}
try {
var ka = objectKeys(a),
kb = objectKeys(b);
} catch (e) {//happens when one is a string literal and the other isn't
return false;
}
// having the same number of owned properties (keys incorporates
// hasOwnProperty)
if (ka.length != kb.length)
return false;
//the same set of keys (although not necessarily the same order),
ka.sort();
kb.sort();
//[[User:Vlsergey|<span style="color: #00F;">V</span><span style="color:#00D;">l</span><span style="color:#00B;">S</span><span style="color:#009;">e</span><span style="color:#007;">rg</span>ey]] <sup>([[User talk:Vlsergey|трёп]])</sup>cheap key test
for (i = ka.length - 1; i >= 0; i--) {
if (ka[i] != kb[i])
return false;
}
//equivalent values for every corresponding key, and
//[[User:Vlsergey|<span style="color: #00F;">V</span><span style="color:#00D;">l</span><span style="color:#00B;">S</span><span style="color:#009;">e</span><span style="color:#007;">rg</span>ey]] <sup>([[User talk:Vlsergey|трёп]])</sup>possibly expensive deep test
for (i = ka.length - 1; i >= 0; i--) {
key = ka[i];
if (!deepEqual(a[key], b[key], opts)) return false;
}
return typeof a === typeof b;
}
/***/ }),
/* 212 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.buildStringCacheValuesFromEntity = undefined;
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _AbstractQueuedCacheWithPostcheck = __webpack_require__(142);
var _AbstractQueuedCacheWithPostcheck2 = _interopRequireDefault(_AbstractQueuedCacheWithPostcheck);
var _ModelUtils = __webpack_require__(213);
var _ApiUtils = __webpack_require__(29);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var TYPE = 'STRINGPROPERTYVALUES';
var PROPERTIES_TO_CACHE = ['P17', // country
'P37', // official language
'P41', // flag image
'P424'];
var ok = function ok(variable) {
return !!variable;
};
var EMPTY_ARRAY = [];
var buildStringCacheValuesFromEntity = exports.buildStringCacheValuesFromEntity = function buildStringCacheValuesFromEntity(entity) {
var entityResult = {};
entityResult.lastrevid = entity.lastrevid;
entityResult.pageid = entity.pageid;
PROPERTIES_TO_CACHE.forEach(function (propertyId) {
if (!entity.claims) {
entityResult[propertyId] = EMPTY_ARRAY;
return;
}
var values = (0, _ModelUtils.filterClaimsByRank)(entity.claims[propertyId]).filter(ok).map(function (claim) {
return claim.mainsnak;
}).filter(ok).map(function (mainsnak) {
return mainsnak.datavalue;
}).filter(ok).filter(function (datavalue) {
return datavalue.value;
}).map(function (datavalue) {
switch (datavalue.type) {
case 'string':
return datavalue.value;
case 'wikibase-entityid':
return datavalue.value.id;
default:
null;
}
});
entityResult[propertyId] = values;
});
return entityResult;
};
var StringPropertyValuesCache = function (_AbstractQueuedCacheW) {
(0, _inherits3.default)(StringPropertyValuesCache, _AbstractQueuedCacheW);
function StringPropertyValuesCache() {
(0, _classCallCheck3.default)(this, StringPropertyValuesCache);
return (0, _possibleConstructorReturn3.default)(this, (StringPropertyValuesCache.__proto__ || Object.getPrototypeOf(StringPropertyValuesCache)).call(this, TYPE, true, 10));
}
(0, _createClass3.default)(StringPropertyValuesCache, [{
key: 'isKeyValid',
value: function isKeyValid(cacheKey) {
return cacheKey.match(/^[PQ](\d+)$/i);
}
}, {
key: 'notifyMessage',
value: function notifyMessage(cacheKeys) {
return 'Fetching ' + cacheKeys.length + ' item(s) labels and descriptions from Wikidata';
}
}, {
key: 'buildRequestPromice',
value: function buildRequestPromice(cacheKeys) {
return (0, _ApiUtils.getWikidataApi)().getPromise({
action: 'wbgetentities',
props: 'claims|info',
ids: cacheKeys.join('|')
});
}
}, {
key: 'convertResultToEntities',
value: function convertResultToEntities(result) {
var cacheUpdate = {};
Object.values(result.entities).forEach(function (entity) {
cacheUpdate[entity.id] = buildStringCacheValuesFromEntity(entity);
});
return cacheUpdate;
}
}]);
return StringPropertyValuesCache;
}(_AbstractQueuedCacheWithPostcheck2.default);
var instance = new StringPropertyValuesCache();
exports.default = instance;
/***/ }),
/* 213 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.filterClaimsByRank = filterClaimsByRank;
exports.getEntityIdFromClaim = getEntityIdFromClaim;
exports.getEntityIdFromDatavalue = getEntityIdFromDatavalue;
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function filterClaimsByRank(claims) {
if (!claims) return [];
(0, _expect2.default)(claims).toBeAn('array');
var preferred = claims.filter(function (claim) {
return claim.rank === 'preferred';
});
if (preferred.length > 0) return preferred;
return claims.filter(function (claim) {
return claim.rank === 'normal';
});
}
function getEntityIdFromClaim(claim) {
if (typeof claim == 'undefined') return;
return getEntityIdFromSnak(claim.mainsnak);
}
/** @returns {String} */
function getEntityIdFromDatavalue(datavalue) {
if (typeof datavalue === 'undefined' //
|| typeof datavalue.value === 'undefined' //
|| typeof datavalue.value['entity-type'] === 'undefined' //
|| typeof datavalue.value['numeric-id'] === 'undefined' //
) return;
var entityType = datavalue.value['entity-type'];
var numericId = datavalue.value['numeric-id'];
switch (entityType) {
case 'property':
return 'P' + numericId;
case 'item':
return 'Q' + numericId;
default:
throw new Error('Unknown entity type: ' + entityType);
}
}
function getEntityIdFromSnak(snak) {
if (typeof snak === 'undefined') return;
return getEntityIdFromDatavalue(snak.datavalue);
}
/***/ }),
/* 214 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _AbstractQueuedCacheWithPostcheck = __webpack_require__(142);
var _AbstractQueuedCacheWithPostcheck2 = _interopRequireDefault(_AbstractQueuedCacheWithPostcheck);
var _I18nUtils = __webpack_require__(17);
var _ApiUtils = __webpack_require__(29);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var TYPE = 'PROPERTYDESCRIPTIONS';
var PropertyDescriptionCache = function (_AbstractQueuedCacheW) {
(0, _inherits3.default)(PropertyDescriptionCache, _AbstractQueuedCacheW);
function PropertyDescriptionCache() {
(0, _classCallCheck3.default)(this, PropertyDescriptionCache);
return (0, _possibleConstructorReturn3.default)(this, (PropertyDescriptionCache.__proto__ || Object.getPrototypeOf(PropertyDescriptionCache)).call(this, TYPE, true, 50));
}
(0, _createClass3.default)(PropertyDescriptionCache, [{
key: 'isKeyValid',
value: function isKeyValid(cacheKey) {
return cacheKey.match(/^P(\d+)$/i);
}
}, {
key: 'enchanceIndexedDbResult',
value: function enchanceIndexedDbResult(cachedValue) {
Object.setPrototypeOf(cachedValue, _PropertyDescription2.default.prototype);
return cachedValue;
}
}, {
key: 'notifyMessage',
value: function notifyMessage(cacheKeys) {
return 'Fetching ' + cacheKeys.length + ' property descriptions from Wikidata';
}
}, {
key: 'buildRequestPromice',
value: function buildRequestPromice(cacheKeys) {
return (0, _ApiUtils.getWikidataApi)().getPromise({
action: 'wbgetentities',
languages: _I18nUtils.API_PARAMETER_LANGUAGES,
languagefallback: true,
props: 'claims|datatype|labels|descriptions|info',
ids: cacheKeys.join('|')
});
}
}, {
key: 'convertResultToEntities',
value: function convertResultToEntities(result) {
var cacheUpdate = {};
Object.values(result.entities).filter(function (entity) {
return typeof entity.missing === 'undefined';
}).forEach(function (entity) {
var propertyDescription = new _PropertyDescription2.default(entity);
cacheUpdate[entity.id] = Object.freeze(propertyDescription);
});
return cacheUpdate;
}
}]);
return PropertyDescriptionCache;
}(_AbstractQueuedCacheWithPostcheck2.default);
var instance = new PropertyDescriptionCache();
exports.default = instance;
/***/ }),
/* 215 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _isIterable2 = __webpack_require__(435);
var _isIterable3 = _interopRequireDefault(_isIterable2);
var _getIterator2 = __webpack_require__(432);
var _getIterator3 = _interopRequireDefault(_getIterator2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function () {
function sliceIterator(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = (0, _getIterator3.default)(arr), _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 ((0, _isIterable3.default)(Object(arr))) {
return sliceIterator(arr, i);
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
}();
/***/ }),
/* 216 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _defineProperty2 = __webpack_require__(55);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _slicedToArray2 = __webpack_require__(215);
var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _AbstractQueuedCacheWithPostcheck = __webpack_require__(142);
var _AbstractQueuedCacheWithPostcheck2 = _interopRequireDefault(_AbstractQueuedCacheWithPostcheck);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var TYPE = 'PROPERTIESBYSPARQL';
var PropertiesBySparqlCache = function (_AbstractQueuedCacheW) {
(0, _inherits3.default)(PropertiesBySparqlCache, _AbstractQueuedCacheW);
function PropertiesBySparqlCache() {
(0, _classCallCheck3.default)(this, PropertiesBySparqlCache);
return (0, _possibleConstructorReturn3.default)(this, (PropertiesBySparqlCache.__proto__ || Object.getPrototypeOf(PropertiesBySparqlCache)).call(this, TYPE, true, 1));
}
(0, _createClass3.default)(PropertiesBySparqlCache, [{
key: 'notifyMessage',
value: function notifyMessage(cacheKeys) {
return 'Executing SPARQL query: ' + cacheKeys[0];
}
}, {
key: 'buildRequestPromice',
value: function buildRequestPromice(cacheKeys) {
var url = 'https://query.wikidata.org/sparql?query=' + encodeURIComponent(cacheKeys[0]);
return fetch(url, {
headers: {
Accept: 'application/sparql-results+json'
}
}).then(function (body) {
return body.json();
});
}
}, {
key: 'convertResultToEntities',
value: function convertResultToEntities(result, _ref) {
var _ref2 = (0, _slicedToArray3.default)(_ref, 1),
sparql = _ref2[0];
var columnName = result.head.vars[0];
var propertyIds = result.results.bindings.map(function (binding) {
var type = binding[columnName].type;
if (type != 'uri') {
throw new Error('SPARQL result column type must be \'uri\'');
}
var value = binding[columnName].value;
if (!value.startsWith('http://www.wikidata.org/entity/P')) {
throw new Error('SPARQL result column value must start \'http://www.wikidata.org/entity/P\'');
}
return value.substr('http://www.wikidata.org/entity/'.length);
});
/* eslint no-undef: 0 */
if (false) {}
return (0, _defineProperty3.default)({}, sparql, propertyIds);
}
}]);
return PropertiesBySparqlCache;
}(_AbstractQueuedCacheWithPostcheck2.default);
var instance = new PropertiesBySparqlCache();
exports.default = instance;
/***/ }),
/* 217 */
/***/ (function(module, exports) {
var charenc = {
// UTF-8 encoding
utf8: {
// Convert a string to a byte array
stringToBytes: function(str) {
return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
},
// Convert a byte array to a string
bytesToString: function(bytes) {
return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
}
},
// Binary encoding
bin: {
// Convert a string to a byte array
stringToBytes: function(str) {
for (var bytes = [], i = 0; i < str.length; i++)
bytes.push(str.charCodeAt(i) & 0xFF);
return bytes;
},
// Convert a byte array to a string
bytesToString: function(bytes) {
for (var str = [], i = 0; i < bytes.length; i++)
str.push(String.fromCharCode(bytes[i]));
return str.join('');
}
}
};
module.exports = charenc;
/***/ }),
/* 218 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _AbstractQueuedCache2 = __webpack_require__(103);
var _AbstractQueuedCache3 = _interopRequireDefault(_AbstractQueuedCache2);
var _ApiUtils = __webpack_require__(29);
var _md = __webpack_require__(439);
var _md2 = _interopRequireDefault(_md);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var TYPE = 'FLAGIMAGEHTMLS';
var openTagF = function openTagF(fileName) {
return '<div data-filename=\"' + (0, _md2.default)(fileName) + '\">';
};
var closeTagF = function closeTagF() {
return '</div>';
};
var FlagImageHtmlCache = function (_AbstractQueuedCache) {
(0, _inherits3.default)(FlagImageHtmlCache, _AbstractQueuedCache);
function FlagImageHtmlCache() {
(0, _classCallCheck3.default)(this, FlagImageHtmlCache);
return (0, _possibleConstructorReturn3.default)(this, (FlagImageHtmlCache.__proto__ || Object.getPrototypeOf(FlagImageHtmlCache)).call(this, TYPE, false, 50));
}
(0, _createClass3.default)(FlagImageHtmlCache, [{
key: 'notifyMessage',
value: function notifyMessage(fileNames) {
return 'Rendering ' + fileNames.length + ' flag images on server';
}
}, {
key: 'buildRequestPromice',
value: function buildRequestPromice(fileNames) {
return (0, _ApiUtils.getServerApi)().postPromise({
action: 'parse',
contentmodel: 'wikitext',
disablelimitreport: true,
disableeditsection: true,
format: 'json',
prop: 'text',
text: fileNames.map(function (fileName) {
return openTagF(fileName) + '[[File:' + fileName + '|22x22px|frameless|link=]]' + closeTagF(fileName);
}).join('\r\n')
});
}
}, {
key: 'convertResultToEntities',
value: function convertResultToEntities(result, fileNames) {
var cacheUpdate = {};
var html = result.parse.text['*'];
fileNames.forEach(function (fileName) {
var openTag = openTagF(fileName);
var closeTag = closeTagF(fileName);
var start = html.indexOf(openTag);
if (start === -1) {
mw.log('Not found HTML for fileName "' + fileName + '"');
return;
}
var end = html.indexOf(closeTag, start);
if (end === -1) {
mw.log('Incorrect HTML for fileName "' + fileName + '"');
return;
}
var imageHtml = html.substring(start + openTag.length, end);
cacheUpdate[fileName] = imageHtml;
});
return cacheUpdate;
}
}]);
return FlagImageHtmlCache;
}(_AbstractQueuedCache3.default);
var instance = new FlagImageHtmlCache();
exports.default = instance;
/***/ }),
/* 219 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
exports.default = findByKeysInObjectStore;
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
var compare = indexedDB ? indexedDB.cmp.bind(indexedDB) : undefined;
var EMPTY_OBJECT = {};
function findByKeysInObjectStore(objectStore, unsortedKeys) {
(0, _expect2.default)(objectStore).toBeA(IDBObjectStore);
(0, _expect2.default)(unsortedKeys).toBeAn('array');
if (unsortedKeys.length === 0) {
return Promise.resolve(EMPTY_OBJECT);
}
return new Promise(function (resolve, reject) {
var sortedKeys = [].concat((0, _toConsumableArray3.default)(unsortedKeys)).sort(compare);
var index = 0;
var result = {};
var keyRange = IDBKeyRange.bound(sortedKeys[0], sortedKeys[sortedKeys.length - 1]);
var request = objectStore.openCursor(keyRange);
request.onsuccess = function (event) {
var cursor = event.target.result;
if (cursor) {
if (cursor.key === sortedKeys[index] && cursor.value) {
result[sortedKeys[index]] = cursor.value;
}
while (index < sortedKeys.length && compare(sortedKeys[index], cursor.key) <= 0) {
index++;
}
}
if (cursor && index < sortedKeys.length) {
cursor.continue(sortedKeys[index]);
return;
}
resolve(result);
};
request.onerror = reject;
});
}
/***/ }),
/* 220 */
/***/ (function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(156);
var TAG = __webpack_require__(39)('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;
};
/***/ }),
/* 221 */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(220);
var ITERATOR = __webpack_require__(39)('iterator');
var Iterators = __webpack_require__(78);
module.exports = __webpack_require__(34).getIteratorMethod = function (it) {
if (it != undefined) return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ }),
/* 222 */
/***/ (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;
};
/***/ }),
/* 223 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toStr = Object.prototype.toString;
var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';
if (hasSymbols) {
var symToStr = Symbol.prototype.toString;
var symStringRegex = /^Symbol\(.*\)$/;
var isSymbolObject = function isSymbolObject(value) {
if (typeof value.valueOf() !== 'symbol') { return false; }
return symStringRegex.test(symToStr.call(value));
};
module.exports = function isSymbol(value) {
if (typeof value === 'symbol') { return true; }
if (toStr.call(value) !== '[object Symbol]') { return false; }
try {
return isSymbolObject(value);
} catch (e) {
return false;
}
};
} else {
module.exports = function isSymbol(value) {
// this environment does not support Symbols.
return false;
};
}
/***/ }),
/* 224 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fnToStr = Function.prototype.toString;
var constructorRegex = /^\s*class /;
var isES6ClassFn = function isES6ClassFn(value) {
try {
var fnStr = fnToStr.call(value);
var singleStripped = fnStr.replace(/\/\/.*\n/g, '');
var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, '');
var spaceStripped = multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' ');
return constructorRegex.test(spaceStripped);
} catch (e) {
return false; // not a function
}
};
var tryFunctionObject = function tryFunctionObject(value) {
try {
if (isES6ClassFn(value)) { return false; }
fnToStr.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var fnClass = '[object Function]';
var genClass = '[object GeneratorFunction]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
module.exports = function isCallable(value) {
if (!value) { return false; }
if (typeof value !== 'function' && typeof value !== 'object') { return false; }
if (hasToStringTag) { return tryFunctionObject(value); }
if (isES6ClassFn(value)) { return false; }
var strClass = toStr.call(value);
return strClass === fnClass || strClass === genClass;
};
/***/ }),
/* 225 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var has = __webpack_require__(144);
var regexExec = RegExp.prototype.exec;
var gOPD = Object.getOwnPropertyDescriptor;
var tryRegexExecCall = function tryRegexExec(value) {
try {
var lastIndex = value.lastIndex;
value.lastIndex = 0;
regexExec.call(value);
return true;
} catch (e) {
return false;
} finally {
value.lastIndex = lastIndex;
}
};
var toStr = Object.prototype.toString;
var regexClass = '[object RegExp]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
module.exports = function isRegex(value) {
if (!value || typeof value !== 'object') {
return false;
}
if (!hasToStringTag) {
return toStr.call(value) === regexClass;
}
var descriptor = gOPD(value, 'lastIndex');
var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
if (!hasLastIndexDataProperty) {
return false;
}
return tryRegexExecCall(value);
};
/***/ }),
/* 226 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.stringContains = exports.objectContains = exports.arrayContains = exports.functionThrows = exports.isA = exports.isObject = exports.isArray = exports.isFunction = exports.isEqual = exports.whyNotEqual = undefined;
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 _isRegex = __webpack_require__(225);
var _isRegex2 = _interopRequireDefault(_isRegex);
var _why = __webpack_require__(477);
var _why2 = _interopRequireDefault(_why);
var _objectKeys = __webpack_require__(227);
var _objectKeys2 = _interopRequireDefault(_objectKeys);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Returns the reason why the given arguments are not *conceptually*
* equal, if any; the empty string otherwise.
*/
var whyNotEqual = exports.whyNotEqual = function whyNotEqual(a, b) {
return a == b ? '' : (0, _why2.default)(a, b);
};
/**
* Returns true if the given arguments are *conceptually* equal.
*/
var isEqual = exports.isEqual = function isEqual(a, b) {
return whyNotEqual(a, b) === '';
};
/**
* Returns true if the given object is a function.
*/
var isFunction = exports.isFunction = function isFunction(object) {
return typeof object === 'function';
};
/**
* Returns true if the given object is an array.
*/
var isArray = exports.isArray = function isArray(object) {
return Array.isArray(object);
};
/**
* Returns true if the given object is an object.
*/
var isObject = exports.isObject = function isObject(object) {
return object && !isArray(object) && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object';
};
/**
* Returns true if the given object is an instanceof value
* or its typeof is the given value.
*/
var isA = exports.isA = function isA(object, value) {
if (isFunction(value)) return object instanceof value;
if (value === 'array') return Array.isArray(object);
return (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === value;
};
/**
* Returns true if the given function throws the given value
* when invoked. The value may be:
*
* - undefined, to merely assert there was a throw
* - a constructor function, for comparing using instanceof
* - a regular expression, to compare with the error message
* - a string, to find in the error message
*/
var functionThrows = exports.functionThrows = function functionThrows(fn, context, args, value) {
try {
fn.apply(context, args);
} catch (error) {
if (value == null) return true;
if (isFunction(value) && error instanceof value) return true;
var message = error.message || error;
if (typeof message === 'string') {
if ((0, _isRegex2.default)(value) && value.test(error.message)) return true;
if (typeof value === 'string' && message.indexOf(value) !== -1) return true;
}
}
return false;
};
/**
* Returns true if the given array contains the value, false
* otherwise. The compareValues function must return false to
* indicate a non-match.
*/
var arrayContains = exports.arrayContains = function arrayContains(array, value, compareValues) {
return array.some(function (item) {
return compareValues(item, value) !== false;
});
};
var ownEnumerableKeys = function ownEnumerableKeys(object) {
if ((typeof Reflect === 'undefined' ? 'undefined' : _typeof(Reflect)) === 'object' && typeof Reflect.ownKeys === 'function') {
return Reflect.ownKeys(object).filter(function (key) {
return Object.getOwnPropertyDescriptor(object, key).enumerable;
});
}
if (typeof Object.getOwnPropertySymbols === 'function') {
return Object.getOwnPropertySymbols(object).filter(function (key) {
return Object.getOwnPropertyDescriptor(object, key).enumerable;
}).concat((0, _objectKeys2.default)(object));
}
return (0, _objectKeys2.default)(object);
};
/**
* Returns true if the given object contains the value, false
* otherwise. The compareValues function must return false to
* indicate a non-match.
*/
var objectContains = exports.objectContains = function objectContains(object, value, compareValues) {
return ownEnumerableKeys(value).every(function (k) {
if (isObject(object[k]) && isObject(value[k])) return objectContains(object[k], value[k], compareValues);
return compareValues(object[k], value[k]);
});
};
/**
* Returns true if the given string contains the value, false otherwise.
*/
var stringContains = exports.stringContains = function stringContains(string, value) {
return string.indexOf(value) !== -1;
};
/***/ }),
/* 227 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// modified from https://github.com/es-shims/es5-shim
var has = Object.prototype.hasOwnProperty;
var toStr = Object.prototype.toString;
var slice = Array.prototype.slice;
var isArgs = __webpack_require__(479);
var isEnumerable = Object.prototype.propertyIsEnumerable;
var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
var dontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
];
var equalsConstructorPrototype = function (o) {
var ctor = o.constructor;
return ctor && ctor.prototype === o;
};
var excludedKeys = {
$console: true,
$external: true,
$frame: true,
$frameElement: true,
$frames: true,
$innerHeight: true,
$innerWidth: true,
$outerHeight: true,
$outerWidth: true,
$pageXOffset: true,
$pageYOffset: true,
$parent: true,
$scrollLeft: true,
$scrollTop: true,
$scrollX: true,
$scrollY: true,
$self: true,
$webkitIndexedDB: true,
$webkitStorageInfo: true,
$window: true
};
var hasAutomationEqualityBug = (function () {
/* global window */
if (typeof window === 'undefined') { return false; }
for (var k in window) {
try {
if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
try {
equalsConstructorPrototype(window[k]);
} catch (e) {
return true;
}
}
} catch (e) {
return true;
}
}
return false;
}());
var equalsConstructorPrototypeIfNotBuggy = function (o) {
/* global window */
if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
return equalsConstructorPrototype(o);
}
try {
return equalsConstructorPrototype(o);
} catch (e) {
return false;
}
};
var keysShim = function keys(object) {
var isObject = object !== null && typeof object === 'object';
var isFunction = toStr.call(object) === '[object Function]';
var isArguments = isArgs(object);
var isString = isObject && toStr.call(object) === '[object String]';
var theKeys = [];
if (!isObject && !isFunction && !isArguments) {
throw new TypeError('Object.keys called on a non-object');
}
var skipProto = hasProtoEnumBug && isFunction;
if (isString && object.length > 0 && !has.call(object, 0)) {
for (var i = 0; i < object.length; ++i) {
theKeys.push(String(i));
}
}
if (isArguments && object.length > 0) {
for (var j = 0; j < object.length; ++j) {
theKeys.push(String(j));
}
} else {
for (var name in object) {
if (!(skipProto && name === 'prototype') && has.call(object, name)) {
theKeys.push(String(name));
}
}
}
if (hasDontEnumBug) {
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
for (var k = 0; k < dontEnums.length; ++k) {
if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
theKeys.push(dontEnums[k]);
}
}
}
return theKeys;
};
keysShim.shim = function shimObjectKeys() {
if (Object.keys) {
var keysWorksWithArguments = (function () {
// Safari 5.0 bug
return (Object.keys(arguments) || '').length === 2;
}(1, 2));
if (!keysWorksWithArguments) {
var originalKeys = Object.keys;
Object.keys = function keys(object) {
if (isArgs(object)) {
return originalKeys(slice.call(object));
} else {
return originalKeys(object);
}
};
}
} else {
Object.keys = keysShim;
}
return Object.keys || keysShim;
};
module.exports = keysShim;
/***/ }),
/* 228 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.spyOn = exports.createSpy = exports.restoreSpies = exports.isSpy = undefined;
var _defineProperties = __webpack_require__(480);
var _assert = __webpack_require__(143);
var _assert2 = _interopRequireDefault(_assert);
var _TestUtils = __webpack_require__(226);
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); } } /*eslint-disable prefer-rest-params, no-underscore-dangle*/
var noop = function noop() {};
var supportsConfigurableFnLength = _defineProperties.supportsDescriptors && Object.getOwnPropertyDescriptor(function () {}, 'length').configurable;
var isSpy = exports.isSpy = function isSpy(object) {
return object && object.__isSpy === true;
};
var spies = [];
var restoreSpies = exports.restoreSpies = function restoreSpies() {
for (var i = spies.length - 1; i >= 0; i--) {
spies[i].restore();
}spies = [];
};
var createSpy = exports.createSpy = function createSpy(fn) {
var restore = arguments.length <= 1 || arguments[1] === undefined ? noop : arguments[1];
if (fn == null) fn = noop;
(0, _assert2.default)((0, _TestUtils.isFunction)(fn), 'createSpy needs a function');
var targetFn = void 0,
thrownValue = void 0,
returnValue = void 0,
spy = void 0;
function spyLogic() {
spy.calls.push({
context: this,
arguments: Array.prototype.slice.call(arguments, 0)
});
if (targetFn) return targetFn.apply(this, arguments);
if (thrownValue) throw thrownValue;
return returnValue;
}
if (supportsConfigurableFnLength) {
spy = Object.defineProperty(spyLogic, 'length', { value: fn.length, writable: false, enumerable: false, configurable: true });
} else {
spy = new Function('spy', 'return function(' + // eslint-disable-line no-new-func
[].concat(_toConsumableArray(Array(fn.length))).map(function (_, i) {
return '_' + i;
}).join(',') + ') {\n return spy.apply(this, arguments)\n }')(spyLogic);
}
spy.calls = [];
spy.andCall = function (otherFn) {
targetFn = otherFn;
return spy;
};
spy.andCallThrough = function () {
return spy.andCall(fn);
};
spy.andThrow = function (value) {
thrownValue = value;
return spy;
};
spy.andReturn = function (value) {
returnValue = value;
return spy;
};
spy.getLastCall = function () {
return spy.calls[spy.calls.length - 1];
};
spy.reset = function () {
spy.calls = [];
};
spy.restore = spy.destroy = restore;
spy.__isSpy = true;
spies.push(spy);
return spy;
};
var spyOn = exports.spyOn = function spyOn(object, methodName) {
var original = object[methodName];
if (!isSpy(original)) {
(0, _assert2.default)((0, _TestUtils.isFunction)(original), 'Cannot spyOn the %s property; it is not a function', methodName);
object[methodName] = createSpy(original, function () {
object[methodName] = original;
});
}
return object[methodName];
};
/***/ }),
/* 229 */
/***/ (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 ? "symbol" : typeof obj; };
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 _has = __webpack_require__(144);
var _has2 = _interopRequireDefault(_has);
var _tmatch = __webpack_require__(488);
var _tmatch2 = _interopRequireDefault(_tmatch);
var _assert = __webpack_require__(143);
var _assert2 = _interopRequireDefault(_assert);
var _SpyUtils = __webpack_require__(228);
var _TestUtils = __webpack_require__(226);
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"); } }
/**
* An Expectation is a wrapper around an assertion that allows it to be written
* in a more natural style, without the need to remember the order of arguments.
* This helps prevent you from making mistakes when writing tests.
*/
var Expectation = function () {
function Expectation(actual) {
_classCallCheck(this, Expectation);
this.actual = actual;
if ((0, _TestUtils.isFunction)(actual)) {
this.context = null;
this.args = [];
}
}
_createClass(Expectation, [{
key: 'toExist',
value: function toExist(message) {
(0, _assert2.default)(this.actual, message || 'Expected %s to exist', this.actual);
return this;
}
}, {
key: 'toNotExist',
value: function toNotExist(message) {
(0, _assert2.default)(!this.actual, message || 'Expected %s to not exist', this.actual);
return this;
}
}, {
key: 'toBe',
value: function toBe(value, message) {
(0, _assert2.default)(this.actual === value, message || 'Expected %s to be %s', this.actual, value);
return this;
}
}, {
key: 'toNotBe',
value: function toNotBe(value, message) {
(0, _assert2.default)(this.actual !== value, message || 'Expected %s to not be %s', this.actual, value);
return this;
}
}, {
key: 'toEqual',
value: function toEqual(value, message) {
try {
(0, _assert2.default)((0, _TestUtils.isEqual)(this.actual, value), message || 'Expected %s to equal %s', this.actual, value);
} catch (error) {
// These attributes are consumed by Mocha to produce a diff output.
error.actual = this.actual;
error.expected = value;
error.showDiff = true;
throw error;
}
return this;
}
}, {
key: 'toNotEqual',
value: function toNotEqual(value, message) {
(0, _assert2.default)(!(0, _TestUtils.isEqual)(this.actual, value), message || 'Expected %s to not equal %s', this.actual, value);
return this;
}
}, {
key: 'toThrow',
value: function toThrow(value, message) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).toThrow() must be a function, %s was given', this.actual);
(0, _assert2.default)((0, _TestUtils.functionThrows)(this.actual, this.context, this.args, value), message || 'Expected %s to throw %s', this.actual, value || 'an error');
return this;
}
}, {
key: 'toNotThrow',
value: function toNotThrow(value, message) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).toNotThrow() must be a function, %s was given', this.actual);
(0, _assert2.default)(!(0, _TestUtils.functionThrows)(this.actual, this.context, this.args, value), message || 'Expected %s to not throw %s', this.actual, value || 'an error');
return this;
}
}, {
key: 'toBeA',
value: function toBeA(value, message) {
(0, _assert2.default)((0, _TestUtils.isFunction)(value) || typeof value === 'string', 'The "value" argument in toBeA(value) must be a function or a string');
(0, _assert2.default)((0, _TestUtils.isA)(this.actual, value), message || 'Expected %s to be a %s', this.actual, value);
return this;
}
}, {
key: 'toNotBeA',
value: function toNotBeA(value, message) {
(0, _assert2.default)((0, _TestUtils.isFunction)(value) || typeof value === 'string', 'The "value" argument in toNotBeA(value) must be a function or a string');
(0, _assert2.default)(!(0, _TestUtils.isA)(this.actual, value), message || 'Expected %s to not be a %s', this.actual, value);
return this;
}
}, {
key: 'toMatch',
value: function toMatch(pattern, message) {
(0, _assert2.default)((0, _tmatch2.default)(this.actual, pattern), message || 'Expected %s to match %s', this.actual, pattern);
return this;
}
}, {
key: 'toNotMatch',
value: function toNotMatch(pattern, message) {
(0, _assert2.default)(!(0, _tmatch2.default)(this.actual, pattern), message || 'Expected %s to not match %s', this.actual, pattern);
return this;
}
}, {
key: 'toBeLessThan',
value: function toBeLessThan(value, message) {
(0, _assert2.default)(typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeLessThan() must be a number');
(0, _assert2.default)(typeof value === 'number', 'The "value" argument in toBeLessThan(value) must be a number');
(0, _assert2.default)(this.actual < value, message || 'Expected %s to be less than %s', this.actual, value);
return this;
}
}, {
key: 'toBeLessThanOrEqualTo',
value: function toBeLessThanOrEqualTo(value, message) {
(0, _assert2.default)(typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeLessThanOrEqualTo() must be a number');
(0, _assert2.default)(typeof value === 'number', 'The "value" argument in toBeLessThanOrEqualTo(value) must be a number');
(0, _assert2.default)(this.actual <= value, message || 'Expected %s to be less than or equal to %s', this.actual, value);
return this;
}
}, {
key: 'toBeGreaterThan',
value: function toBeGreaterThan(value, message) {
(0, _assert2.default)(typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeGreaterThan() must be a number');
(0, _assert2.default)(typeof value === 'number', 'The "value" argument in toBeGreaterThan(value) must be a number');
(0, _assert2.default)(this.actual > value, message || 'Expected %s to be greater than %s', this.actual, value);
return this;
}
}, {
key: 'toBeGreaterThanOrEqualTo',
value: function toBeGreaterThanOrEqualTo(value, message) {
(0, _assert2.default)(typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeGreaterThanOrEqualTo() must be a number');
(0, _assert2.default)(typeof value === 'number', 'The "value" argument in toBeGreaterThanOrEqualTo(value) must be a number');
(0, _assert2.default)(this.actual >= value, message || 'Expected %s to be greater than or equal to %s', this.actual, value);
return this;
}
}, {
key: 'toInclude',
value: function toInclude(value, compareValues, message) {
if (typeof compareValues === 'string') {
message = compareValues;
compareValues = null;
}
if (compareValues == null) compareValues = _TestUtils.isEqual;
var contains = false;
if ((0, _TestUtils.isArray)(this.actual)) {
contains = (0, _TestUtils.arrayContains)(this.actual, value, compareValues);
} else if ((0, _TestUtils.isObject)(this.actual)) {
contains = (0, _TestUtils.objectContains)(this.actual, value, compareValues);
} else if (typeof this.actual === 'string') {
contains = (0, _TestUtils.stringContains)(this.actual, value);
} else {
(0, _assert2.default)(false, 'The "actual" argument in expect(actual).toInclude() must be an array, object, or a string');
}
(0, _assert2.default)(contains, message || 'Expected %s to include %s', this.actual, value);
return this;
}
}, {
key: 'toExclude',
value: function toExclude(value, compareValues, message) {
if (typeof compareValues === 'string') {
message = compareValues;
compareValues = null;
}
if (compareValues == null) compareValues = _TestUtils.isEqual;
var contains = false;
if ((0, _TestUtils.isArray)(this.actual)) {
contains = (0, _TestUtils.arrayContains)(this.actual, value, compareValues);
} else if ((0, _TestUtils.isObject)(this.actual)) {
contains = (0, _TestUtils.objectContains)(this.actual, value, compareValues);
} else if (typeof this.actual === 'string') {
contains = (0, _TestUtils.stringContains)(this.actual, value);
} else {
(0, _assert2.default)(false, 'The "actual" argument in expect(actual).toExclude() must be an array, object, or a string');
}
(0, _assert2.default)(!contains, message || 'Expected %s to exclude %s', this.actual, value);
return this;
}
}, {
key: 'toIncludeKeys',
value: function toIncludeKeys(keys, comparator, message) {
var _this = this;
if (typeof comparator === 'string') {
message = comparator;
comparator = null;
}
if (comparator == null) comparator = _has2.default;
(0, _assert2.default)(_typeof(this.actual) === 'object', 'The "actual" argument in expect(actual).toIncludeKeys() must be an object, not %s', this.actual);
(0, _assert2.default)((0, _TestUtils.isArray)(keys), 'The "keys" argument in expect(actual).toIncludeKeys(keys) must be an array, not %s', keys);
var contains = keys.every(function (key) {
return comparator(_this.actual, key);
});
(0, _assert2.default)(contains, message || 'Expected %s to include key(s) %s', this.actual, keys.join(', '));
return this;
}
}, {
key: 'toIncludeKey',
value: function toIncludeKey(key) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return this.toIncludeKeys.apply(this, [[key]].concat(args));
}
}, {
key: 'toExcludeKeys',
value: function toExcludeKeys(keys, comparator, message) {
var _this2 = this;
if (typeof comparator === 'string') {
message = comparator;
comparator = null;
}
if (comparator == null) comparator = _has2.default;
(0, _assert2.default)(_typeof(this.actual) === 'object', 'The "actual" argument in expect(actual).toExcludeKeys() must be an object, not %s', this.actual);
(0, _assert2.default)((0, _TestUtils.isArray)(keys), 'The "keys" argument in expect(actual).toIncludeKeys(keys) must be an array, not %s', keys);
var contains = keys.every(function (key) {
return comparator(_this2.actual, key);
});
(0, _assert2.default)(!contains, message || 'Expected %s to exclude key(s) %s', this.actual, keys.join(', '));
return this;
}
}, {
key: 'toExcludeKey',
value: function toExcludeKey(key) {
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
return this.toExcludeKeys.apply(this, [[key]].concat(args));
}
}, {
key: 'toHaveBeenCalled',
value: function toHaveBeenCalled(message) {
var spy = this.actual;
(0, _assert2.default)((0, _SpyUtils.isSpy)(spy), 'The "actual" argument in expect(actual).toHaveBeenCalled() must be a spy');
(0, _assert2.default)(spy.calls.length > 0, message || 'spy was not called');
return this;
}
}, {
key: 'toHaveBeenCalledWith',
value: function toHaveBeenCalledWith() {
for (var _len3 = arguments.length, expectedArgs = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
expectedArgs[_key3] = arguments[_key3];
}
var spy = this.actual;
(0, _assert2.default)((0, _SpyUtils.isSpy)(spy), 'The "actual" argument in expect(actual).toHaveBeenCalledWith() must be a spy');
(0, _assert2.default)(spy.calls.some(function (call) {
return (0, _TestUtils.isEqual)(call.arguments, expectedArgs);
}), 'spy was never called with %s', expectedArgs);
return this;
}
}, {
key: 'toNotHaveBeenCalled',
value: function toNotHaveBeenCalled(message) {
var spy = this.actual;
(0, _assert2.default)((0, _SpyUtils.isSpy)(spy), 'The "actual" argument in expect(actual).toNotHaveBeenCalled() must be a spy');
(0, _assert2.default)(spy.calls.length === 0, message || 'spy was not supposed to be called');
return this;
}
}]);
return Expectation;
}();
var deprecate = function deprecate(fn, message) {
var alreadyWarned = false;
return function () {
if (!alreadyWarned) {
alreadyWarned = true;
console.warn(message);
}
for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
args[_key4] = arguments[_key4];
}
return fn.apply(this, args);
};
};
Expectation.prototype.withContext = deprecate(function (context) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withContext() must be a function');
this.context = context;
return this;
}, '\nwithContext is deprecated; use a closure instead.\n\n expect(fn).withContext(context).toThrow()\n\nbecomes\n\n expect(() => fn.call(context)).toThrow()\n');
Expectation.prototype.withArgs = deprecate(function () {
var _args;
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withArgs() must be a function');
if (arguments.length) this.args = (_args = this.args).concat.apply(_args, arguments);
return this;
}, '\nwithArgs is deprecated; use a closure instead.\n\n expect(fn).withArgs(a, b, c).toThrow()\n\nbecomes\n\n expect(() => fn(a, b, c)).toThrow()\n');
var aliases = {
toBeAn: 'toBeA',
toNotBeAn: 'toNotBeA',
toBeTruthy: 'toExist',
toBeFalsy: 'toNotExist',
toBeFewerThan: 'toBeLessThan',
toBeMoreThan: 'toBeGreaterThan',
toContain: 'toInclude',
toNotContain: 'toExclude',
toNotInclude: 'toExclude',
toContainKeys: 'toIncludeKeys',
toNotContainKeys: 'toExcludeKeys',
toNotIncludeKeys: 'toExcludeKeys',
toContainKey: 'toIncludeKey',
toNotContainKey: 'toExcludeKey',
toNotIncludeKey: 'toExcludeKey'
};
for (var alias in aliases) {
if (aliases.hasOwnProperty(alias)) Expectation.prototype[alias] = Expectation.prototype[aliases[alias]];
}exports.default = Expectation;
/***/ }),
/* 230 */
/***/ (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 emptyObject = {};
if (false) {}
module.exports = emptyObject;
/***/ }),
/* 231 */
/***/ (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;
};
/***/ }),
/* 232 */
/***/ (function(module, exports, __webpack_require__) {
var pIE = __webpack_require__(104);
var createDesc = __webpack_require__(93);
var toIObject = __webpack_require__(77);
var toPrimitive = __webpack_require__(160);
var has = __webpack_require__(61);
var IE8_DOM_DEFINE = __webpack_require__(240);
var gOPD = Object.getOwnPropertyDescriptor;
exports.f = __webpack_require__(62) ? 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]);
};
/***/ }),
/* 233 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__(236);
var hiddenKeys = __webpack_require__(153).concat('length', 'prototype');
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return $keys(O, hiddenKeys);
};
/***/ }),
/* 234 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__(159);
var min = Math.min;
module.exports = function (it) {
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/* 235 */
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(156);
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ }),
/* 236 */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(61);
var toIObject = __webpack_require__(77);
var arrayIndexOf = __webpack_require__(517)(false);
var IE_PROTO = __webpack_require__(155)('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;
};
/***/ }),
/* 237 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(80);
/***/ }),
/* 238 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__(107);
var $export = __webpack_require__(64);
var redefine = __webpack_require__(237);
var hide = __webpack_require__(80);
var Iterators = __webpack_require__(78);
var $iterCreate = __webpack_require__(519);
var setToStringTag = __webpack_require__(152);
var getPrototypeOf = __webpack_require__(514);
var ITERATOR = __webpack_require__(39)('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;
};
/***/ }),
/* 239 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(79);
var document = __webpack_require__(57).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) : {};
};
/***/ }),
/* 240 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(62) && !__webpack_require__(94)(function () {
return Object.defineProperty(__webpack_require__(239)('div'), 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/* 241 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(525), __esModule: true };
/***/ }),
/* 242 */
/***/ (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;
};
/***/ }),
/* 243 */
/***/ (function(module, exports, __webpack_require__) {
var forOf = __webpack_require__(66);
module.exports = function (iter, ITERATOR) {
var result = [];
forOf(iter, false, result.push, result, ITERATOR);
return result;
};
/***/ }),
/* 244 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var classof = __webpack_require__(95);
var from = __webpack_require__(243);
module.exports = function (NAME) {
return function toJSON() {
if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
return from(this);
};
};
/***/ }),
/* 245 */
/***/ (function(module, exports, __webpack_require__) {
var getKeys = __webpack_require__(72);
var toIObject = __webpack_require__(37);
var isEnum = __webpack_require__(96).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) if (isEnum.call(O, key = keys[i++])) {
result.push(isEntries ? [key, O[key]] : O[key]);
} return result;
};
};
/***/ }),
/* 246 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-string-pad-start-end
var toLength = __webpack_require__(19);
var repeat = __webpack_require__(180);
var defined = __webpack_require__(49);
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;
};
/***/ }),
/* 247 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
var isArray = __webpack_require__(120);
var isObject = __webpack_require__(12);
var toLength = __webpack_require__(19);
var ctx = __webpack_require__(42);
var IS_CONCAT_SPREADABLE = __webpack_require__(13)('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;
/***/ }),
/* 248 */
/***/ (function(module, exports, __webpack_require__) {
// all object keys, includes non-enumerable and symbols
var gOPN = __webpack_require__(69);
var gOPS = __webpack_require__(121);
var anObject = __webpack_require__(8);
var Reflect = __webpack_require__(9).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;
};
/***/ }),
/* 249 */
/***/ (function(module, exports, __webpack_require__) {
// https://tc39.github.io/ecma262/#sec-toindex
var toInteger = __webpack_require__(48);
var toLength = __webpack_require__(19);
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;
};
/***/ }),
/* 250 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var redefineAll = __webpack_require__(65);
var getWeak = __webpack_require__(60).getWeak;
var anObject = __webpack_require__(8);
var isObject = __webpack_require__(12);
var anInstance = __webpack_require__(67);
var forOf = __webpack_require__(66);
var createArrayMethod = __webpack_require__(46);
var $has = __webpack_require__(38);
var validate = __webpack_require__(81);
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
};
/***/ }),
/* 251 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var each = __webpack_require__(46)(0);
var redefine = __webpack_require__(31);
var meta = __webpack_require__(60);
var assign = __webpack_require__(270);
var weak = __webpack_require__(250);
var isObject = __webpack_require__(12);
var fails = __webpack_require__(11);
var validate = __webpack_require__(81);
var WEAK_MAP = 'WeakMap';
var getWeak = meta.getWeak;
var isExtensible = Object.isExtensible;
var uncaughtFrozenStore = weak.ufstore;
var tmp = {};
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__(113)(WEAK_MAP, wrapper, methods, weak, true, true);
// IE11 WeakMap frozen keys fix
if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {
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);
});
});
}
/***/ }),
/* 252 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var strong = __webpack_require__(253);
var validate = __webpack_require__(81);
var SET = 'Set';
// 23.2 Set Objects
module.exports = __webpack_require__(113)(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);
/***/ }),
/* 253 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var dP = __webpack_require__(20).f;
var create = __webpack_require__(70);
var redefineAll = __webpack_require__(65);
var ctx = __webpack_require__(42);
var anInstance = __webpack_require__(67);
var forOf = __webpack_require__(66);
var $iterDefine = __webpack_require__(176);
var step = __webpack_require__(258);
var setSpecies = __webpack_require__(68);
var DESCRIPTORS = __webpack_require__(21);
var fastKey = __webpack_require__(60).fastKey;
var validate = __webpack_require__(81);
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);
}
};
/***/ }),
/* 254 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var strong = __webpack_require__(253);
var validate = __webpack_require__(81);
var MAP = 'Map';
// 23.1 Map Objects
module.exports = __webpack_require__(113)(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);
/***/ }),
/* 255 */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(8);
var isObject = __webpack_require__(12);
var newPromiseCapability = __webpack_require__(164);
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;
};
/***/ }),
/* 256 */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return { e: false, v: exec() };
} catch (e) {
return { e: true, v: e };
}
};
/***/ }),
/* 257 */
/***/ (function(module, exports, __webpack_require__) {
// 21.2.5.3 get RegExp.prototype.flags()
if (__webpack_require__(21) && /./g.flags != 'g') __webpack_require__(20).f(RegExp.prototype, 'flags', {
configurable: true,
get: __webpack_require__(117)
});
/***/ }),
/* 258 */
/***/ (function(module, exports) {
module.exports = function (done, value) {
return { value: value, done: !!done };
};
/***/ }),
/* 259 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
var toObject = __webpack_require__(25);
var toAbsoluteIndex = __webpack_require__(71);
var toLength = __webpack_require__(19);
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;
};
/***/ }),
/* 260 */
/***/ (function(module, exports, __webpack_require__) {
var aFunction = __webpack_require__(27);
var toObject = __webpack_require__(25);
var IObject = __webpack_require__(97);
var toLength = __webpack_require__(19);
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;
};
/***/ }),
/* 261 */
/***/ (function(module, exports, __webpack_require__) {
// call something on iterator step with safe closing on error
var anObject = __webpack_require__(8);
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;
}
};
/***/ }),
/* 262 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.16 Math.fround(x)
var sign = __webpack_require__(179);
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;
};
/***/ }),
/* 263 */
/***/ (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);
};
/***/ }),
/* 264 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
var isObject = __webpack_require__(12);
var floor = Math.floor;
module.exports = function isInteger(it) {
return !isObject(it) && isFinite(it) && floor(it) === it;
};
/***/ }),
/* 265 */
/***/ (function(module, exports, __webpack_require__) {
var cof = __webpack_require__(41);
module.exports = function (it, msg) {
if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);
return +it;
};
/***/ }),
/* 266 */
/***/ (function(module, exports, __webpack_require__) {
var $parseFloat = __webpack_require__(9).parseFloat;
var $trim = __webpack_require__(83).trim;
module.exports = 1 / $parseFloat(__webpack_require__(182) + '-0') !== -Infinity ? function parseFloat(str) {
var string = $trim(String(str), 3);
var result = $parseFloat(string);
return result === 0 && string.charAt(0) == '-' ? -0 : result;
} : $parseFloat;
/***/ }),
/* 267 */
/***/ (function(module, exports, __webpack_require__) {
var $parseInt = __webpack_require__(9).parseInt;
var $trim = __webpack_require__(83).trim;
var ws = __webpack_require__(182);
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;
/***/ }),
/* 268 */
/***/ (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);
};
/***/ }),
/* 269 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aFunction = __webpack_require__(27);
var isObject = __webpack_require__(12);
var invoke = __webpack_require__(268);
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;
};
/***/ }),
/* 270 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 19.1.2.1 Object.assign(target, source, ...)
var getKeys = __webpack_require__(72);
var gOPS = __webpack_require__(121);
var pIE = __webpack_require__(96);
var toObject = __webpack_require__(25);
var IObject = __webpack_require__(97);
var $assign = Object.assign;
// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !$assign || __webpack_require__(11)(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) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
} return T;
} : $assign;
/***/ }),
/* 271 */
/***/ (function(module, exports, __webpack_require__) {
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = __webpack_require__(37);
var gOPN = __webpack_require__(69).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));
};
/***/ }),
/* 272 */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(20);
var anObject = __webpack_require__(8);
var getKeys = __webpack_require__(72);
module.exports = __webpack_require__(21) ? 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;
};
/***/ }),
/* 273 */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(38);
var toIObject = __webpack_require__(37);
var arrayIndexOf = __webpack_require__(122)(false);
var IE_PROTO = __webpack_require__(186)('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;
};
/***/ }),
/* 274 */
/***/ (function(module, exports, __webpack_require__) {
exports.f = __webpack_require__(13);
/***/ }),
/* 275 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(21) && !__webpack_require__(11)(function () {
return Object.defineProperty(__webpack_require__(188)('div'), 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/* 276 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// CONCATENATED MODULE: ./node_modules/@emotion/memoize/dist/index.es.js
function memoize(fn) {
var cache = {};
return function (arg) {
if (cache[arg] === undefined) cache[arg] = fn(arg);
return cache[arg];
};
}
/* harmony default export */ var index_es = (memoize);
//# sourceMappingURL=index.es.js.map
// CONCATENATED MODULE: ./node_modules/@emotion/unitless/dist/index.es.js
var index = {
animationIterationCount: 1,
borderImageOutset: 1,
borderImageSlice: 1,
borderImageWidth: 1,
boxFlex: 1,
boxFlexGroup: 1,
boxOrdinalGroup: 1,
columnCount: 1,
columns: 1,
flex: 1,
flexGrow: 1,
flexPositive: 1,
flexShrink: 1,
flexNegative: 1,
flexOrder: 1,
gridRow: 1,
gridRowEnd: 1,
gridRowSpan: 1,
gridRowStart: 1,
gridColumn: 1,
gridColumnEnd: 1,
gridColumnSpan: 1,
gridColumnStart: 1,
fontWeight: 1,
lineHeight: 1,
opacity: 1,
order: 1,
orphans: 1,
tabSize: 1,
widows: 1,
zIndex: 1,
zoom: 1,
WebkitLineClamp: 1,
// SVG-related properties
fillOpacity: 1,
floodOpacity: 1,
stopOpacity: 1,
strokeDasharray: 1,
strokeDashoffset: 1,
strokeMiterlimit: 1,
strokeOpacity: 1,
strokeWidth: 1
};
/* harmony default export */ var dist_index_es = (index);
//# sourceMappingURL=index.es.js.map
// CONCATENATED MODULE: ./node_modules/@emotion/hash/dist/index.es.js
/* eslint-disable */
// murmurhash2 via https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
function murmurhash2_32_gc(str) {
var l = str.length,
h = l ^ l,
i = 0,
k;
while (l >= 4) {
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);
k ^= k >>> 24;
k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;
l -= 4;
++i;
}
switch (l) {
case 3:
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
case 2:
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
case 1:
h ^= str.charCodeAt(i) & 0xff;
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
}
h ^= h >>> 13;
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
h ^= h >>> 15;
return (h >>> 0).toString(36);
}
/* harmony default export */ var hash_dist_index_es = (murmurhash2_32_gc);
//# sourceMappingURL=index.es.js.map
// CONCATENATED MODULE: ./node_modules/@emotion/stylis/dist/index.es.js
var V = function ca(W) {
function M(d, c, f, h, a) {
for (var k = 0, b = 0, u = 0, l = 0, q, m, e, D = 0, y = 0, r, E = r = q = 0, n = 0, J = m = 0, t = 0, K = f.length, F = K - 1, w, g = "", p = "", G = "", H = "", A; n < K;) {
e = f.charCodeAt(n);
n === F && 0 !== b + l + u + k && (0 !== b && (e = 47 === b ? 10 : 47), l = u = k = 0, K++, F++);
if (0 === b + l + u + k) {
if (n === F && (0 < m && (g = g.replace(N, "")), 0 < g.trim().length)) {
switch (e) {
case 32:
case 9:
case 59:
case 13:
case 10:
break;
default:
g += f.charAt(n);
}
e = 59;
}
switch (e) {
case 123:
g = g.trim();
q = g.charCodeAt(0);
r = 1;
for (t = ++n; n < K;) {
e = f.charCodeAt(n);
switch (e) {
case 123:
r++;
break;
case 125:
r--;
}
if (0 === r) break;
n++;
}
e = f.substring(t, n);
0 === q && (q = (g = g.replace(da, "").trim()).charCodeAt(0));
switch (q) {
case 64:
0 < m && (g = g.replace(N, ""));
m = g.charCodeAt(1);
switch (m) {
case 100:
case 109:
case 115:
case 45:
r = c;
break;
default:
r = O;
}
e = M(c, r, e, m, a + 1);
t = e.length;
0 < z && (r = X(O, g, J), A = I(3, e, r, c, B, x, t, m, a, h), g = r.join(""), void 0 !== A && 0 === (t = (e = A.trim()).length) && (m = 0, e = ""));
if (0 < t) switch (m) {
case 115:
g = g.replace(ea, fa);
case 100:
case 109:
case 45:
e = g + "{" + e + "}";
break;
case 107:
g = g.replace(ha, "$1 $2");
e = g + "{" + e + "}";
e = 1 === v || 2 === v && L("@" + e, 3) ? "@-webkit-" + e + "@" + e : "@" + e;
break;
default:
e = g + e, 112 === h && (e = (p += e, ""));
} else e = "";
break;
default:
e = M(c, X(c, g, J), e, h, a + 1);
}
G += e;
r = J = m = E = q = 0;
g = "";
e = f.charCodeAt(++n);
break;
case 125:
case 59:
g = (0 < m ? g.replace(N, "") : g).trim();
if (1 < (t = g.length)) switch (0 === E && (q = g.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (g = g.replace(" ", ":")).length), 0 < z && void 0 !== (A = I(1, g, c, d, B, x, p.length, h, a, h)) && 0 === (t = (g = A.trim()).length) && (g = "\x00\x00"), q = g.charCodeAt(0), m = g.charCodeAt(1), q + m) {
case 0:
break;
case 169:
case 163:
H += g + f.charAt(n);
break;
default:
58 !== g.charCodeAt(t - 1) && (p += P(g, q, m, g.charCodeAt(2)));
}
J = m = E = q = 0;
g = "";
e = f.charCodeAt(++n);
}
}
switch (e) {
case 13:
case 10:
47 === b ? b = 0 : 0 === 1 + q && (m = 1, g += "\x00");
0 < z * Y && I(0, g, c, d, B, x, p.length, h, a, h);
x = 1;
B++;
break;
case 59:
case 125:
if (0 === b + l + u + k) {
x++;
break;
}
default:
x++;
w = f.charAt(n);
switch (e) {
case 9:
case 32:
if (0 === l + k + b) switch (D) {
case 44:
case 58:
case 9:
case 32:
w = "";
break;
default:
32 !== e && (w = " ");
}
break;
case 0:
w = "\\0";
break;
case 12:
w = "\\f";
break;
case 11:
w = "\\v";
break;
case 38:
0 === l + b + k && (m = J = 1, w = "\f" + w);
break;
case 108:
if (0 === l + b + k + C && 0 < E) switch (n - E) {
case 2:
112 === D && 58 === f.charCodeAt(n - 3) && (C = D);
case 8:
111 === y && (C = y);
}
break;
case 58:
0 === l + b + k && (E = n);
break;
case 44:
0 === b + u + l + k && (m = 1, w += "\r");
break;
case 34:
case 39:
0 === b && (l = l === e ? 0 : 0 === l ? e : l);
break;
case 91:
0 === l + b + u && k++;
break;
case 93:
0 === l + b + u && k--;
break;
case 41:
0 === l + b + k && u--;
break;
case 40:
if (0 === l + b + k) {
if (0 === q) switch (2 * D + 3 * y) {
case 533:
break;
default:
q = 1;
}
u++;
}
break;
case 64:
0 === b + u + l + k + E + r && (r = 1);
break;
case 42:
case 47:
if (!(0 < l + k + u)) switch (b) {
case 0:
switch (2 * e + 3 * f.charCodeAt(n + 1)) {
case 235:
b = 47;
break;
case 220:
t = n, b = 42;
}
break;
case 42:
47 === e && 42 === D && (33 === f.charCodeAt(t + 2) && (p += f.substring(t, n + 1)), w = "", b = 0);
}
}
0 === b && (g += w);
}
y = D;
D = e;
n++;
}
t = p.length;
if (0 < t) {
r = c;
if (0 < z && (A = I(2, p, r, d, B, x, t, h, a, h), void 0 !== A && 0 === (p = A).length)) return H + p + G;
p = r.join(",") + "{" + p + "}";
if (0 !== v * C) {
2 !== v || L(p, 2) || (C = 0);
switch (C) {
case 111:
p = p.replace(ia, ":-moz-$1") + p;
break;
case 112:
p = p.replace(Q, "::-webkit-input-$1") + p.replace(Q, "::-moz-$1") + p.replace(Q, ":-ms-input-$1") + p;
}
C = 0;
}
}
return H + p + G;
}
function X(d, c, f) {
var h = c.trim().split(ja);
c = h;
var a = h.length,
k = d.length;
switch (k) {
case 0:
case 1:
var b = 0;
for (d = 0 === k ? "" : d[0] + " "; b < a; ++b) {
c[b] = Z(d, c[b], f, k).trim();
}
break;
default:
var u = b = 0;
for (c = []; b < a; ++b) {
for (var l = 0; l < k; ++l) {
c[u++] = Z(d[l] + " ", h[b], f, k).trim();
}
}
}
return c;
}
function Z(d, c, f) {
var h = c.charCodeAt(0);
33 > h && (h = (c = c.trim()).charCodeAt(0));
switch (h) {
case 38:
return c.replace(F, "$1" + d.trim());
case 58:
switch (c.charCodeAt(1)) {
case 103:
break;
default:
return d.trim() + c.replace(F, "$1" + d.trim());
}
default:
if (0 < 1 * f && 0 < c.indexOf("\f")) return c.replace(F, (58 === d.charCodeAt(0) ? "" : "$1") + d.trim());
}
return d + c;
}
function P(d, c, f, h) {
var a = d + ";",
k = 2 * c + 3 * f + 4 * h;
if (944 === k) {
d = a.indexOf(":", 9) + 1;
var b = a.substring(d, a.length - 1).trim();
b = a.substring(0, d).trim() + b + ";";
return 1 === v || 2 === v && L(b, 1) ? "-webkit-" + b + b : b;
}
if (0 === v || 2 === v && !L(a, 1)) return a;
switch (k) {
case 1015:
return 97 === a.charCodeAt(10) ? "-webkit-" + a + a : a;
case 951:
return 116 === a.charCodeAt(3) ? "-webkit-" + a + a : a;
case 963:
return 110 === a.charCodeAt(5) ? "-webkit-" + a + a : a;
case 1009:
if (100 !== a.charCodeAt(4)) break;
case 969:
case 942:
return "-webkit-" + a + a;
case 978:
return "-webkit-" + a + "-moz-" + a + a;
case 1019:
case 983:
return "-webkit-" + a + "-moz-" + a + "-ms-" + a + a;
case 883:
return 45 === a.charCodeAt(8) ? "-webkit-" + a + a : a;
case 932:
if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {
case 103:
return "-webkit-box-" + a.replace("-grow", "") + "-webkit-" + a + "-ms-" + a.replace("grow", "positive") + a;
case 115:
return "-webkit-" + a + "-ms-" + a.replace("shrink", "negative") + a;
case 98:
return "-webkit-" + a + "-ms-" + a.replace("basis", "preferred-size") + a;
}
return "-webkit-" + a + "-ms-" + a + a;
case 964:
return "-webkit-" + a + "-ms-flex-" + a + a;
case 1023:
if (99 !== a.charCodeAt(8)) break;
b = a.substring(a.indexOf(":", 15)).replace("flex-", "").replace("space-between", "justify");
return "-webkit-box-pack" + b + "-webkit-" + a + "-ms-flex-pack" + b + a;
case 1005:
return ka.test(a) ? a.replace(aa, ":-webkit-") + a.replace(aa, ":-moz-") + a : a;
case 1e3:
b = a.substring(13).trim();
c = b.indexOf("-") + 1;
switch (b.charCodeAt(0) + b.charCodeAt(c)) {
case 226:
b = a.replace(G, "tb");
break;
case 232:
b = a.replace(G, "tb-rl");
break;
case 220:
b = a.replace(G, "lr");
break;
default:
return a;
}
return "-webkit-" + a + "-ms-" + b + a;
case 1017:
if (-1 === a.indexOf("sticky", 9)) break;
case 975:
c = (a = d).length - 10;
b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(":", 7) + 1).trim();
switch (k = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {
case 203:
if (111 > b.charCodeAt(8)) break;
case 115:
a = a.replace(b, "-webkit-" + b) + ";" + a;
break;
case 207:
case 102:
a = a.replace(b, "-webkit-" + (102 < k ? "inline-" : "") + "box") + ";" + a.replace(b, "-webkit-" + b) + ";" + a.replace(b, "-ms-" + b + "box") + ";" + a;
}
return a + ";";
case 938:
if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {
case 105:
return b = a.replace("-items", ""), "-webkit-" + a + "-webkit-box-" + b + "-ms-flex-" + b + a;
case 115:
return "-webkit-" + a + "-ms-flex-item-" + a.replace(ba, "") + a;
default:
return "-webkit-" + a + "-ms-flex-line-pack" + a.replace("align-content", "").replace(ba, "") + a;
}
break;
case 973:
case 989:
if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;
case 931:
case 953:
if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(":") + 1)).charCodeAt(0) ? P(d.replace("stretch", "fill-available"), c, f, h).replace(":fill-available", ":stretch") : a.replace(b, "-webkit-" + b) + a.replace(b, "-moz-" + b.replace("fill-", "")) + a;
break;
case 962:
if (a = "-webkit-" + a + (102 === a.charCodeAt(5) ? "-ms-" + a : "") + a, 211 === f + h && 105 === a.charCodeAt(13) && 0 < a.indexOf("transform", 10)) return a.substring(0, a.indexOf(";", 27) + 1).replace(ma, "$1-webkit-$2") + a;
}
return a;
}
function L(d, c) {
var f = d.indexOf(1 === c ? ":" : "{"),
h = d.substring(0, 3 !== c ? f : 10);
f = d.substring(f + 1, d.length - 1);
return H(2 !== c ? h : h.replace(na, "$1"), f, c);
}
function fa(d, c) {
var f = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));
return f !== c + ";" ? f.replace(oa, " or ($1)").substring(4) : "(" + c + ")";
}
function I(d, c, f, h, a, k, b, u, l, q) {
for (var m = 0, e = c, v; m < z; ++m) {
switch (v = R[m].call(y, d, e, f, h, a, k, b, u, l, q)) {
case void 0:
case !1:
case !0:
case null:
break;
default:
e = v;
}
}
if (e !== c) return e;
}
function S(d) {
switch (d) {
case void 0:
case null:
z = R.length = 0;
break;
default:
switch (d.constructor) {
case Array:
for (var c = 0, f = d.length; c < f; ++c) {
S(d[c]);
}
break;
case Function:
R[z++] = d;
break;
case Boolean:
Y = !!d | 0;
}
}
return S;
}
function T(d) {
d = d.prefix;
void 0 !== d && (H = null, d ? "function" !== typeof d ? v = 1 : (v = 2, H = d) : v = 0);
return T;
}
function y(d, c) {
if (void 0 !== this && this.constructor === y) return ca(d);
var f = d;
33 > f.charCodeAt(0) && (f = f.trim());
U = f;
f = [U];
if (0 < z) {
var h = I(-1, c, f, f, B, x, 0, 0, 0, 0);
void 0 !== h && "string" === typeof h && (c = h);
}
var a = M(O, f, c, 0, 0);
0 < z && (h = I(-2, a, f, f, B, x, a.length, 0, 0, 0), void 0 !== h && (a = h));
U = "";
C = 0;
x = B = 1;
return a;
}
var da = /^\0+/g,
N = /[\0\r\f]/g,
aa = /: */g,
ka = /zoo|gra/,
ma = /([,: ])(transform)/g,
ja = /,\r+?/g,
F = /([\t\r\n ])*\f?&/g,
ha = /@(k\w+)\s*(\S*)\s*/,
Q = /::(place)/g,
ia = /:(read-only)/g,
G = /[svh]\w+-[tblr]{2}/,
ea = /\(\s*(.*)\s*\)/g,
oa = /([\s\S]*?);/g,
ba = /-self|flex-/g,
na = /[^]*?(:[rp][el]a[\w-]+)[^]*/,
la = /stretch|:\s*\w+\-(?:conte|avail)/,
x = 1,
B = 1,
C = 0,
v = 1,
O = [],
R = [],
z = 0,
H = null,
Y = 0,
U = "";
y.use = S;
y.set = T;
void 0 !== W && T(W);
return y;
};
/* harmony default export */ var stylis_dist_index_es = (V);
//# sourceMappingURL=index.es.js.map
// EXTERNAL MODULE: ./node_modules/stylis-rule-sheet/index.js
var stylis_rule_sheet = __webpack_require__(278);
var stylis_rule_sheet_default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet);
// CONCATENATED MODULE: ./node_modules/create-emotion/dist/index.es.js
var hyphenateRegex = /[A-Z]|^ms/g;
var processStyleName = index_es(function (styleName) {
return styleName.replace(hyphenateRegex, '-$&').toLowerCase();
});
var index_es_processStyleValue = function processStyleValue(key, value) {
if (value == null || typeof value === 'boolean') {
return '';
}
if (dist_index_es[key] !== 1 && key.charCodeAt(1) !== 45 && // custom properties
!isNaN(value) && value !== 0) {
return value + 'px';
}
return value;
};
if (false) { var oldProcessStyleValue, contentValues, contentValuePattern; }
var classnames = function classnames(args) {
var len = args.length;
var i = 0;
var cls = '';
for (; i < len; i++) {
var arg = args[i];
if (arg == null) continue;
var toAdd = void 0;
switch (typeof arg) {
case 'boolean':
break;
case 'function':
if (false) {}
toAdd = classnames([arg()]);
break;
case 'object':
{
if (Array.isArray(arg)) {
toAdd = classnames(arg);
} else {
toAdd = '';
for (var k in arg) {
if (arg[k] && k) {
toAdd && (toAdd += ' ');
toAdd += k;
}
}
}
break;
}
default:
{
toAdd = arg;
}
}
if (toAdd) {
cls && (cls += ' ');
cls += toAdd;
}
}
return cls;
};
var isBrowser = typeof document !== 'undefined';
/*
high performance StyleSheet for css-in-js systems
- uses multiple style tags behind the scenes for millions of rules
- uses `insertRule` for appending in production for *much* faster performance
- 'polyfills' on server side
// usage
import StyleSheet from 'glamor/lib/sheet'
let styleSheet = new StyleSheet()
styleSheet.inject()
- 'injects' the stylesheet into the page (or into memory if on server)
styleSheet.insert('#box { border: 1px solid red; }')
- appends a css rule into the stylesheet
styleSheet.flush()
- empties the stylesheet of all its contents
*/
// $FlowFixMe
function sheetForTag(tag) {
if (tag.sheet) {
// $FlowFixMe
return tag.sheet;
} // this weirdness brought to you by firefox
for (var i = 0; i < document.styleSheets.length; i++) {
if (document.styleSheets[i].ownerNode === tag) {
// $FlowFixMe
return document.styleSheets[i];
}
}
}
function makeStyleTag(opts) {
var tag = document.createElement('style');
tag.setAttribute('data-emotion', opts.key || '');
if (opts.nonce !== undefined) {
tag.setAttribute('nonce', opts.nonce);
}
tag.appendChild(document.createTextNode('')) // $FlowFixMe
;
(opts.container !== undefined ? opts.container : document.head).appendChild(tag);
return tag;
}
function _StyleSheet(options) {
this.isSpeedy = "production" === 'production'; // the big drawback here is that the css won't be editable in devtools
this.tags = [];
this.ctr = 0;
this.opts = options;
}
function _inject() {
if (this.injected) {
throw new Error('already injected!');
}
this.tags[0] = makeStyleTag(this.opts);
this.injected = true;
}
function _speedy(bool) {
if (this.ctr !== 0) {
// cannot change speedy mode after inserting any rule to sheet. Either call speedy(${bool}) earlier in your app, or call flush() before speedy(${bool})
throw new Error("cannot change speedy now");
}
this.isSpeedy = !!bool;
}
function _insert(rule, sourceMap) {
// this is the ultrafast version, works across browsers
if (this.isSpeedy) {
var tag = this.tags[this.tags.length - 1];
var sheet = sheetForTag(tag);
try {
sheet.insertRule(rule, sheet.cssRules.length);
} catch (e) {
if (false) {}
}
} else {
var _tag = makeStyleTag(this.opts);
this.tags.push(_tag);
_tag.appendChild(document.createTextNode(rule + (sourceMap || '')));
}
this.ctr++;
if (this.ctr % 65000 === 0) {
this.tags.push(makeStyleTag(this.opts));
}
}
function _ref(tag) {
return tag.parentNode.removeChild(tag);
}
function _flush() {
// $FlowFixMe
this.tags.forEach(_ref);
this.tags = [];
this.ctr = 0; // todo - look for remnants in document.styleSheets
this.injected = false;
}
var StyleSheet =
/*#__PURE__*/
function () {
var _proto = _StyleSheet.prototype;
_proto.inject = _inject;
_proto.speedy = _speedy;
_proto.insert = _insert;
_proto.flush = _flush;
return _StyleSheet;
}();
function createEmotion(context, options) {
if (context.__SECRET_EMOTION__ !== undefined) {
return context.__SECRET_EMOTION__;
}
if (options === undefined) options = {};
var key = options.key || 'css';
if (false) {}
var current;
function insertRule(rule) {
current += rule;
if (isBrowser) {
sheet.insert(rule, currentSourceMap);
}
}
var insertionPlugin = stylis_rule_sheet_default()(insertRule);
var stylisOptions;
if (options.prefix !== undefined) {
stylisOptions = {
prefix: options.prefix
};
}
var caches = {
registered: {},
inserted: {},
nonce: options.nonce,
key: key
};
var sheet = new StyleSheet(options);
if (isBrowser) {
// 🚀
sheet.inject();
}
var stylis = new stylis_dist_index_es(stylisOptions);
stylis.use(options.stylisPlugins)(insertionPlugin);
var currentSourceMap = '';
function handleInterpolation(interpolation, couldBeSelectorInterpolation) {
if (interpolation == null) {
return '';
}
switch (typeof interpolation) {
case 'boolean':
return '';
case 'function':
if (interpolation.__emotion_styles !== undefined) {
var selector = interpolation.toString();
if (selector === 'NO_COMPONENT_SELECTOR' && "production" !== 'production') {
throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');
}
return selector;
}
if (this === undefined && "production" !== 'production') {
console.error('Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
}
return handleInterpolation.call(this, this === undefined ? interpolation() : // $FlowFixMe
interpolation(this.mergedProps, this.context), couldBeSelectorInterpolation);
case 'object':
return createStringFromObject.call(this, interpolation);
default:
var cached = caches.registered[interpolation];
return couldBeSelectorInterpolation === false && cached !== undefined ? cached : interpolation;
}
}
var objectToStringCache = new WeakMap();
function createStringFromObject(obj) {
if (objectToStringCache.has(obj)) {
// $FlowFixMe
return objectToStringCache.get(obj);
}
var string = '';
function _ref(interpolation) {
string += handleInterpolation.call(this, interpolation, false);
}
function _ref3(key) {
function _ref2(value) {
string += processStyleName(key) + ":" + index_es_processStyleValue(key, value) + ";";
}
if (typeof obj[key] !== 'object') {
if (caches.registered[obj[key]] !== undefined) {
string += key + "{" + caches.registered[obj[key]] + "}";
} else {
string += processStyleName(key) + ":" + index_es_processStyleValue(key, obj[key]) + ";";
}
} else {
if (key === 'NO_COMPONENT_SELECTOR' && "production" !== 'production') {
throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');
}
if (Array.isArray(obj[key]) && typeof obj[key][0] === 'string' && caches.registered[obj[key][0]] === undefined) {
obj[key].forEach(_ref2);
} else {
string += key + "{" + handleInterpolation.call(this, obj[key], false) + "}";
}
}
}
if (Array.isArray(obj)) {
obj.forEach(_ref, this);
} else {
Object.keys(obj).forEach(_ref3, this);
}
objectToStringCache.set(obj, string);
return string;
}
var name;
var stylesWithLabel;
var labelPattern = /label:\s*([^\s;\n{]+)\s*;/g;
var createStyles = function createStyles(strings) {
var stringMode = true;
var styles = '';
var identifierName = '';
if (strings == null || strings.raw === undefined) {
stringMode = false;
styles += handleInterpolation.call(this, strings, false);
} else {
styles += strings[0];
}
for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
interpolations[_key - 1] = arguments[_key];
}
interpolations.forEach(function (interpolation, i) {
styles += handleInterpolation.call(this, interpolation, styles.charCodeAt(styles.length - 1) === 46 // .
);
if (stringMode === true && strings[i + 1] !== undefined) {
styles += strings[i + 1];
}
}, this);
stylesWithLabel = styles;
styles = styles.replace(labelPattern, function (match, p1) {
identifierName += "-" + p1;
return '';
});
name = hash_dist_index_es(styles + identifierName) + identifierName;
return styles;
};
if (false) { var oldStylis, sourceMapRegEx; }
function insert(scope, styles) {
if (caches.inserted[name] === undefined) {
current = '';
stylis(scope, styles);
caches.inserted[name] = current;
}
}
var css = function css() {
var styles = createStyles.apply(this, arguments);
var selector = key + "-" + name;
if (caches.registered[selector] === undefined) {
caches.registered[selector] = stylesWithLabel;
}
insert("." + selector, styles);
return selector;
};
var keyframes = function keyframes() {
var styles = createStyles.apply(this, arguments);
var animation = "animation-" + name;
insert('', "@keyframes " + animation + "{" + styles + "}");
return animation;
};
var injectGlobal = function injectGlobal() {
var styles = createStyles.apply(this, arguments);
insert('', styles);
};
function getRegisteredStyles(registeredStyles, classNames) {
var rawClassName = '';
classNames.split(' ').forEach(function (className) {
if (caches.registered[className] !== undefined) {
registeredStyles.push(className);
} else {
rawClassName += className + " ";
}
});
return rawClassName;
}
function merge(className, sourceMap) {
var registeredStyles = [];
var rawClassName = getRegisteredStyles(registeredStyles, className);
if (registeredStyles.length < 2) {
return className;
}
return rawClassName + css(registeredStyles, sourceMap);
}
function cx() {
for (var _len2 = arguments.length, classNames = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
classNames[_key2] = arguments[_key2];
}
return merge(classnames(classNames));
}
function hydrateSingleId(id) {
caches.inserted[id] = true;
}
function hydrate(ids) {
ids.forEach(hydrateSingleId);
}
function flush() {
if (isBrowser) {
sheet.flush();
sheet.inject();
}
caches.inserted = {};
caches.registered = {};
}
function _ref4(node) {
// $FlowFixMe
sheet.tags[0].parentNode.insertBefore(node, sheet.tags[0]); // $FlowFixMe
node.getAttribute("data-emotion-" + key).split(' ').forEach(hydrateSingleId);
}
if (isBrowser) {
var chunks = document.querySelectorAll("[data-emotion-" + key + "]");
Array.prototype.forEach.call(chunks, _ref4);
}
var emotion = {
flush: flush,
hydrate: hydrate,
cx: cx,
merge: merge,
getRegisteredStyles: getRegisteredStyles,
injectGlobal: injectGlobal,
keyframes: keyframes,
css: css,
sheet: sheet,
caches: caches
};
context.__SECRET_EMOTION__ = emotion;
return emotion;
}
/* harmony default export */ var create_emotion_dist_index_es = __webpack_exports__["a"] = (createEmotion);
//# sourceMappingURL=index.es.js.map
/***/ }),
/* 277 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return symbolObservablePonyfill; });
function symbolObservablePonyfill(root) {
var result;
var Symbol = root.Symbol;
if (typeof Symbol === 'function') {
if (Symbol.observable) {
result = Symbol.observable;
} else {
result = Symbol('observable');
Symbol.observable = result;
}
} else {
result = '@@observable';
}
return result;
};
/***/ }),
/* 278 */
/***/ (function(module, exports, __webpack_require__) {
(function (factory) {
true ? (module['exports'] = factory()) :
undefined
}(function () {
'use strict'
return function (insertRule) {
var delimiter = '/*|*/'
var needle = delimiter+'}'
function toSheet (block) {
if (block)
try {
insertRule(block + '}')
} catch (e) {}
}
return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {
switch (context) {
// property
case 1:
// @import
if (depth === 0 && content.charCodeAt(0) === 64)
return insertRule(content+';'), ''
break
// selector
case 2:
if (ns === 0)
return content + delimiter
break
// at-rule
case 3:
switch (ns) {
// @font-face, @page
case 102:
case 112:
return insertRule(selectors[0]+content), ''
default:
return content + (at === 0 ? delimiter : '')
}
case -2:
content.split(needle).forEach(toSheet)
}
}
}
}))
/***/ }),
/* 279 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
/* harmony default export */ __webpack_exports__["a"] = (freeGlobal);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(75)))
/***/ }),
/* 280 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return symbolObservablePonyfill; });
function symbolObservablePonyfill(root) {
var result;
var Symbol = root.Symbol;
if (typeof Symbol === 'function') {
if (Symbol.observable) {
result = Symbol.observable;
} else {
result = Symbol('observable');
Symbol.observable = result;
}
} else {
result = '@@observable';
}
return result;
};
/***/ }),
/* 281 */
/***/ (function(module, exports) {
(function() {
'use strict';
if (self.fetch) {
return
}
function normalizeName(name) {
if (typeof name !== 'string') {
name = name.toString();
}
if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
throw new TypeError('Invalid character in header field name')
}
return name.toLowerCase()
}
function normalizeValue(value) {
if (typeof value !== 'string') {
value = value.toString();
}
return value
}
function Headers(headers) {
this.map = {}
var self = this
if (headers instanceof Headers) {
headers.forEach(function(name, values) {
values.forEach(function(value) {
self.append(name, value)
})
})
} else if (headers) {
Object.getOwnPropertyNames(headers).forEach(function(name) {
self.append(name, headers[name])
})
}
}
Headers.prototype.append = function(name, value) {
name = normalizeName(name)
value = normalizeValue(value)
var list = this.map[name]
if (!list) {
list = []
this.map[name] = list
}
list.push(value)
}
Headers.prototype['delete'] = function(name) {
delete this.map[normalizeName(name)]
}
Headers.prototype.get = function(name) {
var values = this.map[normalizeName(name)]
return values ? values[0] : null
}
Headers.prototype.getAll = function(name) {
return this.map[normalizeName(name)] || []
}
Headers.prototype.has = function(name) {
return this.map.hasOwnProperty(normalizeName(name))
}
Headers.prototype.set = function(name, value) {
this.map[normalizeName(name)] = [normalizeValue(value)]
}
// Instead of iterable for now.
Headers.prototype.forEach = function(callback) {
var self = this
Object.getOwnPropertyNames(this.map).forEach(function(name) {
callback(name, self.map[name])
})
}
function consumed(body) {
if (body.bodyUsed) {
return fetch.Promise.reject(new TypeError('Already read'))
}
body.bodyUsed = true
}
function fileReaderReady(reader) {
return new fetch.Promise(function(resolve, reject) {
reader.onload = function() {
resolve(reader.result)
}
reader.onerror = function() {
reject(reader.error)
}
})
}
function readBlobAsArrayBuffer(blob) {
var reader = new FileReader()
reader.readAsArrayBuffer(blob)
return fileReaderReady(reader)
}
function readBlobAsText(blob) {
var reader = new FileReader()
reader.readAsText(blob)
return fileReaderReady(reader)
}
var support = {
blob: 'FileReader' in self && 'Blob' in self && (function() {
try {
new Blob();
return true
} catch(e) {
return false
}
})(),
formData: 'FormData' in self
}
function Body() {
this.bodyUsed = false
this._initBody = function(body) {
this._bodyInit = body
if (typeof body === 'string') {
this._bodyText = body
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
this._bodyBlob = body
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
this._bodyFormData = body
} else if (!body) {
this._bodyText = ''
} else {
throw new Error('unsupported BodyInit type')
}
}
if (support.blob) {
this.blob = function() {
var rejected = consumed(this)
if (rejected) {
return rejected
}
if (this._bodyBlob) {
return fetch.Promise.resolve(this._bodyBlob)
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as blob')
} else {
return fetch.Promise.resolve(new Blob([this._bodyText]))
}
}
this.arrayBuffer = function() {
return this.blob().then(readBlobAsArrayBuffer)
}
this.text = function() {
var rejected = consumed(this)
if (rejected) {
return rejected
}
if (this._bodyBlob) {
return readBlobAsText(this._bodyBlob)
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as text')
} else {
return fetch.Promise.resolve(this._bodyText)
}
}
} else {
this.text = function() {
var rejected = consumed(this)
return rejected ? rejected : fetch.Promise.resolve(this._bodyText)
}
}
if (support.formData) {
this.formData = function() {
return this.text().then(decode)
}
}
this.json = function() {
return this.text().then(function (text) {
return JSON.parse(text);
});
}
return this
}
// HTTP methods whose capitalization should be normalized
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
function normalizeMethod(method) {
var upcased = method.toUpperCase()
return (methods.indexOf(upcased) > -1) ? upcased : method
}
function Request(url, options) {
options = options || {}
this.url = url
this.credentials = options.credentials || 'omit'
this.headers = new Headers(options.headers)
this.method = normalizeMethod(options.method || 'GET')
this.mode = options.mode || null
this.referrer = null
if ((this.method === 'GET' || this.method === 'HEAD') && options.body) {
throw new TypeError('Body not allowed for GET or HEAD requests')
}
this._initBody(options.body)
}
function decode(body) {
var form = new FormData()
body.trim().split('&').forEach(function(bytes) {
if (bytes) {
var split = bytes.split('=')
var name = split.shift().replace(/\+/g, ' ')
var value = split.join('=').replace(/\+/g, ' ')
form.append(decodeURIComponent(name), decodeURIComponent(value))
}
})
return form
}
function headers(xhr) {
var head = new Headers()
var pairs = xhr.getAllResponseHeaders().trim().split('\n')
pairs.forEach(function(header) {
var split = header.trim().split(':')
var key = split.shift().trim()
var value = split.join(':').trim()
head.append(key, value)
})
return head
}
var noXhrPatch =
typeof window !== 'undefined' && !!window.ActiveXObject &&
!(window.XMLHttpRequest && (new XMLHttpRequest).dispatchEvent);
function getXhr() {
// from backbone.js 1.1.2
// https://github.com/jashkenas/backbone/blob/1.1.2/backbone.js#L1181
if (noXhrPatch && !(/^(get|post|head|put|delete|options)$/i.test(this.method))) {
this.usingActiveXhr = true;
return new ActiveXObject("Microsoft.XMLHTTP");
}
return new XMLHttpRequest();
}
Body.call(Request.prototype)
function Response(bodyInit, options) {
if (!options) {
options = {}
}
this._initBody(bodyInit)
this.type = 'default'
this.url = null
this.status = options.status
this.ok = this.status >= 200 && this.status < 300
this.statusText = options.statusText
this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)
this.url = options.url || ''
}
Body.call(Response.prototype)
self.Headers = Headers;
self.Request = Request;
self.Response = Response;
self.fetch = function(input, init) {
// TODO: Request constructor should accept input, init
var request
if (Request.prototype.isPrototypeOf(input) && !init) {
request = input
} else {
request = new Request(input, init)
}
return new fetch.Promise(function(resolve, reject) {
var xhr = getXhr();
if (request.credentials === 'cors') {
xhr.withCredentials = true;
}
function responseURL() {
if ('responseURL' in xhr) {
return xhr.responseURL
}
// Avoid security warnings on getResponseHeader when not allowed by CORS
if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
return xhr.getResponseHeader('X-Request-URL')
}
return;
}
function onload() {
if (xhr.readyState !== 4) {
return
}
var status = (xhr.status === 1223) ? 204 : xhr.status
if (status < 100 || status > 599) {
reject(new TypeError('Network request failed'))
return
}
var options = {
status: status,
statusText: xhr.statusText,
headers: headers(xhr),
url: responseURL()
}
var body = 'response' in xhr ? xhr.response : xhr.responseText;
resolve(new Response(body, options))
}
xhr.onreadystatechange = onload;
if (!self.usingActiveXhr) {
xhr.onload = onload;
xhr.onerror = function() {
reject(new TypeError('Network request failed'))
}
}
xhr.open(request.method, request.url, true)
if ('responseType' in xhr && support.blob) {
xhr.responseType = 'blob'
}
request.headers.forEach(function(name, values) {
values.forEach(function(value) {
xhr.setRequestHeader(name, value)
})
})
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
})
}
fetch.Promise = self.Promise; // you could change it to your favorite alternative
self.fetch.polyfill = true
})();
/***/ }),
/* 282 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _i18n = __webpack_require__(91);
var _i18n2 = _interopRequireDefault(_i18n);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var editorDescription = {
linkText: _i18n2.default.taxonLinkText,
dialogTitle: _i18n2.default.taxonDialogTitle,
tabs: [{
label: _i18n2.default.tabGeneral,
specials: [{ type: 'LabelsAndDescriptionArea' }],
fieldsets: [{
fields: [{ property: 'P31' /* instance of */
}]
}, {
fields: [{ property: 'P225' /* taxon name */
}, { property: 'P566' /* basionym */
}, { property: 'P1403' /* original combination */
}, { property: 'P694' /* replaced synonym (for nom. nov.) */
}, { property: 'P1420' /* taxon synonym */
}, { property: 'P697' /* ex taxon author */
}, { property: 'P944' /* Code of nomenclature */
}]
}, {
fields: [{ property: 'P18' /* instance of */
}]
}]
}, {
labelEntityId: 'Q420' /* bilogy */
, fieldsets: [{
fields: [{ property: 'P105' /* taxon rank */
}, { property: 'P171' /* parent taxon */
}]
}, {
fields: [{ property: 'P141' /* IUCN conservation status */
}]
}, {
fields: [{ property: 'P181' /* range map image */
}, { property: 'P183' /* endemic to */
}, { property: 'P1425' /* ecoregion (WWF) */
}, { property: 'P523' /* temporal range start */
}, { property: 'P524' /* temporal range end */
}]
}]
}, {
labelEntityId: 'Q36524',
specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31 wd:Q42396390 . ' + '?property wikibase:propertyType wikibase:ExternalId . ' + '}' }]
}]
};
exports.default = editorDescription;
/***/ }),
/* 283 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var editorDescription = {
linkText: 'WEF: Software',
dialogTitle: 'Software',
tabs: [{
label: 'General',
key: 'general',
specials: [{ type: 'LabelsAndDescriptionArea' }],
fieldsets: [{
fields: [{ property: 'P154' /* Logo */
}, { property: 'P18' /* Image */
}, { property: 'P373' /* Commons category */
}]
}, {
fields: [{ property: 'P31' /* instance of */
}, { property: 'P112' /* founder */
}, { property: 'P170' /* creator */
}, { property: 'P178' /* developer */
}, { property: 'P275' /* license */
}, { property: 'P856' /* site */
}]
}, {
fields: [{ property: 'P400' /* hardware platform */
}, { property: 'P306' /* OS */
}, { property: 'P277' /* programming language */
}, { property: 'P1414' /* UI */
}, { property: 'P407' /* Languages */
}]
}]
}, {
labelEntityId: 'P348',
key: 'versions',
fields: [{ property: 'P348' /* software version */
}]
}, {
labelEntityId: 'Q235557',
key: 'fileFormats',
fieldsets: [{
labelEntityId: 'P1072',
fields: [{ property: 'P1072' /* input formats */
}]
}, {
labelEntityId: 'P1073',
fields: [{ property: 'P1073' /* output formats */
}]
}]
}, {
labelEntityId: 'Q36524',
key: 'authoritycontrol',
fields: [{ property: 'P3381' /* File Format Wiki page ID */
}, { property: 'P646' /* Freebase ID */
}, { property: 'P3417' /* Quora topic ID */
}, { property: 'P3984' /* subreddit */
}]
}]
};
exports.default = editorDescription;
/***/ }),
/* 284 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _i18n = __webpack_require__(91);
var _i18n2 = _interopRequireDefault(_i18n);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var editorDescription = {
linkText: _i18n2.default.personLinkText,
dialogTitle: _i18n2.default.personDialogTitle,
tabs: [{
label: _i18n2.default.tabGeneral,
specials: [{ type: 'LabelsAndDescriptionArea' }],
fieldsets: [{
fields: [{ property: 'P1559' /* name in native language */
}, { property: 'P1477' /* birth name */
}, { property: 'P742' /* pseudonym */
}]
}, {
fields: [{ property: 'P53' /* noble family */
}, { property: 'P97' /* noble title */
}, { property: 'P511' /* honorific prefix */
}]
}, {
fields: [{ property: 'P31' /* instance of */
}, { property: 'P21' /* sex or gender */
}, { property: 'P91' /* sexual orientation */
}, { property: 'P27' /* country of citizenship */
}, { property: 'P103' /* native language */
}, { property: 'P1412' /* languages spoken */
}, { property: 'P856' /* official website */
}]
}]
}, {
label: _i18n2.default.tabBirthAndDeath,
fieldsets: [{
fields: [{ property: 'P569' /* birth date */
}, { property: 'P19' /* birth place */
}, { property: 'P172' /* ethnic group */
}, { property: 'P103' /* native language */
}]
}, {
fields: [{ property: 'P1321' /* place of origin (Switzerland) */
}, { property: 'P66' /* ancestral home */
}]
}, {
fields: [{ property: 'P570' /* noble family */
}, { property: 'P20' /* Death place */
}, { property: 'P509' /* Death cause */
}, { property: 'P1196' /* manner of death */
}, { property: 'P157' /* killed by */
}, { property: 'P119' /* place of burial */
}]
}, {
fields: [{ property: 'P535' /* Find a Grave grave ID */
}]
}]
}, {
label: _i18n2.default.tabMedia,
fieldsets: [{
fields: [{ property: 'P18' /* Image */
}, { property: 'P109' /* signature */
}, { property: 'P990' /* recording of the subject's voice */
}, { property: 'P1442' /* grave picture */
}]
}, {
labelEntityId: 'P237',
fields: [{ property: 'P94' /* coat of arms image */
}, { property: 'P237' /* coat of arms */
}]
}, {
fields: [{ property: 'P373' /* Commons category */
}, { property: 'P1472' /* Commons Creator page */
}]
}]
}, {
labelEntityId: 'Q8436' /* family */
, fields: [{ property: 'P22' /* father */
}, { property: 'P25' /* mother */
}, { property: 'P1290' /* godparent */
}, { property: 'P3373' /* brother/sister */
}, { property: 'P26' /* spouse */
}, { property: 'P451' /* cohabitant */
}, { property: 'P1971' /* number of children */
}, { property: 'P40' /* child */
}, { property: 'P1038' /* relative */
}]
}, {
label: _i18n2.default.tabEducationAndScience,
fieldsets: [{
fields: [{ property: 'P1066' /* student of */
}, { property: 'P69' /* alma mater */
}, { property: 'P184' /* doctoral advisor */
}, { property: 'P1026' /* doctoral thesis */
}, { property: 'P512' /* academic degree */
}, { property: 'P802' /* student */
}, { property: 'P185' /* doctoral student */
}]
}, {
fields: [{ property: 'P549' /* Mathematics Genealogy Project identifier */
}, { property: 'P496' /* ORCID */
}, { property: 'P864' /* ACM Digital Library author ID */
}, { property: 'P2456' /* DBLP pID */
}, { property: 'P1556' /* Zentralblatt MATH author ID */
}, { property: 'P1960' /* Google Scholar ID */
}, { property: 'P1053' /* ResearcherID */
}, { property: 'P1153' /* Scopus Author ID */
}]
}, {
fields: [{ property: 'P428' /* botanist author abbreviation */
}, { property: 'P835' /* author citation (zoology) */
}]
}]
}, {
labelEntityId: 'Q28640' /* profession */
, fieldsets: [{
fields: [{ property: 'P106' /* occupation */
}, { property: 'P101' /* field of work */
}, { property: 'P108' /* employer */
}, { property: 'P263' /* official residence */
}]
}, {
labelEntityId: 'P39',
fields: [{ property: 'P39' /* position held */
}]
}, {
labelEntityId: 'P463',
fields: [{ property: 'P463' /* member of */
}]
}]
}, {
labelEntityId: 'Q309' /* history */
, fieldsets: [{
labelEntityId: 'P793',
fields: [{ property: 'P793' /* significant event */
}]
}, {
labelEntityId: 'P1344',
fields: [{ property: 'P1344' /* participant of */
}]
}]
}, {
labelEntityId: 'Q8473' /* military */
, fields: [{ property: 'P241' /* military branch */
}, { property: 'P410' /* military rank */
}, { property: 'P598' /* commands */
}, { property: 'P607' /* conflict */
}]
}, {
labelEntityId: 'Q20978643' /* point of view */
, fieldsets: [{
labelEntityId: 'P102' /* member of political party */
, fields: [{ property: 'P102' /* member of political party */
}]
}, {
fields: [{ property: 'P140' /* religion */
}, { property: 'P411' /* canonization status */
}, { property: 'P841' /* feast day */
}]
}]
}, {
labelEntityId: 'Q349' /* sport */
, fields: [{ property: 'P2416' /* sports discipline competed in */
}, { property: 'P54' /* member of sports team */
}, { property: 'P413' /* position played on team */
}, { property: 'P423' /* shooting handedness */
}, { property: 'P741' /* playing hand */
}, { property: 'P468' /* dan/kyu rank */
}, { property: 'P2415' /* personal best */
}]
}, {
labelEntityId: 'Q11042' /* culture */
, fields: [{ property: 'P135' /* movement */
}, { property: 'P412' /* voice type */
}, { property: 'P1303' /* instrument */
}, { property: 'P800' /* notable works */
}, { property: 'P358' /* discography */
}]
}, {
labelEntityId: 'P166' /* award received */
, fieldsets: [{
labelEntityId: 'P166',
fields: [{ property: 'P166' /* award received */
}]
}]
}, {
labelEntityId: 'P1830' /* entities owned by the subject */
, fieldsets: [{
labelEntityId: 'P1830' /* entities owned by the subject */
, fields: [{ property: 'P1830' /* entities owned by the subject */
}]
}]
}, {
labelEntityId: 'P1343' /* described by source */
, fieldsets: [{
labelEntityId: 'P1343' /* described by source */
, fields: [{ property: 'P1343' /* described by source */
}]
}]
}]
};
exports.default = editorDescription;
/***/ }),
/* 285 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
function createThunkMiddleware(extraArgument) {
return function (_ref) {
var dispatch = _ref.dispatch,
getState = _ref.getState;
return function (next) {
return function (action) {
if (typeof action === 'function') {
return action(dispatch, getState, extraArgument);
}
return next(action);
};
};
};
}
var thunk = createThunkMiddleware();
thunk.withExtraArgument = createThunkMiddleware;
/* harmony default export */ __webpack_exports__["default"] = (thunk);
/***/ }),
/* 286 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var counter = 0;
var UL_TABS_CONTENT_STYLE = { margin: 0, padding: 0 };
var TabsWrapper = function (_Component) {
(0, _inherits3.default)(TabsWrapper, _Component);
function TabsWrapper() {
(0, _classCallCheck3.default)(this, TabsWrapper);
var _this = (0, _possibleConstructorReturn3.default)(this, (TabsWrapper.__proto__ || Object.getPrototypeOf(TabsWrapper)).apply(this, arguments));
_this.ref = _react2.default.createRef();
_this.renderCounter = counter++;
return _this;
}
(0, _createClass3.default)(TabsWrapper, [{
key: 'componentDidMount',
value: function componentDidMount() {
jQuery(this.ref.current).tabs({
activate: this.props.onActivate
});
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
jQuery(this.ref.current).tabs('destroy');
}
}, {
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate() {
return false;
}
}, {
key: 'render',
value: function render() {
var tabs = this.props.tabs;
var prefix = 'tab-' + this.renderCounter + '-';
return _react2.default.createElement(
'div',
{ ref: this.ref },
_react2.default.createElement(
'ul',
null,
tabs.map(function (tab, index) {
return _react2.default.createElement(
'li',
{ key: prefix + index },
_react2.default.createElement(
'a',
{ href: '#' + prefix + index },
tab.label
)
);
})
),
_react2.default.createElement(
'ul',
{ style: UL_TABS_CONTENT_STYLE },
tabs.map(function (tab, index) {
return _react2.default.createElement(
'div',
{ id: prefix + index, key: prefix + index },
tab.content
);
})
)
);
}
}]);
return TabsWrapper;
}(_react.Component);
TabsWrapper.propTypes = {
tabs: _propTypes2.default.arrayOf(_propTypes2.default.shape({
label: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.string]),
content: _propTypes2.default.node
})),
onActivate: _propTypes2.default.func
};
exports.default = TabsWrapper;
/***/ }),
/* 287 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".EditorTabsBuilder__tabContent___m_Tg7 {\r\n}\r\n", ""]);
// exports
exports.locals = {
"tabContent": "EditorTabsBuilder__tabContent___m_Tg7"
};
/***/ }),
/* 288 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(287);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 289 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".SparqlPropertyGroup__sparql_property_group___bOuR9 {\r\n height: 350px;\r\n overflow-y: auto;\r\n resize: vertical;\r\n}\r\n\r\n.manuallyResized .SparqlPropertyGroup__sparql_property_group___bOuR9 {\r\n height: unset;\r\n overflow-y: unset;\r\n resize: unset;\r\n}\r\n", ""]);
// exports
exports.locals = {
"sparql_property_group": "SparqlPropertyGroup__sparql_property_group___bOuR9"
};
/***/ }),
/* 290 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(289);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 291 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ChildrenBuilder = __webpack_require__(141);
var _ChildrenBuilder2 = _interopRequireDefault(_ChildrenBuilder);
var _reactSpinners = __webpack_require__(134);
var _PropertiesBySparqlProvider = __webpack_require__(194);
var _PropertiesBySparqlProvider2 = _interopRequireDefault(_PropertiesBySparqlProvider);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _SparqlPropertyGroup = __webpack_require__(290);
var _SparqlPropertyGroup2 = _interopRequireDefault(_SparqlPropertyGroup);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SparqlPropertyGroup = function (_PureComponent) {
(0, _inherits3.default)(SparqlPropertyGroup, _PureComponent);
function SparqlPropertyGroup() {
(0, _classCallCheck3.default)(this, SparqlPropertyGroup);
return (0, _possibleConstructorReturn3.default)(this, (SparqlPropertyGroup.__proto__ || Object.getPrototypeOf(SparqlPropertyGroup)).apply(this, arguments));
}
(0, _createClass3.default)(SparqlPropertyGroup, [{
key: 'render',
value: function render() {
var _props = this.props,
sortBy = _props.sortBy,
sparql = _props.sparql;
return _react2.default.createElement(
_PropertiesBySparqlProvider2.default,
{ sparql: sparql },
function (propertyIds) {
if (!propertyIds) {
return _react2.default.createElement(_reactSpinners.FadeLoader, null);
}
return _react2.default.createElement(
'div',
{ className: _SparqlPropertyGroup2.default.sparql_property_group },
_react2.default.createElement(_ChildrenBuilder2.default, {
fields: propertyIds.map(function (propertyId) {
return { property: propertyId };
}),
quickSearch: true,
sortBy: sortBy.split(/[ ;,\t]/) })
);
}
);
}
}]);
return SparqlPropertyGroup;
}(_react.PureComponent);
SparqlPropertyGroup.propTypes = {
sparql: _propTypes2.default.string.isRequired,
sortBy: _propTypes2.default.string
};
SparqlPropertyGroup.defaultProps = {
sortBy: 'language, label'
};
exports.default = SparqlPropertyGroup;
/***/ }),
/* 292 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, "table.ClaimsWithQualifiers__claims_with_qualifiers___2J_Ho {\r\n width: 100%;\r\n}\r\n\r\n.ClaimsWithQualifiers__claims_with_qualifiers___2J_Ho > thead > tr > th {\r\n height: 2em;\r\n}\r\n\r\n.ClaimsWithQualifiers__claims_with_qualifiers___2J_Ho > tbody > tr > td {\r\n vertical-align: top;\r\n}\r\n\r\n.ClaimsWithQualifiers__qualifier_table___26X8V {\r\n width: 100%;\r\n}\r\n", ""]);
// exports
exports.locals = {
"claims_with_qualifiers": "ClaimsWithQualifiers__claims_with_qualifiers___2J_Ho",
"qualifier_table": "ClaimsWithQualifiers__qualifier_table___26X8V"
};
/***/ }),
/* 293 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _defineProperty2 = __webpack_require__(55);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _extends3 = __webpack_require__(7);
var _extends4 = _interopRequireDefault(_extends3);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _Shapes = __webpack_require__(18);
var _i18n = __webpack_require__(87);
var _i18n2 = _interopRequireDefault(_i18n);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _SnaksArrayEditor = __webpack_require__(197);
var _SnaksArrayEditor2 = _interopRequireDefault(_SnaksArrayEditor);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SingleQualifierEditor = function (_PureComponent) {
(0, _inherits3.default)(SingleQualifierEditor, _PureComponent);
function SingleQualifierEditor() {
(0, _classCallCheck3.default)(this, SingleQualifierEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (SingleQualifierEditor.__proto__ || Object.getPrototypeOf(SingleQualifierEditor)).apply(this, arguments));
var _this$props = _this.props,
claimPropertyDescription = _this$props.claimPropertyDescription,
qualifierPropertyDescription = _this$props.qualifierPropertyDescription;
_this.confirmRemoveQualifierMessage = _i18n2.default.confirmRemoveQualifierTemplate.replace('{claimPropertyId}', claimPropertyDescription.id).replace('{claimPropertyLabel}', claimPropertyDescription.label || claimPropertyDescription.id).replace('{qualifierPropertyId}', qualifierPropertyDescription.id).replace('{qualifierPropertyLabel}', qualifierPropertyDescription.label || qualifierPropertyDescription.id);
_this.handleSnaksArrayUpdate = _this.handleSnaksArrayUpdate.bind(_this);
return _this;
}
(0, _createClass3.default)(SingleQualifierEditor, [{
key: 'handleSnaksArrayUpdate',
value: function handleSnaksArrayUpdate(snaksArray) {
this.props.onClaimUpdate((0, _extends4.default)({}, this.props.claim, {
qualifiers: (0, _extends4.default)({}, (this.props.claim || {}).qualifiers, (0, _defineProperty3.default)({}, this.props.qualifierPropertyDescription.id, snaksArray))
}));
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
claim = _props.claim,
qualifierPropertyDescription = _props.qualifierPropertyDescription;
var propertyId = qualifierPropertyDescription.id;
return _react2.default.createElement(_SnaksArrayEditor2.default, {
displayEmpty: true,
displayLabels: false,
onSnaksArrayUpdate: this.handleSnaksArrayUpdate,
propertyDescription: qualifierPropertyDescription,
removeButtonConfirmMessage: this.confirmRemoveQualifierMessage,
removeButtonLabel: _i18n2.default.buttonLabelRemoveQualifier,
snaksArray: (claim.qualifiers || {})[propertyId] });
}
}]);
return SingleQualifierEditor;
}(_react.PureComponent);
SingleQualifierEditor.propTypes = {
claim: _propTypes2.default.shape(_Shapes.Claim).isRequired,
claimPropertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default).isRequired,
onClaimUpdate: _propTypes2.default.func.isRequired,
qualifierPropertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default).isRequired
};
exports.default = SingleQualifierEditor;
/***/ }),
/* 294 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _defineProperty2 = __webpack_require__(55);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _extends3 = __webpack_require__(7);
var _extends4 = _interopRequireDefault(_extends3);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _AnimatedTr = __webpack_require__(89);
var _AnimatedTr2 = _interopRequireDefault(_AnimatedTr);
var _Shapes = __webpack_require__(18);
var _ClaimDeleteButtonCell = __webpack_require__(206);
var _ClaimDeleteButtonCell2 = _interopRequireDefault(_ClaimDeleteButtonCell);
var _ClaimQualifiersTable = __webpack_require__(205);
var _ClaimQualifiersTable2 = _interopRequireDefault(_ClaimQualifiersTable);
var _ClaimReferencesButtonCell = __webpack_require__(195);
var _ClaimReferencesButtonCell2 = _interopRequireDefault(_ClaimReferencesButtonCell);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _PropertyDescriptionsProvider = __webpack_require__(86);
var _PropertyDescriptionsProvider2 = _interopRequireDefault(_PropertyDescriptionsProvider);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _QualifierSelectButtonCell = __webpack_require__(193);
var _QualifierSelectButtonCell2 = _interopRequireDefault(_QualifierSelectButtonCell);
var _SelectRankButtonCell = __webpack_require__(192);
var _SelectRankButtonCell2 = _interopRequireDefault(_SelectRankButtonCell);
var _SingleQualifierEditor = __webpack_require__(293);
var _SingleQualifierEditor2 = _interopRequireDefault(_SingleQualifierEditor);
var _SnakEditorTableRowPart = __webpack_require__(129);
var _SnakEditorTableRowPart2 = _interopRequireDefault(_SnakEditorTableRowPart);
var _ClaimsWithQualifiers = __webpack_require__(191);
var _ClaimsWithQualifiers2 = _interopRequireDefault(_ClaimsWithQualifiers);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ClaimsWithQualifiersTableRows = function (_PureComponent) {
(0, _inherits3.default)(ClaimsWithQualifiersTableRows, _PureComponent);
function ClaimsWithQualifiersTableRows() {
(0, _classCallCheck3.default)(this, ClaimsWithQualifiersTableRows);
var _this = (0, _possibleConstructorReturn3.default)(this, (ClaimsWithQualifiersTableRows.__proto__ || Object.getPrototypeOf(ClaimsWithQualifiersTableRows)).apply(this, arguments));
_this.claimQualifiersTable = _react2.default.createRef();
_this.handleClaimDelete = _this.handleClaimDelete.bind(_this);
_this.handleQualifierSelect = _this.handleQualifierSelect.bind(_this);
_this.handleRankChange = _this.handleRankChange.bind(_this);
_this.handleSnakChange = _this.handleSnakChange.bind(_this);
return _this;
}
(0, _createClass3.default)(ClaimsWithQualifiersTableRows, [{
key: 'handleClaimDelete',
value: function handleClaimDelete() {
return this.props.onClaimDelete(this.props.claim);
}
}, {
key: 'handleQualifierSelect',
value: function handleQualifierSelect() {
this.claimQualifiersTable.current.showQualifierSelect();
}
}, {
key: 'handleRankChange',
value: function handleRankChange(rank) {
this.props.onClaimUpdate((0, _extends4.default)({}, this.props.claim, {
rank: rank
}));
}
}, {
key: 'handleSnakChange',
value: function handleSnakChange(snak) {
(0, _expect2.default)(snak).toBeAn('object');
(0, _expect2.default)(snak.property).toBeAn('string');
(0, _expect2.default)(snak.snaktype).toBeAn('string');
(0, _expect2.default)(snak.datatype).toBeAn('string');
this.props.onClaimUpdate((0, _extends4.default)({}, this.props.claim, {
mainsnak: snak
}));
}
}, {
key: 'handleSnaksArrayUpdateF',
value: function handleSnaksArrayUpdateF(propertyId) {
var _this2 = this;
(0, _expect2.default)(propertyId).toBeA('string');
return function (snaksArray) {
return _this2.props.onClaimUpdate((0, _extends4.default)({}, _this2.props.claim, {
qualifiers: (0, _extends4.default)({}, (_this2.props.claim || {}).qualifiers, (0, _defineProperty3.default)({}, propertyId, snaksArray))
}));
};
}
}, {
key: 'render',
value: function render() {
var _this3 = this;
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "on.*" }] */
var _props = this.props,
claim = _props.claim,
columns = _props.columns,
firstCell = _props.firstCell,
hasClaimDelete = _props.hasClaimDelete,
onClaimDelete = _props.onClaimDelete,
onClaimUpdate = _props.onClaimUpdate,
propertyDescription = _props.propertyDescription,
other = (0, _objectWithoutProperties3.default)(_props, ['claim', 'columns', 'firstCell', 'hasClaimDelete', 'onClaimDelete', 'onClaimUpdate', 'propertyDescription']);
var claimPropertyDescription = propertyDescription;
return _react2.default.createElement(
_react2.default.Fragment,
null,
_react2.default.createElement(
_AnimatedTr2.default,
(0, _extends4.default)({}, other, { key: 'claim' }),
firstCell,
_react2.default.createElement(_SelectRankButtonCell2.default, {
onChange: this.handleRankChange,
value: claim.rank }),
_react2.default.createElement(_QualifierSelectButtonCell2.default, {
onClick: this.handleQualifierSelect }),
_react2.default.createElement(_SnakEditorTableRowPart2.default, {
onSnakChange: this.handleSnakChange,
propertyDescription: propertyDescription,
snak: claim.mainsnak }),
_react2.default.createElement(_ClaimReferencesButtonCell2.default, {
claim: claim,
onClaimUpdate: onClaimUpdate }),
_react2.default.createElement(_ClaimDeleteButtonCell2.default, {
disabled: !hasClaimDelete,
onClaimDelete: this.handleClaimDelete,
propertyId: propertyDescription.id,
propertyLabel: propertyDescription.label }),
_react2.default.createElement(
_PropertyDescriptionsProvider2.default,
{ propertyIds: columns },
function (cache) {
return columns.map(function (propertyId) {
var propertyDescription = cache[propertyId];
if (typeof propertyDescription === 'undefined') {
return _react2.default.createElement(
'td',
null,
_react2.default.createElement(
'i',
null,
'Loading property description of ',
propertyId,
'...'
)
);
}
return _react2.default.createElement(
'td',
{ className: _ClaimsWithQualifiers2.default.qualifier_cell, key: propertyId },
_react2.default.createElement(
'table',
{ className: _ClaimsWithQualifiers2.default.qualifier_table },
_react2.default.createElement(_SingleQualifierEditor2.default, {
claim: claim,
claimPropertyDescription: claimPropertyDescription,
onClaimUpdate: _this3.props.onClaimUpdate,
qualifierPropertyDescription: propertyDescription })
)
);
});
}
)
),
_react2.default.createElement(
_AnimatedTr2.default,
null,
_react2.default.createElement('td', { colSpan: 2 }),
_react2.default.createElement(
'td',
{ colSpan: 1 + _SnakEditorTableRowPart2.default.TABLE_COLUMNS + 2 + columns.length * 1 },
_react2.default.createElement(_ClaimQualifiersTable2.default, {
allowedQualifiers: propertyDescription.allowedQualifiers,
claim: claim,
claimPropertyDescription: propertyDescription,
disabledQualifiers: columns,
onClaimUpdate: onClaimUpdate,
ref: this.claimQualifiersTable })
)
)
);
}
}]);
return ClaimsWithQualifiersTableRows;
}(_react.PureComponent);
ClaimsWithQualifiersTableRows.propTypes = {
firstCell: _propTypes2.default.node.isRequired,
claim: _propTypes2.default.shape(_Shapes.Claim).isRequired,
columns: _propTypes2.default.arrayOf(_propTypes2.default.string).isRequired,
hasClaimDelete: _propTypes2.default.bool.isRequired,
onClaimDelete: _propTypes2.default.func.isRequired,
onClaimUpdate: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default).isRequired
};
exports.default = ClaimsWithQualifiersTableRows;
/***/ }),
/* 295 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _Shapes = __webpack_require__(18);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ClaimAddButtonCell = __webpack_require__(207);
var _ClaimAddButtonCell2 = _interopRequireDefault(_ClaimAddButtonCell);
var _ClaimsWithQualifiersTableRows = __webpack_require__(294);
var _ClaimsWithQualifiersTableRows2 = _interopRequireDefault(_ClaimsWithQualifiersTableRows);
var _EntityLabel = __webpack_require__(54);
var _EntityLabel2 = _interopRequireDefault(_EntityLabel);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _ClaimsWithQualifiers = __webpack_require__(191);
var _ClaimsWithQualifiers2 = _interopRequireDefault(_ClaimsWithQualifiers);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var QUALIFIER_COLUMNS_WIDTH = ['0%', '33%', '25%', '20%', '17%'];
var ClaimsWithQualifiersTable = function (_PureComponent) {
(0, _inherits3.default)(ClaimsWithQualifiersTable, _PureComponent);
function ClaimsWithQualifiersTable() {
(0, _classCallCheck3.default)(this, ClaimsWithQualifiersTable);
return (0, _possibleConstructorReturn3.default)(this, (ClaimsWithQualifiersTable.__proto__ || Object.getPrototypeOf(ClaimsWithQualifiersTable)).apply(this, arguments));
}
(0, _createClass3.default)(ClaimsWithQualifiersTable, [{
key: 'render',
value: function render() {
var _props = this.props,
claims = _props.claims,
columns = _props.columns,
displayEmpty = _props.displayEmpty,
propertyDescription = _props.propertyDescription,
onClaimAdd = _props.onClaimAdd,
onClaimAdd2 = _props.onClaimAdd2,
onClaimUpdate = _props.onClaimUpdate,
onClaimDelete = _props.onClaimDelete;
var children = void 0;
if (!claims || claims.length === 0) {
if (!displayEmpty) return null;
var newClaim = (0, _Shapes.newStatementClaim)(propertyDescription);
children = [_react2.default.createElement(_ClaimsWithQualifiersTableRows2.default, {
claim: newClaim,
columns: columns,
firstCell: _react2.default.createElement(_ClaimAddButtonCell2.default, { onClick: onClaimAdd2 }),
hasClaimDelete: false,
key: newClaim.id,
onClaimDelete: onClaimDelete,
onClaimUpdate: onClaimUpdate,
propertyDescription: propertyDescription })];
} else {
children = claims.map(function (claim, i) {
return _react2.default.createElement(_ClaimsWithQualifiersTableRows2.default, {
claim: claim,
columns: columns,
firstCell: i == 0 ? _react2.default.createElement(_ClaimAddButtonCell2.default, { onClick: onClaimAdd }) : _react2.default.createElement('td', null),
hasClaimDelete: true,
key: claim.id,
onClaimDelete: onClaimDelete,
onClaimUpdate: onClaimUpdate,
propertyDescription: propertyDescription });
});
}
return _react2.default.createElement(
'table',
{ className: _ClaimsWithQualifiers2.default.claims_with_qualifiers },
_react2.default.createElement(
'thead',
null,
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'th',
{ colSpan: 18, key: '_mainsnak' },
propertyDescription.label || propertyDescription.id
),
columns.map(function (column) {
return _react2.default.createElement(
'th',
{ key: column, width: QUALIFIER_COLUMNS_WIDTH[columns.length] },
_react2.default.createElement(_EntityLabel2.default, { entityId: column })
);
})
)
),
_react2.default.createElement(
'tbody',
{ className: _ClaimsWithQualifiers2.default.wef_property_editor_tbody },
children
)
);
}
}]);
return ClaimsWithQualifiersTable;
}(_react.PureComponent);
ClaimsWithQualifiersTable.propTypes = {
claims: _propTypes2.default.arrayOf(_propTypes2.default.shape(_Shapes.Claim)),
columns: _propTypes2.default.arrayOf(_propTypes2.default.string).isRequired,
displayEmpty: _propTypes2.default.bool,
onClaimAdd: _propTypes2.default.func.isRequired,
onClaimAdd2: _propTypes2.default.func.isRequired,
onClaimDelete: _propTypes2.default.func.isRequired,
onClaimUpdate: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default)
};
exports.default = ClaimsWithQualifiersTable;
/***/ }),
/* 296 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _core3 = __webpack_require__(33);
var _core4 = _interopRequireDefault(_core3);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var RANKS = ['preferred', 'normal', 'deprecated'];
var RankSelect = function (_Component) {
(0, _inherits3.default)(RankSelect, _Component);
function RankSelect() {
(0, _classCallCheck3.default)(this, RankSelect);
var _this = (0, _possibleConstructorReturn3.default)(this, (RankSelect.__proto__ || Object.getPrototypeOf(RankSelect)).apply(this, arguments));
_this.ref = _react2.default.createRef();
_this.handleChange = _this.handleChange.bind(_this);
return _this;
}
(0, _createClass3.default)(RankSelect, [{
key: 'componentDidMount',
value: function componentDidMount() {
this.ref.current.focus();
}
}, {
key: 'handleChange',
value: function handleChange(event) {
this.props.onChange(this.ref.current.value);
event.stopPropagation();
}
}, {
key: 'render',
value: function render() {
/*eslint no-unused-vars: ["error", { "varsIgnorePattern": "onChange" }]*/
var _props = this.props,
onChange = _props.onChange,
value = _props.value,
other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'value']);
return _react2.default.createElement(
'select',
(0, _extends3.default)({
className: _core4.default['wef-rankselector-menu'],
onChange: this.handleChange,
ref: this.ref,
size: 3,
value: value
}, other),
RANKS.map(function (rank) {
return _react2.default.createElement(
'option',
{
key: rank,
title: _core2.default.rankTitle[rank],
value: rank },
_core2.default.rank[rank]
);
})
);
}
}]);
return RankSelect;
}(_react.Component);
RankSelect.propTypes = {
onChange: _propTypes2.default.func.isRequired,
value: _propTypes2.default.oneOf(RANKS)
};
RankSelect.defaultProps = {
value: 'normal'
};
exports.default = RankSelect;
/***/ }),
/* 297 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, "td.FlagCell__wef_flag_cell___2A_gl {\r\n width: 22px;\r\n}\r\n\r\ntd.FlagCell__wef_flag_cell___2A_gl:empty {\r\n width: 0;\r\n}\r\n\r\n.FlagCell__wef_flag_cell___2A_gl div {\r\n padding: 0 0.2em;\r\n}\r\n\r\n.FlagCell__wef_flag_cell___2A_gl p {\r\n padding: 0;\r\n margin: 0;\r\n}\r\n", ""]);
// exports
exports.locals = {
"wef_flag_cell": "FlagCell__wef_flag_cell___2A_gl"
};
/***/ }),
/* 298 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(297);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 299 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _CacheValueProvider = __webpack_require__(140);
var _CacheValueProvider2 = _interopRequireDefault(_CacheValueProvider);
var _flagImageHtmlCache = __webpack_require__(218);
var _flagImageHtmlCache2 = _interopRequireDefault(_flagImageHtmlCache);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var FlagImageHtmlProvider = function (_PureComponent) {
(0, _inherits3.default)(FlagImageHtmlProvider, _PureComponent);
function FlagImageHtmlProvider() {
(0, _classCallCheck3.default)(this, FlagImageHtmlProvider);
return (0, _possibleConstructorReturn3.default)(this, (FlagImageHtmlProvider.__proto__ || Object.getPrototypeOf(FlagImageHtmlProvider)).apply(this, arguments));
}
(0, _createClass3.default)(FlagImageHtmlProvider, [{
key: 'render',
value: function render() {
var _props = this.props,
children = _props.children,
fileName = _props.fileName;
return _react2.default.createElement(
_CacheValueProvider2.default,
{
cache: _flagImageHtmlCache2.default,
cacheKey: fileName },
children
);
}
}]);
return FlagImageHtmlProvider;
}(_react.PureComponent);
FlagImageHtmlProvider.propTypes = {
children: _propTypes2.default.func.isRequired,
fileName: _propTypes2.default.string.isRequired
};
exports.default = FlagImageHtmlProvider;
/***/ }),
/* 300 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _FlagImageHtmlProvider = __webpack_require__(299);
var _FlagImageHtmlProvider2 = _interopRequireDefault(_FlagImageHtmlProvider);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _FlagCell = __webpack_require__(298);
var _FlagCell2 = _interopRequireDefault(_FlagCell);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var FlagCell = function (_Component) {
(0, _inherits3.default)(FlagCell, _Component);
function FlagCell() {
(0, _classCallCheck3.default)(this, FlagCell);
return (0, _possibleConstructorReturn3.default)(this, (FlagCell.__proto__ || Object.getPrototypeOf(FlagCell)).apply(this, arguments));
}
(0, _createClass3.default)(FlagCell, [{
key: 'render',
value: function render() {
var flagImage = this.props.flagImage;
if (!flagImage) return _react2.default.createElement('td', { className: _FlagCell2.default.wef_flag_cell });
return _react2.default.createElement(
'td',
{ className: _FlagCell2.default.wef_flag_cell },
_react2.default.createElement(
_FlagImageHtmlProvider2.default,
{ fileName: flagImage },
function (flagImageHtml) {
return flagImage ? _react2.default.createElement('div', { dangerouslySetInnerHTML: { __html: flagImageHtml } }) : null;
}
)
);
}
}]);
return FlagCell;
}(_react.Component);
FlagCell.propTypes = {
flagImage: _propTypes2.default.string
};
exports.default = FlagCell;
/***/ }),
/* 301 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".references__referencesButtonCell___3eGZn {\r\n width: 24px;\r\n\theight: 20px;\r\n}\r\n\r\n.references__referencesButton___3oJ_5 {\r\n min-width: 24px;\r\n width: 24px;\r\n\theight: 20px;\r\n margin: 0 !important;\r\n}\r\n\r\n.references__referencesButton___3oJ_5 span {\r\n position: relative;\r\n top: -1px;\r\n}\r\n\r\ntable.references__referencesEditorTable___2Ew6w {\r\n width: 100%;\r\n border-collapse: collapse;;\r\n}\r\n\r\ntable.references__referencesEditorTable___2Ew6w > tbody > tr {\r\n border-collapse: collapse;\r\n border-bottom: darkgray 2px dotted;\r\n}\r\n\r\n.references__referenceCounter___3dIe1 {\r\n vertical-align: top;\r\n}\r\n\r\ntable.references__claimReferenceEditor___3iLdG {\r\n width: 100%;\r\n}\r\n\r\n.references__referencePropertyAlreadyPresent___1ASPu {\r\n color: gray;\r\n}\r\n\r\n.references__referencePropertyUnsupported___1_I2l {\r\n color: darkgray;\r\n}\r\n\r\n.references__lruLabel___bwLNh {\r\n padding-top: 2em;\r\n}\r\n\r\n.references__lruButton___3GQAo {\r\n padding: 0.5em 1em;\r\n}\r\n", ""]);
// exports
exports.locals = {
"referencesButtonCell": "references__referencesButtonCell___3eGZn",
"referencesButton": "references__referencesButton___3oJ_5",
"referencesEditorTable": "references__referencesEditorTable___2Ew6w",
"referenceCounter": "references__referenceCounter___3dIe1",
"claimReferenceEditor": "references__claimReferenceEditor___3iLdG",
"referencePropertyAlreadyPresent": "references__referencePropertyAlreadyPresent___1ASPu",
"referencePropertyUnsupported": "references__referencePropertyUnsupported___1_I2l",
"lruLabel": "references__lruLabel___bwLNh",
"lruButton": "references__lruButton___3GQAo"
};
/***/ }),
/* 302 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _i18n = __webpack_require__(85);
var _i18n2 = _interopRequireDefault(_i18n);
var _PropertiesBySparqlProvider = __webpack_require__(194);
var _PropertiesBySparqlProvider2 = _interopRequireDefault(_PropertiesBySparqlProvider);
var _PropertyDescriptionsProvider = __webpack_require__(86);
var _PropertyDescriptionsProvider2 = _interopRequireDefault(_PropertyDescriptionsProvider);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _references = __webpack_require__(98);
var _references2 = _interopRequireDefault(_references);
var _SnakValueEditorFactory = __webpack_require__(135);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ReferencePropertySelect = function (_PureComponent) {
(0, _inherits3.default)(ReferencePropertySelect, _PureComponent);
function ReferencePropertySelect() {
(0, _classCallCheck3.default)(this, ReferencePropertySelect);
var _this = (0, _possibleConstructorReturn3.default)(this, (ReferencePropertySelect.__proto__ || Object.getPrototypeOf(ReferencePropertySelect)).apply(this, arguments));
_this.handleChange = _this.handleChange.bind(_this);
return _this;
}
(0, _createClass3.default)(ReferencePropertySelect, [{
key: 'handleChange',
value: function handleChange(event) {
var propertyId = event.target.value;
if (propertyId) {
this.props.onSelect(propertyId);
}
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
var alreadyPresent = this.props.alreadyPresent;
// see https://www.wikidata.org/wiki/Q18608359
return _react2.default.createElement(
_PropertiesBySparqlProvider2.default,
{ sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31 wd:Q18608359 . ' + '}' },
function (propertyIds) {
if (!propertyIds) return _react2.default.createElement(
'i',
null,
'Loading possible reference properties...'
);
return _react2.default.createElement(
_PropertyDescriptionsProvider2.default,
{ propertyIds: propertyIds },
function (caches) {
if (!caches) return _react2.default.createElement(
'i',
null,
'Loading possible reference properties...'
);
return _react2.default.createElement(
'select',
{ onChange: _this2.handleChange, value: '_placeholder' },
_react2.default.createElement(
'option',
{
disabled: true,
hidden: true,
key: '_placeholder',
value: '_placeholder' },
_i18n2.default.placehoderSelect
),
propertyIds.map(function (propertyId) {
var propertyDescription = caches[propertyId];
if (!propertyDescription || !propertyDescription.label) {
return _react2.default.createElement(
'option',
{ key: propertyId, value: propertyId },
propertyId
);
}
return _react2.default.createElement(SelectOption, {
alreadyPresent: alreadyPresent.indexOf(propertyId) !== -1,
description: propertyDescription.description,
key: propertyId,
label: propertyDescription.label,
propertyId: propertyId,
unsupported: _SnakValueEditorFactory.SUPPORTED_DATATYPES.indexOf(propertyDescription.datatype) === -1 });
})
);
}
);
}
);
}
}]);
return ReferencePropertySelect;
}(_react.PureComponent);
ReferencePropertySelect.propTypes = {
alreadyPresent: _propTypes2.default.arrayOf(_propTypes2.default.string).isRequired,
onSelect: _propTypes2.default.func.isRequired
};
exports.default = ReferencePropertySelect;
var SelectOption = function (_PureComponent2) {
(0, _inherits3.default)(SelectOption, _PureComponent2);
function SelectOption() {
(0, _classCallCheck3.default)(this, SelectOption);
return (0, _possibleConstructorReturn3.default)(this, (SelectOption.__proto__ || Object.getPrototypeOf(SelectOption)).apply(this, arguments));
}
(0, _createClass3.default)(SelectOption, [{
key: 'render',
value: function render() {
var _props = this.props,
alreadyPresent = _props.alreadyPresent,
unsupported = _props.unsupported,
propertyId = _props.propertyId,
description = _props.description,
label = _props.label;
var classNames = [];
if (alreadyPresent) classNames.push(_references2.default.referencePropertyAlreadyPresent);
if (unsupported) classNames.push(_references2.default.referencePropertyUnsupported);
var actualLabel = (label ? label + ' (' + propertyId + ')' : propertyId) + (unsupported ? _i18n2.default.optionSuffixUnsupported : '');
return _react2.default.createElement(
'option',
{
className: classNames.join(' '),
title: description,
value: propertyId },
actualLabel
);
}
}]);
return SelectOption;
}(_react.PureComponent);
SelectOption.propTypes = {
alreadyPresent: _propTypes2.default.bool.isRequired,
unsupported: _propTypes2.default.bool.isRequired,
propertyId: _propTypes2.default.string.isRequired,
description: _propTypes2.default.string,
label: _propTypes2.default.string
};
/***/ }),
/* 303 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _defineProperty2 = __webpack_require__(55);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _extends3 = __webpack_require__(7);
var _extends4 = _interopRequireDefault(_extends3);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _generateRandomString = __webpack_require__(88);
var _generateRandomString2 = _interopRequireDefault(_generateRandomString);
var _i18n = __webpack_require__(85);
var _i18n2 = _interopRequireDefault(_i18n);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _ReferencePropertySelect = __webpack_require__(302);
var _ReferencePropertySelect2 = _interopRequireDefault(_ReferencePropertySelect);
var _SnaksMapEditor = __webpack_require__(198);
var _SnaksMapEditor2 = _interopRequireDefault(_SnaksMapEditor);
var _references = __webpack_require__(98);
var _references2 = _interopRequireDefault(_references);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ClaimReferenceEditor = function (_PureComponent) {
(0, _inherits3.default)(ClaimReferenceEditor, _PureComponent);
function ClaimReferenceEditor() {
(0, _classCallCheck3.default)(this, ClaimReferenceEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (ClaimReferenceEditor.__proto__ || Object.getPrototypeOf(ClaimReferenceEditor)).apply(this, arguments));
_this.handleReferencePropertyAdd = _this.handleReferencePropertyAdd.bind(_this);
_this.handleSnaksMapUpdate = _this.handleSnaksMapUpdate.bind(_this);
return _this;
}
(0, _createClass3.default)(ClaimReferenceEditor, [{
key: 'handleReferencePropertyAdd',
value: function handleReferencePropertyAdd(propertyId) {
var _props = this.props,
onReferenceChange = _props.onReferenceChange,
reference = _props.reference;
var existing = (reference.snaks || {})[propertyId] || [];
onReferenceChange((0, _extends4.default)({}, reference, {
snaks: (0, _extends4.default)({}, reference.snaks, (0, _defineProperty3.default)({}, propertyId, [].concat((0, _toConsumableArray3.default)(existing), [{
snaktype: 'value',
property: propertyId,
hash: (0, _generateRandomString2.default)()
}])))
}));
}
}, {
key: 'handleSnaksMapUpdate',
value: function handleSnaksMapUpdate(snaks) {
this.props.onReferenceChange((0, _extends4.default)({}, this.props.reference, {
snaks: snaks
}));
}
}, {
key: 'removeButtonConfirmMessageF',
value: function removeButtonConfirmMessageF(snakPropertyDescription) {
return _i18n2.default.confirmRemoveSnakTemplate.replace('{snakPropertyId}', snakPropertyDescription.id).replace('{snakPropertyLabel}', snakPropertyDescription.label || snakPropertyDescription.id);
}
}, {
key: 'render',
value: function render() {
var reference = this.props.reference;
var snaks = reference.snaks || {};
var propertyIds = Object.keys(snaks);
return _react2.default.createElement(
'table',
{ className: _references2.default.claimReferenceEditor },
_react2.default.createElement(_SnaksMapEditor2.default, {
addButtonLabel: _i18n2.default.buttonLabelAddQualifier,
onSnaksMapUpdate: this.handleSnaksMapUpdate,
removeButtonConfirmMessageF: this.removeButtonConfirmMessageF,
removeButtonLabel: _i18n2.default.buttonTitleRemoveQualifier,
snaksMap: reference.snaks }),
_react2.default.createElement(
'tbody',
null,
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'td',
{ colSpan: 99 },
_react2.default.createElement(_ReferencePropertySelect2.default, {
alreadyPresent: propertyIds,
onSelect: this.handleReferencePropertyAdd })
)
)
)
);
}
}]);
return ClaimReferenceEditor;
}(_react.PureComponent);
ClaimReferenceEditor.propTypes = {
onReferenceChange: _propTypes2.default.func.isRequired,
reference: _propTypes2.default.object.isRequired
};
exports.default = ClaimReferenceEditor;
/***/ }),
/* 304 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
exports.onReferenceUpdate = onReferenceUpdate;
exports.getLastRecentlyUsedReferences = getLastRecentlyUsedReferences;
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var localStorage = window.localStorage || {
_cache: {},
getItem: function getItem(key) {
return this._cache[key];
},
setItem: function setItem(key, value) {
this._cache[key] = value;
}
};
var LSKEY = 'WEF_LRU_REFERENCES';
var MAX_ITEMS = 10;
function get() {
var json = localStorage.getItem(LSKEY);
if (!json) return [];
try {
var result = JSON.parse(json);
(0, _expect2.default)(result).toBeAn('array');
return result;
} catch (err) {
mw.log.warn('Unable to parse local storage copy of LRU cache');
mw.log.warn(err);
return [];
}
}
function set(obj) {
localStorage.setItem(LSKEY, JSON.stringify(obj));
}
var ok = function ok(x) {
return x !== undefined && x !== null;
};
function onReferenceUpdate(reference) {
if (!reference) return;
var entityIds = ((reference.snaks || {}).P248 || []).filter(ok).map(function (snak) {
return snak.datavalue;
}).filter(ok).map(function (datavalue) {
return datavalue.value;
}).filter(ok).map(function (value) {
return value.id;
}).filter(ok);
if (entityIds.length !== 1) return;
var entityId = entityIds[0];
var oldStorage = get();
set([{
key: entityId,
value: reference
}].concat((0, _toConsumableArray3.default)(oldStorage.filter(function (item) {
return item.key !== entityId;
}).slice(0, MAX_ITEMS - 1))));
}
function getLastRecentlyUsedReferences() {
return Object.freeze(get());
}
/***/ }),
/* 305 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _LastRecentlyUsedReferencesStore = __webpack_require__(304);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _AnimatedTr = __webpack_require__(89);
var _AnimatedTr2 = _interopRequireDefault(_AnimatedTr);
var _Shapes = __webpack_require__(18);
var _ClaimReferenceEditor = __webpack_require__(303);
var _ClaimReferenceEditor2 = _interopRequireDefault(_ClaimReferenceEditor);
var _EntityDescription = __webpack_require__(137);
var _EntityLabel = __webpack_require__(54);
var _reselect = __webpack_require__(51);
var _generateRandomString = __webpack_require__(88);
var _generateRandomString2 = _interopRequireDefault(_generateRandomString);
var _i18n = __webpack_require__(85);
var _i18n2 = _interopRequireDefault(_i18n);
var _JQueryButton = __webpack_require__(138);
var _JQueryButton2 = _interopRequireDefault(_JQueryButton);
var _LabelDescriptionsProvider = __webpack_require__(199);
var _LabelDescriptionsProvider2 = _interopRequireDefault(_LabelDescriptionsProvider);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _references = __webpack_require__(98);
var _references2 = _interopRequireDefault(_references);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ClaimReferencesEditorContent = function (_PureComponent) {
(0, _inherits3.default)(ClaimReferencesEditorContent, _PureComponent);
function ClaimReferencesEditorContent() {
(0, _classCallCheck3.default)(this, ClaimReferencesEditorContent);
var _this = (0, _possibleConstructorReturn3.default)(this, (ClaimReferencesEditorContent.__proto__ || Object.getPrototypeOf(ClaimReferencesEditorContent)).apply(this, arguments));
_this.memoizeLruKeys = (0, _reselect.defaultMemoize)(function (lru) {
return lru.map(function (item) {
return item.key;
});
});
_this.handleReferenceAdd = _this.handleReferenceAdd.bind(_this);
_this.handleReferenceChange = _this.handleReferenceChange.bind(_this);
_this.state = {
lru: (0, _LastRecentlyUsedReferencesStore.getLastRecentlyUsedReferences)()
};
return _this;
}
(0, _createClass3.default)(ClaimReferencesEditorContent, [{
key: 'bindLruClick',
value: function bindLruClick(item) {
var _this2 = this;
return function () {
_this2.setState(function (state) {
return {
lru: state.lru.filter(function (i) {
return i.key !== item.key;
})
};
});
_this2.handleReferenceAddImpl((0, _extends3.default)({}, item.value, {
hash: (0, _generateRandomString2.default)()
}));
};
}
}, {
key: 'handleReferenceAdd',
value: function handleReferenceAdd() {
this.handleReferenceAddImpl({
hash: (0, _generateRandomString2.default)(),
snaks: {}
});
}
}, {
key: 'handleReferenceAddImpl',
value: function handleReferenceAddImpl(newReference) {
var _props = this.props,
claim = _props.claim,
onClaimUpdate = _props.onClaimUpdate;
var references = claim.references || [];
onClaimUpdate((0, _extends3.default)({}, claim, {
references: [].concat((0, _toConsumableArray3.default)(references), [newReference])
}));
}
}, {
key: 'handleReferenceChange',
value: function handleReferenceChange(reference) {
var _props2 = this.props,
claim = _props2.claim,
onClaimUpdate = _props2.onClaimUpdate;
onClaimUpdate((0, _extends3.default)({}, claim, {
references: claim.references.map(function (oldRef) {
return oldRef.hash === reference.hash ? reference : oldRef;
})
}));
(0, _LastRecentlyUsedReferencesStore.onReferenceUpdate)(reference);
}
}, {
key: 'render',
value: function render() {
var _this3 = this;
var claim = this.props.claim;
var references = claim.references || [];
return _react2.default.createElement(
'div',
null,
_react2.default.createElement(
'table',
{ className: _references2.default.referencesEditorTable },
_react2.default.createElement(
'tbody',
null,
references.map(function (reference, index) {
return _react2.default.createElement(
_AnimatedTr2.default,
{ className: _references2.default.referenceEditor, key: reference.hash },
_react2.default.createElement(
'th',
{ className: _references2.default.referenceCounter },
index + 1,
'.'
),
_react2.default.createElement(
'td',
null,
_react2.default.createElement(_ClaimReferenceEditor2.default, {
onReferenceChange: _this3.handleReferenceChange,
reference: reference })
)
);
})
)
),
this.state.lru.length !== 0 && _react2.default.createElement(
'div',
null,
_react2.default.createElement(
'p',
{ className: _references2.default.lruLabel },
_i18n2.default.dialogLabelAddRecentlyUsed
),
_react2.default.createElement(
_LabelDescriptionsProvider2.default,
{
entityIds: this.memoizeLruKeys(this.state.lru) },
function (cache) {
return _this3.state.lru.map(function (item) {
return _react2.default.createElement(
'div',
{ key: item.key },
_react2.default.createElement(_JQueryButton2.default, {
className: _references2.default.lruButton,
label: (0, _EntityLabel.constructLabel)(item.key, cache[item.key], true),
onClick: _this3.bindLruClick(item),
text: true,
title: (0, _EntityDescription.constructDescription)(cache[item.key]) })
);
});
}
)
)
);
}
}]);
return ClaimReferencesEditorContent;
}(_react.PureComponent);
ClaimReferencesEditorContent.propTypes = {
claim: _propTypes2.default.shape(_Shapes.Claim).isRequired,
onClaimUpdate: _propTypes2.default.func.isRequired
};
exports.default = ClaimReferencesEditorContent;
/***/ }),
/* 306 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _Shapes = __webpack_require__(18);
var _ClaimReferencesEditorContent = __webpack_require__(305);
var _ClaimReferencesEditorContent2 = _interopRequireDefault(_ClaimReferencesEditorContent);
var _DialogWrapper = __webpack_require__(162);
var _DialogWrapper2 = _interopRequireDefault(_DialogWrapper);
var _generateRandomString = __webpack_require__(88);
var _generateRandomString2 = _interopRequireDefault(_generateRandomString);
var _i18n = __webpack_require__(85);
var _i18n2 = _interopRequireDefault(_i18n);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ClaimReferencesEditorDialog = function (_PureComponent) {
(0, _inherits3.default)(ClaimReferencesEditorDialog, _PureComponent);
function ClaimReferencesEditorDialog() {
(0, _classCallCheck3.default)(this, ClaimReferencesEditorDialog);
var _this = (0, _possibleConstructorReturn3.default)(this, (ClaimReferencesEditorDialog.__proto__ || Object.getPrototypeOf(ClaimReferencesEditorDialog)).apply(this, arguments));
_this.handleReferenceAdd = _this.handleReferenceAdd.bind(_this);
return _this;
}
(0, _createClass3.default)(ClaimReferencesEditorDialog, [{
key: 'handleReferenceAdd',
value: function handleReferenceAdd() {
var _props = this.props,
claim = _props.claim,
onClaimUpdate = _props.onClaimUpdate;
var references = claim.references || [];
onClaimUpdate((0, _extends3.default)({}, claim, {
references: [].concat((0, _toConsumableArray3.default)(references), [{
hash: (0, _generateRandomString2.default)(),
snaks: {}
}])
}));
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props,
claim = _props2.claim,
onClaimUpdate = _props2.onClaimUpdate;
return _react2.default.createElement(
_DialogWrapper2.default,
{
buttons: [{
text: _i18n2.default.dialogButtonAddLabel,
label: _i18n2.default.dialogButtonAddTitle,
click: this.handleReferenceAdd
}, {
text: _i18n2.default.dialogButtonCloseLabel,
label: _i18n2.default.dialogButtonCloseTitle,
click: this.props.onCloseClick
}],
minWidth: 600,
title: _i18n2.default.dialogTitle },
_react2.default.createElement(_ClaimReferencesEditorContent2.default, {
claim: claim,
onClaimUpdate: onClaimUpdate })
);
}
}]);
return ClaimReferencesEditorDialog;
}(_react.PureComponent);
ClaimReferencesEditorDialog.propTypes = {
claim: _propTypes2.default.shape(_Shapes.Claim).isRequired,
onClaimUpdate: _propTypes2.default.func.isRequired,
onCloseClick: _propTypes2.default.func.isRequired
};
exports.default = ClaimReferencesEditorDialog;
/***/ }),
/* 307 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".ClaimQualifiersTable__wef_claim_qualifiers_table___1B-7D {\r\n width: 100%;\r\n}\r\n\r\n.ClaimQualifiersTable__wef_claim_new_qualifier___1v0uX th {\r\n text-align: left;\r\n width: 1px;\r\n}\r\n", ""]);
// exports
exports.locals = {
"wef_claim_qualifiers_table": "ClaimQualifiersTable__wef_claim_qualifiers_table___1B-7D",
"wef_claim_new_qualifier": "ClaimQualifiersTable__wef_claim_new_qualifier___1v0uX"
};
/***/ }),
/* 308 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(307);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 309 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _core3 = __webpack_require__(33);
var _core4 = _interopRequireDefault(_core3);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SnakTypeSelect = function (_PureComponent) {
(0, _inherits3.default)(SnakTypeSelect, _PureComponent);
function SnakTypeSelect() {
(0, _classCallCheck3.default)(this, SnakTypeSelect);
var _this = (0, _possibleConstructorReturn3.default)(this, (SnakTypeSelect.__proto__ || Object.getPrototypeOf(SnakTypeSelect)).apply(this, arguments));
_this.ref = _react2.default.createRef();
_this.handleChange = _this.handleChange.bind(_this);
return _this;
}
(0, _createClass3.default)(SnakTypeSelect, [{
key: 'componentDidMount',
value: function componentDidMount() {
this.ref.current.focus();
}
}, {
key: 'handleChange',
value: function handleChange(event) {
this.props.onChange(this.ref.current.value);
event.stopPropagation();
}
}, {
key: 'render',
value: function render() {
/*eslint no-unused-vars: ["error", { "varsIgnorePattern": "onChange" }]*/
var _props = this.props,
onChange = _props.onChange,
value = _props.value,
other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'value']);
return _react2.default.createElement(
'select',
(0, _extends3.default)({
className: _core4.default['wef-snaktypeselector-menu'],
onChange: this.handleChange,
ref: this.ref,
size: 3,
value: value
}, other),
_react2.default.createElement(
'option',
{
title: _core2.default.snakTypeTitle.value,
value: 'value' },
_core2.default.snakType.value
),
_react2.default.createElement(
'option',
{
title: _core2.default.snakTypeTitle.somevalue,
value: 'somevalue' },
_core2.default.snakType.somevalue
),
_react2.default.createElement(
'option',
{
title: _core2.default.snakTypeTitle.novalue,
value: 'novalue' },
_core2.default.snakType.novalue
)
);
}
}]);
return SnakTypeSelect;
}(_react.PureComponent);
SnakTypeSelect.propTypes = {
onChange: _propTypes2.default.func.isRequired,
value: _propTypes2.default.string
};
SnakTypeSelect.defaultProps = {
value: 'value'
};
exports.default = SnakTypeSelect;
/***/ }),
/* 310 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ButtonCell = __webpack_require__(45);
var _ButtonCell2 = _interopRequireDefault(_ButtonCell);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _reactjsPopup = __webpack_require__(132);
var _reactjsPopup2 = _interopRequireDefault(_reactjsPopup);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _SnakTypeSelect = __webpack_require__(309);
var _SnakTypeSelect2 = _interopRequireDefault(_SnakTypeSelect);
var _core3 = __webpack_require__(33);
var _core4 = _interopRequireDefault(_core3);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SnakTypeSelectButtonCell = function (_PureComponent) {
(0, _inherits3.default)(SnakTypeSelectButtonCell, _PureComponent);
function SnakTypeSelectButtonCell() {
(0, _classCallCheck3.default)(this, SnakTypeSelectButtonCell);
var _this = (0, _possibleConstructorReturn3.default)(this, (SnakTypeSelectButtonCell.__proto__ || Object.getPrototypeOf(SnakTypeSelectButtonCell)).apply(this, arguments));
_this.handleClick = function () {
return _this.setState(function (state) {
return { open: !state.open };
});
};
_this.handleChange = _this.handleChange.bind(_this);
_this.state = {
open: false
};
return _this;
}
(0, _createClass3.default)(SnakTypeSelectButtonCell, [{
key: 'handleChange',
value: function handleChange(value) {
this.setState({
open: false
});
if (value !== this.props.value) {
var onChange = this.props.onChange;
if (onChange) onChange.apply(undefined, arguments);
}
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
var _props = this.props,
disabled = _props.disabled,
value = _props.value;
return _react2.default.createElement(
_ButtonCell2.default,
{
disabled: disabled,
icon: _core4.default['ui-icon-wef-snaktype-' + value],
label: _core2.default.snakType[value],
onClick: this.handleClick },
function (children) {
return _react2.default.createElement(
_reactjsPopup2.default,
{
arrow: false,
contentStyle: { padding: 0 },
open: _this2.state.open,
position: 'bottom right',
trigger: children },
_react2.default.createElement(_SnakTypeSelect2.default, {
onChange: _this2.handleChange,
value: value })
);
}
);
}
}]);
return SnakTypeSelectButtonCell;
}(_react.PureComponent);
SnakTypeSelectButtonCell.propTypes = {
disabled: _propTypes2.default.bool,
onChange: _propTypes2.default.func.isRequired,
value: _propTypes2.default.string
};
SnakTypeSelectButtonCell.defaultProps = {
disabled: false,
value: 'value'
};
exports.default = SnakTypeSelectButtonCell;
/***/ }),
/* 311 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, "th.PropertyLabelCell__wef_property_label___1APYB {\r\n\tpadding-right: 2em !important;\r\n\ttext-align: left;\r\n\twhite-space: nowrap;\r\n\twidth: 1px;\r\n}\r\n\r\n.PropertyLabelCell__wef_property_label___1APYB a {\r\n\tcolor: black;\r\n}\r\n", ""]);
// exports
exports.locals = {
"wef_property_label": "PropertyLabelCell__wef_property_label___1APYB"
};
/***/ }),
/* 312 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(311);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 313 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _AnimatedTr = __webpack_require__(89);
var _AnimatedTr2 = _interopRequireDefault(_AnimatedTr);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _PropertyLabelCell = __webpack_require__(196);
var _PropertyLabelCell2 = _interopRequireDefault(_PropertyLabelCell);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _SnakEditorTableRowPart = __webpack_require__(129);
var _SnakEditorTableRowPart2 = _interopRequireDefault(_SnakEditorTableRowPart);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SnakTableRow = function (_PureComponent) {
(0, _inherits3.default)(SnakTableRow, _PureComponent);
function SnakTableRow() {
(0, _classCallCheck3.default)(this, SnakTableRow);
return (0, _possibleConstructorReturn3.default)(this, (SnakTableRow.__proto__ || Object.getPrototypeOf(SnakTableRow)).apply(this, arguments));
}
(0, _createClass3.default)(SnakTableRow, [{
key: 'render',
value: function render() {
var _props = this.props,
firstCell = _props.firstCell,
displayLabel = _props.displayLabel,
lastCell = _props.lastCell,
onSnakChange = _props.onSnakChange,
propertyDescription = _props.propertyDescription,
snak = _props.snak,
readOnly = _props.readOnly;
// TODO: looks ugly, inline and cleanup this
return _react2.default.createElement(
_AnimatedTr2.default,
null,
firstCell,
displayLabel && _react2.default.createElement(_PropertyLabelCell2.default, { propertyDescription: propertyDescription }),
_react2.default.createElement(_SnakEditorTableRowPart2.default, {
onSnakChange: onSnakChange,
propertyDescription: propertyDescription,
readOnly: readOnly,
snak: snak }),
lastCell
);
}
}]);
return SnakTableRow;
}(_react.PureComponent);
SnakTableRow.TABLE_COLUMNS = 2 + _SnakEditorTableRowPart2.default.TABLE_COLUMNS;
SnakTableRow.propTypes = {
firstCell: _propTypes2.default.node.isRequired,
displayLabel: _propTypes2.default.bool,
lastCell: _propTypes2.default.node.isRequired,
onSnakChange: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default).isRequired,
readOnly: _propTypes2.default.bool,
snak: _propTypes2.default.object.isRequired
};
SnakTableRow.defaultProps = {
displayLabel: true,
readOnly: false
};
exports.default = SnakTableRow;
/***/ }),
/* 314 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ButtonCell = __webpack_require__(45);
var _ButtonCell2 = _interopRequireDefault(_ButtonCell);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SnakRemoveButtonCell = function (_PureComponent) {
(0, _inherits3.default)(SnakRemoveButtonCell, _PureComponent);
function SnakRemoveButtonCell() {
(0, _classCallCheck3.default)(this, SnakRemoveButtonCell);
var _this = (0, _possibleConstructorReturn3.default)(this, (SnakRemoveButtonCell.__proto__ || Object.getPrototypeOf(SnakRemoveButtonCell)).apply(this, arguments));
_this.handleClick = _this.handleClick.bind(_this);
return _this;
}
(0, _createClass3.default)(SnakRemoveButtonCell, [{
key: 'handleClick',
value: function handleClick() {
var _props = this.props,
confirmMessage = _props.confirmMessage,
onClick = _props.onClick;
if (confirm(confirmMessage)) {
onClick();
}
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props,
disabled = _props2.disabled,
label = _props2.label;
return _react2.default.createElement(_ButtonCell2.default, {
disabled: disabled,
icon: 'ui-icon-trash',
label: label,
onClick: this.handleClick });
}
}]);
return SnakRemoveButtonCell;
}(_react.PureComponent);
SnakRemoveButtonCell.propTypes = {
disabled: _propTypes2.default.bool,
onClick: _propTypes2.default.func.isRequired,
confirmMessage: _propTypes2.default.string.isRequired,
label: _propTypes2.default.string.isRequired
};
SnakRemoveButtonCell.defaultProps = {
disabled: false
};
exports.default = SnakRemoveButtonCell;
/***/ }),
/* 315 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _I18nUtils = __webpack_require__(17);
var en = {
buttonLabelAdd: 'add new value for this property'
};
var ru = {
buttonLabelAdd: 'добавить новое значение к свойству'
};
var translations = { en: en, ru: ru };
var result = (0, _I18nUtils.localize)({}, translations);
exports.default = result;
/***/ }),
/* 316 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ButtonCell = __webpack_require__(45);
var _ButtonCell2 = _interopRequireDefault(_ButtonCell);
var _i18n = __webpack_require__(315);
var _i18n2 = _interopRequireDefault(_i18n);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SnakAddButtonCell = function (_PureComponent) {
(0, _inherits3.default)(SnakAddButtonCell, _PureComponent);
function SnakAddButtonCell() {
(0, _classCallCheck3.default)(this, SnakAddButtonCell);
return (0, _possibleConstructorReturn3.default)(this, (SnakAddButtonCell.__proto__ || Object.getPrototypeOf(SnakAddButtonCell)).apply(this, arguments));
}
(0, _createClass3.default)(SnakAddButtonCell, [{
key: 'render',
value: function render() {
var _props = this.props,
disabled = _props.disabled,
onClick = _props.onClick;
return _react2.default.createElement(_ButtonCell2.default, {
disabled: disabled,
icon: 'ui-icon-plus',
label: _i18n2.default.buttonLabelAdd,
onClick: onClick });
}
}]);
return SnakAddButtonCell;
}(_react.PureComponent);
SnakAddButtonCell.propTypes = {
disabled: _propTypes2.default.bool,
onClick: _propTypes2.default.func.isRequired
};
SnakAddButtonCell.defaultProps = {
disabled: false
};
exports.default = SnakAddButtonCell;
/***/ }),
/* 317 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _I18nUtils = __webpack_require__(17);
var I18nUtils = _interopRequireWildcard(_I18nUtils);
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 en = {
optionOther: 'Select other value…'
};
var ru = {
optionOther: 'Указать другое значение…'
};
var translations = { en: en, ru: ru };
var result = I18nUtils.localize({}, translations);
exports.default = result;
/***/ }),
/* 318 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _Shapes = __webpack_require__(18);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _i18n = __webpack_require__(317);
var _i18n2 = _interopRequireDefault(_i18n);
var _LabelDescriptionsProvider = __webpack_require__(199);
var _LabelDescriptionsProvider2 = _interopRequireDefault(_LabelDescriptionsProvider);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _WikibaseItemDataValueEditor = __webpack_require__(131);
var _WikibaseItemDataValueEditor2 = _interopRequireDefault(_WikibaseItemDataValueEditor);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SelectMode = function (_PureComponent) {
(0, _inherits3.default)(SelectMode, _PureComponent);
(0, _createClass3.default)(SelectMode, null, [{
key: 'isCompatibleWithProps',
value: function isCompatibleWithProps(props) {
var currentValue = ((props.datavalue || {}).value || {}).id || '';
var hasOneOfConstrain = !!props.propertyDescription.oneOf;
return hasOneOfConstrain && (currentValue === '' || props.propertyDescription.oneOf.indexOf(currentValue) !== -1);
}
}]);
function SelectMode() {
(0, _classCallCheck3.default)(this, SelectMode);
var _this = (0, _possibleConstructorReturn3.default)(this, (SelectMode.__proto__ || Object.getPrototypeOf(SelectMode)).apply(this, arguments));
_this.handleChange = _this.handleChange.bind(_this);
return _this;
}
(0, _createClass3.default)(SelectMode, [{
key: 'handleChange',
value: function handleChange(event) {
var selectedValue = event.target.value;
if (selectedValue === 'OTHER') {
this.props.onOtherSelect();
return;
}
var _props = this.props,
datavalue = _props.datavalue,
onDataValueChange = _props.onDataValueChange;
if (selectedValue === null || selectedValue.trim() === '') {
onDataValueChange((0, _extends3.default)({}, datavalue, {
value: null,
type: _WikibaseItemDataValueEditor2.default.DATAVALUE_TYPE
}));
} else {
onDataValueChange((0, _extends3.default)({}, datavalue, {
value: {
'entity-type': 'item',
'numeric-id': selectedValue.substr(1),
'id': selectedValue
},
type: _WikibaseItemDataValueEditor2.default.DATAVALUE_TYPE
}));
}
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props,
datavalue = _props2.datavalue,
propertyDescription = _props2.propertyDescription;
var oneOf = propertyDescription.oneOf;
var currentValue = ((datavalue || {}).value || {}).id || '';
return _react2.default.createElement(
'select',
{ onChange: this.handleChange, value: currentValue },
_react2.default.createElement('option', { key: '_empty', value: '' }),
_react2.default.createElement(
_LabelDescriptionsProvider2.default,
{ entityIds: oneOf },
function (cache) {
return oneOf.map(function (entityId) {
(0, _expect2.default)(cache).toBeAn('object', 'LabelDescriptionsProvider didn\'t return cache object (' + cache + ')');
var labelDescription = cache[entityId];
if (!labelDescription || !labelDescription.label) {
return _react2.default.createElement(
'option',
{ key: entityId, value: entityId },
entityId
);
}
return _react2.default.createElement(SelectOption, {
description: labelDescription.description,
entityId: entityId,
key: entityId,
label: labelDescription.label });
});
}
),
_react2.default.createElement(
'option',
{ key: 'OTHER', value: 'OTHER' },
_i18n2.default.optionOther
)
);
}
}]);
return SelectMode;
}(_react.PureComponent);
SelectMode.propTypes = {
datavalue: _propTypes2.default.shape(_Shapes.DataValue),
onDataValueChange: _propTypes2.default.func.isRequired,
onOtherSelect: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default)
};
exports.default = SelectMode;
var SelectOption = function (_PureComponent2) {
(0, _inherits3.default)(SelectOption, _PureComponent2);
function SelectOption() {
(0, _classCallCheck3.default)(this, SelectOption);
return (0, _possibleConstructorReturn3.default)(this, (SelectOption.__proto__ || Object.getPrototypeOf(SelectOption)).apply(this, arguments));
}
(0, _createClass3.default)(SelectOption, [{
key: 'render',
value: function render() {
var _props3 = this.props,
entityId = _props3.entityId,
description = _props3.description,
label = _props3.label;
var actualLabel = label ? label + ' (' + entityId + ')' : entityId;
return _react2.default.createElement(
'option',
{
title: description,
value: entityId },
actualLabel
);
}
}]);
return SelectOption;
}(_react.PureComponent);
SelectOption.propTypes = {
entityId: _propTypes2.default.string.isRequired,
description: _propTypes2.default.string,
label: _propTypes2.default.string
};
/***/ }),
/* 319 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ButtonCell = __webpack_require__(45);
var _ButtonCell2 = _interopRequireDefault(_ButtonCell);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var NOOP = function NOOP() {};
var GoToWikidataButtonCell = function (_PureComponent) {
(0, _inherits3.default)(GoToWikidataButtonCell, _PureComponent);
function GoToWikidataButtonCell() {
(0, _classCallCheck3.default)(this, GoToWikidataButtonCell);
return (0, _possibleConstructorReturn3.default)(this, (GoToWikidataButtonCell.__proto__ || Object.getPrototypeOf(GoToWikidataButtonCell)).apply(this, arguments));
}
(0, _createClass3.default)(GoToWikidataButtonCell, [{
key: 'render',
value: function render() {
var _props = this.props,
disabled = _props.disabled,
entityId = _props.entityId;
return _react2.default.createElement(
_ButtonCell2.default,
{
disabled: disabled || !entityId,
icon: 'ui-icon-extlink',
label: _core2.default.buttonOnWikidata,
onClick: NOOP },
function (children) {
return _react2.default.createElement(
'a',
{ href: entityId ? '//www.wikidata.org/wiki/' + entityId : '#',
rel: 'noopener noreferrer',
target: '_blank' },
children
);
}
);
}
}]);
return GoToWikidataButtonCell;
}(_react.PureComponent);
GoToWikidataButtonCell.propTypes = {
disabled: _propTypes2.default.bool,
entityId: _propTypes2.default.string
};
GoToWikidataButtonCell.defaultProps = {
disabled: false,
entityId: null
};
exports.default = GoToWikidataButtonCell;
/***/ }),
/* 320 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _WikibaseItem = __webpack_require__(130);
var _WikibaseItem2 = _interopRequireDefault(_WikibaseItem);
var _EntityDescription = __webpack_require__(137);
var _EntityDescription2 = _interopRequireDefault(_EntityDescription);
var _EntityLabel = __webpack_require__(54);
var _EntityLabel2 = _interopRequireDefault(_EntityLabel);
var _MediawikiPreview = __webpack_require__(203);
var _MediawikiPreview2 = _interopRequireDefault(_MediawikiPreview);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Suggestion = function (_PureComponent) {
(0, _inherits3.default)(Suggestion, _PureComponent);
function Suggestion() {
(0, _classCallCheck3.default)(this, Suggestion);
return (0, _possibleConstructorReturn3.default)(this, (Suggestion.__proto__ || Object.getPrototypeOf(Suggestion)).apply(this, arguments));
}
(0, _createClass3.default)(Suggestion, [{
key: 'render',
value: function render() {
var entityId = this.props.entityId;
var wikitext = '{{#if:{{#property:P18|from=' + entityId + '}}|[[File:{{#property:P18|from=' + entityId + '}}|45x45px]]}}';
return _react2.default.createElement(
'table',
{ className: _WikibaseItem2.default.suggestionContainer },
_react2.default.createElement(
'tbody',
null,
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'td',
{ className: _WikibaseItem2.default.suggestionImage },
_react2.default.createElement(_MediawikiPreview2.default, { spinnerSize: 35, wikitext: wikitext })
),
_react2.default.createElement(
'td',
{ className: _WikibaseItem2.default.suggestionText },
_react2.default.createElement(
'span',
{ className: _WikibaseItem2.default.suggestionLabel },
'\xA0\xA0',
_react2.default.createElement(_EntityLabel2.default, { entityId: entityId })
),
_react2.default.createElement('br', null),
_react2.default.createElement(
'span',
{ className: _WikibaseItem2.default.suggestionDescription },
'\xA0\xA0',
_react2.default.createElement(_EntityDescription2.default, { entityId: entityId })
)
)
)
)
);
}
}]);
return Suggestion;
}(_react.PureComponent);
Suggestion.propTypes = {
entityId: _propTypes2.default.string.isRequired
};
exports.default = Suggestion;
/***/ }),
/* 321 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, "td.WikibaseItem__wef_datavalue_wikibase-item_readonly___1Fnod {\r\n min-width: 99%;\r\n overflow-x: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n\r\n.WikibaseItem__wef_datavalue_wikibase-item___gjN-u select {\r\n width: 100%;\r\n}\r\n\r\n.WikibaseItem__wef_datavalue_wikibase-item___gjN-u input {\r\n width: 100%;\r\n}\r\n\r\n.WikibaseItem__container___1hM_b {\r\n position: relative;\r\n}\r\n\r\n.WikibaseItem__suggestionsContainer___qKihn {\r\n display: none;\r\n}\r\n\r\n.WikibaseItem__containerOpen___2crtI .WikibaseItem__suggestionsContainer___qKihn {\r\n display: block;\r\n position: absolute;\r\n width: 300px;\r\n border: 1px solid #aaa;\r\n background-color: #fff;\r\n font-family: Helvetica, sans-serif;\r\n font-weight: 300;\r\n border-bottom-left-radius: 4px;\r\n border-bottom-right-radius: 4px;\r\n z-index: 2;\r\n}\r\n\r\n.WikibaseItem__suggestionsList___3jL9T {\r\n margin: 0;\r\n padding: 0;\r\n list-style-image: none;\r\n list-style-type: none;\r\n}\r\n\r\n.WikibaseItem__suggestion___uulTp {\r\n cursor: pointer;\r\n padding: 2px 4px;\r\n}\r\n\r\n.WikibaseItem__suggestion___uulTp:not(:first-child) {\r\n border-top: 1px solid #ddd;\r\n}\r\n\r\n.WikibaseItem__suggestionHighlighted___3WuFB {\r\n background-color: #0C7EAF;\r\n color: #fff;\r\n}\r\n\r\n.WikibaseItem__suggestionContainer___3QHqw {\r\n height: 54px;\r\n}\r\n\r\n.WikibaseItem__suggestionImage___C0fc0 {\r\n height: 54px;\r\n max-height: 54px;\r\n width: 54px;\r\n max-width: 54px;\r\n vertical-align: middle;\r\n}\r\n\r\n.WikibaseItem__suggestionImage___C0fc0 p {\r\n padding: 0;\r\n margin: 0;\r\n}\r\n\r\n.WikibaseItem__suggestionText___3gUBj {\r\n max-height: 54px;\r\n height: 54px;\r\n max-width: 240px;\r\n width: 240px;\r\n vertical-align: middle;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n.WikibaseItem__suggestionLabel___Cm37d {\r\n font-weight: bold;\r\n}\r\n\r\n.WikibaseItem__suggestionDescription___26LXX {\r\n}\r\n\r\n.WikibaseItem__highlight___2mUav {\r\n color: #ee0000;\r\n font-weight: bold;\r\n}\r\n", ""]);
// exports
exports.locals = {
"wef_datavalue_wikibase-item_readonly": "WikibaseItem__wef_datavalue_wikibase-item_readonly___1Fnod",
"wef_datavalue_wikibase-item": "WikibaseItem__wef_datavalue_wikibase-item___gjN-u",
"container": "WikibaseItem__container___1hM_b",
"suggestionsContainer": "WikibaseItem__suggestionsContainer___qKihn",
"containerOpen": "WikibaseItem__containerOpen___2crtI",
"suggestionsList": "WikibaseItem__suggestionsList___3jL9T",
"suggestion": "WikibaseItem__suggestion___uulTp",
"suggestionHighlighted": "WikibaseItem__suggestionHighlighted___3WuFB",
"suggestionContainer": "WikibaseItem__suggestionContainer___3QHqw",
"suggestionImage": "WikibaseItem__suggestionImage___C0fc0",
"suggestionText": "WikibaseItem__suggestionText___3gUBj",
"suggestionLabel": "WikibaseItem__suggestionLabel___Cm37d",
"suggestionDescription": "WikibaseItem__suggestionDescription___26LXX",
"highlight": "WikibaseItem__highlight___2mUav"
};
/***/ }),
/* 322 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var WikibaseItemInput = function (_PureComponent) {
(0, _inherits3.default)(WikibaseItemInput, _PureComponent);
(0, _createClass3.default)(WikibaseItemInput, null, [{
key: 'getEtcProps',
value: function getEtcProps(props) {
/* eslint no-unused-vars: 0 */
var entityId = props.entityId,
entityLabel = props.entityLabel,
inputRef = props.inputRef,
value = props.value,
onBlur = props.onBlur,
onChange = props.onChange,
onFocus = props.onFocus,
etc = (0, _objectWithoutProperties3.default)(props, ['entityId', 'entityLabel', 'inputRef', 'value', 'onBlur', 'onChange', 'onFocus']);
return etc;
}
}]);
function WikibaseItemInput() {
(0, _classCallCheck3.default)(this, WikibaseItemInput);
var _this = (0, _possibleConstructorReturn3.default)(this, (WikibaseItemInput.__proto__ || Object.getPrototypeOf(WikibaseItemInput)).apply(this, arguments));
_this.state = {
dirty: false,
focused: false,
value: _this.props.entityLabel || _this.props.entityId || ''
};
_this.handleBlur = _this.handleBlur.bind(_this);
_this.handleChange = _this.handleChange.bind(_this);
_this.handleFocus = _this.handleFocus.bind(_this);
return _this;
}
(0, _createClass3.default)(WikibaseItemInput, [{
key: 'clearDirtyState',
value: function clearDirtyState() {
this.setState({
dirty: false
});
}
}, {
key: 'handleChange',
value: function handleChange(event) {
this.setState({
dirty: true,
focused: true,
value: event.target.value
});
this.props.onChange(event);
}
}, {
key: 'handleFocus',
value: function handleFocus() {
this.setState({
focused: true
});
this.props.onFocus();
}
}, {
key: 'handleBlur',
value: function handleBlur() {
this.setState({
focused: false
});
this.props.onBlur();
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
entityId = _props.entityId,
entityLabel = _props.entityLabel,
inputRef = _props.inputRef;
var etc = WikibaseItemInput.getEtcProps(this.props);
var _state = this.state,
dirty = _state.dirty,
focused = _state.focused,
value = _state.value;
var inputValue = void 0;
if (dirty) {
inputValue = value;
} else if (focused) {
inputValue = entityLabel || entityId || '';
} else if (entityId && entityLabel) {
inputValue = entityLabel + ' (' + entityId + ')';
} else if (entityId) {
inputValue = entityId;
} else {
inputValue = '';
}
return _react2.default.createElement('input', (0, _extends3.default)({}, etc, {
onBlur: this.handleBlur,
onChange: this.handleChange,
onFocus: this.handleFocus,
ref: inputRef,
value: inputValue }));
}
}]);
return WikibaseItemInput;
}(_react.PureComponent);
WikibaseItemInput.propTypes = {
entityId: _propTypes2.default.string,
entityLabel: _propTypes2.default.string,
value: _propTypes2.default.string,
inputRef: _propTypes2.default.func,
onBlur: _propTypes2.default.func,
onChange: _propTypes2.default.func.isRequired,
onFocus: _propTypes2.default.func
};
exports.default = WikibaseItemInput;
/***/ }),
/* 323 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactRedux = __webpack_require__(44);
var _labelDescriptionCache = __webpack_require__(102);
var _labelDescriptionCache2 = _interopRequireDefault(_labelDescriptionCache);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _WikibaseItemInput = __webpack_require__(322);
var _WikibaseItemInput2 = _interopRequireDefault(_WikibaseItemInput);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var LocalizedWikibaseItemInput = function (_PureComponent) {
(0, _inherits3.default)(LocalizedWikibaseItemInput, _PureComponent);
function LocalizedWikibaseItemInput() {
(0, _classCallCheck3.default)(this, LocalizedWikibaseItemInput);
return (0, _possibleConstructorReturn3.default)(this, (LocalizedWikibaseItemInput.__proto__ || Object.getPrototypeOf(LocalizedWikibaseItemInput)).apply(this, arguments));
}
(0, _createClass3.default)(LocalizedWikibaseItemInput, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _props = this.props,
cache = _props.cache,
entityId = _props.entityId,
queue = _props.queue;
if (!!entityId && typeof cache[entityId] === 'undefined') {
queue(entityId);
}
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
var _props2 = this.props,
cache = _props2.cache,
entityId = _props2.entityId,
queue = _props2.queue;
if (prevProps.entityId !== this.props.entityId && !!entityId && typeof cache[entityId] === 'undefined') {
queue(entityId);
}
}
}, {
key: 'render',
value: function render() {
/* eslint no-unused-vars: 0 */
var _props3 = this.props,
cache = _props3.cache,
entityId = _props3.entityId,
queue = _props3.queue,
wikibaseItemInputRef = _props3.wikibaseItemInputRef,
etc = (0, _objectWithoutProperties3.default)(_props3, ['cache', 'entityId', 'queue', 'wikibaseItemInputRef']);
if (!entityId) {
return _react2.default.createElement(_WikibaseItemInput2.default, (0, _extends3.default)({}, etc, {
entityId: entityId,
entityLabel: null,
ref: wikibaseItemInputRef }));
} else {
var labelDescription = cache[entityId];
var entityLabel = labelDescription ? labelDescription.label : null;
return _react2.default.createElement(_WikibaseItemInput2.default, (0, _extends3.default)({}, etc, {
entityId: entityId,
entityLabel: entityLabel,
ref: wikibaseItemInputRef }));
}
}
}]);
return LocalizedWikibaseItemInput;
}(_react.PureComponent);
LocalizedWikibaseItemInput.propTypes = (0, _extends3.default)({}, _WikibaseItemInput2.default.propTypes, {
cache: _propTypes2.default.object.isRequired,
queue: _propTypes2.default.func.isRequired,
wikibaseItemInputRef: _propTypes2.default.object.isRequired
});
var mapStateToProps = function mapStateToProps(state) {
return {
cache: state.LABELDESCRIPTIONS.cache
};
};
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
return {
queue: function queue(key) {
return dispatch(_labelDescriptionCache2.default.actionQueue([key]));
}
};
};
var LocalizedWikibaseItemInputConnected = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(LocalizedWikibaseItemInput);
exports.default = LocalizedWikibaseItemInputConnected;
/***/ }),
/* 324 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _ApiUtils = __webpack_require__(29);
var ApiUtils = _interopRequireWildcard(_ApiUtils);
var _Shapes = __webpack_require__(18);
var Shapes = _interopRequireWildcard(_Shapes);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactAutosuggest = __webpack_require__(101);
var _reactAutosuggest2 = _interopRequireDefault(_reactAutosuggest);
var _reactRedux = __webpack_require__(44);
var _I18nUtils = __webpack_require__(17);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _LocalizedWikibaseItemInput = __webpack_require__(323);
var _LocalizedWikibaseItemInput2 = _interopRequireDefault(_LocalizedWikibaseItemInput);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _WikibaseItem = __webpack_require__(130);
var _WikibaseItem2 = _interopRequireDefault(_WikibaseItem);
var _Suggestion = __webpack_require__(320);
var _Suggestion2 = _interopRequireDefault(_Suggestion);
var _WikibaseItemDataValueEditor = __webpack_require__(131);
var _WikibaseItemDataValueEditor2 = _interopRequireDefault(_WikibaseItemDataValueEditor);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var NUMBER_OF_SUGGESTIONS_PER_LANGUAGE = 5;
var AutocompleteMode = function (_Component) {
(0, _inherits3.default)(AutocompleteMode, _Component);
function AutocompleteMode() {
(0, _classCallCheck3.default)(this, AutocompleteMode);
var _this = (0, _possibleConstructorReturn3.default)(this, (AutocompleteMode.__proto__ || Object.getPrototypeOf(AutocompleteMode)).apply(this, arguments));
var value = ((_this.props.datavalue || {}).value || {}).id || null;
_this.state = {
suggestions: value ? [value] : [],
textValue: value || ''
};
_this.wikidataApi = ApiUtils.getWikidataApi();
_this.wikibaseItemInputRef = _react2.default.createRef();
_this.handleChange = _this.handleChange.bind(_this);
_this.handleSuggestionsClearRequested = _this.handleSuggestionsClearRequested.bind(_this);
_this.handleSuggestionsFetchRequested = _this.handleSuggestionsFetchRequested.bind(_this);
_this.renderInput = _this.renderInput.bind(_this);
_this.renderSuggestion = _this.renderSuggestion.bind(_this);
return _this;
}
(0, _createClass3.default)(AutocompleteMode, [{
key: 'handleSuggestionsClearRequested',
value: function handleSuggestionsClearRequested() {
this.setState({ suggestions: [] });
}
}, {
key: 'handleSuggestionsFetchRequested',
value: function handleSuggestionsFetchRequested(_ref) {
var _this2 = this;
var value = _ref.value;
(0, _expect2.default)(value).toBeA('string');
if (this.props.testSuggestionsProvider) {
this.setState({
suggestions: this.props.testSuggestionsProvider(value)
});
}
var resultSet = new Set();
_I18nUtils.DEFAULT_LANGUAGES.forEach(function (language) {
_this2.wikidataApi.get({
action: 'wbsearchentities',
language: language,
limit: NUMBER_OF_SUGGESTIONS_PER_LANGUAGE,
search: value,
type: 'item'
}).then(function (result) {
result.search.forEach(function (item) {
return resultSet.add(item.id);
});
_this2.setState({
suggestions: [].concat((0, _toConsumableArray3.default)(resultSet))
});
});
});
}
}, {
key: 'getSuggestionValue',
value: function getSuggestionValue(data) {
return data ? data : '';
}
}, {
key: 'handleChange',
value: function handleChange(event, _ref2) {
var method = _ref2.method,
newValue = _ref2.newValue;
var _props = this.props,
cache = _props.cache,
datavalue = _props.datavalue,
onDataValueChange = _props.onDataValueChange;
switch (method) {
case 'type':
{
// the only thing we can do by typing -- is to clear data
if (newValue === null || newValue.trim() === '') {
onDataValueChange((0, _extends3.default)({}, datavalue, {
value: null,
type: _WikibaseItemDataValueEditor2.default.DATAVALUE_TYPE
}));
}
this.setState({
textValue: newValue
});
break;
}
default:
{
onDataValueChange((0, _extends3.default)({}, datavalue, {
value: {
'entity-type': 'item',
'numeric-id': newValue.substr(1),
'id': newValue
},
type: _WikibaseItemDataValueEditor2.default.DATAVALUE_TYPE
}));
this.setState({
textValue: cache[newValue] && cache[newValue].label ? cache[newValue].label : newValue
});
this.wikibaseItemInputRef.current.clearDirtyState();
break;
}
}
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props,
datavalue = _props2.datavalue,
propertyDescription = _props2.propertyDescription;
var params = {
type: 'text'
};
if (propertyDescription.regexp) {
params.pattern = propertyDescription.regexp;
}
params.onChange = this.handleChange;
params.value = this.state.textValue;
return _react2.default.createElement(_reactAutosuggest2.default, {
getSuggestionValue: this.getSuggestionValue,
inputProps: params,
onSuggestionsClearRequested: this.handleSuggestionsClearRequested,
onSuggestionsFetchRequested: this.handleSuggestionsFetchRequested,
renderInputComponent: this.renderInput,
renderSuggestion: this.renderSuggestion,
suggestions: this.state.suggestions,
theme: _WikibaseItem2.default });
}
}, {
key: 'renderInput',
value: function renderInput(inputProps) {
var datavalue = this.props.datavalue;
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "value" }] */
var value = inputProps.value,
onChange = inputProps.onChange,
ref = inputProps.ref,
etc = (0, _objectWithoutProperties3.default)(inputProps, ['value', 'onChange', 'ref']);
if (datavalue && datavalue.value && datavalue.value.id) {
return _react2.default.createElement(_LocalizedWikibaseItemInput2.default, (0, _extends3.default)({}, etc, {
entityId: datavalue.value.id,
inputRef: ref,
onChange: onChange,
value: this.state.textValue,
wikibaseItemInputRef: this.wikibaseItemInputRef }));
} else {
return _react2.default.createElement(_LocalizedWikibaseItemInput2.default, (0, _extends3.default)({}, etc, {
inputRef: ref,
onChange: onChange,
value: this.state.textValue,
wikibaseItemInputRef: this.wikibaseItemInputRef }));
}
}
}, {
key: 'renderSuggestion',
value: function renderSuggestion(data) {
return _react2.default.createElement(_Suggestion2.default, { entityId: data });
}
}]);
return AutocompleteMode;
}(_react.Component);
AutocompleteMode.propTypes = {
cache: _propTypes2.default.object.isRequired,
datavalue: _propTypes2.default.shape(Shapes.DataValue),
onDataValueChange: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default),
readOnly: _propTypes2.default.bool,
testSuggestionsProvider: _propTypes2.default.func
};
AutocompleteMode.defaultProps = {
readOnly: false
};
var mapStateToProps = function mapStateToProps(state) {
return {
cache: state.LABELDESCRIPTIONS.cache
};
};
var AutocompleteModeConnected = (0, _reactRedux.connect)(mapStateToProps)(AutocompleteMode);
exports.default = AutocompleteModeConnected;
/***/ }),
/* 325 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".UrlDataValueEditor__wef_datavalue_url___ggWlW input {\r\n width: 100%\r\n}\r\n\r\ntd.UrlDataValueEditor__wef_datavalue_url_readonly___1qv5x {\r\n min-width: 99%;\r\n overflow-x: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n", ""]);
// exports
exports.locals = {
"wef_datavalue_url": "UrlDataValueEditor__wef_datavalue_url___ggWlW",
"wef_datavalue_url_readonly": "UrlDataValueEditor__wef_datavalue_url_readonly___1qv5x"
};
/***/ }),
/* 326 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(325);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 327 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ButtonCell = __webpack_require__(45);
var _ButtonCell2 = _interopRequireDefault(_ButtonCell);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var NOOP = function NOOP() {};
var GoToUrlButtonCell = function (_PureComponent) {
(0, _inherits3.default)(GoToUrlButtonCell, _PureComponent);
function GoToUrlButtonCell() {
(0, _classCallCheck3.default)(this, GoToUrlButtonCell);
return (0, _possibleConstructorReturn3.default)(this, (GoToUrlButtonCell.__proto__ || Object.getPrototypeOf(GoToUrlButtonCell)).apply(this, arguments));
}
(0, _createClass3.default)(GoToUrlButtonCell, [{
key: 'render',
value: function render() {
var _props = this.props,
disabled = _props.disabled,
href = _props.href;
return _react2.default.createElement(
_ButtonCell2.default,
{
disabled: disabled || !href,
icon: 'ui-icon-extlink',
label: _core2.default.buttonUrlNavigate,
onClick: NOOP },
function (children) {
return _react2.default.createElement(
'a',
{ href: href ? href : '#',
rel: 'noopener noreferrer',
target: '_blank' },
children
);
}
);
}
}]);
return GoToUrlButtonCell;
}(_react.PureComponent);
GoToUrlButtonCell.propTypes = {
disabled: _propTypes2.default.bool,
href: _propTypes2.default.string
};
GoToUrlButtonCell.defaultProps = {
disabled: false,
href: null
};
exports.default = GoToUrlButtonCell;
/***/ }),
/* 328 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _AbstractStringBasedDataValueEditor = __webpack_require__(100);
var _AbstractStringBasedDataValueEditor2 = _interopRequireDefault(_AbstractStringBasedDataValueEditor);
var _GoToUrlButtonCell = __webpack_require__(327);
var _GoToUrlButtonCell2 = _interopRequireDefault(_GoToUrlButtonCell);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _UrlDataValueEditor = __webpack_require__(326);
var _UrlDataValueEditor2 = _interopRequireDefault(_UrlDataValueEditor);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var UrlDataValueEditor = function (_AbstractStringBasedD) {
(0, _inherits3.default)(UrlDataValueEditor, _AbstractStringBasedD);
function UrlDataValueEditor() {
(0, _classCallCheck3.default)(this, UrlDataValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (UrlDataValueEditor.__proto__ || Object.getPrototypeOf(UrlDataValueEditor)).apply(this, arguments));
_this.handleChange = _this.handleChange.bind(_this);
return _this;
}
(0, _createClass3.default)(UrlDataValueEditor, [{
key: 'handleChange',
value: function handleChange(event) {
this.handleValueChange(event.target.value);
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
datavalue = _props.datavalue,
readOnly = _props.readOnly;
var href = datavalue && datavalue.value ? datavalue.value : null;
if (readOnly) {
if (datavalue && datavalue.value) {
return _react2.default.createElement(
'td',
{ className: _UrlDataValueEditor2.default.wef_datavalue_url + ' ' + _UrlDataValueEditor2.default.wef_datavalue_url_readonly, colSpan: 12 },
href && _react2.default.createElement(
'a',
{ href: href, rel: 'noopener noreferrer', target: '_blank' },
href
)
);
} else {
return null;
}
}
var params = {
className: _UrlDataValueEditor2.default.wef_url,
onChange: this.handleChange,
type: 'text',
value: datavalue && datavalue.value ? datavalue.value : ''
};
return _react2.default.createElement(
_react2.default.Fragment,
null,
_react2.default.createElement(
'td',
{ className: _UrlDataValueEditor2.default.wef_datavalue_url, colSpan: 11 },
_react2.default.createElement('input', params)
),
_react2.default.createElement(_GoToUrlButtonCell2.default, { href: href })
);
}
}]);
return UrlDataValueEditor;
}(_AbstractStringBasedDataValueEditor2.default);
UrlDataValueEditor.propTypes = _AbstractStringBasedDataValueEditor2.default.propTypes;
exports.default = UrlDataValueEditor;
/***/ }),
/* 329 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".UnsupportedDataValueEditor__wef_datavalue_unsupported___3QPlK {\r\n\tcolor: darkgrey;\r\n}\r\n", ""]);
// exports
exports.locals = {
"wef_datavalue_unsupported": "UnsupportedDataValueEditor__wef_datavalue_unsupported___3QPlK"
};
/***/ }),
/* 330 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(329);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 331 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _ApiUtils = __webpack_require__(29);
var ApiUtils = _interopRequireWildcard(_ApiUtils);
var _Shapes = __webpack_require__(18);
var Shapes = _interopRequireWildcard(_Shapes);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _UnsupportedDataValueEditor = __webpack_require__(330);
var _UnsupportedDataValueEditor2 = _interopRequireDefault(_UnsupportedDataValueEditor);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var UnsupportedDataValueEditor = function (_Component) {
(0, _inherits3.default)(UnsupportedDataValueEditor, _Component);
function UnsupportedDataValueEditor() {
(0, _classCallCheck3.default)(this, UnsupportedDataValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (UnsupportedDataValueEditor.__proto__ || Object.getPrototypeOf(UnsupportedDataValueEditor)).apply(this, arguments));
_this.state = {
html: null
};
_this.loadHtml = _this.loadHtml.bind(_this);
_this.wikidataApi = ApiUtils.getWikidataApi();
// initial loading
_this.loadHtml();
return _this;
}
(0, _createClass3.default)(UnsupportedDataValueEditor, [{
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps) {
if (prevProps.datavalue !== this.props.datavalue) {
this.setState({ html: null });
this.loadHtml();
}
}
}, {
key: 'loadHtml',
value: function loadHtml() {
var _this2 = this;
var _props = this.props,
datavalue = _props.datavalue,
propertyDescription = _props.propertyDescription;
if (!datavalue || !propertyDescription) return;
this.wikidataApi.postPromise({
action: 'wbformatvalue',
datavalue: JSON.stringify(datavalue),
datatype: propertyDescription.datatype,
format: 'json',
generate: 'text/html'
}).then(function (result) {
var html = result.result;
html = html.replace('href="/', 'href="//www.wikidata.org/');
_this2.setState({ html: html });
});
}
}, {
key: 'render',
value: function render() {
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "datavalue" }] */
var _props2 = this.props,
datavalue = _props2.datavalue,
propertyDescription = _props2.propertyDescription,
other = (0, _objectWithoutProperties3.default)(_props2, ['datavalue', 'propertyDescription']);
var datatype = propertyDescription.datatype;
var className = _UnsupportedDataValueEditor2.default['wef_datavalue_' + propertyDescription.datatype] + ' ' + _UnsupportedDataValueEditor2.default.wef_datavalue_unsupported;
if (!this.state.html) {
return _react2.default.createElement(
'td',
(0, _extends3.default)({ className: className, colSpan: 12 }, other),
_react2.default.createElement(
'span',
null,
'datatype ',
datatype,
' is not supported yet'
)
);
}
return _react2.default.createElement(
'td',
(0, _extends3.default)({ className: className, colSpan: 12 }, other),
_react2.default.createElement('div', { dangerouslySetInnerHTML: { __html: this.state.html } })
);
}
}]);
return UnsupportedDataValueEditor;
}(_react.Component);
UnsupportedDataValueEditor.propTypes = {
datavalue: _propTypes2.default.shape(Shapes.DataValue),
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default)
};
exports.default = UnsupportedDataValueEditor;
/***/ }),
/* 332 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _i18n = __webpack_require__(133);
var _i18n2 = _interopRequireDefault(_i18n);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _Time = __webpack_require__(99);
var _Time2 = _interopRequireDefault(_Time);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var EMPTY_STRING = '';
var PrecisionSelect = function (_PureComponent) {
(0, _inherits3.default)(PrecisionSelect, _PureComponent);
function PrecisionSelect() {
(0, _classCallCheck3.default)(this, PrecisionSelect);
var _this = (0, _possibleConstructorReturn3.default)(this, (PrecisionSelect.__proto__ || Object.getPrototypeOf(PrecisionSelect)).apply(this, arguments));
_this.handleChange = _this.handleChange.bind(_this);
return _this;
}
(0, _createClass3.default)(PrecisionSelect, [{
key: 'handleChange',
value: function handleChange(event) {
this.props.onChange(Number(event.target.value));
event.stopPropagation();
}
}, {
key: 'render',
value: function render() {
/*eslint no-unused-vars: ["error", { "varsIgnorePattern": "onChange" }]*/
var _props = this.props,
onChange = _props.onChange,
readOnly = _props.readOnly,
value = _props.value,
other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'readOnly', 'value']);
return _react2.default.createElement(
'select',
(0, _extends3.default)({
className: _Time2.default.precisionSelect,
disabled: readOnly,
onChange: this.handleChange,
value: value || EMPTY_STRING
}, other),
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14].map(function (precision) {
return _react2.default.createElement(
'option',
{ key: precision, value: precision },
_i18n2.default.precision[precision]
);
})
);
}
}]);
return PrecisionSelect;
}(_react.PureComponent);
PrecisionSelect.propTypes = {
onChange: _propTypes2.default.func.isRequired,
value: _propTypes2.default.string,
readOnly: _propTypes2.default.bool.isRequired
};
exports.default = PrecisionSelect;
/***/ }),
/* 333 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".Time__time___3dT9s > input {\r\n width: 100%;\r\n}\r\n\r\n.Time__time___3dT9s select {\r\n width: 100%;\r\n}\r\n\r\n.Time__timeDetails___3Hv1Y th, .Time__timeDetails___3Hv1Y td {\r\n padding: .1em .25em !important;\r\n}\r\n\r\n.Time__timeDetails___3Hv1Y th {\r\n text-align: left;\r\n}\r\n\r\ntd.Time__timeRendered___Cuoii {\r\n height: 3em;\r\n}\r\n\r\n.Time__timeRendered___Cuoii {\r\n font-weight: bold;\r\n font-size: larger\r\n}\r\n\r\n.Time__timeError___1MKO7 {\r\n color: red;\r\n}\r\n", ""]);
// exports
exports.locals = {
"time": "Time__time___3dT9s",
"timeDetails": "Time__timeDetails___3Hv1Y",
"timeRendered": "Time__timeRendered___Cuoii",
"timeError": "Time__timeError___1MKO7"
};
/***/ }),
/* 334 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _model = __webpack_require__(200);
var _i18n = __webpack_require__(133);
var _i18n2 = _interopRequireDefault(_i18n);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _Time = __webpack_require__(99);
var _Time2 = _interopRequireDefault(_Time);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var EMPTY_STRING = '';
var CalendarModelSelect = function (_PureComponent) {
(0, _inherits3.default)(CalendarModelSelect, _PureComponent);
function CalendarModelSelect() {
(0, _classCallCheck3.default)(this, CalendarModelSelect);
var _this = (0, _possibleConstructorReturn3.default)(this, (CalendarModelSelect.__proto__ || Object.getPrototypeOf(CalendarModelSelect)).apply(this, arguments));
_this.handleChange = _this.handleChange.bind(_this);
return _this;
}
(0, _createClass3.default)(CalendarModelSelect, [{
key: 'handleChange',
value: function handleChange(event) {
this.props.onChange(event.target.value);
event.stopPropagation();
}
}, {
key: 'render',
value: function render() {
/*eslint no-unused-vars: ["error", { "varsIgnorePattern": "onChange" }]*/
var _props = this.props,
onChange = _props.onChange,
readOnly = _props.readOnly,
value = _props.value,
other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'readOnly', 'value']);
return _react2.default.createElement(
'select',
(0, _extends3.default)({
className: _Time2.default.calendarModelSelect,
disabled: readOnly,
onChange: this.handleChange,
value: value || EMPTY_STRING
}, other),
_model.CALENDAR_MODELS.map(function (calendarModel) {
return _react2.default.createElement(
'option',
{ key: calendarModel, value: calendarModel },
_i18n2.default.calendarModel[calendarModel]
);
})
);
}
}]);
return CalendarModelSelect;
}(_react.PureComponent);
CalendarModelSelect.propTypes = {
onChange: _propTypes2.default.func.isRequired,
value: _propTypes2.default.string,
readOnly: _propTypes2.default.bool.isRequired
};
exports.default = CalendarModelSelect;
/***/ }),
/* 335 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _model = __webpack_require__(200);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _CalendarModelSelect = __webpack_require__(334);
var _CalendarModelSelect2 = _interopRequireDefault(_CalendarModelSelect);
var _reactSpinners = __webpack_require__(134);
var _i18n = __webpack_require__(133);
var _i18n2 = _interopRequireDefault(_i18n);
var _PrecisionSelect = __webpack_require__(332);
var _PrecisionSelect2 = _interopRequireDefault(_PrecisionSelect);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _Time = __webpack_require__(99);
var _Time2 = _interopRequireDefault(_Time);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var DetailsArea = function (_PureComponent) {
(0, _inherits3.default)(DetailsArea, _PureComponent);
function DetailsArea() {
(0, _classCallCheck3.default)(this, DetailsArea);
return (0, _possibleConstructorReturn3.default)(this, (DetailsArea.__proto__ || Object.getPrototypeOf(DetailsArea)).apply(this, arguments));
}
(0, _createClass3.default)(DetailsArea, [{
key: 'render',
value: function render() {
var _props = this.props,
spinner = _props.spinner,
error = _props.error,
preview = _props.preview,
manualCalendarModel = _props.manualCalendarModel,
manualPrecision = _props.manualPrecision,
parsedCalendarModel = _props.parsedCalendarModel,
parsedPrecision = _props.parsedPrecision,
onManualCalendarModelToggle = _props.onManualCalendarModelToggle,
onManualPrecisionToggle = _props.onManualPrecisionToggle,
onManualCalendarModelChange = _props.onManualCalendarModelChange,
onManualPrecisionChange = _props.onManualPrecisionChange;
return _react2.default.createElement(
'table',
{ className: _Time2.default.timeDetails },
_react2.default.createElement(
'tbody',
null,
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'th',
{ colSpan: 3 },
_i18n2.default.labelWillBeDisplayedAs
)
),
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'td',
{ className: _Time2.default.timeRendered, colSpan: 3 },
spinner ? _react2.default.createElement(_reactSpinners.ClipLoader, { size: 15 }) : error ? _react2.default.createElement(
'span',
{ className: _Time2.default.timeError },
error
) : _react2.default.createElement('span', { dangerouslySetInnerHTML: { __html: preview } })
)
),
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'th',
null,
_i18n2.default.labelPrecision
),
_react2.default.createElement(
'td',
null,
_react2.default.createElement(_PrecisionSelect2.default, {
onChange: onManualPrecisionChange,
readOnly: manualPrecision == null,
value: manualPrecision || parsedPrecision || _model.DEFAULT_PRECISION })
),
_react2.default.createElement(
'td',
null,
_react2.default.createElement(
'label',
null,
_react2.default.createElement('input', {
checked: manualPrecision !== null,
onChange: onManualPrecisionToggle,
type: 'checkbox' }),
_i18n2.default.labelSetManually
)
)
),
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'th',
null,
_i18n2.default.labelCalendar
),
_react2.default.createElement(
'td',
null,
_react2.default.createElement(_CalendarModelSelect2.default, {
onChange: onManualCalendarModelChange,
readOnly: manualCalendarModel == null,
value: manualCalendarModel || parsedCalendarModel || _model.DEFAULT_CALENDAR_MODEL })
),
_react2.default.createElement(
'td',
null,
_react2.default.createElement(
'label',
null,
_react2.default.createElement('input', {
checked: manualCalendarModel !== null,
onChange: onManualCalendarModelToggle,
type: 'checkbox' }),
_i18n2.default.labelSetManually
)
)
)
)
);
}
}]);
return DetailsArea;
}(_react.PureComponent);
DetailsArea.propTypes = {
spinner: _propTypes2.default.bool.isRequired,
preview: _propTypes2.default.string,
error: _propTypes2.default.string,
parsedCalendarModel: _propTypes2.default.string.isRequired,
manualCalendarModel: _propTypes2.default.string.isRequired,
onManualCalendarModelToggle: _propTypes2.default.func.isRequired,
onManualCalendarModelChange: _propTypes2.default.func.isRequired,
parsedPrecision: _propTypes2.default.number.isRequired,
manualPrecision: _propTypes2.default.number.isRequired,
onManualPrecisionToggle: _propTypes2.default.func.isRequired,
onManualPrecisionChange: _propTypes2.default.func.isRequired
};
exports.default = DetailsArea;
/***/ }),
/* 336 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _ApiUtils = __webpack_require__(29);
var ApiUtils = _interopRequireWildcard(_ApiUtils);
var _Shapes = __webpack_require__(18);
var Shapes = _interopRequireWildcard(_Shapes);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _DetailsArea = __webpack_require__(335);
var _DetailsArea2 = _interopRequireDefault(_DetailsArea);
var _reactjsPopup = __webpack_require__(132);
var _reactjsPopup2 = _interopRequireDefault(_reactjsPopup);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _Time = __webpack_require__(99);
var _Time2 = _interopRequireDefault(_Time);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var TimeDataValueEditor = function (_PureComponent) {
(0, _inherits3.default)(TimeDataValueEditor, _PureComponent);
function TimeDataValueEditor() {
(0, _classCallCheck3.default)(this, TimeDataValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (TimeDataValueEditor.__proto__ || Object.getPrototypeOf(TimeDataValueEditor)).apply(this, arguments));
var text = ((_this.props.datavalue || {}).value || {}).time || '';
_this.state = (0, _extends3.default)({}, _this.state, {
parsing: false,
rendering: false,
error: null,
text: text,
renderedAsHtml: text,
calendarModel: null,
precision: null
});
_this.wikidataApi = ApiUtils.getWikidataApi();
_this.handleBlur = function () {
return _this.setState({ focused: false });
};
_this.handleFocused = function () {
return _this.setState({ focused: true });
};
_this.handleKeyDown = _this.handleKeyDown.bind(_this);
_this.handleTextChange = _this.handleTextChange.bind(_this);
_this.handleChangeManualCalendarModel = function (calendarModel) {
_this.setState({ calendarModel: calendarModel });_this.requestParsing();
};
_this.handleChangeManualPrecision = function (precision) {
_this.setState({ precision: precision });_this.requestParsing();
};
_this.handleToggleManualCalendarModel = _this.handleToggleManualCalendarModel.bind(_this);
_this.handleToggleManualPrecision = _this.handleToggleManualPrecision.bind(_this);
_this.refPopup = _react2.default.createRef();
return _this;
}
(0, _createClass3.default)(TimeDataValueEditor, [{
key: 'componentDidMount',
value: function componentDidMount() {
this.requestRender(true);
}
}, {
key: 'handleKeyDown',
value: function handleKeyDown(event) {
if (event.key == 'Tab') {
this.refPopup.current.closePopup();
}
}
}, {
key: 'handleToggleManualCalendarModel',
value: function handleToggleManualCalendarModel() {
var valueCalendarModel = ((this.props.datavalue || {}).value || {}).calendarmodel;
if (this.state.calendarModel === null && !!valueCalendarModel) {
this.setState({ calendarModel: valueCalendarModel });
} else {
this.setState({ calendarModel: null });
}
this.requestParsing();
}
}, {
key: 'handleToggleManualPrecision',
value: function handleToggleManualPrecision() {
var valuePrecision = ((this.props.datavalue || {}).value || {}).precision;
if (this.state.precision === null && valuePrecision !== null) {
this.setState({ precision: valuePrecision });
} else {
this.setState({ precision: null });
}
this.requestParsing();
}
}, {
key: 'handleTextChange',
value: function handleTextChange(event) {
var value = event.target.value;
this.setState({ text: value });
this.requestParsing();
}
}, {
key: 'requestParsing',
value: function requestParsing() {
var _this2 = this;
// we need to be sure that changes to state are applied
setTimeout(function () {
return _this2.requestParsingImpl();
}, 0);
}
}, {
key: 'requestParsingImpl',
value: function requestParsingImpl() {
var _this3 = this;
var _props = this.props,
datavalue = _props.datavalue,
onDataValueChange = _props.onDataValueChange;
var value = this.state.text;
this.setState({ parsing: true });
this.wikidataApi.get({
action: 'wbparsevalue',
datatype: 'time',
values: value,
options: JSON.stringify({
lang: mw.config.get('wgUserLanguage'),
precision: this.state.precision || undefined,
calendarmodel: this.state.calendarModel || undefined
})
}).catch(function (code, _ref) {
var error = _ref.error;
// are still in sync?
if (value !== _this3.state.text) return;
_this3.setState({ parsing: false, error: error.info });
throw new Error(error.info);
}).then(function (response) {
// are still in sync?
if (value !== _this3.state.text) return;
_this3.setState({ parsing: false, error: null });
onDataValueChange((0, _extends3.default)({}, datavalue, {
value: response.results.length !== 0 ? response.results[0].value : null,
type: 'time'
}));
_this3.requestRender();
}).catch(function (error) {
mw.warn('Unable to parse time value: ' + error);
});
}
}, {
key: 'requestRender',
value: function requestRender(renderToText) {
var _this4 = this;
// we need to be sure that changes to state are applied
setTimeout(function () {
return _this4.requestRenderImpl(renderToText);
}, 0);
}
}, {
key: 'requestRenderImpl',
value: function requestRenderImpl(renderToText) {
var _this5 = this;
var datavalue = this.props.datavalue;
if (!this.props.datavalue) {
this.setState({ rendering: false, renderedAsHtml: '' });
return;
}
var parameters = {
action: 'wbformatvalue',
datatype: 'time',
datavalue: JSON.stringify(datavalue),
options: JSON.stringify({
lang: mw.config.get('wgUserLanguage')
})
};
this.setState({ rendering: true });
this.wikidataApi.get((0, _extends3.default)({}, parameters, {
generate: 'text/html'
})).then(function (result) {
_this5.setState({ rendering: false, renderedAsHtml: result.result });
});
if (renderToText) {
this.wikidataApi.get((0, _extends3.default)({}, parameters, {
generate: 'text/plain'
})).then(function (result) {
_this5.setState({ text: result.result });
});
}
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props,
datavalue = _props2.datavalue,
readOnly = _props2.readOnly;
var _state = this.state,
calendarModel = _state.calendarModel,
focused = _state.focused,
parsing = _state.parsing,
rendering = _state.rendering,
error = _state.error,
precision = _state.precision,
renderedAsHtml = _state.renderedAsHtml,
text = _state.text;
var value = (datavalue || {}).value || {};
if (readOnly) {
if (rendering) {
return _react2.default.createElement(
'td',
{ className: _Time2.default.time, colSpan: 12 },
text
);
}
return _react2.default.createElement('td', { className: _Time2.default.time, colSpan: 12, dangerouslySetInnerHTML: { __html: renderedAsHtml } });
}
var input = _react2.default.createElement('input', {
onBlur: this.handleBlur,
onChange: this.handleTextChange,
onFocues: this.handleFocus,
onKeyDown: this.handleKeyDown,
value: text });
var details = _react2.default.createElement(_DetailsArea2.default, {
error: error,
manualCalendarModel: calendarModel,
manualPrecision: precision,
onManualCalendarModelChange: this.handleChangeManualCalendarModel,
onManualCalendarModelToggle: this.handleToggleManualCalendarModel,
onManualPrecisionChange: this.handleChangeManualPrecision,
onManualPrecisionToggle: this.handleToggleManualPrecision,
parsedCalendarModel: value.calendarmodel,
parsedPrecision: value.precision,
preview: renderedAsHtml,
spinner: parsing || rendering });
return _react2.default.createElement(
'td',
{ className: _Time2.default.time, colSpan: 12 },
_react2.default.createElement(
_reactjsPopup2.default,
{
contentStyle: { width: '30em' },
on: 'focus',
open: focused ? true : undefined,
position: 'bottom left',
ref: this.refPopup,
trigger: input },
details
)
);
}
}]);
return TimeDataValueEditor;
}(_react.PureComponent);
TimeDataValueEditor.propTypes = {
datavalue: _propTypes2.default.shape(Shapes.DataValue),
onDataValueChange: _propTypes2.default.func.isRequired,
readOnly: _propTypes2.default.bool
};
exports.default = TimeDataValueEditor;
/***/ }),
/* 337 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _AbstractStringBasedDataValueEditor = __webpack_require__(100);
var _AbstractStringBasedDataValueEditor2 = _interopRequireDefault(_AbstractStringBasedDataValueEditor);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _core = __webpack_require__(33);
var _core2 = _interopRequireDefault(_core);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var StringDataValueEditor = function (_AbstractStringBasedD) {
(0, _inherits3.default)(StringDataValueEditor, _AbstractStringBasedD);
function StringDataValueEditor() {
(0, _classCallCheck3.default)(this, StringDataValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (StringDataValueEditor.__proto__ || Object.getPrototypeOf(StringDataValueEditor)).apply(this, arguments));
_this.handleChange = _this.handleChange.bind(_this);
return _this;
}
(0, _createClass3.default)(StringDataValueEditor, [{
key: 'handleChange',
value: function handleChange(event) {
this.handleValueChange(event.target.value);
}
}, {
key: 'render',
value: function render() {
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "on.*" }] */
var _props = this.props,
datavalue = _props.datavalue,
onDataValueChange = _props.onDataValueChange,
propertyDescription = _props.propertyDescription,
readOnly = _props.readOnly;
if (readOnly) {
if (datavalue && datavalue.value) {
return _react2.default.createElement(
'td',
{ colSpan: 12 },
_react2.default.createElement(
'span',
null,
datavalue.value
)
);
} else {
return null;
}
}
var params = {
type: 'text',
className: _core2.default['wef_' + propertyDescription.datatype]
};
if (propertyDescription.regexp) {
params.pattern = propertyDescription.regexp;
}
params.value = datavalue ? datavalue.value : '';
params.onChange = this.handleChange;
return _react2.default.createElement(
'td',
{ colSpan: 12 },
_react2.default.createElement('input', params)
);
}
}]);
return StringDataValueEditor;
}(_AbstractStringBasedDataValueEditor2.default);
StringDataValueEditor.propTypes = _AbstractStringBasedDataValueEditor2.default.propTypes;
exports.default = StringDataValueEditor;
/***/ }),
/* 338 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".Quantity__wef_datavalue_quantity___3gXVl table {\r\n width: 100%;\r\n}\r\n\r\n.Quantity__wef_datavalue_quantity___3gXVl td {\r\n padding: 0 0.1em;\r\n}\r\n\r\ntd.Quantity__modeselect___CHYkf {\r\n width: 1%;\r\n}\r\n\r\ntd.Quantity__unitselect___19Fpq {\r\n width: 1%;\r\n}\r\n\r\n.Quantity__wef_datavalue_quantity___3gXVl input {\r\n width: 100%;\r\n}\r\n", ""]);
// exports
exports.locals = {
"wef_datavalue_quantity": "Quantity__wef_datavalue_quantity___3gXVl",
"modeselect": "Quantity__modeselect___CHYkf",
"unitselect": "Quantity__unitselect___19Fpq"
};
/***/ }),
/* 339 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(338);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 340 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ok = function ok(x) {
return typeof x === 'string' && x.trim() !== '';
};
var PlusMinusValueEditor = function (_PureComponent) {
(0, _inherits3.default)(PlusMinusValueEditor, _PureComponent);
(0, _createClass3.default)(PlusMinusValueEditor, null, [{
key: 'canBeUsedForValue',
value: function canBeUsedForValue(value) {
var _ref = value || {},
amount = _ref.amount,
lowerBound = _ref.lowerBound,
upperBound = _ref.upperBound;
return !ok(lowerBound) && !ok(upperBound) || Number(amount) - Number(lowerBound) === Number(upperBound) - Number(amount);
}
}]);
function PlusMinusValueEditor() {
(0, _classCallCheck3.default)(this, PlusMinusValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (PlusMinusValueEditor.__proto__ || Object.getPrototypeOf(PlusMinusValueEditor)).apply(this, arguments));
_this.handleAmountChange = _this.handleAmountChange.bind(_this);
_this.handlePlusMinusChange = _this.handlePlusMinusChange.bind(_this);
return _this;
}
(0, _createClass3.default)(PlusMinusValueEditor, [{
key: 'handleAmountChange',
value: function handleAmountChange(event) {
var oldValue = this.props.value || {};
if (!ok(oldValue.lowerBound)) {
this.props.onValueChange((0, _extends3.default)({}, this.props.value, {
amount: event.target.value
}));
return;
}
if (!ok(event.target.value)) {
// need to align boundaries around zero
var _oldAmount = ok(oldValue.amount) ? Number(oldValue.amount) : 0;
var _oldLowerBound = ok(oldValue.lowerBound) ? Number(oldValue.lowerBound) : _oldAmount;
var _oldPlusMinus = _oldAmount - _oldLowerBound;
this.props.onValueChange((0, _extends3.default)({}, oldValue, {
lowerBound: String(0 - _oldPlusMinus),
amount: '',
upperBound: String(0 - _oldPlusMinus)
}));
return;
}
var newAmount = Number(event.target.value);
var oldAmount = ok(oldValue.amount) ? Number(oldValue.amount) : 0;
var oldLowerBound = ok(oldValue.lowerBound) ? Number(oldValue.lowerBound) : oldAmount;
var oldPlusMinus = oldAmount - oldLowerBound;
this.props.onValueChange((0, _extends3.default)({}, this.props.value, {
lowerBound: String(newAmount - oldPlusMinus),
amount: String(newAmount),
upperBound: String(newAmount + oldPlusMinus)
}));
}
}, {
key: 'handlePlusMinusChange',
value: function handlePlusMinusChange(event) {
var oldValue = this.props.value || {};
var oldAmount = Number(oldValue.amount) || 0;
if (event.target.value == null || event.target.value.trim() == '') {
var newValue = (0, _extends3.default)({}, this.props.value);
delete newValue.lowerBound;
delete newValue.upperBound;
this.props.onValueChange(newValue);
return;
}
var newPlusMinus = Number(event.target.value) || 0;
this.props.onValueChange((0, _extends3.default)({}, this.props.value, {
lowerBound: String(oldAmount - newPlusMinus),
upperBound: String(oldAmount + newPlusMinus)
}));
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
readOnly = _props.readOnly,
value = _props.value;
if (readOnly) {
if (!value || !value.amount) return null;
if (value.lowerBound) return value.amount + ' ± ' + (value.amount - value.lowerBound);
return value.amount || '';
}
var plusMinus = void 0;
if (!ok(value.lowerBound)) {
plusMinus = '';
} else {
var nAmount = Number(value.amount) || 0;
plusMinus = String(nAmount - (Number(value.lowerBound) || nAmount));
}
(0, _expect2.default)(plusMinus).toBeA('string');
return _react2.default.createElement(
_react2.default.Fragment,
null,
_react2.default.createElement(
'td',
null,
_react2.default.createElement('input', { onChange: this.handleAmountChange, value: value.amount })
),
_react2.default.createElement(
'td',
null,
'\xA0\xB1\xA0'
),
_react2.default.createElement(
'td',
null,
_react2.default.createElement('input', { onChange: this.handlePlusMinusChange, value: plusMinus })
)
);
}
}]);
return PlusMinusValueEditor;
}(_react.PureComponent);
PlusMinusValueEditor.propTypes = {
onValueChange: _propTypes2.default.func.isRequired,
readOnly: _propTypes2.default.bool,
value: _propTypes2.default.object
};
PlusMinusValueEditor.defaultProps = {
value: null,
readOnly: false
};
exports.default = PlusMinusValueEditor;
/***/ }),
/* 341 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".ModeSelect__compatible___3XB98 {\r\n color: black;\r\n}\r\n\r\n.ModeSelect__incompatible___1j9OZ {\r\n color: gray;\r\n}\r\n", ""]);
// exports
exports.locals = {
"compatible": "ModeSelect__compatible___3XB98",
"incompatible": "ModeSelect__incompatible___1j9OZ"
};
/***/ }),
/* 342 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(341);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 343 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _I18nUtils = __webpack_require__(17);
var en = {
modes: {
exact: 'exact',
plusMinus: 'plus-minus',
boundaries: 'boundaries'
},
inputQuantityUnitLabel: 'unit',
inputQuantityUnitTitle: '',
inputQuantityLowerBoundLabel: 'lower bound',
inputQuantityLowerBoundTitle: '',
inputQuantityAmountLabel: 'amount',
inputQuantityAmountTitle: '',
inputQuantityUpperBoundLabel: 'upper bound',
inputQuantityUpperBoundTitle: ''
};
var ru = {
modes: {
exact: 'точно',
plusMinus: 'плюс-минус',
boundaries: 'границы'
},
inputQuantityUnitLabel: 'единица',
inputQuantityUnitTitle: '',
inputQuantityLowerBoundLabel: 'нижняя граница',
inputQuantityLowerBoundTitle: '',
inputQuantityAmountLabel: 'количество',
inputQuantityAmountTitle: '',
inputQuantityUpperBoundLabel: 'верхняя граница',
inputQuantityUpperBoundTitle: ''
};
var translations = { en: en, ru: ru };
var result = (0, _I18nUtils.localize)({}, translations);
exports.default = result;
/***/ }),
/* 344 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _i18n = __webpack_require__(343);
var _i18n2 = _interopRequireDefault(_i18n);
var _QuantityDataValueEditor = __webpack_require__(201);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _ModeSelect = __webpack_require__(342);
var _ModeSelect2 = _interopRequireDefault(_ModeSelect);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ModeSelect = function (_PureComponent) {
(0, _inherits3.default)(ModeSelect, _PureComponent);
function ModeSelect() {
(0, _classCallCheck3.default)(this, ModeSelect);
var _this = (0, _possibleConstructorReturn3.default)(this, (ModeSelect.__proto__ || Object.getPrototypeOf(ModeSelect)).apply(this, arguments));
_this.handleModeChange = _this.handleModeChange.bind(_this);
return _this;
}
(0, _createClass3.default)(ModeSelect, [{
key: 'handleModeChange',
value: function handleModeChange(event) {
var newMode = event.target.value;
(0, _expect2.default)(newMode).toBeA('string');
this.props.onSelect(newMode);
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
mode = _props.mode,
value = _props.value;
return _react2.default.createElement(
'select',
{ onChange: this.handleModeChange, value: mode },
Object.keys(_QuantityDataValueEditor.MODES).map(function (m) {
var compatible = _QuantityDataValueEditor.MODES[m].canBeUsedForValue(value);
return _react2.default.createElement(
'option',
{
className: compatible ? _ModeSelect2.default.compatible : _ModeSelect2.default.incompatible,
disabled: !compatible,
key: m,
title: !compatible ? 'not compatble with current values' : '',
value: m },
_i18n2.default.modes[m]
);
})
);
}
}]);
return ModeSelect;
}(_react.PureComponent);
ModeSelect.propTypes = {
mode: _propTypes2.default.string.isRequired,
onSelect: _propTypes2.default.func.isRequired,
value: _propTypes2.default.object
};
exports.default = ModeSelect;
/***/ }),
/* 345 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ok = function ok(x) {
return typeof x === 'string' && x.trim() !== '';
};
var ExactValueEditor = function (_PureComponent) {
(0, _inherits3.default)(ExactValueEditor, _PureComponent);
(0, _createClass3.default)(ExactValueEditor, null, [{
key: 'canBeUsedForValue',
value: function canBeUsedForValue(value) {
var amount = value.amount,
lowerBound = value.lowerBound,
upperBound = value.upperBound;
return !ok(lowerBound) && !ok(upperBound) || Number(lowerBound) == Number(amount) && Number(upperBound) == Number(amount);
}
}]);
function ExactValueEditor() {
(0, _classCallCheck3.default)(this, ExactValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (ExactValueEditor.__proto__ || Object.getPrototypeOf(ExactValueEditor)).apply(this, arguments));
_this.handleChange = _this.handleChange.bind(_this);
return _this;
}
(0, _createClass3.default)(ExactValueEditor, [{
key: 'handleChange',
value: function handleChange(event) {
this.props.onValueChange((0, _extends3.default)({}, this.props.value, {
amount: event.target.value || ''
}));
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
readOnly = _props.readOnly,
value = _props.value;
if (readOnly) {
if (!value) {
return null;
}
return value.amount || null;
}
return _react2.default.createElement(
'td',
null,
_react2.default.createElement('input', { onChange: this.handleChange, value: value.amount || '' })
);
}
}]);
return ExactValueEditor;
}(_react.PureComponent);
ExactValueEditor.propTypes = {
onValueChange: _propTypes2.default.func.isRequired,
readOnly: _propTypes2.default.bool,
value: _propTypes2.default.object
};
ExactValueEditor.defaultProps = {
value: {},
readOnly: false
};
exports.default = ExactValueEditor;
/***/ }),
/* 346 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _defineProperty2 = __webpack_require__(55);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _extends3 = __webpack_require__(7);
var _extends4 = _interopRequireDefault(_extends3);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var BoundariesValueEditor = function (_PureComponent) {
(0, _inherits3.default)(BoundariesValueEditor, _PureComponent);
(0, _createClass3.default)(BoundariesValueEditor, null, [{
key: 'canBeUsedForValue',
value: function canBeUsedForValue() {
return true;
}
}]);
function BoundariesValueEditor() {
(0, _classCallCheck3.default)(this, BoundariesValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (BoundariesValueEditor.__proto__ || Object.getPrototypeOf(BoundariesValueEditor)).apply(this, arguments));
_this.handleAmountChange = _this.handleAmountChange.bind(_this);
_this.handleLowerBoundChange = _this.handleLowerBoundChange.bind(_this);
_this.handleUpperBoundChange = _this.handleUpperBoundChange.bind(_this);
return _this;
}
(0, _createClass3.default)(BoundariesValueEditor, [{
key: 'handleFieldChange',
value: function handleFieldChange(field, event) {
this.props.onValueChange((0, _extends4.default)({}, this.props.value, (0, _defineProperty3.default)({}, field, event.target.value || '')));
}
}, {
key: 'handleAmountChange',
value: function handleAmountChange(event) {
this.handleFieldChange('amount', event);
}
}, {
key: 'handleLowerBoundChange',
value: function handleLowerBoundChange(event) {
this.handleFieldChange('lowerBound', event);
}
}, {
key: 'handleUpperBoundChange',
value: function handleUpperBoundChange(event) {
this.handleFieldChange('upperBound', event);
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
readOnly = _props.readOnly,
value = _props.value;
if (readOnly) {
if (!value || !value.amount) return null;
return (value.lowerBound || '?') + ' < ' + (value.amount || '?') + ' < ' + (value.upperBound || '?');
}
return _react2.default.createElement(
_react2.default.Fragment,
null,
_react2.default.createElement(
'td',
null,
_react2.default.createElement('input', { onChange: this.handleLowerBoundChange, value: value.lowerBound || '' })
),
_react2.default.createElement(
'td',
null,
'\xA0<\xA0'
),
_react2.default.createElement(
'td',
null,
_react2.default.createElement('input', { onChange: this.handleAmountChange, value: value.amount || '' })
),
_react2.default.createElement(
'td',
null,
'\xA0<\xA0'
),
_react2.default.createElement(
'td',
null,
_react2.default.createElement('input', { onChange: this.handleUpperBoundChange, value: value.upperBound || '' })
)
);
}
}]);
return BoundariesValueEditor;
}(_react.PureComponent);
BoundariesValueEditor.propTypes = {
onValueChange: _propTypes2.default.func.isRequired,
readOnly: _propTypes2.default.bool,
value: _propTypes2.default.object
};
BoundariesValueEditor.defaultProps = {
value: null,
readOnly: false
};
exports.default = BoundariesValueEditor;
/***/ }),
/* 347 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, "\r\n/*Snak value level -- per types: MONOLINGUALTEXT */\r\n.MonolingualText__wef_monolingualtext___9b0VV table {\r\n\twidth: 100%;\r\n}\r\n\r\n.MonolingualText__wef_monolingualtext___9b0VV .MonolingualText__wef_monolingualtext_language___I-vmF {\r\n\twidth: 3em;\r\n}\r\n\r\n.MonolingualText__wef_monolingualtext_text___24SbJ input {\r\n\twidth: 99%;\r\n}\r\n", ""]);
// exports
exports.locals = {
"wef_monolingualtext": "MonolingualText__wef_monolingualtext___9b0VV",
"wef_monolingualtext_language": "MonolingualText__wef_monolingualtext_language___I-vmF",
"wef_monolingualtext_text": "MonolingualText__wef_monolingualtext_text___24SbJ"
};
/***/ }),
/* 348 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(347);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 349 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _Shapes = __webpack_require__(18);
var Shapes = _interopRequireWildcard(_Shapes);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _LanguageAutocomplete = __webpack_require__(208);
var _LanguageAutocomplete2 = _interopRequireDefault(_LanguageAutocomplete);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _MonolingualText = __webpack_require__(348);
var _MonolingualText2 = _interopRequireDefault(_MonolingualText);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var MonolingualTextDataValueEditor = function (_PureComponent) {
(0, _inherits3.default)(MonolingualTextDataValueEditor, _PureComponent);
function MonolingualTextDataValueEditor() {
(0, _classCallCheck3.default)(this, MonolingualTextDataValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (MonolingualTextDataValueEditor.__proto__ || Object.getPrototypeOf(MonolingualTextDataValueEditor)).apply(this, arguments));
_this.handleLanguageChange = _this.handleLanguageChange.bind(_this);
_this.handleTextChange = _this.handleTextChange.bind(_this);
return _this;
}
(0, _createClass3.default)(MonolingualTextDataValueEditor, [{
key: 'handleLanguageChange',
value: function handleLanguageChange(value) {
var _props = this.props,
datavalue = _props.datavalue,
onDataValueChange = _props.onDataValueChange;
onDataValueChange((0, _extends3.default)({}, datavalue, {
value: (0, _extends3.default)({}, datavalue ? datavalue.value : undefined, {
language: value
}),
type: 'monolingualtext'
}));
}
}, {
key: 'handleTextChange',
value: function handleTextChange(event) {
var _props2 = this.props,
datavalue = _props2.datavalue,
onDataValueChange = _props2.onDataValueChange;
onDataValueChange((0, _extends3.default)({}, datavalue, {
value: (0, _extends3.default)({
// set language of current content language if no specified yet AND some text entered
language: event.target.value.trim() !== '' ? mw.config.get('wgContentLanguage') : undefined
}, datavalue ? datavalue.value : undefined, {
text: event.target.value
}),
type: 'monolingualtext'
}));
}
}, {
key: 'render',
value: function render() {
var _props3 = this.props,
datavalue = _props3.datavalue,
readOnly = _props3.readOnly;
var language = datavalue && datavalue.value && datavalue.value.language ? datavalue.value.language : '';
var text = datavalue && datavalue.value && datavalue.value.text ? datavalue.value.text : '';
if (readOnly) {
if (language) {
return _react2.default.createElement(
'td',
{ colSpan: 12 },
_react2.default.createElement(
'span',
null,
language,
': ',
text
)
);
} else {
return null;
}
}
return _react2.default.createElement(
'td',
{ className: _MonolingualText2.default.wef_monolingualtext, colSpan: 12 },
_react2.default.createElement(
'table',
null,
_react2.default.createElement(
'tbody',
null,
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'td',
{ className: _MonolingualText2.default.wef_monolingualtext_language },
_react2.default.createElement(_LanguageAutocomplete2.default, { onChange: this.handleLanguageChange, provided: [], value: language })
),
_react2.default.createElement(
'td',
{ className: _MonolingualText2.default.wef_monolingualtext_text },
_react2.default.createElement('input', { onChange: this.handleTextChange, value: text })
)
)
)
)
);
}
}]);
return MonolingualTextDataValueEditor;
}(_react.PureComponent);
MonolingualTextDataValueEditor.propTypes = {
datavalue: _propTypes2.default.shape(Shapes.DataValue),
onDataValueChange: _propTypes2.default.func.isRequired,
readOnly: _propTypes2.default.bool
};
exports.default = MonolingualTextDataValueEditor;
/***/ }),
/* 350 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ButtonCell = __webpack_require__(45);
var _ButtonCell2 = _interopRequireDefault(_ButtonCell);
var _reactRedux = __webpack_require__(44);
var _I18nUtils = __webpack_require__(17);
var _reselect = __webpack_require__(51);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ok = function ok(x) {
return x !== undefined && x !== null;
};
var NOOP = function NOOP() {};
var SearchOnSourceWebsitesButtonCell = function (_PureComponent) {
(0, _inherits3.default)(SearchOnSourceWebsitesButtonCell, _PureComponent);
function SearchOnSourceWebsitesButtonCell() {
var _ref;
var _temp, _this, _ret;
(0, _classCallCheck3.default)(this, SearchOnSourceWebsitesButtonCell);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = SearchOnSourceWebsitesButtonCell.__proto__ || Object.getPrototypeOf(SearchOnSourceWebsitesButtonCell)).call.apply(_ref, [this].concat(args))), _this), _this.memoizeUrl = (0, _reselect.defaultMemoize)(function (labels, languageCodes, sourceWebsites) {
var languageSet = new (Function.prototype.bind.apply(Set, [null].concat((0, _toConsumableArray3.default)(languageCodes))))();
var qLabels = Object.values(labels).filter(ok).filter(function (label) {
return languageSet.has(label.language);
}).map(function (label) {
return label.value;
}).filter(function (value) {
return value !== undefined && value !== null && value.trim() !== '';
});
if (qLabels.length === 0) {
qLabels = Object.values(labels).filter(ok).filter(function (label) {
return _I18nUtils.DEFAULT_LANGUAGES.indexOf(label.language) !== -1;
}).map(function (label) {
return label.value;
}).filter(function (value) {
return value !== undefined && value !== null && value.trim() !== '';
});
}
qLabels = [].concat((0, _toConsumableArray3.default)(new Set(qLabels)));
var qSites = sourceWebsites.filter(ok).filter(function (value) {
return value !== undefined && value !== null && value.trim() !== '';
}).map(function (site) {
return 'site:' + site.trim();
});
if (qSites.length === 0 || qLabels === 0) return null;
var result = '//google.com/search?sourceid=vlsergey_wef&ie=UTF-8&q=' + encodeURIComponent((qSites.length > 1 ? '(' + qSites.join(' OR ') + ')' : qSites) + ' ' + (qLabels.length > 1 ? '(' + qLabels.join(' OR ') + ')' : qLabels));
return result;
}), _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
(0, _createClass3.default)(SearchOnSourceWebsitesButtonCell, [{
key: 'render',
value: function render() {
var _props = this.props,
disabled = _props.disabled,
labels = _props.labels,
languageCodes = _props.languageCodes,
sourceWebsites = _props.sourceWebsites;
var url = this.memoizeUrl(labels, languageCodes, sourceWebsites);
return _react2.default.createElement(
_ButtonCell2.default,
{
disabled: disabled || !url,
icon: 'ui-icon-search',
label: _core2.default.buttonSearchOnWebsites,
onClick: NOOP },
function (children) {
return _react2.default.createElement(
'a',
{ href: url ? url : '#',
rel: 'noopener noreferrer',
target: '_blank' },
children
);
}
);
}
}]);
return SearchOnSourceWebsitesButtonCell;
}(_react.PureComponent);
SearchOnSourceWebsitesButtonCell.propTypes = {
disabled: _propTypes2.default.bool,
labels: _propTypes2.default.object,
languageCodes: _propTypes2.default.arrayOf(_propTypes2.default.string).isRequired,
sourceWebsites: _propTypes2.default.arrayOf(_propTypes2.default.string).isRequired
};
var EMPTY_OBJECT = {};
var mapStateToProps = function mapStateToProps(state) {
return {
labels: state.entity.labels || EMPTY_OBJECT
};
};
var SearchOnSourceWebsitesButtonCellConnected = (0, _reactRedux.connect)(mapStateToProps)(SearchOnSourceWebsitesButtonCell);
exports.default = SearchOnSourceWebsitesButtonCellConnected;
/***/ }),
/* 351 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _AbstractStringBasedDataValueEditor = __webpack_require__(100);
var _AbstractStringBasedDataValueEditor2 = _interopRequireDefault(_AbstractStringBasedDataValueEditor);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _SearchOnSourceWebsitesButtonCell = __webpack_require__(350);
var _SearchOnSourceWebsitesButtonCell2 = _interopRequireDefault(_SearchOnSourceWebsitesButtonCell);
var _core = __webpack_require__(33);
var _core2 = _interopRequireDefault(_core);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ExternalIdDataValueEditor = function (_AbstractStringBasedD) {
(0, _inherits3.default)(ExternalIdDataValueEditor, _AbstractStringBasedD);
function ExternalIdDataValueEditor() {
(0, _classCallCheck3.default)(this, ExternalIdDataValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (ExternalIdDataValueEditor.__proto__ || Object.getPrototypeOf(ExternalIdDataValueEditor)).apply(this, arguments));
_this.handleChange = _this.handleChange.bind(_this);
return _this;
}
(0, _createClass3.default)(ExternalIdDataValueEditor, [{
key: 'handleChange',
value: function handleChange(event) {
this.handleValueChange(event.target.value);
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
datavalue = _props.datavalue,
propertyDescription = _props.propertyDescription,
readOnly = _props.readOnly;
var url = datavalue && datavalue.value ? propertyDescription.formatUrl(datavalue.value) : null;
if (readOnly) {
if (datavalue && datavalue.value) {
if (url) {
return _react2.default.createElement(
'td',
{ colSpan: 12 },
_react2.default.createElement(
'a',
{
href: url,
rel: 'noopener noreferrer',
target: '_blank' },
datavalue.value
)
);
} else {
return _react2.default.createElement(
'td',
{ colSpan: 12 },
datavalue.value
);
}
} else {
return null;
}
}
var params = {
type: 'text',
className: _core2.default['wef_' + propertyDescription.datatype]
};
if (propertyDescription.regexp) {
params.pattern = propertyDescription.regexp;
}
params.value = datavalue ? datavalue.value : '';
params.onChange = this.handleChange;
return _react2.default.createElement(
_react2.default.Fragment,
null,
_react2.default.createElement(
'td',
{ colSpan: 5 },
_react2.default.createElement('input', params)
),
_react2.default.createElement(
'td',
{ className: _core2.default.wef_external_links_url_cell, colSpan: 6 },
_react2.default.createElement(
'div',
{ className: _core2.default.wef_external_links_url_div },
url ? _react2.default.createElement(
'a',
{ className: _core2.default.wef_external_links_url_a, href: url, rel: 'noopener noreferrer', target: '_blank' },
url
) : ''
)
),
propertyDescription.sourceWebsites && propertyDescription.languageCodes ? _react2.default.createElement(_SearchOnSourceWebsitesButtonCell2.default, {
languageCodes: propertyDescription.languageCodes,
sourceWebsites: propertyDescription.sourceWebsites }) : _react2.default.createElement('td', null)
);
}
}]);
return ExternalIdDataValueEditor;
}(_AbstractStringBasedDataValueEditor2.default);
ExternalIdDataValueEditor.propTypes = _AbstractStringBasedDataValueEditor2.default.propTypes;
exports.default = ExternalIdDataValueEditor;
/***/ }),
/* 352 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".CommonsMediaDataValueEditor__wef_datavalue_commonsMedia___3KU1S input {\r\n width: 100%;\r\n}\r\n\r\n.CommonsMediaDataValueEditor__container___3Zn-A {\r\n position: relative;\r\n}\r\n\r\n.CommonsMediaDataValueEditor__suggestionsContainer___3uU_Y {\r\n display: none;\r\n}\r\n\r\n.CommonsMediaDataValueEditor__containerOpen___3jyMR .CommonsMediaDataValueEditor__suggestionsContainer___3uU_Y {\r\n display: block;\r\n position: absolute;\r\n width: 23em;\r\n border: 1px solid #aaa;\r\n background-color: #fff;\r\n font-family: Helvetica, sans-serif;\r\n font-weight: 300;\r\n border-bottom-left-radius: 4px;\r\n border-bottom-right-radius: 4px;\r\n z-index: 2;\r\n}\r\n\r\n.CommonsMediaDataValueEditor__suggestionsList___2Mnh8 {\r\n margin: 0;\r\n padding: 0;\r\n list-style-image: none;\r\n list-style-type: none;\r\n}\r\n\r\n.CommonsMediaDataValueEditor__suggestion___1aWu- {\r\n cursor: pointer;\r\n padding: 2px 4px;\r\n}\r\n\r\n.CommonsMediaDataValueEditor__suggestion___1aWu-:not(:first-child) {\r\n border-top: 1px solid #ddd;\r\n}\r\n\r\n.CommonsMediaDataValueEditor__suggestionHighlighted___2n-_k {\r\n background-color: #0C7EAF;\r\n color: #fff;\r\n}\r\n\r\n.CommonsMediaDataValueEditor__suggestionContent___w3cvm {\r\n display: -ms-flexbox;\r\n display: flex;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n background-repeat: no-repeat;\r\n}\r\n\r\n.CommonsMediaDataValueEditor__suggestionContentPreviewOuter___GOwlu {\r\n width: 50px;\r\n height: 50px;\r\n overflow: hidden;\r\n display: -ms-flexbox;\r\n display: flex;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n -ms-flex-pack: center;\r\n justify-content: center;\r\n}\r\n\r\n.CommonsMediaDataValueEditor__suggestionContentPreviewInner___FHr1E {\r\n}\r\n\r\n.CommonsMediaDataValueEditor__suggestionContentPreviewInner___FHr1E p {\r\n padding: 0;\r\n margin: 0;\r\n}\r\n\r\n.CommonsMediaDataValueEditor__suggestionContentText___3KNcH {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n.CommonsMediaDataValueEditor__highlight___39Iff {\r\n color: #ee0000;\r\n font-weight: bold;\r\n}\r\n", ""]);
// exports
exports.locals = {
"wef_datavalue_commonsMedia": "CommonsMediaDataValueEditor__wef_datavalue_commonsMedia___3KU1S",
"container": "CommonsMediaDataValueEditor__container___3Zn-A",
"suggestionsContainer": "CommonsMediaDataValueEditor__suggestionsContainer___3uU_Y",
"containerOpen": "CommonsMediaDataValueEditor__containerOpen___3jyMR",
"suggestionsList": "CommonsMediaDataValueEditor__suggestionsList___2Mnh8",
"suggestion": "CommonsMediaDataValueEditor__suggestion___1aWu-",
"suggestionHighlighted": "CommonsMediaDataValueEditor__suggestionHighlighted___2n-_k",
"suggestionContent": "CommonsMediaDataValueEditor__suggestionContent___w3cvm",
"suggestionContentPreviewOuter": "CommonsMediaDataValueEditor__suggestionContentPreviewOuter___GOwlu",
"suggestionContentPreviewInner": "CommonsMediaDataValueEditor__suggestionContentPreviewInner___FHr1E",
"suggestionContentText": "CommonsMediaDataValueEditor__suggestionContentText___3KNcH",
"highlight": "CommonsMediaDataValueEditor__highlight___39Iff"
};
/***/ }),
/* 353 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(352);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 354 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 grid = (0, _emotion.keyframes)('0%{transform:scale(1)}50%{transform:scale(0.5);opacity:0.7}100%{transform:scale(1);opacity:1}');
var random = function random(top) {
return Math.random() * top;
};
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (rand) {
return (0, _emotion.css)('{display:inline-block;background-color:', _this.props.color, ';width:', _this.props.size + _this.props.sizeUnit, ';height:', _this.props.size + _this.props.sizeUnit, ';margin:', _this.props.margin, ';border-radius:100%;animation-fill-mode:\'both\';animation:', grid, ' ', rand / 100 + 0.6, 's ', rand / 100 - 0.2, 's infinite ease;}');
}, _this.wrapper = function () {
return (0, _emotion.css)('{width:', (parseFloat(_this.props.size) * 3 + parseFloat(_this.props.margin) * 6).toString() + _this.props.sizeUnit, ';font-size:0;}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.style(random(100)) }),
_react2.default.createElement('div', { className: this.style(random(100)) }),
_react2.default.createElement('div', { className: this.style(random(100)) }),
_react2.default.createElement('div', { className: this.style(random(100)) }),
_react2.default.createElement('div', { className: this.style(random(100)) }),
_react2.default.createElement('div', { className: this.style(random(100)) }),
_react2.default.createElement('div', { className: this.style(random(100)) }),
_react2.default.createElement('div', { className: this.style(random(100)) }),
_react2.default.createElement('div', { className: this.style(random(100)) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
margin: _propTypes2.default.string,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 15,
margin: '2px',
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'margin', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 355 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 scale = (0, _emotion.keyframes)('0%{transform:scaley(1.0)}50%{transform:scaley(0.4)}100%{transform:scaley(1.0)}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (0, _emotion.css)('{background-color:', _this.props.color, ';width:', _this.props.width + _this.props.widthUnit, ';height:', _this.props.height + _this.props.heightUnit, ';margin:', _this.props.margin, ';border-radius:', _this.props.radius.toString() + _this.props.radiusUnit, ';display:inline-block;animation:', scale, ' 1s ', i * 0.1, 's infinite cubic-bezier(.2,.68,.18,1.08);animation-fill-mode:both;}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
null,
_react2.default.createElement('div', { className: this.style(1) }),
_react2.default.createElement('div', { className: this.style(2) }),
_react2.default.createElement('div', { className: this.style(3) }),
_react2.default.createElement('div', { className: this.style(4) }),
_react2.default.createElement('div', { className: this.style(5) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
height: _propTypes2.default.number,
width: _propTypes2.default.number,
margin: _propTypes2.default.string,
radius: _propTypes2.default.number,
heightUnit: _propTypes2.default.string,
widthUnit: _propTypes2.default.string,
radiusUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
height: 35,
width: 4,
margin: '2px',
radius: 2,
heightUnit: 'px',
widthUnit: 'px',
radiusUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'height', 'width', 'margin', 'radius', 'heightUnit', 'widthUnit', 'radiusUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 356 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 rotate = (0, _emotion.keyframes)('0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}100%{transform:rotate(360deg)}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (0, _emotion.css)('{opacity:0.8;position:absolute;top:0;left:', i % 2 ? -28 : 25, 'px;}');
}, _this.ball = function () {
return (0, _emotion.css)('{background-color:', _this.props.color, ';width:', _this.props.size + _this.props.sizeUnit, ';height:', _this.props.size + _this.props.sizeUnit, ';margin:', _this.props.margin, ';border-radius:100%;}');
}, _this.wrapper = function () {
return (0, _emotion.css)(_this.ball(), ';display:inline-block;position:relative;animation-fill-mode:both;animation:', rotate, ' 1s 0s infinite cubic-bezier(.7,-.13,.22,.86);');
}, _this.long = function () {
return (0, _emotion.css)(_this.ball(), ';', _this.style(1), ';');
}, _this.short = function () {
return (0, _emotion.css)(_this.ball(), ';', _this.style(2), ';');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.long() }),
_react2.default.createElement('div', { className: this.short() })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
margin: _propTypes2.default.string,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 15,
margin: '2px',
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'margin'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 357 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 riseAmount = 30;
var even = (0, _emotion.keyframes)('0%{transform:scale(1.1)}25%{translateY(-', riseAmount, 'px)}50%{transform:scale(0.4)}75%{transform:translateY(', riseAmount, 'px)}100%{transform:translateY(0) scale(1.0)}');
var odd = (0, _emotion.keyframes)('0%{transform:scale(0.4)}25%{translateY(', riseAmount, 'px)}50%{transform:scale(1.1)}75%{transform:translateY(', -riseAmount, 'px)}100%{transform:translateY(0) scale(0.75)}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (0, _emotion.css)('{background-color:', _this.props.color, ';width:', _this.props.size + _this.props.sizeUnit, ';height:', _this.props.size + _this.props.sizeUnit, ';margin:', _this.props.margin, ';border-radius:100%;display:inline-block;animation:', i % 2 === 0 ? even : odd, ' 1s 0s infinite cubic-bezier(.15,.46,.9,.6);animation-fill-mode:both;}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
null,
_react2.default.createElement('div', { className: this.style(1) }),
_react2.default.createElement('div', { className: this.style(2) }),
_react2.default.createElement('div', { className: this.style(3) }),
_react2.default.createElement('div', { className: this.style(4) }),
_react2.default.createElement('div', { className: this.style(5) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
margin: _propTypes2.default.string,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 15,
margin: '2px',
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'margin', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 358 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 right = (0, _emotion.keyframes)('0%{transform:rotateX(0deg) rotateY(0deg) rotateZ(0deg)}100%{transform:rotateX(180deg) rotateY(360deg) rotateZ(360deg)}');
var left = (0, _emotion.keyframes)('0%{transform:rotateX(0deg) rotateY(0deg) rotateZ(0deg)}100%{transform:rotateX(360deg) rotateY(180deg) rotateZ(360deg)}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (0, _emotion.css)('{position:absolute;top:0;left:0;width:', _this.props.size.toString() + _this.props.sizeUnit, ';height:', _this.props.size.toString() + _this.props.sizeUnit, ';border:', (_this.props.size / 10).toString() + _this.props.sizeUnit, ' solid ', _this.props.color, ';opacity:0.4;border-radius:100%;animation-fill-mode:forwards;perspective:800px;animation:', i === 1 ? right : left, ' 2s 0s infinite linear;}');
}, _this.wrapper = function () {
return (0, _emotion.css)('{width:', _this.props.size.toString() + _this.props.sizeUnit, ';height:', _this.props.size.toString() + _this.props.sizeUnit, ';position:relative;}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.style(1) }),
_react2.default.createElement('div', { className: this.style(2) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 60,
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 359 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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;
}
// This returns an animation
var pulse = (0, _emotion.keyframes)('0%{transform:scale(1);opacity:1}45%{transform:scale(0.1);opacity:0.7}80%{transform:scale(1);opacity:1}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (0, _emotion.css)('{background-color:', _this.props.color, ';width:', _this.props.size + _this.props.sizeUnit, ';height:', _this.props.size + _this.props.sizeUnit, ';margin:', _this.props.margin, ';border-radius:100%;display:inline-block;animation:', pulse, ' 0.75s ', i * 0.12, 's infinite cubic-bezier(.2,.68,.18,1.08);animation-fill-mode:both;}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
null,
_react2.default.createElement('div', { className: this.style(1) }),
_react2.default.createElement('div', { className: this.style(2) }),
_react2.default.createElement('div', { className: this.style(3) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
margin: _propTypes2.default.string,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 15,
margin: '2px',
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'margin', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 360 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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;
}
// 1.5 4.5 7.5
var distance = [1, 3, 5];
var propagate = [(0, _emotion.keyframes)('25%{transform:translateX(-', distance[0], 'rem) scale(0.75)}50%{transform:translateX(-', distance[1], 'rem) scale(0.6)}75%{transform:translateX(-', distance[2], 'rem) scale(0.5)}95%{transform:translateX(0rem) scale(1)}'), (0, _emotion.keyframes)('25%{transform:translateX(-', distance[0], 'rem) scale(0.75)}50%{transform:translateX(-', distance[1], 'rem) scale(0.6)}75%{transform:translateX(-', distance[1], 'rem) scale(0.6)}95%{transform:translateX(0rem) scale(1)}'), (0, _emotion.keyframes)('25%{transform:translateX(-', distance[0], 'rem) scale(0.75)}75%{transform:translateX(-', distance[0], 'rem) scale(0.75)}95%{transform:translateX(0rem) scale(1)}'), (0, _emotion.keyframes)('25%{transform:translateX(', distance[0], 'rem) scale(0.75)}75%{transform:translateX(', distance[0], 'rem) scale(0.75)}95%{transform:translateX(0rem) scale(1)}'), (0, _emotion.keyframes)('25%{transform:translateX(', distance[0], 'rem) scale(0.75)}50%{transform:translateX(', distance[1], 'rem) scale(0.6)}75%{transform:translateX(', distance[1], 'rem) scale(0.6)}95%{transform:translateX(0rem) scale(1)}'), (0, _emotion.keyframes)('25%{transform:translateX(', distance[0], 'rem) scale(0.75)}50%{transform:translateX(', distance[1], 'rem) scale(0.6)}75%{transform:translateX(', distance[2], 'rem) scale(0.5)}95%{transform:translateX(0rem) scale(1)}')];
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (0, _emotion.css)('{position:absolute;font-size:', _this.props.size / 3, ' ', _this.props.sizeUnit, ';height:', _this.props.size + _this.props.sizeUnit, ';width:', _this.props.size + _this.props.sizeUnit, ';height:', _this.props.size + _this.props.sizeUnit, ';background:', _this.props.color, ';border-radius:50%;animation:', propagate[i], ' 1.5s infinite;animation-fill-mode:forwards;}');
}, _this.wrapper = function () {
return (0, _emotion.css)('{position:relative;}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.style(0) }),
_react2.default.createElement('div', { className: this.style(1) }),
_react2.default.createElement('div', { className: this.style(2) }),
_react2.default.createElement('div', { className: this.style(3) }),
_react2.default.createElement('div', { className: this.style(4) }),
_react2.default.createElement('div', { className: this.style(5) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
size: _propTypes2.default.number,
color: _propTypes2.default.string,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
size: 15,
color: '#000000',
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 361 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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;
}
// This returns an animation
var pacman = [(0, _emotion.keyframes)('0%{transform:rotate(0deg)}50%{transform:rotate(-44deg)}'), (0, _emotion.keyframes)('0%{transform:rotate(0deg)}50%{transform:rotate(44deg)}')];
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.ball = function () {
return (0, _emotion.keyframes)('75%{opacity:0.7}100%{transform:translate(', (-4 * _this.props.size).toString() + _this.props.sizeUnit, ',', (-_this.props.size / 4).toString() + _this.props.sizeUnit, ')}');
}, _this.ballStyle = function (i) {
return (0, _emotion.css)('{width:10px;height:10px;background-color:', _this.props.color, ';margin:', _this.props.margin, ';border-radius:100%;transform:translate(0,', (-_this.props.size / 4).toString() + _this.props.sizeUnit, ');position:absolute;top:25px;left:100px;animation:', _this.ball(), ' 1s ', i * 0.25, 's infinite linear;animation-fill-mode:both;}');
}, _this.s1 = function () {
return _this.props.size.toString() + _this.props.sizeUnit + ' solid transparent';
}, _this.s2 = function () {
return _this.props.size.toString() + _this.props.sizeUnit + ' solid ' + _this.props.color;
}, _this.pacmanStyle = function (i) {
return (0, _emotion.css)('{width:0;height:0;border-right:', _this.s1(), ';border-top:', i === 0 ? _this.s1() : _this.s2(), ';border-left:', _this.s2(), ';border-bottom:', i === 0 ? _this.s2() : _this.s1(), ';border-radius:', _this.props.size.toString() + _this.props.sizeUnit, ';position:absolute;animation:', pacman[i], ' 0.8s infinite ease-in-out;animation-fill-mode:both;}');
}, _this.wrapper = function () {
return (0, _emotion.css)('{position:relative;font-size:0;height:', _this.props.size.toString() + _this.props.sizeUnit, ';width:', _this.props.size.toString() + _this.props.sizeUnit, ';}');
}, _this.pac = function () {
return _this.pacmanStyle(0);
}, _this.man = function () {
return _this.pacmanStyle(1);
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.pac() }),
_react2.default.createElement('div', { className: this.man() }),
_react2.default.createElement('div', { className: this.ballStyle(2) }),
_react2.default.createElement('div', { className: this.ballStyle(3) }),
_react2.default.createElement('div', { className: this.ballStyle(4) }),
_react2.default.createElement('div', { className: this.ballStyle(5) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
margin: _propTypes2.default.string,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 25,
margin: '2px',
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'margin', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 362 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 moon = (0, _emotion.keyframes)('100%{transform:rotate(360deg)}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.moonSize = function () {
return _this.props.size / 7;
}, _this.ballStyle = function (size) {
return (0, _emotion.css)('{width:', size.toString() + _this.props.sizeUnit, ';height:', size.toString() + _this.props.sizeUnit, ';border-radius:100%;}');
}, _this.wrapper = function () {
return (0, _emotion.css)('{position:relative;width:', (_this.props.size + _this.moonSize() * 2).toString() + _this.props.sizeUnit, ';height:', (_this.props.size + _this.moonSize() * 2).toString() + _this.props.sizeUnit, ';animation:', moon, ' 0.6s 0s infinite linear;animation-fill-mode:forwards;}');
}, _this.ball = function () {
return (0, _emotion.css)(_this.ballStyle(_this.moonSize()), ';background-color:', _this.props.color, ';opacity:0.8;position:absolute;top:', (_this.props.size / 2 - _this.moonSize() / 2).toString() + _this.props.sizeUnit, ';animation:', moon, ' 0.6s 0s infinite linear;animation-fill-mode:forwards;');
}, _this.circle = function () {
return (0, _emotion.css)(_this.ballStyle(_this.props.size), ';border:', _this.moonSize(), 'px solid ', _this.props.color, ';opacity:0.1;');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.ball() }),
_react2.default.createElement('div', { className: this.circle() })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 60,
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 363 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22), __webpack_require__(202)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose, _helpers) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.thickness = function () {
return _this.props.size / 5;
}, _this.lat = function () {
return (_this.props.size - _this.thickness()) / 2;
}, _this.offset = function () {
return _this.lat() - _this.thickness();
}, _this.color = function () {
return (0, _helpers.calculateRgba)(_this.props.color, 0.75);
}, _this.before = function () {
return (0, _emotion.keyframes)('0%{width:', _this.thickness(), 'px;box-shadow:', _this.lat(), 'px ', -_this.offset(), 'px ', _this.color(), ',', -_this.lat(), 'px ', _this.offset(), 'px ', _this.color(), '}35%{width:', _this.props.size + _this.props.sizeUnit, ';box-shadow:0 ', -_this.offset(), 'px ', _this.color(), ',0 ', _this.offset(), 'px ', _this.color(), '}70%{width:', _this.thickness(), 'px;box-shadow:', -_this.lat(), 'px ', -_this.offset(), 'px ', _this.color(), ',', _this.lat(), 'px ', _this.offset(), 'px ', _this.color(), '}100%{box-shadow:', _this.lat(), 'px ', -_this.offset(), 'px ', _this.color(), ',', -_this.lat(), 'px ', _this.offset(), 'px ', _this.color(), '}');
}, _this.after = function () {
return (0, _emotion.keyframes)('0%{height:', _this.thickness(), 'px;box-shadow:', _this.offset(), 'px ', _this.lat(), 'px ', _this.color(), ',', -_this.offset(), 'px ', -_this.lat(), 'px ', _this.color(), '}35%{height:', _this.props.size + _this.props.sizeUnit, ';box-shadow:', _this.offset(), 'px 0 ', _this.color(), ',', -_this.offset(), 'px 0 ', _this.color(), '}70%{height:', _this.thickness(), 'px;box-shadow:', _this.offset(), 'px ', -_this.lat(), 'px ', _this.color(), ',', -_this.offset(), 'px ', _this.lat(), 'px ', _this.color(), '}100%{box-shadow:', _this.offset(), 'px ', _this.lat(), 'px ', _this.color(), ',', -_this.offset(), 'px ', -_this.lat(), 'px ', _this.color(), '}');
}, _this.style = function (i) {
return (0, _emotion.css)('{position:absolute;content:\'\';top:50%;left:50%;display:block;width:', _this.props.size / 5 + _this.props.sizeUnit, ';height:', _this.props.size / 5 + _this.props.sizeUnit, ';border-radius:', _this.props.size / 10 + _this.props.sizeUnit, ';transform:translate(-50%,-50%);animation-fill-mode:none;animation:', i === 1 ? _this.before() : _this.after(), ' 2s infinite;}');
}, _this.wrapper = function () {
return (0, _emotion.css)('{position:relative;width:', _this.props.size + _this.props.sizeUnit, ';height:', _this.props.size + _this.props.sizeUnit, ';transform:rotate(165deg);}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.style(1) }),
_react2.default.createElement('div', { className: this.style(2) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
size: _propTypes2.default.number,
color: _propTypes2.default.string,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
size: 50,
color: '#000000',
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 364 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 sync = (0, _emotion.keyframes)('33%{transform:translateY(10px)}66%{transform:translateY(-10px)}100%{transform:translateY(0)}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (0, _emotion.css)('{background-color:', _this.props.color, ';width:', _this.props.size.toString() + _this.props.sizeUnit, ';height:', _this.props.size.toString() + _this.props.sizeUnit, ';margin:', _this.props.margin, ';border-radius:100%;display:inline-block;animation:', sync, ' 0.6s ', i * 0.07, 's infinite ease-in-out;animation-fill-mode:both;}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
null,
_react2.default.createElement('div', { className: this.style(1) }),
_react2.default.createElement('div', { className: this.style(2) }),
_react2.default.createElement('div', { className: this.style(3) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
margin: _propTypes2.default.string,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 15,
margin: '2px',
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'margin', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 365 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 fade = (0, _emotion.keyframes)('50%{opacity:0.3}100%{opacity:1}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (0, _emotion.css)('{position:absolute;width:', _this.props.width.toString() + _this.props.widthUnit, ';height:', _this.props.height.toString() + _this.props.heightUnit, ';margin:', _this.props.margin, ';background-color:', _this.props.color, ';border-radius:', _this.props.radius.toString() + _this.props.radiusUnit, ';transition:2s;animation-fill-mode:\'both\';animation:', fade, ' 1.2s ', i * 0.12, 's infinite ease-in-out;}');
}, _this.radius = 20, _this.quarter = _this.radius / 2 + _this.radius / 5.5, _this.wrapper = function () {
return (0, _emotion.css)('{position:relative;font-size:0;top:', _this.radius, 'px;left:', _this.radius, 'px;width:', _this.radius * 3, 'px;height:', _this.radius * 3, 'px;}');
}, _this.a = function () {
return (0, _emotion.css)(_this.style(1), ';top:', _this.radius, 'px;left:0;');
}, _this.b = function () {
return (0, _emotion.css)(_this.style(2), ';top:', _this.quarter, 'px;left:', _this.quarter, 'px;transform:rotate(-45deg);');
}, _this.c = function () {
return (0, _emotion.css)(_this.style(3), ';top:0;left:', _this.radius, 'px;transform:rotate(90deg);');
}, _this.d = function () {
return (0, _emotion.css)(_this.style(4), ';top:', -_this.quarter, 'px;left:', _this.quarter, 'px;transform:rotate(45deg);');
}, _this.e = function () {
return (0, _emotion.css)(_this.style(5), ';top:', -_this.radius, 'px;left:0;');
}, _this.f = function () {
return (0, _emotion.css)(_this.style(6), ';top:', -_this.quarter, 'px;left:', -_this.quarter, 'px;transform:rotate(-45deg);');
}, _this.g = function () {
return (0, _emotion.css)(_this.style(7), ';top:0;left:', -_this.radius, 'px;transform:rotate(90deg);');
}, _this.h = function () {
return (0, _emotion.css)(_this.style(8), ';top:', _this.quarter, 'px;left:', -_this.quarter, 'px;transform:rotate(45deg);');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.a() }),
_react2.default.createElement('div', { className: this.b() }),
_react2.default.createElement('div', { className: this.c() }),
_react2.default.createElement('div', { className: this.d() }),
_react2.default.createElement('div', { className: this.e() }),
_react2.default.createElement('div', { className: this.f() }),
_react2.default.createElement('div', { className: this.g() }),
_react2.default.createElement('div', { className: this.h() })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
height: _propTypes2.default.number,
width: _propTypes2.default.number,
margin: _propTypes2.default.string,
radius: _propTypes2.default.number,
heightUnit: _propTypes2.default.string,
widthUnit: _propTypes2.default.string,
radiusUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
height: 15,
width: 5,
margin: '2px',
radius: 2,
widthUnit: 'px',
heightUnit: 'px',
radiusUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'height', 'width', 'margin', 'radius', 'widthUnit', 'heightUnit', 'radiusUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 366 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 rotate = (0, _emotion.keyframes)('100%{transform:rotate(360deg)}');
var bounce = (0, _emotion.keyframes)('0%,100%{transform:scale(0)}50%{transform:scale(1.0)}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (0, _emotion.css)('{position:absolute;top:', i % 2 ? '0' : 'auto', ';bottom:', i % 2 ? 'auto' : '0', ';height:', (_this.props.size / 2).toString() + _this.props.sizeUnit, ';width:', (_this.props.size / 2).toString() + _this.props.sizeUnit, ';background-color:', _this.props.color, ';border-radius:100%;animation-fill-mode:forwards;animation:', bounce, ' 2s ', i === 2 ? '-1s' : '0s', ' infinite linear;}');
}, _this.wrapper = function () {
return (0, _emotion.css)('{position:relative;width:', _this.props.size + _this.props.sizeUnit, ';height:', _this.props.size + _this.props.sizeUnit, ';animation-fill-mode:forwards;animation:', rotate, ' 2s 0s infinite linear;}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.style(1) }),
_react2.default.createElement('div', { className: this.style(2) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 60,
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 367 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 climbingBox = (0, _emotion.keyframes)('0%{transform:translate(0,-1em) rotate(-45deg)}5%{transform:translate(0,-1em) rotate(-50deg)}20%{transform:translate(1em,-2em) rotate(47deg)}25%{transform:translate(1em,-2em) rotate(45deg)}30%{transform:translate(1em,-2em) rotate(40deg)}45%{transform:translate(2em,-3em) rotate(137deg)}50%{transform:translate(2em,-3em) rotate(135deg)}55%{transform:translate(2em,-3em) rotate(130deg)}70%{transform:translate(3em,-4em) rotate(217deg)}75%{transform:translate(3em,-4em) rotate(220deg)}100%{transform:translate(0,-1em) rotate(-225deg)}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function () {
return (0, _emotion.css)('{position:absolute;left:0;bottom:-0.1em;height:1em;width:1em;background-color:transparent;border-radius:15%;border:0.25em solid ', _this.props.color, ';transform:translate(0,-1em) rotate(-45deg);animation-fill-mode:both;animation:', climbingBox, ' 2.5s infinite cubic-bezier(.79,0,.47,.97);}');
}, _this.wrapper = function () {
return (0, _emotion.css)('{position:absolute;top:50%;left:50%;margin-top:-2.7em;margin-left:-2.7em;width:5.4em;height:5.4em;font-size:', _this.props.size + _this.props.sizeUnit, ';}');
}, _this.hill = function () {
return (0, _emotion.css)('{position:absolute;width:7.1em;height:7.1em;top:1.7em;left:1.7em;border-left:0.25em solid ', _this.props.color, ';transform:rotate(45deg);}');
}, _this.container = (0, _emotion.css)('{position:relative;width:7.1em;height:7.1em;}'), _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.container },
_react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.style() }),
_react2.default.createElement('div', { className: this.hill() })
)
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 15,
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 368 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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;
}
// This returns an animation
var clip = (0, _emotion.keyframes)('0%{transform:rotate(0deg) scale(1)}50%{transform:rotate(180deg) scale(0.8)}100%{transform:rotate(360deg) scale(1)}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function () {
return (0, _emotion.css)('{background:transparent !important;width:', _this.props.size + _this.props.sizeUnit, ';height:', _this.props.size + _this.props.sizeUnit, ';border-radius:100%;border:2px solid;border-color:', _this.props.color, ';border-bottom-color:transparent;display:inline-block;animation:', clip, ' 0.75s 0s infinite linear;animation-fill-mode:both;}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement('div', { className: this.style() }) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 35,
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 369 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 circle = (0, _emotion.keyframes)('0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}100%{transform:rotate(360deg)}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (0, _emotion.css)('{position:absolute;height:', (_this.props.size * (1 - i / 10)).toString() + _this.props.sizeUnit, ';width:', (_this.props.size * (1 - i / 10)).toString() + _this.props.sizeUnit, ';border:1px solid ', _this.props.color, ';border-radius:100%;transition:2s;border-bottom:none;border-right:none;top:', i * 0.7 * 2.5, '%;left:', i * 0.35 * 2.5, '%;animation-fill-mode:\'\';animation:', circle, ' 1s ', i * 0.2, 's infinite linear;}');
}, _this.wrapper = function () {
return (0, _emotion.css)('{position:relative;width:', _this.props.size.toString() + _this.props.sizeUnit, ';height:', _this.props.size.toString() + _this.props.sizeUnit, ';}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.style(0) }),
_react2.default.createElement('div', { className: this.style(1) }),
_react2.default.createElement('div', { className: this.style(2) }),
_react2.default.createElement('div', { className: this.style(3) }),
_react2.default.createElement('div', { className: this.style(4) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 50,
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 370 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 bounce = (0, _emotion.keyframes)('0%,100%{transform:scale(0)}50%{transform:scale(1.0)}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (0, _emotion.css)('{position:absolute;width:', _this.props.size + _this.props.sizeUnit, ';height:', _this.props.size + _this.props.sizeUnit, ';background-color:', _this.props.color, ';border-radius:100%;opacity:0.6;top:0;left:0;animation-fill-mode:both;animation:', bounce, ' 2.1s ', i === 1 ? '1s' : '0s', ' infinite ease-in-out;}');
}, _this.wrapper = function () {
return (0, _emotion.css)('{position:relative;width:', _this.props.size + _this.props.sizeUnit, ';height:', _this.props.size + _this.props.sizeUnit, ';}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.style(1) }),
_react2.default.createElement('div', { className: this.style(2) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
sizeUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 60,
sizeUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 371 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 beat = (0, _emotion.keyframes)('50%{transform:scale(0.75);opacity:0.2}100%{transform:scale(1);opacity:1}');
var Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (0, _emotion.css)('{display:inline-block;background-color:', _this.props.color, ';width:', _this.props.size + _this.props.sizeUnit, ';height:', _this.props.size + _this.props.sizeUnit, ';margin:', _this.props.margin, ';border-radius:100%;animation:', beat, ' 0.7s ', i % 2 ? '0s' : '0.35s', ' infinite linear;animation-fill-mode:both;}');
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
null,
_react2.default.createElement('div', { className: this.style(1) }),
_react2.default.createElement('div', { className: this.style(2) }),
_react2.default.createElement('div', { className: this.style(3) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
size: _propTypes2.default.number,
sizeUnit: _propTypes2.default.string,
margin: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
size: 15,
sizeUnit: 'px',
margin: '2px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'size', 'margin', 'sizeUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 372 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(2), __webpack_require__(23), __webpack_require__(22), __webpack_require__(202)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (exports, _react, _propTypes, _emotion, _recompose, _helpers) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Loader = undefined;
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 long = (0, _emotion.keyframes)('0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}');
var short = (0, _emotion.keyframes)('0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}');
var Loader = exports.Loader = function (_React$Component) {
_inherits(Loader, _React$Component);
function Loader() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Loader);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Loader.__proto__ || Object.getPrototypeOf(Loader)).call.apply(_ref, [this].concat(args))), _this), _this.style = function (i) {
return (/*#__PURE__*/(0, _emotion.css)('{position:absolute;height:', _this.props.height + _this.props.heightUnit, ';overflow:hidden;background-color:', _this.props.color, ';background-clip:padding-box;display:block;border-radius:2px;will-change:left,right;animation-fill-mode:forwards;animation:', i === 1 ? long : short, ' 2.1s ', i === 2 ? '1.15s' : '', ' ', i === 1 ? 'cubic-bezier(0.65, 0.815, 0.735, 0.395)' : 'cubic-bezier(0.165, 0.84, 0.44, 1)', ' infinite;}')
);
}, _this.wrapper = function () {
return (/*#__PURE__*/(0, _emotion.css)('{position:relative;width:', _this.props.width + _this.props.widthUnit, ';height:', _this.props.height + _this.props.heightUnit, ';overflow:hidden;background-color:', (0, _helpers.calculateRgba)(_this.props.color, 0.2), ';background-clip:padding-box;}')
);
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Loader, [{
key: 'render',
value: function render() {
return this.props.loading ? _react2.default.createElement(
'div',
{ className: this.wrapper() },
_react2.default.createElement('div', { className: this.style(1) }),
_react2.default.createElement('div', { className: this.style(2) })
) : null;
}
}]);
return Loader;
}(_react2.default.Component);
Loader.propTypes = {
loading: _propTypes2.default.bool,
color: _propTypes2.default.string,
width: _propTypes2.default.number,
widthUnit: _propTypes2.default.string,
height: _propTypes2.default.number,
heightUnit: _propTypes2.default.string
};
Loader.defaultProps = {
loading: true,
color: '#000000',
width: 100,
widthUnit: 'px',
height: 4,
heightUnit: 'px'
};
var Component = (0, _recompose.onlyUpdateForKeys)(['loading', 'color', 'width', 'height', 'heightUnit', 'widthUnit'])(Loader);
Component.defaultProps = Loader.defaultProps;
exports.default = Component;
});
/***/ }),
/* 373 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, __webpack_require__(372), __webpack_require__(371), __webpack_require__(370), __webpack_require__(369), __webpack_require__(368), __webpack_require__(367), __webpack_require__(366), __webpack_require__(365), __webpack_require__(354), __webpack_require__(363), __webpack_require__(362), __webpack_require__(361), __webpack_require__(360), __webpack_require__(359), __webpack_require__(358), __webpack_require__(357), __webpack_require__(356), __webpack_require__(355), __webpack_require__(364)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (module, _BarLoader, _BeatLoader, _BounceLoader, _CircleLoader, _ClipLoader, _ClimbingBoxLoader, _DotLoader, _FadeLoader, _GridLoader, _HashLoader, _MoonLoader, _PacmanLoader, _PropagateLoader, _PulseLoader, _RingLoader, _RiseLoader, _RotateLoader, _ScaleLoader, _SyncLoader) {
'use strict';
var _BarLoader2 = _interopRequireDefault(_BarLoader);
var _BeatLoader2 = _interopRequireDefault(_BeatLoader);
var _BounceLoader2 = _interopRequireDefault(_BounceLoader);
var _CircleLoader2 = _interopRequireDefault(_CircleLoader);
var _ClipLoader2 = _interopRequireDefault(_ClipLoader);
var _ClimbingBoxLoader2 = _interopRequireDefault(_ClimbingBoxLoader);
var _DotLoader2 = _interopRequireDefault(_DotLoader);
var _FadeLoader2 = _interopRequireDefault(_FadeLoader);
var _GridLoader2 = _interopRequireDefault(_GridLoader);
var _HashLoader2 = _interopRequireDefault(_HashLoader);
var _MoonLoader2 = _interopRequireDefault(_MoonLoader);
var _PacmanLoader2 = _interopRequireDefault(_PacmanLoader);
var _PropagateLoader2 = _interopRequireDefault(_PropagateLoader);
var _PulseLoader2 = _interopRequireDefault(_PulseLoader);
var _RingLoader2 = _interopRequireDefault(_RingLoader);
var _RiseLoader2 = _interopRequireDefault(_RiseLoader);
var _RotateLoader2 = _interopRequireDefault(_RotateLoader);
var _ScaleLoader2 = _interopRequireDefault(_ScaleLoader);
var _SyncLoader2 = _interopRequireDefault(_SyncLoader);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
module.exports = {
BarLoader: _BarLoader2.default,
BeatLoader: _BeatLoader2.default,
BounceLoader: _BounceLoader2.default,
CircleLoader: _CircleLoader2.default,
ClipLoader: _ClipLoader2.default,
ClimbingBoxLoader: _ClimbingBoxLoader2.default,
DotLoader: _DotLoader2.default,
FadeLoader: _FadeLoader2.default,
GridLoader: _GridLoader2.default,
HashLoader: _HashLoader2.default,
MoonLoader: _MoonLoader2.default,
PacmanLoader: _PacmanLoader2.default,
PropagateLoader: _PropagateLoader2.default,
PulseLoader: _PulseLoader2.default,
RingLoader: _RingLoader2.default,
RiseLoader: _RiseLoader2.default,
RotateLoader: _RotateLoader2.default,
ScaleLoader: _ScaleLoader2.default,
SyncLoader: _SyncLoader2.default
};
});
/***/ }),
/* 374 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _ApiUtils = __webpack_require__(29);
var ApiUtils = _interopRequireWildcard(_ApiUtils);
var _AbstractStringBasedDataValueEditor = __webpack_require__(100);
var _AbstractStringBasedDataValueEditor2 = _interopRequireDefault(_AbstractStringBasedDataValueEditor);
var _reactAutosuggest = __webpack_require__(101);
var _reactAutosuggest2 = _interopRequireDefault(_reactAutosuggest);
var _MediawikiPreview = __webpack_require__(203);
var _MediawikiPreview2 = _interopRequireDefault(_MediawikiPreview);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _CommonsMediaDataValueEditor = __webpack_require__(353);
var _CommonsMediaDataValueEditor2 = _interopRequireDefault(_CommonsMediaDataValueEditor);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var CommonsMediaDataValueEditor = function (_AbstractStringBasedD) {
(0, _inherits3.default)(CommonsMediaDataValueEditor, _AbstractStringBasedD);
function CommonsMediaDataValueEditor() {
(0, _classCallCheck3.default)(this, CommonsMediaDataValueEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (CommonsMediaDataValueEditor.__proto__ || Object.getPrototypeOf(CommonsMediaDataValueEditor)).apply(this, arguments));
_this.commonsApi = ApiUtils.getCommonsApi();
_this.state = {
suggestions: []
};
_this.handleChange = _this.handleChange.bind(_this);
_this.handleSuggestionsClearRequested = _this.handleSuggestionsClearRequested.bind(_this);
_this.handleSuggestionsFetchRequested = _this.handleSuggestionsFetchRequested.bind(_this);
return _this;
}
(0, _createClass3.default)(CommonsMediaDataValueEditor, [{
key: 'handleSuggestionsClearRequested',
value: function handleSuggestionsClearRequested() {
this.setState({ suggestions: [] });
}
}, {
key: 'handleSuggestionsFetchRequested',
value: function handleSuggestionsFetchRequested(_ref) {
var _this2 = this;
var value = _ref.value;
this.commonsApi.post({
action: 'query',
list: 'prefixsearch',
psnamespace: '6',
pslimit: '10',
pssearch: value,
format: 'json'
}).then(function (result) {
var suggestions = result.query.prefixsearch.map(function (p) {
return p.title.substring('File:'.length);
});
_this2.setState({ suggestions: suggestions });
});
}
}, {
key: 'getSuggestionValue',
value: function getSuggestionValue(data) {
return data ? data : '';
}
}, {
key: 'handleChange',
value: function handleChange(event, _ref2) {
var newValue = _ref2.newValue;
this.handleValueChange(newValue);
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
datavalue = _props.datavalue,
propertyDescription = _props.propertyDescription,
readOnly = _props.readOnly;
var className = _CommonsMediaDataValueEditor2.default['wef_datavalue_' + CommonsMediaDataValueEditor.DATATYPE];
if (readOnly) {
if (datavalue && datavalue.value) {
return _react2.default.createElement(
'td',
{ className: className, colSpan: 12 },
_react2.default.createElement(
'a',
{
href: 'https://commons.wikimedia.org/wiki/File:' + datavalue.value,
rel: 'noopener noreferrer',
target: '_blank' },
datavalue.value
)
);
} else {
return null;
}
}
var params = {
type: 'text'
};
if (propertyDescription.regexp) {
params.pattern = propertyDescription.regexp;
}
params.value = datavalue ? datavalue.value : '';
params.onChange = this.handleChange;
return _react2.default.createElement(
'td',
{ className: className, colSpan: 12 },
_react2.default.createElement(_reactAutosuggest2.default, {
getSuggestionValue: this.getSuggestionValue,
inputProps: params,
onSuggestionsClearRequested: this.handleSuggestionsClearRequested,
onSuggestionsFetchRequested: this.handleSuggestionsFetchRequested,
renderSuggestion: this.renderSuggestion,
suggestions: this.state.suggestions,
theme: _CommonsMediaDataValueEditor2.default })
);
}
}, {
key: 'renderSuggestion',
value: function renderSuggestion(data) {
return _react2.default.createElement(
'div',
{ className: _CommonsMediaDataValueEditor2.default.suggestionContent },
_react2.default.createElement(
'div',
{ className: _CommonsMediaDataValueEditor2.default.suggestionContentPreviewOuter },
_react2.default.createElement(
'div',
{ className: _CommonsMediaDataValueEditor2.default.suggestionContentPreviewInner },
_react2.default.createElement(_MediawikiPreview2.default, { spinnerSize: 45, wikitext: '[[File:' + data + '|50x50px]]' })
)
),
_react2.default.createElement(
'span',
{ className: _CommonsMediaDataValueEditor2.default.suggestionContentText },
'\xA0\xA0',
data
)
);
}
}]);
return CommonsMediaDataValueEditor;
}(_AbstractStringBasedDataValueEditor2.default);
CommonsMediaDataValueEditor.DATATYPE = 'commonsMedia';
CommonsMediaDataValueEditor.propTypes = _AbstractStringBasedDataValueEditor2.default.propTypes;
exports.default = CommonsMediaDataValueEditor;
/***/ }),
/* 375 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".NewQualifierSelect__alreadypresent___2XJVJ {\r\n color: gray;\r\n}\r\n\r\n.NewQualifierSelect__unsupported___1WbEt {\r\n color: darkgray;\r\n}\r\n", ""]);
// exports
exports.locals = {
"alreadypresent": "NewQualifierSelect__alreadypresent___2XJVJ",
"unsupported": "NewQualifierSelect__unsupported___1WbEt"
};
/***/ }),
/* 376 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(375);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 377 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _CacheValuesProvider = __webpack_require__(136);
var _CacheValuesProvider2 = _interopRequireDefault(_CacheValuesProvider);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _stringPropertyValuesCache = __webpack_require__(212);
var _stringPropertyValuesCache2 = _interopRequireDefault(_stringPropertyValuesCache);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var StringPropertyValuesProvider = function (_PureComponent) {
(0, _inherits3.default)(StringPropertyValuesProvider, _PureComponent);
function StringPropertyValuesProvider() {
(0, _classCallCheck3.default)(this, StringPropertyValuesProvider);
return (0, _possibleConstructorReturn3.default)(this, (StringPropertyValuesProvider.__proto__ || Object.getPrototypeOf(StringPropertyValuesProvider)).apply(this, arguments));
}
(0, _createClass3.default)(StringPropertyValuesProvider, [{
key: 'render',
value: function render() {
var _props = this.props,
children = _props.children,
entityIds = _props.entityIds;
return _react2.default.createElement(
_CacheValuesProvider2.default,
{
cache: _stringPropertyValuesCache2.default,
cacheKeys: entityIds },
children
);
}
}]);
return StringPropertyValuesProvider;
}(_react.PureComponent);
StringPropertyValuesProvider.propTypes = {
children: _propTypes2.default.func.isRequired,
entityIds: _propTypes2.default.arrayOf(_propTypes2.default.string).isRequired
};
exports.default = StringPropertyValuesProvider;
/***/ }),
/* 378 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _i18n = __webpack_require__(87);
var _i18n2 = _interopRequireDefault(_i18n);
var _PropertyDescriptionsProvider = __webpack_require__(86);
var _PropertyDescriptionsProvider2 = _interopRequireDefault(_PropertyDescriptionsProvider);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _NewQualifierSelect = __webpack_require__(376);
var _NewQualifierSelect2 = _interopRequireDefault(_NewQualifierSelect);
var _SnakValueEditorFactory = __webpack_require__(135);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function sort(cache, propertyIds) {
var result = [].concat((0, _toConsumableArray3.default)(propertyIds));
return result.sort(function (a, b) {
var labelA = (cache[a] || {}).label || a;
var labelB = (cache[b] || {}).label || b;
if (labelA < labelB) return -1;
if (labelA > labelB) return +1;
return 0;
});
}
var NewQualifierSelect = function (_PureComponent) {
(0, _inherits3.default)(NewQualifierSelect, _PureComponent);
function NewQualifierSelect() {
(0, _classCallCheck3.default)(this, NewQualifierSelect);
var _this = (0, _possibleConstructorReturn3.default)(this, (NewQualifierSelect.__proto__ || Object.getPrototypeOf(NewQualifierSelect)).apply(this, arguments));
_this.handleChange = _this.handleChange.bind(_this);
return _this;
}
(0, _createClass3.default)(NewQualifierSelect, [{
key: 'handleChange',
value: function handleChange(event) {
var propertyId = event.target.value;
if (propertyId) {
this.props.onSelect(propertyId);
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
allowedQualifiers = _props.allowedQualifiers,
alreadyPresent = _props.alreadyPresent;
return _react2.default.createElement(
'select',
{ defaultValue: '_placeholder', onChange: this.handleChange },
_react2.default.createElement(
'option',
{ disabled: true, hidden: true, key: '_placeholder', value: '_placeholder' },
_i18n2.default.placehoderSelect
),
_react2.default.createElement(
_PropertyDescriptionsProvider2.default,
{ propertyIds: allowedQualifiers },
function (cache) {
return sort(cache, allowedQualifiers).map(function (propertyId) {
var propertyDescription = cache[propertyId];
if (!propertyDescription || !propertyDescription.label) {
return _react2.default.createElement(
'option',
{ key: propertyId, value: propertyId },
propertyId
);
}
return _react2.default.createElement(NewQualifierSelectOption, {
alreadyPresent: alreadyPresent.indexOf(propertyId) !== -1,
description: propertyDescription.description,
key: propertyId,
label: propertyDescription.label,
propertyId: propertyId,
unsupported: _SnakValueEditorFactory.SUPPORTED_DATATYPES.indexOf(propertyDescription.datatype) === -1 });
});
}
),
_react2.default.createElement(
'option',
{ key: 'OTHER', value: 'OTHER' },
_i18n2.default.optionOther
)
);
}
}]);
return NewQualifierSelect;
}(_react.PureComponent);
NewQualifierSelect.propTypes = {
allowedQualifiers: _propTypes2.default.arrayOf(_propTypes2.default.string).isRequired,
alreadyPresent: _propTypes2.default.arrayOf(_propTypes2.default.string).isRequired,
onSelect: _propTypes2.default.func.isRequired
};
exports.default = NewQualifierSelect;
var NewQualifierSelectOption = function (_PureComponent2) {
(0, _inherits3.default)(NewQualifierSelectOption, _PureComponent2);
function NewQualifierSelectOption() {
(0, _classCallCheck3.default)(this, NewQualifierSelectOption);
return (0, _possibleConstructorReturn3.default)(this, (NewQualifierSelectOption.__proto__ || Object.getPrototypeOf(NewQualifierSelectOption)).apply(this, arguments));
}
(0, _createClass3.default)(NewQualifierSelectOption, [{
key: 'render',
value: function render() {
var _props2 = this.props,
alreadyPresent = _props2.alreadyPresent,
unsupported = _props2.unsupported,
propertyId = _props2.propertyId,
description = _props2.description,
label = _props2.label;
var classNames = [];
if (alreadyPresent) classNames.push(_NewQualifierSelect2.default.alreadypresent);
if (unsupported) classNames.push(_NewQualifierSelect2.default.unsupported);
var actualLabel = (label ? label + ' (' + propertyId + ')' : propertyId) + (unsupported ? _i18n2.default.optionSuffixUnsupported : '');
return _react2.default.createElement(
'option',
{
className: classNames.join(' '),
title: description,
value: propertyId },
actualLabel
);
}
}]);
return NewQualifierSelectOption;
}(_react.PureComponent);
NewQualifierSelectOption.propTypes = {
alreadyPresent: _propTypes2.default.bool.isRequired,
unsupported: _propTypes2.default.bool.isRequired,
propertyId: _propTypes2.default.string.isRequired,
description: _propTypes2.default.string,
label: _propTypes2.default.string
};
/***/ }),
/* 379 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".NewQualifierAutosuggest__container___1ifLd {\r\n position: relative;\r\n min-width: 21em;\r\n}\r\n\r\n.NewQualifierAutosuggest__container___1ifLd input {\r\n width: 100%;\r\n}\r\n\r\n.NewQualifierAutosuggest__suggestionsContainer___1lHXc {\r\n display: none;\r\n}\r\n\r\n.NewQualifierAutosuggest__containerOpen___J5cuj .NewQualifierAutosuggest__suggestionsContainer___1lHXc {\r\n display: block;\r\n position: absolute;\r\n width: 300px;\r\n border: 1px solid #aaa;\r\n background-color: #fff;\r\n font-family: Helvetica, sans-serif;\r\n font-weight: 300;\r\n border-bottom-left-radius: 4px;\r\n border-bottom-right-radius: 4px;\r\n z-index: 2;\r\n}\r\n\r\n.NewQualifierAutosuggest__suggestionsList___Brg5h {\r\n margin: 0;\r\n padding: 0;\r\n list-style-image: none;\r\n list-style-type: none;\r\n}\r\n\r\n.NewQualifierAutosuggest__suggestion___VSqUn:not(:first-child) {\r\n border-top: 1px solid #ddd;\r\n}\r\n\r\n.NewQualifierAutosuggest__suggestionHighlighted___1LXeO {\r\n background-color: #0C7EAF;\r\n color: #fff;\r\n}\r\n\r\n.NewQualifierAutosuggest__property_suggestion___RmEBW {\r\n cursor: pointer;\r\n max-width: 23em;\r\n overflow: hidden;\r\n padding: .25em;\r\n text-align: left;\r\n text-overflow: ellipsis;\r\n vertical-align: middle;\r\n width: 23em;\r\n white-space: nowrap;\r\n}\r\n\r\n.NewQualifierAutosuggest__property_suggestion_label___KhN7p {\r\n font-weight: bold;\r\n}\r\n\r\n.NewQualifierAutosuggest__property_suggestion_description___3sUDA {\r\n}\r\n", ""]);
// exports
exports.locals = {
"container": "NewQualifierAutosuggest__container___1ifLd",
"suggestionsContainer": "NewQualifierAutosuggest__suggestionsContainer___1lHXc",
"containerOpen": "NewQualifierAutosuggest__containerOpen___J5cuj",
"suggestionsList": "NewQualifierAutosuggest__suggestionsList___Brg5h",
"suggestion": "NewQualifierAutosuggest__suggestion___VSqUn",
"suggestionHighlighted": "NewQualifierAutosuggest__suggestionHighlighted___1LXeO",
"property_suggestion": "NewQualifierAutosuggest__property_suggestion___RmEBW",
"property_suggestion_label": "NewQualifierAutosuggest__property_suggestion_label___KhN7p",
"property_suggestion_description": "NewQualifierAutosuggest__property_suggestion_description___3sUDA"
};
/***/ }),
/* 380 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _EntityDescription = __webpack_require__(137);
var _EntityDescription2 = _interopRequireDefault(_EntityDescription);
var _EntityLabel = __webpack_require__(54);
var _EntityLabel2 = _interopRequireDefault(_EntityLabel);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _NewQualifierAutosuggest = __webpack_require__(204);
var _NewQualifierAutosuggest2 = _interopRequireDefault(_NewQualifierAutosuggest);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var PropertySuggestion = function (_PureComponent) {
(0, _inherits3.default)(PropertySuggestion, _PureComponent);
function PropertySuggestion() {
(0, _classCallCheck3.default)(this, PropertySuggestion);
return (0, _possibleConstructorReturn3.default)(this, (PropertySuggestion.__proto__ || Object.getPrototypeOf(PropertySuggestion)).apply(this, arguments));
}
(0, _createClass3.default)(PropertySuggestion, [{
key: 'render',
value: function render() {
var propertyId = this.props.propertyId;
return _react2.default.createElement(
'div',
{ className: _NewQualifierAutosuggest2.default.property_suggestion },
_react2.default.createElement(
'span',
{ className: _NewQualifierAutosuggest2.default.property_suggestion_label },
'\xA0\xA0',
_react2.default.createElement(_EntityLabel2.default, { entityId: propertyId })
),
_react2.default.createElement('br', null),
_react2.default.createElement(
'span',
{ className: _NewQualifierAutosuggest2.default.property_suggestion_description },
'\xA0\xA0',
_react2.default.createElement(_EntityDescription2.default, { entityId: propertyId })
)
);
}
}]);
return PropertySuggestion;
}(_react.PureComponent);
PropertySuggestion.propTypes = {
propertyId: _propTypes2.default.string.isRequired
};
exports.default = PropertySuggestion;
/***/ }),
/* 381 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _ApiUtils = __webpack_require__(29);
var ApiUtils = _interopRequireWildcard(_ApiUtils);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactAutosuggest = __webpack_require__(101);
var _reactAutosuggest2 = _interopRequireDefault(_reactAutosuggest);
var _I18nUtils = __webpack_require__(17);
var _i18n = __webpack_require__(87);
var _i18n2 = _interopRequireDefault(_i18n);
var _PropertySuggestion = __webpack_require__(380);
var _PropertySuggestion2 = _interopRequireDefault(_PropertySuggestion);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _NewQualifierAutosuggest = __webpack_require__(204);
var _NewQualifierAutosuggest2 = _interopRequireDefault(_NewQualifierAutosuggest);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var NUMBER_OF_SUGGESTIONS_PER_LANGUAGE = 5;
var NewQualifierAutosuggest = function (_PureComponent) {
(0, _inherits3.default)(NewQualifierAutosuggest, _PureComponent);
function NewQualifierAutosuggest() {
(0, _classCallCheck3.default)(this, NewQualifierAutosuggest);
var _this = (0, _possibleConstructorReturn3.default)(this, (NewQualifierAutosuggest.__proto__ || Object.getPrototypeOf(NewQualifierAutosuggest)).apply(this, arguments));
_this.wikidataApi = ApiUtils.getWikidataApi();
_this.state = {
suggestions: [],
textValue: ''
};
_this.handleChange = _this.handleChange.bind(_this);
_this.handleSuggestionsClearRequested = _this.handleSuggestionsClearRequested.bind(_this);
_this.handleSuggestionsFetchRequested = _this.handleSuggestionsFetchRequested.bind(_this);
_this.renderSuggestion = _this.renderSuggestion.bind(_this);
return _this;
}
(0, _createClass3.default)(NewQualifierAutosuggest, [{
key: 'handleChange',
value: function handleChange(event, _ref) {
var method = _ref.method,
newValue = _ref.newValue;
switch (method) {
case 'enter':
case 'click':
{
this.props.onSelect(newValue);
break;
}
default:
// typed or up/down
this.setState({
textValue: newValue
});
}
}
}, {
key: 'handleSuggestionsClearRequested',
value: function handleSuggestionsClearRequested() {
this.setState({ suggestions: [] });
}
}, {
key: 'handleSuggestionsFetchRequested',
value: function handleSuggestionsFetchRequested(_ref2) {
var _this2 = this;
var value = _ref2.value;
var resultSet = new Set();
_I18nUtils.DEFAULT_LANGUAGES.forEach(function (language) {
_this2.wikidataApi.get({
action: 'wbsearchentities',
language: language,
limit: NUMBER_OF_SUGGESTIONS_PER_LANGUAGE,
search: value,
type: 'property'
}).then(function (result) {
result.search.forEach(function (item) {
return resultSet.add(item.id);
});
_this2.setState({
suggestions: [].concat((0, _toConsumableArray3.default)(resultSet))
});
});
});
}
}, {
key: 'getSuggestionValue',
value: function getSuggestionValue(data) {
return data ? data : '';
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(_reactAutosuggest2.default, {
getSuggestionValue: this.getSuggestionValue,
inputProps: {
type: 'text',
onChange: this.handleChange,
placeholder: _i18n2.default.placehoderAutosuggest,
value: this.state.textValue
},
onSuggestionsClearRequested: this.handleSuggestionsClearRequested,
onSuggestionsFetchRequested: this.handleSuggestionsFetchRequested,
renderSuggestion: this.renderSuggestion,
suggestions: this.state.suggestions,
theme: _NewQualifierAutosuggest2.default });
}
}, {
key: 'renderSuggestion',
value: function renderSuggestion(propertyId) {
return _react2.default.createElement(_PropertySuggestion2.default, { propertyId: propertyId });
}
}]);
return NewQualifierAutosuggest;
}(_react.PureComponent);
NewQualifierAutosuggest.propTypes = {
onSelect: _propTypes2.default.func.isRequired
};
exports.default = NewQualifierAutosuggest;
/***/ }),
/* 382 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".animations__animatedFateIn___3JVl2 {\r\n animation-duration: 0.7s;\r\n animation-fill-mode: forwards;\r\n animation-name: animations__fadeIn___dOV2R;\r\n}\r\n\r\n@keyframes animations__fadeIn___dOV2R {\r\n 0% {\r\n opacity: 0;\r\n }\r\n 100% {\r\n opacity: 1;\r\n }\r\n}\r\n", ""]);
// exports
exports.locals = {
"animatedFateIn": "animations__animatedFateIn___3JVl2",
"fadeIn": "animations__fadeIn___dOV2R"
};
/***/ }),
/* 383 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(382);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 384 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _AnimatedTr = __webpack_require__(89);
var _AnimatedTr2 = _interopRequireDefault(_AnimatedTr);
var _Shapes = __webpack_require__(18);
var _ClaimDeleteButtonCell = __webpack_require__(206);
var _ClaimDeleteButtonCell2 = _interopRequireDefault(_ClaimDeleteButtonCell);
var _ClaimQualifiersTable = __webpack_require__(205);
var _ClaimQualifiersTable2 = _interopRequireDefault(_ClaimQualifiersTable);
var _ClaimReferencesButtonCell = __webpack_require__(195);
var _ClaimReferencesButtonCell2 = _interopRequireDefault(_ClaimReferencesButtonCell);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _FlagCell = __webpack_require__(300);
var _FlagCell2 = _interopRequireDefault(_FlagCell);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _PropertyLabelCell = __webpack_require__(196);
var _PropertyLabelCell2 = _interopRequireDefault(_PropertyLabelCell);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _QualifierSelectButtonCell = __webpack_require__(193);
var _QualifierSelectButtonCell2 = _interopRequireDefault(_QualifierSelectButtonCell);
var _SelectRankButtonCell = __webpack_require__(192);
var _SelectRankButtonCell2 = _interopRequireDefault(_SelectRankButtonCell);
var _SnakEditorTableRowPart = __webpack_require__(129);
var _SnakEditorTableRowPart2 = _interopRequireDefault(_SnakEditorTableRowPart);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ClaimsTableRows = function (_PureComponent) {
(0, _inherits3.default)(ClaimsTableRows, _PureComponent);
function ClaimsTableRows() {
(0, _classCallCheck3.default)(this, ClaimsTableRows);
var _this = (0, _possibleConstructorReturn3.default)(this, (ClaimsTableRows.__proto__ || Object.getPrototypeOf(ClaimsTableRows)).apply(this, arguments));
_this.state = {
displayQualifierSelect: false
};
_this.claimQualifiersTable = _react2.default.createRef();
_this.handleClaimDelete = _this.handleClaimDelete.bind(_this);
_this.handleQualifierSelect = _this.handleQualifierSelect.bind(_this);
_this.handleRankChange = _this.handleRankChange.bind(_this);
_this.handleSnakChange = _this.handleSnakChange.bind(_this);
return _this;
}
(0, _createClass3.default)(ClaimsTableRows, [{
key: 'handleClaimDelete',
value: function handleClaimDelete() {
return this.props.onClaimDelete(this.props.claim);
}
}, {
key: 'handleQualifierSelect',
value: function handleQualifierSelect() {
if (this.claimQualifiersTable.current !== null) {
this.claimQualifiersTable.current.showQualifierSelect();
} else {
this.setState({ displayQualifierSelect: true });
}
}
}, {
key: 'handleRankChange',
value: function handleRankChange(rank) {
this.props.onClaimUpdate((0, _extends3.default)({}, this.props.claim, {
rank: rank
}));
}
}, {
key: 'handleSnakChange',
value: function handleSnakChange(snak) {
(0, _expect2.default)(snak).toBeAn('object');
(0, _expect2.default)(snak.property).toBeAn('string');
(0, _expect2.default)(snak.snaktype).toBeAn('string');
(0, _expect2.default)(snak.datatype).toBeAn('string');
this.props.onClaimUpdate((0, _extends3.default)({}, this.props.claim, {
mainsnak: snak
}));
}
}, {
key: 'render',
value: function render() {
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "on.*" }] */
var _props = this.props,
claim = _props.claim,
displayLabel = _props.displayLabel,
firstCell = _props.firstCell,
hasClaimDelete = _props.hasClaimDelete,
onClaimDelete = _props.onClaimDelete,
onClaimUpdate = _props.onClaimUpdate,
propertyDescription = _props.propertyDescription,
other = (0, _objectWithoutProperties3.default)(_props, ['claim', 'displayLabel', 'firstCell', 'hasClaimDelete', 'onClaimDelete', 'onClaimUpdate', 'propertyDescription']);
var displayQualifierSelect = this.state.displayQualifierSelect;
var flagImage = propertyDescription.countryFlags && propertyDescription.countryFlags.length > 0 ? propertyDescription.countryFlags[0] : null;
return _react2.default.createElement(
_react2.default.Fragment,
null,
_react2.default.createElement(
_AnimatedTr2.default,
other,
firstCell,
_react2.default.createElement(_SelectRankButtonCell2.default, { onChange: this.handleRankChange, value: claim.rank }),
_react2.default.createElement(_FlagCell2.default, { flagImage: flagImage }),
displayLabel ? _react2.default.createElement(_PropertyLabelCell2.default, { propertyDescription: propertyDescription }) : _react2.default.createElement('td', null),
_react2.default.createElement(_QualifierSelectButtonCell2.default, {
onClick: this.handleQualifierSelect }),
_react2.default.createElement(_SnakEditorTableRowPart2.default, {
onSnakChange: this.handleSnakChange,
propertyDescription: propertyDescription,
snak: claim.mainsnak }),
_react2.default.createElement(_ClaimReferencesButtonCell2.default, {
claim: claim,
onClaimUpdate: onClaimUpdate }),
_react2.default.createElement(_ClaimDeleteButtonCell2.default, {
disabled: !hasClaimDelete,
onClaimDelete: this.handleClaimDelete,
propertyId: propertyDescription.id,
propertyLabel: propertyDescription.label })
),
(displayQualifierSelect || claim.qualifiers) && _react2.default.createElement(
'tr',
null,
_react2.default.createElement('td', { colSpan: 2 }),
_react2.default.createElement(
'td',
{ colSpan: ClaimsTableRows.TABLE_COLUMNS - 2 },
_react2.default.createElement(_ClaimQualifiersTable2.default, {
allowedQualifiers: propertyDescription.allowedQualifiers,
claim: claim,
claimPropertyDescription: propertyDescription,
defaultAddQuailifier: displayQualifierSelect,
onClaimUpdate: onClaimUpdate,
ref: this.claimQualifiersTable })
)
)
);
}
}]);
return ClaimsTableRows;
}(_react.PureComponent);
ClaimsTableRows.TABLE_COLUMNS = 7 + _SnakEditorTableRowPart2.default.TABLE_COLUMNS;
ClaimsTableRows.propTypes = {
claim: _propTypes2.default.shape(_Shapes.Claim).isRequired,
displayLabel: _propTypes2.default.bool,
firstCell: _propTypes2.default.node.isRequired,
hasClaimDelete: _propTypes2.default.bool.isRequired,
onClaimDelete: _propTypes2.default.func.isRequired,
onClaimUpdate: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default).isRequired
};
ClaimsTableRows.defaultProps = {
displayLabel: true
};
exports.default = ClaimsTableRows;
/***/ }),
/* 385 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".ButtonCell__buttonCell___3q1UX {\r\n\tpadding: 0;\r\n\tmargin: 0;\r\n\twidth: 24px;\r\n\theight: 20px;\r\n}\r\n\r\n.ButtonCell__buttonCell___3q1UX td {\r\n\tvertical-align: middle;\r\n}\r\n\r\n.ButtonCell__buttonCell___3q1UX .ButtonCell__ui-button___1Y2fL {\r\n\tvertical-align: middle;\r\n}\r\n\r\n.ButtonCell__buttonCell___3q1UX .ui-button {\r\n\tmargin: 0 0.1em !important;\r\n\tbox-shadow: none;\r\n\twidth: 24px;\r\n\theight: 20px;\r\n}\r\n\r\n.ButtonCell__buttonCell___3q1UX .ui-button .ui-button-text {\r\n\tpadding: 0 0.5em !important;\r\n}\r\n", ""]);
// exports
exports.locals = {
"buttonCell": "ButtonCell__buttonCell___3q1UX",
"ui-button": "ButtonCell__ui-button___1Y2fL"
};
/***/ }),
/* 386 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(385);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 387 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _Shapes = __webpack_require__(18);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ClaimAddButtonCell = __webpack_require__(207);
var _ClaimAddButtonCell2 = _interopRequireDefault(_ClaimAddButtonCell);
var _ClaimsTableRows = __webpack_require__(384);
var _ClaimsTableRows2 = _interopRequireDefault(_ClaimsTableRows);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ClaimsTableBody = function (_PureComponent) {
(0, _inherits3.default)(ClaimsTableBody, _PureComponent);
function ClaimsTableBody() {
(0, _classCallCheck3.default)(this, ClaimsTableBody);
return (0, _possibleConstructorReturn3.default)(this, (ClaimsTableBody.__proto__ || Object.getPrototypeOf(ClaimsTableBody)).apply(this, arguments));
}
(0, _createClass3.default)(ClaimsTableBody, [{
key: 'render',
value: function render() {
var _props = this.props,
claims = _props.claims,
displayEmpty = _props.displayEmpty,
displayLabel = _props.displayLabel,
propertyDescription = _props.propertyDescription,
onClaimAdd = _props.onClaimAdd,
onClaimAddTwice = _props.onClaimAddTwice,
onClaimUpdate = _props.onClaimUpdate,
onClaimDelete = _props.onClaimDelete;
var children = void 0;
if (!claims || claims.length === 0) {
if (!displayEmpty) return null;
var newClaim = (0, _Shapes.newStatementClaim)(propertyDescription);
children = [_react2.default.createElement(_ClaimsTableRows2.default, {
claim: newClaim,
displayLabel: displayLabel,
firstCell: _react2.default.createElement(_ClaimAddButtonCell2.default, { onClick: onClaimAddTwice }),
hasClaimDelete: false,
key: newClaim.id,
onClaimDelete: onClaimDelete,
onClaimUpdate: onClaimUpdate,
propertyDescription: propertyDescription })];
} else {
children = claims.map(function (claim, i) {
return _react2.default.createElement(_ClaimsTableRows2.default, {
claim: claim,
displayLabel: displayLabel,
firstCell: i == 0 ? _react2.default.createElement(_ClaimAddButtonCell2.default, { onClick: onClaimAdd }) : _react2.default.createElement('td', null),
hasClaimDelete: true,
key: claim.id,
onClaimDelete: onClaimDelete,
onClaimUpdate: onClaimUpdate,
propertyDescription: propertyDescription });
});
}
return children;
}
}]);
return ClaimsTableBody;
}(_react.PureComponent);
ClaimsTableBody.TABLE_COLUMNS = _ClaimsTableRows2.default.TABLE_COLUMNS;
ClaimsTableBody.propTypes = {
claims: _propTypes2.default.arrayOf(_propTypes2.default.shape(_Shapes.Claim)),
displayEmpty: _propTypes2.default.bool,
displayLabel: _propTypes2.default.bool,
onClaimAdd: _propTypes2.default.func.isRequired,
onClaimAddTwice: _propTypes2.default.func.isRequired,
onClaimDelete: _propTypes2.default.func.isRequired,
onClaimUpdate: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default)
};
ClaimsTableBody.defaultProps = {
displayEmpty: true,
displayLabel: true
};
exports.default = ClaimsTableBody;
/***/ }),
/* 388 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.claimColumnsF = undefined;
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _reselect = __webpack_require__(51);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ok = function ok(x) {
return x !== undefined && x !== null;
};
var EMPTY_ARRAY = [];
var MAX_COLUMNS = 2;
var claimColumnsF = exports.claimColumnsF = function claimColumnsF() {
return (0, _reselect.defaultMemoize)(function (claims) {
if (claims.length < 5) {
return EMPTY_ARRAY;
}
var qualifierStats = {};
claims.map(function (claim) {
return claim.qualifiers;
}).filter(ok).forEach(function (qualifiers) {
return Object.keys(qualifiers).forEach(function (propertyId) {
var plus = (qualifiers[propertyId] || EMPTY_ARRAY).length > 0 ? 1 : 0;
qualifierStats[propertyId] = (qualifierStats[propertyId] || 0) + plus;
});
});
var columns = [];
var _loop = function _loop() {
var allValues = [].concat((0, _toConsumableArray3.default)(Object.values(qualifierStats))).sort(function (a, b) {
return b - a;
});
var max = allValues[0];
if (max < claims.length / 5.0) return 'break';
var countOfMax = allValues.filter(function (item) {
return item === max;
}).length;
if (columns.length + countOfMax > MAX_COLUMNS) return 'break';
Object.keys(qualifierStats).filter(function (propertyId) {
return qualifierStats[propertyId] === max;
}).forEach(function (propertyId) {
columns.push(propertyId);
delete qualifierStats[propertyId];
});
};
while (columns.length < MAX_COLUMNS && Object.keys(qualifierStats).length !== 0) {
var _ret = _loop();
if (_ret === 'break') break;
}
// const sorted = columns = columns.map( c => Number(c.substr(1)) ).sort().map( c=> 'P' + c);
return columns;
});
};
/***/ }),
/* 389 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _Shapes = __webpack_require__(18);
var _selectors = __webpack_require__(388);
var _ClaimsTableBody = __webpack_require__(387);
var _ClaimsTableBody2 = _interopRequireDefault(_ClaimsTableBody);
var _ClaimsWithQualifiersTable = __webpack_require__(295);
var _ClaimsWithQualifiersTable2 = _interopRequireDefault(_ClaimsWithQualifiersTable);
var _reactRedux = __webpack_require__(44);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var PropertyClaimContainer = function (_PureComponent) {
(0, _inherits3.default)(PropertyClaimContainer, _PureComponent);
function PropertyClaimContainer() {
var _ref;
var _temp, _this, _ret;
(0, _classCallCheck3.default)(this, PropertyClaimContainer);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PropertyClaimContainer.__proto__ || Object.getPrototypeOf(PropertyClaimContainer)).call.apply(_ref, [this].concat(args))), _this), _this.columnsMemoization = (0, _selectors.claimColumnsF)(), _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
(0, _createClass3.default)(PropertyClaimContainer, [{
key: 'render',
value: function render() {
var claims = this.props.claims;
var columns = this.columnsMemoization(claims);
if (columns.length !== 0) {
return _react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'td',
{ colSpan: _ClaimsTableBody2.default.TABLE_COLUMNS },
_react2.default.createElement(_ClaimsWithQualifiersTable2.default, (0, _extends3.default)({ columns: columns }, this.props))
)
);
}
return _react2.default.createElement(_ClaimsTableBody2.default, this.props);
}
}]);
return PropertyClaimContainer;
}(_react.PureComponent);
PropertyClaimContainer.propTypes = {
claims: _propTypes2.default.arrayOf(_propTypes2.default.shape(_Shapes.Claim)),
displayEmpty: _propTypes2.default.bool,
displayLabel: _propTypes2.default.bool,
onClaimAdd: _propTypes2.default.func.isRequired,
onClaimAddTwice: _propTypes2.default.func.isRequired,
onClaimDelete: _propTypes2.default.func.isRequired,
onClaimUpdate: _propTypes2.default.func.isRequired,
propertyDescription: _propTypes2.default.instanceOf(_PropertyDescription2.default)
};
PropertyClaimContainer.defaultProps = {
displayEmpty: true,
displayLabel: true
};
var EMPTY_ARRAY = [];
var mapStateToProps = function mapStateToProps(state, ownProps) {
return {
claims: state.entity.claims[ownProps.propertyDescription.id] || EMPTY_ARRAY
};
};
var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
return {
onClaimAdd: function onClaimAdd() {
return dispatch({ type: 'CLAIM_ADD', propertyDescription: ownProps.propertyDescription });
},
onClaimAddTwice: function onClaimAddTwice() {
dispatch({ type: 'CLAIM_ADD', propertyDescription: ownProps.propertyDescription });
dispatch({ type: 'CLAIM_ADD', propertyDescription: ownProps.propertyDescription });
},
onClaimUpdate: function onClaimUpdate(claim) {
return dispatch({ type: 'CLAIM_UPDATE', claim: claim });
},
onClaimDelete: function onClaimDelete(claim) {
return dispatch({ type: 'CLAIM_DELETE', claim: claim });
}
};
};
var PropertyClaimContainerConnected = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(PropertyClaimContainer);
exports.default = PropertyClaimContainerConnected;
/***/ }),
/* 390 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".LanguageAutocomplete__container___234z0 {\r\n display: inline-block;\r\n width: 3em;\r\n}\r\n\r\n.LanguageAutocomplete__container___234z0 input {\r\n width: 2.8em;\r\n}\r\n\r\n.LanguageAutocomplete__suggestionsContainer___2YrW_ {\r\n display: none;\r\n}\r\n\r\n.LanguageAutocomplete__containerOpen___y83ud .LanguageAutocomplete__suggestionsContainer___2YrW_ {\r\n display: block;\r\n position: absolute;\r\n width: 14em;\r\n height: 10em;\r\n overflow-y: auto;\r\n border: 1px solid #aaa;\r\n background-color: #fff;\r\n z-index: 2;\r\n resize: both;\r\n}\r\n\r\n.LanguageAutocomplete__suggestionsList___wirEd {\r\n margin: 0;\r\n padding: 0;\r\n list-style-image: none;\r\n list-style-type: none;\r\n}\r\n\r\n.LanguageAutocomplete__suggestion___ebpHU {\r\n cursor: pointer;\r\n padding: 2px 4px;\r\n}\r\n\r\n.LanguageAutocomplete__suggestion___ebpHU:not(:first-child) {\r\n border-top: 1px solid #ddd;\r\n}\r\n\r\n.LanguageAutocomplete__suggestionHighlighted___2NqvP {\r\n background-color: #0C7EAF;\r\n color: #fff;\r\n}\r\n\r\n.LanguageAutocomplete__suggestionContent___zLLoT {\r\n display: -ms-flexbox;\r\n display: flex;\r\n -ms-flex-align: center;\r\n align-items: center;\r\n background-repeat: no-repeat;\r\n}\r\n\r\n.LanguageAutocomplete__suggestionContentText___2N2Sq {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n.LanguageAutocomplete__provided___3m0S7 {\r\n font-weight: bold;\r\n}\r\n\r\n.LanguageAutocomplete__highlight___2_n22 {\r\n color: #ee0000;\r\n font-weight: bold;\r\n}\r\n", ""]);
// exports
exports.locals = {
"container": "LanguageAutocomplete__container___234z0",
"suggestionsContainer": "LanguageAutocomplete__suggestionsContainer___2YrW_",
"containerOpen": "LanguageAutocomplete__containerOpen___y83ud",
"suggestionsList": "LanguageAutocomplete__suggestionsList___wirEd",
"suggestion": "LanguageAutocomplete__suggestion___ebpHU",
"suggestionHighlighted": "LanguageAutocomplete__suggestionHighlighted___2NqvP",
"suggestionContent": "LanguageAutocomplete__suggestionContent___zLLoT",
"suggestionContentText": "LanguageAutocomplete__suggestionContentText___2N2Sq",
"provided": "LanguageAutocomplete__provided___3m0S7",
"highlight": "LanguageAutocomplete__highlight___2_n22"
};
/***/ }),
/* 391 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(390);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 392 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var defaultTheme = exports.defaultTheme = {
container: 'react-autosuggest__container',
containerOpen: 'react-autosuggest__container--open',
input: 'react-autosuggest__input',
inputOpen: 'react-autosuggest__input--open',
inputFocused: 'react-autosuggest__input--focused',
suggestionsContainer: 'react-autosuggest__suggestions-container',
suggestionsContainerOpen: 'react-autosuggest__suggestions-container--open',
suggestionsList: 'react-autosuggest__suggestions-list',
suggestion: 'react-autosuggest__suggestion',
suggestionFirst: 'react-autosuggest__suggestion--first',
suggestionHighlighted: 'react-autosuggest__suggestion--highlighted',
sectionContainer: 'react-autosuggest__section-container',
sectionContainerFirst: 'react-autosuggest__section-container--first',
sectionTitle: 'react-autosuggest__section-title'
};
var mapToAutowhateverTheme = exports.mapToAutowhateverTheme = function mapToAutowhateverTheme(theme) {
var result = {};
for (var key in theme) {
switch (key) {
case 'suggestionsContainer':
result['itemsContainer'] = theme[key];
break;
case 'suggestionsContainerOpen':
result['itemsContainerOpen'] = theme[key];
break;
case 'suggestion':
result['item'] = theme[key];
break;
case 'suggestionFirst':
result['itemFirst'] = theme[key];
break;
case 'suggestionHighlighted':
result['itemHighlighted'] = theme[key];
break;
case 'suggestionsList':
result['itemsList'] = theme[key];
break;
default:
result[key] = theme[key];
}
}
return result;
};
/***/ }),
/* 393 */
/***/ (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; };
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__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _compareObjects = __webpack_require__(139);
var _compareObjects2 = _interopRequireDefault(_compareObjects);
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; }
var Item = function (_Component) {
_inherits(Item, _Component);
function Item() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, Item);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Item.__proto__ || Object.getPrototypeOf(Item)).call.apply(_ref, [this].concat(args))), _this), _this.storeItemReference = function (item) {
if (item !== null) {
_this.item = item;
}
}, _this.onMouseEnter = function (event) {
var _this$props = _this.props,
sectionIndex = _this$props.sectionIndex,
itemIndex = _this$props.itemIndex;
_this.props.onMouseEnter(event, { sectionIndex: sectionIndex, itemIndex: itemIndex });
}, _this.onMouseLeave = function (event) {
var _this$props2 = _this.props,
sectionIndex = _this$props2.sectionIndex,
itemIndex = _this$props2.itemIndex;
_this.props.onMouseLeave(event, { sectionIndex: sectionIndex, itemIndex: itemIndex });
}, _this.onMouseDown = function (event) {
var _this$props3 = _this.props,
sectionIndex = _this$props3.sectionIndex,
itemIndex = _this$props3.itemIndex;
_this.props.onMouseDown(event, { sectionIndex: sectionIndex, itemIndex: itemIndex });
}, _this.onClick = function (event) {
var _this$props4 = _this.props,
sectionIndex = _this$props4.sectionIndex,
itemIndex = _this$props4.itemIndex;
_this.props.onClick(event, { sectionIndex: sectionIndex, itemIndex: itemIndex });
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(Item, [{
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate(nextProps) {
return (0, _compareObjects2.default)(nextProps, this.props, ['renderItemData']);
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
isHighlighted = _props.isHighlighted,
item = _props.item,
renderItem = _props.renderItem,
renderItemData = _props.renderItemData,
restProps = _objectWithoutProperties(_props, ['isHighlighted', 'item', 'renderItem', 'renderItemData']);
delete restProps.sectionIndex;
delete restProps.itemIndex;
if (typeof restProps.onMouseEnter === 'function') {
restProps.onMouseEnter = this.onMouseEnter;
}
if (typeof restProps.onMouseLeave === 'function') {
restProps.onMouseLeave = this.onMouseLeave;
}
if (typeof restProps.onMouseDown === 'function') {
restProps.onMouseDown = this.onMouseDown;
}
if (typeof restProps.onClick === 'function') {
restProps.onClick = this.onClick;
}
return _react2.default.createElement(
'li',
_extends({ role: 'option' }, restProps, { ref: this.storeItemReference }),
renderItem(item, _extends({ isHighlighted: isHighlighted }, renderItemData))
);
}
}]);
return Item;
}(_react.Component);
Item.propTypes = {
sectionIndex: _propTypes2.default.number,
isHighlighted: _propTypes2.default.bool.isRequired,
itemIndex: _propTypes2.default.number.isRequired,
item: _propTypes2.default.any.isRequired,
renderItem: _propTypes2.default.func.isRequired,
renderItemData: _propTypes2.default.object.isRequired,
onMouseEnter: _propTypes2.default.func,
onMouseLeave: _propTypes2.default.func,
onMouseDown: _propTypes2.default.func,
onClick: _propTypes2.default.func
};
exports.default = Item;
/***/ }),
/* 394 */
/***/ (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; };
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__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _Item = __webpack_require__(393);
var _Item2 = _interopRequireDefault(_Item);
var _compareObjects = __webpack_require__(139);
var _compareObjects2 = _interopRequireDefault(_compareObjects);
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 ItemsList = function (_Component) {
_inherits(ItemsList, _Component);
function ItemsList() {
var _ref;
var _temp, _this, _ret;
_classCallCheck(this, ItemsList);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ItemsList.__proto__ || Object.getPrototypeOf(ItemsList)).call.apply(_ref, [this].concat(args))), _this), _this.storeHighlightedItemReference = function (highlightedItem) {
_this.props.onHighlightedItemChange(highlightedItem === null ? null : highlightedItem.item);
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_createClass(ItemsList, [{
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate(nextProps) {
return (0, _compareObjects2.default)(nextProps, this.props, ['itemProps']);
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
var _props = this.props,
items = _props.items,
itemProps = _props.itemProps,
renderItem = _props.renderItem,
renderItemData = _props.renderItemData,
sectionIndex = _props.sectionIndex,
highlightedItemIndex = _props.highlightedItemIndex,
getItemId = _props.getItemId,
theme = _props.theme,
keyPrefix = _props.keyPrefix;
var sectionPrefix = sectionIndex === null ? keyPrefix : keyPrefix + 'section-' + sectionIndex + '-';
var isItemPropsFunction = typeof itemProps === 'function';
return _react2.default.createElement(
'ul',
_extends({ role: 'listbox' }, theme(sectionPrefix + 'items-list', 'itemsList')),
items.map(function (item, itemIndex) {
var isFirst = itemIndex === 0;
var isHighlighted = itemIndex === highlightedItemIndex;
var itemKey = sectionPrefix + 'item-' + itemIndex;
var itemPropsObj = isItemPropsFunction ? itemProps({ sectionIndex: sectionIndex, itemIndex: itemIndex }) : itemProps;
var allItemProps = _extends({
id: getItemId(sectionIndex, itemIndex),
'aria-selected': isHighlighted
}, theme(itemKey, 'item', isFirst && 'itemFirst', isHighlighted && 'itemHighlighted'), itemPropsObj);
if (isHighlighted) {
allItemProps.ref = _this2.storeHighlightedItemReference;
}
// `key` is provided by theme()
/* eslint-disable react/jsx-key */
return _react2.default.createElement(_Item2.default, _extends({}, allItemProps, {
sectionIndex: sectionIndex,
isHighlighted: isHighlighted,
itemIndex: itemIndex,
item: item,
renderItem: renderItem,
renderItemData: renderItemData
}));
/* eslint-enable react/jsx-key */
})
);
}
}]);
return ItemsList;
}(_react.Component);
ItemsList.propTypes = {
items: _propTypes2.default.array.isRequired,
itemProps: _propTypes2.default.oneOfType([_propTypes2.default.object, _propTypes2.default.func]),
renderItem: _propTypes2.default.func.isRequired,
renderItemData: _propTypes2.default.object.isRequired,
sectionIndex: _propTypes2.default.number,
highlightedItemIndex: _propTypes2.default.number,
onHighlightedItemChange: _propTypes2.default.func.isRequired,
getItemId: _propTypes2.default.func.isRequired,
theme: _propTypes2.default.func.isRequired,
keyPrefix: _propTypes2.default.string.isRequired
};
ItemsList.defaultProps = {
sectionIndex: null
};
exports.default = ItemsList;
/***/ }),
/* 395 */
/***/ (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 _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _compareObjects = __webpack_require__(139);
var _compareObjects2 = _interopRequireDefault(_compareObjects);
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 SectionTitle = function (_Component) {
_inherits(SectionTitle, _Component);
function SectionTitle() {
_classCallCheck(this, SectionTitle);
return _possibleConstructorReturn(this, (SectionTitle.__proto__ || Object.getPrototypeOf(SectionTitle)).apply(this, arguments));
}
_createClass(SectionTitle, [{
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate(nextProps) {
return (0, _compareObjects2.default)(nextProps, this.props);
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
section = _props.section,
renderSectionTitle = _props.renderSectionTitle,
theme = _props.theme,
sectionKeyPrefix = _props.sectionKeyPrefix;
var sectionTitle = renderSectionTitle(section);
if (!sectionTitle) {
return null;
}
return _react2.default.createElement(
'div',
theme(sectionKeyPrefix + 'title', 'sectionTitle'),
sectionTitle
);
}
}]);
return SectionTitle;
}(_react.Component);
SectionTitle.propTypes = {
section: _propTypes2.default.any.isRequired,
renderSectionTitle: _propTypes2.default.func.isRequired,
theme: _propTypes2.default.func.isRequired,
sectionKeyPrefix: _propTypes2.default.string.isRequired
};
exports.default = SectionTitle;
/***/ }),
/* 396 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
function ToObject(val) {
if (val == null) {
throw new TypeError('Object.assign cannot be called with null or undefined');
}
return Object(val);
}
function ownEnumerableKeys(obj) {
var keys = Object.getOwnPropertyNames(obj);
if (Object.getOwnPropertySymbols) {
keys = keys.concat(Object.getOwnPropertySymbols(obj));
}
return keys.filter(function (key) {
return propIsEnumerable.call(obj, key);
});
}
module.exports = Object.assign || function (target, source) {
var from;
var keys;
var to = ToObject(target);
for (var s = 1; s < arguments.length; s++) {
from = arguments[s];
keys = ownEnumerableKeys(Object(from));
for (var i = 0; i < keys.length; i++) {
to[keys[i]] = from[keys[i]];
}
}
return to;
};
/***/ }),
/* 397 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, '__esModule', {
value: 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'); } }; })();
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); } }
var _objectAssign = __webpack_require__(396);
var _objectAssign2 = _interopRequireDefault(_objectAssign);
var truthy = function truthy(x) {
return x;
};
exports['default'] = function (input) {
var _ref = Array.isArray(input) && input.length === 2 ? input : [input, null];
var _ref2 = _slicedToArray(_ref, 2);
var theme = _ref2[0];
var classNameDecorator = _ref2[1];
return function (key) {
for (var _len = arguments.length, names = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
names[_key - 1] = arguments[_key];
}
var styles = names.map(function (name) {
return theme[name];
}).filter(truthy);
return typeof styles[0] === 'string' || typeof classNameDecorator === 'function' ? { key: key, className: classNameDecorator ? classNameDecorator.apply(undefined, _toConsumableArray(styles)) : styles.join(' ') } : { key: key, style: _objectAssign2['default'].apply(undefined, [{}].concat(_toConsumableArray(styles))) };
};
};
module.exports = exports['default'];
/***/ }),
/* 398 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
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"); } }; }();
module.exports = function (_ref) {
var data = _ref.data;
var multiSection = _ref.multiSection;
function nextNonEmptySectionIndex(sectionIndex) {
if (sectionIndex === null) {
sectionIndex = 0;
} else {
sectionIndex++;
}
while (sectionIndex < data.length && data[sectionIndex] === 0) {
sectionIndex++;
}
return sectionIndex === data.length ? null : sectionIndex;
}
function prevNonEmptySectionIndex(sectionIndex) {
if (sectionIndex === null) {
sectionIndex = data.length - 1;
} else {
sectionIndex--;
}
while (sectionIndex >= 0 && data[sectionIndex] === 0) {
sectionIndex--;
}
return sectionIndex === -1 ? null : sectionIndex;
}
function next(position) {
var _position = _slicedToArray(position, 2);
var sectionIndex = _position[0];
var itemIndex = _position[1];
if (multiSection) {
if (itemIndex === null || itemIndex === data[sectionIndex] - 1) {
sectionIndex = nextNonEmptySectionIndex(sectionIndex);
if (sectionIndex === null) {
return [null, null];
}
return [sectionIndex, 0];
}
return [sectionIndex, itemIndex + 1];
}
if (data === 0 || itemIndex === data - 1) {
return [null, null];
}
if (itemIndex === null) {
return [null, 0];
}
return [null, itemIndex + 1];
}
function prev(position) {
var _position2 = _slicedToArray(position, 2);
var sectionIndex = _position2[0];
var itemIndex = _position2[1];
if (multiSection) {
if (itemIndex === null || itemIndex === 0) {
sectionIndex = prevNonEmptySectionIndex(sectionIndex);
if (sectionIndex === null) {
return [null, null];
}
return [sectionIndex, data[sectionIndex] - 1];
}
return [sectionIndex, itemIndex - 1];
}
if (data === 0 || itemIndex === 0) {
return [null, null];
}
if (itemIndex === null) {
return [null, data - 1];
}
return [null, itemIndex - 1];
}
function isLast(position) {
return next(position)[1] === null;
}
return {
next: next,
prev: prev,
isLast: isLast
};
};
/***/ }),
/* 399 */
/***/ (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; };
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 _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__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _sectionIterator = __webpack_require__(398);
var _sectionIterator2 = _interopRequireDefault(_sectionIterator);
var _reactThemeable = __webpack_require__(397);
var _reactThemeable2 = _interopRequireDefault(_reactThemeable);
var _SectionTitle = __webpack_require__(395);
var _SectionTitle2 = _interopRequireDefault(_SectionTitle);
var _ItemsList = __webpack_require__(394);
var _ItemsList2 = _interopRequireDefault(_ItemsList);
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 emptyObject = {};
var defaultRenderInputComponent = function defaultRenderInputComponent(props) {
return _react2.default.createElement('input', props);
};
var defaultRenderItemsContainer = function defaultRenderItemsContainer(_ref) {
var containerProps = _ref.containerProps,
children = _ref.children;
return _react2.default.createElement(
'div',
containerProps,
children
);
};
var defaultTheme = {
container: 'react-autowhatever__container',
containerOpen: 'react-autowhatever__container--open',
input: 'react-autowhatever__input',
inputOpen: 'react-autowhatever__input--open',
inputFocused: 'react-autowhatever__input--focused',
itemsContainer: 'react-autowhatever__items-container',
itemsContainerOpen: 'react-autowhatever__items-container--open',
itemsList: 'react-autowhatever__items-list',
item: 'react-autowhatever__item',
itemFirst: 'react-autowhatever__item--first',
itemHighlighted: 'react-autowhatever__item--highlighted',
sectionContainer: 'react-autowhatever__section-container',
sectionContainerFirst: 'react-autowhatever__section-container--first',
sectionTitle: 'react-autowhatever__section-title'
};
var Autowhatever = function (_Component) {
_inherits(Autowhatever, _Component);
function Autowhatever(props) {
_classCallCheck(this, Autowhatever);
var _this = _possibleConstructorReturn(this, (Autowhatever.__proto__ || Object.getPrototypeOf(Autowhatever)).call(this, props));
_this.storeInputReference = function (input) {
if (input !== null) {
_this.input = input;
}
};
_this.storeItemsContainerReference = function (itemsContainer) {
if (itemsContainer !== null) {
_this.itemsContainer = itemsContainer;
}
};
_this.onHighlightedItemChange = function (highlightedItem) {
_this.highlightedItem = highlightedItem;
};
_this.getItemId = function (sectionIndex, itemIndex) {
if (itemIndex === null) {
return null;
}
var id = _this.props.id;
var section = sectionIndex === null ? '' : 'section-' + sectionIndex;
return 'react-autowhatever-' + id + '-' + section + '-item-' + itemIndex;
};
_this.onFocus = function (event) {
var inputProps = _this.props.inputProps;
_this.setState({
isInputFocused: true
});
inputProps.onFocus && inputProps.onFocus(event);
};
_this.onBlur = function (event) {
var inputProps = _this.props.inputProps;
_this.setState({
isInputFocused: false
});
inputProps.onBlur && inputProps.onBlur(event);
};
_this.onKeyDown = function (event) {
var _this$props = _this.props,
inputProps = _this$props.inputProps,
highlightedSectionIndex = _this$props.highlightedSectionIndex,
highlightedItemIndex = _this$props.highlightedItemIndex;
switch (event.key) {
case 'ArrowDown':
case 'ArrowUp':
{
var nextPrev = event.key === 'ArrowDown' ? 'next' : 'prev';
var _this$sectionIterator = _this.sectionIterator[nextPrev]([highlightedSectionIndex, highlightedItemIndex]),
_this$sectionIterator2 = _slicedToArray(_this$sectionIterator, 2),
newHighlightedSectionIndex = _this$sectionIterator2[0],
newHighlightedItemIndex = _this$sectionIterator2[1];
inputProps.onKeyDown(event, { newHighlightedSectionIndex: newHighlightedSectionIndex, newHighlightedItemIndex: newHighlightedItemIndex });
break;
}
default:
inputProps.onKeyDown(event, { highlightedSectionIndex: highlightedSectionIndex, highlightedItemIndex: highlightedItemIndex });
}
};
_this.highlightedItem = null;
_this.state = {
isInputFocused: false
};
_this.setSectionsItems(props);
_this.setSectionIterator(props);
_this.setTheme(props);
return _this;
}
_createClass(Autowhatever, [{
key: 'componentDidMount',
value: function componentDidMount() {
this.ensureHighlightedItemIsVisible();
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (nextProps.items !== this.props.items) {
this.setSectionsItems(nextProps);
}
if (nextProps.items !== this.props.items || nextProps.multiSection !== this.props.multiSection) {
this.setSectionIterator(nextProps);
}
if (nextProps.theme !== this.props.theme) {
this.setTheme(nextProps);
}
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
this.ensureHighlightedItemIsVisible();
}
}, {
key: 'setSectionsItems',
value: function setSectionsItems(props) {
if (props.multiSection) {
this.sectionsItems = props.items.map(function (section) {
return props.getSectionItems(section);
});
this.sectionsLengths = this.sectionsItems.map(function (items) {
return items.length;
});
this.allSectionsAreEmpty = this.sectionsLengths.every(function (itemsCount) {
return itemsCount === 0;
});
}
}
}, {
key: 'setSectionIterator',
value: function setSectionIterator(props) {
this.sectionIterator = (0, _sectionIterator2.default)({
multiSection: props.multiSection,
data: props.multiSection ? this.sectionsLengths : props.items.length
});
}
}, {
key: 'setTheme',
value: function setTheme(props) {
this.theme = (0, _reactThemeable2.default)(props.theme);
}
}, {
key: 'renderSections',
value: function renderSections() {
var _this2 = this;
if (this.allSectionsAreEmpty) {
return null;
}
var theme = this.theme;
var _props = this.props,
id = _props.id,
items = _props.items,
renderItem = _props.renderItem,
renderItemData = _props.renderItemData,
renderSectionTitle = _props.renderSectionTitle,
highlightedSectionIndex = _props.highlightedSectionIndex,
highlightedItemIndex = _props.highlightedItemIndex,
itemProps = _props.itemProps;
return items.map(function (section, sectionIndex) {
var keyPrefix = 'react-autowhatever-' + id + '-';
var sectionKeyPrefix = keyPrefix + 'section-' + sectionIndex + '-';
var isFirstSection = sectionIndex === 0;
// `key` is provided by theme()
/* eslint-disable react/jsx-key */
return _react2.default.createElement(
'div',
theme(sectionKeyPrefix + 'container', 'sectionContainer', isFirstSection && 'sectionContainerFirst'),
_react2.default.createElement(_SectionTitle2.default, {
section: section,
renderSectionTitle: renderSectionTitle,
theme: theme,
sectionKeyPrefix: sectionKeyPrefix
}),
_react2.default.createElement(_ItemsList2.default, {
items: _this2.sectionsItems[sectionIndex],
itemProps: itemProps,
renderItem: renderItem,
renderItemData: renderItemData,
sectionIndex: sectionIndex,
highlightedItemIndex: highlightedSectionIndex === sectionIndex ? highlightedItemIndex : null,
onHighlightedItemChange: _this2.onHighlightedItemChange,
getItemId: _this2.getItemId,
theme: theme,
keyPrefix: keyPrefix,
ref: _this2.storeItemsListReference
})
);
/* eslint-enable react/jsx-key */
});
}
}, {
key: 'renderItems',
value: function renderItems() {
var items = this.props.items;
if (items.length === 0) {
return null;
}
var theme = this.theme;
var _props2 = this.props,
id = _props2.id,
renderItem = _props2.renderItem,
renderItemData = _props2.renderItemData,
highlightedSectionIndex = _props2.highlightedSectionIndex,
highlightedItemIndex = _props2.highlightedItemIndex,
itemProps = _props2.itemProps;
return _react2.default.createElement(_ItemsList2.default, {
items: items,
itemProps: itemProps,
renderItem: renderItem,
renderItemData: renderItemData,
highlightedItemIndex: highlightedSectionIndex === null ? highlightedItemIndex : null,
onHighlightedItemChange: this.onHighlightedItemChange,
getItemId: this.getItemId,
theme: theme,
keyPrefix: 'react-autowhatever-' + id + '-'
});
}
}, {
key: 'ensureHighlightedItemIsVisible',
value: function ensureHighlightedItemIsVisible() {
var highlightedItem = this.highlightedItem;
if (!highlightedItem) {
return;
}
var itemsContainer = this.itemsContainer;
var itemOffsetRelativeToContainer = highlightedItem.offsetParent === itemsContainer ? highlightedItem.offsetTop : highlightedItem.offsetTop - itemsContainer.offsetTop;
var scrollTop = itemsContainer.scrollTop; // Top of the visible area
if (itemOffsetRelativeToContainer < scrollTop) {
// Item is off the top of the visible area
scrollTop = itemOffsetRelativeToContainer;
} else if (itemOffsetRelativeToContainer + highlightedItem.offsetHeight > scrollTop + itemsContainer.offsetHeight) {
// Item is off the bottom of the visible area
scrollTop = itemOffsetRelativeToContainer + highlightedItem.offsetHeight - itemsContainer.offsetHeight;
}
if (scrollTop !== itemsContainer.scrollTop) {
itemsContainer.scrollTop = scrollTop;
}
}
}, {
key: 'render',
value: function render() {
var theme = this.theme;
var _props3 = this.props,
id = _props3.id,
multiSection = _props3.multiSection,
renderInputComponent = _props3.renderInputComponent,
renderItemsContainer = _props3.renderItemsContainer,
highlightedSectionIndex = _props3.highlightedSectionIndex,
highlightedItemIndex = _props3.highlightedItemIndex;
var isInputFocused = this.state.isInputFocused;
var renderedItems = multiSection ? this.renderSections() : this.renderItems();
var isOpen = renderedItems !== null;
var ariaActivedescendant = this.getItemId(highlightedSectionIndex, highlightedItemIndex);
var itemsContainerId = 'react-autowhatever-' + id;
var containerProps = _extends({
role: 'combobox',
'aria-haspopup': 'listbox',
'aria-owns': itemsContainerId,
'aria-expanded': isOpen
}, theme('react-autowhatever-' + id + '-container', 'container', isOpen && 'containerOpen'));
var inputComponent = renderInputComponent(_extends({
type: 'text',
value: '',
autoComplete: 'off',
'aria-autocomplete': 'list',
'aria-controls': itemsContainerId,
'aria-activedescendant': ariaActivedescendant
}, theme('react-autowhatever-' + id + '-input', 'input', isOpen && 'inputOpen', isInputFocused && 'inputFocused'), this.props.inputProps, {
onFocus: this.onFocus,
onBlur: this.onBlur,
onKeyDown: this.props.inputProps.onKeyDown && this.onKeyDown,
ref: this.storeInputReference
}));
var itemsContainer = renderItemsContainer({
containerProps: _extends({
id: itemsContainerId,
role: 'listbox'
}, theme('react-autowhatever-' + id + '-items-container', 'itemsContainer', isOpen && 'itemsContainerOpen'), {
ref: this.storeItemsContainerReference
}),
children: renderedItems
});
return _react2.default.createElement(
'div',
containerProps,
inputComponent,
itemsContainer
);
}
}]);
return Autowhatever;
}(_react.Component);
Autowhatever.propTypes = {
id: _propTypes2.default.string, // Used in aria-* attributes. If multiple Autowhatever's are rendered on a page, they must have unique ids.
multiSection: _propTypes2.default.bool, // Indicates whether a multi section layout should be rendered.
renderInputComponent: _propTypes2.default.func, // When specified, it is used to render the input element.
renderItemsContainer: _propTypes2.default.func, // Renders the items container.
items: _propTypes2.default.array.isRequired, // Array of items or sections to render.
renderItem: _propTypes2.default.func, // This function renders a single item.
renderItemData: _propTypes2.default.object, // Arbitrary data that will be passed to renderItem()
renderSectionTitle: _propTypes2.default.func, // This function gets a section and renders its title.
getSectionItems: _propTypes2.default.func, // This function gets a section and returns its items, which will be passed into `renderItem` for rendering.
inputProps: _propTypes2.default.object, // Arbitrary input props
itemProps: _propTypes2.default.oneOfType([// Arbitrary item props
_propTypes2.default.object, _propTypes2.default.func]),
highlightedSectionIndex: _propTypes2.default.number, // Section index of the highlighted item
highlightedItemIndex: _propTypes2.default.number, // Highlighted item index (within a section)
theme: _propTypes2.default.oneOfType([// Styles. See: https://github.com/markdalgleish/react-themeable
_propTypes2.default.object, _propTypes2.default.array])
};
Autowhatever.defaultProps = {
id: '1',
multiSection: false,
renderInputComponent: defaultRenderInputComponent,
renderItemsContainer: defaultRenderItemsContainer,
renderItem: function renderItem() {
throw new Error('`renderItem` must be provided');
},
renderItemData: emptyObject,
renderSectionTitle: function renderSectionTitle() {
throw new Error('`renderSectionTitle` must be provided');
},
getSectionItems: function getSectionItems() {
throw new Error('`getSectionItems` must be provided');
},
inputProps: emptyObject,
itemProps: emptyObject,
highlightedSectionIndex: null,
highlightedItemIndex: null,
theme: defaultTheme
};
exports.default = Autowhatever;
/***/ }),
/* 400 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(399).default;
/***/ }),
/* 401 */
/***/ (function(module, exports) {
module.exports = function shallowEqualArrays(arrA, arrB) {
if (arrA === arrB) {
return true;
}
var len = arrA.length;
if (arrB.length !== len) {
return false;
}
for (var i = 0; i < len; i++) {
if (arrA[i] !== arrB[i]) {
return false;
}
}
return true;
};
/***/ }),
/* 402 */
/***/ (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; };
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__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _arrays = __webpack_require__(401);
var _arrays2 = _interopRequireDefault(_arrays);
var _reactAutowhatever = __webpack_require__(400);
var _reactAutowhatever2 = _interopRequireDefault(_reactAutowhatever);
var _theme = __webpack_require__(392);
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 alwaysTrue = function alwaysTrue() {
return true;
};
var defaultShouldRenderSuggestions = function defaultShouldRenderSuggestions(value) {
return value.trim().length > 0;
};
var defaultRenderSuggestionsContainer = function defaultRenderSuggestionsContainer(_ref) {
var containerProps = _ref.containerProps,
children = _ref.children;
return _react2.default.createElement(
'div',
containerProps,
children
);
};
var Autosuggest = function (_Component) {
_inherits(Autosuggest, _Component);
function Autosuggest(_ref2) {
var alwaysRenderSuggestions = _ref2.alwaysRenderSuggestions;
_classCallCheck(this, Autosuggest);
var _this = _possibleConstructorReturn(this, (Autosuggest.__proto__ || Object.getPrototypeOf(Autosuggest)).call(this));
_initialiseProps.call(_this);
_this.state = {
isFocused: false,
isCollapsed: !alwaysRenderSuggestions,
highlightedSectionIndex: null,
highlightedSuggestionIndex: null,
highlightedSuggestion: null,
valueBeforeUpDown: null
};
_this.justPressedUpDown = false;
_this.justMouseEntered = false;
return _this;
}
_createClass(Autosuggest, [{
key: 'componentDidMount',
value: function componentDidMount() {
document.addEventListener('mousedown', this.onDocumentMouseDown);
this.input = this.autowhatever.input;
this.suggestionsContainer = this.autowhatever.itemsContainer;
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if ((0, _arrays2.default)(nextProps.suggestions, this.props.suggestions)) {
if (nextProps.highlightFirstSuggestion && nextProps.suggestions.length > 0 && this.justPressedUpDown === false && this.justMouseEntered === false) {
this.highlightFirstSuggestion();
}
} else {
if (this.willRenderSuggestions(nextProps)) {
if (this.state.isCollapsed && !this.justSelectedSuggestion) {
this.revealSuggestions();
}
} else {
this.resetHighlightedSuggestion();
}
}
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps, prevState) {
var _props = this.props,
suggestions = _props.suggestions,
onSuggestionHighlighted = _props.onSuggestionHighlighted,
highlightFirstSuggestion = _props.highlightFirstSuggestion;
if (!(0, _arrays2.default)(suggestions, prevProps.suggestions) && suggestions.length > 0 && highlightFirstSuggestion) {
this.highlightFirstSuggestion();
return;
}
if (onSuggestionHighlighted) {
var highlightedSuggestion = this.getHighlightedSuggestion();
var prevHighlightedSuggestion = prevState.highlightedSuggestion;
if (highlightedSuggestion != prevHighlightedSuggestion) {
onSuggestionHighlighted({
suggestion: highlightedSuggestion
});
}
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
document.removeEventListener('mousedown', this.onDocumentMouseDown);
}
}, {
key: 'updateHighlightedSuggestion',
value: function updateHighlightedSuggestion(sectionIndex, suggestionIndex, prevValue) {
var _this2 = this;
this.setState(function (state) {
var valueBeforeUpDown = state.valueBeforeUpDown;
if (suggestionIndex === null) {
valueBeforeUpDown = null;
} else if (valueBeforeUpDown === null && typeof prevValue !== 'undefined') {
valueBeforeUpDown = prevValue;
}
return {
highlightedSectionIndex: sectionIndex,
highlightedSuggestionIndex: suggestionIndex,
highlightedSuggestion: suggestionIndex === null ? null : _this2.getSuggestion(sectionIndex, suggestionIndex),
valueBeforeUpDown: valueBeforeUpDown
};
});
}
}, {
key: 'resetHighlightedSuggestion',
value: function resetHighlightedSuggestion() {
var shouldResetValueBeforeUpDown = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
this.setState(function (state) {
var valueBeforeUpDown = state.valueBeforeUpDown;
return {
highlightedSectionIndex: null,
highlightedSuggestionIndex: null,
highlightedSuggestion: null,
valueBeforeUpDown: shouldResetValueBeforeUpDown ? null : valueBeforeUpDown
};
});
}
}, {
key: 'revealSuggestions',
value: function revealSuggestions() {
this.setState({
isCollapsed: false
});
}
}, {
key: 'closeSuggestions',
value: function closeSuggestions() {
this.setState({
highlightedSectionIndex: null,
highlightedSuggestionIndex: null,
highlightedSuggestion: null,
valueBeforeUpDown: null,
isCollapsed: true
});
}
}, {
key: 'getSuggestion',
value: function getSuggestion(sectionIndex, suggestionIndex) {
var _props2 = this.props,
suggestions = _props2.suggestions,
multiSection = _props2.multiSection,
getSectionSuggestions = _props2.getSectionSuggestions;
if (multiSection) {
return getSectionSuggestions(suggestions[sectionIndex])[suggestionIndex];
}
return suggestions[suggestionIndex];
}
}, {
key: 'getHighlightedSuggestion',
value: function getHighlightedSuggestion() {
var _state = this.state,
highlightedSectionIndex = _state.highlightedSectionIndex,
highlightedSuggestionIndex = _state.highlightedSuggestionIndex;
if (highlightedSuggestionIndex === null) {
return null;
}
return this.getSuggestion(highlightedSectionIndex, highlightedSuggestionIndex);
}
}, {
key: 'getSuggestionValueByIndex',
value: function getSuggestionValueByIndex(sectionIndex, suggestionIndex) {
var getSuggestionValue = this.props.getSuggestionValue;
return getSuggestionValue(this.getSuggestion(sectionIndex, suggestionIndex));
}
}, {
key: 'getSuggestionIndices',
value: function getSuggestionIndices(suggestionElement) {
var sectionIndex = suggestionElement.getAttribute('data-section-index');
var suggestionIndex = suggestionElement.getAttribute('data-suggestion-index');
return {
sectionIndex: typeof sectionIndex === 'string' ? parseInt(sectionIndex, 10) : null,
suggestionIndex: parseInt(suggestionIndex, 10)
};
}
}, {
key: 'findSuggestionElement',
value: function findSuggestionElement(startNode) {
var node = startNode;
do {
if (node.getAttribute('data-suggestion-index') !== null) {
return node;
}
node = node.parentNode;
} while (node !== null);
console.error('Clicked element:', startNode); // eslint-disable-line no-console
throw new Error("Couldn't find suggestion element");
}
}, {
key: 'maybeCallOnChange',
value: function maybeCallOnChange(event, newValue, method) {
var _props$inputProps = this.props.inputProps,
value = _props$inputProps.value,
onChange = _props$inputProps.onChange;
if (newValue !== value) {
onChange(event, { newValue: newValue, method: method });
}
}
}, {
key: 'willRenderSuggestions',
value: function willRenderSuggestions(props) {
var suggestions = props.suggestions,
inputProps = props.inputProps,
shouldRenderSuggestions = props.shouldRenderSuggestions;
var value = inputProps.value;
return suggestions.length > 0 && shouldRenderSuggestions(value);
}
}, {
key: 'getQuery',
value: function getQuery() {
var inputProps = this.props.inputProps;
var value = inputProps.value;
var valueBeforeUpDown = this.state.valueBeforeUpDown;
return (valueBeforeUpDown === null ? value : valueBeforeUpDown).trim();
}
}, {
key: 'render',
value: function render() {
var _this3 = this;
var _props3 = this.props,
suggestions = _props3.suggestions,
renderInputComponent = _props3.renderInputComponent,
onSuggestionsFetchRequested = _props3.onSuggestionsFetchRequested,
renderSuggestion = _props3.renderSuggestion,
inputProps = _props3.inputProps,
multiSection = _props3.multiSection,
renderSectionTitle = _props3.renderSectionTitle,
id = _props3.id,
getSectionSuggestions = _props3.getSectionSuggestions,
theme = _props3.theme,
getSuggestionValue = _props3.getSuggestionValue,
alwaysRenderSuggestions = _props3.alwaysRenderSuggestions,
highlightFirstSuggestion = _props3.highlightFirstSuggestion;
var _state2 = this.state,
isFocused = _state2.isFocused,
isCollapsed = _state2.isCollapsed,
highlightedSectionIndex = _state2.highlightedSectionIndex,
highlightedSuggestionIndex = _state2.highlightedSuggestionIndex,
valueBeforeUpDown = _state2.valueBeforeUpDown;
var shouldRenderSuggestions = alwaysRenderSuggestions ? alwaysTrue : this.props.shouldRenderSuggestions;
var value = inputProps.value,
_onFocus = inputProps.onFocus,
_onKeyDown = inputProps.onKeyDown;
var willRenderSuggestions = this.willRenderSuggestions(this.props);
var isOpen = alwaysRenderSuggestions || isFocused && !isCollapsed && willRenderSuggestions;
var items = isOpen ? suggestions : [];
var autowhateverInputProps = _extends({}, inputProps, {
onFocus: function onFocus(event) {
if (!_this3.justSelectedSuggestion && !_this3.justClickedOnSuggestionsContainer) {
var shouldRender = shouldRenderSuggestions(value);
_this3.setState({
isFocused: true,
isCollapsed: !shouldRender
});
_onFocus && _onFocus(event);
if (shouldRender) {
onSuggestionsFetchRequested({ value: value, reason: 'input-focused' });
}
}
},
onBlur: function onBlur(event) {
if (_this3.justClickedOnSuggestionsContainer) {
_this3.input.focus();
return;
}
_this3.blurEvent = event;
if (!_this3.justSelectedSuggestion) {
_this3.onBlur();
_this3.onSuggestionsClearRequested();
}
},
onChange: function onChange(event) {
var value = event.target.value;
var shouldRender = shouldRenderSuggestions(value);
_this3.maybeCallOnChange(event, value, 'type');
_this3.setState(_extends({}, highlightFirstSuggestion ? {} : {
highlightedSectionIndex: null,
highlightedSuggestionIndex: null,
highlightedSuggestion: null
}, {
valueBeforeUpDown: null,
isCollapsed: !shouldRender
}));
if (shouldRender) {
onSuggestionsFetchRequested({ value: value, reason: 'input-changed' });
} else {
_this3.onSuggestionsClearRequested();
}
},
onKeyDown: function onKeyDown(event, data) {
var keyCode = event.keyCode;
switch (keyCode) {
case 40: // ArrowDown
case 38:
// ArrowUp
if (isCollapsed) {
if (shouldRenderSuggestions(value)) {
onSuggestionsFetchRequested({
value: value,
reason: 'suggestions-revealed'
});
_this3.revealSuggestions();
}
} else if (suggestions.length > 0) {
var newHighlightedSectionIndex = data.newHighlightedSectionIndex,
newHighlightedItemIndex = data.newHighlightedItemIndex;
var newValue = void 0;
if (newHighlightedItemIndex === null) {
// valueBeforeUpDown can be null if, for example, user
// hovers on the first suggestion and then pressed Up.
// If that happens, use the original input value.
newValue = valueBeforeUpDown === null ? value : valueBeforeUpDown;
} else {
newValue = _this3.getSuggestionValueByIndex(newHighlightedSectionIndex, newHighlightedItemIndex);
}
_this3.updateHighlightedSuggestion(newHighlightedSectionIndex, newHighlightedItemIndex, value);
_this3.maybeCallOnChange(event, newValue, keyCode === 40 ? 'down' : 'up');
}
event.preventDefault(); // Prevents the cursor from moving
_this3.justPressedUpDown = true;
setTimeout(function () {
_this3.justPressedUpDown = false;
});
break;
// Enter
case 13:
{
// See #388
if (event.keyCode === 229) {
break;
}
var highlightedSuggestion = _this3.getHighlightedSuggestion();
if (isOpen && !alwaysRenderSuggestions) {
_this3.closeSuggestions();
}
if (highlightedSuggestion != null) {
var _newValue = getSuggestionValue(highlightedSuggestion);
_this3.maybeCallOnChange(event, _newValue, 'enter');
_this3.onSuggestionSelected(event, {
suggestion: highlightedSuggestion,
suggestionValue: _newValue,
suggestionIndex: highlightedSuggestionIndex,
sectionIndex: highlightedSectionIndex,
method: 'enter'
});
_this3.justSelectedSuggestion = true;
setTimeout(function () {
_this3.justSelectedSuggestion = false;
});
}
break;
}
// Escape
case 27:
{
if (isOpen) {
// If input.type === 'search', the browser clears the input
// when Escape is pressed. We want to disable this default
// behaviour so that, when suggestions are shown, we just hide
// them, without clearing the input.
event.preventDefault();
}
var willCloseSuggestions = isOpen && !alwaysRenderSuggestions;
if (valueBeforeUpDown === null) {
// Didn't interact with Up/Down
if (!willCloseSuggestions) {
var _newValue2 = '';
_this3.maybeCallOnChange(event, _newValue2, 'escape');
if (shouldRenderSuggestions(_newValue2)) {
onSuggestionsFetchRequested({
value: _newValue2,
reason: 'escape-pressed'
});
} else {
_this3.onSuggestionsClearRequested();
}
}
} else {
// Interacted with Up/Down
_this3.maybeCallOnChange(event, valueBeforeUpDown, 'escape');
}
if (willCloseSuggestions) {
_this3.onSuggestionsClearRequested();
_this3.closeSuggestions();
} else {
_this3.resetHighlightedSuggestion();
}
break;
}
}
_onKeyDown && _onKeyDown(event);
}
});
var renderSuggestionData = {
query: this.getQuery()
};
return _react2.default.createElement(_reactAutowhatever2.default, {
multiSection: multiSection,
items: items,
renderInputComponent: renderInputComponent,
renderItemsContainer: this.renderSuggestionsContainer,
renderItem: renderSuggestion,
renderItemData: renderSuggestionData,
renderSectionTitle: renderSectionTitle,
getSectionItems: getSectionSuggestions,
highlightedSectionIndex: highlightedSectionIndex,
highlightedItemIndex: highlightedSuggestionIndex,
inputProps: autowhateverInputProps,
itemProps: this.itemProps,
theme: (0, _theme.mapToAutowhateverTheme)(theme),
id: id,
ref: this.storeAutowhateverRef
});
}
}]);
return Autosuggest;
}(_react.Component);
Autosuggest.propTypes = {
suggestions: _propTypes2.default.array.isRequired,
onSuggestionsFetchRequested: function onSuggestionsFetchRequested(props, propName) {
var onSuggestionsFetchRequested = props[propName];
if (typeof onSuggestionsFetchRequested !== 'function') {
throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp");
}
},
onSuggestionsClearRequested: function onSuggestionsClearRequested(props, propName) {
var onSuggestionsClearRequested = props[propName];
if (props.alwaysRenderSuggestions === false && typeof onSuggestionsClearRequested !== 'function') {
throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp");
}
},
onSuggestionSelected: _propTypes2.default.func,
onSuggestionHighlighted: _propTypes2.default.func,
renderInputComponent: _propTypes2.default.func,
renderSuggestionsContainer: _propTypes2.default.func,
getSuggestionValue: _propTypes2.default.func.isRequired,
renderSuggestion: _propTypes2.default.func.isRequired,
inputProps: function inputProps(props, propName) {
var inputProps = props[propName];
if (!inputProps.hasOwnProperty('value')) {
throw new Error("'inputProps' must have 'value'.");
}
if (!inputProps.hasOwnProperty('onChange')) {
throw new Error("'inputProps' must have 'onChange'.");
}
},
shouldRenderSuggestions: _propTypes2.default.func,
alwaysRenderSuggestions: _propTypes2.default.bool,
multiSection: _propTypes2.default.bool,
renderSectionTitle: function renderSectionTitle(props, propName) {
var renderSectionTitle = props[propName];
if (props.multiSection === true && typeof renderSectionTitle !== 'function') {
throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp");
}
},
getSectionSuggestions: function getSectionSuggestions(props, propName) {
var getSectionSuggestions = props[propName];
if (props.multiSection === true && typeof getSectionSuggestions !== 'function') {
throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp");
}
},
focusInputOnSuggestionClick: _propTypes2.default.bool,
highlightFirstSuggestion: _propTypes2.default.bool,
theme: _propTypes2.default.object,
id: _propTypes2.default.string
};
Autosuggest.defaultProps = {
renderSuggestionsContainer: defaultRenderSuggestionsContainer,
shouldRenderSuggestions: defaultShouldRenderSuggestions,
alwaysRenderSuggestions: false,
multiSection: false,
focusInputOnSuggestionClick: true,
highlightFirstSuggestion: false,
theme: _theme.defaultTheme,
id: '1'
};
var _initialiseProps = function _initialiseProps() {
var _this4 = this;
this.onDocumentMouseDown = function (event) {
_this4.justClickedOnSuggestionsContainer = false;
var node = event.detail && event.detail.target || // This is for testing only. Please show me a better way to emulate this.
event.target;
while (node !== null && node !== document) {
if (node.getAttribute('data-suggestion-index') !== null) {
// Suggestion was clicked
return;
}
if (node === _this4.suggestionsContainer) {
// Something else inside suggestions container was clicked
_this4.justClickedOnSuggestionsContainer = true;
return;
}
node = node.parentNode;
}
};
this.storeAutowhateverRef = function (autowhatever) {
if (autowhatever !== null) {
_this4.autowhatever = autowhatever;
}
};
this.onSuggestionMouseEnter = function (event, _ref3) {
var sectionIndex = _ref3.sectionIndex,
itemIndex = _ref3.itemIndex;
_this4.updateHighlightedSuggestion(sectionIndex, itemIndex);
_this4.justMouseEntered = true;
setTimeout(function () {
_this4.justMouseEntered = false;
});
};
this.highlightFirstSuggestion = function () {
_this4.updateHighlightedSuggestion(_this4.props.multiSection ? 0 : null, 0);
};
this.onSuggestionMouseDown = function () {
_this4.justSelectedSuggestion = true;
};
this.onSuggestionsClearRequested = function () {
var onSuggestionsClearRequested = _this4.props.onSuggestionsClearRequested;
onSuggestionsClearRequested && onSuggestionsClearRequested();
};
this.onSuggestionSelected = function (event, data) {
var _props4 = _this4.props,
alwaysRenderSuggestions = _props4.alwaysRenderSuggestions,
onSuggestionSelected = _props4.onSuggestionSelected,
onSuggestionsFetchRequested = _props4.onSuggestionsFetchRequested;
onSuggestionSelected && onSuggestionSelected(event, data);
if (alwaysRenderSuggestions) {
onSuggestionsFetchRequested({
value: data.suggestionValue,
reason: 'suggestion-selected'
});
} else {
_this4.onSuggestionsClearRequested();
}
_this4.resetHighlightedSuggestion();
};
this.onSuggestionClick = function (event) {
var _props5 = _this4.props,
alwaysRenderSuggestions = _props5.alwaysRenderSuggestions,
focusInputOnSuggestionClick = _props5.focusInputOnSuggestionClick;
var _getSuggestionIndices = _this4.getSuggestionIndices(_this4.findSuggestionElement(event.target)),
sectionIndex = _getSuggestionIndices.sectionIndex,
suggestionIndex = _getSuggestionIndices.suggestionIndex;
var clickedSuggestion = _this4.getSuggestion(sectionIndex, suggestionIndex);
var clickedSuggestionValue = _this4.props.getSuggestionValue(clickedSuggestion);
_this4.maybeCallOnChange(event, clickedSuggestionValue, 'click');
_this4.onSuggestionSelected(event, {
suggestion: clickedSuggestion,
suggestionValue: clickedSuggestionValue,
suggestionIndex: suggestionIndex,
sectionIndex: sectionIndex,
method: 'click'
});
if (!alwaysRenderSuggestions) {
_this4.closeSuggestions();
}
if (focusInputOnSuggestionClick === true) {
_this4.input.focus();
} else {
_this4.onBlur();
}
setTimeout(function () {
_this4.justSelectedSuggestion = false;
});
};
this.onBlur = function () {
var _props6 = _this4.props,
inputProps = _props6.inputProps,
shouldRenderSuggestions = _props6.shouldRenderSuggestions;
var value = inputProps.value,
onBlur = inputProps.onBlur;
var highlightedSuggestion = _this4.getHighlightedSuggestion();
var shouldRender = shouldRenderSuggestions(value);
_this4.setState({
isFocused: false,
highlightedSectionIndex: null,
highlightedSuggestionIndex: null,
highlightedSuggestion: null,
valueBeforeUpDown: null,
isCollapsed: !shouldRender
});
onBlur && onBlur(_this4.blurEvent, { highlightedSuggestion: highlightedSuggestion });
};
this.resetHighlightedSuggestionOnMouseLeave = function () {
_this4.resetHighlightedSuggestion(false); // shouldResetValueBeforeUpDown
};
this.itemProps = function (_ref4) {
var sectionIndex = _ref4.sectionIndex,
itemIndex = _ref4.itemIndex;
return {
'data-section-index': sectionIndex,
'data-suggestion-index': itemIndex,
onMouseEnter: _this4.onSuggestionMouseEnter,
onMouseLeave: _this4.resetHighlightedSuggestionOnMouseLeave,
onMouseDown: _this4.onSuggestionMouseDown,
onTouchStart: _this4.onSuggestionMouseDown, // Because on iOS `onMouseDown` is not triggered
onClick: _this4.onSuggestionClick
};
};
this.renderSuggestionsContainer = function (_ref5) {
var containerProps = _ref5.containerProps,
children = _ref5.children;
var renderSuggestionsContainer = _this4.props.renderSuggestionsContainer;
return renderSuggestionsContainer({
containerProps: containerProps,
children: children,
query: _this4.getQuery()
});
};
};
exports.default = Autosuggest;
/***/ }),
/* 403 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createEmptySuggestionsSelector = createEmptySuggestionsSelector;
var _I18nUtils = __webpack_require__(17);
var _reselect = __webpack_require__(51);
function getEmptySuggestionsImpl(provided) {
var added = new Set();
var result = [];
var codeNotYetIncluded = function codeNotYetIncluded(code) {
return !added.has(code);
};
var add = function add(code) {
added.add(code);result.push(code);
};
// both in default and in present
_I18nUtils.DEFAULT_LANGUAGES.filter(function (code) {
return provided.indexOf(code) !== -1;
}).filter(codeNotYetIncluded).forEach(add);
// rest defaults
_I18nUtils.DEFAULT_LANGUAGES.filter(codeNotYetIncluded).forEach(add);
// rest provided
provided.filter(codeNotYetIncluded).forEach(add);
return result;
}
function createEmptySuggestionsSelector() {
return (0, _reselect.defaultMemoize)(getEmptySuggestionsImpl);
}
/***/ }),
/* 404 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactRedux = __webpack_require__(44);
var _LanguageAutocomplete = __webpack_require__(208);
var _LanguageAutocomplete2 = _interopRequireDefault(_LanguageAutocomplete);
var _selectors = __webpack_require__(209);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var LanguageSelect = function (_PureComponent) {
(0, _inherits3.default)(LanguageSelect, _PureComponent);
function LanguageSelect() {
(0, _classCallCheck3.default)(this, LanguageSelect);
return (0, _possibleConstructorReturn3.default)(this, (LanguageSelect.__proto__ || Object.getPrototypeOf(LanguageSelect)).apply(this, arguments));
}
(0, _createClass3.default)(LanguageSelect, [{
key: 'render',
value: function render() {
var _props = this.props,
onChange = _props.onChange,
provided = _props.provided,
value = _props.value;
return _react2.default.createElement(_LanguageAutocomplete2.default, { onChange: onChange, provided: provided, value: value });
}
}]);
return LanguageSelect;
}(_react.PureComponent);
LanguageSelect.propTypes = {
provided: _propTypes2.default.arrayOf(_propTypes2.default.string),
onChange: _propTypes2.default.func.isRequired,
value: _propTypes2.default.string.isRequired
};
var mapStateToProps = function mapStateToProps(state) {
return {
provided: (0, _selectors.listLabelalikeLanguages)(state.entity)
};
};
var LanguageSelectConnected = (0, _reactRedux.connect)(mapStateToProps)(LanguageSelect);
exports.default = LanguageSelectConnected;
/***/ }),
/* 405 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(0), __webpack_require__(2)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else { var mod; }
})(this, function (module, exports, _react, _propTypes) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react2 = _interopRequireDefault(_react);
var _propTypes2 = _interopRequireDefault(_propTypes);
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");
}
}
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;
};
}();
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 _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 _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 uniq(arr) {
var out = [];
for (var i = 0; i < arr.length; i++) {
if (out.indexOf(arr[i]) === -1) {
out.push(arr[i]);
}
}
return out;
}
/* istanbul ignore next */
function getClipboardData(e) {
if (window.clipboardData) {
return window.clipboardData.getData('Text');
}
if (e.clipboardData) {
return e.clipboardData.getData('text/plain');
}
return '';
}
function defaultRenderTag(props) {
var tag = props.tag,
key = props.key,
disabled = props.disabled,
onRemove = props.onRemove,
classNameRemove = props.classNameRemove,
getTagDisplayValue = props.getTagDisplayValue,
other = _objectWithoutProperties(props, ['tag', 'key', 'disabled', 'onRemove', 'classNameRemove', 'getTagDisplayValue']);
return _react2.default.createElement(
'span',
_extends({ key: key }, other),
getTagDisplayValue(tag),
!disabled && _react2.default.createElement('a', { className: classNameRemove, onClick: function onClick(e) {
return onRemove(key);
} })
);
}
function defaultRenderInput(_ref) {
var addTag = _ref.addTag,
props = _objectWithoutProperties(_ref, ['addTag']);
var onChange = props.onChange,
value = props.value,
other = _objectWithoutProperties(props, ['onChange', 'value']);
return _react2.default.createElement('input', _extends({ type: 'text', onChange: onChange, value: value }, other));
}
function defaultRenderLayout(tagComponents, inputComponent) {
return _react2.default.createElement(
'span',
null,
tagComponents,
inputComponent
);
}
function defaultPasteSplit(data) {
return data.split(' ').map(function (d) {
return d.trim();
});
}
var defaultInputProps = {
className: 'react-tagsinput-input',
placeholder: 'Add a tag'
};
var TagsInput = function (_React$Component) {
_inherits(TagsInput, _React$Component);
/* istanbul ignore next */
function TagsInput() {
_classCallCheck(this, TagsInput);
var _this = _possibleConstructorReturn(this, (TagsInput.__proto__ || Object.getPrototypeOf(TagsInput)).call(this));
_this.state = { tag: '', isFocused: false };
_this.focus = _this.focus.bind(_this);
_this.blur = _this.blur.bind(_this);
return _this;
}
_createClass(TagsInput, [{
key: '_getTagDisplayValue',
value: function _getTagDisplayValue(tag) {
var tagDisplayProp = this.props.tagDisplayProp;
if (tagDisplayProp) {
return tag[tagDisplayProp];
}
return tag;
}
}, {
key: '_makeTag',
value: function _makeTag(tag) {
var tagDisplayProp = this.props.tagDisplayProp;
if (tagDisplayProp) {
return _defineProperty({}, tagDisplayProp, tag);
}
return tag;
}
}, {
key: '_removeTag',
value: function _removeTag(index) {
var value = this.props.value.concat([]);
if (index > -1 && index < value.length) {
var changed = value.splice(index, 1);
this.props.onChange(value, changed, [index]);
}
}
}, {
key: '_clearInput',
value: function _clearInput() {
if (this.hasControlledInput()) {
this.props.onChangeInput('');
} else {
this.setState({ tag: '' });
}
}
}, {
key: '_tag',
value: function _tag() {
if (this.hasControlledInput()) {
return this.props.inputValue;
}
return this.state.tag;
}
}, {
key: '_addTags',
value: function _addTags(tags) {
var _this2 = this;
var _props = this.props,
validationRegex = _props.validationRegex,
onChange = _props.onChange,
onValidationReject = _props.onValidationReject,
onlyUnique = _props.onlyUnique,
maxTags = _props.maxTags,
value = _props.value;
if (onlyUnique) {
tags = uniq(tags);
tags = tags.filter(function (tag) {
return value.every(function (currentTag) {
return _this2._getTagDisplayValue(currentTag) !== _this2._getTagDisplayValue(tag);
});
});
}
var rejectedTags = tags.filter(function (tag) {
return !validationRegex.test(_this2._getTagDisplayValue(tag));
});
tags = tags.filter(function (tag) {
return validationRegex.test(_this2._getTagDisplayValue(tag));
});
tags = tags.filter(function (tag) {
var tagDisplayValue = _this2._getTagDisplayValue(tag);
if (typeof tagDisplayValue.trim === 'function') {
return tagDisplayValue.trim().length > 0;
} else {
return tagDisplayValue;
}
});
if (maxTags >= 0) {
var remainingLimit = Math.max(maxTags - value.length, 0);
tags = tags.slice(0, remainingLimit);
}
if (onValidationReject && rejectedTags.length > 0) {
onValidationReject(rejectedTags);
}
if (tags.length > 0) {
var newValue = value.concat(tags);
var indexes = [];
for (var i = 0; i < tags.length; i++) {
indexes.push(value.length + i);
}
onChange(newValue, tags, indexes);
this._clearInput();
return true;
}
if (rejectedTags.length > 0) {
return false;
}
this._clearInput();
return false;
}
}, {
key: '_shouldPreventDefaultEventOnAdd',
value: function _shouldPreventDefaultEventOnAdd(added, empty, keyCode) {
if (added) {
return true;
}
if (keyCode === 13) {
return this.props.preventSubmit || !this.props.preventSubmit && !empty;
}
return false;
}
}, {
key: 'focus',
value: function focus() {
if (this.input && typeof this.input.focus === 'function') {
this.input.focus();
}
this.handleOnFocus();
}
}, {
key: 'blur',
value: function blur() {
if (this.input && typeof this.input.blur === 'function') {
this.input.blur();
}
this.handleOnBlur();
}
}, {
key: 'accept',
value: function accept() {
var tag = this._tag();
if (tag !== '') {
tag = this._makeTag(tag);
return this._addTags([tag]);
}
return false;
}
}, {
key: 'addTag',
value: function addTag(tag) {
return this._addTags([tag]);
}
}, {
key: 'clearInput',
value: function clearInput() {
this._clearInput();
}
}, {
key: 'handlePaste',
value: function handlePaste(e) {
var _this3 = this;
var _props2 = this.props,
addOnPaste = _props2.addOnPaste,
pasteSplit = _props2.pasteSplit;
if (!addOnPaste) {
return;
}
e.preventDefault();
var data = getClipboardData(e);
var tags = pasteSplit(data).map(function (tag) {
return _this3._makeTag(tag);
});
this._addTags(tags);
}
}, {
key: 'handleKeyDown',
value: function handleKeyDown(e) {
if (e.defaultPrevented) {
return;
}
var _props3 = this.props,
value = _props3.value,
removeKeys = _props3.removeKeys,
addKeys = _props3.addKeys;
var tag = this._tag();
var empty = tag === '';
var keyCode = e.keyCode;
var key = e.key;
var add = addKeys.indexOf(keyCode) !== -1 || addKeys.indexOf(key) !== -1;
var remove = removeKeys.indexOf(keyCode) !== -1 || removeKeys.indexOf(key) !== -1;
if (add) {
var added = this.accept();
if (this._shouldPreventDefaultEventOnAdd(added, empty, keyCode)) {
e.preventDefault();
}
}
if (remove && value.length > 0 && empty) {
e.preventDefault();
this._removeTag(value.length - 1);
}
}
}, {
key: 'handleClick',
value: function handleClick(e) {
if (e.target === this.div) {
this.focus();
}
}
}, {
key: 'handleChange',
value: function handleChange(e) {
var onChangeInput = this.props.onChangeInput;
var onChange = this.props.inputProps.onChange;
var tag = e.target.value;
if (onChange) {
onChange(e);
}
if (this.hasControlledInput()) {
onChangeInput(tag);
} else {
this.setState({ tag: tag });
}
}
}, {
key: 'handleOnFocus',
value: function handleOnFocus(e) {
var onFocus = this.props.inputProps.onFocus;
if (onFocus) {
onFocus(e);
}
this.setState({ isFocused: true });
}
}, {
key: 'handleOnBlur',
value: function handleOnBlur(e) {
var onBlur = this.props.inputProps.onBlur;
this.setState({ isFocused: false });
if (e == null) {
return;
}
if (onBlur) {
onBlur(e);
}
if (this.props.addOnBlur) {
var tag = this._makeTag(e.target.value);
this._addTags([tag]);
}
}
}, {
key: 'handleRemove',
value: function handleRemove(tag) {
this._removeTag(tag);
}
}, {
key: 'inputProps',
value: function inputProps() {
var _props$inputProps = this.props.inputProps,
onChange = _props$inputProps.onChange,
onFocus = _props$inputProps.onFocus,
onBlur = _props$inputProps.onBlur,
otherInputProps = _objectWithoutProperties(_props$inputProps, ['onChange', 'onFocus', 'onBlur']);
var props = _extends({}, defaultInputProps, otherInputProps);
if (this.props.disabled) {
props.disabled = true;
}
return props;
}
}, {
key: 'inputValue',
value: function inputValue(props) {
return props.currentValue || props.inputValue || '';
}
}, {
key: 'hasControlledInput',
value: function hasControlledInput() {
var _props4 = this.props,
inputValue = _props4.inputValue,
onChangeInput = _props4.onChangeInput;
return typeof onChangeInput === 'function' && typeof inputValue === 'string';
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
if (this.hasControlledInput()) {
return;
}
this.setState({
tag: this.inputValue(this.props)
});
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
/* istanbul ignore next */
if (this.hasControlledInput()) {
return;
}
if (!this.inputValue(nextProps)) {
return;
}
this.setState({
tag: this.inputValue(nextProps)
});
}
}, {
key: 'render',
value: function render() {
var _this4 = this;
var _props5 = this.props,
value = _props5.value,
onChange = _props5.onChange,
tagProps = _props5.tagProps,
renderLayout = _props5.renderLayout,
renderTag = _props5.renderTag,
renderInput = _props5.renderInput,
addKeys = _props5.addKeys,
removeKeys = _props5.removeKeys,
className = _props5.className,
focusedClassName = _props5.focusedClassName,
addOnBlur = _props5.addOnBlur,
addOnPaste = _props5.addOnPaste,
inputProps = _props5.inputProps,
pasteSplit = _props5.pasteSplit,
onlyUnique = _props5.onlyUnique,
maxTags = _props5.maxTags,
validationRegex = _props5.validationRegex,
disabled = _props5.disabled,
tagDisplayProp = _props5.tagDisplayProp,
inputValue = _props5.inputValue,
onChangeInput = _props5.onChangeInput,
other = _objectWithoutProperties(_props5, ['value', 'onChange', 'tagProps', 'renderLayout', 'renderTag', 'renderInput', 'addKeys', 'removeKeys', 'className', 'focusedClassName', 'addOnBlur', 'addOnPaste', 'inputProps', 'pasteSplit', 'onlyUnique', 'maxTags', 'validationRegex', 'disabled', 'tagDisplayProp', 'inputValue', 'onChangeInput']);
var isFocused = this.state.isFocused;
if (isFocused) {
className += ' ' + focusedClassName;
}
var tagComponents = value.map(function (tag, index) {
return renderTag(_extends({
key: index,
tag: tag,
onRemove: _this4.handleRemove.bind(_this4),
disabled: disabled,
getTagDisplayValue: _this4._getTagDisplayValue.bind(_this4)
}, tagProps));
});
var inputComponent = renderInput(_extends({
ref: function ref(r) {
_this4.input = r;
},
value: this._tag(),
onPaste: this.handlePaste.bind(this),
onKeyDown: this.handleKeyDown.bind(this),
onChange: this.handleChange.bind(this),
onFocus: this.handleOnFocus.bind(this),
onBlur: this.handleOnBlur.bind(this),
addTag: this.addTag.bind(this)
}, this.inputProps()));
return _react2.default.createElement(
'div',
{ ref: function ref(r) {
_this4.div = r;
}, onClick: this.handleClick.bind(this), className: className },
renderLayout(tagComponents, inputComponent)
);
}
}]);
return TagsInput;
}(_react2.default.Component);
TagsInput.defaultProps = {
className: 'react-tagsinput',
focusedClassName: 'react-tagsinput--focused',
addKeys: [9, 13],
addOnBlur: false,
addOnPaste: false,
inputProps: {},
removeKeys: [8],
renderInput: defaultRenderInput,
renderTag: defaultRenderTag,
renderLayout: defaultRenderLayout,
pasteSplit: defaultPasteSplit,
tagProps: { className: 'react-tagsinput-tag', classNameRemove: 'react-tagsinput-remove' },
onlyUnique: false,
maxTags: -1,
validationRegex: /.*/,
disabled: false,
tagDisplayProp: null,
preventSubmit: true
};
exports.default = TagsInput;
module.exports = exports['default'];
});
/***/ }),
/* 406 */
/***/ (function(module, exports) {
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFM5nMAAAAxwTYEwAAAAJ0Uk5T/wDltzBKAAAAIUlEQVR42mJgRAMMIAwHMAEUWawC6FqIMJR0Adq7FCDAAFpQAKmLXpNgAAAAAElFTkSuQmCC"
/***/ }),
/* 407 */
/***/ (function(module, exports) {
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFM5nM////x7r+AQAAAAJ0Uk5T/wDltzBKAAAAIUlEQVR42mJgRAMMIAwHMAEUWawC6FoGylDSBVAAQIABAF+gAKmcsubrAAAAAElFTkSuQmCC"
/***/ }),
/* 408 */
/***/ (function(module, exports) {
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFM5nMAAAAxwTYEwAAAAJ0Uk5T/wDltzBKAAAAHUlEQVR42mJgRAMMIAwH5AsQYSiKLFYB+hsKEGAAVQAAqUU0xvoAAAAASUVORK5CYII="
/***/ }),
/* 409 */
/***/ (function(module, exports) {
module.exports = function escape(url) {
if (typeof url !== 'string') {
return url
}
// If url is already wrapped in quotes, remove them
if (/^['"].*['"]$/.test(url)) {
url = url.slice(1, -1);
}
// Should url be wrapped?
// See https://drafts.csswg.org/css-values-3/#urls
if (/["'() \t\n]/.test(url)) {
return '"' + url.replace(/"/g, '\\"').replace(/\n/g, '\\n') + '"'
}
return url
}
/***/ }),
/* 410 */
/***/ (function(module, exports, __webpack_require__) {
var escape = __webpack_require__(409);
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, "/*Form level*/\r\n\r\n/* table are used for layout*/\r\n.core__wef_dialog___1DXxG table, .core__wef_dialog___1DXxG tbody, .core__wef_dialog___1DXxG tr, .core__wef_dialog___1DXxG th, .core__wef_dialog___1DXxG td {\r\n\tpadding: 0;\r\n\tmargin: 0;\r\n\tborder: 0;\r\n}\r\n\r\n.core__wef_dialog___1DXxG input {\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.core__wef_progress_item___8dRVj {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.core__wef_table___39yTD {\r\n\twidth: 100%;\r\n\tborder-spacing: 0;\r\n\tborder-collapse: collapse;\r\n}\r\n\r\n.core__wef_table___39yTD table {\r\n\tborder-spacing: 0;\r\n\tborder-collapse: collapse;\r\n}\r\n\r\n/* Labels editor */\r\n.core__wef_labels_description_area___326LY {\r\n\tpadding: 0 1em !important;\r\n}\r\n\r\n.core__wef_labels_description_area___326LY legend select {\r\n\tvertical-align: middle;\r\n}\r\n\r\n.core__wef_labels_description_area___326LY th {\r\n\ttext-align: left;\r\n\tvertical-align: middle;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.core__wef_labels_description_area___326LY td, .core__wef_labels_description_area___326LY input {\r\n\twidth: 100%;\r\n}\r\n\r\n/*Properties level */\r\n.core__wef-rankselector-menu___27EHI {\r\n\twidth: 100%;\r\n}\r\n\r\n.core__wef-rankselector-menu___27EHI option {\r\n\tpadding: 0.25em;\r\n}\r\n\r\n.ui-button .core__ui-icon-wef-snaktype-value___3f4D-, .ui-button.ui-state-hover .core__ui-icon-wef-snaktype-value___3f4D- {\r\n background-image: url(" + escape(__webpack_require__(408)) + ");\r\n width: 16px;\r\n height: 16px;\r\n}\r\n\r\n.ui-button .core__ui-icon-wef-snaktype-novalue___44p44, .ui-button.ui-state-hover .core__ui-icon-wef-snaktype-novalue___44p44 {\r\n background-image: url(" + escape(__webpack_require__(407)) + ");\r\n width: 16px;\r\n height: 16px;\r\n}\r\n\r\n.ui-button .core__ui-icon-wef-snaktype-somevalue___MDyAu, .ui-button.ui-state-hover .core__ui-icon-wef-snaktype-somevalue___MDyAu {\r\n background-image: url(" + escape(__webpack_require__(406)) + ");\r\n width: 16px;\r\n height: 16px;\r\n}\r\n\r\n.core__wef_property_editor_column_cell___2gaAd {\r\n\tmin-width: 150px;\r\n}\r\n\r\n.core__wef_property_editor_column_table___XL0az {\r\n\twidth: 100%;\r\n}\r\n\r\n.core__wef_columns_table___2D4Lc {\r\n\twidth: 100%;\r\n}\r\n\r\n/*Snak level */\r\n.core__wef_snak_table___2EliP {\r\n\twidth: 100%;\r\n}\r\n\r\n.core__wef_snak_table_value_editor_cell___MgeU9 {\r\n\twidth: 100%;\r\n}\r\n\r\n.core__wef_snak_type_label___1LR3F {\r\n\tfont-style: italic;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.core__wef-snaktypeselector-menu___2LoR1 {\r\n\twidth: 100%;\r\n}\r\n\r\n.core__wef-snaktypeselector-menu___2LoR1 option {\r\n\tpadding: 0.25em;\r\n}\r\n\r\n/* Snak value level -- per types */\r\n.core__wef_string___10eMO, .core__wef_url___35pO_ {\r\n\twidth: 99%;\r\n}\r\n\r\n.core__wef_snak_replacement_label_time___2MaAl, .core__wef_snak_replacement_label_time_days___2ixvS,\r\n\t.core__wef_snak_replacement_label_time_months___2pez8,\r\n\t.core__wef_snak_replacement_label_time_years___272Ro {\r\n\twhite-space: nowrap;\r\n\tcursor: pointer;\r\n}\r\n\r\n.core__wef_external-id___jcdi0 {\r\n\tmin-width: 10em;\r\n}\r\n\r\n.core__wef_external_links_before_url_cell___3QIEt {\r\n\tmin-width: 17em;\r\n\twidth: initial !important;\r\n}\r\n\r\n.core__wef_external_links_url_cell___1sy2F {\r\n\tpadding-left: 0.5em !important;\r\n\twidth: 100%;\r\n}\r\n\r\n.core__wef_external_links_url_div___1WE-N {\r\n\tposition: relative;\r\n}\r\n\r\n.core__wef_external_links_url_a___2fSgv {\r\n\ttext-overflow: ellipsis;\r\n\tleft: 0;\r\n\tright: 0;\r\n\ttop: -0.5em;\r\n\toverflow: hidden;\r\n\tposition: absolute;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n/*Snak value level -- per types: GLOBE-COORDINATE */\r\n.core__wef_globecoordinate_table___7L1Yo th {\r\n\ttext-align: left;\r\n\tpadding-right: 1em;\r\n\tpadding-left: 0.5em;\r\n}\r\n\r\n.core__wef_globecoordinate_table___7L1Yo input, .core__wef_globecoordinate_table___7L1Yo select {\r\n\twidth: 14em;\r\n}\r\n\r\n/*Snak value level -- per types: QUANTITY */\r\n.core__wef_quantity_table___3jFwh th {\r\n\ttext-align: left;\r\n}\r\n\r\n/*Snak value level -- per types: TIME */\r\n.core__wef_time_table___1VtRD th {\r\n\ttext-align: left;\r\n}\r\n\r\n.core__wef_snak_value_editor_time___UyKKh input, .core__wef_snak_value_editor_time___UyKKh select {\r\n\twidth: 15em;\r\n}\r\n\r\n/*Snak value level -- per types: TIME-DAYS */\r\n.core__wef_snak_value_editor_time-days___1DwBC {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.core__wef_time_day___2W_Mr {\r\n\twidth: 3em;\r\n}\r\n\r\n.core__wef_time_year___1LE9i {\r\n\twidth: 8em;\r\n}\r\n\r\n.core__wef_property_editor_column_table___XL0az .core__wef_time_oldstyle_span___341ko:before {\r\n\tcontent: '\\A';\r\n\twhite-space: pre;\r\n}\r\n\r\n/*Snak value level -- per types: TIME-MONTHS */\r\n.core__wef_snak_value_editor_time-months___1nP4z {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.core__wef_snak_value_editor_time-months___1nP4z input {\r\n\twidth: 6em;\r\n}\r\n\r\n/*Snak value level -- per types: TIME-YEARS */\r\n.core__wef_snak_value_editor_time-years___2-Nv- {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.core__wef_snak_value_editor_time-years___2-Nv- input {\r\n\twidth: 6em;\r\n}\r\n\r\n.core__wef_editor_menu___2CNeP {\r\n\tborder: 1px solid #CCC;\r\n\tposition: absolute;\r\n\tz-index: +1;\r\n}\r\n\r\n.core__wef_editor_menu___2CNeP option {\r\n\tpadding: 0.25em;\r\n}\r\n\r\n/* Qualifiers only */\r\n.core__wef_qualifiers___4QRkF {\r\n\twidth: 100%;\r\n}\r\n\r\n.core__wef_qualifiers_select_cell___JwtOR {\r\n\twidth: 1px;\r\n\tfont-weight: bold;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n/* References */\r\n.core__wef_reference_editor___1TYS0 {\r\n\twidth: 100%;\r\n\tborder-bottom: thin dotted #000000;\r\n}\r\n\r\n.core__wef_reference_editor_ref___3DF4B {\r\n\tcursor: pointer;\r\n}\r\n\r\n.core__wef_reference_editor_table___2nYFM {\r\n\tpadding-top: 2em;\r\n}\r\n\r\n.core__wef_references_editor_dialog___Wt7oG .ui-dialog-buttonset {\r\n\tfloat: none !important;\r\n}\r\n\r\n/** Editors */\r\n.core__wef_editor_dialog___Hqx-V table, .core__wef_editor_dialog___Hqx-V tbody, .core__wef_editor_dialog___Hqx-V tr,\r\n\t.core__wef_editor_dialog___Hqx-V th, .core__wef_editor_dialog___Hqx-V td {\r\n\tpadding: 0;\r\n\tmargin: 0;\r\n\tline-height: 1.2em;\r\n}\r\n\r\n.core__wef_editor_dialog___Hqx-V .core__wef_fieldset___2XTPQ {\r\n\tmargin: 0.1em;\r\n\tpadding: 0.1em;\r\n\tline-height: 0.75em;\r\n}\r\n\r\n/* i18n support -- empty classes for anchoring */\r\n.core__wef_i18n_label___33kbK {}\r\n.core__wef_i18n_description___2idxS {}\r\n.core__wef_i18n_description_as_title___1dJW3 {}\r\n", ""]);
// exports
exports.locals = {
"wef_dialog": "core__wef_dialog___1DXxG",
"wef_progress_item": "core__wef_progress_item___8dRVj",
"wef_table": "core__wef_table___39yTD",
"wef_labels_description_area": "core__wef_labels_description_area___326LY",
"wef-rankselector-menu": "core__wef-rankselector-menu___27EHI",
"ui-icon-wef-snaktype-value": "core__ui-icon-wef-snaktype-value___3f4D-",
"ui-icon-wef-snaktype-novalue": "core__ui-icon-wef-snaktype-novalue___44p44",
"ui-icon-wef-snaktype-somevalue": "core__ui-icon-wef-snaktype-somevalue___MDyAu",
"wef_property_editor_column_cell": "core__wef_property_editor_column_cell___2gaAd",
"wef_property_editor_column_table": "core__wef_property_editor_column_table___XL0az",
"wef_columns_table": "core__wef_columns_table___2D4Lc",
"wef_snak_table": "core__wef_snak_table___2EliP",
"wef_snak_table_value_editor_cell": "core__wef_snak_table_value_editor_cell___MgeU9",
"wef_snak_type_label": "core__wef_snak_type_label___1LR3F",
"wef-snaktypeselector-menu": "core__wef-snaktypeselector-menu___2LoR1",
"wef_string": "core__wef_string___10eMO",
"wef_url": "core__wef_url___35pO_",
"wef_snak_replacement_label_time": "core__wef_snak_replacement_label_time___2MaAl",
"wef_snak_replacement_label_time_days": "core__wef_snak_replacement_label_time_days___2ixvS",
"wef_snak_replacement_label_time_months": "core__wef_snak_replacement_label_time_months___2pez8",
"wef_snak_replacement_label_time_years": "core__wef_snak_replacement_label_time_years___272Ro",
"wef_external-id": "core__wef_external-id___jcdi0",
"wef_external_links_before_url_cell": "core__wef_external_links_before_url_cell___3QIEt",
"wef_external_links_url_cell": "core__wef_external_links_url_cell___1sy2F",
"wef_external_links_url_div": "core__wef_external_links_url_div___1WE-N",
"wef_external_links_url_a": "core__wef_external_links_url_a___2fSgv",
"wef_globecoordinate_table": "core__wef_globecoordinate_table___7L1Yo",
"wef_quantity_table": "core__wef_quantity_table___3jFwh",
"wef_time_table": "core__wef_time_table___1VtRD",
"wef_snak_value_editor_time": "core__wef_snak_value_editor_time___UyKKh",
"wef_snak_value_editor_time-days": "core__wef_snak_value_editor_time-days___1DwBC",
"wef_time_day": "core__wef_time_day___2W_Mr",
"wef_time_year": "core__wef_time_year___1LE9i",
"wef_time_oldstyle_span": "core__wef_time_oldstyle_span___341ko",
"wef_snak_value_editor_time-months": "core__wef_snak_value_editor_time-months___1nP4z",
"wef_snak_value_editor_time-years": "core__wef_snak_value_editor_time-years___2-Nv-",
"wef_editor_menu": "core__wef_editor_menu___2CNeP",
"wef_qualifiers": "core__wef_qualifiers___4QRkF",
"wef_qualifiers_select_cell": "core__wef_qualifiers_select_cell___JwtOR",
"wef_reference_editor": "core__wef_reference_editor___1TYS0",
"wef_reference_editor_ref": "core__wef_reference_editor_ref___3DF4B",
"wef_reference_editor_table": "core__wef_reference_editor_table___2nYFM",
"wef_references_editor_dialog": "core__wef_references_editor_dialog___Wt7oG",
"wef_editor_dialog": "core__wef_editor_dialog___Hqx-V",
"wef_fieldset": "core__wef_fieldset___2XTPQ",
"wef_i18n_label": "core__wef_i18n_label___33kbK",
"wef_i18n_description": "core__wef_i18n_description___2idxS",
"wef_i18n_description_as_title": "core__wef_i18n_description_as_title___1dJW3"
};
/***/ }),
/* 411 */
/***/ (function(module, exports) {
/**
* When source maps are enabled, `style-loader` uses a link element with a data-uri to
* embed the css on the page. This breaks all relative urls because now they are relative to a
* bundle instead of the current page.
*
* One solution is to only use full urls, but that may be impossible.
*
* Instead, this function "fixes" the relative urls to be absolute according to the current page location.
*
* A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
*
*/
module.exports = function (css) {
// get current location
var location = typeof window !== "undefined" && window.location;
if (!location) {
throw new Error("fixUrls requires window.location");
}
// blank or null?
if (!css || typeof css !== "string") {
return css;
}
var baseUrl = location.protocol + "//" + location.host;
var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
// convert each url(...)
/*
This regular expression is just a way to recursively match brackets within
a string.
/url\s*\( = Match on the word "url" with any whitespace after it and then a parens
( = Start a capturing group
(?: = Start a non-capturing group
[^)(] = Match anything that isn't a parentheses
| = OR
\( = Match a start parentheses
(?: = Start another non-capturing groups
[^)(]+ = Match anything that isn't a parentheses
| = OR
\( = Match a start parentheses
[^)(]* = Match anything that isn't a parentheses
\) = Match a end parentheses
) = End Group
*\) = Match anything and then a close parens
) = Close non-capturing group
* = Match anything
) = Close capturing group
\) = Match a close parens
/gi = Get all matches, not the first. Be case insensitive.
*/
var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
// strip quotes (if they exist)
var unquotedOrigUrl = origUrl
.trim()
.replace(/^"(.*)"$/, function(o, $1){ return $1; })
.replace(/^'(.*)'$/, function(o, $1){ return $1; });
// already a full url? no change
if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
return fullMatch;
}
// convert the url to a full url
var newUrl;
if (unquotedOrigUrl.indexOf("//") === 0) {
//TODO: should we add protocol?
newUrl = unquotedOrigUrl;
} else if (unquotedOrigUrl.indexOf("/") === 0) {
// path should be relative to the base url
newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
} else {
// path should be relative to current directory
newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
}
// send back the fixed url(...)
return "url(" + JSON.stringify(newUrl) + ")";
});
// send back the fixed css
return fixedCss;
};
/***/ }),
/* 412 */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(16)(false);
// imports
// module
exports.push([module.i, ".labelalike__react-tagsinput___3EHHA {\r\n}\r\n\r\n.labelalike__react-tagsinput--focused___2r4Aa {\r\n}\r\n\r\n.labelalike__react-tagsinput-tag___38mlb::before {\r\n content: \"\\A0\";\r\n}\r\n\r\n.labelalike__react-tagsinput-tag___38mlb {\r\n background: white;\r\n border: 1px solid lightgray;\r\n display: inline-block;\r\n margin-bottom: 1px;\r\n margin-right: 1px;\r\n padding: 1px;\r\n}\r\n\r\n.labelalike__react-tagsinput-remove___pKKml {\r\n cursor: pointer;\r\n font-weight: bold;\r\n}\r\n\r\n.labelalike__react-tagsinput-tag___38mlb a::before {\r\n content: \"\\A0\\D7\\A0\";\r\n}\r\n\r\n.labelalike__react-tagsinput-input___3gvdE {\r\n margin-top: 1px;\r\n}\r\n", ""]);
// exports
exports.locals = {
"react-tagsinput": "labelalike__react-tagsinput___3EHHA",
"react-tagsinput--focused": "labelalike__react-tagsinput--focused___2r4Aa",
"react-tagsinput-tag": "labelalike__react-tagsinput-tag___38mlb",
"react-tagsinput-remove": "labelalike__react-tagsinput-remove___pKKml",
"react-tagsinput-input": "labelalike__react-tagsinput-input___3gvdE"
};
/***/ }),
/* 413 */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(412);
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(15)(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/* 414 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _labelalike = __webpack_require__(413);
var _labelalike2 = _interopRequireDefault(_labelalike);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _core3 = __webpack_require__(33);
var _core4 = _interopRequireDefault(_core3);
var _reactTagsinput = __webpack_require__(405);
var _reactTagsinput2 = _interopRequireDefault(_reactTagsinput);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var INPUT_PROPS = {
className: _labelalike2.default['react-tagsinput-input'],
placeholder: _core2.default.placeholderAliases
};
var TAG_PROPS = {
className: _labelalike2.default['react-tagsinput-tag'],
classNameRemove: _labelalike2.default['react-tagsinput-remove']
};
var SingleLanguageEditor = function (_PureComponent) {
(0, _inherits3.default)(SingleLanguageEditor, _PureComponent);
function SingleLanguageEditor() {
(0, _classCallCheck3.default)(this, SingleLanguageEditor);
var _this = (0, _possibleConstructorReturn3.default)(this, (SingleLanguageEditor.__proto__ || Object.getPrototypeOf(SingleLanguageEditor)).apply(this, arguments));
_this.handleLabelChange = _this.handleLabelChange.bind(_this);
_this.handleDescriptionChange = _this.handleDescriptionChange.bind(_this);
return _this;
}
(0, _createClass3.default)(SingleLanguageEditor, [{
key: 'handleLabelChange',
value: function handleLabelChange(event) {
this.props.onLabelChange(event.target.value || '');
}
}, {
key: 'handleDescriptionChange',
value: function handleDescriptionChange(event) {
this.props.onDescriptionChange(event.target.value || '');
}
}, {
key: 'render',
value: function render() {
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "on.*Change" }] */
var _props = this.props,
label = _props.label,
description = _props.description,
aliases = _props.aliases,
onLabelChange = _props.onLabelChange,
onDescriptionChange = _props.onDescriptionChange,
onAliasesChange = _props.onAliasesChange,
other = (0, _objectWithoutProperties3.default)(_props, ['label', 'description', 'aliases', 'onLabelChange', 'onDescriptionChange', 'onAliasesChange']);
return _react2.default.createElement(
'table',
(0, _extends3.default)({ className: _core4.default.wef_table + ' ' + _core4.default.wef_labels_description_area }, other),
_react2.default.createElement(
'tbody',
null,
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'th',
null,
_core2.default.labelLabel
),
_react2.default.createElement(
'td',
null,
_react2.default.createElement('input', { onChange: this.handleLabelChange, value: label })
)
),
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'th',
null,
_core2.default.labelDescription
),
_react2.default.createElement(
'td',
null,
_react2.default.createElement('input', { onChange: this.handleDescriptionChange, value: description })
)
),
_react2.default.createElement(
'tr',
null,
_react2.default.createElement(
'th',
null,
_core2.default.labelAliases
),
_react2.default.createElement(
'td',
null,
_react2.default.createElement(_reactTagsinput2.default, {
className: _labelalike2.default['react-tagsinput'],
focusedClassName: _labelalike2.default['react-tagsinput--focused'],
inputProps: INPUT_PROPS,
onChange: onAliasesChange,
onlyUnique: true,
tagProps: TAG_PROPS,
value: aliases })
)
)
)
);
}
}]);
return SingleLanguageEditor;
}(_react.PureComponent);
SingleLanguageEditor.propTypes = {
label: _propTypes2.default.string,
description: _propTypes2.default.string,
aliases: _propTypes2.default.arrayOf(_propTypes2.default.string),
onLabelChange: _propTypes2.default.func.isRequired,
onDescriptionChange: _propTypes2.default.func.isRequired,
onAliasesChange: _propTypes2.default.func.isRequired
};
SingleLanguageEditor.defaultProps = {
label: '',
description: '',
aliases: []
};
exports.default = SingleLanguageEditor;
/***/ }),
/* 415 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _selectors = __webpack_require__(209);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactRedux = __webpack_require__(44);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _SingleLanguageEditor = __webpack_require__(414);
var _SingleLanguageEditor2 = _interopRequireDefault(_SingleLanguageEditor);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Controller = function (_Component) {
(0, _inherits3.default)(Controller, _Component);
function Controller() {
(0, _classCallCheck3.default)(this, Controller);
var _this = (0, _possibleConstructorReturn3.default)(this, (Controller.__proto__ || Object.getPrototypeOf(Controller)).apply(this, arguments));
_this.state = {
language: mw.config.get('wgContentLanguage')
};
_this.handleLabelChange = _this.handleLabelChange.bind(_this);
_this.handleDescriptionChange = _this.handleDescriptionChange.bind(_this);
_this.handleAliasesChange = _this.handleAliasesChange.bind(_this);
return _this;
}
(0, _createClass3.default)(Controller, [{
key: 'handleLabelChange',
value: function handleLabelChange(newValue) {
this.props.onLabelChange(!newValue || newValue.length === 0 ? undefined : { language: this.state.language, value: newValue });
}
}, {
key: 'handleDescriptionChange',
value: function handleDescriptionChange(newValue) {
this.props.onDescriptionChange(!newValue || newValue.length === 0 ? undefined : { language: this.state.language, value: newValue });
}
}, {
key: 'handleAliasesChange',
value: function handleAliasesChange(tags) {
var _this2 = this;
var aliases = (tags || []).filter(function (item) {
return item.length > 0;
});
this.props.onAliasesChange(aliases.length === 0 ? undefined : aliases.map(function (alias) {
return { language: _this2.state.language, value: alias };
}));
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
label = _props.label,
description = _props.description,
aliases = _props.aliases;
var _labelValue = (0, _selectors.labelValue)(label);
var _descriptionValue = (0, _selectors.descriptionValue)(description);
var _aliasValues = (0, _selectors.aliasValues)(aliases);
return _react2.default.createElement(_SingleLanguageEditor2.default, {
aliases: _aliasValues, description: _descriptionValue, label: _labelValue,
onAliasesChange: this.handleAliasesChange, onDescriptionChange: this.handleDescriptionChange, onLabelChange: this.handleLabelChange });
}
}]);
return Controller;
}(_react.Component);
Controller.propTypes = {
label: _propTypes2.default.object,
description: _propTypes2.default.object,
aliases: _propTypes2.default.arrayOf(_propTypes2.default.object),
onLabelChange: _propTypes2.default.func.isRequired,
onDescriptionChange: _propTypes2.default.func.isRequired,
onAliasesChange: _propTypes2.default.func.isRequired
};
var mapStateToProps = function mapStateToProps(state, ownProps) {
return {
label: (0, _selectors.labelFromEntityByLanguage)(state.entity, ownProps.language),
description: (0, _selectors.descriptionFromEntityByLanguage)(state.entity, ownProps.language),
aliases: (0, _selectors.aliasesFromEntityByLanguage)(state.entity, ownProps.language)
};
};
var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
return {
onLabelChange: function onLabelChange(newValue) {
return dispatch({ type: 'LABELS_CHANGE', language: ownProps.language, newValue: newValue });
},
onDescriptionChange: function onDescriptionChange(newValue) {
return dispatch({ type: 'DESCRIPTION_CHANGE', language: ownProps.language, newValue: newValue });
},
onAliasesChange: function onAliasesChange(newValue) {
return dispatch({ type: 'ALIASES_CHANGE', language: ownProps.language, newValue: newValue });
}
};
};
var ControllerConnected = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Controller);
exports.default = ControllerConnected;
/***/ }),
/* 416 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _Controller = __webpack_require__(415);
var _Controller2 = _interopRequireDefault(_Controller);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _LanguageSelect = __webpack_require__(404);
var _LanguageSelect2 = _interopRequireDefault(_LanguageSelect);
var _core3 = __webpack_require__(33);
var _core4 = _interopRequireDefault(_core3);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var LanguageSelectContainer = function (_PureComponent) {
(0, _inherits3.default)(LanguageSelectContainer, _PureComponent);
function LanguageSelectContainer() {
(0, _classCallCheck3.default)(this, LanguageSelectContainer);
var _this = (0, _possibleConstructorReturn3.default)(this, (LanguageSelectContainer.__proto__ || Object.getPrototypeOf(LanguageSelectContainer)).apply(this, arguments));
_this.state = {
language: mw.config.get('wgContentLanguage')
};
_this.handleLanguageChange = _this.handleLanguageChange.bind(_this);
return _this;
}
(0, _createClass3.default)(LanguageSelectContainer, [{
key: 'handleLanguageChange',
value: function handleLanguageChange(langCode) {
this.setState({
language: langCode
});
}
}, {
key: 'render',
value: function render() {
var language = this.state.language;
return _react2.default.createElement(
'fieldset',
{ className: _core4.default.wef_fieldset + ' ' + _core4.default.wef_labels_description_area },
_react2.default.createElement(
'legend',
null,
_core2.default.labelLabels,
':\xA0\xA0\xA0',
_react2.default.createElement(_LanguageSelect2.default, { onChange: this.handleLanguageChange, value: language })
),
_react2.default.createElement(_Controller2.default, { language: language })
);
}
}]);
return LanguageSelectContainer;
}(_react.PureComponent);
exports.default = LanguageSelectContainer;
/***/ }),
/* 417 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _I18nUtils = __webpack_require__(17);
var en = {
labelDisplayEmpty: 'display empty:',
labelQuickSearchTerm: 'quick search:'
};
var ru = {
labelDisplayEmpty: 'показывать незаполненные:',
labelQuickSearchTerm: 'быстрый поиск:'
};
var translations = { en: en, ru: ru };
var result = (0, _I18nUtils.localize)({}, translations);
exports.default = result;
/***/ }),
/* 418 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ChildrenBuilder = __webpack_require__(141);
var _ChildrenBuilder2 = _interopRequireDefault(_ChildrenBuilder);
var _EntityLabel = __webpack_require__(54);
var _EntityLabel2 = _interopRequireDefault(_EntityLabel);
var _FormShapes = __webpack_require__(90);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var FieldsetBuilder = function (_PureComponent) {
(0, _inherits3.default)(FieldsetBuilder, _PureComponent);
function FieldsetBuilder() {
(0, _classCallCheck3.default)(this, FieldsetBuilder);
return (0, _possibleConstructorReturn3.default)(this, (FieldsetBuilder.__proto__ || Object.getPrototypeOf(FieldsetBuilder)).apply(this, arguments));
}
(0, _createClass3.default)(FieldsetBuilder, [{
key: 'render',
value: function render() {
var fieldset = this.props.fieldset;
var label = fieldset.label,
labelEntityId = fieldset.labelEntityId,
etc = (0, _objectWithoutProperties3.default)(fieldset, ['label', 'labelEntityId']);
return _react2.default.createElement(
'fieldset',
null,
label && _react2.default.createElement(
'legend',
null,
label
),
labelEntityId && _react2.default.createElement(
'legend',
null,
_react2.default.createElement(_EntityLabel2.default, { entityId: labelEntityId })
),
_react2.default.createElement(_ChildrenBuilder2.default, (0, _extends3.default)({ parentLabelEntityId: labelEntityId }, etc))
);
}
}]);
return FieldsetBuilder;
}(_react.PureComponent);
FieldsetBuilder.propTypes = {
fieldset: _propTypes2.default.shape(_FormShapes.FieldsetShape).isRequired
};
exports.default = FieldsetBuilder;
/***/ }),
/* 419 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ErrorBoundary = function (_PureComponent) {
(0, _inherits3.default)(ErrorBoundary, _PureComponent);
function ErrorBoundary() {
var _ref;
var _temp, _this, _ret;
(0, _classCallCheck3.default)(this, ErrorBoundary);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ErrorBoundary.__proto__ || Object.getPrototypeOf(ErrorBoundary)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
hasError: false
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
(0, _createClass3.default)(ErrorBoundary, [{
key: 'componentDidCatch',
value: function componentDidCatch(error, info) {
this.setState({ hasError: true });
mw.log.error(error);
mw.log.error(info);
}
}, {
key: 'render',
value: function render() {
if (this.state.hasError) {
return _react2.default.createElement(
'div',
null,
'Unable to render child element: ',
this.props.description
);
}
return this.props.children;
}
}]);
return ErrorBoundary;
}(_react.PureComponent);
ErrorBoundary.propTypes = {
children: _propTypes2.default.node,
description: _propTypes2.default.string
};
exports.default = ErrorBoundary;
/***/ }),
/* 420 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _ChildrenBuilder = __webpack_require__(141);
var _ChildrenBuilder2 = _interopRequireDefault(_ChildrenBuilder);
var _EntityLabel = __webpack_require__(54);
var _EntityLabel2 = _interopRequireDefault(_EntityLabel);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _EditorTabsBuilder = __webpack_require__(288);
var _EditorTabsBuilder2 = _interopRequireDefault(_EditorTabsBuilder);
var _FormShapes = __webpack_require__(90);
var _TabsWrapper = __webpack_require__(286);
var _TabsWrapper2 = _interopRequireDefault(_TabsWrapper);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var EditorTabsBuilder = function (_PureComponent) {
(0, _inherits3.default)(EditorTabsBuilder, _PureComponent);
function EditorTabsBuilder() {
(0, _classCallCheck3.default)(this, EditorTabsBuilder);
return (0, _possibleConstructorReturn3.default)(this, (EditorTabsBuilder.__proto__ || Object.getPrototypeOf(EditorTabsBuilder)).apply(this, arguments));
}
(0, _createClass3.default)(EditorTabsBuilder, [{
key: 'render',
value: function render() {
var _props = this.props,
onActivate = _props.onActivate,
tabs = _props.tabs;
return _react2.default.createElement(_TabsWrapper2.default, { onActivate: onActivate, tabs: tabs.map(function (tabDescription) {
return {
key: tabDescription.key,
label: tabDescription.labelEntityId ? _react2.default.createElement(_EntityLabel2.default, { entityId: tabDescription.labelEntityId }) : tabDescription.label,
content: _react2.default.createElement(
'div',
{ className: _EditorTabsBuilder2.default.tabContent },
_react2.default.createElement(_ChildrenBuilder2.default, tabDescription)
)
};
}) });
}
}]);
return EditorTabsBuilder;
}(_react.PureComponent);
EditorTabsBuilder.propTypes = {
onActivate: _propTypes2.default.func,
tabs: _propTypes2.default.arrayOf(_propTypes2.default.shape(_FormShapes.TabShape)).isRequired
};
exports.default = EditorTabsBuilder;
/***/ }),
/* 421 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _DialogWrapper = __webpack_require__(162);
var _DialogWrapper2 = _interopRequireDefault(_DialogWrapper);
var _EditorTabsBuilder = __webpack_require__(420);
var _EditorTabsBuilder2 = _interopRequireDefault(_EditorTabsBuilder);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _FormShapes = __webpack_require__(90);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var DialogWithTabs = function (_PureComponent) {
(0, _inherits3.default)(DialogWithTabs, _PureComponent);
function DialogWithTabs() {
(0, _classCallCheck3.default)(this, DialogWithTabs);
var _this = (0, _possibleConstructorReturn3.default)(this, (DialogWithTabs.__proto__ || Object.getPrototypeOf(DialogWithTabs)).apply(this, arguments));
_this.dialogRef = _react2.default.createRef();
_this.handleTabChange = _this.handleTabChange.bind(_this);
_this.close = function () {
return _this.dialogRef.current.close();
};
_this.open = function () {
return _this.dialogRef.current.open();
};
return _this;
}
(0, _createClass3.default)(DialogWithTabs, [{
key: 'handleTabChange',
value: function handleTabChange() {
var dialogComponent = this.dialogRef.current;
if (dialogComponent) dialogComponent.resizeToFit();
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
tabs = _props.tabs,
etc = (0, _objectWithoutProperties3.default)(_props, ['tabs']);
return _react2.default.createElement(
_DialogWrapper2.default,
(0, _extends3.default)({ ref: this.dialogRef }, etc),
_react2.default.createElement(_EditorTabsBuilder2.default, { onActivate: this.handleTabChange, tabs: tabs })
);
}
}]);
return DialogWithTabs;
}(_react.PureComponent);
DialogWithTabs.propTypes = {
tabs: _propTypes2.default.arrayOf(_propTypes2.default.shape(_FormShapes.TabShape)).isRequired
};
exports.default = DialogWithTabs;
/***/ }),
/* 422 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _I18nUtils = __webpack_require__(17);
var I18nUtils = _interopRequireWildcard(_I18nUtils);
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 en = {
actionAnalyzeChanges: 'Collecting and analyzing changes to entity',
actionNoChangesPurge: 'No changes found, purge and refresh current page',
actionUpdateEntity: 'Saving changes in entity (update and create statements)',
actionUpdateEntityDone: 'Saving changes in entity (update and create statements): done',
actionUpdateEntityFail: 'Saving changes in entity (update and create statements): fail',
actionRemoveClaims: 'Saving changes in entity (remove statements)',
actionRemoveClaimsDone: 'Saving changes in entity (remove statements): done',
actionRemoveClaimsFail: 'Saving changes in entity (remove statements): fail',
confirmCloseWithoutSave: 'You\'ve made changes to entity. Are you sure you want to close editor dialog without save?',
errorUpdateEntity: 'Unable to update entity'
};
var ru = {
actionAnalyzeChanges: 'Сбор и анализ изменений в элементе',
actionNoChangesPurge: 'Изменения не найдены, перезагрузка текущей страницы',
actionUpdateEntity: 'Сохранение изменений в элемент (обновление и создание утверждений)',
actionUpdateEntityDone: 'Сохранение изменений в элемент (обновление и создание утверждений): успешно.',
actionUpdateEntityFail: 'Сохранение изменений в элемент (обновление и создание утверждений): ошибка!',
actionRemoveClaims: 'Сохранение изменений в элемент (удаление утверждений)',
actionRemoveClaimsDone: 'Сохранение изменений в элемент (удаление утверждений): успешно.',
actionRemoveClaimsFail: 'Сохранение изменений в элемент (удаление утверждений): ошибка!',
confirmCloseWithoutSave: 'Вы внесли изменения в сущность. Вы действительно хотите закрыть редактор без сохранения изменений?',
errorUpdateEntity: 'Произошла ошибка при сохранении изменений в элемент'
};
var translations = { en: en, ru: ru };
var result = I18nUtils.localize({}, translations);
exports.default = result;
/***/ }),
/* 423 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _typeof2 = __webpack_require__(92);
var _typeof3 = _interopRequireDefault(_typeof2);
exports.default = filterEmptyEntityStructures;
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ok = function ok(x) {
return typeof x !== 'undefined' && x !== null;
};
function filterEmptyAliases(aliases) {
var result = {};
Object.keys(aliases).forEach(function (langCode) {
if (!Array.isArray(aliases[langCode])) return;
var langAliases = aliases[langCode].filter(function (alias) {
return typeof alias.value === 'string';
}).filter(function (alias) {
return alias.value.trim() !== '';
});
if (langAliases.length > 0) {
result[langCode] = langAliases;
}
});
return result;
}
function filterEmptyClaims(claims) {
var result = {};
Object.keys(claims).forEach(function (propertyId) {
if (!Array.isArray(claims[propertyId])) return;
var propertyClaims = claims[propertyId].filter(function (claim) {
return !isSnakEmtpy(claim.mainsnak);
}).map(function (claim) {
var oldQualifiers = claim.qualifiers;
if ((typeof oldQualifiers === 'undefined' ? 'undefined' : (0, _typeof3.default)(oldQualifiers)) !== 'object') return claim;
var newQualifiers = filterSnaksMap(claim.qualifiers);
if ((typeof newQualifiers === 'undefined' ? 'undefined' : (0, _typeof3.default)(newQualifiers)) !== 'object' || Object.keys(newQualifiers) === 0) {
var newClaim = (0, _extends3.default)({}, claim);
delete newClaim.qualifiers;
return newClaim;
}
return (0, _extends3.default)({}, claim, {
qualifiers: newQualifiers
});
}).map(function (claim) {
var oldReferences = claim.references;
if ((typeof oldReferences === 'undefined' ? 'undefined' : (0, _typeof3.default)(oldReferences)) !== 'object') return claim;
var newReferences = claim.references.filter(ok).map(function (ref) {
var snaks = filterSnaksMap(ref.snaks);
if (!snaks) return;
return (0, _extends3.default)({}, ref, { snaks: snaks });
}).filter(ok);
if (newReferences.length === 0) {
var newClaim = (0, _extends3.default)({}, claim);
delete newClaim.references;
return newClaim;
}
return (0, _extends3.default)({}, claim, {
references: newReferences
});
});
if (propertyClaims.length > 0) {
result[propertyId] = propertyClaims;
}
});
return result;
}
function filterEmptyLabelalikes(labelalikes) {
var result = {};
Object.keys(labelalikes).forEach(function (langCode) {
if (typeof labelalikes[langCode].value === 'string' && labelalikes[langCode].value.trim() !== '') {
result[langCode] = labelalikes[langCode];
}
});
return result;
}
function filterSnaksMap(snaksMap) {
if (typeof snaksMap === 'undefined') return undefined;
(0, _expect2.default)(snaksMap).toBeAn('object');
var result = {};
var resultIsEmpty = true;
Object.keys(snaksMap).forEach(function (propertyId) {
if (!Array.isArray(snaksMap[propertyId])) return;
var propertySnaks = snaksMap[propertyId].filter(function (snak) {
return !isSnakEmtpy(snak);
});
if (propertySnaks.length > 0) {
result[propertyId] = propertySnaks;
resultIsEmpty = false;
}
});
if (resultIsEmpty) return; // undefined
return result;
}
function filterEmptyEntityStructures(entity) {
return (0, _extends3.default)({}, entity, {
labels: entity.labels ? filterEmptyLabelalikes(entity.labels) : undefined,
descriptions: entity.descriptions ? filterEmptyLabelalikes(entity.descriptions) : undefined,
aliases: entity.aliases ? filterEmptyAliases(entity.aliases) : undefined,
claims: entity.claims ? filterEmptyClaims(entity.claims) : undefined
});
}
function isStringBlank(str) {
if (typeof str === 'undefined' || str === null) return true;
if (typeof str !== 'string') throw new Error('provided argument is not string: ' + JSON.stringify(str));
return str.trim() === '';
}
function isNumberDefined(number) {
if (typeof number === 'undefined' || number === null) return false;
return true;
}
function isSnakEmtpy(snak) {
if (snak.snaktype !== 'value') return false;
var datavalue = snak.datavalue;
if (typeof datavalue === 'undefined' || datavalue === null || typeof datavalue.value === 'undefined' || datavalue.value === null) return true;
switch (datavalue.type) {
case 'monolingualtext':
return isStringBlank(datavalue.value.text) || isStringBlank(datavalue.value.language);
case 'string':
return isStringBlank(datavalue.value);
case 'time':
return isStringBlank(datavalue.value.time) || isStringBlank(datavalue.value.calendarmodel);
case 'wikibase-entityid':
return !isNumberDefined(datavalue.value['numeric-id']) || isStringBlank(datavalue.value['entity-type']);
default:
return false;
}
}
/***/ }),
/* 424 */
/***/ (function(module, exports) {
var supportsArgumentsClass = (function(){
return Object.prototype.toString.call(arguments)
})() == '[object Arguments]';
exports = module.exports = supportsArgumentsClass ? supported : unsupported;
exports.supported = supported;
function supported(object) {
return Object.prototype.toString.call(object) == '[object Arguments]';
};
exports.unsupported = unsupported;
function unsupported(object){
return object &&
typeof object == 'object' &&
typeof object.length == 'number' &&
Object.prototype.hasOwnProperty.call(object, 'callee') &&
!Object.prototype.propertyIsEnumerable.call(object, 'callee') ||
false;
};
/***/ }),
/* 425 */
/***/ (function(module, exports) {
exports = module.exports = typeof Object.keys === 'function'
? Object.keys : shim;
exports.shim = shim;
function shim (obj) {
var keys = [];
for (var key in obj) keys.push(key);
return keys;
}
/***/ }),
/* 426 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _objectWithoutProperties2 = __webpack_require__(26);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _typeof2 = __webpack_require__(92);
var _typeof3 = _interopRequireDefault(_typeof2);
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
exports.collectlLabelalikeUpdates = collectlLabelalikeUpdates;
exports.collectClaimUpdates = collectClaimUpdates;
exports.collectEntityUpdates = collectEntityUpdates;
exports.closeWithoutSave = closeWithoutSave;
exports.saveAndClose = saveAndClose;
var _ApiUtils = __webpack_require__(29);
var ApiUtils = _interopRequireWildcard(_ApiUtils);
var _deepEqual = __webpack_require__(211);
var _deepEqual2 = _interopRequireDefault(_deepEqual);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _filterEmptyEntityStructures = __webpack_require__(423);
var _filterEmptyEntityStructures2 = _interopRequireDefault(_filterEmptyEntityStructures);
var _i18n = __webpack_require__(422);
var _i18n2 = _interopRequireDefault(_i18n);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SUMMARY_PREFIX = 'via [[:w:ru:ВП:WE-F|WE-Framework gadget]] from ';
var TAG = 'WE-Framework gadget';
var notifyOptions = {
autoHide: true,
tag: 'WE-F Save'
};
function notify(text) {
mw.notify('[WE-F] ' + text, notifyOptions);
}
function collectlLabelalikeUpdates(originalEntity, entity, labelalikeType, removedPlaceholderF) {
var changes = [];
var oldData = originalEntity[labelalikeType] || {};
var newData = entity[labelalikeType] || {};
var allKeys = new Set();
Object.keys(oldData).forEach(function (key) {
return allKeys.add(key);
});
Object.keys(newData).forEach(function (key) {
return allKeys.add(key);
});
var allKeysSorted = [].concat((0, _toConsumableArray3.default)(allKeys));
allKeysSorted.sort();
allKeysSorted.forEach(function (key) {
var oldValue = oldData[key] || null;
var newValue = newData[key] || null;
if (oldValue === null && newValue === null) {
console.warn('Something strage goes here with ' + labelalikeType + '...');
return;
}
if (oldValue === null && newValue !== null) {
console.log('Found change new entry of ' + labelalikeType + ' with key ' + key);
changes.push({ key: key, value: newValue });
return;
}
if (oldValue !== null && newValue === null) {
console.log('Found removing of entry of ' + labelalikeType + ' with key ' + key);
changes.push({ key: key, value: removedPlaceholderF(key) });
return;
}
if (oldValue !== null && newValue !== null) {
if (!(0, _deepEqual2.default)(oldValue, newValue)) {
console.log('Found change in existing entry of ' + labelalikeType + ' for key ' + key);
changes.push({ key: key, value: newValue });
}
return;
}
});
if (changes.length > 0) {
var result = {};
changes.forEach(function (value) {
return result[value.key] = value.value;
});
return result;
}
}
function collectClaimUpdates(originalEntity, entity) {
var toUpdate = [];
var checked = new Set();
//calculate changed and removed claims
Object.keys(entity.claims).forEach(function (propertyId) {
var newClaims = entity.claims[propertyId];
(0, _expect2.default)(newClaims).toBeAn('array');
var oldClaims = originalEntity.claims[propertyId];
if ((typeof oldClaims === 'undefined' ? 'undefined' : (0, _typeof3.default)(oldClaims)) !== 'object') {
newClaims.forEach(function (newClaim) {
var id = newClaim.id,
claimWithoutId = (0, _objectWithoutProperties3.default)(newClaim, ['id']);
console.log('collectClaimUpdates: Saving claim with temporary id ' + id + ' as new claim without ID');
toUpdate.push(claimWithoutId);
});
return;
}
(0, _expect2.default)(newClaims).toBeAn('array');
if (oldClaims === newClaims) {
newClaims.forEach(function (newClaim) {
return checked.add(newClaim.id);
});
return;
}
newClaims.forEach(function (newClaim) {
(0, _expect2.default)(newClaim).toBeAn('object');
(0, _expect2.default)(newClaim.id).toBeA('string');
(0, _expect2.default)(newClaim.mainsnak).toBeAn('object');
checked.add(newClaim.id);
var oldClaim = oldClaims.find(function (oldClaim) {
return oldClaim.id === newClaim.id;
});
if ((typeof oldClaim === 'undefined' ? 'undefined' : (0, _typeof3.default)(oldClaim)) === 'object') {
if (!(0, _deepEqual2.default)(oldClaim, newClaim)) {
console.log('collectClaimUpdates: Saving claim with id ' + newClaim.id + ' as updated claim');
toUpdate.push(newClaim);
}
} else {
// it's a new claim
var id = newClaim.id,
claimWithoutId = (0, _objectWithoutProperties3.default)(newClaim, ['id']);
console.log('collectClaimUpdates: Saving claim with temporary id ' + id + ' as new claim without ID');
toUpdate.push(claimWithoutId);
}
});
});
Object.values(originalEntity.claims).forEach(function (originalClaims) {
originalClaims.filter(function (oldClaim) {
return !checked.has(oldClaim.id);
}).forEach(function (oldClaim) {
return toUpdate.push({ id: oldClaim.id, remove: '' });
});
});
return toUpdate.map(function (claim) {
if (typeof claim.id === 'string' || claim.remove !== '') return claim;
(0, _expect2.default)(claim).toBeAn('object');
(0, _expect2.default)(claim.mainsnak).toBeAn('object', 'Strange claim in toUpdate array: ' + JSON.stringify(claim));
if ((0, _typeof3.default)(claim.mainsnak.datavalue) !== 'object') {
return { id: claim.id, remove: '' };
}
return claim;
});
}
function collectEntityUpdates(originalEntity, entityWithEmptyClaims) {
var entity = (0, _filterEmptyEntityStructures2.default)(entityWithEmptyClaims);
var data = {};
var updatedLabels = collectlLabelalikeUpdates(originalEntity, entity, 'labels', function (key) {
return { language: key, remove: '' };
});
if (updatedLabels) data = (0, _extends3.default)({}, data, { labels: updatedLabels });
var updatedDescriptions = collectlLabelalikeUpdates(originalEntity, entity, 'descriptions', function (key) {
return { language: key, remove: '' };
});
if (updatedDescriptions) data = (0, _extends3.default)({}, data, { descriptions: updatedDescriptions });
var updatedAliases = collectlLabelalikeUpdates(originalEntity, entity, 'aliases', function () {
return [];
});
if (updatedAliases) data = (0, _extends3.default)({}, data, { aliases: updatedAliases });
var updatedClaims = collectClaimUpdates(originalEntity, entity);
if (updatedClaims.length > 0) data = (0, _extends3.default)({}, data, { claims: updatedClaims });
var updatedSitelinks = collectlLabelalikeUpdates(originalEntity, entity, 'sitelinks', function (key) {
return { site: key, remove: '' };
});
if (updatedSitelinks) data = (0, _extends3.default)({}, data, { sitelinks: updatedSitelinks });
return data;
}
function closeWithoutSave(reject) {
return function (dispatch, getState) {
notify('Analyzing changes...');
var state = getState();
var data = collectEntityUpdates(state.originalEntity, state.entity);
var hasChanges = Object.keys(data).length !== 0;
if (!hasChanges) {
reject('User closed dialog window while no changes were made');
return;
}
if (confirm(_i18n2.default.confirmCloseWithoutSave)) {
reject('User closed dialog window and confirmed discardind changes');
return;
}
};
}
function saveAndClose(resolve, reject) {
return function (dispatch, getState) {
notify('Analyzing changes...');
var state = getState();
var data = collectEntityUpdates(state.originalEntity, state.entity);
if (Object.keys(data).length === 0) {
notify('No changes');
return;
}
notify('Saving changes...');
var params = {
action: 'wbeditentity',
summary: 'via [[:w:ru:ВП:WE-F|WE-Framework gadget]] from ' + mw.config.get('wgDBname'),
data: JSON.stringify(data)
};
if (typeof state.entity.id !== 'string') {
params['new'] = 'item';
} else {
params.id = state.entity.id;
}
ApiUtils.getWikidataApi().postWithEditToken(params).catch(function (code, _ref) {
var error = _ref.error;
mw.log.error(_i18n2.default.errorUpdateEntity);
mw.log.error(error);
notify(_i18n2.default.actionUpdateEntityFail);
alert(_i18n2.default.errorUpdateEntity + ': ' + error.info);
reject();
}).then(function (result) {
notify(_i18n2.default.actionUpdateEntityDone);
var entityId = result.entity.id;
return tagRevisions(entityId, true).then(function () {
return resolve(entityId);
});
}).catch(function (error) {
mw.log.error(_i18n2.default.errorUpdateEntity);
mw.log.error(error);
notify(_i18n2.default.actionUpdateEntityFail);
alert(_i18n2.default.errorUpdateEntity + ': ' + JSON.stringify(error));
reject();
});
};
function tagRevisions(entityId, displayNotifications) {
var notifyOptions = {
autoHide: true,
tag: 'WE-F Revisions Tags'
};
function notify(text) {
if (displayNotifications) mw.notify('[WE-F] ' + text, notifyOptions);else console.log('[WEF_Utils.tagRevisions] ' + text);
}
var wikidataApi = ApiUtils.getWikidataApi();
if (displayNotifications) notify('Query last 50 Wikidata entity revisions of ' + entityId);
return wikidataApi.getPromise({
action: 'query',
prop: 'revisions',
titles: entityId,
rvprop: 'comment|ids|tags',
rvlimit: 50
}).then(function (result) {
notify('Received last Wikidata entity revisions of ' + entityId);
if (result.query && result.query.pages) {
var page = result.query.pages[Object.keys(result.query.pages)[0]];
if (page && page.revisions) {
notify('Received last ' + page.revisions.length + ' Wikidata entity revisions of ' + entityId);
return page.revisions.filter(function (revision) {
return !!revision.comment;
}).filter(function (revision) {
return revision.comment.indexOf(SUMMARY_PREFIX) !== -1;
}).filter(function (revision) {
return revision.tags.indexOf(TAG) === -1;
}).map(function (revision) {
return revision.revid;
});
}
}
return [];
}).then(function (revisions) {
if (revisions.length == 0) {
notify('Nothing to update in revisions history of ' + entityId);
return;
}
return wikidataApi.postWithEditTokenPromise({
action: 'tag',
revid: revisions.join('|'),
add: TAG
});
}).then(function () {
notify('Sucessfully update tags to revisions history');
});
}
}
/***/ }),
/* 427 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _save = __webpack_require__(426);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactRedux = __webpack_require__(44);
var _DialogWithTabs = __webpack_require__(421);
var _DialogWithTabs2 = _interopRequireDefault(_DialogWithTabs);
var _FormShapes = __webpack_require__(90);
var _core = __webpack_require__(28);
var _core2 = _interopRequireDefault(_core);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _core3 = __webpack_require__(33);
var _core4 = _interopRequireDefault(_core3);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var EditorApp = function (_Component) {
(0, _inherits3.default)(EditorApp, _Component);
function EditorApp() {
(0, _classCallCheck3.default)(this, EditorApp);
var _this = (0, _possibleConstructorReturn3.default)(this, (EditorApp.__proto__ || Object.getPrototypeOf(EditorApp)).apply(this, arguments));
_this.dialogRef = _react2.default.createRef();
_this.handleCloseClick = _this.handleCloseClick.bind(_this);
return _this;
}
(0, _createClass3.default)(EditorApp, [{
key: 'handleCloseClick',
value: function handleCloseClick() {
var _this2 = this;
var _props = this.props,
closeWithoutSave = _props.closeWithoutSave,
reject = _props.reject;
closeWithoutSave(reject, function () {
_this2.dialogRef.current.open();
});
return false;
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props,
description = _props2.description,
closeWithoutSave = _props2.closeWithoutSave,
saveAndClose = _props2.saveAndClose,
resolve = _props2.resolve,
reject = _props2.reject;
var buttons = [];
buttons.push({
text: _core2.default.dialogButtonSaveText,
label: _core2.default.dialogButtonSaveLabel,
click: function click() {
saveAndClose(resolve, reject);
}
});
buttons.push({
text: _core2.default.dialogButtonCancelText,
label: _core2.default.dialogButtonCancelLabel,
click: function click() {
closeWithoutSave(reject);
}
});
return _react2.default.createElement(_DialogWithTabs2.default, {
buttons: buttons,
className: _core4.default.wef_dialog,
minWidth: 950,
onBeforeClose: this.handleCloseClick,
ref: this.dialogRef,
tabs: description.tabs,
title: description.dialogTitle });
}
}]);
return EditorApp;
}(_react.Component);
EditorApp.propTypes = {
description: _propTypes2.default.shape(_FormShapes.EditorShape),
resolve: _propTypes2.default.func.isRequired,
reject: _propTypes2.default.func.isRequired,
closeWithoutSave: _propTypes2.default.func.isRequired,
saveAndClose: _propTypes2.default.func.isRequired
};
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
return {
closeWithoutSave: function closeWithoutSave(reject) {
return dispatch((0, _save.closeWithoutSave)(reject));
},
saveAndClose: function saveAndClose(resolve, reject) {
return dispatch((0, _save.saveAndClose)(resolve, reject));
}
};
};
var EditorAppConnected = (0, _reactRedux.connect)(undefined, mapDispatchToProps)(EditorApp);
exports.default = EditorAppConnected;
/***/ }),
/* 428 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var EMPTY_SET = Object.freeze(new Set());
var PAUSE_BEFORE_REQUEUE = 100;
var AbstractSelfStoredQueuedCache = function () {
function AbstractSelfStoredQueuedCache(type, useIndexedDb, maxBatch) {
(0, _classCallCheck3.default)(this, AbstractSelfStoredQueuedCache);
this.type = type;
this.maxBatch = maxBatch;
this.notifyOptionsInProgress = { autoHide: false, tag: 'WE-F Cache: ' + type };
this.notifyOptionsSuccess = { autoHide: true, tag: 'WE-F Cache: ' + type };
this.notifyOptionsFailure = { autoHide: true, tag: 'WE-F Cache: ' + type };
this.queue = new Set();
this.queueState = 'WAITING';
this.queueHasNewElements = false;
this.nextBatch = EMPTY_SET;
this.cache = {};
this.cacheUpdateCallbacks = [];
}
(0, _createClass3.default)(AbstractSelfStoredQueuedCache, [{
key: 'changeState',
value: function changeState(expectedState, newState) {
(0, _expect2.default)(this.queueState).toEqual(expectedState);
this.queueState = newState;
}
}, {
key: 'isKeyValid',
value: function isKeyValid(cacheKey) {
/* eslint no-unused-vars: 0 */
return true;
}
}, {
key: 'notifyMessage',
value: function notifyMessage(cacheKeys) {
/* eslint no-unused-vars: 0 */
throw new Error('Child class need to implement notifyMessage( cacheKeys ) function');
}
}, {
key: 'buildRequestPromice',
value: function buildRequestPromice(cacheKeys) {
/* eslint no-unused-vars: 0 */
throw new Error('Child class need to implement buildRequestPromice( cacheKeys ) function');
}
}, {
key: 'convertResultToEntities',
value: function convertResultToEntities(result, cacheKeys) {
/* eslint no-unused-vars: 0 */
throw new Error('Child class need to implement convertResultToEntities( result, cacheKeys ) function');
}
}, {
key: 'doQueue',
value: function doQueue(cacheKeys) {
var _this = this;
(0, _expect2.default)(cacheKeys).toBeAn('array');
this.validateCacheKeys(cacheKeys);
var queued = false;
cacheKeys.forEach(function (cacheKey) {
if (!_this.queue.has(cacheKey) && !_this.nextBatch.has(cacheKey)) {
_this.queue.add(cacheKey);
queued = true;
}
});
if (queued && this.queueState === 'WAITING') {
this.changeState('WAITING', 'REQUEST');
setTimeout(function () {
return _this.queueNextBatch();
}, PAUSE_BEFORE_REQUEUE);
}
}
}, {
key: 'validateCacheKeys',
value: function validateCacheKeys(cacheKeys) {
var _this2 = this;
/* eslint no-undef: 0 */
if (false) {}
}
}, {
key: 'queueNextBatch',
value: function queueNextBatch() {
var _this3 = this;
(0, _expect2.default)(this.queueState).toEqual('REQUEST');
if (this.queue.size === 0) {
this.changeState('REQUEST', 'WAITING');
return;
}
var nextBatch = [].concat((0, _toConsumableArray3.default)(this.queue)).slice(0, Math.min(this.maxBatch, this.queue.size));
// remember so we can check on queue if element in progress of request
this.nextBatch = new Set(nextBatch);
if (this.queue.size >= this.maxBatch) {
nextBatch.forEach(function (item) {
return _this3.queue.delete(item);
});
} else {
this.queue.clear();
}
var notifyMessage = this.notifyMessage(nextBatch);
mw.notify(notifyMessage + '…', this.notifyOptionsInProgress);
return this.buildRequestPromice(nextBatch).then(function (result) {
mw.notify(notifyMessage + '… Success.', _this3.notifyOptionsSuccess);
mw.log('Successfully received ' + nextBatch.length + ' cache ' + _this3.type + ' items: ' + nextBatch);
var cacheUpdate = _this3.convertResultToEntities(result, nextBatch);
(0, _expect2.default)(cacheUpdate).toBeAn('object');
_this3.cache = (0, _extends3.default)({}, _this3.cache, cacheUpdate);
_this3.onCacheUpdateFromRequest(cacheUpdate);
_this3.nextBatch = EMPTY_SET;
_this3.queueNextBatch();
}).catch(function (error) {
mw.notify(notifyMessage + '… Failure. See console log output for details.', _this3.notifyOptionsFailure);
mw.log.error('Unable to batch request following items: ' + nextBatch);
mw.log.error(error);
_this3.nextBatch = EMPTY_SET;
_this3.queueNextBatch();
});
}
}, {
key: 'addCacheUpdateCallback',
value: function addCacheUpdateCallback(callback) {
this.cacheUpdateCallbacks.push(callback);
}
}, {
key: 'onCacheUpdateFromRequest',
value: function onCacheUpdateFromRequest(cacheUpdate) {
this.cacheUpdateCallbacks.forEach(function (callback) {
try {
callback(cacheUpdate);
} catch (err) {
mw.log.warn('Unable to call cache update callback');
mw.log.warn(err);
}
});
}
}]);
return AbstractSelfStoredQueuedCache;
}();
exports.default = AbstractSelfStoredQueuedCache;
/***/ }),
/* 429 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = __webpack_require__(4);
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(6);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
var _AbstractSelfStoredQueuedCache = __webpack_require__(428);
var _AbstractSelfStoredQueuedCache2 = _interopRequireDefault(_AbstractSelfStoredQueuedCache);
var _ApiUtils = __webpack_require__(29);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var TYPE = 'LASTREVISION';
var LastRevisionCache = function (_AbstractSelfStoredQu) {
(0, _inherits3.default)(LastRevisionCache, _AbstractSelfStoredQu);
function LastRevisionCache() {
(0, _classCallCheck3.default)(this, LastRevisionCache);
return (0, _possibleConstructorReturn3.default)(this, (LastRevisionCache.__proto__ || Object.getPrototypeOf(LastRevisionCache)).call(this, TYPE, true, 50));
}
(0, _createClass3.default)(LastRevisionCache, [{
key: 'isKeyValid',
value: function isKeyValid(pageId) {
return Number.isInteger(pageId);
}
}, {
key: 'notifyMessage',
value: function notifyMessage(cacheKeys) {
return 'Fetching ' + cacheKeys.length + ' last revisions from Wikidata';
}
}, {
key: 'buildRequestPromice',
value: function buildRequestPromice(pageIds) {
return (0, _ApiUtils.getWikidataApi)().getPromise({
action: 'query',
prop: 'revisions',
rvprop: 'ids',
pageids: pageIds.join('|')
});
}
}, {
key: 'convertResultToEntities',
value: function convertResultToEntities(result) {
var cacheUpdate = {};
Object.values(result.query.pages).forEach(function (page) {
if (page.missing !== undefined) {
cacheUpdate[page.pageid] = -1;
} else {
cacheUpdate[page.pageid] = page.revisions[0].revid;
}
});
return cacheUpdate;
}
}]);
return LastRevisionCache;
}(_AbstractSelfStoredQueuedCache2.default);
var instance = new LastRevisionCache();
exports.default = instance;
/***/ }),
/* 430 */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(63);
var get = __webpack_require__(221);
module.exports = __webpack_require__(34).getIterator = function (it) {
var iterFn = get(it);
if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
return anObject(iterFn.call(it));
};
/***/ }),
/* 431 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(150);
__webpack_require__(108);
module.exports = __webpack_require__(430);
/***/ }),
/* 432 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(431), __esModule: true };
/***/ }),
/* 433 */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(220);
var ITERATOR = __webpack_require__(39)('iterator');
var Iterators = __webpack_require__(78);
module.exports = __webpack_require__(34).isIterable = function (it) {
var O = Object(it);
return O[ITERATOR] !== undefined
|| '@@iterator' in O
// eslint-disable-next-line no-prototype-builtins
|| Iterators.hasOwnProperty(classof(O));
};
/***/ }),
/* 434 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(150);
__webpack_require__(108);
module.exports = __webpack_require__(433);
/***/ }),
/* 435 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(434), __esModule: true };
/***/ }),
/* 436 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _classCallCheck2 = __webpack_require__(3);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _I18nUtils = __webpack_require__(17);
var I18nUtils = _interopRequireWildcard(_I18nUtils);
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var LabelDescription = function LabelDescription(entity) {
(0, _classCallCheck3.default)(this, LabelDescription);
var translations = {};
if (entity.labels) {
Object.values(entity.labels).forEach(function (label) {
translations[label.language] = (0, _extends3.default)({}, translations[label.language], {
label: label.value
});
});
}
if (entity.descriptions) {
Object.values(entity.descriptions).forEach(function (description) {
translations[description.language] = (0, _extends3.default)({}, translations[description.language], {
description: description.value
});
});
}
var translated = I18nUtils.localize({}, translations);
for (var k in translated) {
this[k] = translated[k];
}
};
exports.default = LabelDescription;
/***/ }),
/* 437 */
/***/ (function(module, exports) {
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
// The _isBuffer check is for Safari 5-7 support, because it's missing
// Object.prototype.constructor. Remove this eventually
module.exports = function (obj) {
return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
}
function isBuffer (obj) {
return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
}
// For Node v0.10 support. Remove this eventually.
function isSlowBuffer (obj) {
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
}
/***/ }),
/* 438 */
/***/ (function(module, exports) {
(function() {
var base64map
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
crypt = {
// Bit-wise rotation left
rotl: function(n, b) {
return (n << b) | (n >>> (32 - b));
},
// Bit-wise rotation right
rotr: function(n, b) {
return (n << (32 - b)) | (n >>> b);
},
// Swap big-endian to little-endian and vice versa
endian: function(n) {
// If number given, swap endian
if (n.constructor == Number) {
return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
}
// Else, assume array and swap all items
for (var i = 0; i < n.length; i++)
n[i] = crypt.endian(n[i]);
return n;
},
// Generate an array of any length of random bytes
randomBytes: function(n) {
for (var bytes = []; n > 0; n--)
bytes.push(Math.floor(Math.random() * 256));
return bytes;
},
// Convert a byte array to big-endian 32-bit words
bytesToWords: function(bytes) {
for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
words[b >>> 5] |= bytes[i] << (24 - b % 32);
return words;
},
// Convert big-endian 32-bit words to a byte array
wordsToBytes: function(words) {
for (var bytes = [], b = 0; b < words.length * 32; b += 8)
bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
return bytes;
},
// Convert a byte array to a hex string
bytesToHex: function(bytes) {
for (var hex = [], i = 0; i < bytes.length; i++) {
hex.push((bytes[i] >>> 4).toString(16));
hex.push((bytes[i] & 0xF).toString(16));
}
return hex.join('');
},
// Convert a hex string to a byte array
hexToBytes: function(hex) {
for (var bytes = [], c = 0; c < hex.length; c += 2)
bytes.push(parseInt(hex.substr(c, 2), 16));
return bytes;
},
// Convert a byte array to a base-64 string
bytesToBase64: function(bytes) {
for (var base64 = [], i = 0; i < bytes.length; i += 3) {
var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
for (var j = 0; j < 4; j++)
if (i * 8 + j * 6 <= bytes.length * 8)
base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
else
base64.push('=');
}
return base64.join('');
},
// Convert a base-64 string to a byte array
base64ToBytes: function(base64) {
// Remove non-base-64 characters
base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
imod4 = ++i % 4) {
if (imod4 == 0) continue;
bytes.push(((base64map.indexOf(base64.charAt(i - 1))
& (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
| (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
}
return bytes;
}
};
module.exports = crypt;
})();
/***/ }),
/* 439 */
/***/ (function(module, exports, __webpack_require__) {
(function(){
var crypt = __webpack_require__(438),
utf8 = __webpack_require__(217).utf8,
isBuffer = __webpack_require__(437),
bin = __webpack_require__(217).bin,
// The core
md5 = function (message, options) {
// Convert to byte array
if (message.constructor == String)
if (options && options.encoding === 'binary')
message = bin.stringToBytes(message);
else
message = utf8.stringToBytes(message);
else if (isBuffer(message))
message = Array.prototype.slice.call(message, 0);
else if (!Array.isArray(message))
message = message.toString();
// else, assume byte array already
var m = crypt.bytesToWords(message),
l = message.length * 8,
a = 1732584193,
b = -271733879,
c = -1732584194,
d = 271733878;
// Swap endian
for (var i = 0; i < m.length; i++) {
m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
}
// Padding
m[l >>> 5] |= 0x80 << (l % 32);
m[(((l + 64) >>> 9) << 4) + 14] = l;
// Method shortcuts
var FF = md5._ff,
GG = md5._gg,
HH = md5._hh,
II = md5._ii;
for (var i = 0; i < m.length; i += 16) {
var aa = a,
bb = b,
cc = c,
dd = d;
a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
c = FF(c, d, a, b, m[i+10], 17, -42063);
b = FF(b, c, d, a, m[i+11], 22, -1990404162);
a = FF(a, b, c, d, m[i+12], 7, 1804603682);
d = FF(d, a, b, c, m[i+13], 12, -40341101);
c = FF(c, d, a, b, m[i+14], 17, -1502002290);
b = FF(b, c, d, a, m[i+15], 22, 1236535329);
a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
c = GG(c, d, a, b, m[i+11], 14, 643717713);
b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
d = GG(d, a, b, c, m[i+10], 9, 38016083);
c = GG(c, d, a, b, m[i+15], 14, -660478335);
b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
d = GG(d, a, b, c, m[i+14], 9, -1019803690);
c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
a = GG(a, b, c, d, m[i+13], 5, -1444681467);
d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
b = GG(b, c, d, a, m[i+12], 20, -1926607734);
a = HH(a, b, c, d, m[i+ 5], 4, -378558);
d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
c = HH(c, d, a, b, m[i+11], 16, 1839030562);
b = HH(b, c, d, a, m[i+14], 23, -35309556);
a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
b = HH(b, c, d, a, m[i+10], 23, -1094730640);
a = HH(a, b, c, d, m[i+13], 4, 681279174);
d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
d = HH(d, a, b, c, m[i+12], 11, -421815835);
c = HH(c, d, a, b, m[i+15], 16, 530742520);
b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
a = II(a, b, c, d, m[i+ 0], 6, -198630844);
d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
c = II(c, d, a, b, m[i+14], 15, -1416354905);
b = II(b, c, d, a, m[i+ 5], 21, -57434055);
a = II(a, b, c, d, m[i+12], 6, 1700485571);
d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
c = II(c, d, a, b, m[i+10], 15, -1051523);
b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
d = II(d, a, b, c, m[i+15], 10, -30611744);
c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
b = II(b, c, d, a, m[i+13], 21, 1309151649);
a = II(a, b, c, d, m[i+ 4], 6, -145523070);
d = II(d, a, b, c, m[i+11], 10, -1120210379);
c = II(c, d, a, b, m[i+ 2], 15, 718787259);
b = II(b, c, d, a, m[i+ 9], 21, -343485551);
a = (a + aa) >>> 0;
b = (b + bb) >>> 0;
c = (c + cc) >>> 0;
d = (d + dd) >>> 0;
}
return crypt.endian([a, b, c, d]);
};
// Auxiliary functions
md5._ff = function (a, b, c, d, x, s, t) {
var n = a + (b & c | ~b & d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
md5._gg = function (a, b, c, d, x, s, t) {
var n = a + (b & d | c & ~d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
md5._hh = function (a, b, c, d, x, s, t) {
var n = a + (b ^ c ^ d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
md5._ii = function (a, b, c, d, x, s, t) {
var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
// Package private blocksize
md5._blocksize = 16;
md5._digestsize = 16;
module.exports = function (message, options) {
if (message === undefined || message === null)
throw new Error('Illegal argument ' + message);
var digestbytes = crypt.wordsToBytes(md5(message, options));
return options && options.asBytes ? digestbytes :
options && options.asString ? bin.bytesToString(digestbytes) :
crypt.bytesToHex(digestbytes);
};
})();
/***/ }),
/* 440 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _AbstractQueuedCache = __webpack_require__(103);
var _AbstractQueuedCache2 = _interopRequireDefault(_AbstractQueuedCache);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _flagImageHtmlCache = __webpack_require__(218);
var _flagImageHtmlCache2 = _interopRequireDefault(_flagImageHtmlCache);
var _labelDescriptionCache = __webpack_require__(102);
var _labelDescriptionCache2 = _interopRequireDefault(_labelDescriptionCache);
var _propertiesBySparqlCache = __webpack_require__(216);
var _propertiesBySparqlCache2 = _interopRequireDefault(_propertiesBySparqlCache);
var _propertyDescriptionCache = __webpack_require__(214);
var _propertyDescriptionCache2 = _interopRequireDefault(_propertyDescriptionCache);
var _stringPropertyValuesCache = __webpack_require__(212);
var _stringPropertyValuesCache2 = _interopRequireDefault(_stringPropertyValuesCache);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var caches = {};
var registerCache = function registerCache(cache) {
(0, _expect2.default)(cache).toBeAn(_AbstractQueuedCache2.default);
caches[cache.type] = cache;
};
registerCache(_flagImageHtmlCache2.default);
registerCache(_labelDescriptionCache2.default);
registerCache(_propertiesBySparqlCache2.default);
registerCache(_propertyDescriptionCache2.default);
registerCache(_stringPropertyValuesCache2.default);
exports.default = caches;
/***/ }),
/* 441 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
var _Caches = __webpack_require__(440);
var _Caches2 = _interopRequireDefault(_Caches);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var initialState = {
cache: {},
queue: new Set(),
state: 'WAITING'
};
function add(set, cacheKeys) {
var result = new Set(set);
result.add(cacheKeys);
return result;
}
function remove(set, cacheKeys) {
var result = new Set(set);
cacheKeys.forEach(function (cacheKey) {
return result.delete(cacheKey);
});
return result;
}
function cacheReducerBuilder(type) {
(0, _expect2.default)(type).toBeA('string');
return function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
var action = arguments[1];
switch (action.type) {
case 'CACHE_' + type + '_PUT':
(0, _expect2.default)(action.cacheUpdate).toBeAn('object');
return (0, _extends3.default)({}, state, {
cache: (0, _extends3.default)({}, state.cache, action.cacheUpdate)
});
case 'CACHE_' + type + '_QUEUE':
(0, _expect2.default)(action.cacheKey).toBeA('string');
return (0, _extends3.default)({}, state, {
queue: add(state.queue, action.cacheKey)
});
case 'CACHE_' + type + '_REMOVE_FROM_QUEUE':
(0, _expect2.default)(action.cacheKeys).toBeAn('array');
return (0, _extends3.default)({}, state, {
queue: remove(state.queue, action.cacheKeys)
});
}
return state;
};
}
var reducers = {};
Object.keys(_Caches2.default).forEach(function (key) {
reducers[key] = cacheReducerBuilder(key);
});
exports.default = reducers;
/***/ }),
/* 442 */
/***/ (function(module, exports, __webpack_require__) {
var ITERATOR = __webpack_require__(39)('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;
};
/***/ }),
/* 443 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $defineProperty = __webpack_require__(56);
var createDesc = __webpack_require__(93);
module.exports = function (object, index, value) {
if (index in object) $defineProperty.f(object, index, createDesc(0, value));
else object[index] = value;
};
/***/ }),
/* 444 */
/***/ (function(module, exports, __webpack_require__) {
// check on default Array iterator
var Iterators = __webpack_require__(78);
var ITERATOR = __webpack_require__(39)('iterator');
var ArrayProto = Array.prototype;
module.exports = function (it) {
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};
/***/ }),
/* 445 */
/***/ (function(module, exports, __webpack_require__) {
// call something on iterator step with safe closing on error
var anObject = __webpack_require__(63);
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;
}
};
/***/ }),
/* 446 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ctx = __webpack_require__(161);
var $export = __webpack_require__(64);
var toObject = __webpack_require__(151);
var call = __webpack_require__(445);
var isArrayIter = __webpack_require__(444);
var toLength = __webpack_require__(234);
var createProperty = __webpack_require__(443);
var getIterFn = __webpack_require__(221);
$export($export.S + $export.F * !__webpack_require__(442)(function (iter) { Array.from(iter); }), 'Array', {
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
var O = toObject(arrayLike);
var C = typeof this == 'function' ? this : Array;
var aLen = arguments.length;
var mapfn = aLen > 1 ? arguments[1] : undefined;
var mapping = mapfn !== undefined;
var index = 0;
var iterFn = getIterFn(O);
var length, result, step, iterator;
if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
// if object isn't iterable or it's array with default iterator - use simple case
if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
}
} else {
length = toLength(O.length);
for (result = new C(length); length > index; index++) {
createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
}
}
result.length = index;
return result;
}
});
/***/ }),
/* 447 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(108);
__webpack_require__(446);
module.exports = __webpack_require__(34).Array.from;
/***/ }),
/* 448 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(447), __esModule: true };
/***/ }),
/* 449 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = undefined;
var _toConsumableArray2 = __webpack_require__(24);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _defineProperty2 = __webpack_require__(55);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _extends8 = __webpack_require__(7);
var _extends9 = _interopRequireDefault(_extends8);
var _reducers = __webpack_require__(441);
var _reducers2 = _interopRequireDefault(_reducers);
var _redux = __webpack_require__(124);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _Shapes = __webpack_require__(18);
var _PropertyDescription = __webpack_require__(14);
var _PropertyDescription2 = _interopRequireDefault(_PropertyDescription);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var entityReducerF = function entityReducerF(originalEntity) {
return function () {
var entity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : originalEntity;
var action = arguments[1];
(0, _expect2.default)(entity).toBeAn('object');
switch (action.type) {
case 'LABELS_CHANGE':
case 'DESCRIPTION_CHANGE':
case 'ALIASES_CHANGE':
{
var language = action.language,
newValue = action.newValue;
(0, _expect2.default)(language).toBeA('string');
var elementToChange = {
LABELS_CHANGE: 'labels',
DESCRIPTION_CHANGE: 'descriptions',
ALIASES_CHANGE: 'aliases'
}[action.type];
return (0, _extends9.default)({}, entity, (0, _defineProperty3.default)({}, elementToChange, (0, _extends9.default)({}, entity[elementToChange], (0, _defineProperty3.default)({}, language, newValue))));
}
case 'CLAIM_ADD':
{
var propertyDescription = action.propertyDescription;
(0, _expect2.default)(propertyDescription).toBeA(_PropertyDescription2.default);
var propertyId = propertyDescription.id;
var existingClaims = entity.claims[propertyDescription.id];
var newClaim = (0, _Shapes.newStatementClaim)(propertyDescription);
if (existingClaims) {
return (0, _extends9.default)({}, entity, {
claims: (0, _extends9.default)({}, entity.claims, (0, _defineProperty3.default)({}, propertyId, [].concat((0, _toConsumableArray3.default)(existingClaims), [newClaim])))
});
} else {
return (0, _extends9.default)({}, entity, {
claims: (0, _extends9.default)({}, entity.claims, (0, _defineProperty3.default)({}, propertyId, [newClaim]))
});
}
}
case 'CLAIM_DELETE':
{
var claim = action.claim;
var _propertyId = claim.mainsnak.property;
var _existingClaims = entity.claims[_propertyId];
var claimsToSave = _existingClaims.filter(function (original) {
return original.id !== claim.id;
});
return (0, _extends9.default)({}, entity, {
claims: (0, _extends9.default)({}, entity.claims, (0, _defineProperty3.default)({}, _propertyId, claimsToSave))
});
}
case 'CLAIM_UPDATE':
{
var _claim = action.claim;
var _propertyId2 = _claim.mainsnak.property;
var _existingClaims2 = entity.claims[_propertyId2];
var _claimsToSave = !!_existingClaims2 && _existingClaims2.length > 0 ? _existingClaims2.map(function (original) {
return original.id === _claim.id ? _claim : original;
}) : [_claim];
return (0, _extends9.default)({}, entity, {
claims: (0, _extends9.default)({}, entity.claims, (0, _defineProperty3.default)({}, _propertyId2, _claimsToSave))
});
}
}
return entity;
};
};
function buildReducers(_originalEntity) {
(0, _expect2.default)(_originalEntity).toBeAn('object');
return (0, _redux.combineReducers)((0, _extends9.default)({
originalEntity: function originalEntity() {
return _originalEntity;
},
entity: entityReducerF(_originalEntity)
}, _reducers2.default));
}
exports.default = buildReducers;
/***/ }),
/* 450 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.destroyEditor = destroyEditor;
exports.renderEditor = renderEditor;
exports.openEditor = openEditor;
exports.onEditorLinkClick = onEditorLinkClick;
var _ApiUtils = __webpack_require__(29);
var ApiUtils = _interopRequireWildcard(_ApiUtils);
var _redux = __webpack_require__(124);
var _reducers = __webpack_require__(449);
var _reducers2 = _interopRequireDefault(_reducers);
var _EditorApp = __webpack_require__(427);
var _EditorApp2 = _interopRequireDefault(_EditorApp);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _reactRedux = __webpack_require__(44);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactDom = __webpack_require__(125);
var _reactDom2 = _interopRequireDefault(_reactDom);
var _reduxThunk = __webpack_require__(285);
var _reduxThunk2 = _interopRequireDefault(_reduxThunk);
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 destroyEditor(appDiv) {
_reactDom2.default.unmountComponentAtNode(appDiv);
document.body.removeChild(appDiv);
}
function renderEditor(editorDescription, entity, resolve, reject) {
(0, _expect2.default)(editorDescription).toBeAn('object');
(0, _expect2.default)(entity).toBeAn('object');
(0, _expect2.default)(entity.id).toBeA('string');
var appDiv = document.createElement('div');
document.body.appendChild(appDiv);
var reducers = (0, _reducers2.default)(entity);
var store = (0, _redux.createStore)(reducers, (0, _redux.applyMiddleware)(_reduxThunk2.default));
_reactDom2.default.render(_react2.default.createElement(
_reactRedux.Provider,
{ store: store },
_react2.default.createElement(_EditorApp2.default, {
description: editorDescription,
entity: entity,
reject: reject,
resolve: resolve })
), appDiv);
return appDiv;
}
function openEditor(editorDescription, entity) {
var appDiv = void 0;
return new Promise(function (resolve, reject) {
appDiv = renderEditor(editorDescription, entity, resolve, reject);
}).then(function () {
if (appDiv) destroyEditor(appDiv);
}).catch(function (reason) {
mw.log(reason);
if (appDiv) destroyEditor(appDiv);
return Promise.reject(reason);
});
}
function onEditorLinkClick(editorDescription, entityId) {
(0, _expect2.default)(editorDescription).toBeAn('object');
(0, _expect2.default)(entityId).toBeA('string');
mw.notify('Get Wikidata entity content for ' + entityId + '...');
ApiUtils.getWikidataApi().getPromise({
action: 'wbgetentities',
ids: entityId,
format: 'json'
}).then(function (result) {
if (typeof result === 'undefined' || typeof result.entities === 'undefined' || typeof result.entities[entityId] === 'undefined' || typeof result.entities[entityId].claims === 'undefined') {
mw.notify('Wikidata answer format is not expected one');
throw new Error('Wikidata answer format is not expected one');
}
return result.entities[entityId];
}).then(function (entity) {
return openEditor(editorDescription, entity);
}).then(ApiUtils.purge);
}
/***/ }),
/* 451 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var editorDescription = {
linkText: 'WEF: Movie',
dialogTitle: 'Movie',
tabs: [{
label: 'General',
specials: [{ type: 'LabelsAndDescriptionArea' }],
fields: [
/* instance of */
{ property: 'P31' },
/* image */
{ property: 'P18' },
/* name */
{ property: 'P1476' },
/* country */
{ property: 'P495' },
/* language */
{ property: 'P364' },
/* time */
{ property: 'P577' },
/* genre */
{ property: 'P136' },
/* follows */
{ property: 'P155' },
/* followed by */
{ property: 'P156' }]
}, {
labelEntityId: 'Q3297652',
fields: [
/* director */
{ property: 'P57' },
/* director of photography */
{ property: 'P344' },
/* screenwriter */
{ property: 'P58' },
/* producer */
{ property: 'P162' },
/* production company */
{ property: 'P272' },
/* composer */
{ property: 'P86' }]
}, {
labelEntityId: 'P161',
fields: [
/* cast member */
{ property: 'P161', columns: ['P453'] }]
}, {
labelEntityId: 'P725',
fields: [
/* cast member */
{ property: 'P725', columns: ['P453'] }]
}, {
labelEntityId: 'P166',
fields: [
/* award received */
{ property: 'P166', columns: ['P585', 'P1027'] }]
}, {
labelEntityId: 'Q36524',
specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31 wd:Q29542094 . ' + '?property wikibase:propertyType wikibase:ExternalId . ' + '}' }]
}]
};
exports.default = editorDescription;
/***/ }),
/* 452 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _i18n = __webpack_require__(91);
var _i18n2 = _interopRequireDefault(_i18n);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var editorDescription = {
linkText: _i18n2.default.frbrWorkLinkText,
dialogTitle: _i18n2.default.frbrWorkDialogTitle,
tabs: [{
label: _i18n2.default.tabGeneral,
specials: [{ type: 'LabelsAndDescriptionArea' }],
fieldsets: [{
fields: [{ property: 'P31' /* instance of */
}, { property: 'P18' /* image */
}]
}, {
fields: [{ property: 'P50' /* author */
}, { property: 'P767' /* collaborator */
}, { property: 'P98' /* editor */
}]
}, {
fields: [{ property: 'P1476' /* title */
}, { property: 'P1680' /* subtitle */
}, { property: 'P364' /* original language */
}, { property: 'P571' /* date of foundation or creation */
}, { property: 'P577' /* date of publication */
}]
}]
}, {
labelEntityId: 'Q1260632',
fieldsets: [{
fields: [{ property: 'P135' /* movement */
}, { property: 'P136' /* genre */
}, { property: 'P921' /* subject heading */
}]
}, {
fields: [{ property: 'P155' /* follows */
}, { property: 'P156' /* followed by */
}, { property: 'P179' /* series */
}]
}, {
fields: [{ property: 'P144' /* based on */
}, { property: 'P941' /* inspired by */
}]
}]
}, {
labelEntityId: 'P674' /* characters */
, fieldsets: [{
labelEntityId: 'P674' /* characters */
, fields: [{ property: 'P674' /* characters */
}]
}]
}, {
labelEntityId: 'P166' /* award received */
, fieldsets: [{
labelEntityId: 'P166' /* award received */
, fields: [{ property: 'P166' /* award received */
}]
}]
}, {
labelEntityId: 'P747' /* edition */
, fieldsets: [{
labelEntityId: 'P747' /* edition */
, fields: [{ property: 'P747' /* edition */
}]
}]
}, {
labelEntityId: 'Q36524' /* authority control */
, specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31 wd:Q19833377 . ' + '?property wikibase:propertyType wikibase:ExternalId . ' + '}' }]
}]
};
exports.default = editorDescription;
/***/ }),
/* 453 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _i18n = __webpack_require__(91);
var _i18n2 = _interopRequireDefault(_i18n);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var editorDescription = {
linkText: _i18n2.default.frbrEditionLinkText,
dialogTitle: _i18n2.default.frbrEditionDialogTitle,
tabs: [{
label: _i18n2.default.tabGeneral,
specials: [{ type: 'LabelsAndDescriptionArea' }],
fieldsets: [{
fields: [{ property: 'P31' /* instance of */
}, { property: 'P18' /* image */
}]
}, {
fields: [{ property: 'P629' /* edition or translation of */
}, { property: 'P393' /* edition number */
}, { property: 'P291' /* place of publication */
}, { property: 'P123' /* publisher */
}, { property: 'P577' /* date of publication */
}, { property: 'P872' /* printed by */
}]
}, {
fields: [{ property: 'P407' /* language */
}, { property: 'P1476' /* title */
}, { property: 'P1680' /* subtitle */
}]
}, {
fields: [{ property: 'P361' /* part of */
}, { property: 'P1433' /* published in */
}, { property: 'P155' /* follows */
}, { property: 'P156' /* followed by */
}]
}]
}, {
labelEntityId: 'Q1260632' /* content */
, fieldsets: [{
fields: [{ property: 'P50' /* author */
}, { property: 'P655' /* translator */
}, { property: 'P98' /* editor */
}, { property: 'P110' /* illustrator */
}, { property: 'P767' /* collaborator */
}]
}, {
fields: [{ property: 'P1104' /* movement */
}, { property: 'P996' /* scan file */
}, { property: 'P953' /* full text available at */
}]
}]
}, {
labelEntityId: 'Q36524' /* authority control */
, specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31 wd:Q29547399 . ' /* Wikidata property to identify books */
+ '?property wikibase:propertyType wikibase:ExternalId . ' + '}' }]
}]
};
exports.default = editorDescription;
/***/ }),
/* 454 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _i18n = __webpack_require__(91);
var _i18n2 = _interopRequireDefault(_i18n);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var editorDescription = {
linkText: _i18n2.default.externalLinksLinkText,
dialogTitle: _i18n2.default.externalLinksDialogTitle,
tabs: [{
labelEntityId: 'Q6576792' /* online community */
, specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31 wd:Q30041186 . ' /* Wikidata property related to online communities */
+ '?property wikibase:propertyType wikibase:ExternalId . ' + '}' }]
}, {
labelEntityId: 'Q1415395' /* film industry */
, specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31/wdt:P279* wd:Q22964274 . ' /* Wikidata property for identification in the film industry */
+ '?property wikibase:propertyType wikibase:ExternalId . ' + '}' }]
}, {
labelEntityId: 'Q638' /* music */
, specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31/wdt:P279* wd:Q27525351 . ' /* Wikidata property related to music */
+ '?property wikibase:propertyType wikibase:ExternalId . ' + '}' }]
}, {
labelEntityId: 'Q7991' /* natural science */
, specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31/wdt:P279* wd:Q52425722 . ' /* Wikidata property related to natural science */
+ '?property wikibase:propertyType wikibase:ExternalId . ' + '}' }]
}, {
labelEntityId: 'Q349' /* sport */
, specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31/wdt:P279* wd:Q21818626 . ' /* Wikidata property related to sport */
+ '?property wikibase:propertyType wikibase:ExternalId . ' + '}' }]
}, {
labelEntityId: 'Q7889' /* video game */
, specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31/wdt:P279* wd:Q28147643 . ' /* Wikidata property related to video games */
+ '?property wikibase:propertyType wikibase:ExternalId . ' + '}' }]
}, {
labelEntityId: 'Q5292' /* encyclopedia */
, specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31/wdt:P279* wd:Q55452870 . ' /* Wikidata property, related to encyclopedia */
+ '?property wikibase:propertyType wikibase:ExternalId . ' + '}' }]
}, {
labelEntityId: 'Q36524' /* authority control */
, specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + ' ?property wdt:P31/wdt:P279* wd:Q18614948 . ' /* Wikidata property for authority control, with reciprocal use of Wikidata */
+ ' ?property wikibase:propertyType wikibase:ExternalId . '
/* properties from previous tabs */
+ ' MINUS { ?property wdt:P31 wd:Q30041186 } . ' /* Wikidata property related to online communities */
+ ' MINUS { ?property wdt:P31/wdt:P279* wd:Q22964274 } . ' /* Wikidata property for identification in the film industry */
+ ' MINUS { ?property wdt:P31/wdt:P279* wd:Q27525351 } . ' /* Wikidata property related to music */
+ ' MINUS { ?property wdt:P31/wdt:P279* wd:Q21818626 } . ' /* Wikidata property related to sport */
+ ' MINUS { ?property wdt:P31/wdt:P279* wd:Q52425722 } . ' /* Wikidata property related to natural science */
+ ' MINUS { ?property wdt:P31/wdt:P279* wd:Q28147643 } . ' /* Wikidata property related to video games */
+ ' MINUS { ?property wdt:P31/wdt:P279* wd:Q55452870 } . ' /* Wikidata property, related to encyclopedia */
+ '}' }]
}]
};
exports.default = editorDescription;
/***/ }),
/* 455 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var editorDescription = {
linkText: 'WEF: Entity',
dialogTitle: 'Entity',
tabs: [{
label: 'General',
specials: [{ type: 'LabelsAndDescriptionArea' }],
fields: [{ property: 'P31' /* instance of */
}, { property: 'P279' /* subclass of */
}]
}, {
labelEntityId: 'P1343',
fields: [{ property: 'P1343' /* described by source */
}]
}]
};
exports.default = editorDescription;
/***/ }),
/* 456 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var editorDescription = {
linkText: 'WEF: AdmEntity',
dialogTitle: 'Administrative Entity',
tabs: [{
label: 'General',
specials: [{ type: 'LabelsAndDescriptionArea' }],
fields: [
/* instance of */
{ property: 'P31' },
/* located in the administrative territorial entity */
{ property: 'P131' },
/* part of */
{ property: 'P361' },
/* country */
{ property: 'P17' },
/* territory claimed by */
{ property: 'P1336' }],
fieldsets: [{
labelEntityId: 'P1448',
fields: [
/* official name */
{ property: 'P1448' }]
}, {
fields: [
/* official language */
{ property: 'P37' },
/* currency */
{ property: 'P38' },
/* official website */
{ property: 'P856' }]
}]
}, {
label: 'Media',
fieldsets: [{
labelEntityId: 'Q14660',
fields: [
/* flag */
{ property: 'P163' },
/* flag image */
{ property: 'P41' }]
}, {
labelEntityId: 'Q14659',
fields: [
/* coat of arms */
{ property: 'P237' },
/* coat of arms image */
{ property: 'P94' }]
}],
fields: [
/* Image */
{ property: 'P18' },
/* song */
{ property: 'P85' },
/* commons */
{ property: 'P373' }]
}, {
labelEntityId: 'Q309' /* history */
, fieldsets: [{
fields: [{ property: 'P571' /* est. date */
}, { property: 'P155' /* previous */
}, { property: 'P156' /* next */
}]
}, {
labelEntityId: 'P138' /* named after */
, fields: [{ property: 'P138' /* named after */
}]
}, {
labelEntityId: 'P793' /* significant event */
, fields: [{ property: 'P793' /* significant event */
}]
}]
}, {
labelEntityId: 'Q1071' /* geography */
, fieldsets: [{
fields: [{ property: 'P625' /* coordinate location */
}, { property: 'P30' /* continent */
}, { property: 'P36' /* capital */
}, { property: 'P1376' /* capital of */
}, { property: 'P421' /* time zone */
}]
}, {
labelEntityId: 'P47',
fields: [{ property: 'P47' /* shares border with */
}]
}, {
fields: [{ property: 'P206' /* located next to body of water */
}, { property: 'P610' /* highest point */
}]
}]
}, {
labelEntityId: 'Q7163',
fieldsets: [{
fields: [{ property: 'P122' /* basic form of government */
}, { property: 'P194' /* legislative body */
}, { property: 'P209' /* highest judicial authority */
}, { property: 'P6' /* head of government */
}, { property: 'P1313' /* office held by head of government */
}, { property: 'P1304' /* central bank */
}]
}]
}, {
labelEntityId: 'P527', /* has part */
fieldsets: [{
fields: [{ property: 'P150' /* contains administrative territorial entity */
}]
}]
}, {
labelEntityId: 'Q37732', /* demography */
fieldsets: [{
fields: [{ property: 'P1125' /* Gini coefficient */
}, { property: 'P1082' /* population */
}]
}]
}, {
labelEntityId: 'P190' /* twinned administrative body */
, fieldsets: [{
fields: [{ property: 'P190' /* twinned administrative body */
}]
}]
}, {
labelEntityId: 'P463', /* member of */
fieldsets: [{
fields: [{ property: 'P463' /* member of */
}]
}]
}, {
labelEntityId: 'Q4167836', /* categories */
fieldsets: [{
fields: [{ property: 'P910' /* main category */
}, { property: 'P1464' /* category for people born here */
}, { property: 'P1465' /* category for people who died here */
}, { property: 'P1791' /* category of people buried here */
}, { property: 'P1792' /* category of associated people */
}]
}]
}, {
labelEntityId: 'Q853614', /* identifier */
fieldsets: [{
fields: [{ property: 'P281' /* postal code */
}, { property: 'P395' /* licence plate code */
}, { property: 'P473' /* local dialing code */
}]
}, {
labelEntityId: 'Q106487',
fields: [{ property: 'P297' /* ISO 3166-1 alpha-2 code */
}, { property: 'P298' /* ISO 3166-1 alpha-3 code */
}, { property: 'P299' /* ISO 3166-1 numeric code */
}, { property: 'P300' /* ISO 3166-2 code */
}, { property: 'P773' /* ISO 3166-3 */
}]
}]
}, {
labelEntityId: 'Q36524',
specials: [{ type: 'SparqlPropertyGroup',
sparql: 'SELECT DISTINCT ?property ' + 'WHERE { ' + '?property wdt:P31 wd:Q19829908 . ' + 'MINUS { ?property wdt:P31 wd:Q24041622 } . ' /* Wikidata property for bodies of water */
+ '?property wikibase:propertyType wikibase:ExternalId . ' + '}' }]
}]
};
exports.default = editorDescription;
/***/ }),
/* 457 */
/***/ (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.
*
* @typechecks
*/
/**
* @param {*} object The object to check.
* @return {boolean} Whether or not the object is a DOM node.
*/
function isNode(object) {
var doc = object ? object.ownerDocument || object : document;
var defaultView = doc.defaultView || window;
return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
}
module.exports = isNode;
/***/ }),
/* 458 */
/***/ (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.
*
* @typechecks
*/
var isNode = __webpack_require__(457);
/**
* @param {*} object The object to check.
* @return {boolean} Whether or not the object is a DOM text node.
*/
function isTextNode(object) {
return isNode(object) && object.nodeType == 3;
}
module.exports = isTextNode;
/***/ }),
/* 459 */
/***/ (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 isTextNode = __webpack_require__(458);
/*eslint-disable no-bitwise */
/**
* Checks if a given DOM node contains or is another DOM node.
*/
function containsNode(outerNode, innerNode) {
if (!outerNode || !innerNode) {
return false;
} else if (outerNode === innerNode) {
return true;
} else if (isTextNode(outerNode)) {
return false;
} else if (isTextNode(innerNode)) {
return containsNode(outerNode, innerNode.parentNode);
} else if ('contains' in outerNode) {
return outerNode.contains(innerNode);
} else if (outerNode.compareDocumentPosition) {
return !!(outerNode.compareDocumentPosition(innerNode) & 16);
} else {
return false;
}
}
module.exports = containsNode;
/***/ }),
/* 460 */
/***/ (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.
*
* @typechecks
*/
/* eslint-disable fb-www/typeof-undefined */
/**
* Same as document.activeElement but wraps in a try-catch block. In IE it is
* not safe to call document.activeElement if there is nothing focused.
*
* The activeElement will be null only if the document or document body is not
* yet defined.
*
* @param {?DOMDocument} doc Defaults to current document.
* @return {?DOMElement}
*/
function getActiveElement(doc) /*?DOMElement*/{
doc = doc || (typeof document !== 'undefined' ? document : undefined);
if (typeof doc === 'undefined') {
return null;
}
try {
return doc.activeElement || doc.body;
} catch (e) {
return doc.body;
}
}
module.exports = getActiveElement;
/***/ }),
/* 461 */
/***/ (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 canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
/**
* Simple, lightweight module assisting with the detection and context of
* Worker. Helps avoid circular dependencies and allows code to reason about
* whether or not they are in a Worker, even if they never include the main
* `ReactWorker` dependency.
*/
var ExecutionEnvironment = {
canUseDOM: canUseDOM,
canUseWorkers: typeof Worker !== 'undefined',
canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
canUseViewport: canUseDOM && !!window.screen,
isInWorker: !canUseDOM // For now, this is true - might change in the future.
};
module.exports = ExecutionEnvironment;
/***/ }),
/* 462 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @license React v16.4.1
* react-dom.production.min.js
*
* 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.
*/
/*
Modernizr 3.0.0pre (Custom Build) | MIT
*/
var aa=__webpack_require__(146),ba=__webpack_require__(0),m=__webpack_require__(461),p=__webpack_require__(231),v=__webpack_require__(145),da=__webpack_require__(460),ea=__webpack_require__(76),fa=__webpack_require__(459),ha=__webpack_require__(230);
function A(a){for(var b=arguments.length-1,c="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=0;d<b;d++)c+="&args[]="+encodeURIComponent(arguments[d+1]);aa(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",c)}ba?void 0:A("227");
function ia(a,b,c,d,e,f,g,h,k){this._hasCaughtError=!1;this._caughtError=null;var n=Array.prototype.slice.call(arguments,3);try{b.apply(c,n)}catch(r){this._caughtError=r,this._hasCaughtError=!0}}
var B={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(a,b,c,d,e,f,g,h,k){ia.apply(B,arguments)},invokeGuardedCallbackAndCatchFirstError:function(a,b,c,d,e,f,g,h,k){B.invokeGuardedCallback.apply(this,arguments);if(B.hasCaughtError()){var n=B.clearCaughtError();B._hasRethrowError||(B._hasRethrowError=!0,B._rethrowError=n)}},rethrowCaughtError:function(){return ka.apply(B,arguments)},hasCaughtError:function(){return B._hasCaughtError},clearCaughtError:function(){if(B._hasCaughtError){var a=
B._caughtError;B._caughtError=null;B._hasCaughtError=!1;return a}A("198")}};function ka(){if(B._hasRethrowError){var a=B._rethrowError;B._rethrowError=null;B._hasRethrowError=!1;throw a;}}var la=null,ma={};
function na(){if(la)for(var a in ma){var b=ma[a],c=la.indexOf(a);-1<c?void 0:A("96",a);if(!oa[c]){b.extractEvents?void 0:A("97",a);oa[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;pa.hasOwnProperty(h)?A("99",h):void 0;pa[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&qa(k[e],g,h);e=!0}else f.registrationName?(qa(f.registrationName,g,h),e=!0):e=!1;e?void 0:A("98",d,a)}}}}
function qa(a,b,c){ra[a]?A("100",a):void 0;ra[a]=b;sa[a]=b.eventTypes[c].dependencies}var oa=[],pa={},ra={},sa={};function ta(a){la?A("101"):void 0;la=Array.prototype.slice.call(a);na()}function ua(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];ma.hasOwnProperty(c)&&ma[c]===d||(ma[c]?A("102",c):void 0,ma[c]=d,b=!0)}b&&na()}
var va={plugins:oa,eventNameDispatchConfigs:pa,registrationNameModules:ra,registrationNameDependencies:sa,possibleRegistrationNames:null,injectEventPluginOrder:ta,injectEventPluginsByName:ua},wa=null,xa=null,ya=null;function za(a,b,c,d){b=a.type||"unknown-event";a.currentTarget=ya(d);B.invokeGuardedCallbackAndCatchFirstError(b,c,void 0,a);a.currentTarget=null}
function Aa(a,b){null==b?A("30"):void 0;if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function Ba(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var Ca=null;
function Da(a,b){if(a){var c=a._dispatchListeners,d=a._dispatchInstances;if(Array.isArray(c))for(var e=0;e<c.length&&!a.isPropagationStopped();e++)za(a,b,c[e],d[e]);else c&&za(a,b,c,d);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}}function Ea(a){return Da(a,!0)}function Fa(a){return Da(a,!1)}var Ga={injectEventPluginOrder:ta,injectEventPluginsByName:ua};
function Ha(a,b){var c=a.stateNode;if(!c)return null;var d=wa(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;c&&"function"!==typeof c?A("231",b,typeof c):void 0;
return c}function Ia(a,b){null!==a&&(Ca=Aa(Ca,a));a=Ca;Ca=null;a&&(b?Ba(a,Ea):Ba(a,Fa),Ca?A("95"):void 0,B.rethrowCaughtError())}function Ja(a,b,c,d){for(var e=null,f=0;f<oa.length;f++){var g=oa[f];g&&(g=g.extractEvents(a,b,c,d))&&(e=Aa(e,g))}Ia(e,!1)}var Ka={injection:Ga,getListener:Ha,runEventsInBatch:Ia,runExtractedEventsInBatch:Ja},La=Math.random().toString(36).slice(2),C="__reactInternalInstance$"+La,Ma="__reactEventHandlers$"+La;
function Na(a){if(a[C])return a[C];for(;!a[C];)if(a.parentNode)a=a.parentNode;else return null;a=a[C];return 5===a.tag||6===a.tag?a:null}function Oa(a){if(5===a.tag||6===a.tag)return a.stateNode;A("33")}function Pa(a){return a[Ma]||null}var Qa={precacheFiberNode:function(a,b){b[C]=a},getClosestInstanceFromNode:Na,getInstanceFromNode:function(a){a=a[C];return!a||5!==a.tag&&6!==a.tag?null:a},getNodeFromInstance:Oa,getFiberCurrentPropsFromNode:Pa,updateFiberProps:function(a,b){a[Ma]=b}};
function F(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function Ra(a,b,c){for(var d=[];a;)d.push(a),a=F(a);for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)}function Sa(a,b,c){if(b=Ha(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=Aa(c._dispatchListeners,b),c._dispatchInstances=Aa(c._dispatchInstances,a)}function Ta(a){a&&a.dispatchConfig.phasedRegistrationNames&&Ra(a._targetInst,Sa,a)}
function Ua(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?F(b):null;Ra(b,Sa,a)}}function Va(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Ha(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=Aa(c._dispatchListeners,b),c._dispatchInstances=Aa(c._dispatchInstances,a))}function Xa(a){a&&a.dispatchConfig.registrationName&&Va(a._targetInst,null,a)}function Ya(a){Ba(a,Ta)}
function Za(a,b,c,d){if(c&&d)a:{var e=c;for(var f=d,g=0,h=e;h;h=F(h))g++;h=0;for(var k=f;k;k=F(k))h++;for(;0<g-h;)e=F(e),g--;for(;0<h-g;)f=F(f),h--;for(;g--;){if(e===f||e===f.alternate)break a;e=F(e);f=F(f)}e=null}else e=null;f=e;for(e=[];c&&c!==f;){g=c.alternate;if(null!==g&&g===f)break;e.push(c);c=F(c)}for(c=[];d&&d!==f;){g=d.alternate;if(null!==g&&g===f)break;c.push(d);d=F(d)}for(d=0;d<e.length;d++)Va(e[d],"bubbled",a);for(a=c.length;0<a--;)Va(c[a],"captured",b)}
var $a={accumulateTwoPhaseDispatches:Ya,accumulateTwoPhaseDispatchesSkipTarget:function(a){Ba(a,Ua)},accumulateEnterLeaveDispatches:Za,accumulateDirectDispatches:function(a){Ba(a,Xa)}};function ab(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;c["ms"+a]="MS"+b;c["O"+a]="o"+b.toLowerCase();return c}
var bb={animationend:ab("Animation","AnimationEnd"),animationiteration:ab("Animation","AnimationIteration"),animationstart:ab("Animation","AnimationStart"),transitionend:ab("Transition","TransitionEnd")},cb={},db={};m.canUseDOM&&(db=document.createElement("div").style,"AnimationEvent"in window||(delete bb.animationend.animation,delete bb.animationiteration.animation,delete bb.animationstart.animation),"TransitionEvent"in window||delete bb.transitionend.transition);
function eb(a){if(cb[a])return cb[a];if(!bb[a])return a;var b=bb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in db)return cb[a]=b[c];return a}var fb=eb("animationend"),gb=eb("animationiteration"),hb=eb("animationstart"),ib=eb("transitionend"),jb="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),kb=null;
function lb(){!kb&&m.canUseDOM&&(kb="textContent"in document.documentElement?"textContent":"innerText");return kb}var G={_root:null,_startText:null,_fallbackText:null};function mb(){if(G._fallbackText)return G._fallbackText;var a,b=G._startText,c=b.length,d,e=nb(),f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);G._fallbackText=e.slice(a,1<d?1-d:void 0);return G._fallbackText}function nb(){return"value"in G._root?G._root.value:G._root[lb()]}
var ob="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),pb={type:null,target:null,currentTarget:v.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
function H(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?v.thatReturnsTrue:v.thatReturnsFalse;this.isPropagationStopped=v.thatReturnsFalse;return this}
p(H.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=v.thatReturnsTrue)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=v.thatReturnsTrue)},persist:function(){this.isPersistent=v.thatReturnsTrue},isPersistent:v.thatReturnsFalse,
destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;for(a=0;a<ob.length;a++)this[ob[a]]=null}});H.Interface=pb;H.extend=function(a){function b(){}function c(){return d.apply(this,arguments)}var d=this;b.prototype=d.prototype;var e=new b;p(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=p({},d.Interface,a);c.extend=d.extend;qb(c);return c};qb(H);
function rb(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}function sb(a){a instanceof this?void 0:A("223");a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function qb(a){a.eventPool=[];a.getPooled=rb;a.release=sb}var tb=H.extend({data:null}),ub=H.extend({data:null}),vb=[9,13,27,32],wb=m.canUseDOM&&"CompositionEvent"in window,xb=null;m.canUseDOM&&"documentMode"in document&&(xb=document.documentMode);
var yb=m.canUseDOM&&"TextEvent"in window&&!xb,zb=m.canUseDOM&&(!wb||xb&&8<xb&&11>=xb),Ab=String.fromCharCode(32),Bb={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",
captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Cb=!1;
function Db(a,b){switch(a){case "keyup":return-1!==vb.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function Eb(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var Fb=!1;function Gb(a,b){switch(a){case "compositionend":return Eb(b);case "keypress":if(32!==b.which)return null;Cb=!0;return Ab;case "textInput":return a=b.data,a===Ab&&Cb?null:a;default:return null}}
function Hb(a,b){if(Fb)return"compositionend"===a||!wb&&Db(a,b)?(a=mb(),G._root=null,G._startText=null,G._fallbackText=null,Fb=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return zb?null:b.data;default:return null}}
var Ib={eventTypes:Bb,extractEvents:function(a,b,c,d){var e=void 0;var f=void 0;if(wb)b:{switch(a){case "compositionstart":e=Bb.compositionStart;break b;case "compositionend":e=Bb.compositionEnd;break b;case "compositionupdate":e=Bb.compositionUpdate;break b}e=void 0}else Fb?Db(a,c)&&(e=Bb.compositionEnd):"keydown"===a&&229===c.keyCode&&(e=Bb.compositionStart);e?(zb&&(Fb||e!==Bb.compositionStart?e===Bb.compositionEnd&&Fb&&(f=mb()):(G._root=d,G._startText=nb(),Fb=!0)),e=tb.getPooled(e,b,c,d),f?e.data=
f:(f=Eb(c),null!==f&&(e.data=f)),Ya(e),f=e):f=null;(a=yb?Gb(a,c):Hb(a,c))?(b=ub.getPooled(Bb.beforeInput,b,c,d),b.data=a,Ya(b)):b=null;return null===f?b:null===b?f:[f,b]}},Jb=null,Kb={injectFiberControlledHostComponent:function(a){Jb=a}},Lb=null,Mb=null;function Nb(a){if(a=xa(a)){Jb&&"function"===typeof Jb.restoreControlledState?void 0:A("194");var b=wa(a.stateNode);Jb.restoreControlledState(a.stateNode,a.type,b)}}function Ob(a){Lb?Mb?Mb.push(a):Mb=[a]:Lb=a}
function Pb(){return null!==Lb||null!==Mb}function Qb(){if(Lb){var a=Lb,b=Mb;Mb=Lb=null;Nb(a);if(b)for(a=0;a<b.length;a++)Nb(b[a])}}var Rb={injection:Kb,enqueueStateRestore:Ob,needsStateRestore:Pb,restoreStateIfNeeded:Qb};function Sb(a,b){return a(b)}function Tb(a,b,c){return a(b,c)}function Ub(){}var Vb=!1;function Wb(a,b){if(Vb)return a(b);Vb=!0;try{return Sb(a,b)}finally{Vb=!1,Pb()&&(Ub(),Qb())}}
var Xb={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Yb(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!Xb[a.type]:"textarea"===b?!0:!1}function Zb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}
function $b(a,b){if(!m.canUseDOM||b&&!("addEventListener"in document))return!1;a="on"+a;b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}function ac(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
function bc(a){var b=ac(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
null;delete a[b]}}}}function cc(a){a._valueTracker||(a._valueTracker=bc(a))}function dc(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=ac(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}
var ec=ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fc="function"===typeof Symbol&&Symbol.for,gc=fc?Symbol.for("react.element"):60103,hc=fc?Symbol.for("react.portal"):60106,ic=fc?Symbol.for("react.fragment"):60107,jc=fc?Symbol.for("react.strict_mode"):60108,kc=fc?Symbol.for("react.profiler"):60114,lc=fc?Symbol.for("react.provider"):60109,mc=fc?Symbol.for("react.context"):60110,pc=fc?Symbol.for("react.async_mode"):60111,qc=fc?Symbol.for("react.forward_ref"):60112,rc=fc?Symbol.for("react.timeout"):
60113,sc="function"===typeof Symbol&&Symbol.iterator;function tc(a){if(null===a||"undefined"===typeof a)return null;a=sc&&a[sc]||a["@@iterator"];return"function"===typeof a?a:null}
function uc(a){var b=a.type;if("function"===typeof b)return b.displayName||b.name;if("string"===typeof b)return b;switch(b){case pc:return"AsyncMode";case mc:return"Context.Consumer";case ic:return"ReactFragment";case hc:return"ReactPortal";case kc:return"Profiler("+a.pendingProps.id+")";case lc:return"Context.Provider";case jc:return"StrictMode";case rc:return"Timeout"}if("object"===typeof b&&null!==b)switch(b.$$typeof){case qc:return a=b.render.displayName||b.render.name||"",""!==a?"ForwardRef("+
a+")":"ForwardRef"}return null}function vc(a){var b="";do{a:switch(a.tag){case 0:case 1:case 2:case 5:var c=a._debugOwner,d=a._debugSource;var e=uc(a);var f=null;c&&(f=uc(c));c=d;e="\n in "+(e||"Unknown")+(c?" (at "+c.fileName.replace(/^.*[\\\/]/,"")+":"+c.lineNumber+")":f?" (created by "+f+")":"");break a;default:e=""}b+=e;a=a.return}while(a);return b}
var wc=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,xc={},zc={};function Ac(a){if(zc.hasOwnProperty(a))return!0;if(xc.hasOwnProperty(a))return!1;if(wc.test(a))return zc[a]=!0;xc[a]=!0;return!1}
function Bc(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function Cc(a,b,c,d){if(null===b||"undefined"===typeof b||Bc(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}
function I(a,b,c,d,e){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b}var J={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){J[a]=new I(a,0,!1,a,null)});
[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];J[b]=new I(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){J[a]=new I(a,2,!1,a.toLowerCase(),null)});["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(a){J[a]=new I(a,2,!1,a,null)});
"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){J[a]=new I(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){J[a]=new I(a,3,!0,a.toLowerCase(),null)});["capture","download"].forEach(function(a){J[a]=new I(a,4,!1,a.toLowerCase(),null)});
["cols","rows","size","span"].forEach(function(a){J[a]=new I(a,6,!1,a.toLowerCase(),null)});["rowSpan","start"].forEach(function(a){J[a]=new I(a,5,!1,a.toLowerCase(),null)});var Dc=/[\-:]([a-z])/g;function Ec(a){return a[1].toUpperCase()}
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(Dc,
Ec);J[b]=new I(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Dc,Ec);J[b]=new I(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Dc,Ec);J[b]=new I(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});J.tabIndex=new I("tabIndex",1,!1,"tabindex",null);
function Fc(a,b,c,d){var e=J.hasOwnProperty(b)?J[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(Cc(b,c,e,d)&&(c=null),d||null===e?Ac(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}
function Gc(a,b){var c=b.checked;return p({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Hc(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Ic(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function Jc(a,b){b=b.checked;null!=b&&Fc(a,"checked",b,!1)}
function Kc(a,b){Jc(a,b);var c=Ic(b.value);if(null!=c)if("number"===b.type){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);b.hasOwnProperty("value")?Lc(a,b.type,c):b.hasOwnProperty("defaultValue")&&Lc(a,b.type,Ic(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
function Mc(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){b=""+a._wrapperState.initialValue;var d=a.value;c||b===d||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!a.defaultChecked;a.defaultChecked=!a.defaultChecked;""!==c&&(a.name=c)}function Lc(a,b,c){if("number"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}
function Ic(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}var Nc={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Oc(a,b,c){a=H.getPooled(Nc.change,a,b,c);a.type="change";Ob(c);Ya(a);return a}var Pc=null,Qc=null;function Rc(a){Ia(a,!1)}function Sc(a){var b=Oa(a);if(dc(b))return a}
function Tc(a,b){if("change"===a)return b}var Uc=!1;m.canUseDOM&&(Uc=$b("input")&&(!document.documentMode||9<document.documentMode));function Vc(){Pc&&(Pc.detachEvent("onpropertychange",Wc),Qc=Pc=null)}function Wc(a){"value"===a.propertyName&&Sc(Qc)&&(a=Oc(Qc,a,Zb(a)),Wb(Rc,a))}function Xc(a,b,c){"focus"===a?(Vc(),Pc=b,Qc=c,Pc.attachEvent("onpropertychange",Wc)):"blur"===a&&Vc()}function Yc(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return Sc(Qc)}
function Zc(a,b){if("click"===a)return Sc(b)}function $c(a,b){if("input"===a||"change"===a)return Sc(b)}
var ad={eventTypes:Nc,_isInputEventSupported:Uc,extractEvents:function(a,b,c,d){var e=b?Oa(b):window,f=void 0,g=void 0,h=e.nodeName&&e.nodeName.toLowerCase();"select"===h||"input"===h&&"file"===e.type?f=Tc:Yb(e)?Uc?f=$c:(f=Yc,g=Xc):(h=e.nodeName)&&"input"===h.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)&&(f=Zc);if(f&&(f=f(a,b)))return Oc(f,c,d);g&&g(a,e,b);"blur"===a&&(a=e._wrapperState)&&a.controlled&&"number"===e.type&&Lc(e,"number",e.value)}},bd=H.extend({view:null,detail:null}),cd={Alt:"altKey",
Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=cd[a])?!!b[a]:!1}function ed(){return dd}
var fd=bd.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:ed,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)}}),gd=fd.extend({pointerId:null,width:null,height:null,pressure:null,tiltX:null,tiltY:null,pointerType:null,isPrimary:null}),hd={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},
mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},id={eventTypes:hd,extractEvents:function(a,b,c,d){var e="mouseover"===a||"pointerover"===a,f="mouseout"===a||"pointerout"===a;if(e&&(c.relatedTarget||c.fromElement)||!f&&!e)return null;e=d.window===d?d:(e=d.ownerDocument)?e.defaultView||
e.parentWindow:window;f?(f=b,b=(b=c.relatedTarget||c.toElement)?Na(b):null):f=null;if(f===b)return null;var g=void 0,h=void 0,k=void 0,n=void 0;if("mouseout"===a||"mouseover"===a)g=fd,h=hd.mouseLeave,k=hd.mouseEnter,n="mouse";else if("pointerout"===a||"pointerover"===a)g=gd,h=hd.pointerLeave,k=hd.pointerEnter,n="pointer";a=null==f?e:Oa(f);e=null==b?e:Oa(b);h=g.getPooled(h,f,c,d);h.type=n+"leave";h.target=a;h.relatedTarget=e;c=g.getPooled(k,b,c,d);c.type=n+"enter";c.target=e;c.relatedTarget=a;Za(h,
c,f,b);return[h,c]}};function jd(a){var b=a;if(a.alternate)for(;b.return;)b=b.return;else{if(0!==(b.effectTag&2))return 1;for(;b.return;)if(b=b.return,0!==(b.effectTag&2))return 1}return 3===b.tag?2:3}function kd(a){2!==jd(a)?A("188"):void 0}
function ld(a){var b=a.alternate;if(!b)return b=jd(a),3===b?A("188"):void 0,1===b?null:a;for(var c=a,d=b;;){var e=c.return,f=e?e.alternate:null;if(!e||!f)break;if(e.child===f.child){for(var g=e.child;g;){if(g===c)return kd(e),a;if(g===d)return kd(e),b;g=g.sibling}A("188")}if(c.return!==d.return)c=e,d=f;else{g=!1;for(var h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}g?
void 0:A("189")}}c.alternate!==d?A("190"):void 0}3!==c.tag?A("188"):void 0;return c.stateNode.current===c?a:b}function md(a){a=ld(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
function nd(a){a=ld(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child&&4!==b.tag)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}var od=H.extend({animationName:null,elapsedTime:null,pseudoElement:null}),pd=H.extend({clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),qd=bd.extend({relatedTarget:null});
function rd(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}
var sd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},td={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",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",224:"Meta"},ud=bd.extend({key:function(a){if(a.key){var b=sd[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=rd(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?td[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:ed,charCode:function(a){return"keypress"===
a.type?rd(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?rd(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),vd=fd.extend({dataTransfer:null}),wd=bd.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:ed}),xd=H.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),yd=fd.extend({deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in
a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null}),zd=[["abort","abort"],[fb,"animationEnd"],[gb,"animationIteration"],[hb,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],
["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],
["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[ib,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],Ad={},Bd={};function Cd(a,b){var c=a[0];a=a[1];var d="on"+(a[0].toUpperCase()+a.slice(1));b={phasedRegistrationNames:{bubbled:d,captured:d+"Capture"},dependencies:[c],isInteractive:b};Ad[a]=b;Bd[c]=b}
[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],
["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(a){Cd(a,!0)});zd.forEach(function(a){Cd(a,!1)});
var Dd={eventTypes:Ad,isInteractiveTopLevelEventType:function(a){a=Bd[a];return void 0!==a&&!0===a.isInteractive},extractEvents:function(a,b,c,d){var e=Bd[a];if(!e)return null;switch(a){case "keypress":if(0===rd(c))return null;case "keydown":case "keyup":a=ud;break;case "blur":case "focus":a=qd;break;case "click":if(2===c.button)return null;case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":a=fd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":a=
vd;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":a=wd;break;case fb:case gb:case hb:a=od;break;case ib:a=xd;break;case "scroll":a=bd;break;case "wheel":a=yd;break;case "copy":case "cut":case "paste":a=pd;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":a=gd;break;default:a=H}b=a.getPooled(e,b,c,d);Ya(b);return b}},Ed=Dd.isInteractiveTopLevelEventType,
Fd=[];function Gd(a){var b=a.targetInst;do{if(!b){a.ancestors.push(b);break}var c;for(c=b;c.return;)c=c.return;c=3!==c.tag?null:c.stateNode.containerInfo;if(!c)break;a.ancestors.push(b);b=Na(c)}while(b);for(c=0;c<a.ancestors.length;c++)b=a.ancestors[c],Ja(a.topLevelType,b,a.nativeEvent,Zb(a.nativeEvent))}var Hd=!0;function Id(a){Hd=!!a}function K(a,b){if(!b)return null;var c=(Ed(a)?Kd:Ld).bind(null,a);b.addEventListener(a,c,!1)}
function Md(a,b){if(!b)return null;var c=(Ed(a)?Kd:Ld).bind(null,a);b.addEventListener(a,c,!0)}function Kd(a,b){Tb(Ld,a,b)}function Ld(a,b){if(Hd){var c=Zb(b);c=Na(c);null===c||"number"!==typeof c.tag||2===jd(c)||(c=null);if(Fd.length){var d=Fd.pop();d.topLevelType=a;d.nativeEvent=b;d.targetInst=c;a=d}else a={topLevelType:a,nativeEvent:b,targetInst:c,ancestors:[]};try{Wb(Gd,a)}finally{a.topLevelType=null,a.nativeEvent=null,a.targetInst=null,a.ancestors.length=0,10>Fd.length&&Fd.push(a)}}}
var Nd={get _enabled(){return Hd},setEnabled:Id,isEnabled:function(){return Hd},trapBubbledEvent:K,trapCapturedEvent:Md,dispatchEvent:Ld},Od={},Pd=0,Qd="_reactListenersID"+(""+Math.random()).slice(2);function Rd(a){Object.prototype.hasOwnProperty.call(a,Qd)||(a[Qd]=Pd++,Od[a[Qd]]={});return Od[a[Qd]]}function Sd(a){for(;a&&a.firstChild;)a=a.firstChild;return a}
function Td(a,b){var c=Sd(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Sd(c)}}function Ud(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}
var Vd=m.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Wd={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Xd=null,Yd=null,Zd=null,$d=!1;
function ae(a,b){if($d||null==Xd||Xd!==da())return null;var c=Xd;"selectionStart"in c&&Ud(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return Zd&&ea(Zd,c)?null:(Zd=c,a=H.getPooled(Wd.select,Yd,a,b),a.type="select",a.target=Xd,Ya(a),a)}
var be={eventTypes:Wd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Rd(e);f=sa.onSelect;for(var g=0;g<f.length;g++){var h=f[g];if(!e.hasOwnProperty(h)||!e[h]){e=!1;break a}}e=!0}f=!e}if(f)return null;e=b?Oa(b):window;switch(a){case "focus":if(Yb(e)||"true"===e.contentEditable)Xd=e,Yd=b,Zd=null;break;case "blur":Zd=Yd=Xd=null;break;case "mousedown":$d=!0;break;case "contextmenu":case "mouseup":return $d=!1,ae(c,d);case "selectionchange":if(Vd)break;
case "keydown":case "keyup":return ae(c,d)}return null}};Ga.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));wa=Qa.getFiberCurrentPropsFromNode;xa=Qa.getInstanceFromNode;ya=Qa.getNodeFromInstance;Ga.injectEventPluginsByName({SimpleEventPlugin:Dd,EnterLeaveEventPlugin:id,ChangeEventPlugin:ad,SelectEventPlugin:be,BeforeInputEventPlugin:Ib});
var ce="function"===typeof requestAnimationFrame?requestAnimationFrame:void 0,de=Date,ee=setTimeout,fe=clearTimeout,ge=void 0;if("object"===typeof performance&&"function"===typeof performance.now){var he=performance;ge=function(){return he.now()}}else ge=function(){return de.now()};var ie=void 0,je=void 0;
if(m.canUseDOM){var ke="function"===typeof ce?ce:function(){A("276")},L=null,le=null,me=-1,ne=!1,oe=!1,pe=0,qe=33,re=33,se={didTimeout:!1,timeRemaining:function(){var a=pe-ge();return 0<a?a:0}},ue=function(a,b){var c=a.scheduledCallback,d=!1;try{c(b),d=!0}finally{je(a),d||(ne=!0,window.postMessage(te,"*"))}},te="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(a){if(a.source===window&&a.data===te&&(ne=!1,null!==L)){if(null!==L){var b=ge();if(!(-1===
me||me>b)){a=-1;for(var c=[],d=L;null!==d;){var e=d.timeoutTime;-1!==e&&e<=b?c.push(d):-1!==e&&(-1===a||e<a)&&(a=e);d=d.next}if(0<c.length)for(se.didTimeout=!0,b=0,d=c.length;b<d;b++)ue(c[b],se);me=a}}for(a=ge();0<pe-a&&null!==L;)a=L,se.didTimeout=!1,ue(a,se),a=ge();null===L||oe||(oe=!0,ke(ve))}},!1);var ve=function(a){oe=!1;var b=a-pe+re;b<re&&qe<re?(8>b&&(b=8),re=b<qe?qe:b):qe=b;pe=a+re;ne||(ne=!0,window.postMessage(te,"*"))};ie=function(a,b){var c=-1;null!=b&&"number"===typeof b.timeout&&(c=ge()+
b.timeout);if(-1===me||-1!==c&&c<me)me=c;a={scheduledCallback:a,timeoutTime:c,prev:null,next:null};null===L?L=a:(b=a.prev=le,null!==b&&(b.next=a));le=a;oe||(oe=!0,ke(ve));return a};je=function(a){if(null!==a.prev||L===a){var b=a.next,c=a.prev;a.next=null;a.prev=null;null!==b?null!==c?(c.next=b,b.prev=c):(b.prev=null,L=b):null!==c?(c.next=null,le=c):le=L=null}}}else{var we=new Map;ie=function(a){var b={scheduledCallback:a,timeoutTime:0,next:null,prev:null},c=ee(function(){a({timeRemaining:function(){return Infinity},
didTimeout:!1})});we.set(a,c);return b};je=function(a){var b=we.get(a.scheduledCallback);we.delete(a);fe(b)}}function xe(a){var b="";ba.Children.forEach(a,function(a){null==a||"string"!==typeof a&&"number"!==typeof a||(b+=a)});return b}function ye(a,b){a=p({children:void 0},b);if(b=xe(b.children))a.children=b;return a}
function ze(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+c;b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}
function Ae(a,b){var c=b.value;a._wrapperState={initialValue:null!=c?c:b.defaultValue,wasMultiple:!!b.multiple}}function Be(a,b){null!=b.dangerouslySetInnerHTML?A("91"):void 0;return p({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Ce(a,b){var c=b.value;null==c&&(c=b.defaultValue,b=b.children,null!=b&&(null!=c?A("92"):void 0,Array.isArray(b)&&(1>=b.length?void 0:A("93"),b=b[0]),c=""+b),null==c&&(c=""));a._wrapperState={initialValue:""+c}}
function De(a,b){var c=b.value;null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Ee(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Fe={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
function Ge(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function He(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Ge(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
var Ie=void 0,Je=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Fe.svg||"innerHTML"in a)a.innerHTML=b;else{Ie=Ie||document.createElement("div");Ie.innerHTML="<svg>"+b+"</svg>";for(b=Ie.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});
function Ke(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}
var Le={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,
stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Me=["Webkit","ms","Moz","O"];Object.keys(Le).forEach(function(a){Me.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Le[b]=Le[a]})});
function Ne(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--");var e=c;var f=b[c];e=null==f||"boolean"===typeof f||""===f?"":d||"number"!==typeof f||0===f||Le.hasOwnProperty(e)&&Le[e]?(""+f).trim():f+"px";"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var Oe=p({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});
function Pe(a,b,c){b&&(Oe[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?A("137",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?A("60"):void 0,"object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML?void 0:A("61")),null!=b.style&&"object"!==typeof b.style?A("62",c()):void 0)}
function Qe(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var Re=v.thatReturns("");
function Se(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Rd(a);b=sa[b];for(var d=0;d<b.length;d++){var e=b[d];if(!c.hasOwnProperty(e)||!c[e]){switch(e){case "scroll":Md("scroll",a);break;case "focus":case "blur":Md("focus",a);Md("blur",a);c.blur=!0;c.focus=!0;break;case "cancel":case "close":$b(e,!0)&&Md(e,a);break;case "invalid":case "submit":case "reset":break;default:-1===jb.indexOf(e)&&K(e,a)}c[e]=!0}}}
function Te(a,b,c,d){c=9===c.nodeType?c:c.ownerDocument;d===Fe.html&&(d=Ge(a));d===Fe.html?"script"===a?(a=c.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):a="string"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a}function Ue(a,b){return(9===b.nodeType?b:b.ownerDocument).createTextNode(a)}
function Ve(a,b,c,d){var e=Qe(b,c);switch(b){case "iframe":case "object":K("load",a);var f=c;break;case "video":case "audio":for(f=0;f<jb.length;f++)K(jb[f],a);f=c;break;case "source":K("error",a);f=c;break;case "img":case "image":case "link":K("error",a);K("load",a);f=c;break;case "form":K("reset",a);K("submit",a);f=c;break;case "details":K("toggle",a);f=c;break;case "input":Hc(a,c);f=Gc(a,c);K("invalid",a);Se(d,"onChange");break;case "option":f=ye(a,c);break;case "select":Ae(a,c);f=p({},c,{value:void 0});
K("invalid",a);Se(d,"onChange");break;case "textarea":Ce(a,c);f=Be(a,c);K("invalid",a);Se(d,"onChange");break;default:f=c}Pe(b,f,Re);var g=f,h;for(h in g)if(g.hasOwnProperty(h)){var k=g[h];"style"===h?Ne(a,k,Re):"dangerouslySetInnerHTML"===h?(k=k?k.__html:void 0,null!=k&&Je(a,k)):"children"===h?"string"===typeof k?("textarea"!==b||""!==k)&&Ke(a,k):"number"===typeof k&&Ke(a,""+k):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(ra.hasOwnProperty(h)?null!=k&&Se(d,
h):null!=k&&Fc(a,h,k,e))}switch(b){case "input":cc(a);Mc(a,c,!1);break;case "textarea":cc(a);Ee(a,c);break;case "option":null!=c.value&&a.setAttribute("value",c.value);break;case "select":a.multiple=!!c.multiple;b=c.value;null!=b?ze(a,!!c.multiple,b,!1):null!=c.defaultValue&&ze(a,!!c.multiple,c.defaultValue,!0);break;default:"function"===typeof f.onClick&&(a.onclick=v)}}
function We(a,b,c,d,e){var f=null;switch(b){case "input":c=Gc(a,c);d=Gc(a,d);f=[];break;case "option":c=ye(a,c);d=ye(a,d);f=[];break;case "select":c=p({},c,{value:void 0});d=p({},d,{value:void 0});f=[];break;case "textarea":c=Be(a,c);d=Be(a,d);f=[];break;default:"function"!==typeof c.onClick&&"function"===typeof d.onClick&&(a.onclick=v)}Pe(b,d,Re);b=a=void 0;var g=null;for(a in c)if(!d.hasOwnProperty(a)&&c.hasOwnProperty(a)&&null!=c[a])if("style"===a){var h=c[a];for(b in h)h.hasOwnProperty(b)&&(g||
(g={}),g[b]="")}else"dangerouslySetInnerHTML"!==a&&"children"!==a&&"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(ra.hasOwnProperty(a)?f||(f=[]):(f=f||[]).push(a,null));for(a in d){var k=d[a];h=null!=c?c[a]:void 0;if(d.hasOwnProperty(a)&&k!==h&&(null!=k||null!=h))if("style"===a)if(h){for(b in h)!h.hasOwnProperty(b)||k&&k.hasOwnProperty(b)||(g||(g={}),g[b]="");for(b in k)k.hasOwnProperty(b)&&h[b]!==k[b]&&(g||(g={}),g[b]=k[b])}else g||(f||(f=[]),f.push(a,g)),
g=k;else"dangerouslySetInnerHTML"===a?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(a,""+k)):"children"===a?h===k||"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(a,""+k):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&(ra.hasOwnProperty(a)?(null!=k&&Se(e,a),f||h===k||(f=[])):(f=f||[]).push(a,k))}g&&(f=f||[]).push("style",g);return f}
function Xe(a,b,c,d,e){"input"===c&&"radio"===e.type&&null!=e.name&&Jc(a,e);Qe(c,d);d=Qe(c,e);for(var f=0;f<b.length;f+=2){var g=b[f],h=b[f+1];"style"===g?Ne(a,h,Re):"dangerouslySetInnerHTML"===g?Je(a,h):"children"===g?Ke(a,h):Fc(a,g,h,d)}switch(c){case "input":Kc(a,e);break;case "textarea":De(a,e);break;case "select":a._wrapperState.initialValue=void 0,b=a._wrapperState.wasMultiple,a._wrapperState.wasMultiple=!!e.multiple,c=e.value,null!=c?ze(a,!!e.multiple,c,!1):b!==!!e.multiple&&(null!=e.defaultValue?
ze(a,!!e.multiple,e.defaultValue,!0):ze(a,!!e.multiple,e.multiple?[]:"",!1))}}
function Ye(a,b,c,d,e){switch(b){case "iframe":case "object":K("load",a);break;case "video":case "audio":for(d=0;d<jb.length;d++)K(jb[d],a);break;case "source":K("error",a);break;case "img":case "image":case "link":K("error",a);K("load",a);break;case "form":K("reset",a);K("submit",a);break;case "details":K("toggle",a);break;case "input":Hc(a,c);K("invalid",a);Se(e,"onChange");break;case "select":Ae(a,c);K("invalid",a);Se(e,"onChange");break;case "textarea":Ce(a,c),K("invalid",a),Se(e,"onChange")}Pe(b,
c,Re);d=null;for(var f in c)if(c.hasOwnProperty(f)){var g=c[f];"children"===f?"string"===typeof g?a.textContent!==g&&(d=["children",g]):"number"===typeof g&&a.textContent!==""+g&&(d=["children",""+g]):ra.hasOwnProperty(f)&&null!=g&&Se(e,f)}switch(b){case "input":cc(a);Mc(a,c,!0);break;case "textarea":cc(a);Ee(a,c);break;case "select":case "option":break;default:"function"===typeof c.onClick&&(a.onclick=v)}return d}function Ze(a,b){return a.nodeValue!==b}
var $e={createElement:Te,createTextNode:Ue,setInitialProperties:Ve,diffProperties:We,updateProperties:Xe,diffHydratedProperties:Ye,diffHydratedText:Ze,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(a,b,c){switch(b){case "input":Kc(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;
c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Pa(d);e?void 0:A("90");dc(d);Kc(d,e)}}}break;case "textarea":De(a,c);break;case "select":b=c.value,null!=b&&ze(a,!!c.multiple,b,!1)}}},af=null,bf=null;function cf(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
function df(a,b){return"textarea"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&"string"===typeof b.dangerouslySetInnerHTML.__html}var ef=ge,ff=ie,gf=je;function hf(a){for(a=a.nextSibling;a&&1!==a.nodeType&&3!==a.nodeType;)a=a.nextSibling;return a}function jf(a){for(a=a.firstChild;a&&1!==a.nodeType&&3!==a.nodeType;)a=a.nextSibling;return a}new Set;var kf=[],lf=-1;function mf(a){return{current:a}}
function M(a){0>lf||(a.current=kf[lf],kf[lf]=null,lf--)}function N(a,b){lf++;kf[lf]=a.current;a.current=b}var nf=mf(ha),O=mf(!1),of=ha;function pf(a){return qf(a)?of:nf.current}
function rf(a,b){var c=a.type.contextTypes;if(!c)return ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function qf(a){return 2===a.tag&&null!=a.type.childContextTypes}function sf(a){qf(a)&&(M(O,a),M(nf,a))}function tf(a){M(O,a);M(nf,a)}
function uf(a,b,c){nf.current!==ha?A("168"):void 0;N(nf,b,a);N(O,c,a)}function vf(a,b){var c=a.stateNode,d=a.type.childContextTypes;if("function"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:A("108",uc(a)||"Unknown",e);return p({},b,c)}function wf(a){if(!qf(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||ha;of=nf.current;N(nf,b,a);N(O,O.current,a);return!0}
function xf(a,b){var c=a.stateNode;c?void 0:A("169");if(b){var d=vf(a,of);c.__reactInternalMemoizedMergedChildContext=d;M(O,a);M(nf,a);N(nf,d,a)}else M(O,a);N(O,b,a)}
function yf(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=null;this.index=0;this.ref=null;this.pendingProps=b;this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null}
function zf(a,b,c){var d=a.alternate;null===d?(d=new yf(a.tag,b,a.key,a.mode),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=b,d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}
function Af(a,b,c){var d=a.type,e=a.key;a=a.props;if("function"===typeof d)var f=d.prototype&&d.prototype.isReactComponent?2:0;else if("string"===typeof d)f=5;else switch(d){case ic:return Bf(a.children,b,c,e);case pc:f=11;b|=3;break;case jc:f=11;b|=2;break;case kc:return d=new yf(15,a,e,b|4),d.type=kc,d.expirationTime=c,d;case rc:f=16;b|=2;break;default:a:{switch("object"===typeof d&&null!==d?d.$$typeof:null){case lc:f=13;break a;case mc:f=12;break a;case qc:f=14;break a;default:A("130",null==d?
d:typeof d,"")}f=void 0}}b=new yf(f,a,e,b);b.type=d;b.expirationTime=c;return b}function Bf(a,b,c,d){a=new yf(10,a,d,b);a.expirationTime=c;return a}function Cf(a,b,c){a=new yf(6,a,null,b);a.expirationTime=c;return a}function Df(a,b,c){b=new yf(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}
function Ef(a,b,c){b=new yf(3,null,null,b?3:0);a={current:b,containerInfo:a,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:c,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null};return b.stateNode=a}var Ff=null,Gf=null;function Hf(a){return function(b){try{return a(b)}catch(c){}}}
function If(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Ff=Hf(function(a){return b.onCommitFiberRoot(c,a)});Gf=Hf(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function Jf(a){"function"===typeof Ff&&Ff(a)}function Kf(a){"function"===typeof Gf&&Gf(a)}var Lf=!1;
function Mf(a){return{expirationTime:0,baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Nf(a){return{expirationTime:a.expirationTime,baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}
function Of(a){return{expirationTime:a,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Pf(a,b,c){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b);if(0===a.expirationTime||a.expirationTime>c)a.expirationTime=c}
function Qf(a,b,c){var d=a.alternate;if(null===d){var e=a.updateQueue;var f=null;null===e&&(e=a.updateQueue=Mf(a.memoizedState))}else e=a.updateQueue,f=d.updateQueue,null===e?null===f?(e=a.updateQueue=Mf(a.memoizedState),f=d.updateQueue=Mf(d.memoizedState)):e=a.updateQueue=Nf(f):null===f&&(f=d.updateQueue=Nf(e));null===f||e===f?Pf(e,b,c):null===e.lastUpdate||null===f.lastUpdate?(Pf(e,b,c),Pf(f,b,c)):(Pf(e,b,c),f.lastUpdate=b)}
function Rf(a,b,c){var d=a.updateQueue;d=null===d?a.updateQueue=Mf(a.memoizedState):Sf(a,d);null===d.lastCapturedUpdate?d.firstCapturedUpdate=d.lastCapturedUpdate=b:(d.lastCapturedUpdate.next=b,d.lastCapturedUpdate=b);if(0===d.expirationTime||d.expirationTime>c)d.expirationTime=c}function Sf(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=Nf(b));return b}
function Tf(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,"function"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-1025|64;case 0:a=c.payload;e="function"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return p({},d,e);case 2:Lf=!0}return d}
function Uf(a,b,c,d,e){Lf=!1;if(!(0===b.expirationTime||b.expirationTime>e)){b=Sf(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,n=f;null!==k;){var r=k.expirationTime;if(r>e){if(null===g&&(g=k,f=n),0===h||h>r)h=r}else n=Tf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k));k=k.next}r=null;for(k=b.firstCapturedUpdate;null!==k;){var w=k.expirationTime;if(w>e){if(null===r&&(r=k,null===
g&&(f=n)),0===h||h>w)h=w}else n=Tf(a,b,k,n,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k));k=k.next}null===g&&(b.lastUpdate=null);null===r?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===r&&(f=n);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=r;b.expirationTime=h;a.memoizedState=n}}
function Vf(a,b){"function"!==typeof a?A("191",a):void 0;a.call(b)}
function Wf(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);a=b.firstEffect;for(b.firstEffect=b.lastEffect=null;null!==a;){var d=a.callback;null!==d&&(a.callback=null,Vf(d,c));a=a.nextEffect}a=b.firstCapturedEffect;for(b.firstCapturedEffect=b.lastCapturedEffect=null;null!==a;)b=a.callback,null!==b&&(a.callback=null,Vf(b,c)),a=a.nextEffect}
function Xf(a,b){return{value:a,source:b,stack:vc(b)}}var Yf=mf(null),Zf=mf(null),$f=mf(0);function ag(a){var b=a.type._context;N($f,b._changedBits,a);N(Zf,b._currentValue,a);N(Yf,a,a);b._currentValue=a.pendingProps.value;b._changedBits=a.stateNode}function bg(a){var b=$f.current,c=Zf.current;M(Yf,a);M(Zf,a);M($f,a);a=a.type._context;a._currentValue=c;a._changedBits=b}var cg={},dg=mf(cg),eg=mf(cg),fg=mf(cg);function gg(a){a===cg?A("174"):void 0;return a}
function ig(a,b){N(fg,b,a);N(eg,a,a);N(dg,cg,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:He(null,"");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=He(b,c)}M(dg,a);N(dg,b,a)}function jg(a){M(dg,a);M(eg,a);M(fg,a)}function kg(a){eg.current===a&&(M(dg,a),M(eg,a))}function lg(a,b,c){var d=a.memoizedState;b=b(c,d);d=null===b||void 0===b?d:p({},d,b);a.memoizedState=d;a=a.updateQueue;null!==a&&0===a.expirationTime&&(a.baseState=d)}
var pg={isMounted:function(a){return(a=a._reactInternalFiber)?2===jd(a):!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=mg();d=ng(d,a);var e=Of(d);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Qf(a,e,d);og(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=mg();d=ng(d,a);var e=Of(d);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Qf(a,e,d);og(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=mg();c=ng(c,a);var d=Of(c);d.tag=2;void 0!==
b&&null!==b&&(d.callback=b);Qf(a,d,c);og(a,c)}};function qg(a,b,c,d,e,f){var g=a.stateNode;a=a.type;return"function"===typeof g.shouldComponentUpdate?g.shouldComponentUpdate(c,e,f):a.prototype&&a.prototype.isPureReactComponent?!ea(b,c)||!ea(d,e):!0}
function rg(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&pg.enqueueReplaceState(b,b.state,null)}
function sg(a,b){var c=a.type,d=a.stateNode,e=a.pendingProps,f=pf(a);d.props=e;d.state=a.memoizedState;d.refs=ha;d.context=rf(a,f);f=a.updateQueue;null!==f&&(Uf(a,f,e,d,b),d.state=a.memoizedState);f=a.type.getDerivedStateFromProps;"function"===typeof f&&(lg(a,f,e),d.state=a.memoizedState);"function"===typeof c.getDerivedStateFromProps||"function"===typeof d.getSnapshotBeforeUpdate||"function"!==typeof d.UNSAFE_componentWillMount&&"function"!==typeof d.componentWillMount||(c=d.state,"function"===typeof d.componentWillMount&&
d.componentWillMount(),"function"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount(),c!==d.state&&pg.enqueueReplaceState(d,d.state,null),f=a.updateQueue,null!==f&&(Uf(a,f,e,d,b),d.state=a.memoizedState));"function"===typeof d.componentDidMount&&(a.effectTag|=4)}var tg=Array.isArray;
function ug(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;var d=void 0;c&&(2!==c.tag?A("110"):void 0,d=c.stateNode);d?void 0:A("147",a);var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs===ha?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}"string"!==typeof a?A("148"):void 0;c._owner?void 0:A("254",a)}return a}
function vg(a,b){"textarea"!==a.type&&A("31","[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,"")}
function wg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=zf(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=
2,c):d;b.effectTag=2;return c}function g(b){a&&null===b.alternate&&(b.effectTag=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Cf(c,a.mode,d),b.return=a,b;b=e(b,c,d);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.type===c.type)return d=e(b,c.props,d),d.ref=ug(a,b,c),d.return=a,d;d=Af(c,a.mode,d);d.ref=ug(a,b,c);d.return=a;return d}function n(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=
Df(c,a.mode,d),b.return=a,b;b=e(b,c.children||[],d);b.return=a;return b}function r(a,b,c,d,f){if(null===b||10!==b.tag)return b=Bf(c,a.mode,d,f),b.return=a,b;b=e(b,c,d);b.return=a;return b}function w(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Cf(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case gc:return c=Af(b,a.mode,c),c.ref=ug(a,null,b),c.return=a,c;case hc:return b=Df(b,a.mode,c),b.return=a,b}if(tg(b)||tc(b))return b=Bf(b,a.mode,c,null),b.return=
a,b;vg(a,b)}return null}function P(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case gc:return c.key===e?c.type===ic?r(a,b,c.props.children,d,e):k(a,b,c,d):null;case hc:return c.key===e?n(a,b,c,d):null}if(tg(c)||tc(c))return null!==e?null:r(a,b,c,d,null);vg(a,c)}return null}function nc(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);
if("object"===typeof d&&null!==d){switch(d.$$typeof){case gc:return a=a.get(null===d.key?c:d.key)||null,d.type===ic?r(b,a,d.props.children,e,d.key):k(b,a,d,e);case hc:return a=a.get(null===d.key?c:d.key)||null,n(b,a,d,e)}if(tg(d)||tc(d))return a=a.get(c)||null,r(b,a,d,e,null);vg(b,d)}return null}function Jd(e,g,h,k){for(var u=null,x=null,t=g,q=g=0,n=null;null!==t&&q<h.length;q++){t.index>q?(n=t,t=null):n=t.sibling;var l=P(e,t,h[q],k);if(null===l){null===t&&(t=n);break}a&&t&&null===l.alternate&&b(e,
t);g=f(l,g,q);null===x?u=l:x.sibling=l;x=l;t=n}if(q===h.length)return c(e,t),u;if(null===t){for(;q<h.length;q++)if(t=w(e,h[q],k))g=f(t,g,q),null===x?u=t:x.sibling=t,x=t;return u}for(t=d(e,t);q<h.length;q++)if(n=nc(t,e,q,h[q],k))a&&null!==n.alternate&&t.delete(null===n.key?q:n.key),g=f(n,g,q),null===x?u=n:x.sibling=n,x=n;a&&t.forEach(function(a){return b(e,a)});return u}function E(e,g,h,k){var u=tc(h);"function"!==typeof u?A("150"):void 0;h=u.call(h);null==h?A("151"):void 0;for(var t=u=null,n=g,x=
g=0,y=null,l=h.next();null!==n&&!l.done;x++,l=h.next()){n.index>x?(y=n,n=null):y=n.sibling;var r=P(e,n,l.value,k);if(null===r){n||(n=y);break}a&&n&&null===r.alternate&&b(e,n);g=f(r,g,x);null===t?u=r:t.sibling=r;t=r;n=y}if(l.done)return c(e,n),u;if(null===n){for(;!l.done;x++,l=h.next())l=w(e,l.value,k),null!==l&&(g=f(l,g,x),null===t?u=l:t.sibling=l,t=l);return u}for(n=d(e,n);!l.done;x++,l=h.next())l=nc(n,e,x,l.value,k),null!==l&&(a&&null!==l.alternate&&n.delete(null===l.key?x:l.key),g=f(l,g,x),null===
t?u=l:t.sibling=l,t=l);a&&n.forEach(function(a){return b(e,a)});return u}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ic&&null===f.key;k&&(f=f.props.children);var n="object"===typeof f&&null!==f;if(n)switch(f.$$typeof){case gc:a:{n=f.key;for(k=d;null!==k;){if(k.key===n)if(10===k.tag?f.type===ic:k.type===f.type){c(a,k.sibling);d=e(k,f.type===ic?f.props.children:f.props,h);d.ref=ug(a,k,f);d.return=a;a=d;break a}else{c(a,k);break}else b(a,k);k=k.sibling}f.type===ic?(d=Bf(f.props.children,
a.mode,h,f.key),d.return=a,a=d):(h=Af(f,a.mode,h),h.ref=ug(a,d,f),h.return=a,a=h)}return g(a);case hc:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Df(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=
a,a=d):(c(a,d),d=Cf(f,a.mode,h),d.return=a,a=d),g(a);if(tg(f))return Jd(a,d,f,h);if(tc(f))return E(a,d,f,h);n&&vg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 2:case 1:h=a.type,A("152",h.displayName||h.name||"Component")}return c(a,d)}}var xg=wg(!0),yg=wg(!1),zg=null,Ag=null,Bg=!1;function Cg(a,b){var c=new yf(5,null,null,0);c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}
function Dg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;default:return!1}}function Eg(a){if(Bg){var b=Ag;if(b){var c=b;if(!Dg(a,b)){b=hf(c);if(!b||!Dg(a,b)){a.effectTag|=2;Bg=!1;zg=a;return}Cg(zg,c)}zg=a;Ag=jf(b)}else a.effectTag|=2,Bg=!1,zg=a}}
function Fg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag;)a=a.return;zg=a}function Gg(a){if(a!==zg)return!1;if(!Bg)return Fg(a),Bg=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!df(b,a.memoizedProps))for(b=Ag;b;)Cg(a,b),b=hf(b);Fg(a);Ag=zg?hf(a.stateNode):null;return!0}function Hg(){Ag=zg=null;Bg=!1}function Q(a,b,c){Ig(a,b,c,b.expirationTime)}function Ig(a,b,c,d){b.child=null===a?yg(b,null,c,d):xg(b,a.child,c,d)}
function Jg(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function Kg(a,b,c,d,e){Jg(a,b);var f=0!==(b.effectTag&64);if(!c&&!f)return d&&xf(b,!1),R(a,b);c=b.stateNode;ec.current=b;var g=f?null:c.render();b.effectTag|=1;f&&(Ig(a,b,null,e),b.child=null);Ig(a,b,g,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&xf(b,!0);return b.child}
function Lg(a){var b=a.stateNode;b.pendingContext?uf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&uf(a,b.context,!1);ig(a,b.containerInfo)}
function Mg(a,b,c,d){var e=a.child;null!==e&&(e.return=a);for(;null!==e;){switch(e.tag){case 12:var f=e.stateNode|0;if(e.type===b&&0!==(f&c)){for(f=e;null!==f;){var g=f.alternate;if(0===f.expirationTime||f.expirationTime>d)f.expirationTime=d,null!==g&&(0===g.expirationTime||g.expirationTime>d)&&(g.expirationTime=d);else if(null!==g&&(0===g.expirationTime||g.expirationTime>d))g.expirationTime=d;else break;f=f.return}f=null}else f=e.child;break;case 13:f=e.type===a.type?null:e.child;break;default:f=
e.child}if(null!==f)f.return=e;else for(f=e;null!==f;){if(f===a){f=null;break}e=f.sibling;if(null!==e){e.return=f.return;f=e;break}f=f.return}e=f}}
function Qg(a,b,c){var d=b.type._context,e=b.pendingProps,f=b.memoizedProps,g=!0;if(O.current)g=!1;else if(f===e)return b.stateNode=0,ag(b),R(a,b);var h=e.value;b.memoizedProps=e;if(null===f)h=1073741823;else if(f.value===e.value){if(f.children===e.children&&g)return b.stateNode=0,ag(b),R(a,b);h=0}else{var k=f.value;if(k===h&&(0!==k||1/k===1/h)||k!==k&&h!==h){if(f.children===e.children&&g)return b.stateNode=0,ag(b),R(a,b);h=0}else if(h="function"===typeof d._calculateChangedBits?d._calculateChangedBits(k,
h):1073741823,h|=0,0===h){if(f.children===e.children&&g)return b.stateNode=0,ag(b),R(a,b)}else Mg(b,d,h,c)}b.stateNode=h;ag(b);Q(a,b,e.children);return b.child}function R(a,b){null!==a&&b.child!==a.child?A("153"):void 0;if(null!==b.child){a=b.child;var c=zf(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=zf(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}
function Rg(a,b,c){if(0===b.expirationTime||b.expirationTime>c){switch(b.tag){case 3:Lg(b);break;case 2:wf(b);break;case 4:ig(b,b.stateNode.containerInfo);break;case 13:ag(b)}return null}switch(b.tag){case 0:null!==a?A("155"):void 0;var d=b.type,e=b.pendingProps,f=pf(b);f=rf(b,f);d=d(e,f);b.effectTag|=1;"object"===typeof d&&null!==d&&"function"===typeof d.render&&void 0===d.$$typeof?(f=b.type,b.tag=2,b.memoizedState=null!==d.state&&void 0!==d.state?d.state:null,f=f.getDerivedStateFromProps,"function"===
typeof f&&lg(b,f,e),e=wf(b),d.updater=pg,b.stateNode=d,d._reactInternalFiber=b,sg(b,c),a=Kg(a,b,!0,e,c)):(b.tag=1,Q(a,b,d),b.memoizedProps=e,a=b.child);return a;case 1:return e=b.type,c=b.pendingProps,O.current||b.memoizedProps!==c?(d=pf(b),d=rf(b,d),e=e(c,d),b.effectTag|=1,Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 2:e=wf(b);if(null===a)if(null===b.stateNode){var g=b.pendingProps,h=b.type;d=pf(b);var k=2===b.tag&&null!=b.type.contextTypes;f=k?rf(b,d):ha;g=new h(g,f);b.memoizedState=null!==
g.state&&void 0!==g.state?g.state:null;g.updater=pg;b.stateNode=g;g._reactInternalFiber=b;k&&(k=b.stateNode,k.__reactInternalMemoizedUnmaskedChildContext=d,k.__reactInternalMemoizedMaskedChildContext=f);sg(b,c);d=!0}else{h=b.type;d=b.stateNode;k=b.memoizedProps;f=b.pendingProps;d.props=k;var n=d.context;g=pf(b);g=rf(b,g);var r=h.getDerivedStateFromProps;(h="function"===typeof r||"function"===typeof d.getSnapshotBeforeUpdate)||"function"!==typeof d.UNSAFE_componentWillReceiveProps&&"function"!==typeof d.componentWillReceiveProps||
(k!==f||n!==g)&&rg(b,d,f,g);Lf=!1;var w=b.memoizedState;n=d.state=w;var P=b.updateQueue;null!==P&&(Uf(b,P,f,d,c),n=b.memoizedState);k!==f||w!==n||O.current||Lf?("function"===typeof r&&(lg(b,r,f),n=b.memoizedState),(k=Lf||qg(b,k,f,w,n,g))?(h||"function"!==typeof d.UNSAFE_componentWillMount&&"function"!==typeof d.componentWillMount||("function"===typeof d.componentWillMount&&d.componentWillMount(),"function"===typeof d.UNSAFE_componentWillMount&&d.UNSAFE_componentWillMount()),"function"===typeof d.componentDidMount&&
(b.effectTag|=4)):("function"===typeof d.componentDidMount&&(b.effectTag|=4),b.memoizedProps=f,b.memoizedState=n),d.props=f,d.state=n,d.context=g,d=k):("function"===typeof d.componentDidMount&&(b.effectTag|=4),d=!1)}else h=b.type,d=b.stateNode,f=b.memoizedProps,k=b.pendingProps,d.props=f,n=d.context,g=pf(b),g=rf(b,g),r=h.getDerivedStateFromProps,(h="function"===typeof r||"function"===typeof d.getSnapshotBeforeUpdate)||"function"!==typeof d.UNSAFE_componentWillReceiveProps&&"function"!==typeof d.componentWillReceiveProps||
(f!==k||n!==g)&&rg(b,d,k,g),Lf=!1,n=b.memoizedState,w=d.state=n,P=b.updateQueue,null!==P&&(Uf(b,P,k,d,c),w=b.memoizedState),f!==k||n!==w||O.current||Lf?("function"===typeof r&&(lg(b,r,k),w=b.memoizedState),(r=Lf||qg(b,f,k,n,w,g))?(h||"function"!==typeof d.UNSAFE_componentWillUpdate&&"function"!==typeof d.componentWillUpdate||("function"===typeof d.componentWillUpdate&&d.componentWillUpdate(k,w,g),"function"===typeof d.UNSAFE_componentWillUpdate&&d.UNSAFE_componentWillUpdate(k,w,g)),"function"===typeof d.componentDidUpdate&&
(b.effectTag|=4),"function"===typeof d.getSnapshotBeforeUpdate&&(b.effectTag|=256)):("function"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),"function"!==typeof d.getSnapshotBeforeUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),b.memoizedProps=k,b.memoizedState=w),d.props=k,d.state=w,d.context=g,d=r):("function"!==typeof d.componentDidUpdate||f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=4),"function"!==typeof d.getSnapshotBeforeUpdate||
f===a.memoizedProps&&n===a.memoizedState||(b.effectTag|=256),d=!1);return Kg(a,b,d,e,c);case 3:Lg(b);e=b.updateQueue;if(null!==e)if(d=b.memoizedState,d=null!==d?d.element:null,Uf(b,e,b.pendingProps,null,c),e=b.memoizedState.element,e===d)Hg(),a=R(a,b);else{d=b.stateNode;if(d=(null===a||null===a.child)&&d.hydrate)Ag=jf(b.stateNode.containerInfo),zg=b,d=Bg=!0;d?(b.effectTag|=2,b.child=yg(b,null,e,c)):(Hg(),Q(a,b,e));a=b.child}else Hg(),a=R(a,b);return a;case 5:a:{gg(fg.current);e=gg(dg.current);d=He(e,
b.type);e!==d&&(N(eg,b,b),N(dg,d,b));null===a&&Eg(b);e=b.type;k=b.memoizedProps;d=b.pendingProps;f=null!==a?a.memoizedProps:null;if(!O.current&&k===d){if(k=b.mode&1&&!!d.hidden)b.expirationTime=1073741823;if(!k||1073741823!==c){a=R(a,b);break a}}k=d.children;df(e,d)?k=null:f&&df(e,f)&&(b.effectTag|=16);Jg(a,b);1073741823!==c&&b.mode&1&&d.hidden?(b.expirationTime=1073741823,b.memoizedProps=d,a=null):(Q(a,b,k),b.memoizedProps=d,a=b.child)}return a;case 6:return null===a&&Eg(b),b.memoizedProps=b.pendingProps,
null;case 16:return null;case 4:return ig(b,b.stateNode.containerInfo),e=b.pendingProps,O.current||b.memoizedProps!==e?(null===a?b.child=xg(b,null,e,c):Q(a,b,e),b.memoizedProps=e,a=b.child):a=R(a,b),a;case 14:return e=b.type.render,c=b.pendingProps,d=b.ref,O.current||b.memoizedProps!==c||d!==(null!==a?a.ref:null)?(e=e(c,d),Q(a,b,e),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 10:return c=b.pendingProps,O.current||b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 11:return c=
b.pendingProps.children,O.current||null!==c&&b.memoizedProps!==c?(Q(a,b,c),b.memoizedProps=c,a=b.child):a=R(a,b),a;case 15:return c=b.pendingProps,b.memoizedProps===c?a=R(a,b):(Q(a,b,c.children),b.memoizedProps=c,a=b.child),a;case 13:return Qg(a,b,c);case 12:a:if(d=b.type,f=b.pendingProps,k=b.memoizedProps,e=d._currentValue,g=d._changedBits,O.current||0!==g||k!==f){b.memoizedProps=f;h=f.unstable_observedBits;if(void 0===h||null===h)h=1073741823;b.stateNode=h;if(0!==(g&h))Mg(b,d,g,c);else if(k===f){a=
R(a,b);break a}c=f.children;c=c(e);b.effectTag|=1;Q(a,b,c);a=b.child}else a=R(a,b);return a;default:A("156")}}function Sg(a){a.effectTag|=4}var Tg=void 0,Ug=void 0,Vg=void 0;Tg=function(){};Ug=function(a,b,c){(b.updateQueue=c)&&Sg(b)};Vg=function(a,b,c,d){c!==d&&Sg(b)};
function Wg(a,b){var c=b.pendingProps;switch(b.tag){case 1:return null;case 2:return sf(b),null;case 3:jg(b);tf(b);var d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Gg(b),b.effectTag&=-3;Tg(b);return null;case 5:kg(b);d=gg(fg.current);var e=b.type;if(null!==a&&null!=b.stateNode){var f=a.memoizedProps,g=b.stateNode,h=gg(dg.current);g=We(g,e,f,c,d);Ug(a,b,g,e,f,c,d,h);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!c)return null===b.stateNode?
A("166"):void 0,null;a=gg(dg.current);if(Gg(b))c=b.stateNode,e=b.type,f=b.memoizedProps,c[C]=b,c[Ma]=f,d=Ye(c,e,f,a,d),b.updateQueue=d,null!==d&&Sg(b);else{a=Te(e,c,d,a);a[C]=b;a[Ma]=c;a:for(f=b.child;null!==f;){if(5===f.tag||6===f.tag)a.appendChild(f.stateNode);else if(4!==f.tag&&null!==f.child){f.child.return=f;f=f.child;continue}if(f===b)break;for(;null===f.sibling;){if(null===f.return||f.return===b)break a;f=f.return}f.sibling.return=f.return;f=f.sibling}Ve(a,e,c,d);cf(e,c)&&Sg(b);b.stateNode=
a}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)Vg(a,b,a.memoizedProps,c);else{if("string"!==typeof c)return null===b.stateNode?A("166"):void 0,null;d=gg(fg.current);gg(dg.current);Gg(b)?(d=b.stateNode,c=b.memoizedProps,d[C]=b,Ze(d,c)&&Sg(b)):(d=Ue(c,d),d[C]=b,b.stateNode=d)}return null;case 14:return null;case 16:return null;case 10:return null;case 11:return null;case 15:return null;case 4:return jg(b),Tg(b),null;case 13:return bg(b),null;case 12:return null;case 0:A("167");
default:A("156")}}function Xg(a,b){var c=b.source;null===b.stack&&null!==c&&vc(c);null!==c&&uc(c);b=b.value;null!==a&&2===a.tag&&uc(a);try{b&&b.suppressReactErrorLogging||console.error(b)}catch(d){d&&d.suppressReactErrorLogging||console.error(d)}}function Yg(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Zg(a,c)}else b.current=null}
function $g(a){"function"===typeof Kf&&Kf(a);switch(a.tag){case 2:Yg(a);var b=a.stateNode;if("function"===typeof b.componentWillUnmount)try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){Zg(a,c)}break;case 5:Yg(a);break;case 4:ah(a)}}function bh(a){return 5===a.tag||3===a.tag||4===a.tag}
function ch(a){a:{for(var b=a.return;null!==b;){if(bh(b)){var c=b;break a}b=b.return}A("160");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:A("161")}c.effectTag&16&&(Ke(b,""),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||bh(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;
if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)if(c)if(d){var f=b,g=e.stateNode,h=c;8===f.nodeType?f.parentNode.insertBefore(g,h):f.insertBefore(g,h)}else b.insertBefore(e.stateNode,c);else d?(f=b,g=e.stateNode,8===f.nodeType?f.parentNode.insertBefore(g,f):f.appendChild(g)):b.appendChild(e.stateNode);else if(4!==e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===
e.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}
function ah(a){for(var b=a,c=!1,d=void 0,e=void 0;;){if(!c){c=b.return;a:for(;;){null===c?A("160"):void 0;switch(c.tag){case 5:d=c.stateNode;e=!1;break a;case 3:d=c.stateNode.containerInfo;e=!0;break a;case 4:d=c.stateNode.containerInfo;e=!0;break a}c=c.return}c=!0}if(5===b.tag||6===b.tag){a:for(var f=b,g=f;;)if($g(g),null!==g.child&&4!==g.tag)g.child.return=g,g=g.child;else{if(g===f)break;for(;null===g.sibling;){if(null===g.return||g.return===f)break a;g=g.return}g.sibling.return=g.return;g=g.sibling}e?
(f=d,g=b.stateNode,8===f.nodeType?f.parentNode.removeChild(g):f.removeChild(g)):d.removeChild(b.stateNode)}else if(4===b.tag?d=b.stateNode.containerInfo:$g(b),null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return;b=b.return;4===b.tag&&(c=!1)}b.sibling.return=b.return;b=b.sibling}}
function dh(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&(c[Ma]=d,Xe(c,f,e,a,d))}break;case 6:null===b.stateNode?A("162"):void 0;b.stateNode.nodeValue=b.memoizedProps;break;case 3:break;case 15:break;case 16:break;default:A("163")}}function eh(a,b,c){c=Of(c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){fh(d);Xg(a,b)};return c}
function gh(a,b,c){c=Of(c);c.tag=3;var d=a.stateNode;null!==d&&"function"===typeof d.componentDidCatch&&(c.callback=function(){null===hh?hh=new Set([this]):hh.add(this);var c=b.value,d=b.stack;Xg(a,b);this.componentDidCatch(c,{componentStack:null!==d?d:""})});return c}
function ih(a,b,c,d,e,f){c.effectTag|=512;c.firstEffect=c.lastEffect=null;d=Xf(d,c);a=b;do{switch(a.tag){case 3:a.effectTag|=1024;d=eh(a,d,f);Rf(a,d,f);return;case 2:if(b=d,c=a.stateNode,0===(a.effectTag&64)&&null!==c&&"function"===typeof c.componentDidCatch&&(null===hh||!hh.has(c))){a.effectTag|=1024;d=gh(a,b,f);Rf(a,d,f);return}}a=a.return}while(null!==a)}
function jh(a){switch(a.tag){case 2:sf(a);var b=a.effectTag;return b&1024?(a.effectTag=b&-1025|64,a):null;case 3:return jg(a),tf(a),b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 5:return kg(a),null;case 16:return b=a.effectTag,b&1024?(a.effectTag=b&-1025|64,a):null;case 4:return jg(a),null;case 13:return bg(a),null;default:return null}}var kh=ef(),lh=2,mh=kh,nh=0,oh=0,ph=!1,S=null,qh=null,T=0,rh=-1,sh=!1,U=null,th=!1,uh=!1,hh=null;
function vh(){if(null!==S)for(var a=S.return;null!==a;){var b=a;switch(b.tag){case 2:sf(b);break;case 3:jg(b);tf(b);break;case 5:kg(b);break;case 4:jg(b);break;case 13:bg(b)}a=a.return}qh=null;T=0;rh=-1;sh=!1;S=null;uh=!1}
function wh(a){for(;;){var b=a.alternate,c=a.return,d=a.sibling;if(0===(a.effectTag&512)){b=Wg(b,a,T);var e=a;if(1073741823===T||1073741823!==e.expirationTime){var f=0;switch(e.tag){case 3:case 2:var g=e.updateQueue;null!==g&&(f=g.expirationTime)}for(g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&0===(c.effectTag&512)&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&
(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1<a.effectTag&&(null!==c.lastEffect?c.lastEffect.nextEffect=a:c.firstEffect=a,c.lastEffect=a));if(null!==d)return d;if(null!==c)a=c;else{uh=!0;break}}else{a=jh(a,sh,T);if(null!==a)return a.effectTag&=511,a;null!==c&&(c.firstEffect=c.lastEffect=null,c.effectTag|=512);if(null!==d)return d;if(null!==c)a=c;else break}}return null}
function xh(a){var b=Rg(a.alternate,a,T);null===b&&(b=wh(a));ec.current=null;return b}
function yh(a,b,c){ph?A("243"):void 0;ph=!0;if(b!==T||a!==qh||null===S)vh(),qh=a,T=b,rh=-1,S=zf(qh.current,null,T),a.pendingCommitExpirationTime=0;var d=!1;sh=!c||T<=lh;do{try{if(c)for(;null!==S&&!zh();)S=xh(S);else for(;null!==S;)S=xh(S)}catch(f){if(null===S)d=!0,fh(f);else{null===S?A("271"):void 0;c=S;var e=c.return;if(null===e){d=!0;fh(f);break}ih(a,e,c,f,sh,T,mh);S=wh(c)}}break}while(1);ph=!1;if(d)return null;if(null===S){if(uh)return a.pendingCommitExpirationTime=b,a.current.alternate;sh?A("262"):
void 0;0<=rh&&setTimeout(function(){var b=a.current.expirationTime;0!==b&&(0===a.remainingExpirationTime||a.remainingExpirationTime<b)&&Ah(a,b)},rh);Bh(a.current.expirationTime)}return null}
function Zg(a,b){var c;a:{ph&&!th?A("263"):void 0;for(c=a.return;null!==c;){switch(c.tag){case 2:var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromCatch||"function"===typeof d.componentDidCatch&&(null===hh||!hh.has(d))){a=Xf(b,a);a=gh(c,a,1);Qf(c,a,1);og(c,1);c=void 0;break a}break;case 3:a=Xf(b,a);a=eh(c,a,1);Qf(c,a,1);og(c,1);c=void 0;break a}c=c.return}3===a.tag&&(c=Xf(b,a),c=eh(a,c,1),Qf(a,c,1),og(a,1));c=void 0}return c}
function Ch(){var a=2+25*(((mg()-2+500)/25|0)+1);a<=nh&&(a=nh+1);return nh=a}function ng(a,b){a=0!==oh?oh:ph?th?1:T:b.mode&1?Dh?2+10*(((a-2+15)/10|0)+1):2+25*(((a-2+500)/25|0)+1):1;Dh&&(0===Eh||a>Eh)&&(Eh=a);return a}
function og(a,b){for(;null!==a;){if(0===a.expirationTime||a.expirationTime>b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a.return)if(3===a.tag){var c=a.stateNode;!ph&&0!==T&&b<T&&vh();var d=c.current.expirationTime;ph&&!th&&qh===c||Ah(c,d);Fh>Gh&&A("185")}else break;a=a.return}}function mg(){mh=ef()-kh;return lh=(mh/10|0)+2}
function Hh(a){var b=oh;oh=2+25*(((mg()-2+500)/25|0)+1);try{return a()}finally{oh=b}}function Ih(a,b,c,d,e){var f=oh;oh=1;try{return a(b,c,d,e)}finally{oh=f}}var Jh=null,V=null,Kh=0,Lh=void 0,W=!1,X=null,Y=0,Eh=0,Mh=!1,Nh=!1,Oh=null,Ph=null,Z=!1,Qh=!1,Dh=!1,Rh=null,Gh=1E3,Fh=0,Sh=1;function Th(a){if(0!==Kh){if(a>Kh)return;null!==Lh&&gf(Lh)}var b=ef()-kh;Kh=a;Lh=ff(Uh,{timeout:10*(a-2)-b})}
function Ah(a,b){if(null===a.nextScheduledRoot)a.remainingExpirationTime=b,null===V?(Jh=V=a,a.nextScheduledRoot=a):(V=V.nextScheduledRoot=a,V.nextScheduledRoot=Jh);else{var c=a.remainingExpirationTime;if(0===c||b<c)a.remainingExpirationTime=b}W||(Z?Qh&&(X=a,Y=1,Vh(a,1,!1)):1===b?Wh():Th(b))}
function Xh(){var a=0,b=null;if(null!==V)for(var c=V,d=Jh;null!==d;){var e=d.remainingExpirationTime;if(0===e){null===c||null===V?A("244"):void 0;if(d===d.nextScheduledRoot){Jh=V=d.nextScheduledRoot=null;break}else if(d===Jh)Jh=e=d.nextScheduledRoot,V.nextScheduledRoot=e,d.nextScheduledRoot=null;else if(d===V){V=c;V.nextScheduledRoot=Jh;d.nextScheduledRoot=null;break}else c.nextScheduledRoot=d.nextScheduledRoot,d.nextScheduledRoot=null;d=c.nextScheduledRoot}else{if(0===a||e<a)a=e,b=d;if(d===V)break;
c=d;d=d.nextScheduledRoot}}c=X;null!==c&&c===b&&1===a?Fh++:Fh=0;X=b;Y=a}function Uh(a){Yh(0,!0,a)}function Wh(){Yh(1,!1,null)}function Yh(a,b,c){Ph=c;Xh();if(b)for(;null!==X&&0!==Y&&(0===a||a>=Y)&&(!Mh||mg()>=Y);)mg(),Vh(X,Y,!Mh),Xh();else for(;null!==X&&0!==Y&&(0===a||a>=Y);)Vh(X,Y,!1),Xh();null!==Ph&&(Kh=0,Lh=null);0!==Y&&Th(Y);Ph=null;Mh=!1;Zh()}function $h(a,b){W?A("253"):void 0;X=a;Y=b;Vh(a,b,!1);Wh();Zh()}
function Zh(){Fh=0;if(null!==Rh){var a=Rh;Rh=null;for(var b=0;b<a.length;b++){var c=a[b];try{c._onComplete()}catch(d){Nh||(Nh=!0,Oh=d)}}}if(Nh)throw a=Oh,Oh=null,Nh=!1,a;}function Vh(a,b,c){W?A("245"):void 0;W=!0;c?(c=a.finishedWork,null!==c?ai(a,c,b):(c=yh(a,b,!0),null!==c&&(zh()?a.finishedWork=c:ai(a,c,b)))):(c=a.finishedWork,null!==c?ai(a,c,b):(c=yh(a,b,!1),null!==c&&ai(a,c,b)));W=!1}
function ai(a,b,c){var d=a.firstBatch;if(null!==d&&d._expirationTime<=c&&(null===Rh?Rh=[d]:Rh.push(d),d._defer)){a.finishedWork=b;a.remainingExpirationTime=0;return}a.finishedWork=null;th=ph=!0;c=b.stateNode;c.current===b?A("177"):void 0;d=c.pendingCommitExpirationTime;0===d?A("261"):void 0;c.pendingCommitExpirationTime=0;mg();ec.current=null;if(1<b.effectTag)if(null!==b.lastEffect){b.lastEffect.nextEffect=b;var e=b.firstEffect}else e=b;else e=b.firstEffect;af=Hd;var f=da();if(Ud(f)){if("selectionStart"in
f)var g={start:f.selectionStart,end:f.selectionEnd};else a:{var h=window.getSelection&&window.getSelection();if(h&&0!==h.rangeCount){g=h.anchorNode;var k=h.anchorOffset,n=h.focusNode;h=h.focusOffset;try{g.nodeType,n.nodeType}catch(Wa){g=null;break a}var r=0,w=-1,P=-1,nc=0,Jd=0,E=f,t=null;b:for(;;){for(var x;;){E!==g||0!==k&&3!==E.nodeType||(w=r+k);E!==n||0!==h&&3!==E.nodeType||(P=r+h);3===E.nodeType&&(r+=E.nodeValue.length);if(null===(x=E.firstChild))break;t=E;E=x}for(;;){if(E===f)break b;t===g&&
++nc===k&&(w=r);t===n&&++Jd===h&&(P=r);if(null!==(x=E.nextSibling))break;E=t;t=E.parentNode}E=x}g=-1===w||-1===P?null:{start:w,end:P}}else g=null}g=g||{start:0,end:0}}else g=null;bf={focusedElem:f,selectionRange:g};Id(!1);for(U=e;null!==U;){f=!1;g=void 0;try{for(;null!==U;){if(U.effectTag&256){var u=U.alternate;k=U;switch(k.tag){case 2:if(k.effectTag&256&&null!==u){var y=u.memoizedProps,D=u.memoizedState,ja=k.stateNode;ja.props=k.memoizedProps;ja.state=k.memoizedState;var mi=ja.getSnapshotBeforeUpdate(y,
D);ja.__reactInternalSnapshotBeforeUpdate=mi}break;case 3:case 5:case 6:case 4:break;default:A("163")}}U=U.nextEffect}}catch(Wa){f=!0,g=Wa}f&&(null===U?A("178"):void 0,Zg(U,g),null!==U&&(U=U.nextEffect))}for(U=e;null!==U;){u=!1;y=void 0;try{for(;null!==U;){var q=U.effectTag;q&16&&Ke(U.stateNode,"");if(q&128){var z=U.alternate;if(null!==z){var l=z.ref;null!==l&&("function"===typeof l?l(null):l.current=null)}}switch(q&14){case 2:ch(U);U.effectTag&=-3;break;case 6:ch(U);U.effectTag&=-3;dh(U.alternate,
U);break;case 4:dh(U.alternate,U);break;case 8:D=U,ah(D),D.return=null,D.child=null,D.alternate&&(D.alternate.child=null,D.alternate.return=null)}U=U.nextEffect}}catch(Wa){u=!0,y=Wa}u&&(null===U?A("178"):void 0,Zg(U,y),null!==U&&(U=U.nextEffect))}l=bf;z=da();q=l.focusedElem;u=l.selectionRange;if(z!==q&&fa(document.documentElement,q)){null!==u&&Ud(q)&&(z=u.start,l=u.end,void 0===l&&(l=z),"selectionStart"in q?(q.selectionStart=z,q.selectionEnd=Math.min(l,q.value.length)):window.getSelection&&(z=window.getSelection(),
y=q[lb()].length,l=Math.min(u.start,y),u=void 0===u.end?l:Math.min(u.end,y),!z.extend&&l>u&&(y=u,u=l,l=y),y=Td(q,l),D=Td(q,u),y&&D&&(1!==z.rangeCount||z.anchorNode!==y.node||z.anchorOffset!==y.offset||z.focusNode!==D.node||z.focusOffset!==D.offset)&&(ja=document.createRange(),ja.setStart(y.node,y.offset),z.removeAllRanges(),l>u?(z.addRange(ja),z.extend(D.node,D.offset)):(ja.setEnd(D.node,D.offset),z.addRange(ja)))));z=[];for(l=q;l=l.parentNode;)1===l.nodeType&&z.push({element:l,left:l.scrollLeft,
top:l.scrollTop});"function"===typeof q.focus&&q.focus();for(q=0;q<z.length;q++)l=z[q],l.element.scrollLeft=l.left,l.element.scrollTop=l.top}bf=null;Id(af);af=null;c.current=b;for(U=e;null!==U;){e=!1;q=void 0;try{for(z=d;null!==U;){var hg=U.effectTag;if(hg&36){var oc=U.alternate;l=U;u=z;switch(l.tag){case 2:var ca=l.stateNode;if(l.effectTag&4)if(null===oc)ca.props=l.memoizedProps,ca.state=l.memoizedState,ca.componentDidMount();else{var wi=oc.memoizedProps,xi=oc.memoizedState;ca.props=l.memoizedProps;
ca.state=l.memoizedState;ca.componentDidUpdate(wi,xi,ca.__reactInternalSnapshotBeforeUpdate)}var Ng=l.updateQueue;null!==Ng&&(ca.props=l.memoizedProps,ca.state=l.memoizedState,Wf(l,Ng,ca,u));break;case 3:var Og=l.updateQueue;if(null!==Og){y=null;if(null!==l.child)switch(l.child.tag){case 5:y=l.child.stateNode;break;case 2:y=l.child.stateNode}Wf(l,Og,y,u)}break;case 5:var yi=l.stateNode;null===oc&&l.effectTag&4&&cf(l.type,l.memoizedProps)&&yi.focus();break;case 6:break;case 4:break;case 15:break;case 16:break;
default:A("163")}}if(hg&128){l=void 0;var yc=U.ref;if(null!==yc){var Pg=U.stateNode;switch(U.tag){case 5:l=Pg;break;default:l=Pg}"function"===typeof yc?yc(l):yc.current=l}}var zi=U.nextEffect;U.nextEffect=null;U=zi}}catch(Wa){e=!0,q=Wa}e&&(null===U?A("178"):void 0,Zg(U,q),null!==U&&(U=U.nextEffect))}ph=th=!1;"function"===typeof Jf&&Jf(b.stateNode);b=c.current.expirationTime;0===b&&(hh=null);a.remainingExpirationTime=b}function zh(){return null===Ph||Ph.timeRemaining()>Sh?!1:Mh=!0}
function fh(a){null===X?A("246"):void 0;X.remainingExpirationTime=0;Nh||(Nh=!0,Oh=a)}function Bh(a){null===X?A("246"):void 0;X.remainingExpirationTime=a}function bi(a,b){var c=Z;Z=!0;try{return a(b)}finally{(Z=c)||W||Wh()}}function ci(a,b){if(Z&&!Qh){Qh=!0;try{return a(b)}finally{Qh=!1}}return a(b)}function di(a,b){W?A("187"):void 0;var c=Z;Z=!0;try{return Ih(a,b)}finally{Z=c,Wh()}}
function ei(a,b,c){if(Dh)return a(b,c);Z||W||0===Eh||(Yh(Eh,!1,null),Eh=0);var d=Dh,e=Z;Z=Dh=!0;try{return a(b,c)}finally{Dh=d,(Z=e)||W||Wh()}}function fi(a){var b=Z;Z=!0;try{Ih(a)}finally{(Z=b)||W||Yh(1,!1,null)}}
function gi(a,b,c,d,e){var f=b.current;if(c){c=c._reactInternalFiber;var g;b:{2===jd(c)&&2===c.tag?void 0:A("170");for(g=c;3!==g.tag;){if(qf(g)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break b}(g=g.return)?void 0:A("171")}g=g.stateNode.context}c=qf(c)?vf(c,g):g}else c=ha;null===b.context?b.context=c:b.pendingContext=c;b=e;e=Of(d);e.payload={element:a};b=void 0===b?null:b;null!==b&&(e.callback=b);Qf(f,e,d);og(f,d);return d}
function hi(a){var b=a._reactInternalFiber;void 0===b&&("function"===typeof a.render?A("188"):A("268",Object.keys(a)));a=md(b);return null===a?null:a.stateNode}function ii(a,b,c,d){var e=b.current,f=mg();e=ng(f,e);return gi(a,b,c,e,d)}function ji(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}
function ki(a){var b=a.findFiberByHostInstance;return If(p({},a,{findHostInstanceByFiber:function(a){a=md(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null}}))}
var li={updateContainerAtExpirationTime:gi,createContainer:function(a,b,c){return Ef(a,b,c)},updateContainer:ii,flushRoot:$h,requestWork:Ah,computeUniqueAsyncExpiration:Ch,batchedUpdates:bi,unbatchedUpdates:ci,deferredUpdates:Hh,syncUpdates:Ih,interactiveUpdates:ei,flushInteractiveUpdates:function(){W||0===Eh||(Yh(Eh,!1,null),Eh=0)},flushControlled:fi,flushSync:di,getPublicRootInstance:ji,findHostInstance:hi,findHostInstanceWithNoPortals:function(a){a=nd(a);return null===a?null:a.stateNode},injectIntoDevTools:ki};
function ni(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:hc,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}Kb.injectFiberControlledHostComponent($e);function oi(a){this._expirationTime=Ch();this._root=a;this._callbacks=this._next=null;this._hasChildren=this._didComplete=!1;this._children=null;this._defer=!0}
oi.prototype.render=function(a){this._defer?void 0:A("250");this._hasChildren=!0;this._children=a;var b=this._root._internalRoot,c=this._expirationTime,d=new pi;gi(a,b,null,c,d._onCommit);return d};oi.prototype.then=function(a){if(this._didComplete)a();else{var b=this._callbacks;null===b&&(b=this._callbacks=[]);b.push(a)}};
oi.prototype.commit=function(){var a=this._root._internalRoot,b=a.firstBatch;this._defer&&null!==b?void 0:A("251");if(this._hasChildren){var c=this._expirationTime;if(b!==this){this._hasChildren&&(c=this._expirationTime=b._expirationTime,this.render(this._children));for(var d=null,e=b;e!==this;)d=e,e=e._next;null===d?A("251"):void 0;d._next=e._next;this._next=b;a.firstBatch=this}this._defer=!1;$h(a,c);b=this._next;this._next=null;b=a.firstBatch=b;null!==b&&b._hasChildren&&b.render(b._children)}else this._next=
null,this._defer=!1};oi.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var a=this._callbacks;if(null!==a)for(var b=0;b<a.length;b++)(0,a[b])()}};function pi(){this._callbacks=null;this._didCommit=!1;this._onCommit=this._onCommit.bind(this)}pi.prototype.then=function(a){if(this._didCommit)a();else{var b=this._callbacks;null===b&&(b=this._callbacks=[]);b.push(a)}};
pi.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var a=this._callbacks;if(null!==a)for(var b=0;b<a.length;b++){var c=a[b];"function"!==typeof c?A("191",c):void 0;c()}}};function qi(a,b,c){this._internalRoot=Ef(a,b,c)}qi.prototype.render=function(a,b){var c=this._internalRoot,d=new pi;b=void 0===b?null:b;null!==b&&d.then(b);ii(a,c,null,d._onCommit);return d};
qi.prototype.unmount=function(a){var b=this._internalRoot,c=new pi;a=void 0===a?null:a;null!==a&&c.then(a);ii(null,b,null,c._onCommit);return c};qi.prototype.legacy_renderSubtreeIntoContainer=function(a,b,c){var d=this._internalRoot,e=new pi;c=void 0===c?null:c;null!==c&&e.then(c);ii(b,d,a,e._onCommit);return e};
qi.prototype.createBatch=function(){var a=new oi(this),b=a._expirationTime,c=this._internalRoot,d=c.firstBatch;if(null===d)c.firstBatch=a,a._next=null;else{for(c=null;null!==d&&d._expirationTime<=b;)c=d,d=d._next;a._next=d;null!==c&&(c._next=a)}return a};function ri(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}Sb=li.batchedUpdates;Tb=li.interactiveUpdates;Ub=li.flushInteractiveUpdates;
function si(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new qi(a,!1,b)}
function ti(a,b,c,d,e){ri(c)?void 0:A("200");var f=c._reactRootContainer;if(f){if("function"===typeof e){var g=e;e=function(){var a=ji(f._internalRoot);g.call(a)}}null!=a?f.legacy_renderSubtreeIntoContainer(a,b,e):f.render(b,e)}else{f=c._reactRootContainer=si(c,d);if("function"===typeof e){var h=e;e=function(){var a=ji(f._internalRoot);h.call(a)}}ci(function(){null!=a?f.legacy_renderSubtreeIntoContainer(a,b,e):f.render(b,e)})}return ji(f._internalRoot)}
function ui(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;ri(b)?void 0:A("200");return ni(a,b,null,c)}
var vi={createPortal:ui,findDOMNode:function(a){return null==a?null:1===a.nodeType?a:hi(a)},hydrate:function(a,b,c){return ti(null,a,b,!0,c)},render:function(a,b,c){return ti(null,a,b,!1,c)},unstable_renderSubtreeIntoContainer:function(a,b,c,d){null==a||void 0===a._reactInternalFiber?A("38"):void 0;return ti(a,b,c,!1,d)},unmountComponentAtNode:function(a){ri(a)?void 0:A("40");return a._reactRootContainer?(ci(function(){ti(null,null,a,!1,function(){a._reactRootContainer=null})}),!0):!1},unstable_createPortal:function(){return ui.apply(void 0,
arguments)},unstable_batchedUpdates:bi,unstable_deferredUpdates:Hh,unstable_interactiveUpdates:ei,flushSync:di,unstable_flushControlled:fi,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:Ka,EventPluginRegistry:va,EventPropagators:$a,ReactControlledComponent:Rb,ReactDOMComponentTree:Qa,ReactDOMEventListener:Nd},unstable_createRoot:function(a,b){return new qi(a,!0,null!=b&&!0===b.hydrate)}};ki({findFiberByHostInstance:Na,bundleType:0,version:"16.4.1",rendererPackageName:"react-dom"});
var Ai={default:vi},Bi=Ai&&vi||Ai;module.exports=Bi.default?Bi.default:Bi;
/***/ }),
/* 463 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 19.1.2.1 Object.assign(target, source, ...)
var getKeys = __webpack_require__(106);
var gOPS = __webpack_require__(147);
var pIE = __webpack_require__(104);
var toObject = __webpack_require__(151);
var IObject = __webpack_require__(235);
var $assign = Object.assign;
// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !$assign || __webpack_require__(94)(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) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
} return T;
} : $assign;
/***/ }),
/* 464 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.1 Object.assign(target, source)
var $export = __webpack_require__(64);
$export($export.S + $export.F, 'Object', { assign: __webpack_require__(463) });
/***/ }),
/* 465 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(464);
module.exports = __webpack_require__(34).Object.assign;
/***/ }),
/* 466 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(465), __esModule: true };
/***/ }),
/* 467 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _I18nUtils = __webpack_require__(17);
var I18nUtils = _interopRequireWildcard(_I18nUtils);
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 en = {
linkText: 'WE-F Settings',
windowTitle: 'WE-F Settings',
fieldSetEditors: 'Editors to enable (in left menu and dropdowns)',
windowButtonSave: 'Save',
windowButtonCancel: 'Cancel'
};
var ru = {
linkText: 'WE-F: Настройка',
windowTitle: 'WE-F: Настройка гаджетов',
fieldSetEditors: 'Включить следующие редакторы (в меню и в выпадающих списках)',
windowButtonSave: 'Сохранить',
windowButtonCancel: 'Отмена'
};
var translations = { en: en, ru: ru };
var result = I18nUtils.localize({}, translations);
exports.default = result;
/***/ }),
/* 468 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _Expectation = __webpack_require__(229);
var _Expectation2 = _interopRequireDefault(_Expectation);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Extensions = [];
function extend(extension) {
if (Extensions.indexOf(extension) === -1) {
Extensions.push(extension);
for (var p in extension) {
if (extension.hasOwnProperty(p)) _Expectation2.default.prototype[p] = extension[p];
}
}
}
exports.default = extend;
/***/ }),
/* 469 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function () {
var mapForEach = (function () {
if (typeof Map !== 'function') { return null; }
try {
Map.prototype.forEach.call({}, function () {});
} catch (e) {
return Map.prototype.forEach;
}
return null;
}());
var setForEach = (function () {
if (typeof Set !== 'function') { return null; }
try {
Set.prototype.forEach.call({}, function () {});
} catch (e) {
return Set.prototype.forEach;
}
return null;
}());
return { Map: mapForEach, Set: setForEach };
};
/***/ }),
/* 470 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isSymbol = __webpack_require__(223);
module.exports = function getSymbolIterator() {
var symbolIterator = typeof Symbol === 'function' && isSymbol(Symbol.iterator) ? Symbol.iterator : null;
if (typeof Object.getOwnPropertyNames === 'function' && typeof Map === 'function' && typeof Map.prototype.entries === 'function') {
Object.getOwnPropertyNames(Map.prototype).forEach(function (name) {
if (name !== 'entries' && name !== 'size' && Map.prototype[name] === Map.prototype.entries) {
symbolIterator = name;
}
});
}
return symbolIterator;
};
/***/ }),
/* 471 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var strValue = String.prototype.valueOf;
var tryStringObject = function tryStringObject(value) {
try {
strValue.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var strClass = '[object String]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
module.exports = function isString(value) {
if (typeof value === 'string') { return true; }
if (typeof value !== 'object') { return false; }
return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass;
};
/***/ }),
/* 472 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var numToStr = Number.prototype.toString;
var tryNumberObject = function tryNumberObject(value) {
try {
numToStr.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var numClass = '[object Number]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
module.exports = function isNumberObject(value) {
if (typeof value === 'number') { return true; }
if (typeof value !== 'object') { return false; }
return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass;
};
/***/ }),
/* 473 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toStr = Object.prototype.toString;
var fnToStr = Function.prototype.toString;
var isFnRegex = /^\s*(?:function)?\*/;
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
var getProto = Object.getPrototypeOf;
var getGeneratorFunc = function () { // eslint-disable-line consistent-return
if (!hasToStringTag) {
return false;
}
try {
return Function('return function*() {}')();
} catch (e) {
}
};
var generatorFunc = getGeneratorFunc();
var GeneratorFunction = generatorFunc ? getProto(generatorFunc) : {};
module.exports = function isGeneratorFunction(fn) {
if (typeof fn !== 'function') {
return false;
}
if (isFnRegex.test(fnToStr.call(fn))) {
return true;
}
if (!hasToStringTag) {
var str = toStr.call(fn);
return str === '[object GeneratorFunction]';
}
return getProto(fn) === GeneratorFunction;
};
/***/ }),
/* 474 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getDay = Date.prototype.getDay;
var tryDateObject = function tryDateObject(value) {
try {
getDay.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var dateClass = '[object Date]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
module.exports = function isDateObject(value) {
if (typeof value !== 'object' || value === null) { return false; }
return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
};
/***/ }),
/* 475 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var boolToStr = Boolean.prototype.toString;
var tryBooleanObject = function tryBooleanObject(value) {
try {
boolToStr.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var boolClass = '[object Boolean]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
module.exports = function isBoolean(value) {
if (typeof value === 'boolean') { return true; }
if (typeof value !== 'object') { return false; }
return hasToStringTag ? tryBooleanObject(value) : toStr.call(value) === boolClass;
};
/***/ }),
/* 476 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isCallable = __webpack_require__(224);
var fnToStr = Function.prototype.toString;
var isNonArrowFnRegex = /^\s*function/;
var isArrowFnWithParensRegex = /^\([^\)]*\) *=>/;
var isArrowFnWithoutParensRegex = /^[^=]*=>/;
module.exports = function isArrowFunction(fn) {
if (!isCallable(fn)) { return false; }
var fnStr = fnToStr.call(fn);
return fnStr.length > 0 &&
!isNonArrowFnRegex.test(fnStr) &&
(isArrowFnWithParensRegex.test(fnStr) || isArrowFnWithoutParensRegex.test(fnStr));
};
/***/ }),
/* 477 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ObjectPrototype = Object.prototype;
var toStr = ObjectPrototype.toString;
var booleanValue = Boolean.prototype.valueOf;
var has = __webpack_require__(144);
var isArrowFunction = __webpack_require__(476);
var isBoolean = __webpack_require__(475);
var isDate = __webpack_require__(474);
var isGenerator = __webpack_require__(473);
var isNumber = __webpack_require__(472);
var isRegex = __webpack_require__(225);
var isString = __webpack_require__(471);
var isSymbol = __webpack_require__(223);
var isCallable = __webpack_require__(224);
var isProto = Object.prototype.isPrototypeOf;
var namedFoo = function foo() {};
var functionsHaveNames = namedFoo.name === 'foo';
var symbolValue = typeof Symbol === 'function' ? Symbol.prototype.valueOf : null;
var symbolIterator = __webpack_require__(470)();
var collectionsForEach = __webpack_require__(469)();
var getPrototypeOf = Object.getPrototypeOf;
if (!getPrototypeOf) {
/* eslint-disable no-proto */
if (typeof 'test'.__proto__ === 'object') {
getPrototypeOf = function (obj) {
return obj.__proto__;
};
} else {
getPrototypeOf = function (obj) {
var constructor = obj.constructor,
oldConstructor;
if (has(obj, 'constructor')) {
oldConstructor = constructor;
if (!(delete obj.constructor)) { // reset constructor
return null; // can't delete obj.constructor, return null
}
constructor = obj.constructor; // get real constructor
obj.constructor = oldConstructor; // restore constructor
}
return constructor ? constructor.prototype : ObjectPrototype; // needed for IE
};
}
/* eslint-enable no-proto */
}
var isArray = Array.isArray || function (value) {
return toStr.call(value) === '[object Array]';
};
var normalizeFnWhitespace = function normalizeWhitespace(fnStr) {
// this is needed in IE 9, at least, which has inconsistencies here.
return fnStr.replace(/^function ?\(/, 'function (').replace('){', ') {');
};
var tryMapSetEntries = function tryCollectionEntries(collection) {
var foundEntries = [];
try {
collectionsForEach.Map.call(collection, function (key, value) {
foundEntries.push([key, value]);
});
} catch (notMap) {
try {
collectionsForEach.Set.call(collection, function (value) {
foundEntries.push([value]);
});
} catch (notSet) {
return false;
}
}
return foundEntries;
};
module.exports = function whyNotEqual(value, other) {
if (value === other) { return ''; }
if (value == null || other == null) {
return value === other ? '' : String(value) + ' !== ' + String(other);
}
var valToStr = toStr.call(value);
var otherToStr = toStr.call(other);
if (valToStr !== otherToStr) {
return 'toStringTag is not the same: ' + valToStr + ' !== ' + otherToStr;
}
var valIsBool = isBoolean(value);
var otherIsBool = isBoolean(other);
if (valIsBool || otherIsBool) {
if (!valIsBool) { return 'first argument is not a boolean; second argument is'; }
if (!otherIsBool) { return 'second argument is not a boolean; first argument is'; }
var valBoolVal = booleanValue.call(value);
var otherBoolVal = booleanValue.call(other);
if (valBoolVal === otherBoolVal) { return ''; }
return 'primitive value of boolean arguments do not match: ' + valBoolVal + ' !== ' + otherBoolVal;
}
var valIsNumber = isNumber(value);
var otherIsNumber = isNumber(value);
if (valIsNumber || otherIsNumber) {
if (!valIsNumber) { return 'first argument is not a number; second argument is'; }
if (!otherIsNumber) { return 'second argument is not a number; first argument is'; }
var valNum = Number(value);
var otherNum = Number(other);
if (valNum === otherNum) { return ''; }
var valIsNaN = isNaN(value);
var otherIsNaN = isNaN(other);
if (valIsNaN && !otherIsNaN) {
return 'first argument is NaN; second is not';
} else if (!valIsNaN && otherIsNaN) {
return 'second argument is NaN; first is not';
} else if (valIsNaN && otherIsNaN) {
return '';
}
return 'numbers are different: ' + value + ' !== ' + other;
}
var valIsString = isString(value);
var otherIsString = isString(other);
if (valIsString || otherIsString) {
if (!valIsString) { return 'second argument is string; first is not'; }
if (!otherIsString) { return 'first argument is string; second is not'; }
var stringVal = String(value);
var otherVal = String(other);
if (stringVal === otherVal) { return ''; }
return 'string values are different: "' + stringVal + '" !== "' + otherVal + '"';
}
var valIsDate = isDate(value);
var otherIsDate = isDate(other);
if (valIsDate || otherIsDate) {
if (!valIsDate) { return 'second argument is Date, first is not'; }
if (!otherIsDate) { return 'first argument is Date, second is not'; }
var valTime = +value;
var otherTime = +other;
if (valTime === otherTime) { return ''; }
return 'Dates have different time values: ' + valTime + ' !== ' + otherTime;
}
var valIsRegex = isRegex(value);
var otherIsRegex = isRegex(other);
if (valIsRegex || otherIsRegex) {
if (!valIsRegex) { return 'second argument is RegExp, first is not'; }
if (!otherIsRegex) { return 'first argument is RegExp, second is not'; }
var regexStringVal = String(value);
var regexStringOther = String(other);
if (regexStringVal === regexStringOther) { return ''; }
return 'regular expressions differ: ' + regexStringVal + ' !== ' + regexStringOther;
}
var valIsArray = isArray(value);
var otherIsArray = isArray(other);
if (valIsArray || otherIsArray) {
if (!valIsArray) { return 'second argument is an Array, first is not'; }
if (!otherIsArray) { return 'first argument is an Array, second is not'; }
if (value.length !== other.length) {
return 'arrays have different length: ' + value.length + ' !== ' + other.length;
}
var index = value.length - 1;
var equal = '';
var valHasIndex, otherHasIndex;
while (equal === '' && index >= 0) {
valHasIndex = has(value, index);
otherHasIndex = has(other, index);
if (!valHasIndex && otherHasIndex) { return 'second argument has index ' + index + '; first does not'; }
if (valHasIndex && !otherHasIndex) { return 'first argument has index ' + index + '; second does not'; }
equal = whyNotEqual(value[index], other[index]);
index -= 1;
}
return equal;
}
var valueIsSym = isSymbol(value);
var otherIsSym = isSymbol(other);
if (valueIsSym !== otherIsSym) {
if (valueIsSym) { return 'first argument is Symbol; second is not'; }
return 'second argument is Symbol; first is not';
}
if (valueIsSym && otherIsSym) {
return symbolValue.call(value) === symbolValue.call(other) ? '' : 'first Symbol value !== second Symbol value';
}
var valueIsGen = isGenerator(value);
var otherIsGen = isGenerator(other);
if (valueIsGen !== otherIsGen) {
if (valueIsGen) { return 'first argument is a Generator; second is not'; }
return 'second argument is a Generator; first is not';
}
var valueIsArrow = isArrowFunction(value);
var otherIsArrow = isArrowFunction(other);
if (valueIsArrow !== otherIsArrow) {
if (valueIsArrow) { return 'first argument is an Arrow function; second is not'; }
return 'second argument is an Arrow function; first is not';
}
if (isCallable(value) || isCallable(other)) {
if (functionsHaveNames && whyNotEqual(value.name, other.name) !== '') {
return 'Function names differ: "' + value.name + '" !== "' + other.name + '"';
}
if (whyNotEqual(value.length, other.length) !== '') {
return 'Function lengths differ: ' + value.length + ' !== ' + other.length;
}
var valueStr = normalizeFnWhitespace(String(value));
var otherStr = normalizeFnWhitespace(String(other));
if (whyNotEqual(valueStr, otherStr) === '') { return ''; }
if (!valueIsGen && !valueIsArrow) {
return whyNotEqual(valueStr.replace(/\)\s*\{/, '){'), otherStr.replace(/\)\s*\{/, '){')) === '' ? '' : 'Function string representations differ';
}
return whyNotEqual(valueStr, otherStr) === '' ? '' : 'Function string representations differ';
}
if (typeof value === 'object' || typeof other === 'object') {
if (typeof value !== typeof other) { return 'arguments have a different typeof: ' + typeof value + ' !== ' + typeof other; }
if (isProto.call(value, other)) { return 'first argument is the [[Prototype]] of the second'; }
if (isProto.call(other, value)) { return 'second argument is the [[Prototype]] of the first'; }
if (getPrototypeOf(value) !== getPrototypeOf(other)) { return 'arguments have a different [[Prototype]]'; }
if (symbolIterator) {
var valueIteratorFn = value[symbolIterator];
var valueIsIterable = isCallable(valueIteratorFn);
var otherIteratorFn = other[symbolIterator];
var otherIsIterable = isCallable(otherIteratorFn);
if (valueIsIterable !== otherIsIterable) {
if (valueIsIterable) { return 'first argument is iterable; second is not'; }
return 'second argument is iterable; first is not';
}
if (valueIsIterable && otherIsIterable) {
var valueIterator = valueIteratorFn.call(value);
var otherIterator = otherIteratorFn.call(other);
var valueNext, otherNext, nextWhy;
do {
valueNext = valueIterator.next();
otherNext = otherIterator.next();
if (!valueNext.done && !otherNext.done) {
nextWhy = whyNotEqual(valueNext, otherNext);
if (nextWhy !== '') {
return 'iteration results are not equal: ' + nextWhy;
}
}
} while (!valueNext.done && !otherNext.done);
if (valueNext.done && !otherNext.done) { return 'first argument finished iterating before second'; }
if (!valueNext.done && otherNext.done) { return 'second argument finished iterating before first'; }
return '';
}
} else if (collectionsForEach.Map || collectionsForEach.Set) {
var valueEntries = tryMapSetEntries(value);
var otherEntries = tryMapSetEntries(other);
var valueEntriesIsArray = isArray(valueEntries);
var otherEntriesIsArray = isArray(otherEntries);
if (valueEntriesIsArray && !otherEntriesIsArray) { return 'first argument has Collection entries, second does not'; }
if (!valueEntriesIsArray && otherEntriesIsArray) { return 'second argument has Collection entries, first does not'; }
if (valueEntriesIsArray && otherEntriesIsArray) {
var entriesWhy = whyNotEqual(valueEntries, otherEntries);
return entriesWhy === '' ? '' : 'Collection entries differ: ' + entriesWhy;
}
}
var key, valueKeyIsRecursive, otherKeyIsRecursive, keyWhy;
for (key in value) {
if (has(value, key)) {
if (!has(other, key)) { return 'first argument has key "' + key + '"; second does not'; }
valueKeyIsRecursive = !!value[key] && value[key][key] === value;
otherKeyIsRecursive = !!other[key] && other[key][key] === other;
if (valueKeyIsRecursive !== otherKeyIsRecursive) {
if (valueKeyIsRecursive) { return 'first argument has a circular reference at key "' + key + '"; second does not'; }
return 'second argument has a circular reference at key "' + key + '"; first does not';
}
if (!valueKeyIsRecursive && !otherKeyIsRecursive) {
keyWhy = whyNotEqual(value[key], other[key]);
if (keyWhy !== '') {
return 'value at key "' + key + '" differs: ' + keyWhy;
}
}
}
}
for (key in other) {
if (has(other, key) && !has(value, key)) {
return 'second argument has key "' + key + '"; first does not';
}
}
return '';
}
return false;
};
/***/ }),
/* 478 */
/***/ (function(module, exports) {
var hasOwn = Object.prototype.hasOwnProperty;
var toString = Object.prototype.toString;
module.exports = function forEach (obj, fn, ctx) {
if (toString.call(fn) !== '[object Function]') {
throw new TypeError('iterator must be a function');
}
var l = obj.length;
if (l === +l) {
for (var i = 0; i < l; i++) {
fn.call(ctx, obj[i], i, obj);
}
} else {
for (var k in obj) {
if (hasOwn.call(obj, k)) {
fn.call(ctx, obj[k], k, obj);
}
}
}
};
/***/ }),
/* 479 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toStr = Object.prototype.toString;
module.exports = function isArguments(value) {
var str = toStr.call(value);
var isArgs = str === '[object Arguments]';
if (!isArgs) {
isArgs = str !== '[object Array]' &&
value !== null &&
typeof value === 'object' &&
typeof value.length === 'number' &&
value.length >= 0 &&
toStr.call(value.callee) === '[object Function]';
}
return isArgs;
};
/***/ }),
/* 480 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var keys = __webpack_require__(227);
var foreach = __webpack_require__(478);
var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';
var toStr = Object.prototype.toString;
var isFunction = function (fn) {
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
};
var arePropertyDescriptorsSupported = function () {
var obj = {};
try {
Object.defineProperty(obj, 'x', { enumerable: false, value: obj });
/* eslint-disable no-unused-vars, no-restricted-syntax */
for (var _ in obj) { return false; }
/* eslint-enable no-unused-vars, no-restricted-syntax */
return obj.x === obj;
} catch (e) { /* this is IE 8. */
return false;
}
};
var supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported();
var defineProperty = function (object, name, value, predicate) {
if (name in object && (!isFunction(predicate) || !predicate())) {
return;
}
if (supportsDescriptors) {
Object.defineProperty(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 = props.concat(Object.getOwnPropertySymbols(map));
}
foreach(props, function (name) {
defineProperty(object, name, map[name], predicates[name]);
});
};
defineProperties.supportsDescriptors = !!supportsDescriptors;
module.exports = defineProperties;
/***/ }),
/* 481 */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/* 482 */
/***/ (function(module, exports, __webpack_require__) {
var hasMap = typeof Map === 'function' && Map.prototype;
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
var mapForEach = hasMap && Map.prototype.forEach;
var hasSet = typeof Set === 'function' && Set.prototype;
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
var setForEach = hasSet && Set.prototype.forEach;
var booleanValueOf = Boolean.prototype.valueOf;
var objectToString = Object.prototype.toString;
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
var inspectCustom = __webpack_require__(481).custom;
var inspectSymbol = (inspectCustom && isSymbol(inspectCustom)) ? inspectCustom : null;
module.exports = function inspect_ (obj, opts, depth, seen) {
if (!opts) opts = {};
if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
throw new TypeError('option "quoteStyle" must be "single" or "double"');
}
if (typeof obj === 'undefined') {
return 'undefined';
}
if (obj === null) {
return 'null';
}
if (typeof obj === 'boolean') {
return obj ? 'true' : 'false';
}
if (typeof obj === 'string') {
return inspectString(obj, opts);
}
if (typeof obj === 'number') {
if (obj === 0) {
return Infinity / obj > 0 ? '0' : '-0';
}
return String(obj);
}
if (typeof obj === 'bigint') {
return String(obj) + 'n';
}
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
if (typeof depth === 'undefined') depth = 0;
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
return '[Object]';
}
if (typeof seen === 'undefined') seen = [];
else if (indexOf(seen, obj) >= 0) {
return '[Circular]';
}
function inspect (value, from) {
if (from) {
seen = seen.slice();
seen.push(from);
}
return inspect_(value, opts, depth + 1, seen);
}
if (typeof obj === 'function') {
var name = nameOf(obj);
return '[Function' + (name ? ': ' + name : '') + ']';
}
if (isSymbol(obj)) {
var symString = Symbol.prototype.toString.call(obj);
return typeof obj === 'object' ? markBoxed(symString) : symString;
}
if (isElement(obj)) {
var s = '<' + String(obj.nodeName).toLowerCase();
var attrs = obj.attributes || [];
for (var i = 0; i < attrs.length; i++) {
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
}
s += '>';
if (obj.childNodes && obj.childNodes.length) s += '...';
s += '</' + String(obj.nodeName).toLowerCase() + '>';
return s;
}
if (isArray(obj)) {
if (obj.length === 0) return '[]';
return '[ ' + arrObjKeys(obj, inspect).join(', ') + ' ]';
}
if (isError(obj)) {
var parts = arrObjKeys(obj, inspect);
if (parts.length === 0) return '[' + String(obj) + ']';
return '{ [' + String(obj) + '] ' + parts.join(', ') + ' }';
}
if (typeof obj === 'object') {
if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
return obj[inspectSymbol]();
} else if (typeof obj.inspect === 'function') {
return obj.inspect();
}
}
if (isMap(obj)) {
var parts = [];
mapForEach.call(obj, function (value, key) {
parts.push(inspect(key, obj) + ' => ' + inspect(value, obj));
});
return collectionOf('Map', mapSize.call(obj), parts);
}
if (isSet(obj)) {
var parts = [];
setForEach.call(obj, function (value ) {
parts.push(inspect(value, obj));
});
return collectionOf('Set', setSize.call(obj), parts);
}
if (isNumber(obj)) {
return markBoxed(inspect(Number(obj)));
}
if (isBigInt(obj)) {
return markBoxed(inspect(bigIntValueOf.call(obj)));
}
if (isBoolean(obj)) {
return markBoxed(booleanValueOf.call(obj));
}
if (isString(obj)) {
return markBoxed(inspect(String(obj)));
}
if (!isDate(obj) && !isRegExp(obj)) {
var xs = arrObjKeys(obj, inspect);
if (xs.length === 0) return '{}';
return '{ ' + xs.join(', ') + ' }';
}
return String(obj);
};
function wrapQuotes (s, defaultStyle, opts) {
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
return quoteChar + s + quoteChar;
}
function quote (s) {
return String(s).replace(/"/g, '"');
}
function isArray (obj) { return toStr(obj) === '[object Array]'; }
function isDate (obj) { return toStr(obj) === '[object Date]'; }
function isRegExp (obj) { return toStr(obj) === '[object RegExp]'; }
function isError (obj) { return toStr(obj) === '[object Error]'; }
function isSymbol (obj) { return toStr(obj) === '[object Symbol]'; }
function isString (obj) { return toStr(obj) === '[object String]'; }
function isNumber (obj) { return toStr(obj) === '[object Number]'; }
function isBigInt (obj) { return toStr(obj) === '[object BigInt]'; }
function isBoolean (obj) { return toStr(obj) === '[object Boolean]'; }
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
function has (obj, key) {
return hasOwn.call(obj, key);
}
function toStr (obj) {
return objectToString.call(obj);
}
function nameOf (f) {
if (f.name) return f.name;
var m = String(f).match(/^function\s*([\w$]+)/);
if (m) return m[1];
}
function indexOf (xs, x) {
if (xs.indexOf) return xs.indexOf(x);
for (var i = 0, l = xs.length; i < l; i++) {
if (xs[i] === x) return i;
}
return -1;
}
function isMap (x) {
if (!mapSize) {
return false;
}
try {
mapSize.call(x);
try {
setSize.call(x);
} catch (s) {
return true;
}
return x instanceof Map; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
}
function isSet (x) {
if (!setSize) {
return false;
}
try {
setSize.call(x);
try {
mapSize.call(x);
} catch (m) {
return true;
}
return x instanceof Set; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
}
function isElement (x) {
if (!x || typeof x !== 'object') return false;
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
return true;
}
return typeof x.nodeName === 'string'
&& typeof x.getAttribute === 'function'
;
}
function inspectString (str, opts) {
var s = str.replace(/(['\\])/g, '\\$1').replace(/[\x00-\x1f]/g, lowbyte);
return wrapQuotes(s, 'single', opts);
}
function lowbyte (c) {
var n = c.charCodeAt(0);
var x = { 8: 'b', 9: 't', 10: 'n', 12: 'f', 13: 'r' }[n];
if (x) return '\\' + x;
return '\\x' + (n < 0x10 ? '0' : '') + n.toString(16);
}
function markBoxed (str) {
return 'Object(' + str + ')';
}
function collectionOf (type, size, entries) {
return type + ' (' + size + ') {' + entries.join(', ') + '}';
}
function arrObjKeys (obj, inspect) {
var isArr = isArray(obj);
var xs = [];
if (isArr) {
xs.length = obj.length;
for (var i = 0; i < obj.length; i++) {
xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
}
}
for (var key in obj) {
if (!has(obj, key)) continue;
if (isArr && String(Number(key)) === key && key < obj.length) continue;
if (/[^\w$]/.test(key)) {
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
} else {
xs.push(key + ': ' + inspect(obj[key], obj));
}
}
return xs;
}
/***/ }),
/* 483 */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
/***/ }),
/* 484 */
/***/ (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
}
/***/ }),
/* 485 */
/***/ (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
for (var 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('')
}
/***/ }),
/* 486 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
* @license MIT
*/
/* eslint-disable no-proto */
var base64 = __webpack_require__(485)
var ieee754 = __webpack_require__(484)
var isArray = __webpack_require__(483)
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(this, __webpack_require__(75)))
/***/ }),
/* 487 */
/***/ (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; };
/***/ }),
/* 488 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process, Buffer) {
function isArguments (obj) {
return Object.prototype.toString.call(obj) === '[object Arguments]'
}
module.exports = match
function match (obj, pattern) {
return match_(obj, pattern, [], [])
}
/* istanbul ignore next */
var log = (/\btmatch\b/.test(process.env.NODE_DEBUG || '')) ?
console.error : function () {}
function match_ (obj, pattern, ca, cb) {
log('TMATCH', typeof obj, pattern)
if (obj == pattern) {
log('TMATCH same object or simple value, or problem')
// if one is object, and the other isn't, then this is bogus
if (obj === null || pattern === null) {
return true
} else if (typeof obj === 'object' && typeof pattern === 'object') {
return true
} else if (typeof obj === 'object' && typeof pattern !== 'object') {
return false
} else if (typeof obj !== 'object' && typeof pattern === 'object') {
return false
} else {
return true
}
} else if (obj === null || pattern === null) {
log('TMATCH null test, already failed ==')
return false
} else if (typeof obj === 'string' && pattern instanceof RegExp) {
log('TMATCH string~=regexp test')
return pattern.test(obj)
} else if (typeof obj === 'string' && typeof pattern === 'string' && pattern) {
log('TMATCH string~=string test')
return obj.indexOf(pattern) !== -1
} else if (obj instanceof Date && pattern instanceof Date) {
log('TMATCH date test')
return obj.getTime() === pattern.getTime()
} else if (obj instanceof Date && typeof pattern === 'string') {
log('TMATCH date~=string test')
return obj.getTime() === new Date(pattern).getTime()
} else if (isArguments(obj) || isArguments(pattern)) {
log('TMATCH arguments test')
var slice = Array.prototype.slice
return match_(slice.call(obj), slice.call(pattern), ca, cb)
} else if (pattern === Buffer) {
log('TMATCH Buffer ctor')
return Buffer.isBuffer(obj)
} else if (pattern === Function) {
log('TMATCH Function ctor')
return typeof obj === 'function'
} else if (pattern === Number) {
log('TMATCH Number ctor (finite, not NaN)')
return typeof obj === 'number' && obj === obj && isFinite(obj)
} else if (pattern !== pattern) {
log('TMATCH NaN')
return obj !== obj
} else if (pattern === String) {
log('TMATCH String ctor')
return typeof obj === 'string'
} else if (pattern === Boolean) {
log('TMATCH Boolean ctor')
return typeof obj === 'boolean'
} else if (pattern === Array) {
log('TMATCH Array ctor', pattern, Array.isArray(obj))
return Array.isArray(obj)
} else if (typeof pattern === 'function' && typeof obj === 'object') {
log('TMATCH object~=function')
return obj instanceof pattern
} else if (typeof obj !== 'object' || typeof pattern !== 'object') {
log('TMATCH obj is not object, pattern is not object, false')
return false
} else if (obj instanceof RegExp && pattern instanceof RegExp) {
log('TMATCH regexp~=regexp test')
return obj.source === pattern.source &&
obj.global === pattern.global &&
obj.multiline === pattern.multiline &&
obj.lastIndex === pattern.lastIndex &&
obj.ignoreCase === pattern.ignoreCase
} else if (Buffer.isBuffer(obj) && Buffer.isBuffer(pattern)) {
log('TMATCH buffer test')
if (obj.equals) {
return obj.equals(pattern)
} else {
if (obj.length !== pattern.length) return false
for (var j = 0; j < obj.length; j++) if (obj[j] != pattern[j]) return false
return true
}
} else {
// both are objects. interesting case!
log('TMATCH object~=object test')
var kobj = Object.keys(obj)
var kpat = Object.keys(pattern)
log(' TMATCH patternkeys=%j objkeys=%j', kpat, kobj)
// don't bother with stack acrobatics if there's nothing there
if (kobj.length === 0 && kpat.length === 0) return true
// if we've seen this exact pattern and object already, then
// it means that pattern and obj have matching cyclicalness
// however, non-cyclical patterns can match cyclical objects
log(' TMATCH check seen objects...')
var cal = ca.length
while (cal--) if (ca[cal] === obj && cb[cal] === pattern) return true
ca.push(obj); cb.push(pattern)
log(' TMATCH not seen previously')
var key
for (var l = kpat.length - 1; l >= 0; l--) {
key = kpat[l]
log(' TMATCH test obj[%j]', key, obj[key], pattern[key])
if (!match_(obj[key], pattern[key], ca, cb)) return false
}
ca.pop()
cb.pop()
log(' TMATCH object pass')
return true
}
/* istanbul ignore next */
throw new Error('impossible to reach this point')
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(487), __webpack_require__(486).Buffer))
/***/ }),
/* 489 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint no-invalid-this: 1 */
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
var slice = Array.prototype.slice;
var toStr = Object.prototype.toString;
var funcType = '[object Function]';
module.exports = function bind(that) {
var target = this;
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
throw new TypeError(ERROR_MESSAGE + target);
}
var args = slice.call(arguments, 1);
var bound;
var binder = 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))
);
}
};
var boundLength = Math.max(0, target.length - args.length);
var boundArgs = [];
for (var i = 0; i < boundLength; i++) {
boundArgs.push('$' + i);
}
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
if (target.prototype) {
var Empty = function Empty() {};
Empty.prototype = target.prototype;
bound.prototype = new Empty();
Empty.prototype = null;
}
return bound;
};
/***/ }),
/* 490 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var implementation = __webpack_require__(489);
module.exports = Function.prototype.bind || implementation;
/***/ }),
/* 491 */
/***/ (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;
/***/ }),
/* 492 */
/***/ (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 emptyFunction = __webpack_require__(145);
var invariant = __webpack_require__(146);
var ReactPropTypesSecret = __webpack_require__(491);
module.exports = function() {
function shim(props, propName, componentName, location, propFullName, secret) {
if (secret === ReactPropTypesSecret) {
// It is still safe when called from React.
return;
}
invariant(
false,
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
'Use PropTypes.checkPropTypes() to call them. ' +
'Read more at http://fb-removeme.me/use-check-prop-types'
);
};
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,
instanceOf: getShim,
node: shim,
objectOf: getShim,
oneOf: getShim,
oneOfType: getShim,
shape: getShim,
exact: getShim
};
ReactPropTypes.checkPropTypes = emptyFunction;
ReactPropTypes.PropTypes = ReactPropTypes;
return ReactPropTypes;
};
/***/ }),
/* 493 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @license React v16.4.1
* react.production.min.js
*
* 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 k=__webpack_require__(231),n=__webpack_require__(146),p=__webpack_require__(230),q=__webpack_require__(145),r="function"===typeof Symbol&&Symbol.for,t=r?Symbol.for("react.element"):60103,u=r?Symbol.for("react.portal"):60106,v=r?Symbol.for("react.fragment"):60107,w=r?Symbol.for("react.strict_mode"):60108,x=r?Symbol.for("react.profiler"):60114,y=r?Symbol.for("react.provider"):60109,z=r?Symbol.for("react.context"):60110,A=r?Symbol.for("react.async_mode"):60111,B=
r?Symbol.for("react.forward_ref"):60112;r&&Symbol.for("react.timeout");var C="function"===typeof Symbol&&Symbol.iterator;function D(a){for(var b=arguments.length-1,e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)e+="&args[]="+encodeURIComponent(arguments[c+1]);n(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e)}
var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function F(a,b,e){this.props=a;this.context=b;this.refs=p;this.updater=e||E}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?D("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function G(){}
G.prototype=F.prototype;function H(a,b,e){this.props=a;this.context=b;this.refs=p;this.updater=e||E}var I=H.prototype=new G;I.constructor=H;k(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};
function M(a,b,e){var c=void 0,d={},g=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(g=""+b.key),b)K.call(b,c)&&!L.hasOwnProperty(c)&&(d[c]=b[c]);var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){for(var l=Array(f),m=0;m<f;m++)l[m]=arguments[m+2];d.children=l}if(a&&a.defaultProps)for(c in f=a.defaultProps,f)void 0===d[c]&&(d[c]=f[c]);return{$$typeof:t,type:a,key:g,ref:h,props:d,_owner:J.current}}
function N(a){return"object"===typeof a&&null!==a&&a.$$typeof===t}function escape(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var O=/\/+/g,P=[];function Q(a,b,e,c){if(P.length){var d=P.pop();d.result=a;d.keyPrefix=b;d.func=e;d.context=c;d.count=0;return d}return{result:a,keyPrefix:b,func:e,context:c,count:0}}function R(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>P.length&&P.push(a)}
function S(a,b,e,c){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case t:case u:g=!0}}if(g)return e(c,a,""===b?"."+T(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;h<a.length;h++){d=a[h];var f=b+T(d,h);g+=S(d,f,e,c)}else if(null===a||"undefined"===typeof a?f=null:(f=C&&a[C]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),
h=0;!(d=a.next()).done;)d=d.value,f=b+T(d,h++),g+=S(d,f,e,c);else"object"===d&&(e=""+a,D("31","[object Object]"===e?"object with keys {"+Object.keys(a).join(", ")+"}":e,""));return g}function T(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function U(a,b){a.func.call(a.context,b,a.count++)}
function V(a,b,e){var c=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?W(a,c,e,q.thatReturnsArgument):null!=a&&(N(a)&&(b=d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+e,a={$$typeof:t,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),c.push(a))}function W(a,b,e,c,d){var g="";null!=e&&(g=(""+e).replace(O,"$&/")+"/");b=Q(b,g,c,d);null==a||S(a,"",V,b);R(b)}
var X={Children:{map:function(a,b,e){if(null==a)return a;var c=[];W(a,c,null,b,e);return c},forEach:function(a,b,e){if(null==a)return a;b=Q(null,null,b,e);null==a||S(a,"",U,b);R(b)},count:function(a){return null==a?0:S(a,"",q.thatReturnsNull,null)},toArray:function(a){var b=[];W(a,b,null,q.thatReturnsArgument);return b},only:function(a){N(a)?void 0:D("143");return a}},createRef:function(){return{current:null}},Component:F,PureComponent:H,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:z,
_calculateChangedBits:b,_defaultValue:a,_currentValue:a,_currentValue2:a,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null};a.Provider={$$typeof:y,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:B,render:a}},Fragment:v,StrictMode:w,unstable_AsyncMode:A,unstable_Profiler:x,createElement:M,cloneElement:function(a,b,e){null===a||void 0===a?D("267",a):void 0;var c=void 0,d=k({},a.props),g=a.key,h=a.ref,f=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,f=J.current);void 0!==
b.key&&(g=""+b.key);var l=void 0;a.type&&a.type.defaultProps&&(l=a.type.defaultProps);for(c in b)K.call(b,c)&&!L.hasOwnProperty(c)&&(d[c]=void 0===b[c]&&void 0!==l?l[c]:b[c])}c=arguments.length-2;if(1===c)d.children=e;else if(1<c){l=Array(c);for(var m=0;m<c;m++)l[m]=arguments[m+2];d.children=l}return{$$typeof:t,type:a.type,key:g,ref:h,props:d,_owner:f}},createFactory:function(a){var b=M.bind(null,a);b.type=a;return b},isValidElement:N,version:"16.4.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:J,
assign:k}},Y={default:X},Z=Y&&X||Y;module.exports=Z.default?Z.default:Z;
/***/ }),
/* 494 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(64);
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
$export($export.S, 'Object', { create: __webpack_require__(157) });
/***/ }),
/* 495 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(494);
var $Object = __webpack_require__(34).Object;
module.exports = function create(P, D) {
return $Object.create(P, D);
};
/***/ }),
/* 496 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(495), __esModule: true };
/***/ }),
/* 497 */
/***/ (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__(79);
var anObject = __webpack_require__(63);
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__(161)(Function.call, __webpack_require__(232).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
};
/***/ }),
/* 498 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = __webpack_require__(64);
$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(497).set });
/***/ }),
/* 499 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(498);
module.exports = __webpack_require__(34).Object.setPrototypeOf;
/***/ }),
/* 500 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(499), __esModule: true };
/***/ }),
/* 501 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(148)('observable');
/***/ }),
/* 502 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(148)('asyncIterator');
/***/ }),
/* 503 */
/***/ (function(module, exports) {
/***/ }),
/* 504 */
/***/ (function(module, exports, __webpack_require__) {
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = __webpack_require__(77);
var gOPN = __webpack_require__(233).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));
};
/***/ }),
/* 505 */
/***/ (function(module, exports, __webpack_require__) {
// 7.2.2 IsArray(argument)
var cof = __webpack_require__(156);
module.exports = Array.isArray || function isArray(arg) {
return cof(arg) == 'Array';
};
/***/ }),
/* 506 */
/***/ (function(module, exports, __webpack_require__) {
// all enumerable object keys, includes symbols
var getKeys = __webpack_require__(106);
var gOPS = __webpack_require__(147);
var pIE = __webpack_require__(104);
module.exports = function (it) {
var result = getKeys(it);
var getSymbols = gOPS.f;
if (getSymbols) {
var symbols = getSymbols(it);
var isEnum = pIE.f;
var i = 0;
var key;
while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
} return result;
};
/***/ }),
/* 507 */
/***/ (function(module, exports, __webpack_require__) {
var META = __webpack_require__(105)('meta');
var isObject = __webpack_require__(79);
var has = __webpack_require__(61);
var setDesc = __webpack_require__(56).f;
var id = 0;
var isExtensible = Object.isExtensible || function () {
return true;
};
var FREEZE = !__webpack_require__(94)(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
};
/***/ }),
/* 508 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// ECMAScript 6 symbols shim
var global = __webpack_require__(57);
var has = __webpack_require__(61);
var DESCRIPTORS = __webpack_require__(62);
var $export = __webpack_require__(64);
var redefine = __webpack_require__(237);
var META = __webpack_require__(507).KEY;
var $fails = __webpack_require__(94);
var shared = __webpack_require__(154);
var setToStringTag = __webpack_require__(152);
var uid = __webpack_require__(105);
var wks = __webpack_require__(39);
var wksExt = __webpack_require__(149);
var wksDefine = __webpack_require__(148);
var enumKeys = __webpack_require__(506);
var isArray = __webpack_require__(505);
var anObject = __webpack_require__(63);
var isObject = __webpack_require__(79);
var toIObject = __webpack_require__(77);
var toPrimitive = __webpack_require__(160);
var createDesc = __webpack_require__(93);
var _create = __webpack_require__(157);
var gOPNExt = __webpack_require__(504);
var $GOPD = __webpack_require__(232);
var $DP = __webpack_require__(56);
var $keys = __webpack_require__(106);
var gOPD = $GOPD.f;
var dP = $DP.f;
var gOPN = gOPNExt.f;
var $Symbol = global.Symbol;
var $JSON = global.JSON;
var _stringify = $JSON && $JSON.stringify;
var PROTOTYPE = 'prototype';
var HIDDEN = wks('_hidden');
var TO_PRIMITIVE = wks('toPrimitive');
var isEnum = {}.propertyIsEnumerable;
var SymbolRegistry = shared('symbol-registry');
var AllSymbols = shared('symbols');
var OPSymbols = shared('op-symbols');
var ObjectProto = Object[PROTOTYPE];
var USE_NATIVE = typeof $Symbol == 'function';
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function () {
return _create(dP({}, 'a', {
get: function () { return dP(this, 'a', { value: 7 }).a; }
})).a != 7;
}) ? function (it, key, D) {
var protoDesc = gOPD(ObjectProto, key);
if (protoDesc) delete ObjectProto[key];
dP(it, key, D);
if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
} : dP;
var wrap = function (tag) {
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
sym._k = tag;
return sym;
};
var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
return typeof it == 'symbol';
} : function (it) {
return it instanceof $Symbol;
};
var $defineProperty = function defineProperty(it, key, D) {
if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
anObject(it);
key = toPrimitive(key, true);
anObject(D);
if (has(AllSymbols, key)) {
if (!D.enumerable) {
if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
it[HIDDEN][key] = true;
} else {
if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
D = _create(D, { enumerable: createDesc(0, false) });
} return setSymbolDesc(it, key, D);
} return dP(it, key, D);
};
var $defineProperties = function defineProperties(it, P) {
anObject(it);
var keys = enumKeys(P = toIObject(P));
var i = 0;
var l = keys.length;
var key;
while (l > i) $defineProperty(it, key = keys[i++], P[key]);
return it;
};
var $create = function create(it, P) {
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
var E = isEnum.call(this, key = toPrimitive(key, true));
if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
it = toIObject(it);
key = toPrimitive(key, true);
if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
var D = gOPD(it, key);
if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
var names = gOPN(toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
} return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
var IS_OP = it === ObjectProto;
var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
} return result;
};
// 19.4.1.1 Symbol([description])
if (!USE_NATIVE) {
$Symbol = function Symbol() {
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
var $set = function (value) {
if (this === ObjectProto) $set.call(OPSymbols, value);
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
setSymbolDesc(this, tag, createDesc(1, value));
};
if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
return wrap(tag);
};
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
return this._k;
});
$GOPD.f = $getOwnPropertyDescriptor;
$DP.f = $defineProperty;
__webpack_require__(233).f = gOPNExt.f = $getOwnPropertyNames;
__webpack_require__(104).f = $propertyIsEnumerable;
__webpack_require__(147).f = $getOwnPropertySymbols;
if (DESCRIPTORS && !__webpack_require__(107)) {
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
}
wksExt.f = function (name) {
return wrap(wks(name));
};
}
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
for (var es6Symbols = (
// 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
// 19.4.2.1 Symbol.for(key)
'for': function (key) {
return has(SymbolRegistry, key += '')
? SymbolRegistry[key]
: SymbolRegistry[key] = $Symbol(key);
},
// 19.4.2.5 Symbol.keyFor(sym)
keyFor: function keyFor(sym) {
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
},
useSetter: function () { setter = true; },
useSimple: function () { setter = false; }
});
$export($export.S + $export.F * !USE_NATIVE, 'Object', {
// 19.1.2.2 Object.create(O [, Properties])
create: $create,
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
defineProperty: $defineProperty,
// 19.1.2.3 Object.defineProperties(O, Properties)
defineProperties: $defineProperties,
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
// 19.1.2.7 Object.getOwnPropertyNames(O)
getOwnPropertyNames: $getOwnPropertyNames,
// 19.1.2.8 Object.getOwnPropertySymbols(O)
getOwnPropertySymbols: $getOwnPropertySymbols
});
// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
var S = $Symbol();
// MS Edge converts symbol values to JSON as {}
// WebKit converts symbol values to JSON as null
// V8 throws on boxed symbols
return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
})), 'JSON', {
stringify: function stringify(it) {
var args = [it];
var i = 1;
var replacer, $replacer;
while (arguments.length > i) args.push(arguments[i++]);
$replacer = replacer = args[1];
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
if (!isArray(replacer)) replacer = function (key, value) {
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
if (!isSymbol(value)) return value;
};
args[1] = replacer;
return _stringify.apply($JSON, args);
}
});
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(80)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);
/***/ }),
/* 509 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(508);
__webpack_require__(503);
__webpack_require__(502);
__webpack_require__(501);
module.exports = __webpack_require__(34).Symbol;
/***/ }),
/* 510 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(509), __esModule: true };
/***/ }),
/* 511 */
/***/ (function(module, exports) {
module.exports = function (done, value) {
return { value: value, done: !!done };
};
/***/ }),
/* 512 */
/***/ (function(module, exports) {
module.exports = function () { /* empty */ };
/***/ }),
/* 513 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var addToUnscopables = __webpack_require__(512);
var step = __webpack_require__(511);
var Iterators = __webpack_require__(78);
var toIObject = __webpack_require__(77);
// 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__(238)(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');
/***/ }),
/* 514 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(61);
var toObject = __webpack_require__(151);
var IE_PROTO = __webpack_require__(155)('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;
};
/***/ }),
/* 515 */
/***/ (function(module, exports, __webpack_require__) {
var document = __webpack_require__(57).document;
module.exports = document && document.documentElement;
/***/ }),
/* 516 */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(159);
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);
};
/***/ }),
/* 517 */
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__(77);
var toLength = __webpack_require__(234);
var toAbsoluteIndex = __webpack_require__(516);
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;
};
};
/***/ }),
/* 518 */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(56);
var anObject = __webpack_require__(63);
var getKeys = __webpack_require__(106);
module.exports = __webpack_require__(62) ? 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;
};
/***/ }),
/* 519 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var create = __webpack_require__(157);
var descriptor = __webpack_require__(93);
var setToStringTag = __webpack_require__(152);
var IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(80)(IteratorPrototype, __webpack_require__(39)('iterator'), function () { return this; });
module.exports = function (Constructor, NAME, next) {
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
setToStringTag(Constructor, NAME + ' Iterator');
};
/***/ }),
/* 520 */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(159);
var defined = __webpack_require__(158);
// 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;
};
};
/***/ }),
/* 521 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(108);
__webpack_require__(150);
module.exports = __webpack_require__(149).f('iterator');
/***/ }),
/* 522 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(521), __esModule: true };
/***/ }),
/* 523 */
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/* 524 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(64);
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
$export($export.S + $export.F * !__webpack_require__(62), 'Object', { defineProperty: __webpack_require__(56).f });
/***/ }),
/* 525 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(524);
var $Object = __webpack_require__(34).Object;
module.exports = function defineProperty(it, key, desc) {
return $Object.defineProperty(it, key, desc);
};
/***/ }),
/* 526 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.linkText = undefined;
exports.registerEditor = registerEditor;
exports.getEnabledEditors = getEnabledEditors;
exports.start = start;
var _DialogWrapper = __webpack_require__(162);
var _DialogWrapper2 = _interopRequireDefault(_DialogWrapper);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _i18n = __webpack_require__(467);
var _i18n2 = _interopRequireDefault(_i18n);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactDom = __webpack_require__(125);
var _reactDom2 = _interopRequireDefault(_reactDom);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var linkText = _i18n2.default.linkText;
exports.linkText = linkText;
var editors = [];
function registerEditor(editorDescription) {
(0, _expect2.default)(editorDescription).toBeAn('object');
(0, _expect2.default)(editorDescription.dialogTitle).toBeA('string');
(0, _expect2.default)(editorDescription.linkText).toBeA('string');
(0, _expect2.default)(editorDescription.tabs).toBeAn('array');
editors.push(editorDescription);
}
function getEnabledEditors() {
return editors;
}
function start() {
var appDiv = document.createElement('div');
document.body.appendChild(appDiv);
/* eslint react/jsx-no-bind: 0 */
var element = _react2.default.createElement(
_DialogWrapper2.default,
{ onClose: function onClose() {
return console.log('Dialog was closed');
}, title: _i18n2.default.windowTitle },
_react2.default.createElement(
'p',
null,
'Settings here'
)
);
_reactDom2.default.render(element, appDiv);
}
/***/ }),
/* 527 */
/***/ (function(module, exports) {
module.exports = function (regExp, replace) {
var replacer = replace === Object(replace) ? function (part) {
return replace[part];
} : replace;
return function (it) {
return String(it).replace(regExp, replacer);
};
};
/***/ }),
/* 528 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/benjamingr/RexExp.escape
var $export = __webpack_require__(1);
var $re = __webpack_require__(527)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } });
/***/ }),
/* 529 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(528);
module.exports = __webpack_require__(43).RegExp.escape;
/***/ }),
/* 530 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {/**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* https://raw.github.com/facebook/regenerator/master/LICENSE file. An
* additional grant of patent rights can be found in the PATENTS file in
* the same directory.
*/
!(function(global) {
"use strict";
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
var undefined; // More compressible than void 0.
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
var inModule = typeof module === "object";
var runtime = global.regeneratorRuntime;
if (runtime) {
if (inModule) {
// If regeneratorRuntime is defined globally and we're in a module,
// make the exports object identical to regeneratorRuntime.
module.exports = runtime;
}
// Don't bother evaluating the rest of this file if the runtime was
// already defined globally.
return;
}
// Define the runtime globally (as expected by generated code) as either
// module.exports (if we're in a module) or a new, empty object.
runtime = global.regeneratorRuntime = inModule ? module.exports : {};
function wrap(innerFn, outerFn, self, tryLocsList) {
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
var context = new Context(tryLocsList || []);
// The ._invoke method unifies the implementations of the .next,
// .throw, and .return methods.
generator._invoke = makeInvokeMethod(innerFn, self, context);
return generator;
}
runtime.wrap = wrap;
// Try/catch helper to minimize deoptimizations. Returns a completion
// record like context.tryEntries[i].completion. This interface could
// have been (and was previously) designed to take a closure to be
// invoked without arguments, but in all the cases we care about we
// already have an existing method we want to call, so there's no need
// to create a new function object. We can even get away with assuming
// the method takes exactly one argument, since that happens to be true
// in every case, so we don't have to touch the arguments object. The
// only additional allocation required is the completion record, which
// has a stable shape and so hopefully should be cheap to allocate.
function tryCatch(fn, obj, arg) {
try {
return { type: "normal", arg: fn.call(obj, arg) };
} catch (err) {
return { type: "throw", arg: err };
}
}
var GenStateSuspendedStart = "suspendedStart";
var GenStateSuspendedYield = "suspendedYield";
var GenStateExecuting = "executing";
var GenStateCompleted = "completed";
// Returning this object from the innerFn has the same effect as
// breaking out of the dispatch switch statement.
var ContinueSentinel = {};
// Dummy constructor functions that we use as the .constructor and
// .constructor.prototype properties for functions that return Generator
// objects. For full spec compliance, you may wish to configure your
// minifier not to mangle the names of these two functions.
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
// This is a polyfill for %IteratorPrototype% for environments that
// don't natively support it.
var IteratorPrototype = {};
IteratorPrototype[iteratorSymbol] = function () {
return this;
};
var getProto = Object.getPrototypeOf;
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
if (NativeIteratorPrototype &&
NativeIteratorPrototype !== Op &&
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
// This environment has a native %IteratorPrototype%; use it instead
// of the polyfill.
IteratorPrototype = NativeIteratorPrototype;
}
var Gp = GeneratorFunctionPrototype.prototype =
Generator.prototype = Object.create(IteratorPrototype);
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
GeneratorFunctionPrototype[toStringTagSymbol] =
GeneratorFunction.displayName = "GeneratorFunction";
// Helper for defining the .next, .throw, and .return methods of the
// Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) {
["next", "throw", "return"].forEach(function(method) {
prototype[method] = function(arg) {
return this._invoke(method, arg);
};
});
}
runtime.isGeneratorFunction = function(genFun) {
var ctor = typeof genFun === "function" && genFun.constructor;
return ctor
? ctor === GeneratorFunction ||
// For the native GeneratorFunction constructor, the best we can
// do is to check its .name property.
(ctor.displayName || ctor.name) === "GeneratorFunction"
: false;
};
runtime.mark = function(genFun) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
} else {
genFun.__proto__ = GeneratorFunctionPrototype;
if (!(toStringTagSymbol in genFun)) {
genFun[toStringTagSymbol] = "GeneratorFunction";
}
}
genFun.prototype = Object.create(Gp);
return genFun;
};
// Within the body of any async function, `await x` is transformed to
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
// `hasOwn.call(value, "__await")` to determine if the yielded value is
// meant to be awaited.
runtime.awrap = function(arg) {
return { __await: arg };
};
function AsyncIterator(generator) {
function invoke(method, arg, resolve, reject) {
var record = tryCatch(generator[method], generator, arg);
if (record.type === "throw") {
reject(record.arg);
} else {
var result = record.arg;
var value = result.value;
if (value &&
typeof value === "object" &&
hasOwn.call(value, "__await")) {
return Promise.resolve(value.__await).then(function(value) {
invoke("next", value, resolve, reject);
}, function(err) {
invoke("throw", err, resolve, reject);
});
}
return Promise.resolve(value).then(function(unwrapped) {
// When a yielded Promise is resolved, its final value becomes
// the .value of the Promise<{value,done}> result for the
// current iteration. If the Promise is rejected, however, the
// result for this iteration will be rejected with the same
// reason. Note that rejections of yielded Promises are not
// thrown back into the generator function, as is the case
// when an awaited Promise is rejected. This difference in
// behavior between yield and await is important, because it
// allows the consumer to decide what to do with the yielded
// rejection (swallow it and continue, manually .throw it back
// into the generator, abandon iteration, whatever). With
// await, by contrast, there is no opportunity to examine the
// rejection reason outside the generator function, so the
// only option is to throw it from the await expression, and
// let the generator function handle the exception.
result.value = unwrapped;
resolve(result);
}, reject);
}
}
if (typeof global.process === "object" && global.process.domain) {
invoke = global.process.domain.bind(invoke);
}
var previousPromise;
function enqueue(method, arg) {
function callInvokeWithMethodAndArg() {
return new Promise(function(resolve, reject) {
invoke(method, arg, resolve, reject);
});
}
return previousPromise =
// If enqueue has been called before, then we want to wait until
// all previous Promises have been resolved before calling invoke,
// so that results are always delivered in the correct order. If
// enqueue has not been called before, then it is important to
// call invoke immediately, without waiting on a callback to fire,
// so that the async generator function has the opportunity to do
// any necessary setup in a predictable way. This predictability
// is why the Promise constructor synchronously invokes its
// executor callback, and why async functions synchronously
// execute code before the first await. Since we implement simple
// async functions in terms of async generators, it is especially
// important to get this right, even though it requires care.
previousPromise ? previousPromise.then(
callInvokeWithMethodAndArg,
// Avoid propagating failures to Promises returned by later
// invocations of the iterator.
callInvokeWithMethodAndArg
) : callInvokeWithMethodAndArg();
}
// Define the unified helper method that is used to implement .next,
// .throw, and .return (see defineIteratorMethods).
this._invoke = enqueue;
}
defineIteratorMethods(AsyncIterator.prototype);
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
return this;
};
runtime.AsyncIterator = AsyncIterator;
// Note that simple async functions are implemented on top of
// AsyncIterator objects; they just return a Promise for the value of
// the final result produced by the iterator.
runtime.async = function(innerFn, outerFn, self, tryLocsList) {
var iter = new AsyncIterator(
wrap(innerFn, outerFn, self, tryLocsList)
);
return runtime.isGeneratorFunction(outerFn)
? iter // If outerFn is a generator, return the full iterator.
: iter.next().then(function(result) {
return result.done ? result.value : iter.next();
});
};
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
if (state === GenStateCompleted) {
if (method === "throw") {
throw arg;
}
// Be forgiving, per 25.3.3.3.3 of the spec:
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
return doneResult();
}
context.method = method;
context.arg = arg;
while (true) {
var delegate = context.delegate;
if (delegate) {
var delegateResult = maybeInvokeDelegate(delegate, context);
if (delegateResult) {
if (delegateResult === ContinueSentinel) continue;
return delegateResult;
}
}
if (context.method === "next") {
// Setting context._sent for legacy support of Babel's
// function.sent implementation.
context.sent = context._sent = context.arg;
} else if (context.method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
throw context.arg;
}
context.dispatchException(context.arg);
} else if (context.method === "return") {
context.abrupt("return", context.arg);
}
state = GenStateExecuting;
var record = tryCatch(innerFn, self, context);
if (record.type === "normal") {
// If an exception is thrown from innerFn, we leave state ===
// GenStateExecuting and loop back for another invocation.
state = context.done
? GenStateCompleted
: GenStateSuspendedYield;
if (record.arg === ContinueSentinel) {
continue;
}
return {
value: record.arg,
done: context.done
};
} else if (record.type === "throw") {
state = GenStateCompleted;
// Dispatch the exception by looping back around to the
// context.dispatchException(context.arg) call above.
context.method = "throw";
context.arg = record.arg;
}
}
};
}
// Call delegate.iterator[context.method](context.arg) and handle the
// result, either by returning a { value, done } result from the
// delegate iterator, or by modifying context.method and context.arg,
// setting context.delegate to null, and returning the ContinueSentinel.
function maybeInvokeDelegate(delegate, context) {
var method = delegate.iterator[context.method];
if (method === undefined) {
// A .throw or .return when the delegate iterator has no .throw
// method always terminates the yield* loop.
context.delegate = null;
if (context.method === "throw") {
if (delegate.iterator.return) {
// If the delegate iterator has a return method, give it a
// chance to clean up.
context.method = "return";
context.arg = undefined;
maybeInvokeDelegate(delegate, context);
if (context.method === "throw") {
// If maybeInvokeDelegate(context) changed context.method from
// "return" to "throw", let that override the TypeError below.
return ContinueSentinel;
}
}
context.method = "throw";
context.arg = new TypeError(
"The iterator does not provide a 'throw' method");
}
return ContinueSentinel;
}
var record = tryCatch(method, delegate.iterator, context.arg);
if (record.type === "throw") {
context.method = "throw";
context.arg = record.arg;
context.delegate = null;
return ContinueSentinel;
}
var info = record.arg;
if (! info) {
context.method = "throw";
context.arg = new TypeError("iterator result is not an object");
context.delegate = null;
return ContinueSentinel;
}
if (info.done) {
// Assign the result of the finished delegate to the temporary
// variable specified by delegate.resultName (see delegateYield).
context[delegate.resultName] = info.value;
// Resume execution at the desired location (see delegateYield).
context.next = delegate.nextLoc;
// If context.method was "throw" but the delegate handled the
// exception, let the outer generator proceed normally. If
// context.method was "next", forget context.arg since it has been
// "consumed" by the delegate iterator. If context.method was
// "return", allow the original .return call to continue in the
// outer generator.
if (context.method !== "return") {
context.method = "next";
context.arg = undefined;
}
} else {
// Re-yield the result returned by the delegate method.
return info;
}
// The delegate iterator is finished, so forget it and continue with
// the outer generator.
context.delegate = null;
return ContinueSentinel;
}
// Define Generator.prototype.{next,throw,return} in terms of the
// unified ._invoke helper method.
defineIteratorMethods(Gp);
Gp[toStringTagSymbol] = "Generator";
// A Generator should always return itself as the iterator object when the
// @@iterator function is called on it. Some browsers' implementations of the
// iterator prototype chain incorrectly implement this, causing the Generator
// object to not be returned from this call. This ensures that doesn't happen.
// See https://github.com/facebook/regenerator/issues/274 for more details.
Gp[iteratorSymbol] = function() {
return this;
};
Gp.toString = function() {
return "[object Generator]";
};
function pushTryEntry(locs) {
var entry = { tryLoc: locs[0] };
if (1 in locs) {
entry.catchLoc = locs[1];
}
if (2 in locs) {
entry.finallyLoc = locs[2];
entry.afterLoc = locs[3];
}
this.tryEntries.push(entry);
}
function resetTryEntry(entry) {
var record = entry.completion || {};
record.type = "normal";
delete record.arg;
entry.completion = record;
}
function Context(tryLocsList) {
// The root entry object (effectively a try statement without a catch
// or a finally block) gives us a place to store values thrown from
// locations where there is no enclosing try statement.
this.tryEntries = [{ tryLoc: "root" }];
tryLocsList.forEach(pushTryEntry, this);
this.reset(true);
}
runtime.keys = function(object) {
var keys = [];
for (var key in object) {
keys.push(key);
}
keys.reverse();
// Rather than returning an object with a next method, we keep
// things simple and return the next function itself.
return function next() {
while (keys.length) {
var key = keys.pop();
if (key in object) {
next.value = key;
next.done = false;
return next;
}
}
// To avoid creating an additional object, we just hang the .value
// and .done properties off the next function object itself. This
// also ensures that the minifier will not anonymize the function.
next.done = true;
return next;
};
};
function values(iterable) {
if (iterable) {
var iteratorMethod = iterable[iteratorSymbol];
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
var i = -1, next = function next() {
while (++i < iterable.length) {
if (hasOwn.call(iterable, i)) {
next.value = iterable[i];
next.done = false;
return next;
}
}
next.value = undefined;
next.done = true;
return next;
};
return next.next = next;
}
}
// Return an iterator with no values.
return { next: doneResult };
}
runtime.values = values;
function doneResult() {
return { value: undefined, done: true };
}
Context.prototype = {
constructor: Context,
reset: function(skipTempReset) {
this.prev = 0;
this.next = 0;
// Resetting context._sent for legacy support of Babel's
// function.sent implementation.
this.sent = this._sent = undefined;
this.done = false;
this.delegate = null;
this.method = "next";
this.arg = undefined;
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
for (var name in this) {
// Not sure about the optimal order of these conditions:
if (name.charAt(0) === "t" &&
hasOwn.call(this, name) &&
!isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
}
},
stop: function() {
this.done = true;
var rootEntry = this.tryEntries[0];
var rootRecord = rootEntry.completion;
if (rootRecord.type === "throw") {
throw rootRecord.arg;
}
return this.rval;
},
dispatchException: function(exception) {
if (this.done) {
throw exception;
}
var context = this;
function handle(loc, caught) {
record.type = "throw";
record.arg = exception;
context.next = loc;
if (caught) {
// If the dispatched exception was caught by a catch block,
// then let that catch block handle the exception normally.
context.method = "next";
context.arg = undefined;
}
return !! caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
var record = entry.completion;
if (entry.tryLoc === "root") {
// Exception thrown outside of any try block that could handle
// it, so set the completion value of the entire function to
// throw the exception.
return handle("end");
}
if (entry.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc");
var hasFinally = hasOwn.call(entry, "finallyLoc");
if (hasCatch && hasFinally) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
} else if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else if (hasCatch) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
} else if (hasFinally) {
if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else {
throw new Error("try statement without catch or finally");
}
}
}
},
abrupt: function(type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc <= this.prev &&
hasOwn.call(entry, "finallyLoc") &&
this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
}
if (finallyEntry &&
(type === "break" ||
type === "continue") &&
finallyEntry.tryLoc <= arg &&
arg <= finallyEntry.finallyLoc) {
// Ignore the finally entry if control is not jumping to a
// location outside the try/catch block.
finallyEntry = null;
}
var record = finallyEntry ? finallyEntry.completion : {};
record.type = type;
record.arg = arg;
if (finallyEntry) {
this.method = "next";
this.next = finallyEntry.finallyLoc;
return ContinueSentinel;
}
return this.complete(record);
},
complete: function(record, afterLoc) {
if (record.type === "throw") {
throw record.arg;
}
if (record.type === "break" ||
record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
this.rval = this.arg = record.arg;
this.method = "return";
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
return ContinueSentinel;
},
finish: function(finallyLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.finallyLoc === finallyLoc) {
this.complete(entry.completion, entry.afterLoc);
resetTryEntry(entry);
return ContinueSentinel;
}
}
},
"catch": function(tryLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc === tryLoc) {
var record = entry.completion;
if (record.type === "throw") {
var thrown = record.arg;
resetTryEntry(entry);
}
return thrown;
}
}
// The context.catch method must only be called with a location
// argument that corresponds to a known catch block.
throw new Error("illegal catch attempt");
},
delegateYield: function(iterable, resultName, nextLoc) {
this.delegate = {
iterator: values(iterable),
resultName: resultName,
nextLoc: nextLoc
};
if (this.method === "next") {
// Deliberately forget the last sent value so that we don't
// accidentally pass it on to the delegate.
this.arg = undefined;
}
return ContinueSentinel;
}
};
})(
// Among the various tricks for obtaining a reference to the global
// object, this seems to be the most reliable technique that does not
// use indirect eval (which violates Content Security Policy).
typeof global === "object" ? global :
typeof window === "object" ? window :
typeof self === "object" ? self : this
);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(75)))
/***/ }),
/* 531 */
/***/ (function(module, exports, __webpack_require__) {
var $iterators = __webpack_require__(167);
var getKeys = __webpack_require__(72);
var redefine = __webpack_require__(31);
var global = __webpack_require__(9);
var hide = __webpack_require__(32);
var Iterators = __webpack_require__(82);
var wks = __webpack_require__(13);
var ITERATOR = wks('iterator');
var TO_STRING_TAG = wks('toStringTag');
var ArrayValues = Iterators.Array;
var DOMIterables = {
CSSRuleList: true, // TODO: Not spec compliant, should be false.
CSSStyleDeclaration: false,
CSSValueList: false,
ClientRectList: false,
DOMRectList: false,
DOMStringList: false,
DOMTokenList: true,
DataTransferItemList: false,
FileList: false,
HTMLAllCollection: false,
HTMLCollection: false,
HTMLFormElement: false,
HTMLSelectElement: false,
MediaList: true, // TODO: Not spec compliant, should be false.
MimeTypeArray: false,
NamedNodeMap: false,
NodeList: true,
PaintRequestList: false,
Plugin: false,
PluginArray: false,
SVGLengthList: false,
SVGNumberList: false,
SVGPathSegList: false,
SVGPointList: false,
SVGStringList: false,
SVGTransformList: false,
SourceBufferList: false,
StyleSheetList: true, // TODO: Not spec compliant, should be false.
TextTrackCueList: false,
TextTrackList: false,
TouchList: false
};
for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
var NAME = collections[i];
var explicit = DOMIterables[NAME];
var Collection = global[NAME];
var proto = Collection && Collection.prototype;
var key;
if (proto) {
if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
Iterators[NAME] = ArrayValues;
if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
}
}
/***/ }),
/* 532 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
var $task = __webpack_require__(166);
$export($export.G + $export.B, {
setImmediate: $task.set,
clearImmediate: $task.clear
});
/***/ }),
/* 533 */
/***/ (function(module, exports, __webpack_require__) {
// ie9- setTimeout & setInterval additional parameters fix
var global = __webpack_require__(9);
var $export = __webpack_require__(1);
var userAgent = __webpack_require__(114);
var slice = [].slice;
var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
var wrap = function (set) {
return function (fn, time /* , ...args */) {
var boundArgs = arguments.length > 2;
var args = boundArgs ? slice.call(arguments, 2) : false;
return set(boundArgs ? function () {
// eslint-disable-next-line no-new-func
(typeof fn == 'function' ? fn : Function(fn)).apply(this, args);
} : fn, time);
};
};
$export($export.G + $export.B + $export.F * MSIE, {
setTimeout: wrap(global.setTimeout),
setInterval: wrap(global.setInterval)
});
/***/ }),
/* 534 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/zenparsing/es-observable
var $export = __webpack_require__(1);
var global = __webpack_require__(9);
var core = __webpack_require__(43);
var microtask = __webpack_require__(165)();
var OBSERVABLE = __webpack_require__(13)('observable');
var aFunction = __webpack_require__(27);
var anObject = __webpack_require__(8);
var anInstance = __webpack_require__(67);
var redefineAll = __webpack_require__(65);
var hide = __webpack_require__(32);
var forOf = __webpack_require__(66);
var RETURN = forOf.RETURN;
var getMethod = function (fn) {
return fn == null ? undefined : aFunction(fn);
};
var cleanupSubscription = function (subscription) {
var cleanup = subscription._c;
if (cleanup) {
subscription._c = undefined;
cleanup();
}
};
var subscriptionClosed = function (subscription) {
return subscription._o === undefined;
};
var closeSubscription = function (subscription) {
if (!subscriptionClosed(subscription)) {
subscription._o = undefined;
cleanupSubscription(subscription);
}
};
var Subscription = function (observer, subscriber) {
anObject(observer);
this._c = undefined;
this._o = observer;
observer = new SubscriptionObserver(this);
try {
var cleanup = subscriber(observer);
var subscription = cleanup;
if (cleanup != null) {
if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); };
else aFunction(cleanup);
this._c = cleanup;
}
} catch (e) {
observer.error(e);
return;
} if (subscriptionClosed(this)) cleanupSubscription(this);
};
Subscription.prototype = redefineAll({}, {
unsubscribe: function unsubscribe() { closeSubscription(this); }
});
var SubscriptionObserver = function (subscription) {
this._s = subscription;
};
SubscriptionObserver.prototype = redefineAll({}, {
next: function next(value) {
var subscription = this._s;
if (!subscriptionClosed(subscription)) {
var observer = subscription._o;
try {
var m = getMethod(observer.next);
if (m) return m.call(observer, value);
} catch (e) {
try {
closeSubscription(subscription);
} finally {
throw e;
}
}
}
},
error: function error(value) {
var subscription = this._s;
if (subscriptionClosed(subscription)) throw value;
var observer = subscription._o;
subscription._o = undefined;
try {
var m = getMethod(observer.error);
if (!m) throw value;
value = m.call(observer, value);
} catch (e) {
try {
cleanupSubscription(subscription);
} finally {
throw e;
}
} cleanupSubscription(subscription);
return value;
},
complete: function complete(value) {
var subscription = this._s;
if (!subscriptionClosed(subscription)) {
var observer = subscription._o;
subscription._o = undefined;
try {
var m = getMethod(observer.complete);
value = m ? m.call(observer, value) : undefined;
} catch (e) {
try {
cleanupSubscription(subscription);
} finally {
throw e;
}
} cleanupSubscription(subscription);
return value;
}
}
});
var $Observable = function Observable(subscriber) {
anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
};
redefineAll($Observable.prototype, {
subscribe: function subscribe(observer) {
return new Subscription(observer, this._f);
},
forEach: function forEach(fn) {
var that = this;
return new (core.Promise || global.Promise)(function (resolve, reject) {
aFunction(fn);
var subscription = that.subscribe({
next: function (value) {
try {
return fn(value);
} catch (e) {
reject(e);
subscription.unsubscribe();
}
},
error: reject,
complete: resolve
});
});
}
});
redefineAll($Observable, {
from: function from(x) {
var C = typeof this === 'function' ? this : $Observable;
var method = getMethod(anObject(x)[OBSERVABLE]);
if (method) {
var observable = anObject(method.call(x));
return observable.constructor === C ? observable : new C(function (observer) {
return observable.subscribe(observer);
});
}
return new C(function (observer) {
var done = false;
microtask(function () {
if (!done) {
try {
if (forOf(x, false, function (it) {
observer.next(it);
if (done) return RETURN;
}) === RETURN) return;
} catch (e) {
if (done) throw e;
observer.error(e);
return;
} observer.complete();
}
});
return function () { done = true; };
});
},
of: function of() {
for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++];
return new (typeof this === 'function' ? this : $Observable)(function (observer) {
var done = false;
microtask(function () {
if (!done) {
for (var j = 0; j < items.length; ++j) {
observer.next(items[j]);
if (done) return;
} observer.complete();
}
});
return function () { done = true; };
});
}
});
hide($Observable.prototype, OBSERVABLE, function () { return this; });
$export($export.G, { Observable: $Observable });
__webpack_require__(68)('Observable');
/***/ }),
/* 535 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
var $export = __webpack_require__(1);
var microtask = __webpack_require__(165)();
var process = __webpack_require__(9).process;
var isNode = __webpack_require__(41)(process) == 'process';
$export($export.G, {
asap: function asap(fn) {
var domain = isNode && process.domain;
microtask(domain ? domain.bind(fn) : fn);
}
});
/***/ }),
/* 536 */
/***/ (function(module, exports, __webpack_require__) {
var $metadata = __webpack_require__(52);
var anObject = __webpack_require__(8);
var aFunction = __webpack_require__(27);
var toMetaKey = $metadata.key;
var ordinaryDefineOwnMetadata = $metadata.set;
$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {
return function decorator(target, targetKey) {
ordinaryDefineOwnMetadata(
metadataKey, metadataValue,
(targetKey !== undefined ? anObject : aFunction)(target),
toMetaKey(targetKey)
);
};
} });
/***/ }),
/* 537 */
/***/ (function(module, exports, __webpack_require__) {
var metadata = __webpack_require__(52);
var anObject = __webpack_require__(8);
var ordinaryHasOwnMetadata = metadata.has;
var toMetaKey = metadata.key;
metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {
return ordinaryHasOwnMetadata(metadataKey, anObject(target)
, arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });
/***/ }),
/* 538 */
/***/ (function(module, exports, __webpack_require__) {
var metadata = __webpack_require__(52);
var anObject = __webpack_require__(8);
var getPrototypeOf = __webpack_require__(35);
var ordinaryHasOwnMetadata = metadata.has;
var toMetaKey = metadata.key;
var ordinaryHasMetadata = function (MetadataKey, O, P) {
var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
if (hasOwn) return true;
var parent = getPrototypeOf(O);
return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
};
metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {
return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });
/***/ }),
/* 539 */
/***/ (function(module, exports, __webpack_require__) {
var metadata = __webpack_require__(52);
var anObject = __webpack_require__(8);
var ordinaryOwnMetadataKeys = metadata.keys;
var toMetaKey = metadata.key;
metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {
return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
} });
/***/ }),
/* 540 */
/***/ (function(module, exports, __webpack_require__) {
var metadata = __webpack_require__(52);
var anObject = __webpack_require__(8);
var ordinaryGetOwnMetadata = metadata.get;
var toMetaKey = metadata.key;
metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
return ordinaryGetOwnMetadata(metadataKey, anObject(target)
, arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });
/***/ }),
/* 541 */
/***/ (function(module, exports, __webpack_require__) {
var Set = __webpack_require__(252);
var from = __webpack_require__(243);
var metadata = __webpack_require__(52);
var anObject = __webpack_require__(8);
var getPrototypeOf = __webpack_require__(35);
var ordinaryOwnMetadataKeys = metadata.keys;
var toMetaKey = metadata.key;
var ordinaryMetadataKeys = function (O, P) {
var oKeys = ordinaryOwnMetadataKeys(O, P);
var parent = getPrototypeOf(O);
if (parent === null) return oKeys;
var pKeys = ordinaryMetadataKeys(parent, P);
return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
};
metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {
return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
} });
/***/ }),
/* 542 */
/***/ (function(module, exports, __webpack_require__) {
var metadata = __webpack_require__(52);
var anObject = __webpack_require__(8);
var getPrototypeOf = __webpack_require__(35);
var ordinaryHasOwnMetadata = metadata.has;
var ordinaryGetOwnMetadata = metadata.get;
var toMetaKey = metadata.key;
var ordinaryGetMetadata = function (MetadataKey, O, P) {
var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);
var parent = getPrototypeOf(O);
return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
};
metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {
return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });
/***/ }),
/* 543 */
/***/ (function(module, exports, __webpack_require__) {
var metadata = __webpack_require__(52);
var anObject = __webpack_require__(8);
var toMetaKey = metadata.key;
var getOrCreateMetadataMap = metadata.map;
var store = metadata.store;
metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {
var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]);
var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;
if (metadataMap.size) return true;
var targetMetadata = store.get(target);
targetMetadata['delete'](targetKey);
return !!targetMetadata.size || store['delete'](target);
} });
/***/ }),
/* 544 */
/***/ (function(module, exports, __webpack_require__) {
var metadata = __webpack_require__(52);
var anObject = __webpack_require__(8);
var toMetaKey = metadata.key;
var ordinaryDefineOwnMetadata = metadata.set;
metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) {
ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
} });
/***/ }),
/* 545 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-promise-try
var $export = __webpack_require__(1);
var newPromiseCapability = __webpack_require__(164);
var perform = __webpack_require__(256);
$export($export.S, 'Promise', { 'try': function (callbackfn) {
var promiseCapability = newPromiseCapability.f(this);
var result = perform(callbackfn);
(result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
return promiseCapability.promise;
} });
/***/ }),
/* 546 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-promise-finally
var $export = __webpack_require__(1);
var core = __webpack_require__(43);
var global = __webpack_require__(9);
var speciesConstructor = __webpack_require__(115);
var promiseResolve = __webpack_require__(255);
$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
var C = speciesConstructor(this, core.Promise || global.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
);
} });
/***/ }),
/* 547 */
/***/ (function(module, exports, __webpack_require__) {
// http://jfbastien.github.io/papers/Math.signbit.html
var $export = __webpack_require__(1);
$export($export.S, 'Math', { signbit: function signbit(x) {
// eslint-disable-next-line no-self-compare
return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0;
} });
/***/ }),
/* 548 */
/***/ (function(module, exports, __webpack_require__) {
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = __webpack_require__(1);
$export($export.S, 'Math', {
umulh: function umulh(u, v) {
var UINT16 = 0xffff;
var $u = +u;
var $v = +v;
var u0 = $u & UINT16;
var v0 = $v & UINT16;
var u1 = $u >>> 16;
var v1 = $v >>> 16;
var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
}
});
/***/ }),
/* 549 */
/***/ (function(module, exports, __webpack_require__) {
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(1);
$export($export.S, 'Math', { scale: __webpack_require__(242) });
/***/ }),
/* 550 */
/***/ (function(module, exports, __webpack_require__) {
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(1);
var DEG_PER_RAD = Math.PI / 180;
$export($export.S, 'Math', {
radians: function radians(degrees) {
return degrees * DEG_PER_RAD;
}
});
/***/ }),
/* 551 */
/***/ (function(module, exports, __webpack_require__) {
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(1);
$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI });
/***/ }),
/* 552 */
/***/ (function(module, exports, __webpack_require__) {
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = __webpack_require__(1);
$export($export.S, 'Math', {
imulh: function imulh(u, v) {
var UINT16 = 0xffff;
var $u = +u;
var $v = +v;
var u0 = $u & UINT16;
var v0 = $v & UINT16;
var u1 = $u >> 16;
var v1 = $v >> 16;
var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
}
});
/***/ }),
/* 553 */
/***/ (function(module, exports, __webpack_require__) {
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = __webpack_require__(1);
$export($export.S, 'Math', {
isubh: function isubh(x0, x1, y0, y1) {
var $x0 = x0 >>> 0;
var $x1 = x1 >>> 0;
var $y0 = y0 >>> 0;
return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
}
});
/***/ }),
/* 554 */
/***/ (function(module, exports, __webpack_require__) {
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = __webpack_require__(1);
$export($export.S, 'Math', {
iaddh: function iaddh(x0, x1, y0, y1) {
var $x0 = x0 >>> 0;
var $x1 = x1 >>> 0;
var $y0 = y0 >>> 0;
return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
}
});
/***/ }),
/* 555 */
/***/ (function(module, exports, __webpack_require__) {
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(1);
var scale = __webpack_require__(242);
var fround = __webpack_require__(262);
$export($export.S, 'Math', {
fscale: function fscale(x, inLow, inHigh, outLow, outHigh) {
return fround(scale(x, inLow, inHigh, outLow, outHigh));
}
});
/***/ }),
/* 556 */
/***/ (function(module, exports, __webpack_require__) {
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(1);
var RAD_PER_DEG = 180 / Math.PI;
$export($export.S, 'Math', {
degrees: function degrees(radians) {
return radians * RAD_PER_DEG;
}
});
/***/ }),
/* 557 */
/***/ (function(module, exports, __webpack_require__) {
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(1);
$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 });
/***/ }),
/* 558 */
/***/ (function(module, exports, __webpack_require__) {
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(1);
$export($export.S, 'Math', {
clamp: function clamp(x, lower, upper) {
return Math.min(upper, Math.max(lower, x));
}
});
/***/ }),
/* 559 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/ljharb/proposal-is-error
var $export = __webpack_require__(1);
var cof = __webpack_require__(41);
$export($export.S, 'Error', {
isError: function isError(it) {
return cof(it) === 'Error';
}
});
/***/ }),
/* 560 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-global
var $export = __webpack_require__(1);
$export($export.S, 'System', { global: __webpack_require__(9) });
/***/ }),
/* 561 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-global
var $export = __webpack_require__(1);
$export($export.G, { global: __webpack_require__(9) });
/***/ }),
/* 562 */
/***/ (function(module, exports, __webpack_require__) {
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from
__webpack_require__(109)('WeakSet');
/***/ }),
/* 563 */
/***/ (function(module, exports, __webpack_require__) {
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
__webpack_require__(109)('WeakMap');
/***/ }),
/* 564 */
/***/ (function(module, exports, __webpack_require__) {
// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
__webpack_require__(109)('Set');
/***/ }),
/* 565 */
/***/ (function(module, exports, __webpack_require__) {
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
__webpack_require__(109)('Map');
/***/ }),
/* 566 */
/***/ (function(module, exports, __webpack_require__) {
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of
__webpack_require__(110)('WeakSet');
/***/ }),
/* 567 */
/***/ (function(module, exports, __webpack_require__) {
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
__webpack_require__(110)('WeakMap');
/***/ }),
/* 568 */
/***/ (function(module, exports, __webpack_require__) {
// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
__webpack_require__(110)('Set');
/***/ }),
/* 569 */
/***/ (function(module, exports, __webpack_require__) {
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
__webpack_require__(110)('Map');
/***/ }),
/* 570 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = __webpack_require__(1);
$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(244)('Set') });
/***/ }),
/* 571 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = __webpack_require__(1);
$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(244)('Map') });
/***/ }),
/* 572 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var toObject = __webpack_require__(25);
var toPrimitive = __webpack_require__(50);
var getPrototypeOf = __webpack_require__(35);
var getOwnPropertyDescriptor = __webpack_require__(36).f;
// B.2.2.5 Object.prototype.__lookupSetter__(P)
__webpack_require__(21) && $export($export.P + __webpack_require__(111), 'Object', {
__lookupSetter__: function __lookupSetter__(P) {
var O = toObject(this);
var K = toPrimitive(P, true);
var D;
do {
if (D = getOwnPropertyDescriptor(O, K)) return D.set;
} while (O = getPrototypeOf(O));
}
});
/***/ }),
/* 573 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var toObject = __webpack_require__(25);
var toPrimitive = __webpack_require__(50);
var getPrototypeOf = __webpack_require__(35);
var getOwnPropertyDescriptor = __webpack_require__(36).f;
// B.2.2.4 Object.prototype.__lookupGetter__(P)
__webpack_require__(21) && $export($export.P + __webpack_require__(111), 'Object', {
__lookupGetter__: function __lookupGetter__(P) {
var O = toObject(this);
var K = toPrimitive(P, true);
var D;
do {
if (D = getOwnPropertyDescriptor(O, K)) return D.get;
} while (O = getPrototypeOf(O));
}
});
/***/ }),
/* 574 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var toObject = __webpack_require__(25);
var aFunction = __webpack_require__(27);
var $defineProperty = __webpack_require__(20);
// B.2.2.3 Object.prototype.__defineSetter__(P, setter)
__webpack_require__(21) && $export($export.P + __webpack_require__(111), 'Object', {
__defineSetter__: function __defineSetter__(P, setter) {
$defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });
}
});
/***/ }),
/* 575 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var toObject = __webpack_require__(25);
var aFunction = __webpack_require__(27);
var $defineProperty = __webpack_require__(20);
// B.2.2.2 Object.prototype.__defineGetter__(P, getter)
__webpack_require__(21) && $export($export.P + __webpack_require__(111), 'Object', {
__defineGetter__: function __defineGetter__(P, getter) {
$defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });
}
});
/***/ }),
/* 576 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__(1);
var $entries = __webpack_require__(245)(true);
$export($export.S, 'Object', {
entries: function entries(it) {
return $entries(it);
}
});
/***/ }),
/* 577 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__(1);
var $values = __webpack_require__(245)(false);
$export($export.S, 'Object', {
values: function values(it) {
return $values(it);
}
});
/***/ }),
/* 578 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-object-getownpropertydescriptors
var $export = __webpack_require__(1);
var ownKeys = __webpack_require__(248);
var toIObject = __webpack_require__(37);
var gOPD = __webpack_require__(36);
var createProperty = __webpack_require__(171);
$export($export.S, 'Object', {
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
var O = toIObject(object);
var getDesc = gOPD.f;
var keys = ownKeys(O);
var result = {};
var i = 0;
var key, desc;
while (keys.length > i) {
desc = getDesc(O, key = keys[i++]);
if (desc !== undefined) createProperty(result, key, desc);
}
return result;
}
});
/***/ }),
/* 579 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(187)('observable');
/***/ }),
/* 580 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(187)('asyncIterator');
/***/ }),
/* 581 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.github.io/String.prototype.matchAll/
var $export = __webpack_require__(1);
var defined = __webpack_require__(49);
var toLength = __webpack_require__(19);
var isRegExp = __webpack_require__(119);
var getFlags = __webpack_require__(117);
var RegExpProto = RegExp.prototype;
var $RegExpStringIterator = function (regexp, string) {
this._r = regexp;
this._s = string;
};
__webpack_require__(175)($RegExpStringIterator, 'RegExp String', function next() {
var match = this._r.exec(this._s);
return { value: match, done: match === null };
});
$export($export.P, 'String', {
matchAll: function matchAll(regexp) {
defined(this);
if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!');
var S = String(this);
var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp);
var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
rx.lastIndex = toLength(regexp.lastIndex);
return new $RegExpStringIterator(rx, S);
}
});
/***/ }),
/* 582 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
__webpack_require__(83)('trimRight', function ($trim) {
return function trimRight() {
return $trim(this, 2);
};
}, 'trimEnd');
/***/ }),
/* 583 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
__webpack_require__(83)('trimLeft', function ($trim) {
return function trimLeft() {
return $trim(this, 1);
};
}, 'trimStart');
/***/ }),
/* 584 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-string-pad-start-end
var $export = __webpack_require__(1);
var $pad = __webpack_require__(246);
var userAgent = __webpack_require__(114);
// https://github.com/zloirock/core-js/issues/280
$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
}
});
/***/ }),
/* 585 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-string-pad-start-end
var $export = __webpack_require__(1);
var $pad = __webpack_require__(246);
var userAgent = __webpack_require__(114);
// https://github.com/zloirock/core-js/issues/280
$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
padStart: function padStart(maxLength /* , fillString = ' ' */) {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
}
});
/***/ }),
/* 586 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/mathiasbynens/String.prototype.at
var $export = __webpack_require__(1);
var $at = __webpack_require__(177)(true);
$export($export.P, 'String', {
at: function at(pos) {
return $at(this, pos);
}
});
/***/ }),
/* 587 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten
var $export = __webpack_require__(1);
var flattenIntoArray = __webpack_require__(247);
var toObject = __webpack_require__(25);
var toLength = __webpack_require__(19);
var toInteger = __webpack_require__(48);
var arraySpeciesCreate = __webpack_require__(169);
$export($export.P, 'Array', {
flatten: function flatten(/* depthArg = 1 */) {
var depthArg = arguments[0];
var O = toObject(this);
var sourceLen = toLength(O.length);
var A = arraySpeciesCreate(O, 0);
flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
return A;
}
});
__webpack_require__(58)('flatten');
/***/ }),
/* 588 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
var $export = __webpack_require__(1);
var flattenIntoArray = __webpack_require__(247);
var toObject = __webpack_require__(25);
var toLength = __webpack_require__(19);
var aFunction = __webpack_require__(27);
var arraySpeciesCreate = __webpack_require__(169);
$export($export.P, 'Array', {
flatMap: function flatMap(callbackfn /* , thisArg */) {
var O = toObject(this);
var sourceLen, A;
aFunction(callbackfn);
sourceLen = toLength(O.length);
A = arraySpeciesCreate(O, 0);
flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);
return A;
}
});
__webpack_require__(58)('flatMap');
/***/ }),
/* 589 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/Array.prototype.includes
var $export = __webpack_require__(1);
var $includes = __webpack_require__(122)(true);
$export($export.P, 'Array', {
includes: function includes(el /* , fromIndex = 0 */) {
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__(58)('includes');
/***/ }),
/* 590 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.14 Reflect.setPrototypeOf(target, proto)
var $export = __webpack_require__(1);
var setProto = __webpack_require__(183);
if (setProto) $export($export.S, 'Reflect', {
setPrototypeOf: function setPrototypeOf(target, proto) {
setProto.check(target, proto);
try {
setProto.set(target, proto);
return true;
} catch (e) {
return false;
}
}
});
/***/ }),
/* 591 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
var dP = __webpack_require__(20);
var gOPD = __webpack_require__(36);
var getPrototypeOf = __webpack_require__(35);
var has = __webpack_require__(38);
var $export = __webpack_require__(1);
var createDesc = __webpack_require__(74);
var anObject = __webpack_require__(8);
var isObject = __webpack_require__(12);
function set(target, propertyKey, V /* , receiver */) {
var receiver = arguments.length < 4 ? target : arguments[3];
var ownDesc = gOPD.f(anObject(target), propertyKey);
var existingDescriptor, proto;
if (!ownDesc) {
if (isObject(proto = getPrototypeOf(target))) {
return set(proto, propertyKey, V, receiver);
}
ownDesc = createDesc(0);
}
if (has(ownDesc, 'value')) {
if (ownDesc.writable === false || !isObject(receiver)) return false;
if (existingDescriptor = gOPD.f(receiver, propertyKey)) {
if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
existingDescriptor.value = V;
dP.f(receiver, propertyKey, existingDescriptor);
} else dP.f(receiver, propertyKey, createDesc(0, V));
return true;
}
return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
}
$export($export.S, 'Reflect', { set: set });
/***/ }),
/* 592 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.12 Reflect.preventExtensions(target)
var $export = __webpack_require__(1);
var anObject = __webpack_require__(8);
var $preventExtensions = Object.preventExtensions;
$export($export.S, 'Reflect', {
preventExtensions: function preventExtensions(target) {
anObject(target);
try {
if ($preventExtensions) $preventExtensions(target);
return true;
} catch (e) {
return false;
}
}
});
/***/ }),
/* 593 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.11 Reflect.ownKeys(target)
var $export = __webpack_require__(1);
$export($export.S, 'Reflect', { ownKeys: __webpack_require__(248) });
/***/ }),
/* 594 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.10 Reflect.isExtensible(target)
var $export = __webpack_require__(1);
var anObject = __webpack_require__(8);
var $isExtensible = Object.isExtensible;
$export($export.S, 'Reflect', {
isExtensible: function isExtensible(target) {
anObject(target);
return $isExtensible ? $isExtensible(target) : true;
}
});
/***/ }),
/* 595 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.9 Reflect.has(target, propertyKey)
var $export = __webpack_require__(1);
$export($export.S, 'Reflect', {
has: function has(target, propertyKey) {
return propertyKey in target;
}
});
/***/ }),
/* 596 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.8 Reflect.getPrototypeOf(target)
var $export = __webpack_require__(1);
var getProto = __webpack_require__(35);
var anObject = __webpack_require__(8);
$export($export.S, 'Reflect', {
getPrototypeOf: function getPrototypeOf(target) {
return getProto(anObject(target));
}
});
/***/ }),
/* 597 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
var gOPD = __webpack_require__(36);
var $export = __webpack_require__(1);
var anObject = __webpack_require__(8);
$export($export.S, 'Reflect', {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
return gOPD.f(anObject(target), propertyKey);
}
});
/***/ }),
/* 598 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
var gOPD = __webpack_require__(36);
var getPrototypeOf = __webpack_require__(35);
var has = __webpack_require__(38);
var $export = __webpack_require__(1);
var isObject = __webpack_require__(12);
var anObject = __webpack_require__(8);
function get(target, propertyKey /* , receiver */) {
var receiver = arguments.length < 3 ? target : arguments[2];
var desc, proto;
if (anObject(target) === receiver) return target[propertyKey];
if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
? desc.value
: desc.get !== undefined
? desc.get.call(receiver)
: undefined;
if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
}
$export($export.S, 'Reflect', { get: get });
/***/ }),
/* 599 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 26.1.5 Reflect.enumerate(target)
var $export = __webpack_require__(1);
var anObject = __webpack_require__(8);
var Enumerate = function (iterated) {
this._t = anObject(iterated); // target
this._i = 0; // next index
var keys = this._k = []; // keys
var key;
for (key in iterated) keys.push(key);
};
__webpack_require__(175)(Enumerate, 'Object', function () {
var that = this;
var keys = that._k;
var key;
do {
if (that._i >= keys.length) return { value: undefined, done: true };
} while (!((key = keys[that._i++]) in that._t));
return { value: key, done: false };
});
$export($export.S, 'Reflect', {
enumerate: function enumerate(target) {
return new Enumerate(target);
}
});
/***/ }),
/* 600 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
var $export = __webpack_require__(1);
var gOPD = __webpack_require__(36).f;
var anObject = __webpack_require__(8);
$export($export.S, 'Reflect', {
deleteProperty: function deleteProperty(target, propertyKey) {
var desc = gOPD(anObject(target), propertyKey);
return desc && !desc.configurable ? false : delete target[propertyKey];
}
});
/***/ }),
/* 601 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
var dP = __webpack_require__(20);
var $export = __webpack_require__(1);
var anObject = __webpack_require__(8);
var toPrimitive = __webpack_require__(50);
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
$export($export.S + $export.F * __webpack_require__(11)(function () {
// eslint-disable-next-line no-undef
Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });
}), 'Reflect', {
defineProperty: function defineProperty(target, propertyKey, attributes) {
anObject(target);
propertyKey = toPrimitive(propertyKey, true);
anObject(attributes);
try {
dP.f(target, propertyKey, attributes);
return true;
} catch (e) {
return false;
}
}
});
/***/ }),
/* 602 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
var $export = __webpack_require__(1);
var create = __webpack_require__(70);
var aFunction = __webpack_require__(27);
var anObject = __webpack_require__(8);
var isObject = __webpack_require__(12);
var fails = __webpack_require__(11);
var bind = __webpack_require__(269);
var rConstruct = (__webpack_require__(9).Reflect || {}).construct;
// MS Edge supports only 2 arguments and argumentsList argument is optional
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
var NEW_TARGET_BUG = fails(function () {
function F() { /* empty */ }
return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
});
var ARGS_BUG = !fails(function () {
rConstruct(function () { /* empty */ });
});
$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
construct: function construct(Target, args /* , newTarget */) {
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
if (Target == newTarget) {
// w/o altered newTarget, optimization for 0-4 arguments
switch (args.length) {
case 0: return new Target();
case 1: return new Target(args[0]);
case 2: return new Target(args[0], args[1]);
case 3: return new Target(args[0], args[1], args[2]);
case 4: return new Target(args[0], args[1], args[2], args[3]);
}
// w/o altered newTarget, lot of arguments case
var $args = [null];
$args.push.apply($args, args);
return new (bind.apply(Target, $args))();
}
// with altered newTarget, not support built-in constructors
var proto = newTarget.prototype;
var instance = create(isObject(proto) ? proto : Object.prototype);
var result = Function.apply.call(Target, instance, args);
return isObject(result) ? result : instance;
}
});
/***/ }),
/* 603 */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
var $export = __webpack_require__(1);
var aFunction = __webpack_require__(27);
var anObject = __webpack_require__(8);
var rApply = (__webpack_require__(9).Reflect || {}).apply;
var fApply = Function.apply;
// MS Edge argumentsList argument is optional
$export($export.S + $export.F * !__webpack_require__(11)(function () {
rApply(function () { /* empty */ });
}), 'Reflect', {
apply: function apply(target, thisArgument, argumentsList) {
var T = aFunction(target);
var L = anObject(argumentsList);
return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
}
});
/***/ }),
/* 604 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(53)('Float64', 8, function (init) {
return function Float64Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/* 605 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(53)('Float32', 4, function (init) {
return function Float32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/* 606 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(53)('Uint32', 4, function (init) {
return function Uint32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/* 607 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(53)('Int32', 4, function (init) {
return function Int32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/* 608 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(53)('Uint16', 2, function (init) {
return function Uint16Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/* 609 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(53)('Int16', 2, function (init) {
return function Int16Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/* 610 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(53)('Uint8', 1, function (init) {
return function Uint8ClampedArray(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
}, true);
/***/ }),
/* 611 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(53)('Uint8', 1, function (init) {
return function Uint8Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/* 612 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(53)('Int8', 1, function (init) {
return function Int8Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/* 613 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
$export($export.G + $export.W + $export.F * !__webpack_require__(112).ABV, {
DataView: __webpack_require__(163).DataView
});
/***/ }),
/* 614 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var $typed = __webpack_require__(112);
var buffer = __webpack_require__(163);
var anObject = __webpack_require__(8);
var toAbsoluteIndex = __webpack_require__(71);
var toLength = __webpack_require__(19);
var isObject = __webpack_require__(12);
var ArrayBuffer = __webpack_require__(9).ArrayBuffer;
var speciesConstructor = __webpack_require__(115);
var $ArrayBuffer = buffer.ArrayBuffer;
var $DataView = buffer.DataView;
var $isView = $typed.ABV && ArrayBuffer.isView;
var $slice = $ArrayBuffer.prototype.slice;
var VIEW = $typed.VIEW;
var ARRAY_BUFFER = 'ArrayBuffer';
$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });
$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
// 24.1.3.1 ArrayBuffer.isView(arg)
isView: function isView(it) {
return $isView && $isView(it) || isObject(it) && VIEW in it;
}
});
$export($export.P + $export.U + $export.F * __webpack_require__(11)(function () {
return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
}), ARRAY_BUFFER, {
// 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
slice: function slice(start, end) {
if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix
var len = anObject(this).byteLength;
var first = toAbsoluteIndex(start, len);
var fin = toAbsoluteIndex(end === undefined ? len : end, len);
var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first));
var viewS = new $DataView(this);
var viewT = new $DataView(result);
var index = 0;
while (first < fin) {
viewT.setUint8(index++, viewS.getUint8(first++));
} return result;
}
});
__webpack_require__(68)(ARRAY_BUFFER);
/***/ }),
/* 615 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var weak = __webpack_require__(250);
var validate = __webpack_require__(81);
var WEAK_SET = 'WeakSet';
// 23.4 WeakSet Objects
__webpack_require__(113)(WEAK_SET, function (get) {
return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.4.3.1 WeakSet.prototype.add(value)
add: function add(value) {
return weak.def(validate(this, WEAK_SET), value, true);
}
}, weak, false, true);
/***/ }),
/* 616 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__(59);
var global = __webpack_require__(9);
var ctx = __webpack_require__(42);
var classof = __webpack_require__(95);
var $export = __webpack_require__(1);
var isObject = __webpack_require__(12);
var aFunction = __webpack_require__(27);
var anInstance = __webpack_require__(67);
var forOf = __webpack_require__(66);
var speciesConstructor = __webpack_require__(115);
var task = __webpack_require__(166).set;
var microtask = __webpack_require__(165)();
var newPromiseCapabilityModule = __webpack_require__(164);
var perform = __webpack_require__(256);
var userAgent = __webpack_require__(114);
var promiseResolve = __webpack_require__(255);
var PROMISE = 'Promise';
var TypeError = global.TypeError;
var process = global.process;
var versions = process && process.versions;
var v8 = versions && versions.v8 || '';
var $Promise = global[PROMISE];
var isNode = classof(process) == 'process';
var empty = function () { /* empty */ };
var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
var USE_NATIVE = !!function () {
try {
// correct subclassing with @@species support
var promise = $Promise.resolve(1);
var FakePromise = (promise.constructor = {})[__webpack_require__(13)('species')] = function (exec) {
exec(empty, empty);
};
// unhandled rejections tracking support, NodeJS Promise without it fails @@species test
return (isNode || typeof PromiseRejectionEvent == 'function')
&& promise.then(empty) instanceof FakePromise
// 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
&& v8.indexOf('6.6') !== 0
&& userAgent.indexOf('Chrome/66') === -1;
} catch (e) { /* empty */ }
}();
// helpers
var isThenable = function (it) {
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
var notify = function (promise, isReject) {
if (promise._n) return;
promise._n = true;
var chain = promise._c;
microtask(function () {
var value = promise._v;
var ok = promise._s == 1;
var i = 0;
var run = function (reaction) {
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 (promise._h == 2) onHandleUnhandled(promise);
promise._h = 1;
}
if (handler === true) result = value;
else {
if (domain) domain.enter();
result = handler(value); // may throw
if (domain) {
domain.exit();
exited = true;
}
}
if (result === reaction.promise) {
reject(TypeError('Promise-chain cycle'));
} else if (then = isThenable(result)) {
then.call(result, resolve, reject);
} else resolve(result);
} else reject(value);
} catch (e) {
if (domain && !exited) domain.exit();
reject(e);
}
};
while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
promise._c = [];
promise._n = false;
if (isReject && !promise._h) onUnhandled(promise);
});
};
var onUnhandled = function (promise) {
task.call(global, function () {
var value = promise._v;
var unhandled = isUnhandled(promise);
var result, handler, console;
if (unhandled) {
result = perform(function () {
if (isNode) {
process.emit('unhandledRejection', value, promise);
} else if (handler = global.onunhandledrejection) {
handler({ promise: promise, reason: value });
} else if ((console = global.console) && console.error) {
console.error('Unhandled promise rejection', value);
}
});
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
promise._h = isNode || isUnhandled(promise) ? 2 : 1;
} promise._a = undefined;
if (unhandled && result.e) throw result.v;
});
};
var isUnhandled = function (promise) {
return promise._h !== 1 && (promise._a || promise._c).length === 0;
};
var onHandleUnhandled = function (promise) {
task.call(global, function () {
var handler;
if (isNode) {
process.emit('rejectionHandled', promise);
} else if (handler = global.onrejectionhandled) {
handler({ promise: promise, reason: promise._v });
}
});
};
var $reject = function (value) {
var promise = this;
if (promise._d) return;
promise._d = true;
promise = promise._w || promise; // unwrap
promise._v = value;
promise._s = 2;
if (!promise._a) promise._a = promise._c.slice();
notify(promise, true);
};
var $resolve = function (value) {
var promise = this;
var then;
if (promise._d) return;
promise._d = true;
promise = promise._w || promise; // unwrap
try {
if (promise === value) throw TypeError("Promise can't be resolved itself");
if (then = isThenable(value)) {
microtask(function () {
var wrapper = { _w: promise, _d: false }; // wrap
try {
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
} catch (e) {
$reject.call(wrapper, e);
}
});
} else {
promise._v = value;
promise._s = 1;
notify(promise, false);
}
} catch (e) {
$reject.call({ _w: promise, _d: false }, e); // wrap
}
};
// constructor polyfill
if (!USE_NATIVE) {
// 25.4.3.1 Promise(executor)
$Promise = function Promise(executor) {
anInstance(this, $Promise, PROMISE, '_h');
aFunction(executor);
Internal.call(this);
try {
executor(ctx($resolve, this, 1), ctx($reject, this, 1));
} catch (err) {
$reject.call(this, err);
}
};
// eslint-disable-next-line no-unused-vars
Internal = function Promise(executor) {
this._c = []; // <- awaiting reactions
this._a = undefined; // <- checked in isUnhandled reactions
this._s = 0; // <- state
this._d = false; // <- done
this._v = undefined; // <- value
this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
this._n = false; // <- notify
};
Internal.prototype = __webpack_require__(65)($Promise.prototype, {
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
then: function then(onFulfilled, onRejected) {
var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
reaction.fail = typeof onRejected == 'function' && onRejected;
reaction.domain = isNode ? process.domain : undefined;
this._c.push(reaction);
if (this._a) this._a.push(reaction);
if (this._s) notify(this, false);
return reaction.promise;
},
// 25.4.5.1 Promise.prototype.catch(onRejected)
'catch': function (onRejected) {
return this.then(undefined, onRejected);
}
});
OwnPromiseCapability = function () {
var promise = new Internal();
this.promise = promise;
this.resolve = ctx($resolve, promise, 1);
this.reject = ctx($reject, promise, 1);
};
newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
return C === $Promise || C === Wrapper
? new OwnPromiseCapability(C)
: newGenericPromiseCapability(C);
};
}
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
__webpack_require__(84)($Promise, PROMISE);
__webpack_require__(68)(PROMISE);
Wrapper = __webpack_require__(43)[PROMISE];
// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
// 25.4.4.5 Promise.reject(r)
reject: function reject(r) {
var capability = newPromiseCapability(this);
var $$reject = capability.reject;
$$reject(r);
return capability.promise;
}
});
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
// 25.4.4.6 Promise.resolve(x)
resolve: function resolve(x) {
return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
}
});
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(118)(function (iter) {
$Promise.all(iter)['catch'](empty);
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable) {
var C = this;
var capability = newPromiseCapability(C);
var resolve = capability.resolve;
var reject = capability.reject;
var result = perform(function () {
var values = [];
var index = 0;
var remaining = 1;
forOf(iterable, false, function (promise) {
var $index = index++;
var alreadyCalled = false;
values.push(undefined);
remaining++;
C.resolve(promise).then(function (value) {
if (alreadyCalled) return;
alreadyCalled = true;
values[$index] = value;
--remaining || resolve(values);
}, reject);
});
--remaining || resolve(values);
});
if (result.e) reject(result.v);
return capability.promise;
},
// 25.4.4.4 Promise.race(iterable)
race: function race(iterable) {
var C = this;
var capability = newPromiseCapability(C);
var reject = capability.reject;
var result = perform(function () {
forOf(iterable, false, function (promise) {
C.resolve(promise).then(capability.resolve, reject);
});
});
if (result.e) reject(result.v);
return capability.promise;
}
});
/***/ }),
/* 617 */
/***/ (function(module, exports, __webpack_require__) {
// @@split logic
__webpack_require__(116)('split', 2, function (defined, SPLIT, $split) {
'use strict';
var isRegExp = __webpack_require__(119);
var _split = $split;
var $push = [].push;
var $SPLIT = 'split';
var LENGTH = 'length';
var LAST_INDEX = 'lastIndex';
if (
'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
'.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
'.'[$SPLIT](/()()/)[LENGTH] > 1 ||
''[$SPLIT](/.?/)[LENGTH]
) {
var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group
// based on es5-shim implementation, need to rework it
$split = function (separator, limit) {
var string = String(this);
if (separator === undefined && limit === 0) return [];
// If `separator` is not a regex, use native split
if (!isRegExp(separator)) return _split.call(string, separator, limit);
var output = [];
var flags = (separator.ignoreCase ? 'i' : '') +
(separator.multiline ? 'm' : '') +
(separator.unicode ? 'u' : '') +
(separator.sticky ? 'y' : '');
var lastLastIndex = 0;
var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
// Make `global` and avoid `lastIndex` issues by working with a copy
var separatorCopy = new RegExp(separator.source, flags + 'g');
var separator2, match, lastIndex, lastLength, i;
// Doesn't need flags gy, but they don't hurt
if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
while (match = separatorCopy.exec(string)) {
// `separatorCopy.lastIndex` is not reliable cross-browser
lastIndex = match.index + match[0][LENGTH];
if (lastIndex > lastLastIndex) {
output.push(string.slice(lastLastIndex, match.index));
// Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG
// eslint-disable-next-line no-loop-func
if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {
for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;
});
if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
lastLength = match[0][LENGTH];
lastLastIndex = lastIndex;
if (output[LENGTH] >= splitLimit) break;
}
if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
}
if (lastLastIndex === string[LENGTH]) {
if (lastLength || !separatorCopy.test('')) output.push('');
} else output.push(string.slice(lastLastIndex));
return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
};
// Chakra, V8
} else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
$split = function (separator, limit) {
return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);
};
}
// 21.1.3.17 String.prototype.split(separator, limit)
return [function split(separator, limit) {
var O = defined(this);
var fn = separator == undefined ? undefined : separator[SPLIT];
return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
}, $split];
});
/***/ }),
/* 618 */
/***/ (function(module, exports, __webpack_require__) {
// @@search logic
__webpack_require__(116)('search', 1, function (defined, SEARCH, $search) {
// 21.1.3.15 String.prototype.search(regexp)
return [function search(regexp) {
'use strict';
var O = defined(this);
var fn = regexp == undefined ? undefined : regexp[SEARCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
}, $search];
});
/***/ }),
/* 619 */
/***/ (function(module, exports, __webpack_require__) {
// @@replace logic
__webpack_require__(116)('replace', 2, function (defined, REPLACE, $replace) {
// 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
return [function replace(searchValue, replaceValue) {
'use strict';
var O = defined(this);
var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
return fn !== undefined
? fn.call(searchValue, O, replaceValue)
: $replace.call(String(O), searchValue, replaceValue);
}, $replace];
});
/***/ }),
/* 620 */
/***/ (function(module, exports, __webpack_require__) {
// @@match logic
__webpack_require__(116)('match', 1, function (defined, MATCH, $match) {
// 21.1.3.11 String.prototype.match(regexp)
return [function match(regexp) {
'use strict';
var O = defined(this);
var fn = regexp == undefined ? undefined : regexp[MATCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
}, $match];
});
/***/ }),
/* 621 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(257);
var anObject = __webpack_require__(8);
var $flags = __webpack_require__(117);
var DESCRIPTORS = __webpack_require__(21);
var TO_STRING = 'toString';
var $toString = /./[TO_STRING];
var define = function (fn) {
__webpack_require__(31)(RegExp.prototype, TO_STRING, fn, true);
};
// 21.2.5.14 RegExp.prototype.toString()
if (__webpack_require__(11)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
define(function toString() {
var R = anObject(this);
return '/'.concat(R.source, '/',
'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
});
// FF44- RegExp#toString has a wrong name
} else if ($toString.name != TO_STRING) {
define(function toString() {
return $toString.call(this);
});
}
/***/ }),
/* 622 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(9);
var inheritIfRequired = __webpack_require__(181);
var dP = __webpack_require__(20).f;
var gOPN = __webpack_require__(69).f;
var isRegExp = __webpack_require__(119);
var $flags = __webpack_require__(117);
var $RegExp = global.RegExp;
var Base = $RegExp;
var proto = $RegExp.prototype;
var re1 = /a/g;
var re2 = /a/g;
// "new" creates a new object, old webkit buggy here
var CORRECT_NEW = new $RegExp(re1) !== re1;
if (__webpack_require__(21) && (!CORRECT_NEW || __webpack_require__(11)(function () {
re2[__webpack_require__(13)('match')] = false;
// RegExp constructor can alter flags and IsRegExp works correct with @@match
return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
}))) {
$RegExp = function RegExp(p, f) {
var tiRE = this instanceof $RegExp;
var piRE = isRegExp(p);
var fiU = f === undefined;
return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
: inheritIfRequired(CORRECT_NEW
? new Base(piRE && !fiU ? p.source : p, f)
: Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
, tiRE ? this : proto, $RegExp);
};
var proxy = function (key) {
key in $RegExp || dP($RegExp, key, {
configurable: true,
get: function () { return Base[key]; },
set: function (it) { Base[key] = it; }
});
};
for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);
proto.constructor = $RegExp;
$RegExp.prototype = proto;
__webpack_require__(31)(global, 'RegExp', $RegExp);
}
__webpack_require__(68)('RegExp');
/***/ }),
/* 623 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(68)('Array');
/***/ }),
/* 624 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
var $export = __webpack_require__(1);
var $find = __webpack_require__(46)(6);
var KEY = 'findIndex';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
findIndex: function findIndex(callbackfn /* , that = undefined */) {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__(58)(KEY);
/***/ }),
/* 625 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
var $export = __webpack_require__(1);
var $find = __webpack_require__(46)(5);
var KEY = 'find';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
find: function find(callbackfn /* , that = undefined */) {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__(58)(KEY);
/***/ }),
/* 626 */
/***/ (function(module, exports, __webpack_require__) {
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
var $export = __webpack_require__(1);
$export($export.P, 'Array', { fill: __webpack_require__(168) });
__webpack_require__(58)('fill');
/***/ }),
/* 627 */
/***/ (function(module, exports, __webpack_require__) {
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
var $export = __webpack_require__(1);
$export($export.P, 'Array', { copyWithin: __webpack_require__(259) });
__webpack_require__(58)('copyWithin');
/***/ }),
/* 628 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var toIObject = __webpack_require__(37);
var toInteger = __webpack_require__(48);
var toLength = __webpack_require__(19);
var $native = [].lastIndexOf;
var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(40)($native)), 'Array', {
// 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
// convert -0 to +0
if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
var O = toIObject(this);
var length = toLength(O.length);
var index = length - 1;
if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
if (index < 0) index = length + index;
for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
return -1;
}
});
/***/ }),
/* 629 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var $indexOf = __webpack_require__(122)(false);
var $native = [].indexOf;
var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(40)($native)), 'Array', {
// 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
return NEGATIVE_ZERO
// convert -0 to +0
? $native.apply(this, arguments) || 0
: $indexOf(this, searchElement, arguments[1]);
}
});
/***/ }),
/* 630 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var $reduce = __webpack_require__(260);
$export($export.P + $export.F * !__webpack_require__(40)([].reduceRight, true), 'Array', {
// 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
reduceRight: function reduceRight(callbackfn /* , initialValue */) {
return $reduce(this, callbackfn, arguments.length, arguments[1], true);
}
});
/***/ }),
/* 631 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var $reduce = __webpack_require__(260);
$export($export.P + $export.F * !__webpack_require__(40)([].reduce, true), 'Array', {
// 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
reduce: function reduce(callbackfn /* , initialValue */) {
return $reduce(this, callbackfn, arguments.length, arguments[1], false);
}
});
/***/ }),
/* 632 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var $every = __webpack_require__(46)(4);
$export($export.P + $export.F * !__webpack_require__(40)([].every, true), 'Array', {
// 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
every: function every(callbackfn /* , thisArg */) {
return $every(this, callbackfn, arguments[1]);
}
});
/***/ }),
/* 633 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var $some = __webpack_require__(46)(3);
$export($export.P + $export.F * !__webpack_require__(40)([].some, true), 'Array', {
// 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
some: function some(callbackfn /* , thisArg */) {
return $some(this, callbackfn, arguments[1]);
}
});
/***/ }),
/* 634 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var $filter = __webpack_require__(46)(2);
$export($export.P + $export.F * !__webpack_require__(40)([].filter, true), 'Array', {
// 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
filter: function filter(callbackfn /* , thisArg */) {
return $filter(this, callbackfn, arguments[1]);
}
});
/***/ }),
/* 635 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var $map = __webpack_require__(46)(1);
$export($export.P + $export.F * !__webpack_require__(40)([].map, true), 'Array', {
// 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
map: function map(callbackfn /* , thisArg */) {
return $map(this, callbackfn, arguments[1]);
}
});
/***/ }),
/* 636 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(12);
var isArray = __webpack_require__(120);
var SPECIES = __webpack_require__(13)('species');
module.exports = function (original) {
var C;
if (isArray(original)) {
C = original.constructor;
// cross-realm fallback
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
if (isObject(C)) {
C = C[SPECIES];
if (C === null) C = undefined;
}
} return C === undefined ? Array : C;
};
/***/ }),
/* 637 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var $forEach = __webpack_require__(46)(0);
var STRICT = __webpack_require__(40)([].forEach, true);
$export($export.P + $export.F * !STRICT, 'Array', {
// 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
forEach: function forEach(callbackfn /* , thisArg */) {
return $forEach(this, callbackfn, arguments[1]);
}
});
/***/ }),
/* 638 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var aFunction = __webpack_require__(27);
var toObject = __webpack_require__(25);
var fails = __webpack_require__(11);
var $sort = [].sort;
var test = [1, 2, 3];
$export($export.P + $export.F * (fails(function () {
// IE8-
test.sort(undefined);
}) || !fails(function () {
// V8 bug
test.sort(null);
// Old WebKit
}) || !__webpack_require__(40)($sort)), 'Array', {
// 22.1.3.25 Array.prototype.sort(comparefn)
sort: function sort(comparefn) {
return comparefn === undefined
? $sort.call(toObject(this))
: $sort.call(toObject(this), aFunction(comparefn));
}
});
/***/ }),
/* 639 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var html = __webpack_require__(184);
var cof = __webpack_require__(41);
var toAbsoluteIndex = __webpack_require__(71);
var toLength = __webpack_require__(19);
var arraySlice = [].slice;
// fallback for not array-like ES3 strings and DOM objects
$export($export.P + $export.F * __webpack_require__(11)(function () {
if (html) arraySlice.call(html);
}), 'Array', {
slice: function slice(begin, end) {
var len = toLength(this.length);
var klass = cof(this);
end = end === undefined ? len : end;
if (klass == 'Array') return arraySlice.call(this, begin, end);
var start = toAbsoluteIndex(begin, len);
var upTo = toAbsoluteIndex(end, len);
var size = toLength(upTo - start);
var cloned = new Array(size);
var i = 0;
for (; i < size; i++) cloned[i] = klass == 'String'
? this.charAt(start + i)
: this[start + i];
return cloned;
}
});
/***/ }),
/* 640 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.13 Array.prototype.join(separator)
var $export = __webpack_require__(1);
var toIObject = __webpack_require__(37);
var arrayJoin = [].join;
// fallback for not array-like strings
$export($export.P + $export.F * (__webpack_require__(97) != Object || !__webpack_require__(40)(arrayJoin)), 'Array', {
join: function join(separator) {
return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
}
});
/***/ }),
/* 641 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var createProperty = __webpack_require__(171);
// WebKit Array.of isn't generic
$export($export.S + $export.F * __webpack_require__(11)(function () {
function F() { /* empty */ }
return !(Array.of.call(F) instanceof F);
}), 'Array', {
// 22.1.2.3 Array.of( ...items)
of: function of(/* ...args */) {
var index = 0;
var aLen = arguments.length;
var result = new (typeof this == 'function' ? this : Array)(aLen);
while (aLen > index) createProperty(result, index, arguments[index++]);
result.length = aLen;
return result;
}
});
/***/ }),
/* 642 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ctx = __webpack_require__(42);
var $export = __webpack_require__(1);
var toObject = __webpack_require__(25);
var call = __webpack_require__(261);
var isArrayIter = __webpack_require__(172);
var toLength = __webpack_require__(19);
var createProperty = __webpack_require__(171);
var getIterFn = __webpack_require__(170);
$export($export.S + $export.F * !__webpack_require__(118)(function (iter) { Array.from(iter); }), 'Array', {
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
var O = toObject(arrayLike);
var C = typeof this == 'function' ? this : Array;
var aLen = arguments.length;
var mapfn = aLen > 1 ? arguments[1] : undefined;
var mapping = mapfn !== undefined;
var index = 0;
var iterFn = getIterFn(O);
var length, result, step, iterator;
if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
// if object isn't iterable or it's array with default iterator - use simple case
if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
}
} else {
length = toLength(O.length);
for (result = new C(length); length > index; index++) {
createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
}
}
result.length = index;
return result;
}
});
/***/ }),
/* 643 */
/***/ (function(module, exports, __webpack_require__) {
// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
var $export = __webpack_require__(1);
$export($export.S, 'Array', { isArray: __webpack_require__(120) });
/***/ }),
/* 644 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(8);
var toPrimitive = __webpack_require__(50);
var NUMBER = 'number';
module.exports = function (hint) {
if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');
return toPrimitive(anObject(this), hint != NUMBER);
};
/***/ }),
/* 645 */
/***/ (function(module, exports, __webpack_require__) {
var TO_PRIMITIVE = __webpack_require__(13)('toPrimitive');
var proto = Date.prototype;
if (!(TO_PRIMITIVE in proto)) __webpack_require__(32)(proto, TO_PRIMITIVE, __webpack_require__(644));
/***/ }),
/* 646 */
/***/ (function(module, exports, __webpack_require__) {
var DateProto = Date.prototype;
var INVALID_DATE = 'Invalid Date';
var TO_STRING = 'toString';
var $toString = DateProto[TO_STRING];
var getTime = DateProto.getTime;
if (new Date(NaN) + '' != INVALID_DATE) {
__webpack_require__(31)(DateProto, TO_STRING, function toString() {
var value = getTime.call(this);
// eslint-disable-next-line no-self-compare
return value === value ? $toString.call(this) : INVALID_DATE;
});
}
/***/ }),
/* 647 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
var fails = __webpack_require__(11);
var getTime = Date.prototype.getTime;
var $toISOString = Date.prototype.toISOString;
var lz = function (num) {
return num > 9 ? num : '0' + num;
};
// PhantomJS / old WebKit has a broken implementations
module.exports = (fails(function () {
return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
}) || !fails(function () {
$toISOString.call(new Date(NaN));
})) ? function toISOString() {
if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');
var d = this;
var y = d.getUTCFullYear();
var m = d.getUTCMilliseconds();
var s = y < 0 ? '-' : y > 9999 ? '+' : '';
return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
'-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
} : $toISOString;
/***/ }),
/* 648 */
/***/ (function(module, exports, __webpack_require__) {
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
var $export = __webpack_require__(1);
var toISOString = __webpack_require__(647);
// PhantomJS / old WebKit has a broken implementations
$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {
toISOString: toISOString
});
/***/ }),
/* 649 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var toObject = __webpack_require__(25);
var toPrimitive = __webpack_require__(50);
$export($export.P + $export.F * __webpack_require__(11)(function () {
return new Date(NaN).toJSON() !== null
|| Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
}), 'Date', {
// eslint-disable-next-line no-unused-vars
toJSON: function toJSON(key) {
var O = toObject(this);
var pv = toPrimitive(O);
return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
}
});
/***/ }),
/* 650 */
/***/ (function(module, exports, __webpack_require__) {
// 20.3.3.1 / 15.9.4.4 Date.now()
var $export = __webpack_require__(1);
$export($export.S, 'Date', { now: function () { return new Date().getTime(); } });
/***/ }),
/* 651 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.14 String.prototype.sup()
__webpack_require__(30)('sup', function (createHTML) {
return function sup() {
return createHTML(this, 'sup', '', '');
};
});
/***/ }),
/* 652 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.13 String.prototype.sub()
__webpack_require__(30)('sub', function (createHTML) {
return function sub() {
return createHTML(this, 'sub', '', '');
};
});
/***/ }),
/* 653 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.12 String.prototype.strike()
__webpack_require__(30)('strike', function (createHTML) {
return function strike() {
return createHTML(this, 'strike', '', '');
};
});
/***/ }),
/* 654 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.11 String.prototype.small()
__webpack_require__(30)('small', function (createHTML) {
return function small() {
return createHTML(this, 'small', '', '');
};
});
/***/ }),
/* 655 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.10 String.prototype.link(url)
__webpack_require__(30)('link', function (createHTML) {
return function link(url) {
return createHTML(this, 'a', 'href', url);
};
});
/***/ }),
/* 656 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.9 String.prototype.italics()
__webpack_require__(30)('italics', function (createHTML) {
return function italics() {
return createHTML(this, 'i', '', '');
};
});
/***/ }),
/* 657 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.8 String.prototype.fontsize(size)
__webpack_require__(30)('fontsize', function (createHTML) {
return function fontsize(size) {
return createHTML(this, 'font', 'size', size);
};
});
/***/ }),
/* 658 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.7 String.prototype.fontcolor(color)
__webpack_require__(30)('fontcolor', function (createHTML) {
return function fontcolor(color) {
return createHTML(this, 'font', 'color', color);
};
});
/***/ }),
/* 659 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.6 String.prototype.fixed()
__webpack_require__(30)('fixed', function (createHTML) {
return function fixed() {
return createHTML(this, 'tt', '', '');
};
});
/***/ }),
/* 660 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.5 String.prototype.bold()
__webpack_require__(30)('bold', function (createHTML) {
return function bold() {
return createHTML(this, 'b', '', '');
};
});
/***/ }),
/* 661 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.4 String.prototype.blink()
__webpack_require__(30)('blink', function (createHTML) {
return function blink() {
return createHTML(this, 'blink', '', '');
};
});
/***/ }),
/* 662 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.3 String.prototype.big()
__webpack_require__(30)('big', function (createHTML) {
return function big() {
return createHTML(this, 'big', '', '');
};
});
/***/ }),
/* 663 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.2 String.prototype.anchor(name)
__webpack_require__(30)('anchor', function (createHTML) {
return function anchor(name) {
return createHTML(this, 'a', 'name', name);
};
});
/***/ }),
/* 664 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
var $export = __webpack_require__(1);
var toLength = __webpack_require__(19);
var context = __webpack_require__(174);
var STARTS_WITH = 'startsWith';
var $startsWith = ''[STARTS_WITH];
$export($export.P + $export.F * __webpack_require__(173)(STARTS_WITH), 'String', {
startsWith: function startsWith(searchString /* , position = 0 */) {
var that = context(this, searchString, STARTS_WITH);
var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
var search = String(searchString);
return $startsWith
? $startsWith.call(that, search, index)
: that.slice(index, index + search.length) === search;
}
});
/***/ }),
/* 665 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
$export($export.P, 'String', {
// 21.1.3.13 String.prototype.repeat(count)
repeat: __webpack_require__(180)
});
/***/ }),
/* 666 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
var $export = __webpack_require__(1);
var context = __webpack_require__(174);
var INCLUDES = 'includes';
$export($export.P + $export.F * __webpack_require__(173)(INCLUDES), 'String', {
includes: function includes(searchString /* , position = 0 */) {
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/* 667 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
var $export = __webpack_require__(1);
var toLength = __webpack_require__(19);
var context = __webpack_require__(174);
var ENDS_WITH = 'endsWith';
var $endsWith = ''[ENDS_WITH];
$export($export.P + $export.F * __webpack_require__(173)(ENDS_WITH), 'String', {
endsWith: function endsWith(searchString /* , endPosition = @length */) {
var that = context(this, searchString, ENDS_WITH);
var endPosition = arguments.length > 1 ? arguments[1] : undefined;
var len = toLength(that.length);
var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
var search = String(searchString);
return $endsWith
? $endsWith.call(that, search, end)
: that.slice(end - search.length, end) === search;
}
});
/***/ }),
/* 668 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var $at = __webpack_require__(177)(false);
$export($export.P, 'String', {
// 21.1.3.3 String.prototype.codePointAt(pos)
codePointAt: function codePointAt(pos) {
return $at(this, pos);
}
});
/***/ }),
/* 669 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $at = __webpack_require__(177)(true);
// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(176)(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 };
});
/***/ }),
/* 670 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.25 String.prototype.trim()
__webpack_require__(83)('trim', function ($trim) {
return function trim() {
return $trim(this, 3);
};
});
/***/ }),
/* 671 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
var toIObject = __webpack_require__(37);
var toLength = __webpack_require__(19);
$export($export.S, 'String', {
// 21.1.2.4 String.raw(callSite, ...substitutions)
raw: function raw(callSite) {
var tpl = toIObject(callSite.raw);
var len = toLength(tpl.length);
var aLen = arguments.length;
var res = [];
var i = 0;
while (len > i) {
res.push(String(tpl[i++]));
if (i < aLen) res.push(String(arguments[i]));
} return res.join('');
}
});
/***/ }),
/* 672 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
var toAbsoluteIndex = __webpack_require__(71);
var fromCharCode = String.fromCharCode;
var $fromCodePoint = String.fromCodePoint;
// length should be 1, old FF problem
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
// 21.1.2.2 String.fromCodePoint(...codePoints)
fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
var res = [];
var aLen = arguments.length;
var i = 0;
var code;
while (aLen > i) {
code = +arguments[i++];
if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');
res.push(code < 0x10000
? fromCharCode(code)
: fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
);
} return res.join('');
}
});
/***/ }),
/* 673 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.34 Math.trunc(x)
var $export = __webpack_require__(1);
$export($export.S, 'Math', {
trunc: function trunc(it) {
return (it > 0 ? Math.floor : Math.ceil)(it);
}
});
/***/ }),
/* 674 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.33 Math.tanh(x)
var $export = __webpack_require__(1);
var expm1 = __webpack_require__(178);
var exp = Math.exp;
$export($export.S, 'Math', {
tanh: function tanh(x) {
var a = expm1(x = +x);
var b = expm1(-x);
return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
}
});
/***/ }),
/* 675 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.30 Math.sinh(x)
var $export = __webpack_require__(1);
var expm1 = __webpack_require__(178);
var exp = Math.exp;
// V8 near Chromium 38 has a problem with very small numbers
$export($export.S + $export.F * __webpack_require__(11)(function () {
return !Math.sinh(-2e-17) != -2e-17;
}), 'Math', {
sinh: function sinh(x) {
return Math.abs(x = +x) < 1
? (expm1(x) - expm1(-x)) / 2
: (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
}
});
/***/ }),
/* 676 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.28 Math.sign(x)
var $export = __webpack_require__(1);
$export($export.S, 'Math', { sign: __webpack_require__(179) });
/***/ }),
/* 677 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.22 Math.log2(x)
var $export = __webpack_require__(1);
$export($export.S, 'Math', {
log2: function log2(x) {
return Math.log(x) / Math.LN2;
}
});
/***/ }),
/* 678 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.20 Math.log1p(x)
var $export = __webpack_require__(1);
$export($export.S, 'Math', { log1p: __webpack_require__(263) });
/***/ }),
/* 679 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.21 Math.log10(x)
var $export = __webpack_require__(1);
$export($export.S, 'Math', {
log10: function log10(x) {
return Math.log(x) * Math.LOG10E;
}
});
/***/ }),
/* 680 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.18 Math.imul(x, y)
var $export = __webpack_require__(1);
var $imul = Math.imul;
// some WebKit versions fails with big numbers, some has wrong arity
$export($export.S + $export.F * __webpack_require__(11)(function () {
return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
}), 'Math', {
imul: function imul(x, y) {
var UINT16 = 0xffff;
var xn = +x;
var yn = +y;
var xl = UINT16 & xn;
var yl = UINT16 & yn;
return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
}
});
/***/ }),
/* 681 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
var $export = __webpack_require__(1);
var abs = Math.abs;
$export($export.S, 'Math', {
hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
var sum = 0;
var i = 0;
var aLen = arguments.length;
var larg = 0;
var arg, div;
while (i < aLen) {
arg = abs(arguments[i++]);
if (larg < arg) {
div = larg / arg;
sum = sum * div * div + 1;
larg = arg;
} else if (arg > 0) {
div = arg / larg;
sum += div * div;
} else sum += arg;
}
return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
}
});
/***/ }),
/* 682 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.16 Math.fround(x)
var $export = __webpack_require__(1);
$export($export.S, 'Math', { fround: __webpack_require__(262) });
/***/ }),
/* 683 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.14 Math.expm1(x)
var $export = __webpack_require__(1);
var $expm1 = __webpack_require__(178);
$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });
/***/ }),
/* 684 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.12 Math.cosh(x)
var $export = __webpack_require__(1);
var exp = Math.exp;
$export($export.S, 'Math', {
cosh: function cosh(x) {
return (exp(x = +x) + exp(-x)) / 2;
}
});
/***/ }),
/* 685 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.11 Math.clz32(x)
var $export = __webpack_require__(1);
$export($export.S, 'Math', {
clz32: function clz32(x) {
return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
}
});
/***/ }),
/* 686 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.9 Math.cbrt(x)
var $export = __webpack_require__(1);
var sign = __webpack_require__(179);
$export($export.S, 'Math', {
cbrt: function cbrt(x) {
return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
}
});
/***/ }),
/* 687 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.7 Math.atanh(x)
var $export = __webpack_require__(1);
var $atanh = Math.atanh;
// Tor Browser bug: Math.atanh(-0) -> 0
$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
atanh: function atanh(x) {
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
}
});
/***/ }),
/* 688 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.5 Math.asinh(x)
var $export = __webpack_require__(1);
var $asinh = Math.asinh;
function asinh(x) {
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
}
// Tor Browser bug: Math.asinh(0) -> -0
$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });
/***/ }),
/* 689 */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.3 Math.acosh(x)
var $export = __webpack_require__(1);
var log1p = __webpack_require__(263);
var sqrt = Math.sqrt;
var $acosh = Math.acosh;
$export($export.S + $export.F * !($acosh
// V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
&& Math.floor($acosh(Number.MAX_VALUE)) == 710
// Tor Browser bug: Math.acosh(Infinity) -> NaN
&& $acosh(Infinity) == Infinity
), 'Math', {
acosh: function acosh(x) {
return (x = +x) < 1 ? NaN : x > 94906265.62425156
? Math.log(x) + Math.LN2
: log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
}
});
/***/ }),
/* 690 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
var $parseInt = __webpack_require__(267);
// 20.1.2.13 Number.parseInt(string, radix)
$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });
/***/ }),
/* 691 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
var $parseFloat = __webpack_require__(266);
// 20.1.2.12 Number.parseFloat(string)
$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });
/***/ }),
/* 692 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.10 Number.MIN_SAFE_INTEGER
var $export = __webpack_require__(1);
$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
/***/ }),
/* 693 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.6 Number.MAX_SAFE_INTEGER
var $export = __webpack_require__(1);
$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
/***/ }),
/* 694 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.5 Number.isSafeInteger(number)
var $export = __webpack_require__(1);
var isInteger = __webpack_require__(264);
var abs = Math.abs;
$export($export.S, 'Number', {
isSafeInteger: function isSafeInteger(number) {
return isInteger(number) && abs(number) <= 0x1fffffffffffff;
}
});
/***/ }),
/* 695 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.4 Number.isNaN(number)
var $export = __webpack_require__(1);
$export($export.S, 'Number', {
isNaN: function isNaN(number) {
// eslint-disable-next-line no-self-compare
return number != number;
}
});
/***/ }),
/* 696 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
var $export = __webpack_require__(1);
$export($export.S, 'Number', { isInteger: __webpack_require__(264) });
/***/ }),
/* 697 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.2 Number.isFinite(number)
var $export = __webpack_require__(1);
var _isFinite = __webpack_require__(9).isFinite;
$export($export.S, 'Number', {
isFinite: function isFinite(it) {
return typeof it == 'number' && _isFinite(it);
}
});
/***/ }),
/* 698 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.1 Number.EPSILON
var $export = __webpack_require__(1);
$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });
/***/ }),
/* 699 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var $fails = __webpack_require__(11);
var aNumberValue = __webpack_require__(265);
var $toPrecision = 1.0.toPrecision;
$export($export.P + $export.F * ($fails(function () {
// IE7-
return $toPrecision.call(1, undefined) !== '1';
}) || !$fails(function () {
// V8 ~ Android 4.3-
$toPrecision.call({});
})), 'Number', {
toPrecision: function toPrecision(precision) {
var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
}
});
/***/ }),
/* 700 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(1);
var toInteger = __webpack_require__(48);
var aNumberValue = __webpack_require__(265);
var repeat = __webpack_require__(180);
var $toFixed = 1.0.toFixed;
var floor = Math.floor;
var data = [0, 0, 0, 0, 0, 0];
var ERROR = 'Number.toFixed: incorrect invocation!';
var ZERO = '0';
var multiply = function (n, c) {
var i = -1;
var c2 = c;
while (++i < 6) {
c2 += n * data[i];
data[i] = c2 % 1e7;
c2 = floor(c2 / 1e7);
}
};
var divide = function (n) {
var i = 6;
var c = 0;
while (--i >= 0) {
c += data[i];
data[i] = floor(c / n);
c = (c % n) * 1e7;
}
};
var numToString = function () {
var i = 6;
var s = '';
while (--i >= 0) {
if (s !== '' || i === 0 || data[i] !== 0) {
var t = String(data[i]);
s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
}
} return s;
};
var pow = function (x, n, acc) {
return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
};
var log = function (x) {
var n = 0;
var x2 = x;
while (x2 >= 4096) {
n += 12;
x2 /= 4096;
}
while (x2 >= 2) {
n += 1;
x2 /= 2;
} return n;
};
$export($export.P + $export.F * (!!$toFixed && (
0.00008.toFixed(3) !== '0.000' ||
0.9.toFixed(0) !== '1' ||
1.255.toFixed(2) !== '1.25' ||
1000000000000000128.0.toFixed(0) !== '1000000000000000128'
) || !__webpack_require__(11)(function () {
// V8 ~ Android 4.3-
$toFixed.call({});
})), 'Number', {
toFixed: function toFixed(fractionDigits) {
var x = aNumberValue(this, ERROR);
var f = toInteger(fractionDigits);
var s = '';
var m = ZERO;
var e, z, j, k;
if (f < 0 || f > 20) throw RangeError(ERROR);
// eslint-disable-next-line no-self-compare
if (x != x) return 'NaN';
if (x <= -1e21 || x >= 1e21) return String(x);
if (x < 0) {
s = '-';
x = -x;
}
if (x > 1e-21) {
e = log(x * pow(2, 69, 1)) - 69;
z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
z *= 0x10000000000000;
e = 52 - e;
if (e > 0) {
multiply(0, z);
j = f;
while (j >= 7) {
multiply(1e7, 0);
j -= 7;
}
multiply(pow(10, j, 1), 0);
j = e - 1;
while (j >= 23) {
divide(1 << 23);
j -= 23;
}
divide(1 << j);
multiply(1, 1);
divide(2);
m = numToString();
} else {
multiply(0, z);
multiply(1 << -e, 0);
m = numToString() + repeat.call(ZERO, f);
}
}
if (f > 0) {
k = m.length;
m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
} else {
m = s + m;
} return m;
}
});
/***/ }),
/* 701 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(9);
var has = __webpack_require__(38);
var cof = __webpack_require__(41);
var inheritIfRequired = __webpack_require__(181);
var toPrimitive = __webpack_require__(50);
var fails = __webpack_require__(11);
var gOPN = __webpack_require__(69).f;
var gOPD = __webpack_require__(36).f;
var dP = __webpack_require__(20).f;
var $trim = __webpack_require__(83).trim;
var NUMBER = 'Number';
var $Number = global[NUMBER];
var Base = $Number;
var proto = $Number.prototype;
// Opera ~12 has broken Object#toString
var BROKEN_COF = cof(__webpack_require__(70)(proto)) == NUMBER;
var TRIM = 'trim' in String.prototype;
// 7.1.3 ToNumber(argument)
var toNumber = function (argument) {
var it = toPrimitive(argument, false);
if (typeof it == 'string' && it.length > 2) {
it = TRIM ? it.trim() : $trim(it, 3);
var first = it.charCodeAt(0);
var third, radix, maxCode;
if (first === 43 || first === 45) {
third = it.charCodeAt(2);
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
} else if (first === 48) {
switch (it.charCodeAt(1)) {
case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
default: return +it;
}
for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
code = digits.charCodeAt(i);
// parseInt parses a string to a first unavailable symbol
// but ToNumber should return NaN if a string contains unavailable symbols
if (code < 48 || code > maxCode) return NaN;
} return parseInt(digits, radix);
}
} return +it;
};
if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
$Number = function Number(value) {
var it = arguments.length < 1 ? 0 : value;
var that = this;
return that instanceof $Number
// check on 1..constructor(foo) case
&& (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
};
for (var keys = __webpack_require__(21) ? gOPN(Base) : (
// ES3:
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
// ES6 (in case, if modules with ES6 Number statics required before):
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
).split(','), j = 0, key; keys.length > j; j++) {
if (has(Base, key = keys[j]) && !has($Number, key)) {
dP($Number, key, gOPD(Base, key));
}
}
$Number.prototype = proto;
proto.constructor = $Number;
__webpack_require__(31)(global, NUMBER, $Number);
}
/***/ }),
/* 702 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
var $parseFloat = __webpack_require__(266);
// 18.2.4 parseFloat(string)
$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });
/***/ }),
/* 703 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
var $parseInt = __webpack_require__(267);
// 18.2.5 parseInt(string, radix)
$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });
/***/ }),
/* 704 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isObject = __webpack_require__(12);
var getPrototypeOf = __webpack_require__(35);
var HAS_INSTANCE = __webpack_require__(13)('hasInstance');
var FunctionProto = Function.prototype;
// 19.2.3.6 Function.prototype[@@hasInstance](V)
if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(20).f(FunctionProto, HAS_INSTANCE, { value: function (O) {
if (typeof this != 'function' || !isObject(O)) return false;
if (!isObject(this.prototype)) return O instanceof this;
// for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
while (O = getPrototypeOf(O)) if (this.prototype === O) return true;
return false;
} });
/***/ }),
/* 705 */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(20).f;
var FProto = Function.prototype;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
// 19.2.4.2 name
NAME in FProto || __webpack_require__(21) && dP(FProto, NAME, {
configurable: true,
get: function () {
try {
return ('' + this).match(nameRE)[1];
} catch (e) {
return '';
}
}
});
/***/ }),
/* 706 */
/***/ (function(module, exports, __webpack_require__) {
// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
var $export = __webpack_require__(1);
$export($export.P, 'Function', { bind: __webpack_require__(269) });
/***/ }),
/* 707 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 19.1.3.6 Object.prototype.toString()
var classof = __webpack_require__(95);
var test = {};
test[__webpack_require__(13)('toStringTag')] = 'z';
if (test + '' != '[object z]') {
__webpack_require__(31)(Object.prototype, 'toString', function toString() {
return '[object ' + classof(this) + ']';
}, true);
}
/***/ }),
/* 708 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = __webpack_require__(1);
$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(183).set });
/***/ }),
/* 709 */
/***/ (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;
};
/***/ }),
/* 710 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.10 Object.is(value1, value2)
var $export = __webpack_require__(1);
$export($export.S, 'Object', { is: __webpack_require__(709) });
/***/ }),
/* 711 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.1 Object.assign(target, source)
var $export = __webpack_require__(1);
$export($export.S + $export.F, 'Object', { assign: __webpack_require__(270) });
/***/ }),
/* 712 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.11 Object.isExtensible(O)
var isObject = __webpack_require__(12);
__webpack_require__(47)('isExtensible', function ($isExtensible) {
return function isExtensible(it) {
return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
};
});
/***/ }),
/* 713 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.13 Object.isSealed(O)
var isObject = __webpack_require__(12);
__webpack_require__(47)('isSealed', function ($isSealed) {
return function isSealed(it) {
return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
};
});
/***/ }),
/* 714 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.12 Object.isFrozen(O)
var isObject = __webpack_require__(12);
__webpack_require__(47)('isFrozen', function ($isFrozen) {
return function isFrozen(it) {
return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
};
});
/***/ }),
/* 715 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.15 Object.preventExtensions(O)
var isObject = __webpack_require__(12);
var meta = __webpack_require__(60).onFreeze;
__webpack_require__(47)('preventExtensions', function ($preventExtensions) {
return function preventExtensions(it) {
return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
};
});
/***/ }),
/* 716 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.17 Object.seal(O)
var isObject = __webpack_require__(12);
var meta = __webpack_require__(60).onFreeze;
__webpack_require__(47)('seal', function ($seal) {
return function seal(it) {
return $seal && isObject(it) ? $seal(meta(it)) : it;
};
});
/***/ }),
/* 717 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.5 Object.freeze(O)
var isObject = __webpack_require__(12);
var meta = __webpack_require__(60).onFreeze;
__webpack_require__(47)('freeze', function ($freeze) {
return function freeze(it) {
return $freeze && isObject(it) ? $freeze(meta(it)) : it;
};
});
/***/ }),
/* 718 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 Object.getOwnPropertyNames(O)
__webpack_require__(47)('getOwnPropertyNames', function () {
return __webpack_require__(271).f;
});
/***/ }),
/* 719 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 Object.keys(O)
var toObject = __webpack_require__(25);
var $keys = __webpack_require__(72);
__webpack_require__(47)('keys', function () {
return function keys(it) {
return $keys(toObject(it));
};
});
/***/ }),
/* 720 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 Object.getPrototypeOf(O)
var toObject = __webpack_require__(25);
var $getPrototypeOf = __webpack_require__(35);
__webpack_require__(47)('getPrototypeOf', function () {
return function getPrototypeOf(it) {
return $getPrototypeOf(toObject(it));
};
});
/***/ }),
/* 721 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
var toIObject = __webpack_require__(37);
var $getOwnPropertyDescriptor = __webpack_require__(36).f;
__webpack_require__(47)('getOwnPropertyDescriptor', function () {
return function getOwnPropertyDescriptor(it, key) {
return $getOwnPropertyDescriptor(toIObject(it), key);
};
});
/***/ }),
/* 722 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
$export($export.S + $export.F * !__webpack_require__(21), 'Object', { defineProperties: __webpack_require__(272) });
/***/ }),
/* 723 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
$export($export.S + $export.F * !__webpack_require__(21), 'Object', { defineProperty: __webpack_require__(20).f });
/***/ }),
/* 724 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(1);
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
$export($export.S, 'Object', { create: __webpack_require__(70) });
/***/ }),
/* 725 */
/***/ (function(module, exports, __webpack_require__) {
// all enumerable object keys, includes symbols
var getKeys = __webpack_require__(72);
var gOPS = __webpack_require__(121);
var pIE = __webpack_require__(96);
module.exports = function (it) {
var result = getKeys(it);
var getSymbols = gOPS.f;
if (getSymbols) {
var symbols = getSymbols(it);
var isEnum = pIE.f;
var i = 0;
var key;
while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
} return result;
};
/***/ }),
/* 726 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// ECMAScript 6 symbols shim
var global = __webpack_require__(9);
var has = __webpack_require__(38);
var DESCRIPTORS = __webpack_require__(21);
var $export = __webpack_require__(1);
var redefine = __webpack_require__(31);
var META = __webpack_require__(60).KEY;
var $fails = __webpack_require__(11);
var shared = __webpack_require__(123);
var setToStringTag = __webpack_require__(84);
var uid = __webpack_require__(73);
var wks = __webpack_require__(13);
var wksExt = __webpack_require__(274);
var wksDefine = __webpack_require__(187);
var enumKeys = __webpack_require__(725);
var isArray = __webpack_require__(120);
var anObject = __webpack_require__(8);
var isObject = __webpack_require__(12);
var toIObject = __webpack_require__(37);
var toPrimitive = __webpack_require__(50);
var createDesc = __webpack_require__(74);
var _create = __webpack_require__(70);
var gOPNExt = __webpack_require__(271);
var $GOPD = __webpack_require__(36);
var $DP = __webpack_require__(20);
var $keys = __webpack_require__(72);
var gOPD = $GOPD.f;
var dP = $DP.f;
var gOPN = gOPNExt.f;
var $Symbol = global.Symbol;
var $JSON = global.JSON;
var _stringify = $JSON && $JSON.stringify;
var PROTOTYPE = 'prototype';
var HIDDEN = wks('_hidden');
var TO_PRIMITIVE = wks('toPrimitive');
var isEnum = {}.propertyIsEnumerable;
var SymbolRegistry = shared('symbol-registry');
var AllSymbols = shared('symbols');
var OPSymbols = shared('op-symbols');
var ObjectProto = Object[PROTOTYPE];
var USE_NATIVE = typeof $Symbol == 'function';
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function () {
return _create(dP({}, 'a', {
get: function () { return dP(this, 'a', { value: 7 }).a; }
})).a != 7;
}) ? function (it, key, D) {
var protoDesc = gOPD(ObjectProto, key);
if (protoDesc) delete ObjectProto[key];
dP(it, key, D);
if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
} : dP;
var wrap = function (tag) {
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
sym._k = tag;
return sym;
};
var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
return typeof it == 'symbol';
} : function (it) {
return it instanceof $Symbol;
};
var $defineProperty = function defineProperty(it, key, D) {
if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
anObject(it);
key = toPrimitive(key, true);
anObject(D);
if (has(AllSymbols, key)) {
if (!D.enumerable) {
if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
it[HIDDEN][key] = true;
} else {
if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
D = _create(D, { enumerable: createDesc(0, false) });
} return setSymbolDesc(it, key, D);
} return dP(it, key, D);
};
var $defineProperties = function defineProperties(it, P) {
anObject(it);
var keys = enumKeys(P = toIObject(P));
var i = 0;
var l = keys.length;
var key;
while (l > i) $defineProperty(it, key = keys[i++], P[key]);
return it;
};
var $create = function create(it, P) {
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
var E = isEnum.call(this, key = toPrimitive(key, true));
if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
it = toIObject(it);
key = toPrimitive(key, true);
if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
var D = gOPD(it, key);
if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
var names = gOPN(toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
} return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
var IS_OP = it === ObjectProto;
var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
} return result;
};
// 19.4.1.1 Symbol([description])
if (!USE_NATIVE) {
$Symbol = function Symbol() {
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
var $set = function (value) {
if (this === ObjectProto) $set.call(OPSymbols, value);
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
setSymbolDesc(this, tag, createDesc(1, value));
};
if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
return wrap(tag);
};
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
return this._k;
});
$GOPD.f = $getOwnPropertyDescriptor;
$DP.f = $defineProperty;
__webpack_require__(69).f = gOPNExt.f = $getOwnPropertyNames;
__webpack_require__(96).f = $propertyIsEnumerable;
__webpack_require__(121).f = $getOwnPropertySymbols;
if (DESCRIPTORS && !__webpack_require__(59)) {
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
}
wksExt.f = function (name) {
return wrap(wks(name));
};
}
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
for (var es6Symbols = (
// 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
// 19.4.2.1 Symbol.for(key)
'for': function (key) {
return has(SymbolRegistry, key += '')
? SymbolRegistry[key]
: SymbolRegistry[key] = $Symbol(key);
},
// 19.4.2.5 Symbol.keyFor(sym)
keyFor: function keyFor(sym) {
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
},
useSetter: function () { setter = true; },
useSimple: function () { setter = false; }
});
$export($export.S + $export.F * !USE_NATIVE, 'Object', {
// 19.1.2.2 Object.create(O [, Properties])
create: $create,
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
defineProperty: $defineProperty,
// 19.1.2.3 Object.defineProperties(O, Properties)
defineProperties: $defineProperties,
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
// 19.1.2.7 Object.getOwnPropertyNames(O)
getOwnPropertyNames: $getOwnPropertyNames,
// 19.1.2.8 Object.getOwnPropertySymbols(O)
getOwnPropertySymbols: $getOwnPropertySymbols
});
// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
var S = $Symbol();
// MS Edge converts symbol values to JSON as {}
// WebKit converts symbol values to JSON as null
// V8 throws on boxed symbols
return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
})), 'JSON', {
stringify: function stringify(it) {
var args = [it];
var i = 1;
var replacer, $replacer;
while (arguments.length > i) args.push(arguments[i++]);
$replacer = replacer = args[1];
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
if (!isArray(replacer)) replacer = function (key, value) {
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
if (!isSymbol(value)) return value;
};
args[1] = replacer;
return _stringify.apply($JSON, args);
}
});
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(32)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);
/***/ }),
/* 727 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(726);
__webpack_require__(724);
__webpack_require__(723);
__webpack_require__(722);
__webpack_require__(721);
__webpack_require__(720);
__webpack_require__(719);
__webpack_require__(718);
__webpack_require__(717);
__webpack_require__(716);
__webpack_require__(715);
__webpack_require__(714);
__webpack_require__(713);
__webpack_require__(712);
__webpack_require__(711);
__webpack_require__(710);
__webpack_require__(708);
__webpack_require__(707);
__webpack_require__(706);
__webpack_require__(705);
__webpack_require__(704);
__webpack_require__(703);
__webpack_require__(702);
__webpack_require__(701);
__webpack_require__(700);
__webpack_require__(699);
__webpack_require__(698);
__webpack_require__(697);
__webpack_require__(696);
__webpack_require__(695);
__webpack_require__(694);
__webpack_require__(693);
__webpack_require__(692);
__webpack_require__(691);
__webpack_require__(690);
__webpack_require__(689);
__webpack_require__(688);
__webpack_require__(687);
__webpack_require__(686);
__webpack_require__(685);
__webpack_require__(684);
__webpack_require__(683);
__webpack_require__(682);
__webpack_require__(681);
__webpack_require__(680);
__webpack_require__(679);
__webpack_require__(678);
__webpack_require__(677);
__webpack_require__(676);
__webpack_require__(675);
__webpack_require__(674);
__webpack_require__(673);
__webpack_require__(672);
__webpack_require__(671);
__webpack_require__(670);
__webpack_require__(669);
__webpack_require__(668);
__webpack_require__(667);
__webpack_require__(666);
__webpack_require__(665);
__webpack_require__(664);
__webpack_require__(663);
__webpack_require__(662);
__webpack_require__(661);
__webpack_require__(660);
__webpack_require__(659);
__webpack_require__(658);
__webpack_require__(657);
__webpack_require__(656);
__webpack_require__(655);
__webpack_require__(654);
__webpack_require__(653);
__webpack_require__(652);
__webpack_require__(651);
__webpack_require__(650);
__webpack_require__(649);
__webpack_require__(648);
__webpack_require__(646);
__webpack_require__(645);
__webpack_require__(643);
__webpack_require__(642);
__webpack_require__(641);
__webpack_require__(640);
__webpack_require__(639);
__webpack_require__(638);
__webpack_require__(637);
__webpack_require__(635);
__webpack_require__(634);
__webpack_require__(633);
__webpack_require__(632);
__webpack_require__(631);
__webpack_require__(630);
__webpack_require__(629);
__webpack_require__(628);
__webpack_require__(627);
__webpack_require__(626);
__webpack_require__(625);
__webpack_require__(624);
__webpack_require__(623);
__webpack_require__(167);
__webpack_require__(622);
__webpack_require__(621);
__webpack_require__(257);
__webpack_require__(620);
__webpack_require__(619);
__webpack_require__(618);
__webpack_require__(617);
__webpack_require__(616);
__webpack_require__(254);
__webpack_require__(252);
__webpack_require__(251);
__webpack_require__(615);
__webpack_require__(614);
__webpack_require__(613);
__webpack_require__(612);
__webpack_require__(611);
__webpack_require__(610);
__webpack_require__(609);
__webpack_require__(608);
__webpack_require__(607);
__webpack_require__(606);
__webpack_require__(605);
__webpack_require__(604);
__webpack_require__(603);
__webpack_require__(602);
__webpack_require__(601);
__webpack_require__(600);
__webpack_require__(599);
__webpack_require__(598);
__webpack_require__(597);
__webpack_require__(596);
__webpack_require__(595);
__webpack_require__(594);
__webpack_require__(593);
__webpack_require__(592);
__webpack_require__(591);
__webpack_require__(590);
__webpack_require__(589);
__webpack_require__(588);
__webpack_require__(587);
__webpack_require__(586);
__webpack_require__(585);
__webpack_require__(584);
__webpack_require__(583);
__webpack_require__(582);
__webpack_require__(581);
__webpack_require__(580);
__webpack_require__(579);
__webpack_require__(578);
__webpack_require__(577);
__webpack_require__(576);
__webpack_require__(575);
__webpack_require__(574);
__webpack_require__(573);
__webpack_require__(572);
__webpack_require__(571);
__webpack_require__(570);
__webpack_require__(569);
__webpack_require__(568);
__webpack_require__(567);
__webpack_require__(566);
__webpack_require__(565);
__webpack_require__(564);
__webpack_require__(563);
__webpack_require__(562);
__webpack_require__(561);
__webpack_require__(560);
__webpack_require__(559);
__webpack_require__(558);
__webpack_require__(557);
__webpack_require__(556);
__webpack_require__(555);
__webpack_require__(554);
__webpack_require__(553);
__webpack_require__(552);
__webpack_require__(551);
__webpack_require__(550);
__webpack_require__(549);
__webpack_require__(548);
__webpack_require__(547);
__webpack_require__(546);
__webpack_require__(545);
__webpack_require__(544);
__webpack_require__(543);
__webpack_require__(542);
__webpack_require__(541);
__webpack_require__(540);
__webpack_require__(539);
__webpack_require__(538);
__webpack_require__(537);
__webpack_require__(536);
__webpack_require__(535);
__webpack_require__(534);
__webpack_require__(533);
__webpack_require__(532);
__webpack_require__(531);
module.exports = __webpack_require__(43);
/***/ }),
/* 728 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {
__webpack_require__(727);
__webpack_require__(530);
__webpack_require__(529);
if (global._babelPolyfill) {
throw new Error("only one instance of babel-polyfill is allowed");
}
global._babelPolyfill = true;
var DEFINE_PROPERTY = "defineProperty";
function define(O, key, value) {
O[key] || Object[DEFINE_PROPERTY](O, key, {
writable: true,
configurable: true,
value: value
});
}
define(String.prototype, "padLeft", "".padStart);
define(String.prototype, "padRight", "".padEnd);
"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) {
[][key] && define(Array, key, Function.call.bind([][key]));
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(75)))
/***/ }),
/* 729 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(728);
var _index = __webpack_require__(526);
var settings = _interopRequireWildcard(_index);
var _AdmEntityEditorTemplate = __webpack_require__(456);
var _AdmEntityEditorTemplate2 = _interopRequireDefault(_AdmEntityEditorTemplate);
var _EntityEditorTemplate = __webpack_require__(455);
var _EntityEditorTemplate2 = _interopRequireDefault(_EntityEditorTemplate);
var _expect = __webpack_require__(10);
var _expect2 = _interopRequireDefault(_expect);
var _ExternalLinksEditorTemplate = __webpack_require__(454);
var _ExternalLinksEditorTemplate2 = _interopRequireDefault(_ExternalLinksEditorTemplate);
var _FrbrEditionEditorTemplate = __webpack_require__(453);
var _FrbrEditionEditorTemplate2 = _interopRequireDefault(_FrbrEditionEditorTemplate);
var _FrbrWorkEditorTemplate = __webpack_require__(452);
var _FrbrWorkEditorTemplate2 = _interopRequireDefault(_FrbrWorkEditorTemplate);
var _ApiUtils = __webpack_require__(29);
var _MovieEditorTemplate = __webpack_require__(451);
var _MovieEditorTemplate2 = _interopRequireDefault(_MovieEditorTemplate);
var _edit = __webpack_require__(450);
var _PersonEditorTemplate = __webpack_require__(284);
var _PersonEditorTemplate2 = _interopRequireDefault(_PersonEditorTemplate);
var _SoftwareEditorTemplate = __webpack_require__(283);
var _SoftwareEditorTemplate2 = _interopRequireDefault(_SoftwareEditorTemplate);
var _TaxonEditorTemplate = __webpack_require__(282);
var _TaxonEditorTemplate2 = _interopRequireDefault(_TaxonEditorTemplate);
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; } }
mw.loader.using([//
'jquery.ui', //
'jquery.ui', //
'jquery.uls.data', //
'mediawiki.ForeignApi'], function () {
__webpack_require__(281);
settings.registerEditor(_AdmEntityEditorTemplate2.default);
settings.registerEditor(_EntityEditorTemplate2.default);
settings.registerEditor(_ExternalLinksEditorTemplate2.default);
settings.registerEditor(_FrbrEditionEditorTemplate2.default);
settings.registerEditor(_FrbrWorkEditorTemplate2.default);
settings.registerEditor(_MovieEditorTemplate2.default);
settings.registerEditor(_PersonEditorTemplate2.default);
settings.registerEditor(_SoftwareEditorTemplate2.default);
settings.registerEditor(_TaxonEditorTemplate2.default);
if (mw.config.get('wgArticleId')) {
(0, _ApiUtils.getEntityIdDeferred)().then(function (entityId) {
settings.getEnabledEditors().forEach(function (editorDescription) {
(0, _expect2.default)(editorDescription).toBeAn('object');
(0, _expect2.default)(editorDescription.linkText).toBeA('string');
var editorLeftMenuLink = $(document.createElement('a')).text(editorDescription.linkText).click(function () {
(0, _edit.onEditorLinkClick)(editorDescription, entityId);
});
jQuery('#p-tb div ul').append(jQuery('<li class="plainlinks"></li>').append(editorLeftMenuLink));
});
});
}
var leftMenuLink = $(document.createElement('a')).text(settings.linkText).click(function () {
settings.start();
});
jQuery('#p-tb div ul').append(jQuery('<li class="plainlinks"></li>').append(leftMenuLink));
}, function () {
/*eslint no-console: 0*/
console.log('[WE-F] unable to load WE-F: ');
console.log(arguments);
});
/***/ })
/******/ ]);