UNPKG

cluedin-widget

Version:
1,290 lines (1,080 loc) • 1.7 MB
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[39],{ /***/ 1835: /***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return isType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return assertType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return isScalarType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return assertScalarType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return isObjectType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return assertObjectType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return isInterfaceType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return assertInterfaceType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return isUnionType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return assertUnionType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return isEnumType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return assertEnumType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return isInputObjectType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return assertInputObjectType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return isListType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return assertListType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return isNonNullType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return assertNonNullType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return isInputType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return assertInputType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return isOutputType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return assertOutputType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return isLeafType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return assertLeafType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return isCompositeType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return assertCompositeType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return isAbstractType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return assertAbstractType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return GraphQLList; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return GraphQLNonNull; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return isWrappingType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return assertWrappingType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return isNullableType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return assertNullableType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return getNullableType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return isNamedType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return assertNamedType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return getNamedType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return GraphQLScalarType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return GraphQLObjectType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return isRequiredArgument; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return GraphQLInterfaceType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return GraphQLUnionType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GraphQLEnumType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return GraphQLInputObjectType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return isRequiredInputField; }); /* harmony import */ var _jsutils_defineToJSON__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1958); /* harmony import */ var _jsutils_defineToStringTag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(563); /* harmony import */ var _jsutils_instanceOf__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1911); /* harmony import */ var _jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(336); /* harmony import */ var _jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(456); /* harmony import */ var _jsutils_keyMap__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1850); /* harmony import */ var _language_kinds__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(57); /* harmony import */ var _utilities_valueFromASTUntyped__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1912); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * Copyright (c) 2015-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. * * strict */ function isType(type) { return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type) || isListType(type) || isNonNullType(type); } function assertType(type) { !isType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL type.")) : void 0; return type; } /** * There are predicates for each kind of GraphQL type. */ // eslint-disable-next-line no-redeclare function isScalarType(type) { return Object(_jsutils_instanceOf__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type, GraphQLScalarType); } function assertScalarType(type) { !isScalarType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL Scalar type.")) : void 0; return type; } // eslint-disable-next-line no-redeclare function isObjectType(type) { return Object(_jsutils_instanceOf__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type, GraphQLObjectType); } function assertObjectType(type) { !isObjectType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL Object type.")) : void 0; return type; } // eslint-disable-next-line no-redeclare function isInterfaceType(type) { return Object(_jsutils_instanceOf__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type, GraphQLInterfaceType); } function assertInterfaceType(type) { !isInterfaceType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL Interface type.")) : void 0; return type; } // eslint-disable-next-line no-redeclare function isUnionType(type) { return Object(_jsutils_instanceOf__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type, GraphQLUnionType); } function assertUnionType(type) { !isUnionType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL Union type.")) : void 0; return type; } // eslint-disable-next-line no-redeclare function isEnumType(type) { return Object(_jsutils_instanceOf__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type, GraphQLEnumType); } function assertEnumType(type) { !isEnumType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL Enum type.")) : void 0; return type; } // eslint-disable-next-line no-redeclare function isInputObjectType(type) { return Object(_jsutils_instanceOf__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type, GraphQLInputObjectType); } function assertInputObjectType(type) { !isInputObjectType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL Input Object type.")) : void 0; return type; } // eslint-disable-next-line no-redeclare function isListType(type) { return Object(_jsutils_instanceOf__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type, GraphQLList); } function assertListType(type) { !isListType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL List type.")) : void 0; return type; } // eslint-disable-next-line no-redeclare function isNonNullType(type) { return Object(_jsutils_instanceOf__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type, GraphQLNonNull); } function assertNonNullType(type) { !isNonNullType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL Non-Null type.")) : void 0; return type; } /** * These types may be used as input types for arguments and directives. */ function isInputType(type) { return isScalarType(type) || isEnumType(type) || isInputObjectType(type) || isWrappingType(type) && isInputType(type.ofType); } function assertInputType(type) { !isInputType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL input type.")) : void 0; return type; } /** * These types may be used as output types as the result of fields. */ function isOutputType(type) { return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isWrappingType(type) && isOutputType(type.ofType); } function assertOutputType(type) { !isOutputType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL output type.")) : void 0; return type; } /** * These types may describe types which may be leaf values. */ function isLeafType(type) { return isScalarType(type) || isEnumType(type); } function assertLeafType(type) { !isLeafType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL leaf type.")) : void 0; return type; } /** * These types may describe the parent context of a selection set. */ function isCompositeType(type) { return isObjectType(type) || isInterfaceType(type) || isUnionType(type); } function assertCompositeType(type) { !isCompositeType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL composite type.")) : void 0; return type; } /** * These types may describe the parent context of a selection set. */ function isAbstractType(type) { return isInterfaceType(type) || isUnionType(type); } function assertAbstractType(type) { !isAbstractType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL abstract type.")) : void 0; return type; } /** * List Type Wrapper * * A list is a wrapping type which points to another type. * Lists are often created within the context of defining the fields of * an object type. * * Example: * * const PersonType = new GraphQLObjectType({ * name: 'Person', * fields: () => ({ * parents: { type: GraphQLList(PersonType) }, * children: { type: GraphQLList(PersonType) }, * }) * }) * */ // eslint-disable-next-line no-redeclare function GraphQLList(ofType) { if (this instanceof GraphQLList) { this.ofType = assertType(ofType); } else { return new GraphQLList(ofType); } } // Need to cast through any to alter the prototype. GraphQLList.prototype.toString = function toString() { return '[' + String(this.ofType) + ']'; }; Object(_jsutils_defineToJSON__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(GraphQLList); /** * Non-Null Type Wrapper * * A non-null is a wrapping type which points to another type. * Non-null types enforce that their values are never null and can ensure * an error is raised if this ever occurs during a request. It is useful for * fields which you can make a strong guarantee on non-nullability, for example * usually the id field of a database row will never be null. * * Example: * * const RowType = new GraphQLObjectType({ * name: 'Row', * fields: () => ({ * id: { type: GraphQLNonNull(GraphQLString) }, * }) * }) * * Note: the enforcement of non-nullability occurs within the executor. */ // eslint-disable-next-line no-redeclare function GraphQLNonNull(ofType) { if (this instanceof GraphQLNonNull) { this.ofType = assertNullableType(ofType); } else { return new GraphQLNonNull(ofType); } } // Need to cast through any to alter the prototype. GraphQLNonNull.prototype.toString = function toString() { return String(this.ofType) + '!'; }; Object(_jsutils_defineToJSON__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(GraphQLNonNull); /** * These types wrap and modify other types */ function isWrappingType(type) { return isListType(type) || isNonNullType(type); } function assertWrappingType(type) { !isWrappingType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL wrapping type.")) : void 0; return type; } /** * These types can all accept null as a value. */ function isNullableType(type) { return isType(type) && !isNonNullType(type); } function assertNullableType(type) { !isNullableType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL nullable type.")) : void 0; return type; } /* eslint-disable no-redeclare */ function getNullableType(type) { /* eslint-enable no-redeclare */ if (type) { return isNonNullType(type) ? type.ofType : type; } } /** * These named types do not include modifiers like List or NonNull. */ function isNamedType(type) { return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type); } function assertNamedType(type) { !isNamedType(type) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "Expected ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(type), " to be a GraphQL named type.")) : void 0; return type; } /* eslint-disable no-redeclare */ function getNamedType(type) { /* eslint-enable no-redeclare */ if (type) { var unwrappedType = type; while (isWrappingType(unwrappedType)) { unwrappedType = unwrappedType.ofType; } return unwrappedType; } } /** * Used while defining GraphQL types to allow for circular references in * otherwise immutable type definitions. */ function resolveThunk(thunk) { return typeof thunk === 'function' ? thunk() : thunk; } /** * Scalar Type Definition * * The leaf values of any request and input values to arguments are * Scalars (or Enums) and are defined with a name and a series of functions * used to parse input from ast or variables and to ensure validity. * * If a type's serialize function does not return a value (i.e. it returns * `undefined`) then an error will be raised and a `null` value will be returned * in the response. If the serialize function returns `null`, then no error will * be included in the response. * * Example: * * const OddType = new GraphQLScalarType({ * name: 'Odd', * serialize(value) { * if (value % 2 === 1) { * return value; * } * } * }); * */ var GraphQLScalarType = /*#__PURE__*/ function () { function GraphQLScalarType(config) { _defineProperty(this, "name", void 0); _defineProperty(this, "description", void 0); _defineProperty(this, "serialize", void 0); _defineProperty(this, "parseValue", void 0); _defineProperty(this, "parseLiteral", void 0); _defineProperty(this, "astNode", void 0); _defineProperty(this, "extensionASTNodes", void 0); this.name = config.name; this.description = config.description; this.serialize = config.serialize; this.parseValue = config.parseValue || function (value) { return value; }; this.parseLiteral = config.parseLiteral || _utilities_valueFromASTUntyped__WEBPACK_IMPORTED_MODULE_7__[/* valueFromASTUntyped */ "a"]; this.astNode = config.astNode; this.extensionASTNodes = config.extensionASTNodes; !(typeof config.name === 'string') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, 'Must provide name.') : void 0; !(typeof config.serialize === 'function') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(this.name, " must provide \"serialize\" function. If this custom Scalar ") + 'is also used as an input type, ensure "parseValue" and "parseLiteral" ' + 'functions are also provided.') : void 0; if (config.parseValue || config.parseLiteral) { !(typeof config.parseValue === 'function' && typeof config.parseLiteral === 'function') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(this.name, " must provide both \"parseValue\" and \"parseLiteral\" ") + 'functions.') : void 0; } } var _proto = GraphQLScalarType.prototype; _proto.toString = function toString() { return this.name; }; return GraphQLScalarType; }(); // Conditionally apply `[Symbol.toStringTag]` if `Symbol`s are supported Object(_jsutils_defineToStringTag__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(GraphQLScalarType); Object(_jsutils_defineToJSON__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(GraphQLScalarType); /** * Object Type Definition * * Almost all of the GraphQL types you define will be object types. Object types * have a name, but most importantly describe their fields. * * Example: * * const AddressType = new GraphQLObjectType({ * name: 'Address', * fields: { * street: { type: GraphQLString }, * number: { type: GraphQLInt }, * formatted: { * type: GraphQLString, * resolve(obj) { * return obj.number + ' ' + obj.street * } * } * } * }); * * When two types need to refer to each other, or a type needs to refer to * itself in a field, you can use a function expression (aka a closure or a * thunk) to supply the fields lazily. * * Example: * * const PersonType = new GraphQLObjectType({ * name: 'Person', * fields: () => ({ * name: { type: GraphQLString }, * bestFriend: { type: PersonType }, * }) * }); * */ var GraphQLObjectType = /*#__PURE__*/ function () { function GraphQLObjectType(config) { _defineProperty(this, "name", void 0); _defineProperty(this, "description", void 0); _defineProperty(this, "astNode", void 0); _defineProperty(this, "extensionASTNodes", void 0); _defineProperty(this, "isTypeOf", void 0); _defineProperty(this, "_fields", void 0); _defineProperty(this, "_interfaces", void 0); this.name = config.name; this.description = config.description; this.astNode = config.astNode; this.extensionASTNodes = config.extensionASTNodes; this.isTypeOf = config.isTypeOf; this._fields = defineFieldMap.bind(undefined, config); this._interfaces = defineInterfaces.bind(undefined, config); !(typeof config.name === 'string') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, 'Must provide name.') : void 0; !(config.isTypeOf == null || typeof config.isTypeOf === 'function') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(this.name, " must provide \"isTypeOf\" as a function, ") + "but got: ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(config.isTypeOf), ".")) : void 0; } var _proto2 = GraphQLObjectType.prototype; _proto2.getFields = function getFields() { if (typeof this._fields === 'function') { this._fields = this._fields(); } return this._fields; }; _proto2.getInterfaces = function getInterfaces() { if (typeof this._interfaces === 'function') { this._interfaces = this._interfaces(); } return this._interfaces; }; _proto2.toString = function toString() { return this.name; }; return GraphQLObjectType; }(); // Conditionally apply `[Symbol.toStringTag]` if `Symbol`s are supported Object(_jsutils_defineToStringTag__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(GraphQLObjectType); Object(_jsutils_defineToJSON__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(GraphQLObjectType); function defineInterfaces(config) { var interfaces = resolveThunk(config.interfaces) || []; !Array.isArray(interfaces) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(config.name, " interfaces must be an Array or a function which returns ") + 'an Array.') : void 0; return interfaces; } function defineFieldMap(config) { var fieldMap = resolveThunk(config.fields) || {}; !isPlainObj(fieldMap) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(config.name, " fields must be an object with field names as keys or a ") + 'function which returns such an object.') : void 0; var resultFieldMap = Object.create(null); var _arr = Object.keys(fieldMap); var _loop = function _loop() { var fieldName = _arr[_i]; var fieldConfig = fieldMap[fieldName]; !isPlainObj(fieldConfig) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(config.name, ".").concat(fieldName, " field config must be an object")) : void 0; !!fieldConfig.hasOwnProperty('isDeprecated') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(config.name, ".").concat(fieldName, " should provide \"deprecationReason\" ") + 'instead of "isDeprecated".') : void 0; var field = _objectSpread({}, fieldConfig, { isDeprecated: Boolean(fieldConfig.deprecationReason), name: fieldName }); !(field.resolve == null || typeof field.resolve === 'function') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(config.name, ".").concat(fieldName, " field resolver must be a function if ") + "provided, but got: ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(field.resolve), ".")) : void 0; var argsConfig = fieldConfig.args; if (!argsConfig) { field.args = []; } else { !isPlainObj(argsConfig) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(config.name, ".").concat(fieldName, " args must be an object with argument ") + 'names as keys.') : void 0; field.args = Object.keys(argsConfig).map(function (argName) { var arg = argsConfig[argName]; return { name: argName, description: arg.description === undefined ? null : arg.description, type: arg.type, defaultValue: arg.defaultValue, astNode: arg.astNode }; }); } resultFieldMap[fieldName] = field; }; for (var _i = 0; _i < _arr.length; _i++) { _loop(); } return resultFieldMap; } function isPlainObj(obj) { return obj && _typeof(obj) === 'object' && !Array.isArray(obj); } function isRequiredArgument(arg) { return isNonNullType(arg.type) && arg.defaultValue === undefined; } /** * Interface Type Definition * * When a field can return one of a heterogeneous set of types, a Interface type * is used to describe what types are possible, what fields are in common across * all types, as well as a function to determine which type is actually used * when the field is resolved. * * Example: * * const EntityType = new GraphQLInterfaceType({ * name: 'Entity', * fields: { * name: { type: GraphQLString } * } * }); * */ var GraphQLInterfaceType = /*#__PURE__*/ function () { function GraphQLInterfaceType(config) { _defineProperty(this, "name", void 0); _defineProperty(this, "description", void 0); _defineProperty(this, "astNode", void 0); _defineProperty(this, "extensionASTNodes", void 0); _defineProperty(this, "resolveType", void 0); _defineProperty(this, "_fields", void 0); this.name = config.name; this.description = config.description; this.astNode = config.astNode; this.extensionASTNodes = config.extensionASTNodes; this.resolveType = config.resolveType; this._fields = defineFieldMap.bind(undefined, config); !(typeof config.name === 'string') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, 'Must provide name.') : void 0; !(config.resolveType == null || typeof config.resolveType === 'function') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(this.name, " must provide \"resolveType\" as a function, ") + "but got: ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(config.resolveType), ".")) : void 0; } var _proto3 = GraphQLInterfaceType.prototype; _proto3.getFields = function getFields() { if (typeof this._fields === 'function') { this._fields = this._fields(); } return this._fields; }; _proto3.toString = function toString() { return this.name; }; return GraphQLInterfaceType; }(); // Conditionally apply `[Symbol.toStringTag]` if `Symbol`s are supported Object(_jsutils_defineToStringTag__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(GraphQLInterfaceType); Object(_jsutils_defineToJSON__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(GraphQLInterfaceType); /** * Union Type Definition * * When a field can return one of a heterogeneous set of types, a Union type * is used to describe what types are possible as well as providing a function * to determine which type is actually used when the field is resolved. * * Example: * * const PetType = new GraphQLUnionType({ * name: 'Pet', * types: [ DogType, CatType ], * resolveType(value) { * if (value instanceof Dog) { * return DogType; * } * if (value instanceof Cat) { * return CatType; * } * } * }); * */ var GraphQLUnionType = /*#__PURE__*/ function () { function GraphQLUnionType(config) { _defineProperty(this, "name", void 0); _defineProperty(this, "description", void 0); _defineProperty(this, "astNode", void 0); _defineProperty(this, "extensionASTNodes", void 0); _defineProperty(this, "resolveType", void 0); _defineProperty(this, "_types", void 0); this.name = config.name; this.description = config.description; this.astNode = config.astNode; this.extensionASTNodes = config.extensionASTNodes; this.resolveType = config.resolveType; this._types = defineTypes.bind(undefined, config); !(typeof config.name === 'string') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, 'Must provide name.') : void 0; !(config.resolveType == null || typeof config.resolveType === 'function') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(this.name, " must provide \"resolveType\" as a function, ") + "but got: ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(config.resolveType), ".")) : void 0; } var _proto4 = GraphQLUnionType.prototype; _proto4.getTypes = function getTypes() { if (typeof this._types === 'function') { this._types = this._types(); } return this._types; }; _proto4.toString = function toString() { return this.name; }; return GraphQLUnionType; }(); // Conditionally apply `[Symbol.toStringTag]` if `Symbol`s are supported Object(_jsutils_defineToStringTag__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(GraphQLUnionType); Object(_jsutils_defineToJSON__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(GraphQLUnionType); function defineTypes(config) { var types = resolveThunk(config.types) || []; !Array.isArray(types) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, 'Must provide Array of types or a function which returns ' + "such an array for Union ".concat(config.name, ".")) : void 0; return types; } /** * Enum Type Definition * * Some leaf values of requests and input values are Enums. GraphQL serializes * Enum values as strings, however internally Enums can be represented by any * kind of type, often integers. * * Example: * * const RGBType = new GraphQLEnumType({ * name: 'RGB', * values: { * RED: { value: 0 }, * GREEN: { value: 1 }, * BLUE: { value: 2 } * } * }); * * Note: If a value is not provided in a definition, the name of the enum value * will be used as its internal value. */ var GraphQLEnumType /* <T> */ = /*#__PURE__*/ function () { function GraphQLEnumType(config /* <T> */ ) { _defineProperty(this, "name", void 0); _defineProperty(this, "description", void 0); _defineProperty(this, "astNode", void 0); _defineProperty(this, "extensionASTNodes", void 0); _defineProperty(this, "_values", void 0); _defineProperty(this, "_valueLookup", void 0); _defineProperty(this, "_nameLookup", void 0); this.name = config.name; this.description = config.description; this.astNode = config.astNode; this.extensionASTNodes = config.extensionASTNodes; this._values = defineEnumValues(this, config.values); this._valueLookup = new Map(this._values.map(function (enumValue) { return [enumValue.value, enumValue]; })); this._nameLookup = Object(_jsutils_keyMap__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this._values, function (value) { return value.name; }); !(typeof config.name === 'string') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, 'Must provide name.') : void 0; } var _proto5 = GraphQLEnumType.prototype; _proto5.getValues = function getValues() { return this._values; }; _proto5.getValue = function getValue(name) { return this._nameLookup[name]; }; _proto5.serialize = function serialize(value /* T */ ) { var enumValue = this._valueLookup.get(value); if (enumValue) { return enumValue.name; } }; _proto5.parseValue = function parseValue(value) /* T */ { if (typeof value === 'string') { var enumValue = this.getValue(value); if (enumValue) { return enumValue.value; } } }; _proto5.parseLiteral = function parseLiteral(valueNode, _variables) /* T */ { // Note: variables will be resolved to a value before calling this function. if (valueNode.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].ENUM) { var enumValue = this.getValue(valueNode.value); if (enumValue) { return enumValue.value; } } }; _proto5.toString = function toString() { return this.name; }; return GraphQLEnumType; }(); // Conditionally apply `[Symbol.toStringTag]` if `Symbol`s are supported Object(_jsutils_defineToStringTag__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(GraphQLEnumType); Object(_jsutils_defineToJSON__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(GraphQLEnumType); function defineEnumValues(type, valueMap /* <T> */ ) { !isPlainObj(valueMap) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(type.name, " values must be an object with value names as keys.")) : void 0; return Object.keys(valueMap).map(function (valueName) { var value = valueMap[valueName]; !isPlainObj(value) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(type.name, ".").concat(valueName, " must refer to an object with a \"value\" key ") + "representing an internal value but got: ".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(value), ".")) : void 0; !!value.hasOwnProperty('isDeprecated') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(type.name, ".").concat(valueName, " should provide \"deprecationReason\" instead ") + 'of "isDeprecated".') : void 0; return { name: valueName, description: value.description, isDeprecated: Boolean(value.deprecationReason), deprecationReason: value.deprecationReason, astNode: value.astNode, value: value.hasOwnProperty('value') ? value.value : valueName }; }); } /** * Input Object Type Definition * * An input object defines a structured collection of fields which may be * supplied to a field argument. * * Using `NonNull` will ensure that a value must be provided by the query * * Example: * * const GeoPoint = new GraphQLInputObjectType({ * name: 'GeoPoint', * fields: { * lat: { type: GraphQLNonNull(GraphQLFloat) }, * lon: { type: GraphQLNonNull(GraphQLFloat) }, * alt: { type: GraphQLFloat, defaultValue: 0 }, * } * }); * */ var GraphQLInputObjectType = /*#__PURE__*/ function () { function GraphQLInputObjectType(config) { _defineProperty(this, "name", void 0); _defineProperty(this, "description", void 0); _defineProperty(this, "astNode", void 0); _defineProperty(this, "extensionASTNodes", void 0); _defineProperty(this, "_fields", void 0); this.name = config.name; this.description = config.description; this.astNode = config.astNode; this.extensionASTNodes = config.extensionASTNodes; this._fields = defineInputFieldMap.bind(undefined, config); !(typeof config.name === 'string') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, 'Must provide name.') : void 0; } var _proto6 = GraphQLInputObjectType.prototype; _proto6.getFields = function getFields() { if (typeof this._fields === 'function') { this._fields = this._fields(); } return this._fields; }; _proto6.toString = function toString() { return this.name; }; return GraphQLInputObjectType; }(); // Conditionally apply `[Symbol.toStringTag]` if `Symbol`s are supported Object(_jsutils_defineToStringTag__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(GraphQLInputObjectType); Object(_jsutils_defineToJSON__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(GraphQLInputObjectType); function defineInputFieldMap(config) { var fieldMap = resolveThunk(config.fields) || {}; !isPlainObj(fieldMap) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(config.name, " fields must be an object with field names as keys or a ") + 'function which returns such an object.') : void 0; var resultFieldMap = Object.create(null); var _arr2 = Object.keys(fieldMap); for (var _i2 = 0; _i2 < _arr2.length; _i2++) { var fieldName = _arr2[_i2]; var field = _objectSpread({}, fieldMap[fieldName], { name: fieldName }); !!field.hasOwnProperty('resolve') ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "".concat(config.name, ".").concat(fieldName, " field has a resolve property, but ") + 'Input Types cannot define resolvers.') : void 0; resultFieldMap[fieldName] = field; } return resultFieldMap; } function isRequiredInputField(field) { return isNonNullType(field.type) && field.defaultValue === undefined; } /***/ }), /***/ 1839: /***/ (function(module, exports, __webpack_require__) { "use strict"; // Utilities // function _class(obj) { return Object.prototype.toString.call(obj); } function isString(obj) { return _class(obj) === '[object String]'; } var _hasOwnProperty = Object.prototype.hasOwnProperty; function has(object, key) { return _hasOwnProperty.call(object, key); } // Merge objects // function assign(obj /*from1, from2, from3, ...*/) { var sources = Array.prototype.slice.call(arguments, 1); sources.forEach(function (source) { if (!source) { return; } if (typeof source !== 'object') { throw new TypeError(source + 'must be object'); } Object.keys(source).forEach(function (key) { obj[key] = source[key]; }); }); return obj; } // Remove element from array and put another array at those position. // Useful for some operations with tokens function arrayReplaceAt(src, pos, newElements) { return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1)); } //////////////////////////////////////////////////////////////////////////////// function isValidEntityCode(c) { /*eslint no-bitwise:0*/ // broken sequence if (c >= 0xD800 && c <= 0xDFFF) { return false; } // never used if (c >= 0xFDD0 && c <= 0xFDEF) { return false; } if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; } // control codes if (c >= 0x00 && c <= 0x08) { return false; } if (c === 0x0B) { return false; } if (c >= 0x0E && c <= 0x1F) { return false; } if (c >= 0x7F && c <= 0x9F) { return false; } // out of range if (c > 0x10FFFF) { return false; } return true; } function fromCodePoint(c) { /*eslint no-bitwise:0*/ if (c > 0xffff) { c -= 0x10000; var surrogate1 = 0xd800 + (c >> 10), surrogate2 = 0xdc00 + (c & 0x3ff); return String.fromCharCode(surrogate1, surrogate2); } return String.fromCharCode(c); } var UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g; var ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi; var UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi'); var DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i; var entities = __webpack_require__(1960); function replaceEntityPattern(match, name) { var code = 0; if (has(entities, name)) { return entities[name]; } if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) { code = name[1].toLowerCase() === 'x' ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10); if (isValidEntityCode(code)) { return fromCodePoint(code); } } return match; } /*function replaceEntities(str) { if (str.indexOf('&') < 0) { return str; } return str.replace(ENTITY_RE, replaceEntityPattern); }*/ function unescapeMd(str) { if (str.indexOf('\\') < 0) { return str; } return str.replace(UNESCAPE_MD_RE, '$1'); } function unescapeAll(str) { if (str.indexOf('\\') < 0 && str.indexOf('&') < 0) { return str; } return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) { if (escaped) { return escaped; } return replaceEntityPattern(match, entity); }); } //////////////////////////////////////////////////////////////////////////////// var HTML_ESCAPE_TEST_RE = /[&<>"]/; var HTML_ESCAPE_REPLACE_RE = /[&<>"]/g; var HTML_REPLACEMENTS = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }; function replaceUnsafeChar(ch) { return HTML_REPLACEMENTS[ch]; } function escapeHtml(str) { if (HTML_ESCAPE_TEST_RE.test(str)) { return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar); } return str; } //////////////////////////////////////////////////////////////////////////////// var REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g; function escapeRE(str) { return str.replace(REGEXP_ESCAPE_RE, '\\$&'); } //////////////////////////////////////////////////////////////////////////////// function isSpace(code) { switch (code) { case 0x09: case 0x20: return true; } return false; } // Zs (unicode class) || [\t\f\v\r\n] function isWhiteSpace(code) { if (code >= 0x2000 && code <= 0x200A) { return true; } switch (code) { case 0x09: // \t case 0x0A: // \n case 0x0B: // \v case 0x0C: // \f case 0x0D: // \r case 0x20: case 0xA0: case 0x1680: case 0x202F: case 0x205F: case 0x3000: return true; } return false; } //////////////////////////////////////////////////////////////////////////////// /*eslint-disable max-len*/ var UNICODE_PUNCT_RE = __webpack_require__(1915); // Currently without astral characters support. function isPunctChar(ch) { return UNICODE_PUNCT_RE.test(ch); } // Markdown ASCII punctuation characters. // // !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~ // http://spec.commonmark.org/0.15/#ascii-punctuation-character // // Don't confuse with unicode punctuation !!! It lacks some chars in ascii range. // function isMdAsciiPunct(ch) { switch (ch) { case 0x21/* ! */: case 0x22/* " */: case 0x23/* # */: case 0x24/* $ */: case 0x25/* % */: case 0x26/* & */: case 0x27/* ' */: case 0x28/* ( */: case 0x29/* ) */: case 0x2A/* * */: case 0x2B/* + */: case 0x2C/* , */: case 0x2D/* - */: case 0x2E/* . */: case 0x2F/* / */: case 0x3A/* : */: case 0x3B/* ; */: case 0x3C/* < */: case 0x3D/* = */: case 0x3E/* > */: case 0x3F/* ? */: case 0x40/* @ */: case 0x5B/* [ */: case 0x5C/* \ */: case 0x5D/* ] */: case 0x5E/* ^ */: case 0x5F/* _ */: case 0x60/* ` */: case 0x7B/* { */: case 0x7C/* | */: case 0x7D/* } */: case 0x7E/* ~ */: return true; default: return false; } } // Hepler to unify [reference labels]. // function normalizeReference(str) { // use .toUpperCase() instead of .toLowerCase() // here to avoid a conflict with Object.prototype // members (most notably, `__proto__`) return str.trim().replace(/\s+/g, ' ').toUpperCase(); } //////////////////////////////////////////////////////////////////////////////// // Re-export libraries commonly used in both markdown-it and its plugins, // so plugins won't have to depend on them explicitly, which reduces their // bundled size (e.g. a browser build). // exports.lib = {}; exports.lib.mdurl = __webpack_require__(1961); exports.lib.ucmicro = __webpack_require__(2199); exports.assign = assign; exports.isString = isString; exports.has = has; exports.unescapeMd = unescapeMd; exports.unescapeAll = unescapeAll; exports.isValidEntityCode = isValidEntityCode; exports.fromCodePoint = fromCodePoint; // exports.replaceEntities = replaceEntities; exports.escapeHtml = escapeHtml; exports.arrayReplaceAt = arrayReplaceAt; exports.isSpace = isSpace; exports.isWhiteSpace = isWhiteSpace; exports.isMdAsciiPunct = isMdAsciiPunct; exports.isPunctChar = isPunctChar; exports.escapeRE = escapeRE; exports.normalizeReference = normalizeReference; /***/ }), /***/ 1840: /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE // This is CodeMirror (https://codemirror.net), a code editor // implemented in JavaScript on top of the browser's DOM. // // You can find some technical background for some of the code below // at http://marijnhaverbeke.nl/blog/#cm-internals . (function (global, factory) { true ? module.exports = factory() : undefined; }(this, (function () { 'use strict'; // Kludges for bugs and behavior differences that can't be feature // detected are enabled based on userAgent etc sniffing. var userAgent = navigator.userAgent; var platform = navigator.platform; var gecko = /gecko\/\d/i.test(userAgent); var ie_upto10 = /MSIE \d/.test(userAgent); var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent); var edge = /Edge\/(\d+)/.exec(userAgent); var ie = ie_upto10 || ie_11up || edge; var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]); var webkit = !edge && /WebKit\//.test(userAgent); var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent); var chrome = !edge && /Chrome\//.test(userAgent); var presto = /Opera\//.test(userAgent); var safari = /Apple Computer/.test(navigator.vendor); var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent); var phantom = /PhantomJS/.test(userAgent); var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent); var android = /Android/.test(userAgent); // This is woefully incomplete. Suggestions for alternative methods welcome. var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent); var mac = ios || /Mac/.test(platform); var chromeOS = /\bCrOS\b/.test(userAgent); var windows = /win/i.test(platform); var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/); if (presto_version) { presto_version = Number(presto_version[1]); } if (presto_version && presto_version >= 15) { presto = false; webkit = true; } // Some browsers use the wrong event properties to signal cmd/ctrl on OS X var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11)); var captureRightClick = gecko || (ie && ie_version >= 9); function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") } var rmClass = function(node, cls) { var current = node.className; var match = classTest(cls).exec(current); if (match) { var after = current.slice(match.index + match[0].length); node.className = current.slice(0, match.index) + (after ? match[1] + after : ""); } }; function removeChildren(e) { for (var count = e.childNodes.length; count > 0; --count) { e.removeChild(e.firstChild); } return e } function removeChildrenAndAdd(parent, e) { return removeChildren(parent).appendChild(e) } function elt(tag, content, className, style) { var e = document.createElement(tag); i