(globalThis["webpackChunkverso"] = globalThis["webpackChunkverso"] || []).push([[3796],{ /***/ 64744: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96540); /*! * Adapted from jQuery UI core * * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/category/ui-core/ */ var tabbableNode = /input|select|textarea|button|object/; var focusSelector = 'a, input, select, textarea, button, object, [tabindex]'; function hidden(el) { if (false) {} return el.offsetWidth <= 0 && el.offsetHeight <= 0 || el.style.display === 'none'; } function visible(element) { var parentElement = element; while (parentElement) { if (parentElement === document.body) break; if (hidden(parentElement)) return false; parentElement = parentElement.parentNode; } return true; } function getElementTabIndex(element) { var tabIndex = element.getAttribute('tabindex'); if (tabIndex === null) tabIndex = undefined; return parseInt(tabIndex, 10); } function focusable(element) { var nodeName = element.nodeName.toLowerCase(); var isTabIndexNotNaN = !isNaN(getElementTabIndex(element)); var res = // @ts-ignore tabbableNode.test(nodeName) && !element.disabled || (element instanceof HTMLAnchorElement ? element.href || isTabIndexNotNaN : isTabIndexNotNaN); return res && visible(element); } function tabbable(element) { var tabIndex = getElementTabIndex(element); var isTabIndexNaN = isNaN(tabIndex); return (isTabIndexNaN || tabIndex >= 0) && focusable(element); } /** * Tabbable elements are elements the user can tab between. This excludes elements with tabIndex=-1 * */ function findTabbableDescendants(element) { return Array.from(element.querySelectorAll(focusSelector)).filter(tabbable); } var focusLaterElements = []; var focusElement = null; var needToFocus = false; function handleBlur() { needToFocus = true; } function handleFocus() { if (needToFocus) { needToFocus = false; if (!focusElement) { return; } if (!focusElement) return; if (focusElement.contains(document.activeElement)) { return; } var el = findTabbableDescendants(focusElement)[0] || focusElement; el.focus(); } } function markForFocusLater() { focusLaterElements.push(document.activeElement); } function returnFocus() { var toFocus = null; try { toFocus = focusLaterElements.pop(); if (toFocus) toFocus.focus(); } catch (e) { // eslint-disable-next-line no-console console.warn(['You tried to return focus to', toFocus, 'but it is not in the DOM anymore'].join(' ')); } } function setupScopedFocus(element) { focusElement = element; document.addEventListener('focusout', handleBlur, false); document.addEventListener('focusin', handleFocus, true); } function teardownScopedFocus() { focusElement = null; document.removeEventListener('focusout', handleBlur); document.removeEventListener('focusin', handleFocus); } /** * Controls tabbing, so it stays inside the node element * @param node * @param event */ function scopeTab(node, event) { var tabbable = findTabbableDescendants(node); if (!tabbable.length) { event.preventDefault(); return; } var finalTabbable = tabbable[event.shiftKey ? 0 : tabbable.length - 1]; var leavingFinalTabbable = finalTabbable === document.activeElement || // handle immediate shift+tab after opening with mouse node === document.activeElement; if (!leavingFinalTabbable) return; event.preventDefault(); var target = tabbable[event.shiftKey ? tabbable.length - 1 : 0]; if (target) target.focus(); } /** * Sets `aria-hidden` on all elements on the body, except for the active node. **/ function createAriaHider(containerNode, selector) { if (selector === void 0) { selector = 'body > :not(script)'; } var rootNodes = Array.from(document.querySelectorAll(selector)).map(function (node) { if (node.contains(containerNode)) { return undefined; } var ariaHidden = node.getAttribute('aria-hidden'); if (ariaHidden === null || ariaHidden === 'false') { node.setAttribute('aria-hidden', 'true'); } return { node: node, ariaHidden: ariaHidden }; }); return function () { rootNodes.forEach(function (item) { if (!item) return; if (item.ariaHidden === null) { item.node.removeAttribute('aria-hidden'); } else { item.node.setAttribute('aria-hidden', item.ariaHidden); } }); }; } /** * Traps focus to DOM node. Use this with a modal to ensure the user focus doesn't leave. * */ function useFocusTrap(active, options) { if (active === void 0) { active = true; } if (options === void 0) { options = {}; } var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(); var restoreAria = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); var setRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (node) { if (restoreAria.current) { restoreAria.current(); } if (ref.current) { returnFocus(); teardownScopedFocus(); } if (active && node) { setupScopedFocus(node); markForFocusLater(); var processNode = function processNode(node) { // See if we should disable aria restoreAria.current = !options.disableAriaHider ? createAriaHider(node) : null; // Find the initial focus element var focusElement = null; if (options.focusSelector) { focusElement = typeof options.focusSelector === 'string' ? node.querySelector(options.focusSelector) : options.focusSelector; } if (!focusElement) { var children = Array.from(node.querySelectorAll(focusSelector)); focusElement = // Prefer tabbable elements, But fallback to any focusable element children.find(tabbable) || // But fallback to any focusable element children.find(focusable) || // Nothing found null; // If everything else fails, see if the node itself can handle focus if (!focusElement && focusable(node)) focusElement = node; } if (focusElement) { // Set the initial focus inside the traps focusElement.focus(); } else { if (false) {} } }; // Delay processing the HTML node by a frame. This ensures focus is assigned correctly. setTimeout(function () { if (node.ownerDocument) { processNode(node); } else if (false) {} }); ref.current = node; } else { ref.current = null; } }, [active, options.focusSelector, options.disableAriaHider]); (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { if (!active) return undefined; var handleKeyDown = function handleKeyDown(event) { if (event.key === 'Tab' && ref.current) { scopeTab(ref.current, event); } }; document.addEventListener('keydown', handleKeyDown); return function () { document.removeEventListener('keydown', handleKeyDown); }; }, [active]); return setRef; } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useFocusTrap); /***/ }), /***/ 25888: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; 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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var internals = __webpack_require__(33410); /** * Vulcan utilities */ var Vulcan = function () { function Vulcan(options) { _classCallCheck(this, Vulcan); options = options || {}; var config = {}; this.defaultSizeParam = internals.DEFAULT_SIZE_PARAM; /** * Set default cdn value * * @param {string} value - cdn domain * @param {object} [options] - CDN options * @param {boolean} [options.isBranded] - flag indicating branded content * @returns {string} - cdn domain */ this.setCDN = function (value, options) { if (typeof value !== 'string' || !value.length) { throw new Error('Image cdn config must be set with a string value'); } var field = options && options.isBranded ? 'brandedCdn' : 'cdn'; config[field] = value; return config[field]; }; /** * Gets CDN URL from Vulcan instance * * @param {object} [options] - image src generation options * @param {string} [options.cdn] - cdn domain override (always takes priority) * @param {boolean} [options.isBranded] - flag indicating branded content * @returns {string} CDN URL. */ this.getCDN = function (options) { options = options || {}; var cdn = options.cdn || options.isBranded && config.brandedCdn || config.cdn; return cdn || ''; }; if (options.cdn) { this.setCDN(options.cdn); } if (options.brandedCdn) { this.setCDN(options.brandedCdn, { isBranded: true }); } } /** * setCDN alias * * @param {string} cdn - cdn domain * @returns {undefined} undefined */ _createClass(Vulcan, [{ key: 'buildParams', /** * Builds image modifer parameters for a vulcan URL. Should replace "pass". * * @param {object} options - The same options hash as buildVulcanUrl. * @param {number} [options.width] - Maximum width desired * @param {number} [options.height] - Maximum height desired * @param {number} [options.mod] - Multiplier (optional). Defaults to 1. * @param {boolean} [options.limit] - Prevent Vulcan from scaling the image up * Defaults to `true`. * @param {string} [options.overlay] - Allows for adding an overlay over an * image. Defaults to ''. * @returns {string} - vulcan size parameters, e.g. 'w_400,h_300,c_limit' */ value: function buildParams(options) { return internals.buildParams(options); } /** * Builds a Vulcan URL. When not fronted by the CDN, these are of the form: * * http://ci-vulcan-api.aws.conde.io/gq/5568bc48c7875f5574d18bd3/master/pass/suki-waterhouse.jpg * * Where `master` can be replaced by an aspect ratio (_e.g._ 1:1) and * `pass` can be replaced by height and width information, like so: * * http://ci-vulcan-api.aws.conde.io/gq/5568bc48c7875f5574d18bd3/1:1/w_200,h_200/suki-waterhouse.jpg * * Clips will always have `pass` for their transformation as they don't support them. And instead * of an aspect ratio you will have a string representing the resolution (_e.g._ 1080p, 720p, 360p) * * @param {object} data - Image or Clip data object from the copilot API. * @param {object} options - An options hash. * @param {string} [options.aspectRatio] - Desired image aspect ratio (optional). If not provided, * the aspect ratio will be the master image aspect ratio (its "original" ratio in Vulcan). * @param {string} [options.resolution] - Desired clip resolution (optional). If not provided, * the aspect ratio will be the master clip resolution (its "original" resolution in Vulcan). * @param {number} [options.width] - Maximum width desired (optional). If not provided, * the image width will be the master image width (its "original" width in Vulcan). * @param {number} [options.height] - Maximum height desired (optional). If not provided, * the image height will be the master image height (its "original" height in Vulcan). * @param {number} [options.mod] - Multiplier (optional). Defaults to 1. * @param {string} [options.cdn] - CDN fronting the image (optional). * @param {boolean} [options.limit] - Prevents Vulcan from scaling the image up (optional). Defaults to true. * @param {string} [options.overlay] - Allows for adding an overlay over an image. Defaults to ''. * @returns {string} The Vulcan URL. */ }, { key: 'buildUrl', value: function buildUrl(data, options) { options = options || {}; var cdn = this.getCDN(options); var type = data.collection || 'photos'; var urlBuilder = internals.buildUrlPathFor[type]; if (typeof urlBuilder !== 'function') { throw new Error('Unknown type "' + type + '", cannot generate URL'); } var path = urlBuilder(data, options); return internals.safeEncodeURI([cdn, path].join('/')); } /** * Get a list of supported collections * * @returns {string[]} collections */ }, { key: 'getSupportedCollections', value: function getSupportedCollections() { return Object.keys(internals.buildUrlPathFor); } /** * Parse vulcan URL * * @param {string} url - vulcan url * @returns {object} data - image data */ }, { key: 'parse', value: function parse(url) { if (!internals.RE_IMG_URL.test(url)) { return {}; } var matches = url.match(internals.RE_IMG_URL); var fields = internals.IMG_FIELDS; var reducer = internals.collateParsedFields; var parsedData = fields.reduce(reducer, { matches: matches }); return internals.toParseStructure(parsedData); } /** * Modify vulcan url with new transformation options * * @param {string} url - vulcan url * @param {object} transformations - A transformation options hash. * @returns {string} The Vulcan URL. */ }, { key: 'modify', value: function modify(url, transformations) { if (!transformations) { return url; } var parsed = this.parse(url); var options = Object.assign({}, parsed.options, transformations); return this.buildUrl(parsed.data, options); } }, { key: 'cdn', set: function set(cdn) { this.setCDN(cdn); } /** * Getter for CDN * * @returns {string} CDN URL. */ , get: function get() { return this.getCDN(); } }]); return Vulcan; }(); /** * @exports {Object} vulcan instance */ module.exports = new Vulcan(); /** * @param {object} options - Options object * @param {string} options.cdn - CDN domain * @param {string} options.brandedCdn - Branded CDN domain * @returns {object} Vulcan instance */ module.exports.create = function (options) { return new Vulcan(options); }; /***/ }), /***/ 33410: /***/ ((module) => { "use strict"; var internals = {}; /** * @constant {string} DEFAULT_SIZE_PARAM - default param without size overrides */ internals.DEFAULT_SIZE_PARAM = 'pass'; /** * @constant {string} OPTION_LIMIT - limit option */ internals.OPTION_LIMIT = 'c_limit'; /** * @constant {Array} IMG_FIELDS - vulcan url field names in order of RE_IMG_URL match groups */ internals.IMG_FIELDS = ['input', 'cdn', 'collection', 'id', 'aspectRatio', 'transformations', 'filename']; /** * @constant {RegExp} RE_IMG_URL - vulcan url pattern matcher * @see http://vulcan-api.aws.conde.io/docs/migrating_to_vulcan.html#constructing-a-vulcan-url */ internals.RE_IMG_URL = /^((?:https?:\/\/)?.+?)?\/([a-z]+)\/([a-z0-9]{24})\/(master|\d+:\d+)\/(\S+)\/(.+)$/; /** * @constant {string} RE_OVERLAY_SANITIZATION - Expresses legal characters for the overlay string */ internals.RE_OVERLAY_SANITIZATION = /[^a-z-]/g; /** * Builds image modifer parameters for a vulcan URL. Should replace "pass". * * @param {object} options - The same options hash as buildVulcanUrl. * @param {number} [options.width] - Maximum width desired * @param {number} [options.height] - Maximum height desired * @param {number} [options.mod] - Multiplier (optional). Defaults to 1. * @param {boolean} [options.limit] - Prevent Vulcan from scaling the image up * Defaults to `true`. * @param {string} [options.overlay] - Allows for adding an overlay over an * image. Defaults to ''. * @returns {string} - vulcan size parameters, e.g. 'w_400,h_300,c_limit' * @public */ internals.buildParams = function (options) { if (!options || !options.width && !options.height) { return internals.DEFAULT_SIZE_PARAM; } var mod = parseInt(options.mod, 10) || 1; // The `parseInt()`s here probably aren't necessary, but // 1.) will do the Right Thing™ if someone passes a string, and // 2.) will do the Right Thing™ if someone passes a string + unit // (_e.g._ '200px' instead of 200). (EQW 08 Jun 2015) var width = options.width && 'w_' + parseInt(options.width, 10) * mod; var height = options.height && 'h_' + parseInt(options.height, 10) * mod; // Including c_limit ensures Vulcan preserves aspect ratio. // We want to be explicit about not preserving aspect ratio, // so we won't trade on falsiness & will instead check for // boolean false here. // @see https://github.com/CondeNast/vulcan#c_type var stretch = options.limit === false ? '' : internals.OPTION_LIMIT; // Add the sanitized overlay parameter var overlay = options.overlay ? 'o_' + options.overlay.replace(this.RE_OVERLAY_SANITIZATION, '') : ''; return [width, height, stretch, overlay].filter(Boolean).join(','); }; /** * Map parsed fields by field name * * @param {object} parsedData - data accumulator * @param {Array} parsedData.matches - parsed match groups * @param {string} fieldName - correlating field name, e.g. "id" or "aspectRatio", * @param {number} fieldIndex - index by which to correlate fields and matches * @returns {object} parsed data */ internals.collateParsedFields = function (parsedData, fieldName, fieldIndex) { if (fieldName === 'input') { return parsedData; } var matches = parsedData.matches; var val = matches[fieldIndex]; if (fieldName === 'transformations') { val = internals.parseTransformations(val); } parsedData[fieldName] = val; return parsedData; }; /** * @constant {object.} OPTION_MAP - mapping transformations to field names */ internals.OPTION_MAP = { h: 'height', o: 'overlay', w: 'width' }; /** * Test for photo transformations in substring * * @param {string} str - photo transformations substring * @returns {boolean} true if valid for parsing */ internals.hasTransformations = function (str) { return typeof str === 'string' && str.length > 0 && str !== internals.DEFAULT_SIZE_PARAM; }; /** * Parse options from vulcan url substring * * @param {string} transformations - photo transformations substring * @returns {object} options data */ internals.parseTransformations = function (transformations) { if (!internals.hasTransformations(transformations)) { return {}; } return transformations.split(',').reduce(function (acc, cur) { if (cur === internals.OPTION_LIMIT) { acc.limit = true; return acc; } var parts = cur.split('_'); var key = parts[0]; var val = parts[1]; var name = internals.OPTION_MAP[key] || key; acc[name] = Number(val) || val; return acc; }, {}); }; /** * Convert parsed url data into a structured response object * * @param {object} data - parsed url data * @returns {object} structured data * @returns {object.data} entity data * @returns {object.options} entity options and transformations */ internals.toParseStructure = function (data) { return { data: { id: data.id, filename: data.filename, collection: data.collection }, options: Object.assign({}, data.transformations, { cdn: data.cdn, aspectRatio: data.aspectRatio }) }; }; /** * Safely encode a URI. We decode the URI before encoding it to prevent double * escaping. * * @param {string} uri - uri to encode * @returns {string} encoded uri */ internals.safeEncodeURI = function (uri) { var encodedUri = void 0; try { // Some uri arrive with Windows-1252 encoded characters like %96 (-), decodeURI only support UTF-8. encodedUri = decodeURI(uri); } catch (err) { encodedUri = uri; } return encodeURI(encodedUri); }; /** * @constant {object.} buildUrlPathFor - maps content types to build function */ internals.buildUrlPathFor = { /** * @param {object} data - Image or Photo data object from the copilot API. * @param {object} options - An options hash. * @returns {string} The path portion of the Vulcan URL for a photo. */ photos: function photos(data, options) { var aspectRatio = options.aspectRatio || 'master'; var collection = data.collection || 'photos'; var transformations = internals.buildParams(options); return collection + '/' + data.id + '/' + aspectRatio + '/' + transformations + '/' + data.filename; }, /** * @param {object} data - Image or Clip data object from the copilot API. * @param {object} options - An options hash. * @returns {string} The path portion of the Vulcan URL for a clip. */ clips: function clips(data, options) { var resolution = options.resolution || 'master'; return 'clips/' + data.id + '/' + resolution + '/pass/' + data.filename; } }; /** * Build cartoon URLs following the existing `photos` pattern */ internals.buildUrlPathFor.cartoons = internals.buildUrlPathFor.photos; module.exports = internals; /***/ }), /***/ 75555: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { encode, decode } = __webpack_require__(95364)( '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz', ); const delimiter = '|'; const legacyDelimiter = ':'; const indexValueSeparator = '::'; // NOTE: // - Numbers are the indexes to identify the parameter // - Create new number, if new parameter wants to add const inputParams = { 1: 'brand', 2: 'offerUrl', 3: 'offerId', 4: 'product', 5: 'origin', 6: 'locale', 7: 'channel', 8: 'campaign', 9: 'component', 10: 'bucket', 11: 'actionId', 12: 'referrer', 14: 'productPosition', 15: 'xid', 16: 'amguuid', }; /** * Identifying if the decoded value from legacy encoded string or not. * * @param {string} decoded - Encoded string or input params objects * @returns {boolean} true if legacy string, else false */ const isLegacyEncodedText = (decoded) => decoded.indexOf(delimiter) < 0; const sortInputParamIndexes = (params) => Object.keys(params).sort((a, b) => a - b); /** * Parsing decoded string in legacy format * * @param {string} decoded - Encoded string or input params objects * @returns {boolean} true if legacy string, else false */ const parseLegacyDecodedText = (decoded) => { const [organizationId, ...urlParts] = decoded.split(legacyDelimiter); const offerInfo = urlParts ? urlParts.join(legacyDelimiter) : undefined; const output = Object.values(inputParams).reduce((acc, cur) => ({ ...acc, [cur]: '' }), {}); if (offerInfo.indexOf('http') > -1) { output.offerUrl = offerInfo; } else { const [product, offerId] = offerInfo.split(':'); output.product = product; output.offerId = offerId; } return { ...output, brand: organizationId, }; }; /** * Covert encoded text into input parameter object. * * @description This fucntion converts encoded string into input parameter object. * * @param {string} encoded - Encoded string * @returns {object} Input parameters */ const decodeAffiliateParams = (encoded) => { const input = decode(encoded); const decoded = new TextDecoder().decode(input); // identifying the encoded string is an legacy encoded if (isLegacyEncodedText(decoded)) { return parseLegacyDecodedText(decoded); } const decodedParts = decoded.split(delimiter); const decodedPartsParams = decodedParts.reduce((acc, cur) => { const [index, ...vals] = cur.split(indexValueSeparator); const value = vals.join(legacyDelimiter); if (value) acc[index] = value; return acc; }, {}); return sortInputParamIndexes(inputParams).reduce((acc, ip) => ({ ...acc, [inputParams[ip]]: decodedPartsParams[ip] || '' }), {}); }; const validateParameters = (params) => { // Brand and origin is mandatory if (!params.brand || !params.origin) { return false; } // Either offer URL or offer ID is mandatory if (!params.offerId && !params.offerUrl) { return false; } // If offer ID is there then product is mandatory if (params.offerId && !params.product) { return false; } return true; }; /** * Covert input parameters to encoded text. * * @description This fucntion converts input parameters into encoded text or * override the existing encoded string with new parameter. * * @param {object | string} encoded - Encoded string or input params objects * @param {object} - Input params objects * @returns {string} Encoded string */ const encodeAffiliateParams = (encoded, options = {}) => { let opts = options; if (typeof encoded !== 'string') { opts = encoded; } else { opts = { ...decodeAffiliateParams(encoded), ...options }; } const isValid = validateParameters(opts); if (!isValid) { throw new Error('Invalid parameters'); } const affiliateURLParams = sortInputParamIndexes(inputParams) .map((inputParamIndex) => opts[inputParams[inputParamIndex]] ? `${inputParamIndex}${indexValueSeparator}${opts[inputParams[inputParamIndex]]}` : '') .filter(Boolean); const affliateString = `${affiliateURLParams.join(delimiter)}`; const input = new TextEncoder().encode(affliateString); return encode(input); }; module.exports = { encodeAffiliateParams, decodeAffiliateParams, }; /***/ }), /***/ 46886: /***/ ((module, exports) => { "use strict"; /*! sticky-position 1.0.1 license: MIT http://www.jacklmoore.com/sticky-position */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = function () { var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var _ref$primary = _ref.primary; var primary = _ref$primary === undefined ? null : _ref$primary; var _ref$placeholder = _ref.placeholder; var placeholder = _ref$placeholder === undefined ? null : _ref$placeholder; var _ref$wrapper = _ref.wrapper; var wrapper = _ref$wrapper === undefined ? null : _ref$wrapper; var _ref$computeWidth = _ref.computeWidth; var computeWidth = _ref$computeWidth === undefined ? true : _ref$computeWidth; var _ref$isSupported = _ref.isSupported; var isSupported = _ref$isSupported === undefined ? null : _ref$isSupported; var top = null; var isSticky = false; isSupported = isSupported ? null : isSupported; /* * @description If default.isSupported is anything except `null` the polyfill will use the JS method. */ var nativeSupport = (function () { if (this.isSupported !== null) { return this.isSupported; } else { var style = document.createElement('test').style; style.cssText = ['-webkit-', '-ms-', ''].map(function (prefix) { return 'position: ' + prefix + 'sticky'; }).join(';'); this.isSupported = style.position.indexOf('sticky') !== -1; return this.isSupported; } }).bind({ isSupported: isSupported }); function stick() { if (isSticky === true) return; primary.style.position = 'fixed'; isSticky = true; } function unstick() { if (isSticky === false) return; primary.style.position = 'relative'; primary.style.width = ''; primary.style.top = ''; primary.style.left = ''; placeholder.style.height = ''; placeholder.style.width = ''; isSticky = false; } function init() { // positioning necessary for getComputedStyle to report the correct z-index value. wrapper.style.position = 'relative'; var style = window.getComputedStyle(wrapper, null); top = parseInt(style.top) || 0; primary.style.zIndex = style.zIndex; primary.style.position = 'relative'; wrapper.style.top = 0; // Giving the placeholder an overflow of 'hidden' or 'auto' will allow it to clear any bottom margin extending beneath the primary element. // Clearing that margin is needed so that it's contribution to the wrapper element's height can be measured with getBoundingClientRect. placeholder.style.overflow = 'hidden'; update(); window.addEventListener('load', update); window.addEventListener('scroll', update); window.addEventListener('resize', update); } function update() { var rect = wrapper.getBoundingClientRect(); var sticky = rect.top < top; if (sticky) { placeholder.style.height = rect.height + 'px'; if (computeWidth) { placeholder.style.width = rect.width + 'px'; } var parentRect = wrapper.parentNode.getBoundingClientRect(); primary.style.top = Math.min(parentRect.top + parentRect.height - rect.height, top) + 'px'; primary.style.width = computeWidth ? rect.width + 'px' : '100%'; primary.style.left = rect.left + 'px'; stick(); } else { unstick(); } } function destroy() { window.removeEventListener('load', update); window.removeEventListener('scroll', update); window.removeEventListener('resize', update); unstick(); } if (nativeSupport()) { return { update: function update() {}, destroy: function destroy() {} }; } else { init(); return { update: update, destroy: destroy }; } }; module.exports = exports['default']; /***/ }), /***/ 73396: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ERROR_API_KEY_EXPIRED: () => (/* binding */ T), /* harmony export */ ERROR_API_KEY_INVALID: () => (/* binding */ N), /* harmony export */ ERROR_API_KEY_MISSING: () => (/* binding */ I), /* harmony export */ ERROR_BAD_REQUEST_FORMAT: () => (/* binding */ m), /* harmony export */ ERROR_BAD_RESPONSE_FORMAT: () => (/* binding */ s), /* harmony export */ ERROR_CLIENT_TIMEOUT: () => (/* binding */ u), /* harmony export */ ERROR_CSP_BLOCK: () => (/* binding */ f), /* harmony export */ ERROR_FORBIDDEN_ENDPOINT: () => (/* binding */ O), /* harmony export */ ERROR_FORBIDDEN_HEADER: () => (/* binding */ D), /* harmony export */ ERROR_FORBIDDEN_ORIGIN: () => (/* binding */ y), /* harmony export */ ERROR_GENERAL_SERVER_FAILURE: () => (/* binding */ w), /* harmony export */ ERROR_INSTALLATION_METHOD_RESTRICTED: () => (/* binding */ _), /* harmony export */ ERROR_INTEGRATION_FAILURE: () => (/* binding */ h), /* harmony export */ ERROR_INVALID_ENDPOINT: () => (/* binding */ l), /* harmony export */ ERROR_NETWORK_ABORT: () => (/* binding */ c), /* harmony export */ ERROR_NETWORK_CONNECTION: () => (/* binding */ R), /* harmony export */ ERROR_RATE_LIMIT: () => (/* binding */ P), /* harmony export */ ERROR_SCRIPT_LOAD_FAIL: () => (/* binding */ b), /* harmony export */ ERROR_SERVER_TIMEOUT: () => (/* binding */ A), /* harmony export */ ERROR_SUBSCRIPTION_NOT_ACTIVE: () => (/* binding */ p), /* harmony export */ ERROR_TOKEN_EXPIRED: () => (/* binding */ L), /* harmony export */ ERROR_TOKEN_INVALID: () => (/* binding */ g), /* harmony export */ ERROR_TOKEN_MISSING: () => (/* binding */ S), /* harmony export */ ERROR_UNSUPPORTED_VERSION: () => (/* binding */ v), /* harmony export */ ERROR_WRONG_REGION: () => (/* binding */ d), /* harmony export */ "default": () => (/* binding */ G), /* harmony export */ defaultEndpoint: () => (/* binding */ i), /* harmony export */ defaultScriptUrlPattern: () => (/* binding */ B), /* harmony export */ defaultTlsEndpoint: () => (/* binding */ a), /* harmony export */ load: () => (/* binding */ F) /* harmony export */ }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8674); /** * Fingerprint Pro v3.11.2 - Copyright (c) FingerprintJS, Inc, 2024 (https://fingerprint.com) */ function r(e,t){return function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)?e[t]:void 0}function o(e,t,n,r){var o,i=document,a="securitypolicyviolation",u=function(t){var n=new URL(e,location.href),r=t.blockedURI;r!==n.href&&r!==n.protocol.slice(0,-1)&&r!==n.origin||(o=t,R())};i.addEventListener(a,u);var R=function(){return i.removeEventListener(a,u)};return null==r||r.then(R,R),Promise.resolve().then(t).then((function(e){return R(),e}),(function(e){return new Promise((function(e){var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(null)})).then((function(){if(R(),o)return n(o);throw e}))}))}var i={default:"endpoint"},a={default:"tlsEndpoint"},u="Client timeout",R="Network connection error",c="Network request aborted",s="Response cannot be parsed",f="Blocked by CSP",l="The endpoint parameter is not a valid URL";function E(e){for(var t="",n=0;n0){var r=e[n].toLowerCase();r!==e[n]?t+=" ".concat(r):t+=e[n]}else t+=e[n].toUpperCase();return t}var d=/*#__PURE__*/E("WrongRegion"),p=/*#__PURE__*/E("SubscriptionNotActive"),v=/*#__PURE__*/E("UnsupportedVersion"),_=/*#__PURE__*/E("InstallationMethodRestricted"),O=/*#__PURE__*/E("HostnameRestricted"),h=/*#__PURE__*/E("IntegrationFailed"),I="API key required",N="API key not found",T="API key expired",m="Request cannot be parsed",w="Request failed",A="Request failed to process",P="Too many requests, rate limit exceeded",y="Not available for this origin",D="Not available with restricted header",S=I,g=N,L=T,U="3.11.2",b="Failed to load the JS script of the agent",C="9319";function M(t,n){var r,o,i,a,u,R,c=[],s=(r=function(t){var n=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__spreadArray)([],t,!0);return{current:function(){return n[0]},postpone:function(){var e=n.shift();void 0!==e&&n.push(e)},exclude:function(){n.shift()}}}(t),a=100,u=3e3,R=0,o=function(){return Math.random()*Math.min(u,a*Math.pow(2,R++))},i=new Set,[r.current(),function(e,t){var n,a=t instanceof Error?t.message:"";if(a===f||a===l)r.exclude(),n=0;else if(a===C)r.exclude();else if(a===b){var u=Date.now()-e.getTime()<50,R=r.current();R&&u&&!i.has(R)&&(i.add(R),n=0),r.postpone()}else r.postpone();var c=r.current();return void 0===c?void 0:[c,null!=n?n:e.getTime()+o()-Date.now()]}]),E=s[0],d=s[1];if(void 0===E)return Promise.reject(new TypeError("The list of script URL patterns is empty"));var p=function(e){var t=new Date,r=function(n){return c.push({url:e,startedAt:t,finishedAt:new Date,error:n})},o=n(e);return o.then((function(){return r()}),r),o.catch((function(e){if(c.length>=5)throw e;var n=d(t,e);if(!n)throw e;var r,o=n[0],i=n[1];return(r=i,new Promise((function(e){return setTimeout(e,r)}))).then((function(){return p(o)}))}))};return p(E).then((function(e){return[e,c]}))}var K="https://fpnpmcdn.net/v//loader_v.js",B=K;function F(e){var o;e.scriptUrlPattern;var i=e.token,a=e.apiKey,u=void 0===a?i:a,R=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__rest)(e,["scriptUrlPattern","token","apiKey"]),c=null!==(o=r(e,"scriptUrlPattern"))&&void 0!==o?o:K,s=function(){var e=[],t=function(){e.push({time:new Date,state:document.visibilityState})},n=function(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}(document,"visibilitychange",t);return t(),[e,n]}(),f=s[0],l=s[1];return Promise.resolve().then((function(){if(!u||"string"!=typeof u)throw new Error(I);var e=function(e,t){return(Array.isArray(e)?e:[e]).map((function(e){return function(e,t){var n=encodeURIComponent;return e.replace(/<[^<>]+>/g,(function(e){return""===e?"3":""===e?n(t):""===e?n(U):e}))}(String(e),t)}))}(c,u);return M(e,V)})).catch((function(e){throw l(),function(e){if(e instanceof Error&&e.message===C)return new Error(b);return e}(e)})).then((function(e){var t=e[0],r=e[1];return l(),t.load((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({},R),{ldi:{attempts:r,visibilityStates:f}}))}))}function V(e){return o(e,(function(){return function(e){return new Promise((function(t,n){if(function(e){if(URL.prototype)try{return new URL(e,location.href),!1}catch(t){if(t instanceof Error&&"TypeError"===t.name)return!0;throw t}}(e))throw new Error(l);var r=document.createElement("script"),o=function(){var e;return null===(e=r.parentNode)||void 0===e?void 0:e.removeChild(r)},i=document.head||document.getElementsByTagName("head")[0];r.onload=function(){o(),t()},r.onerror=function(){o(),n(new Error(b))},r.async=!0,r.src=e,i.appendChild(r)}))}(e)}),(function(){throw new Error(f)})).then(k)}function k(){var e=window,t="__fpjs_p_l_b",n=e[t];if(function(e,t){var n,r=null===(n=Object.getOwnPropertyDescriptor)||void 0===n?void 0:n.call(Object,e,t);(null==r?void 0:r.configurable)?delete e[t]:r&&!r.writable||(e[t]=void 0)}(e,t),"function"!=typeof(null==n?void 0:n.load))throw new Error(C);return n}var G={load:F,defaultScriptUrlPattern:B,ERROR_SCRIPT_LOAD_FAIL:b,ERROR_API_KEY_EXPIRED:T,ERROR_API_KEY_INVALID:N,ERROR_API_KEY_MISSING:I,ERROR_BAD_REQUEST_FORMAT:m,ERROR_BAD_RESPONSE_FORMAT:s,ERROR_CLIENT_TIMEOUT:u,ERROR_CSP_BLOCK:f,ERROR_FORBIDDEN_ENDPOINT:O,ERROR_FORBIDDEN_HEADER:D,ERROR_FORBIDDEN_ORIGIN:y,ERROR_GENERAL_SERVER_FAILURE:w,ERROR_INSTALLATION_METHOD_RESTRICTED:_,ERROR_INTEGRATION_FAILURE:h,ERROR_INVALID_ENDPOINT:l,ERROR_NETWORK_ABORT:c,ERROR_NETWORK_CONNECTION:R,ERROR_RATE_LIMIT:P,ERROR_SERVER_TIMEOUT:A,ERROR_SUBSCRIPTION_NOT_ACTIVE:p,ERROR_TOKEN_EXPIRED:L,ERROR_TOKEN_INVALID:g,ERROR_TOKEN_MISSING:S,ERROR_UNSUPPORTED_VERSION:v,ERROR_WRONG_REGION:d,defaultEndpoint:i,defaultTlsEndpoint:a}; /***/ }), /***/ 83013: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports._Parser = void 0; exports.parse = parse; var tslib_1 = __webpack_require__(8674); function parse() { throw new Error("You're trying to format an uncompiled message with react-intl without parser, please import from 'react-intl' instead"); } tslib_1.__exportStar(__webpack_require__(6917), exports); exports._Parser = undefined; /***/ }), /***/ 6917: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SKELETON_TYPE = exports.TYPE = void 0; exports.isLiteralElement = isLiteralElement; exports.isArgumentElement = isArgumentElement; exports.isNumberElement = isNumberElement; exports.isDateElement = isDateElement; exports.isTimeElement = isTimeElement; exports.isSelectElement = isSelectElement; exports.isPluralElement = isPluralElement; exports.isPoundElement = isPoundElement; exports.isTagElement = isTagElement; exports.isNumberSkeleton = isNumberSkeleton; exports.isDateTimeSkeleton = isDateTimeSkeleton; exports.createLiteralElement = createLiteralElement; exports.createNumberElement = createNumberElement; var TYPE; (function (TYPE) { /** * Raw text */ TYPE[TYPE["literal"] = 0] = "literal"; /** * Variable w/o any format, e.g `var` in `this is a {var}` */ TYPE[TYPE["argument"] = 1] = "argument"; /** * Variable w/ number format */ TYPE[TYPE["number"] = 2] = "number"; /** * Variable w/ date format */ TYPE[TYPE["date"] = 3] = "date"; /** * Variable w/ time format */ TYPE[TYPE["time"] = 4] = "time"; /** * Variable w/ select format */ TYPE[TYPE["select"] = 5] = "select"; /** * Variable w/ plural format */ TYPE[TYPE["plural"] = 6] = "plural"; /** * Only possible within plural argument. * This is the `#` symbol that will be substituted with the count. */ TYPE[TYPE["pound"] = 7] = "pound"; /** * XML-like tag */ TYPE[TYPE["tag"] = 8] = "tag"; })(TYPE || (exports.TYPE = TYPE = {})); var SKELETON_TYPE; (function (SKELETON_TYPE) { SKELETON_TYPE[SKELETON_TYPE["number"] = 0] = "number"; SKELETON_TYPE[SKELETON_TYPE["dateTime"] = 1] = "dateTime"; })(SKELETON_TYPE || (exports.SKELETON_TYPE = SKELETON_TYPE = {})); /** * Type Guards */ function isLiteralElement(el) { return el.type === TYPE.literal; } function isArgumentElement(el) { return el.type === TYPE.argument; } function isNumberElement(el) { return el.type === TYPE.number; } function isDateElement(el) { return el.type === TYPE.date; } function isTimeElement(el) { return el.type === TYPE.time; } function isSelectElement(el) { return el.type === TYPE.select; } function isPluralElement(el) { return el.type === TYPE.plural; } function isPoundElement(el) { return el.type === TYPE.pound; } function isTagElement(el) { return el.type === TYPE.tag; } function isNumberSkeleton(el) { return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number); } function isDateTimeSkeleton(el) { return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime); } function createLiteralElement(value) { return { type: TYPE.literal, value: value, }; } function createNumberElement(value, style) { return { type: TYPE.number, value: value, style: style, }; } /***/ }), /***/ 31493: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Converter = __webpack_require__(46264); /** * Function get source and destination alphabet and return convert function * * @param {string|Array} srcAlphabet * @param {string|Array} dstAlphabet * * @returns {function(number|Array)} */ function anyBase(srcAlphabet, dstAlphabet) { var converter = new Converter(srcAlphabet, dstAlphabet); /** * Convert function * * @param {string|Array} number * * @return {string|Array} number */ return function (number) { return converter.convert(number); } }; anyBase.BIN = '01'; anyBase.OCT = '01234567'; anyBase.DEC = '0123456789'; anyBase.HEX = '0123456789abcdef'; module.exports = anyBase; /***/ }), /***/ 46264: /***/ ((module) => { "use strict"; /** * Converter * * @param {string|Array} srcAlphabet * @param {string|Array} dstAlphabet * @constructor */ function Converter(srcAlphabet, dstAlphabet) { if (!srcAlphabet || !dstAlphabet || !srcAlphabet.length || !dstAlphabet.length) { throw new Error('Bad alphabet'); } this.srcAlphabet = srcAlphabet; this.dstAlphabet = dstAlphabet; } /** * Convert number from source alphabet to destination alphabet * * @param {string|Array} number - number represented as a string or array of points * * @returns {string|Array} */ Converter.prototype.convert = function(number) { var i, divide, newlen, numberMap = {}, fromBase = this.srcAlphabet.length, toBase = this.dstAlphabet.length, length = number.length, result = typeof number === 'string' ? '' : []; if (!this.isValid(number)) { throw new Error('Number "' + number + '" contains of non-alphabetic digits (' + this.srcAlphabet + ')'); } if (this.srcAlphabet === this.dstAlphabet) { return number; } for (i = 0; i < length; i++) { numberMap[i] = this.srcAlphabet.indexOf(number[i]); } do { divide = 0; newlen = 0; for (i = 0; i < length; i++) { divide = divide * fromBase + numberMap[i]; if (divide >= toBase) { numberMap[newlen++] = parseInt(divide / toBase, 10); divide = divide % toBase; } else if (newlen > 0) { numberMap[newlen++] = 0; } } length = newlen; result = this.dstAlphabet.slice(divide, divide + 1).concat(result); } while (newlen !== 0); return result; }; /** * Valid number with source alphabet * * @param {number} number * * @returns {boolean} */ Converter.prototype.isValid = function(number) { var i = 0; for (; i < number.length; ++i) { if (this.srcAlphabet.indexOf(number[i]) === -1) { return false; } } return true; }; module.exports = Converter; /***/ }), /***/ 95364: /***/ ((module) => { "use strict"; // base-x encoding / decoding // Copyright (c) 2018 base-x contributors // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) // Distributed under the MIT software license, see the accompanying // file LICENSE or http://www.opensource.org/licenses/mit-license.php. function base (ALPHABET) { if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') } var BASE_MAP = new Uint8Array(256) for (var j = 0; j < BASE_MAP.length; j++) { BASE_MAP[j] = 255 } for (var i = 0; i < ALPHABET.length; i++) { var x = ALPHABET.charAt(i) var xc = x.charCodeAt(0) if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') } BASE_MAP[xc] = i } var BASE = ALPHABET.length var LEADER = ALPHABET.charAt(0) var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up function encode (source) { if (source instanceof Uint8Array) { } else if (ArrayBuffer.isView(source)) { source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength) } else if (Array.isArray(source)) { source = Uint8Array.from(source) } if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') } if (source.length === 0) { return '' } // Skip & count leading zeroes. var zeroes = 0 var length = 0 var pbegin = 0 var pend = source.length while (pbegin !== pend && source[pbegin] === 0) { pbegin++ zeroes++ } // Allocate enough space in big-endian base58 representation. var size = ((pend - pbegin) * iFACTOR + 1) >>> 0 var b58 = new Uint8Array(size) // Process the bytes. while (pbegin !== pend) { var carry = source[pbegin] // Apply "b58 = b58 * 256 + ch". var i = 0 for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { carry += (256 * b58[it1]) >>> 0 b58[it1] = (carry % BASE) >>> 0 carry = (carry / BASE) >>> 0 } if (carry !== 0) { throw new Error('Non-zero carry') } length = i pbegin++ } // Skip leading zeroes in base58 result. var it2 = size - length while (it2 !== size && b58[it2] === 0) { it2++ } // Translate the result into a string. var str = LEADER.repeat(zeroes) for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) } return str } function decodeUnsafe (source) { if (typeof source !== 'string') { throw new TypeError('Expected String') } if (source.length === 0) { return new Uint8Array() } var psz = 0 // Skip and count leading '1's. var zeroes = 0 var length = 0 while (source[psz] === LEADER) { zeroes++ psz++ } // Allocate enough space in big-endian base256 representation. var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up. var b256 = new Uint8Array(size) // Process the characters. while (source[psz]) { // Decode character var carry = BASE_MAP[source.charCodeAt(psz)] // Invalid character if (carry === 255) { return } var i = 0 for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { carry += (BASE * b256[it3]) >>> 0 b256[it3] = (carry % 256) >>> 0 carry = (carry / 256) >>> 0 } if (carry !== 0) { throw new Error('Non-zero carry') } length = i psz++ } // Skip leading zeroes in b256. var it4 = size - length while (it4 !== size && b256[it4] === 0) { it4++ } var vch = new Uint8Array(zeroes + (size - it4)) var j = zeroes while (it4 !== size) { vch[j++] = b256[it4++] } return vch } function decode (string) { var buffer = decodeUnsafe(string) if (buffer) { return buffer } throw new Error('Non-base' + BASE + ' character') } return { encode: encode, decodeUnsafe: decodeUnsafe, decode: decode } } module.exports = base /***/ }), /***/ 13144: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var bind = __webpack_require__(66743); var $apply = __webpack_require__(11002); var $call = __webpack_require__(10076); var $reflectApply = __webpack_require__(47119); /** @type {import('./actualApply')} */ module.exports = $reflectApply || bind.call($call, $apply); /***/ }), /***/ 12205: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var bind = __webpack_require__(66743); var $apply = __webpack_require__(11002); var actualApply = __webpack_require__(13144); /** @type {import('./applyBind')} */ module.exports = function applyBind() { return actualApply(bind, $apply, arguments); }; /***/ }), /***/ 11002: /***/ ((module) => { "use strict"; /** @type {import('./functionApply')} */ module.exports = Function.prototype.apply; /***/ }), /***/ 10076: /***/ ((module) => { "use strict"; /** @type {import('./functionCall')} */ module.exports = Function.prototype.call; /***/ }), /***/ 73126: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var bind = __webpack_require__(66743); var $TypeError = __webpack_require__(69675); var $call = __webpack_require__(10076); var $actualApply = __webpack_require__(13144); /** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */ module.exports = function callBindBasic(args) { if (args.length < 1 || typeof args[0] !== 'function') { throw new $TypeError('a function is required'); } return $actualApply(bind, $call, args); }; /***/ }), /***/ 47119: /***/ ((module) => { "use strict"; /** @type {import('./reflectApply')} */ module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; /***/ }), /***/ 38075: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var GetIntrinsic = __webpack_require__(70453); var callBind = __webpack_require__(10487); var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); module.exports = function callBoundIntrinsic(name, allowMissing) { var intrinsic = GetIntrinsic(name, !!allowMissing); if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { return callBind(intrinsic); } return intrinsic; }; /***/ }), /***/ 10487: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var setFunctionLength = __webpack_require__(96897); var $defineProperty = __webpack_require__(30655); var callBindBasic = __webpack_require__(73126); var applyBind = __webpack_require__(12205); module.exports = function callBind(originalFunction) { var func = callBindBasic(arguments); var adjustedLength = originalFunction.length - (arguments.length - 1); return setFunctionLength( func, 1 + (adjustedLength > 0 ? adjustedLength : 0), true ); }; if ($defineProperty) { $defineProperty(module.exports, 'apply', { value: applyBind }); } else { module.exports.apply = applyBind; } /***/ }), /***/ 36556: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var GetIntrinsic = __webpack_require__(70453); var callBindBasic = __webpack_require__(73126); /** @type {(thisArg: string, searchString: string, position?: number) => number} */ var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]); /** @type {import('.')} */ module.exports = function callBoundIntrinsic(name, allowMissing) { // eslint-disable-next-line no-extra-parens var intrinsic = /** @type {Parameters[0][0]} */ (GetIntrinsic(name, !!allowMissing)); if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { return callBindBasic([intrinsic]); } return intrinsic; }; /***/ }), /***/ 32485: /***/ ((module, exports) => { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; var nativeCodeString = '[native code]'; function classNames() { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg)) { if (arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } } else if (argType === 'object') { if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { classes.push(arg.toString()); continue; } for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } return classes.join(' '); } if ( true && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return classNames; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }()); /***/ }), /***/ 40955: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(80754), __webpack_require__(84636), __webpack_require__(39506), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var BlockCipher = C_lib.BlockCipher; var C_algo = C.algo; // Lookup tables var SBOX = []; var INV_SBOX = []; var SUB_MIX_0 = []; var SUB_MIX_1 = []; var SUB_MIX_2 = []; var SUB_MIX_3 = []; var INV_SUB_MIX_0 = []; var INV_SUB_MIX_1 = []; var INV_SUB_MIX_2 = []; var INV_SUB_MIX_3 = []; // Compute lookup tables (function () { // Compute double table var d = []; for (var i = 0; i < 256; i++) { if (i < 128) { d[i] = i << 1; } else { d[i] = (i << 1) ^ 0x11b; } } // Walk GF(2^8) var x = 0; var xi = 0; for (var i = 0; i < 256; i++) { // Compute sbox var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; SBOX[x] = sx; INV_SBOX[sx] = x; // Compute multiplication var x2 = d[x]; var x4 = d[x2]; var x8 = d[x4]; // Compute sub bytes, mix columns tables var t = (d[sx] * 0x101) ^ (sx * 0x1010100); SUB_MIX_0[x] = (t << 24) | (t >>> 8); SUB_MIX_1[x] = (t << 16) | (t >>> 16); SUB_MIX_2[x] = (t << 8) | (t >>> 24); SUB_MIX_3[x] = t; // Compute inv sub bytes, inv mix columns tables var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); INV_SUB_MIX_3[sx] = t; // Compute next counter if (!x) { x = xi = 1; } else { x = x2 ^ d[d[d[x8 ^ x2]]]; xi ^= d[d[xi]]; } } }()); // Precomputed Rcon lookup var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; /** * AES block cipher algorithm. */ var AES = C_algo.AES = BlockCipher.extend({ _doReset: function () { var t; // Skip reset of nRounds has been set before and key did not change if (this._nRounds && this._keyPriorReset === this._key) { return; } // Shortcuts var key = this._keyPriorReset = this._key; var keyWords = key.words; var keySize = key.sigBytes / 4; // Compute number of rounds var nRounds = this._nRounds = keySize + 6; // Compute number of key schedule rows var ksRows = (nRounds + 1) * 4; // Compute key schedule var keySchedule = this._keySchedule = []; for (var ksRow = 0; ksRow < ksRows; ksRow++) { if (ksRow < keySize) { keySchedule[ksRow] = keyWords[ksRow]; } else { t = keySchedule[ksRow - 1]; if (!(ksRow % keySize)) { // Rot word t = (t << 8) | (t >>> 24); // Sub word t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; // Mix Rcon t ^= RCON[(ksRow / keySize) | 0] << 24; } else if (keySize > 6 && ksRow % keySize == 4) { // Sub word t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; } keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; } } // Compute inv key schedule var invKeySchedule = this._invKeySchedule = []; for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { var ksRow = ksRows - invKsRow; if (invKsRow % 4) { var t = keySchedule[ksRow]; } else { var t = keySchedule[ksRow - 4]; } if (invKsRow < 4 || ksRow <= 4) { invKeySchedule[invKsRow] = t; } else { invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; } } }, encryptBlock: function (M, offset) { this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); }, decryptBlock: function (M, offset) { // Swap 2nd and 4th rows var t = M[offset + 1]; M[offset + 1] = M[offset + 3]; M[offset + 3] = t; this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); // Inv swap 2nd and 4th rows var t = M[offset + 1]; M[offset + 1] = M[offset + 3]; M[offset + 3] = t; }, _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { // Shortcut var nRounds = this._nRounds; // Get input, add round key var s0 = M[offset] ^ keySchedule[0]; var s1 = M[offset + 1] ^ keySchedule[1]; var s2 = M[offset + 2] ^ keySchedule[2]; var s3 = M[offset + 3] ^ keySchedule[3]; // Key schedule row counter var ksRow = 4; // Rounds for (var round = 1; round < nRounds; round++) { // Shift rows, sub bytes, mix columns, add round key var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; // Update state s0 = t0; s1 = t1; s2 = t2; s3 = t3; } // Shift rows, sub bytes, add round key var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; // Set output M[offset] = t0; M[offset + 1] = t1; M[offset + 2] = t2; M[offset + 3] = t3; }, keySize: 256/32 }); /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); */ C.AES = BlockCipher._createHelper(AES); }()); return CryptoJS.AES; })); /***/ }), /***/ 43128: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(80754), __webpack_require__(84636), __webpack_require__(39506), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var BlockCipher = C_lib.BlockCipher; var C_algo = C.algo; const N = 16; //Origin pbox and sbox, derived from PI const ORIG_P = [ 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, 0x9216D5D9, 0x8979FB1B ]; const ORIG_S = [ [ 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99, 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013, 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E, 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440, 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A, 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677, 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032, 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239, 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0, 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98, 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE, 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D, 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7, 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463, 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F, 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09, 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3, 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB, 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279, 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8, 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB, 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82, 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB, 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573, 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0, 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B, 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790, 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8, 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4, 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0, 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7, 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C, 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD, 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1, 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299, 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9, 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477, 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF, 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49, 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF, 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA, 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5, 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41, 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915, 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400, 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915, 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664, 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A ], [ 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623, 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266, 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1, 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E, 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6, 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1, 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E, 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1, 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737, 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8, 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF, 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD, 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701, 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7, 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41, 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331, 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF, 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF, 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E, 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87, 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C, 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2, 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16, 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD, 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B, 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509, 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E, 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3, 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F, 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A, 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4, 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960, 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66, 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28, 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802, 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84, 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510, 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF, 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14, 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E, 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50, 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7, 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8, 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281, 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99, 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696, 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128, 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73, 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0, 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0, 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105, 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250, 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3, 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285, 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00, 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061, 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB, 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E, 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735, 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC, 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9, 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340, 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20, 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 ], [ 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934, 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068, 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF, 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840, 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45, 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504, 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A, 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB, 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE, 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6, 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42, 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B, 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2, 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB, 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527, 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B, 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33, 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C, 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3, 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC, 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17, 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564, 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B, 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115, 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922, 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728, 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0, 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E, 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37, 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D, 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804, 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B, 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3, 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB, 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D, 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C, 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350, 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9, 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A, 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE, 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D, 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC, 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F, 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61, 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2, 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9, 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2, 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C, 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E, 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633, 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10, 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169, 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52, 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027, 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5, 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62, 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634, 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76, 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24, 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC, 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4, 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C, 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837, 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 ], [ 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B, 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE, 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B, 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4, 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8, 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6, 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304, 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22, 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4, 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6, 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9, 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59, 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593, 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51, 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28, 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C, 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B, 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28, 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C, 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD, 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A, 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319, 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB, 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F, 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991, 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32, 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680, 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166, 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE, 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB, 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5, 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47, 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370, 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D, 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84, 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048, 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8, 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD, 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9, 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7, 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38, 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F, 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C, 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525, 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1, 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442, 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964, 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E, 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8, 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D, 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F, 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299, 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02, 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC, 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614, 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A, 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6, 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B, 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0, 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060, 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E, 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9, 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F, 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 ] ]; var BLOWFISH_CTX = { pbox: [], sbox: [] } function F(ctx, x){ let a = (x >> 24) & 0xFF; let b = (x >> 16) & 0xFF; let c = (x >> 8) & 0xFF; let d = x & 0xFF; let y = ctx.sbox[0][a] + ctx.sbox[1][b]; y = y ^ ctx.sbox[2][c]; y = y + ctx.sbox[3][d]; return y; } function BlowFish_Encrypt(ctx, left, right){ let Xl = left; let Xr = right; let temp; for(let i = 0; i < N; ++i){ Xl = Xl ^ ctx.pbox[i]; Xr = F(ctx, Xl) ^ Xr; temp = Xl; Xl = Xr; Xr = temp; } temp = Xl; Xl = Xr; Xr = temp; Xr = Xr ^ ctx.pbox[N]; Xl = Xl ^ ctx.pbox[N + 1]; return {left: Xl, right: Xr}; } function BlowFish_Decrypt(ctx, left, right){ let Xl = left; let Xr = right; let temp; for(let i = N + 1; i > 1; --i){ Xl = Xl ^ ctx.pbox[i]; Xr = F(ctx, Xl) ^ Xr; temp = Xl; Xl = Xr; Xr = temp; } temp = Xl; Xl = Xr; Xr = temp; Xr = Xr ^ ctx.pbox[1]; Xl = Xl ^ ctx.pbox[0]; return {left: Xl, right: Xr}; } /** * Initialization ctx's pbox and sbox. * * @param {Object} ctx The object has pbox and sbox. * @param {Array} key An array of 32-bit words. * @param {int} keysize The length of the key. * * @example * * BlowFishInit(BLOWFISH_CTX, key, 128/32); */ function BlowFishInit(ctx, key, keysize) { for(let Row = 0; Row < 4; Row++) { ctx.sbox[Row] = []; for(let Col = 0; Col < 256; Col++) { ctx.sbox[Row][Col] = ORIG_S[Row][Col]; } } let keyIndex = 0; for(let index = 0; index < N + 2; index++) { ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex]; keyIndex++; if(keyIndex >= keysize) { keyIndex = 0; } } let Data1 = 0; let Data2 = 0; let res = 0; for(let i = 0; i < N + 2; i += 2) { res = BlowFish_Encrypt(ctx, Data1, Data2); Data1 = res.left; Data2 = res.right; ctx.pbox[i] = Data1; ctx.pbox[i + 1] = Data2; } for(let i = 0; i < 4; i++) { for(let j = 0; j < 256; j += 2) { res = BlowFish_Encrypt(ctx, Data1, Data2); Data1 = res.left; Data2 = res.right; ctx.sbox[i][j] = Data1; ctx.sbox[i][j + 1] = Data2; } } return true; } /** * Blowfish block cipher algorithm. */ var Blowfish = C_algo.Blowfish = BlockCipher.extend({ _doReset: function () { // Skip reset of nRounds has been set before and key did not change if (this._keyPriorReset === this._key) { return; } // Shortcuts var key = this._keyPriorReset = this._key; var keyWords = key.words; var keySize = key.sigBytes / 4; //Initialization pbox and sbox BlowFishInit(BLOWFISH_CTX, keyWords, keySize); }, encryptBlock: function (M, offset) { var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); M[offset] = res.left; M[offset + 1] = res.right; }, decryptBlock: function (M, offset) { var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]); M[offset] = res.left; M[offset + 1] = res.right; }, blockSize: 64/32, keySize: 128/32, ivSize: 64/32 }); /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.Blowfish.encrypt(message, key, cfg); * var plaintext = CryptoJS.Blowfish.decrypt(ciphertext, key, cfg); */ C.Blowfish = BlockCipher._createHelper(Blowfish); }()); return CryptoJS.Blowfish; })); /***/ }), /***/ 57165: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(39506)); } else {} }(this, function (CryptoJS) { /** * Cipher core components. */ CryptoJS.lib.Cipher || (function (undefined) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var Base = C_lib.Base; var WordArray = C_lib.WordArray; var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; var C_enc = C.enc; var Utf8 = C_enc.Utf8; var Base64 = C_enc.Base64; var C_algo = C.algo; var EvpKDF = C_algo.EvpKDF; /** * Abstract base cipher template. * * @property {number} keySize This cipher's key size. Default: 4 (128 bits) * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. */ var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ /** * Configuration options. * * @property {WordArray} iv The IV to use for this operation. */ cfg: Base.extend(), /** * Creates this cipher in encryption mode. * * @param {WordArray} key The key. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @return {Cipher} A cipher instance. * * @static * * @example * * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); */ createEncryptor: function (key, cfg) { return this.create(this._ENC_XFORM_MODE, key, cfg); }, /** * Creates this cipher in decryption mode. * * @param {WordArray} key The key. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @return {Cipher} A cipher instance. * * @static * * @example * * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); */ createDecryptor: function (key, cfg) { return this.create(this._DEC_XFORM_MODE, key, cfg); }, /** * Initializes a newly created cipher. * * @param {number} xformMode Either the encryption or decryption transormation mode constant. * @param {WordArray} key The key. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @example * * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); */ init: function (xformMode, key, cfg) { // Apply config defaults this.cfg = this.cfg.extend(cfg); // Store transform mode and key this._xformMode = xformMode; this._key = key; // Set initial values this.reset(); }, /** * Resets this cipher to its initial state. * * @example * * cipher.reset(); */ reset: function () { // Reset data buffer BufferedBlockAlgorithm.reset.call(this); // Perform concrete-cipher logic this._doReset(); }, /** * Adds data to be encrypted or decrypted. * * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. * * @return {WordArray} The data after processing. * * @example * * var encrypted = cipher.process('data'); * var encrypted = cipher.process(wordArray); */ process: function (dataUpdate) { // Append this._append(dataUpdate); // Process available blocks return this._process(); }, /** * Finalizes the encryption or decryption process. * Note that the finalize operation is effectively a destructive, read-once operation. * * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. * * @return {WordArray} The data after final processing. * * @example * * var encrypted = cipher.finalize(); * var encrypted = cipher.finalize('data'); * var encrypted = cipher.finalize(wordArray); */ finalize: function (dataUpdate) { // Final data update if (dataUpdate) { this._append(dataUpdate); } // Perform concrete-cipher logic var finalProcessedData = this._doFinalize(); return finalProcessedData; }, keySize: 128/32, ivSize: 128/32, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, /** * Creates shortcut functions to a cipher's object interface. * * @param {Cipher} cipher The cipher to create a helper for. * * @return {Object} An object with encrypt and decrypt shortcut functions. * * @static * * @example * * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); */ _createHelper: (function () { function selectCipherStrategy(key) { if (typeof key == 'string') { return PasswordBasedCipher; } else { return SerializableCipher; } } return function (cipher) { return { encrypt: function (message, key, cfg) { return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); }, decrypt: function (ciphertext, key, cfg) { return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); } }; }; }()) }); /** * Abstract base stream cipher template. * * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) */ var StreamCipher = C_lib.StreamCipher = Cipher.extend({ _doFinalize: function () { // Process partial blocks var finalProcessedBlocks = this._process(!!'flush'); return finalProcessedBlocks; }, blockSize: 1 }); /** * Mode namespace. */ var C_mode = C.mode = {}; /** * Abstract base block cipher mode template. */ var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ /** * Creates this mode for encryption. * * @param {Cipher} cipher A block cipher instance. * @param {Array} iv The IV words. * * @static * * @example * * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); */ createEncryptor: function (cipher, iv) { return this.Encryptor.create(cipher, iv); }, /** * Creates this mode for decryption. * * @param {Cipher} cipher A block cipher instance. * @param {Array} iv The IV words. * * @static * * @example * * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); */ createDecryptor: function (cipher, iv) { return this.Decryptor.create(cipher, iv); }, /** * Initializes a newly created mode. * * @param {Cipher} cipher A block cipher instance. * @param {Array} iv The IV words. * * @example * * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); */ init: function (cipher, iv) { this._cipher = cipher; this._iv = iv; } }); /** * Cipher Block Chaining mode. */ var CBC = C_mode.CBC = (function () { /** * Abstract base CBC mode. */ var CBC = BlockCipherMode.extend(); /** * CBC encryptor. */ CBC.Encryptor = CBC.extend({ /** * Processes the data block at offset. * * @param {Array} words The data words to operate on. * @param {number} offset The offset where the block starts. * * @example * * mode.processBlock(data.words, offset); */ processBlock: function (words, offset) { // Shortcuts var cipher = this._cipher; var blockSize = cipher.blockSize; // XOR and encrypt xorBlock.call(this, words, offset, blockSize); cipher.encryptBlock(words, offset); // Remember this block to use with next block this._prevBlock = words.slice(offset, offset + blockSize); } }); /** * CBC decryptor. */ CBC.Decryptor = CBC.extend({ /** * Processes the data block at offset. * * @param {Array} words The data words to operate on. * @param {number} offset The offset where the block starts. * * @example * * mode.processBlock(data.words, offset); */ processBlock: function (words, offset) { // Shortcuts var cipher = this._cipher; var blockSize = cipher.blockSize; // Remember this block to use with next block var thisBlock = words.slice(offset, offset + blockSize); // Decrypt and XOR cipher.decryptBlock(words, offset); xorBlock.call(this, words, offset, blockSize); // This block becomes the previous block this._prevBlock = thisBlock; } }); function xorBlock(words, offset, blockSize) { var block; // Shortcut var iv = this._iv; // Choose mixing block if (iv) { block = iv; // Remove IV for subsequent blocks this._iv = undefined; } else { block = this._prevBlock; } // XOR blocks for (var i = 0; i < blockSize; i++) { words[offset + i] ^= block[i]; } } return CBC; }()); /** * Padding namespace. */ var C_pad = C.pad = {}; /** * PKCS #5/7 padding strategy. */ var Pkcs7 = C_pad.Pkcs7 = { /** * Pads data using the algorithm defined in PKCS #5/7. * * @param {WordArray} data The data to pad. * @param {number} blockSize The multiple that the data should be padded to. * * @static * * @example * * CryptoJS.pad.Pkcs7.pad(wordArray, 4); */ pad: function (data, blockSize) { // Shortcut var blockSizeBytes = blockSize * 4; // Count padding bytes var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; // Create padding word var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; // Create padding var paddingWords = []; for (var i = 0; i < nPaddingBytes; i += 4) { paddingWords.push(paddingWord); } var padding = WordArray.create(paddingWords, nPaddingBytes); // Add padding data.concat(padding); }, /** * Unpads data that had been padded using the algorithm defined in PKCS #5/7. * * @param {WordArray} data The data to unpad. * * @static * * @example * * CryptoJS.pad.Pkcs7.unpad(wordArray); */ unpad: function (data) { // Get number of padding bytes from last byte var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; // Remove padding data.sigBytes -= nPaddingBytes; } }; /** * Abstract base block cipher template. * * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) */ var BlockCipher = C_lib.BlockCipher = Cipher.extend({ /** * Configuration options. * * @property {Mode} mode The block mode to use. Default: CBC * @property {Padding} padding The padding strategy to use. Default: Pkcs7 */ cfg: Cipher.cfg.extend({ mode: CBC, padding: Pkcs7 }), reset: function () { var modeCreator; // Reset cipher Cipher.reset.call(this); // Shortcuts var cfg = this.cfg; var iv = cfg.iv; var mode = cfg.mode; // Reset block mode if (this._xformMode == this._ENC_XFORM_MODE) { modeCreator = mode.createEncryptor; } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { modeCreator = mode.createDecryptor; // Keep at least one block in the buffer for unpadding this._minBufferSize = 1; } if (this._mode && this._mode.__creator == modeCreator) { this._mode.init(this, iv && iv.words); } else { this._mode = modeCreator.call(mode, this, iv && iv.words); this._mode.__creator = modeCreator; } }, _doProcessBlock: function (words, offset) { this._mode.processBlock(words, offset); }, _doFinalize: function () { var finalProcessedBlocks; // Shortcut var padding = this.cfg.padding; // Finalize if (this._xformMode == this._ENC_XFORM_MODE) { // Pad data padding.pad(this._data, this.blockSize); // Process final blocks finalProcessedBlocks = this._process(!!'flush'); } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { // Process final blocks finalProcessedBlocks = this._process(!!'flush'); // Unpad data padding.unpad(finalProcessedBlocks); } return finalProcessedBlocks; }, blockSize: 128/32 }); /** * A collection of cipher parameters. * * @property {WordArray} ciphertext The raw ciphertext. * @property {WordArray} key The key to this ciphertext. * @property {WordArray} iv The IV used in the ciphering operation. * @property {WordArray} salt The salt used with a key derivation function. * @property {Cipher} algorithm The cipher algorithm. * @property {Mode} mode The block mode used in the ciphering operation. * @property {Padding} padding The padding scheme used in the ciphering operation. * @property {number} blockSize The block size of the cipher. * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. */ var CipherParams = C_lib.CipherParams = Base.extend({ /** * Initializes a newly created cipher params object. * * @param {Object} cipherParams An object with any of the possible cipher parameters. * * @example * * var cipherParams = CryptoJS.lib.CipherParams.create({ * ciphertext: ciphertextWordArray, * key: keyWordArray, * iv: ivWordArray, * salt: saltWordArray, * algorithm: CryptoJS.algo.AES, * mode: CryptoJS.mode.CBC, * padding: CryptoJS.pad.PKCS7, * blockSize: 4, * formatter: CryptoJS.format.OpenSSL * }); */ init: function (cipherParams) { this.mixIn(cipherParams); }, /** * Converts this cipher params object to a string. * * @param {Format} formatter (Optional) The formatting strategy to use. * * @return {string} The stringified cipher params. * * @throws Error If neither the formatter nor the default formatter is set. * * @example * * var string = cipherParams + ''; * var string = cipherParams.toString(); * var string = cipherParams.toString(CryptoJS.format.OpenSSL); */ toString: function (formatter) { return (formatter || this.formatter).stringify(this); } }); /** * Format namespace. */ var C_format = C.format = {}; /** * OpenSSL formatting strategy. */ var OpenSSLFormatter = C_format.OpenSSL = { /** * Converts a cipher params object to an OpenSSL-compatible string. * * @param {CipherParams} cipherParams The cipher params object. * * @return {string} The OpenSSL-compatible string. * * @static * * @example * * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); */ stringify: function (cipherParams) { var wordArray; // Shortcuts var ciphertext = cipherParams.ciphertext; var salt = cipherParams.salt; // Format if (salt) { wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); } else { wordArray = ciphertext; } return wordArray.toString(Base64); }, /** * Converts an OpenSSL-compatible string to a cipher params object. * * @param {string} openSSLStr The OpenSSL-compatible string. * * @return {CipherParams} The cipher params object. * * @static * * @example * * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); */ parse: function (openSSLStr) { var salt; // Parse base64 var ciphertext = Base64.parse(openSSLStr); // Shortcut var ciphertextWords = ciphertext.words; // Test for salt if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { // Extract salt salt = WordArray.create(ciphertextWords.slice(2, 4)); // Remove salt from ciphertext ciphertextWords.splice(0, 4); ciphertext.sigBytes -= 16; } return CipherParams.create({ ciphertext: ciphertext, salt: salt }); } }; /** * A cipher wrapper that returns ciphertext as a serializable cipher params object. */ var SerializableCipher = C_lib.SerializableCipher = Base.extend({ /** * Configuration options. * * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL */ cfg: Base.extend({ format: OpenSSLFormatter }), /** * Encrypts a message. * * @param {Cipher} cipher The cipher algorithm to use. * @param {WordArray|string} message The message to encrypt. * @param {WordArray} key The key. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @return {CipherParams} A cipher params object. * * @static * * @example * * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); */ encrypt: function (cipher, message, key, cfg) { // Apply config defaults cfg = this.cfg.extend(cfg); // Encrypt var encryptor = cipher.createEncryptor(key, cfg); var ciphertext = encryptor.finalize(message); // Shortcut var cipherCfg = encryptor.cfg; // Create and return serializable cipher params return CipherParams.create({ ciphertext: ciphertext, key: key, iv: cipherCfg.iv, algorithm: cipher, mode: cipherCfg.mode, padding: cipherCfg.padding, blockSize: cipher.blockSize, formatter: cfg.format }); }, /** * Decrypts serialized ciphertext. * * @param {Cipher} cipher The cipher algorithm to use. * @param {CipherParams|string} ciphertext The ciphertext to decrypt. * @param {WordArray} key The key. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @return {WordArray} The plaintext. * * @static * * @example * * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); */ decrypt: function (cipher, ciphertext, key, cfg) { // Apply config defaults cfg = this.cfg.extend(cfg); // Convert string to CipherParams ciphertext = this._parse(ciphertext, cfg.format); // Decrypt var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); return plaintext; }, /** * Converts serialized ciphertext to CipherParams, * else assumed CipherParams already and returns ciphertext unchanged. * * @param {CipherParams|string} ciphertext The ciphertext. * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. * * @return {CipherParams} The unserialized ciphertext. * * @static * * @example * * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); */ _parse: function (ciphertext, format) { if (typeof ciphertext == 'string') { return format.parse(ciphertext, this); } else { return ciphertext; } } }); /** * Key derivation function namespace. */ var C_kdf = C.kdf = {}; /** * OpenSSL key derivation function. */ var OpenSSLKdf = C_kdf.OpenSSL = { /** * Derives a key and IV from a password. * * @param {string} password The password to derive from. * @param {number} keySize The size in words of the key to generate. * @param {number} ivSize The size in words of the IV to generate. * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. * * @return {CipherParams} A cipher params object with the key, IV, and salt. * * @static * * @example * * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); */ execute: function (password, keySize, ivSize, salt, hasher) { // Generate random salt if (!salt) { salt = WordArray.random(64/8); } // Derive key and IV if (!hasher) { var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); } else { var key = EvpKDF.create({ keySize: keySize + ivSize, hasher: hasher }).compute(password, salt); } // Separate key and IV var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); key.sigBytes = keySize * 4; // Return params return CipherParams.create({ key: key, iv: iv, salt: salt }); } }; /** * A serializable cipher wrapper that derives the key from a password, * and returns ciphertext as a serializable cipher params object. */ var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ /** * Configuration options. * * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL */ cfg: SerializableCipher.cfg.extend({ kdf: OpenSSLKdf }), /** * Encrypts a message using a password. * * @param {Cipher} cipher The cipher algorithm to use. * @param {WordArray|string} message The message to encrypt. * @param {string} password The password. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @return {CipherParams} A cipher params object. * * @static * * @example * * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); */ encrypt: function (cipher, message, password, cfg) { // Apply config defaults cfg = this.cfg.extend(cfg); // Derive key and other params var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher); // Add IV to config cfg.iv = derivedParams.iv; // Encrypt var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); // Mix in derived params ciphertext.mixIn(derivedParams); return ciphertext; }, /** * Decrypts serialized ciphertext using a password. * * @param {Cipher} cipher The cipher algorithm to use. * @param {CipherParams|string} ciphertext The ciphertext to decrypt. * @param {string} password The password. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @return {WordArray} The plaintext. * * @static * * @example * * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); */ decrypt: function (cipher, ciphertext, password, cfg) { // Apply config defaults cfg = this.cfg.extend(cfg); // Convert string to CipherParams ciphertext = this._parse(ciphertext, cfg.format); // Derive key and other params var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher); // Add IV to config cfg.iv = derivedParams.iv; // Decrypt var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); return plaintext; } }); }()); })); /***/ }), /***/ 19021: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(); } else {} }(this, function () { /*globals window, global, require*/ /** * CryptoJS core components. */ var CryptoJS = CryptoJS || (function (Math, undefined) { var crypto; // Native crypto from window (Browser) if ( true && window.crypto) { crypto = window.crypto; } // Native crypto in web worker (Browser) if (typeof self !== 'undefined' && self.crypto) { crypto = self.crypto; } // Native crypto from worker if (typeof globalThis !== 'undefined' && globalThis.crypto) { crypto = globalThis.crypto; } // Native (experimental IE 11) crypto from window (Browser) if (!crypto && "object" !== 'undefined' && window.msCrypto) { crypto = window.msCrypto; } // Native crypto from global (NodeJS) if (!crypto && typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.crypto) { crypto = __webpack_require__.g.crypto; } // Native crypto import via require (NodeJS) if (!crypto && "function" === 'function') { try { crypto = __webpack_require__(50477); } catch (err) {} } /* * Cryptographically secure pseudorandom number generator * * As Math.random() is cryptographically not safe to use */ var cryptoSecureRandomInt = function () { if (crypto) { // Use getRandomValues method (Browser) if (typeof crypto.getRandomValues === 'function') { try { return crypto.getRandomValues(new Uint32Array(1))[0]; } catch (err) {} } // Use randomBytes method (NodeJS) if (typeof crypto.randomBytes === 'function') { try { return crypto.randomBytes(4).readInt32LE(); } catch (err) {} } } throw new Error('Native crypto module could not be used to get secure random number.'); }; /* * Local polyfill of Object.create */ var create = Object.create || (function () { function F() {} return function (obj) { var subtype; F.prototype = obj; subtype = new F(); F.prototype = null; return subtype; }; }()); /** * CryptoJS namespace. */ var C = {}; /** * Library namespace. */ var C_lib = C.lib = {}; /** * Base object for prototypal inheritance. */ var Base = C_lib.Base = (function () { return { /** * Creates a new object that inherits from this object. * * @param {Object} overrides Properties to copy into the new object. * * @return {Object} The new object. * * @static * * @example * * var MyType = CryptoJS.lib.Base.extend({ * field: 'value', * * method: function () { * } * }); */ extend: function (overrides) { // Spawn var subtype = create(this); // Augment if (overrides) { subtype.mixIn(overrides); } // Create default initializer if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { subtype.init = function () { subtype.$super.init.apply(this, arguments); }; } // Initializer's prototype is the subtype object subtype.init.prototype = subtype; // Reference supertype subtype.$super = this; return subtype; }, /** * Extends this object and runs the init method. * Arguments to create() will be passed to init(). * * @return {Object} The new object. * * @static * * @example * * var instance = MyType.create(); */ create: function () { var instance = this.extend(); instance.init.apply(instance, arguments); return instance; }, /** * Initializes a newly created object. * Override this method to add some logic when your objects are created. * * @example * * var MyType = CryptoJS.lib.Base.extend({ * init: function () { * // ... * } * }); */ init: function () { }, /** * Copies properties into this object. * * @param {Object} properties The properties to mix in. * * @example * * MyType.mixIn({ * field: 'value' * }); */ mixIn: function (properties) { for (var propertyName in properties) { if (properties.hasOwnProperty(propertyName)) { this[propertyName] = properties[propertyName]; } } // IE won't copy toString using the loop above if (properties.hasOwnProperty('toString')) { this.toString = properties.toString; } }, /** * Creates a copy of this object. * * @return {Object} The clone. * * @example * * var clone = instance.clone(); */ clone: function () { return this.init.prototype.extend(this); } }; }()); /** * An array of 32-bit words. * * @property {Array} words The array of 32-bit words. * @property {number} sigBytes The number of significant bytes in this word array. */ var WordArray = C_lib.WordArray = Base.extend({ /** * Initializes a newly created word array. * * @param {Array} words (Optional) An array of 32-bit words. * @param {number} sigBytes (Optional) The number of significant bytes in the words. * * @example * * var wordArray = CryptoJS.lib.WordArray.create(); * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); */ init: function (words, sigBytes) { words = this.words = words || []; if (sigBytes != undefined) { this.sigBytes = sigBytes; } else { this.sigBytes = words.length * 4; } }, /** * Converts this word array to a string. * * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex * * @return {string} The stringified word array. * * @example * * var string = wordArray + ''; * var string = wordArray.toString(); * var string = wordArray.toString(CryptoJS.enc.Utf8); */ toString: function (encoder) { return (encoder || Hex).stringify(this); }, /** * Concatenates a word array to this word array. * * @param {WordArray} wordArray The word array to append. * * @return {WordArray} This word array. * * @example * * wordArray1.concat(wordArray2); */ concat: function (wordArray) { // Shortcuts var thisWords = this.words; var thatWords = wordArray.words; var thisSigBytes = this.sigBytes; var thatSigBytes = wordArray.sigBytes; // Clamp excess bits this.clamp(); // Concat if (thisSigBytes % 4) { // Copy one byte at a time for (var i = 0; i < thatSigBytes; i++) { var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); } } else { // Copy one word at a time for (var j = 0; j < thatSigBytes; j += 4) { thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2]; } } this.sigBytes += thatSigBytes; // Chainable return this; }, /** * Removes insignificant bits. * * @example * * wordArray.clamp(); */ clamp: function () { // Shortcuts var words = this.words; var sigBytes = this.sigBytes; // Clamp words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); words.length = Math.ceil(sigBytes / 4); }, /** * Creates a copy of this word array. * * @return {WordArray} The clone. * * @example * * var clone = wordArray.clone(); */ clone: function () { var clone = Base.clone.call(this); clone.words = this.words.slice(0); return clone; }, /** * Creates a word array filled with random bytes. * * @param {number} nBytes The number of random bytes to generate. * * @return {WordArray} The random word array. * * @static * * @example * * var wordArray = CryptoJS.lib.WordArray.random(16); */ random: function (nBytes) { var words = []; for (var i = 0; i < nBytes; i += 4) { words.push(cryptoSecureRandomInt()); } return new WordArray.init(words, nBytes); } }); /** * Encoder namespace. */ var C_enc = C.enc = {}; /** * Hex encoding strategy. */ var Hex = C_enc.Hex = { /** * Converts a word array to a hex string. * * @param {WordArray} wordArray The word array. * * @return {string} The hex string. * * @static * * @example * * var hexString = CryptoJS.enc.Hex.stringify(wordArray); */ stringify: function (wordArray) { // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; // Convert var hexChars = []; for (var i = 0; i < sigBytes; i++) { var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; hexChars.push((bite >>> 4).toString(16)); hexChars.push((bite & 0x0f).toString(16)); } return hexChars.join(''); }, /** * Converts a hex string to a word array. * * @param {string} hexStr The hex string. * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Hex.parse(hexString); */ parse: function (hexStr) { // Shortcut var hexStrLength = hexStr.length; // Convert var words = []; for (var i = 0; i < hexStrLength; i += 2) { words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); } return new WordArray.init(words, hexStrLength / 2); } }; /** * Latin1 encoding strategy. */ var Latin1 = C_enc.Latin1 = { /** * Converts a word array to a Latin1 string. * * @param {WordArray} wordArray The word array. * * @return {string} The Latin1 string. * * @static * * @example * * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); */ stringify: function (wordArray) { // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; // Convert var latin1Chars = []; for (var i = 0; i < sigBytes; i++) { var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; latin1Chars.push(String.fromCharCode(bite)); } return latin1Chars.join(''); }, /** * Converts a Latin1 string to a word array. * * @param {string} latin1Str The Latin1 string. * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); */ parse: function (latin1Str) { // Shortcut var latin1StrLength = latin1Str.length; // Convert var words = []; for (var i = 0; i < latin1StrLength; i++) { words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); } return new WordArray.init(words, latin1StrLength); } }; /** * UTF-8 encoding strategy. */ var Utf8 = C_enc.Utf8 = { /** * Converts a word array to a UTF-8 string. * * @param {WordArray} wordArray The word array. * * @return {string} The UTF-8 string. * * @static * * @example * * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); */ stringify: function (wordArray) { try { return decodeURIComponent(escape(Latin1.stringify(wordArray))); } catch (e) { throw new Error('Malformed UTF-8 data'); } }, /** * Converts a UTF-8 string to a word array. * * @param {string} utf8Str The UTF-8 string. * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); */ parse: function (utf8Str) { return Latin1.parse(unescape(encodeURIComponent(utf8Str))); } }; /** * Abstract buffered block algorithm template. * * The property blockSize must be implemented in a concrete subtype. * * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 */ var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ /** * Resets this block algorithm's data buffer to its initial state. * * @example * * bufferedBlockAlgorithm.reset(); */ reset: function () { // Initial values this._data = new WordArray.init(); this._nDataBytes = 0; }, /** * Adds new data to this block algorithm's buffer. * * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. * * @example * * bufferedBlockAlgorithm._append('data'); * bufferedBlockAlgorithm._append(wordArray); */ _append: function (data) { // Convert string to WordArray, else assume WordArray already if (typeof data == 'string') { data = Utf8.parse(data); } // Append this._data.concat(data); this._nDataBytes += data.sigBytes; }, /** * Processes available data blocks. * * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. * * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. * * @return {WordArray} The processed data. * * @example * * var processedData = bufferedBlockAlgorithm._process(); * var processedData = bufferedBlockAlgorithm._process(!!'flush'); */ _process: function (doFlush) { var processedWords; // Shortcuts var data = this._data; var dataWords = data.words; var dataSigBytes = data.sigBytes; var blockSize = this.blockSize; var blockSizeBytes = blockSize * 4; // Count blocks ready var nBlocksReady = dataSigBytes / blockSizeBytes; if (doFlush) { // Round up to include partial blocks nBlocksReady = Math.ceil(nBlocksReady); } else { // Round down to include only full blocks, // less the number of blocks that must remain in the buffer nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); } // Count words ready var nWordsReady = nBlocksReady * blockSize; // Count bytes ready var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); // Process blocks if (nWordsReady) { for (var offset = 0; offset < nWordsReady; offset += blockSize) { // Perform concrete-algorithm logic this._doProcessBlock(dataWords, offset); } // Remove processed words processedWords = dataWords.splice(0, nWordsReady); data.sigBytes -= nBytesReady; } // Return processed words return new WordArray.init(processedWords, nBytesReady); }, /** * Creates a copy of this object. * * @return {Object} The clone. * * @example * * var clone = bufferedBlockAlgorithm.clone(); */ clone: function () { var clone = Base.clone.call(this); clone._data = this._data.clone(); return clone; }, _minBufferSize: 0 }); /** * Abstract hasher template. * * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) */ var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ /** * Configuration options. */ cfg: Base.extend(), /** * Initializes a newly created hasher. * * @param {Object} cfg (Optional) The configuration options to use for this hash computation. * * @example * * var hasher = CryptoJS.algo.SHA256.create(); */ init: function (cfg) { // Apply config defaults this.cfg = this.cfg.extend(cfg); // Set initial values this.reset(); }, /** * Resets this hasher to its initial state. * * @example * * hasher.reset(); */ reset: function () { // Reset data buffer BufferedBlockAlgorithm.reset.call(this); // Perform concrete-hasher logic this._doReset(); }, /** * Updates this hasher with a message. * * @param {WordArray|string} messageUpdate The message to append. * * @return {Hasher} This hasher. * * @example * * hasher.update('message'); * hasher.update(wordArray); */ update: function (messageUpdate) { // Append this._append(messageUpdate); // Update the hash this._process(); // Chainable return this; }, /** * Finalizes the hash computation. * Note that the finalize operation is effectively a destructive, read-once operation. * * @param {WordArray|string} messageUpdate (Optional) A final message update. * * @return {WordArray} The hash. * * @example * * var hash = hasher.finalize(); * var hash = hasher.finalize('message'); * var hash = hasher.finalize(wordArray); */ finalize: function (messageUpdate) { // Final message update if (messageUpdate) { this._append(messageUpdate); } // Perform concrete-hasher logic var hash = this._doFinalize(); return hash; }, blockSize: 512/32, /** * Creates a shortcut function to a hasher's object interface. * * @param {Hasher} hasher The hasher to create a helper for. * * @return {Function} The shortcut function. * * @static * * @example * * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); */ _createHelper: function (hasher) { return function (message, cfg) { return new hasher.init(cfg).finalize(message); }; }, /** * Creates a shortcut function to the HMAC's object interface. * * @param {Hasher} hasher The hasher to use in this HMAC helper. * * @return {Function} The shortcut function. * * @static * * @example * * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); */ _createHmacHelper: function (hasher) { return function (message, key) { return new C_algo.HMAC.init(hasher, key).finalize(message); }; } }); /** * Algorithm namespace. */ var C_algo = C.algo = {}; return C; }(Math)); return CryptoJS; })); /***/ }), /***/ 80754: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var C_enc = C.enc; /** * Base64 encoding strategy. */ var Base64 = C_enc.Base64 = { /** * Converts a word array to a Base64 string. * * @param {WordArray} wordArray The word array. * * @return {string} The Base64 string. * * @static * * @example * * var base64String = CryptoJS.enc.Base64.stringify(wordArray); */ stringify: function (wordArray) { // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; var map = this._map; // Clamp excess bits wordArray.clamp(); // Convert var base64Chars = []; for (var i = 0; i < sigBytes; i += 3) { var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; var triplet = (byte1 << 16) | (byte2 << 8) | byte3; for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); } } // Add padding var paddingChar = map.charAt(64); if (paddingChar) { while (base64Chars.length % 4) { base64Chars.push(paddingChar); } } return base64Chars.join(''); }, /** * Converts a Base64 string to a word array. * * @param {string} base64Str The Base64 string. * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Base64.parse(base64String); */ parse: function (base64Str) { // Shortcuts var base64StrLength = base64Str.length; var map = this._map; var reverseMap = this._reverseMap; if (!reverseMap) { reverseMap = this._reverseMap = []; for (var j = 0; j < map.length; j++) { reverseMap[map.charCodeAt(j)] = j; } } // Ignore padding var paddingChar = map.charAt(64); if (paddingChar) { var paddingIndex = base64Str.indexOf(paddingChar); if (paddingIndex !== -1) { base64StrLength = paddingIndex; } } // Convert return parseLoop(base64Str, base64StrLength, reverseMap); }, _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' }; function parseLoop(base64Str, base64StrLength, reverseMap) { var words = []; var nBytes = 0; for (var i = 0; i < base64StrLength; i++) { if (i % 4) { var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); var bitsCombined = bits1 | bits2; words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); nBytes++; } } return WordArray.create(words, nBytes); } }()); return CryptoJS.enc.Base64; })); /***/ }), /***/ 64725: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var C_enc = C.enc; /** * Base64url encoding strategy. */ var Base64url = C_enc.Base64url = { /** * Converts a word array to a Base64url string. * * @param {WordArray} wordArray The word array. * * @param {boolean} urlSafe Whether to use url safe * * @return {string} The Base64url string. * * @static * * @example * * var base64String = CryptoJS.enc.Base64url.stringify(wordArray); */ stringify: function (wordArray, urlSafe) { if (urlSafe === undefined) { urlSafe = true } // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; var map = urlSafe ? this._safe_map : this._map; // Clamp excess bits wordArray.clamp(); // Convert var base64Chars = []; for (var i = 0; i < sigBytes; i += 3) { var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; var triplet = (byte1 << 16) | (byte2 << 8) | byte3; for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); } } // Add padding var paddingChar = map.charAt(64); if (paddingChar) { while (base64Chars.length % 4) { base64Chars.push(paddingChar); } } return base64Chars.join(''); }, /** * Converts a Base64url string to a word array. * * @param {string} base64Str The Base64url string. * * @param {boolean} urlSafe Whether to use url safe * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Base64url.parse(base64String); */ parse: function (base64Str, urlSafe) { if (urlSafe === undefined) { urlSafe = true } // Shortcuts var base64StrLength = base64Str.length; var map = urlSafe ? this._safe_map : this._map; var reverseMap = this._reverseMap; if (!reverseMap) { reverseMap = this._reverseMap = []; for (var j = 0; j < map.length; j++) { reverseMap[map.charCodeAt(j)] = j; } } // Ignore padding var paddingChar = map.charAt(64); if (paddingChar) { var paddingIndex = base64Str.indexOf(paddingChar); if (paddingIndex !== -1) { base64StrLength = paddingIndex; } } // Convert return parseLoop(base64Str, base64StrLength, reverseMap); }, _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', }; function parseLoop(base64Str, base64StrLength, reverseMap) { var words = []; var nBytes = 0; for (var i = 0; i < base64StrLength; i++) { if (i % 4) { var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); var bitsCombined = bits1 | bits2; words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); nBytes++; } } return WordArray.create(words, nBytes); } }()); return CryptoJS.enc.Base64url; })); /***/ }), /***/ 45503: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var C_enc = C.enc; /** * UTF-16 BE encoding strategy. */ var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { /** * Converts a word array to a UTF-16 BE string. * * @param {WordArray} wordArray The word array. * * @return {string} The UTF-16 BE string. * * @static * * @example * * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); */ stringify: function (wordArray) { // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; // Convert var utf16Chars = []; for (var i = 0; i < sigBytes; i += 2) { var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; utf16Chars.push(String.fromCharCode(codePoint)); } return utf16Chars.join(''); }, /** * Converts a UTF-16 BE string to a word array. * * @param {string} utf16Str The UTF-16 BE string. * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); */ parse: function (utf16Str) { // Shortcut var utf16StrLength = utf16Str.length; // Convert var words = []; for (var i = 0; i < utf16StrLength; i++) { words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); } return WordArray.create(words, utf16StrLength * 2); } }; /** * UTF-16 LE encoding strategy. */ C_enc.Utf16LE = { /** * Converts a word array to a UTF-16 LE string. * * @param {WordArray} wordArray The word array. * * @return {string} The UTF-16 LE string. * * @static * * @example * * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); */ stringify: function (wordArray) { // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; // Convert var utf16Chars = []; for (var i = 0; i < sigBytes; i += 2) { var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); utf16Chars.push(String.fromCharCode(codePoint)); } return utf16Chars.join(''); }, /** * Converts a UTF-16 LE string to a word array. * * @param {string} utf16Str The UTF-16 LE string. * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); */ parse: function (utf16Str) { // Shortcut var utf16StrLength = utf16Str.length; // Convert var words = []; for (var i = 0; i < utf16StrLength; i++) { words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); } return WordArray.create(words, utf16StrLength * 2); } }; function swapEndian(word) { return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); } }()); return CryptoJS.enc.Utf16; })); /***/ }), /***/ 39506: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(45471), __webpack_require__(51025)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var Base = C_lib.Base; var WordArray = C_lib.WordArray; var C_algo = C.algo; var MD5 = C_algo.MD5; /** * This key derivation function is meant to conform with EVP_BytesToKey. * www.openssl.org/docs/crypto/EVP_BytesToKey.html */ var EvpKDF = C_algo.EvpKDF = Base.extend({ /** * Configuration options. * * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) * @property {Hasher} hasher The hash algorithm to use. Default: MD5 * @property {number} iterations The number of iterations to perform. Default: 1 */ cfg: Base.extend({ keySize: 128/32, hasher: MD5, iterations: 1 }), /** * Initializes a newly created key derivation function. * * @param {Object} cfg (Optional) The configuration options to use for the derivation. * * @example * * var kdf = CryptoJS.algo.EvpKDF.create(); * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); */ init: function (cfg) { this.cfg = this.cfg.extend(cfg); }, /** * Derives a key from a password. * * @param {WordArray|string} password The password. * @param {WordArray|string} salt A salt. * * @return {WordArray} The derived key. * * @example * * var key = kdf.compute(password, salt); */ compute: function (password, salt) { var block; // Shortcut var cfg = this.cfg; // Init hasher var hasher = cfg.hasher.create(); // Initial values var derivedKey = WordArray.create(); // Shortcuts var derivedKeyWords = derivedKey.words; var keySize = cfg.keySize; var iterations = cfg.iterations; // Generate key while (derivedKeyWords.length < keySize) { if (block) { hasher.update(block); } block = hasher.update(password).finalize(salt); hasher.reset(); // Iterations for (var i = 1; i < iterations; i++) { block = hasher.finalize(block); hasher.reset(); } derivedKey.concat(block); } derivedKey.sigBytes = keySize * 4; return derivedKey; } }); /** * Derives a key from a password. * * @param {WordArray|string} password The password. * @param {WordArray|string} salt A salt. * @param {Object} cfg (Optional) The configuration options to use for this computation. * * @return {WordArray} The derived key. * * @static * * @example * * var key = CryptoJS.EvpKDF(password, salt); * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); */ C.EvpKDF = function (password, salt, cfg) { return EvpKDF.create(cfg).compute(password, salt); }; }()); return CryptoJS.EvpKDF; })); /***/ }), /***/ 70025: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { (function (undefined) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var CipherParams = C_lib.CipherParams; var C_enc = C.enc; var Hex = C_enc.Hex; var C_format = C.format; var HexFormatter = C_format.Hex = { /** * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. * * @param {CipherParams} cipherParams The cipher params object. * * @return {string} The hexadecimally encoded string. * * @static * * @example * * var hexString = CryptoJS.format.Hex.stringify(cipherParams); */ stringify: function (cipherParams) { return cipherParams.ciphertext.toString(Hex); }, /** * Converts a hexadecimally encoded ciphertext string to a cipher params object. * * @param {string} input The hexadecimally encoded string. * * @return {CipherParams} The cipher params object. * * @static * * @example * * var cipherParams = CryptoJS.format.Hex.parse(hexString); */ parse: function (input) { var ciphertext = Hex.parse(input); return CipherParams.create({ ciphertext: ciphertext }); } }; }()); return CryptoJS.format.Hex; })); /***/ }), /***/ 51025: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var Base = C_lib.Base; var C_enc = C.enc; var Utf8 = C_enc.Utf8; var C_algo = C.algo; /** * HMAC algorithm. */ var HMAC = C_algo.HMAC = Base.extend({ /** * Initializes a newly created HMAC. * * @param {Hasher} hasher The hash algorithm to use. * @param {WordArray|string} key The secret key. * * @example * * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); */ init: function (hasher, key) { // Init hasher hasher = this._hasher = new hasher.init(); // Convert string to WordArray, else assume WordArray already if (typeof key == 'string') { key = Utf8.parse(key); } // Shortcuts var hasherBlockSize = hasher.blockSize; var hasherBlockSizeBytes = hasherBlockSize * 4; // Allow arbitrary length keys if (key.sigBytes > hasherBlockSizeBytes) { key = hasher.finalize(key); } // Clamp excess bits key.clamp(); // Clone key for inner and outer pads var oKey = this._oKey = key.clone(); var iKey = this._iKey = key.clone(); // Shortcuts var oKeyWords = oKey.words; var iKeyWords = iKey.words; // XOR keys with pad constants for (var i = 0; i < hasherBlockSize; i++) { oKeyWords[i] ^= 0x5c5c5c5c; iKeyWords[i] ^= 0x36363636; } oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; // Set initial values this.reset(); }, /** * Resets this HMAC to its initial state. * * @example * * hmacHasher.reset(); */ reset: function () { // Shortcut var hasher = this._hasher; // Reset hasher.reset(); hasher.update(this._iKey); }, /** * Updates this HMAC with a message. * * @param {WordArray|string} messageUpdate The message to append. * * @return {HMAC} This HMAC instance. * * @example * * hmacHasher.update('message'); * hmacHasher.update(wordArray); */ update: function (messageUpdate) { this._hasher.update(messageUpdate); // Chainable return this; }, /** * Finalizes the HMAC computation. * Note that the finalize operation is effectively a destructive, read-once operation. * * @param {WordArray|string} messageUpdate (Optional) A final message update. * * @return {WordArray} The HMAC. * * @example * * var hmac = hmacHasher.finalize(); * var hmac = hmacHasher.finalize('message'); * var hmac = hmacHasher.finalize(wordArray); */ finalize: function (messageUpdate) { // Shortcut var hasher = this._hasher; // Compute HMAC var innerHash = hasher.finalize(messageUpdate); hasher.reset(); var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); return hmac; } }); }()); })); /***/ }), /***/ 21396: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(43240), __webpack_require__(6440), __webpack_require__(45503), __webpack_require__(80754), __webpack_require__(64725), __webpack_require__(84636), __webpack_require__(45471), __webpack_require__(63009), __webpack_require__(36308), __webpack_require__(81380), __webpack_require__(89557), __webpack_require__(45953), __webpack_require__(78056), __webpack_require__(51025), __webpack_require__(70019), __webpack_require__(39506), __webpack_require__(57165), __webpack_require__(82169), __webpack_require__(96939), __webpack_require__(6372), __webpack_require__(73797), __webpack_require__(38454), __webpack_require__(42073), __webpack_require__(54905), __webpack_require__(10482), __webpack_require__(52155), __webpack_require__(58124), __webpack_require__(70025), __webpack_require__(40955), __webpack_require__(7628), __webpack_require__(77193), __webpack_require__(96298), __webpack_require__(22696), __webpack_require__(43128)); } else {} }(this, function (CryptoJS) { return CryptoJS; })); /***/ }), /***/ 6440: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021)); } else {} }(this, function (CryptoJS) { (function () { // Check if typed arrays are supported if (typeof ArrayBuffer != 'function') { return; } // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; // Reference original init var superInit = WordArray.init; // Augment WordArray.init to handle typed arrays var subInit = WordArray.init = function (typedArray) { // Convert buffers to uint8 if (typedArray instanceof ArrayBuffer) { typedArray = new Uint8Array(typedArray); } // Convert other array views to uint8 if ( typedArray instanceof Int8Array || (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || typedArray instanceof Uint32Array || typedArray instanceof Float32Array || typedArray instanceof Float64Array ) { typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); } // Handle Uint8Array if (typedArray instanceof Uint8Array) { // Shortcut var typedArrayByteLength = typedArray.byteLength; // Extract bytes var words = []; for (var i = 0; i < typedArrayByteLength; i++) { words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); } // Initialize this word array superInit.call(this, words, typedArrayByteLength); } else { // Else call normal init superInit.apply(this, arguments); } }; subInit.prototype = WordArray; }()); return CryptoJS.lib.WordArray; })); /***/ }), /***/ 84636: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021)); } else {} }(this, function (CryptoJS) { (function (Math) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var Hasher = C_lib.Hasher; var C_algo = C.algo; // Constants table var T = []; // Compute constants (function () { for (var i = 0; i < 64; i++) { T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; } }()); /** * MD5 hash algorithm. */ var MD5 = C_algo.MD5 = Hasher.extend({ _doReset: function () { this._hash = new WordArray.init([ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 ]); }, _doProcessBlock: function (M, offset) { // Swap endian for (var i = 0; i < 16; i++) { // Shortcuts var offset_i = offset + i; var M_offset_i = M[offset_i]; M[offset_i] = ( (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) ); } // Shortcuts var H = this._hash.words; var M_offset_0 = M[offset + 0]; var M_offset_1 = M[offset + 1]; var M_offset_2 = M[offset + 2]; var M_offset_3 = M[offset + 3]; var M_offset_4 = M[offset + 4]; var M_offset_5 = M[offset + 5]; var M_offset_6 = M[offset + 6]; var M_offset_7 = M[offset + 7]; var M_offset_8 = M[offset + 8]; var M_offset_9 = M[offset + 9]; var M_offset_10 = M[offset + 10]; var M_offset_11 = M[offset + 11]; var M_offset_12 = M[offset + 12]; var M_offset_13 = M[offset + 13]; var M_offset_14 = M[offset + 14]; var M_offset_15 = M[offset + 15]; // Working variables var a = H[0]; var b = H[1]; var c = H[2]; var d = H[3]; // Computation a = FF(a, b, c, d, M_offset_0, 7, T[0]); d = FF(d, a, b, c, M_offset_1, 12, T[1]); c = FF(c, d, a, b, M_offset_2, 17, T[2]); b = FF(b, c, d, a, M_offset_3, 22, T[3]); a = FF(a, b, c, d, M_offset_4, 7, T[4]); d = FF(d, a, b, c, M_offset_5, 12, T[5]); c = FF(c, d, a, b, M_offset_6, 17, T[6]); b = FF(b, c, d, a, M_offset_7, 22, T[7]); a = FF(a, b, c, d, M_offset_8, 7, T[8]); d = FF(d, a, b, c, M_offset_9, 12, T[9]); c = FF(c, d, a, b, M_offset_10, 17, T[10]); b = FF(b, c, d, a, M_offset_11, 22, T[11]); a = FF(a, b, c, d, M_offset_12, 7, T[12]); d = FF(d, a, b, c, M_offset_13, 12, T[13]); c = FF(c, d, a, b, M_offset_14, 17, T[14]); b = FF(b, c, d, a, M_offset_15, 22, T[15]); a = GG(a, b, c, d, M_offset_1, 5, T[16]); d = GG(d, a, b, c, M_offset_6, 9, T[17]); c = GG(c, d, a, b, M_offset_11, 14, T[18]); b = GG(b, c, d, a, M_offset_0, 20, T[19]); a = GG(a, b, c, d, M_offset_5, 5, T[20]); d = GG(d, a, b, c, M_offset_10, 9, T[21]); c = GG(c, d, a, b, M_offset_15, 14, T[22]); b = GG(b, c, d, a, M_offset_4, 20, T[23]); a = GG(a, b, c, d, M_offset_9, 5, T[24]); d = GG(d, a, b, c, M_offset_14, 9, T[25]); c = GG(c, d, a, b, M_offset_3, 14, T[26]); b = GG(b, c, d, a, M_offset_8, 20, T[27]); a = GG(a, b, c, d, M_offset_13, 5, T[28]); d = GG(d, a, b, c, M_offset_2, 9, T[29]); c = GG(c, d, a, b, M_offset_7, 14, T[30]); b = GG(b, c, d, a, M_offset_12, 20, T[31]); a = HH(a, b, c, d, M_offset_5, 4, T[32]); d = HH(d, a, b, c, M_offset_8, 11, T[33]); c = HH(c, d, a, b, M_offset_11, 16, T[34]); b = HH(b, c, d, a, M_offset_14, 23, T[35]); a = HH(a, b, c, d, M_offset_1, 4, T[36]); d = HH(d, a, b, c, M_offset_4, 11, T[37]); c = HH(c, d, a, b, M_offset_7, 16, T[38]); b = HH(b, c, d, a, M_offset_10, 23, T[39]); a = HH(a, b, c, d, M_offset_13, 4, T[40]); d = HH(d, a, b, c, M_offset_0, 11, T[41]); c = HH(c, d, a, b, M_offset_3, 16, T[42]); b = HH(b, c, d, a, M_offset_6, 23, T[43]); a = HH(a, b, c, d, M_offset_9, 4, T[44]); d = HH(d, a, b, c, M_offset_12, 11, T[45]); c = HH(c, d, a, b, M_offset_15, 16, T[46]); b = HH(b, c, d, a, M_offset_2, 23, T[47]); a = II(a, b, c, d, M_offset_0, 6, T[48]); d = II(d, a, b, c, M_offset_7, 10, T[49]); c = II(c, d, a, b, M_offset_14, 15, T[50]); b = II(b, c, d, a, M_offset_5, 21, T[51]); a = II(a, b, c, d, M_offset_12, 6, T[52]); d = II(d, a, b, c, M_offset_3, 10, T[53]); c = II(c, d, a, b, M_offset_10, 15, T[54]); b = II(b, c, d, a, M_offset_1, 21, T[55]); a = II(a, b, c, d, M_offset_8, 6, T[56]); d = II(d, a, b, c, M_offset_15, 10, T[57]); c = II(c, d, a, b, M_offset_6, 15, T[58]); b = II(b, c, d, a, M_offset_13, 21, T[59]); a = II(a, b, c, d, M_offset_4, 6, T[60]); d = II(d, a, b, c, M_offset_11, 10, T[61]); c = II(c, d, a, b, M_offset_2, 15, T[62]); b = II(b, c, d, a, M_offset_9, 21, T[63]); // Intermediate hash value H[0] = (H[0] + a) | 0; H[1] = (H[1] + b) | 0; H[2] = (H[2] + c) | 0; H[3] = (H[3] + d) | 0; }, _doFinalize: function () { // Shortcuts var data = this._data; var dataWords = data.words; var nBitsTotal = this._nDataBytes * 8; var nBitsLeft = data.sigBytes * 8; // Add padding dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); var nBitsTotalL = nBitsTotal; dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) ); dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) ); data.sigBytes = (dataWords.length + 1) * 4; // Hash final blocks this._process(); // Shortcuts var hash = this._hash; var H = hash.words; // Swap endian for (var i = 0; i < 4; i++) { // Shortcut var H_i = H[i]; H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); } // Return final computed hash return hash; }, clone: function () { var clone = Hasher.clone.call(this); clone._hash = this._hash.clone(); return clone; } }); function FF(a, b, c, d, x, s, t) { var n = a + ((b & c) | (~b & d)) + x + t; return ((n << s) | (n >>> (32 - s))) + b; } function GG(a, b, c, d, x, s, t) { var n = a + ((b & d) | (c & ~d)) + x + t; return ((n << s) | (n >>> (32 - s))) + b; } function HH(a, b, c, d, x, s, t) { var n = a + (b ^ c ^ d) + x + t; return ((n << s) | (n >>> (32 - s))) + b; } function II(a, b, c, d, x, s, t) { var n = a + (c ^ (b | ~d)) + x + t; return ((n << s) | (n >>> (32 - s))) + b; } /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.MD5('message'); * var hash = CryptoJS.MD5(wordArray); */ C.MD5 = Hasher._createHelper(MD5); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacMD5(message, key); */ C.HmacMD5 = Hasher._createHmacHelper(MD5); }(Math)); return CryptoJS.MD5; })); /***/ }), /***/ 82169: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { /** * Cipher Feedback block mode. */ CryptoJS.mode.CFB = (function () { var CFB = CryptoJS.lib.BlockCipherMode.extend(); CFB.Encryptor = CFB.extend({ processBlock: function (words, offset) { // Shortcuts var cipher = this._cipher; var blockSize = cipher.blockSize; generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); // Remember this block to use with next block this._prevBlock = words.slice(offset, offset + blockSize); } }); CFB.Decryptor = CFB.extend({ processBlock: function (words, offset) { // Shortcuts var cipher = this._cipher; var blockSize = cipher.blockSize; // Remember this block to use with next block var thisBlock = words.slice(offset, offset + blockSize); generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); // This block becomes the previous block this._prevBlock = thisBlock; } }); function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { var keystream; // Shortcut var iv = this._iv; // Generate keystream if (iv) { keystream = iv.slice(0); // Remove IV for subsequent blocks this._iv = undefined; } else { keystream = this._prevBlock; } cipher.encryptBlock(keystream, 0); // Encrypt for (var i = 0; i < blockSize; i++) { words[offset + i] ^= keystream[i]; } } return CFB; }()); return CryptoJS.mode.CFB; })); /***/ }), /***/ 6372: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { /** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */ CryptoJS.mode.CTRGladman = (function () { var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); function incWord(word) { if (((word >> 24) & 0xff) === 0xff) { //overflow var b1 = (word >> 16)&0xff; var b2 = (word >> 8)&0xff; var b3 = word & 0xff; if (b1 === 0xff) // overflow b1 { b1 = 0; if (b2 === 0xff) { b2 = 0; if (b3 === 0xff) { b3 = 0; } else { ++b3; } } else { ++b2; } } else { ++b1; } word = 0; word += (b1 << 16); word += (b2 << 8); word += b3; } else { word += (0x01 << 24); } return word; } function incCounter(counter) { if ((counter[0] = incWord(counter[0])) === 0) { // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 counter[1] = incWord(counter[1]); } return counter; } var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ processBlock: function (words, offset) { // Shortcuts var cipher = this._cipher var blockSize = cipher.blockSize; var iv = this._iv; var counter = this._counter; // Generate keystream if (iv) { counter = this._counter = iv.slice(0); // Remove IV for subsequent blocks this._iv = undefined; } incCounter(counter); var keystream = counter.slice(0); cipher.encryptBlock(keystream, 0); // Encrypt for (var i = 0; i < blockSize; i++) { words[offset + i] ^= keystream[i]; } } }); CTRGladman.Decryptor = Encryptor; return CTRGladman; }()); return CryptoJS.mode.CTRGladman; })); /***/ }), /***/ 96939: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { /** * Counter block mode. */ CryptoJS.mode.CTR = (function () { var CTR = CryptoJS.lib.BlockCipherMode.extend(); var Encryptor = CTR.Encryptor = CTR.extend({ processBlock: function (words, offset) { // Shortcuts var cipher = this._cipher var blockSize = cipher.blockSize; var iv = this._iv; var counter = this._counter; // Generate keystream if (iv) { counter = this._counter = iv.slice(0); // Remove IV for subsequent blocks this._iv = undefined; } var keystream = counter.slice(0); cipher.encryptBlock(keystream, 0); // Increment counter counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 // Encrypt for (var i = 0; i < blockSize; i++) { words[offset + i] ^= keystream[i]; } } }); CTR.Decryptor = Encryptor; return CTR; }()); return CryptoJS.mode.CTR; })); /***/ }), /***/ 38454: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { /** * Electronic Codebook block mode. */ CryptoJS.mode.ECB = (function () { var ECB = CryptoJS.lib.BlockCipherMode.extend(); ECB.Encryptor = ECB.extend({ processBlock: function (words, offset) { this._cipher.encryptBlock(words, offset); } }); ECB.Decryptor = ECB.extend({ processBlock: function (words, offset) { this._cipher.decryptBlock(words, offset); } }); return ECB; }()); return CryptoJS.mode.ECB; })); /***/ }), /***/ 73797: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { /** * Output Feedback block mode. */ CryptoJS.mode.OFB = (function () { var OFB = CryptoJS.lib.BlockCipherMode.extend(); var Encryptor = OFB.Encryptor = OFB.extend({ processBlock: function (words, offset) { // Shortcuts var cipher = this._cipher var blockSize = cipher.blockSize; var iv = this._iv; var keystream = this._keystream; // Generate keystream if (iv) { keystream = this._keystream = iv.slice(0); // Remove IV for subsequent blocks this._iv = undefined; } cipher.encryptBlock(keystream, 0); // Encrypt for (var i = 0; i < blockSize; i++) { words[offset + i] ^= keystream[i]; } } }); OFB.Decryptor = Encryptor; return OFB; }()); return CryptoJS.mode.OFB; })); /***/ }), /***/ 42073: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { /** * ANSI X.923 padding strategy. */ CryptoJS.pad.AnsiX923 = { pad: function (data, blockSize) { // Shortcuts var dataSigBytes = data.sigBytes; var blockSizeBytes = blockSize * 4; // Count padding bytes var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; // Compute last byte position var lastBytePos = dataSigBytes + nPaddingBytes - 1; // Pad data.clamp(); data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); data.sigBytes += nPaddingBytes; }, unpad: function (data) { // Get number of padding bytes from last byte var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; // Remove padding data.sigBytes -= nPaddingBytes; } }; return CryptoJS.pad.Ansix923; })); /***/ }), /***/ 54905: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { /** * ISO 10126 padding strategy. */ CryptoJS.pad.Iso10126 = { pad: function (data, blockSize) { // Shortcut var blockSizeBytes = blockSize * 4; // Count padding bytes var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; // Pad data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); }, unpad: function (data) { // Get number of padding bytes from last byte var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; // Remove padding data.sigBytes -= nPaddingBytes; } }; return CryptoJS.pad.Iso10126; })); /***/ }), /***/ 10482: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { /** * ISO/IEC 9797-1 Padding Method 2. */ CryptoJS.pad.Iso97971 = { pad: function (data, blockSize) { // Add 0x80 byte data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); // Zero pad the rest CryptoJS.pad.ZeroPadding.pad(data, blockSize); }, unpad: function (data) { // Remove zero padding CryptoJS.pad.ZeroPadding.unpad(data); // Remove one more byte -- the 0x80 byte data.sigBytes--; } }; return CryptoJS.pad.Iso97971; })); /***/ }), /***/ 58124: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { /** * A noop padding strategy. */ CryptoJS.pad.NoPadding = { pad: function () { }, unpad: function () { } }; return CryptoJS.pad.NoPadding; })); /***/ }), /***/ 52155: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { /** * Zero padding strategy. */ CryptoJS.pad.ZeroPadding = { pad: function (data, blockSize) { // Shortcut var blockSizeBytes = blockSize * 4; // Pad data.clamp(); data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); }, unpad: function (data) { // Shortcut var dataWords = data.words; // Unpad var i = data.sigBytes - 1; for (var i = data.sigBytes - 1; i >= 0; i--) { if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { data.sigBytes = i + 1; break; } } } }; return CryptoJS.pad.ZeroPadding; })); /***/ }), /***/ 70019: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(63009), __webpack_require__(51025)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var Base = C_lib.Base; var WordArray = C_lib.WordArray; var C_algo = C.algo; var SHA256 = C_algo.SHA256; var HMAC = C_algo.HMAC; /** * Password-Based Key Derivation Function 2 algorithm. */ var PBKDF2 = C_algo.PBKDF2 = Base.extend({ /** * Configuration options. * * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) * @property {Hasher} hasher The hasher to use. Default: SHA256 * @property {number} iterations The number of iterations to perform. Default: 250000 */ cfg: Base.extend({ keySize: 128/32, hasher: SHA256, iterations: 250000 }), /** * Initializes a newly created key derivation function. * * @param {Object} cfg (Optional) The configuration options to use for the derivation. * * @example * * var kdf = CryptoJS.algo.PBKDF2.create(); * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); */ init: function (cfg) { this.cfg = this.cfg.extend(cfg); }, /** * Computes the Password-Based Key Derivation Function 2. * * @param {WordArray|string} password The password. * @param {WordArray|string} salt A salt. * * @return {WordArray} The derived key. * * @example * * var key = kdf.compute(password, salt); */ compute: function (password, salt) { // Shortcut var cfg = this.cfg; // Init HMAC var hmac = HMAC.create(cfg.hasher, password); // Initial values var derivedKey = WordArray.create(); var blockIndex = WordArray.create([0x00000001]); // Shortcuts var derivedKeyWords = derivedKey.words; var blockIndexWords = blockIndex.words; var keySize = cfg.keySize; var iterations = cfg.iterations; // Generate key while (derivedKeyWords.length < keySize) { var block = hmac.update(salt).finalize(blockIndex); hmac.reset(); // Shortcuts var blockWords = block.words; var blockWordsLength = blockWords.length; // Iterations var intermediate = block; for (var i = 1; i < iterations; i++) { intermediate = hmac.finalize(intermediate); hmac.reset(); // Shortcut var intermediateWords = intermediate.words; // XOR intermediate with block for (var j = 0; j < blockWordsLength; j++) { blockWords[j] ^= intermediateWords[j]; } } derivedKey.concat(block); blockIndexWords[0]++; } derivedKey.sigBytes = keySize * 4; return derivedKey; } }); /** * Computes the Password-Based Key Derivation Function 2. * * @param {WordArray|string} password The password. * @param {WordArray|string} salt A salt. * @param {Object} cfg (Optional) The configuration options to use for this computation. * * @return {WordArray} The derived key. * * @static * * @example * * var key = CryptoJS.PBKDF2(password, salt); * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); */ C.PBKDF2 = function (password, salt, cfg) { return PBKDF2.create(cfg).compute(password, salt); }; }()); return CryptoJS.PBKDF2; })); /***/ }), /***/ 22696: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(80754), __webpack_require__(84636), __webpack_require__(39506), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var StreamCipher = C_lib.StreamCipher; var C_algo = C.algo; // Reusable objects var S = []; var C_ = []; var G = []; /** * Rabbit stream cipher algorithm. * * This is a legacy version that neglected to convert the key to little-endian. * This error doesn't affect the cipher's security, * but it does affect its compatibility with other implementations. */ var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ _doReset: function () { // Shortcuts var K = this._key.words; var iv = this.cfg.iv; // Generate initial state values var X = this._X = [ K[0], (K[3] << 16) | (K[2] >>> 16), K[1], (K[0] << 16) | (K[3] >>> 16), K[2], (K[1] << 16) | (K[0] >>> 16), K[3], (K[2] << 16) | (K[1] >>> 16) ]; // Generate initial counter values var C = this._C = [ (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) ]; // Carry bit this._b = 0; // Iterate the system four times for (var i = 0; i < 4; i++) { nextState.call(this); } // Modify the counters for (var i = 0; i < 8; i++) { C[i] ^= X[(i + 4) & 7]; } // IV setup if (iv) { // Shortcuts var IV = iv.words; var IV_0 = IV[0]; var IV_1 = IV[1]; // Generate four subvectors var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); var i1 = (i0 >>> 16) | (i2 & 0xffff0000); var i3 = (i2 << 16) | (i0 & 0x0000ffff); // Modify counter values C[0] ^= i0; C[1] ^= i1; C[2] ^= i2; C[3] ^= i3; C[4] ^= i0; C[5] ^= i1; C[6] ^= i2; C[7] ^= i3; // Iterate the system four times for (var i = 0; i < 4; i++) { nextState.call(this); } } }, _doProcessBlock: function (M, offset) { // Shortcut var X = this._X; // Iterate the system nextState.call(this); // Generate four keystream words S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); for (var i = 0; i < 4; i++) { // Swap endian S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); // Encrypt M[offset + i] ^= S[i]; } }, blockSize: 128/32, ivSize: 64/32 }); function nextState() { // Shortcuts var X = this._X; var C = this._C; // Save old counter values for (var i = 0; i < 8; i++) { C_[i] = C[i]; } // Calculate new counter values C[0] = (C[0] + 0x4d34d34d + this._b) | 0; C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; // Calculate the g-values for (var i = 0; i < 8; i++) { var gx = X[i] + C[i]; // Construct high and low argument for squaring var ga = gx & 0xffff; var gb = gx >>> 16; // Calculate high and low result of squaring var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); // High XOR low G[i] = gh ^ gl; } // Calculate new state values X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; } /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); */ C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); }()); return CryptoJS.RabbitLegacy; })); /***/ }), /***/ 96298: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(80754), __webpack_require__(84636), __webpack_require__(39506), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var StreamCipher = C_lib.StreamCipher; var C_algo = C.algo; // Reusable objects var S = []; var C_ = []; var G = []; /** * Rabbit stream cipher algorithm */ var Rabbit = C_algo.Rabbit = StreamCipher.extend({ _doReset: function () { // Shortcuts var K = this._key.words; var iv = this.cfg.iv; // Swap endian for (var i = 0; i < 4; i++) { K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); } // Generate initial state values var X = this._X = [ K[0], (K[3] << 16) | (K[2] >>> 16), K[1], (K[0] << 16) | (K[3] >>> 16), K[2], (K[1] << 16) | (K[0] >>> 16), K[3], (K[2] << 16) | (K[1] >>> 16) ]; // Generate initial counter values var C = this._C = [ (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) ]; // Carry bit this._b = 0; // Iterate the system four times for (var i = 0; i < 4; i++) { nextState.call(this); } // Modify the counters for (var i = 0; i < 8; i++) { C[i] ^= X[(i + 4) & 7]; } // IV setup if (iv) { // Shortcuts var IV = iv.words; var IV_0 = IV[0]; var IV_1 = IV[1]; // Generate four subvectors var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); var i1 = (i0 >>> 16) | (i2 & 0xffff0000); var i3 = (i2 << 16) | (i0 & 0x0000ffff); // Modify counter values C[0] ^= i0; C[1] ^= i1; C[2] ^= i2; C[3] ^= i3; C[4] ^= i0; C[5] ^= i1; C[6] ^= i2; C[7] ^= i3; // Iterate the system four times for (var i = 0; i < 4; i++) { nextState.call(this); } } }, _doProcessBlock: function (M, offset) { // Shortcut var X = this._X; // Iterate the system nextState.call(this); // Generate four keystream words S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); for (var i = 0; i < 4; i++) { // Swap endian S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); // Encrypt M[offset + i] ^= S[i]; } }, blockSize: 128/32, ivSize: 64/32 }); function nextState() { // Shortcuts var X = this._X; var C = this._C; // Save old counter values for (var i = 0; i < 8; i++) { C_[i] = C[i]; } // Calculate new counter values C[0] = (C[0] + 0x4d34d34d + this._b) | 0; C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; // Calculate the g-values for (var i = 0; i < 8; i++) { var gx = X[i] + C[i]; // Construct high and low argument for squaring var ga = gx & 0xffff; var gb = gx >>> 16; // Calculate high and low result of squaring var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); // High XOR low G[i] = gh ^ gl; } // Calculate new state values X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; } /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); */ C.Rabbit = StreamCipher._createHelper(Rabbit); }()); return CryptoJS.Rabbit; })); /***/ }), /***/ 77193: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(80754), __webpack_require__(84636), __webpack_require__(39506), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var StreamCipher = C_lib.StreamCipher; var C_algo = C.algo; /** * RC4 stream cipher algorithm. */ var RC4 = C_algo.RC4 = StreamCipher.extend({ _doReset: function () { // Shortcuts var key = this._key; var keyWords = key.words; var keySigBytes = key.sigBytes; // Init sbox var S = this._S = []; for (var i = 0; i < 256; i++) { S[i] = i; } // Key setup for (var i = 0, j = 0; i < 256; i++) { var keyByteIndex = i % keySigBytes; var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; j = (j + S[i] + keyByte) % 256; // Swap var t = S[i]; S[i] = S[j]; S[j] = t; } // Counters this._i = this._j = 0; }, _doProcessBlock: function (M, offset) { M[offset] ^= generateKeystreamWord.call(this); }, keySize: 256/32, ivSize: 0 }); function generateKeystreamWord() { // Shortcuts var S = this._S; var i = this._i; var j = this._j; // Generate keystream word var keystreamWord = 0; for (var n = 0; n < 4; n++) { i = (i + 1) % 256; j = (j + S[i]) % 256; // Swap var t = S[i]; S[i] = S[j]; S[j] = t; keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); } // Update counters this._i = i; this._j = j; return keystreamWord; } /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); */ C.RC4 = StreamCipher._createHelper(RC4); /** * Modified RC4 stream cipher algorithm. */ var RC4Drop = C_algo.RC4Drop = RC4.extend({ /** * Configuration options. * * @property {number} drop The number of keystream words to drop. Default 192 */ cfg: RC4.cfg.extend({ drop: 192 }), _doReset: function () { RC4._doReset.call(this); // Drop for (var i = this.cfg.drop; i > 0; i--) { generateKeystreamWord.call(this); } } }); /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); */ C.RC4Drop = StreamCipher._createHelper(RC4Drop); }()); return CryptoJS.RC4; })); /***/ }), /***/ 78056: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021)); } else {} }(this, function (CryptoJS) { /** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ (function (Math) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var Hasher = C_lib.Hasher; var C_algo = C.algo; // Constants table var _zl = WordArray.create([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); var _zr = WordArray.create([ 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); var _sl = WordArray.create([ 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); var _sr = WordArray.create([ 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); /** * RIPEMD160 hash algorithm. */ var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ _doReset: function () { this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); }, _doProcessBlock: function (M, offset) { // Swap endian for (var i = 0; i < 16; i++) { // Shortcuts var offset_i = offset + i; var M_offset_i = M[offset_i]; // Swap M[offset_i] = ( (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) ); } // Shortcut var H = this._hash.words; var hl = _hl.words; var hr = _hr.words; var zl = _zl.words; var zr = _zr.words; var sl = _sl.words; var sr = _sr.words; // Working variables var al, bl, cl, dl, el; var ar, br, cr, dr, er; ar = al = H[0]; br = bl = H[1]; cr = cl = H[2]; dr = dl = H[3]; er = el = H[4]; // Computation var t; for (var i = 0; i < 80; i += 1) { t = (al + M[offset+zl[i]])|0; if (i<16){ t += f1(bl,cl,dl) + hl[0]; } else if (i<32) { t += f2(bl,cl,dl) + hl[1]; } else if (i<48) { t += f3(bl,cl,dl) + hl[2]; } else if (i<64) { t += f4(bl,cl,dl) + hl[3]; } else {// if (i<80) { t += f5(bl,cl,dl) + hl[4]; } t = t|0; t = rotl(t,sl[i]); t = (t+el)|0; al = el; el = dl; dl = rotl(cl, 10); cl = bl; bl = t; t = (ar + M[offset+zr[i]])|0; if (i<16){ t += f5(br,cr,dr) + hr[0]; } else if (i<32) { t += f4(br,cr,dr) + hr[1]; } else if (i<48) { t += f3(br,cr,dr) + hr[2]; } else if (i<64) { t += f2(br,cr,dr) + hr[3]; } else {// if (i<80) { t += f1(br,cr,dr) + hr[4]; } t = t|0; t = rotl(t,sr[i]) ; t = (t+er)|0; ar = er; er = dr; dr = rotl(cr, 10); cr = br; br = t; } // Intermediate hash value t = (H[1] + cl + dr)|0; H[1] = (H[2] + dl + er)|0; H[2] = (H[3] + el + ar)|0; H[3] = (H[4] + al + br)|0; H[4] = (H[0] + bl + cr)|0; H[0] = t; }, _doFinalize: function () { // Shortcuts var data = this._data; var dataWords = data.words; var nBitsTotal = this._nDataBytes * 8; var nBitsLeft = data.sigBytes * 8; // Add padding dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) ); data.sigBytes = (dataWords.length + 1) * 4; // Hash final blocks this._process(); // Shortcuts var hash = this._hash; var H = hash.words; // Swap endian for (var i = 0; i < 5; i++) { // Shortcut var H_i = H[i]; // Swap H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); } // Return final computed hash return hash; }, clone: function () { var clone = Hasher.clone.call(this); clone._hash = this._hash.clone(); return clone; } }); function f1(x, y, z) { return ((x) ^ (y) ^ (z)); } function f2(x, y, z) { return (((x)&(y)) | ((~x)&(z))); } function f3(x, y, z) { return (((x) | (~(y))) ^ (z)); } function f4(x, y, z) { return (((x) & (z)) | ((y)&(~(z)))); } function f5(x, y, z) { return ((x) ^ ((y) |(~(z)))); } function rotl(x,n) { return (x<>>(32-n)); } /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.RIPEMD160('message'); * var hash = CryptoJS.RIPEMD160(wordArray); */ C.RIPEMD160 = Hasher._createHelper(RIPEMD160); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacRIPEMD160(message, key); */ C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); }(Math)); return CryptoJS.RIPEMD160; })); /***/ }), /***/ 45471: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var Hasher = C_lib.Hasher; var C_algo = C.algo; // Reusable object var W = []; /** * SHA-1 hash algorithm. */ var SHA1 = C_algo.SHA1 = Hasher.extend({ _doReset: function () { this._hash = new WordArray.init([ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ]); }, _doProcessBlock: function (M, offset) { // Shortcut var H = this._hash.words; // Working variables var a = H[0]; var b = H[1]; var c = H[2]; var d = H[3]; var e = H[4]; // Computation for (var i = 0; i < 80; i++) { if (i < 16) { W[i] = M[offset + i] | 0; } else { var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; W[i] = (n << 1) | (n >>> 31); } var t = ((a << 5) | (a >>> 27)) + e + W[i]; if (i < 20) { t += ((b & c) | (~b & d)) + 0x5a827999; } else if (i < 40) { t += (b ^ c ^ d) + 0x6ed9eba1; } else if (i < 60) { t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; } else /* if (i < 80) */ { t += (b ^ c ^ d) - 0x359d3e2a; } e = d; d = c; c = (b << 30) | (b >>> 2); b = a; a = t; } // Intermediate hash value H[0] = (H[0] + a) | 0; H[1] = (H[1] + b) | 0; H[2] = (H[2] + c) | 0; H[3] = (H[3] + d) | 0; H[4] = (H[4] + e) | 0; }, _doFinalize: function () { // Shortcuts var data = this._data; var dataWords = data.words; var nBitsTotal = this._nDataBytes * 8; var nBitsLeft = data.sigBytes * 8; // Add padding dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; data.sigBytes = dataWords.length * 4; // Hash final blocks this._process(); // Return final computed hash return this._hash; }, clone: function () { var clone = Hasher.clone.call(this); clone._hash = this._hash.clone(); return clone; } }); /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.SHA1('message'); * var hash = CryptoJS.SHA1(wordArray); */ C.SHA1 = Hasher._createHelper(SHA1); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacSHA1(message, key); */ C.HmacSHA1 = Hasher._createHmacHelper(SHA1); }()); return CryptoJS.SHA1; })); /***/ }), /***/ 36308: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(63009)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var C_algo = C.algo; var SHA256 = C_algo.SHA256; /** * SHA-224 hash algorithm. */ var SHA224 = C_algo.SHA224 = SHA256.extend({ _doReset: function () { this._hash = new WordArray.init([ 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ]); }, _doFinalize: function () { var hash = SHA256._doFinalize.call(this); hash.sigBytes -= 4; return hash; } }); /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.SHA224('message'); * var hash = CryptoJS.SHA224(wordArray); */ C.SHA224 = SHA256._createHelper(SHA224); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacSHA224(message, key); */ C.HmacSHA224 = SHA256._createHmacHelper(SHA224); }()); return CryptoJS.SHA224; })); /***/ }), /***/ 63009: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021)); } else {} }(this, function (CryptoJS) { (function (Math) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var Hasher = C_lib.Hasher; var C_algo = C.algo; // Initialization and round constants tables var H = []; var K = []; // Compute constants (function () { function isPrime(n) { var sqrtN = Math.sqrt(n); for (var factor = 2; factor <= sqrtN; factor++) { if (!(n % factor)) { return false; } } return true; } function getFractionalBits(n) { return ((n - (n | 0)) * 0x100000000) | 0; } var n = 2; var nPrime = 0; while (nPrime < 64) { if (isPrime(n)) { if (nPrime < 8) { H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); } K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); nPrime++; } n++; } }()); // Reusable object var W = []; /** * SHA-256 hash algorithm. */ var SHA256 = C_algo.SHA256 = Hasher.extend({ _doReset: function () { this._hash = new WordArray.init(H.slice(0)); }, _doProcessBlock: function (M, offset) { // Shortcut var H = this._hash.words; // Working variables var a = H[0]; var b = H[1]; var c = H[2]; var d = H[3]; var e = H[4]; var f = H[5]; var g = H[6]; var h = H[7]; // Computation for (var i = 0; i < 64; i++) { if (i < 16) { W[i] = M[offset + i] | 0; } else { var gamma0x = W[i - 15]; var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ ((gamma0x << 14) | (gamma0x >>> 18)) ^ (gamma0x >>> 3); var gamma1x = W[i - 2]; var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ ((gamma1x << 13) | (gamma1x >>> 19)) ^ (gamma1x >>> 10); W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; } var ch = (e & f) ^ (~e & g); var maj = (a & b) ^ (a & c) ^ (b & c); var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); var t1 = h + sigma1 + ch + K[i] + W[i]; var t2 = sigma0 + maj; h = g; g = f; f = e; e = (d + t1) | 0; d = c; c = b; b = a; a = (t1 + t2) | 0; } // Intermediate hash value H[0] = (H[0] + a) | 0; H[1] = (H[1] + b) | 0; H[2] = (H[2] + c) | 0; H[3] = (H[3] + d) | 0; H[4] = (H[4] + e) | 0; H[5] = (H[5] + f) | 0; H[6] = (H[6] + g) | 0; H[7] = (H[7] + h) | 0; }, _doFinalize: function () { // Shortcuts var data = this._data; var dataWords = data.words; var nBitsTotal = this._nDataBytes * 8; var nBitsLeft = data.sigBytes * 8; // Add padding dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; data.sigBytes = dataWords.length * 4; // Hash final blocks this._process(); // Return final computed hash return this._hash; }, clone: function () { var clone = Hasher.clone.call(this); clone._hash = this._hash.clone(); return clone; } }); /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.SHA256('message'); * var hash = CryptoJS.SHA256(wordArray); */ C.SHA256 = Hasher._createHelper(SHA256); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacSHA256(message, key); */ C.HmacSHA256 = Hasher._createHmacHelper(SHA256); }(Math)); return CryptoJS.SHA256; })); /***/ }), /***/ 45953: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(43240)); } else {} }(this, function (CryptoJS) { (function (Math) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var Hasher = C_lib.Hasher; var C_x64 = C.x64; var X64Word = C_x64.Word; var C_algo = C.algo; // Constants tables var RHO_OFFSETS = []; var PI_INDEXES = []; var ROUND_CONSTANTS = []; // Compute Constants (function () { // Compute rho offset constants var x = 1, y = 0; for (var t = 0; t < 24; t++) { RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; var newX = y % 5; var newY = (2 * x + 3 * y) % 5; x = newX; y = newY; } // Compute pi index constants for (var x = 0; x < 5; x++) { for (var y = 0; y < 5; y++) { PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; } } // Compute round constants var LFSR = 0x01; for (var i = 0; i < 24; i++) { var roundConstantMsw = 0; var roundConstantLsw = 0; for (var j = 0; j < 7; j++) { if (LFSR & 0x01) { var bitPosition = (1 << j) - 1; if (bitPosition < 32) { roundConstantLsw ^= 1 << bitPosition; } else /* if (bitPosition >= 32) */ { roundConstantMsw ^= 1 << (bitPosition - 32); } } // Compute next LFSR if (LFSR & 0x80) { // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 LFSR = (LFSR << 1) ^ 0x71; } else { LFSR <<= 1; } } ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); } }()); // Reusable objects for temporary values var T = []; (function () { for (var i = 0; i < 25; i++) { T[i] = X64Word.create(); } }()); /** * SHA-3 hash algorithm. */ var SHA3 = C_algo.SHA3 = Hasher.extend({ /** * Configuration options. * * @property {number} outputLength * The desired number of bits in the output hash. * Only values permitted are: 224, 256, 384, 512. * Default: 512 */ cfg: Hasher.cfg.extend({ outputLength: 512 }), _doReset: function () { var state = this._state = [] for (var i = 0; i < 25; i++) { state[i] = new X64Word.init(); } this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; }, _doProcessBlock: function (M, offset) { // Shortcuts var state = this._state; var nBlockSizeLanes = this.blockSize / 2; // Absorb for (var i = 0; i < nBlockSizeLanes; i++) { // Shortcuts var M2i = M[offset + 2 * i]; var M2i1 = M[offset + 2 * i + 1]; // Swap endian M2i = ( (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) ); M2i1 = ( (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) ); // Absorb message into state var lane = state[i]; lane.high ^= M2i1; lane.low ^= M2i; } // Rounds for (var round = 0; round < 24; round++) { // Theta for (var x = 0; x < 5; x++) { // Mix column lanes var tMsw = 0, tLsw = 0; for (var y = 0; y < 5; y++) { var lane = state[x + 5 * y]; tMsw ^= lane.high; tLsw ^= lane.low; } // Temporary values var Tx = T[x]; Tx.high = tMsw; Tx.low = tLsw; } for (var x = 0; x < 5; x++) { // Shortcuts var Tx4 = T[(x + 4) % 5]; var Tx1 = T[(x + 1) % 5]; var Tx1Msw = Tx1.high; var Tx1Lsw = Tx1.low; // Mix surrounding columns var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); for (var y = 0; y < 5; y++) { var lane = state[x + 5 * y]; lane.high ^= tMsw; lane.low ^= tLsw; } } // Rho Pi for (var laneIndex = 1; laneIndex < 25; laneIndex++) { var tMsw; var tLsw; // Shortcuts var lane = state[laneIndex]; var laneMsw = lane.high; var laneLsw = lane.low; var rhoOffset = RHO_OFFSETS[laneIndex]; // Rotate lanes if (rhoOffset < 32) { tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); } else /* if (rhoOffset >= 32) */ { tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); } // Transpose lanes var TPiLane = T[PI_INDEXES[laneIndex]]; TPiLane.high = tMsw; TPiLane.low = tLsw; } // Rho pi at x = y = 0 var T0 = T[0]; var state0 = state[0]; T0.high = state0.high; T0.low = state0.low; // Chi for (var x = 0; x < 5; x++) { for (var y = 0; y < 5; y++) { // Shortcuts var laneIndex = x + 5 * y; var lane = state[laneIndex]; var TLane = T[laneIndex]; var Tx1Lane = T[((x + 1) % 5) + 5 * y]; var Tx2Lane = T[((x + 2) % 5) + 5 * y]; // Mix rows lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); } } // Iota var lane = state[0]; var roundConstant = ROUND_CONSTANTS[round]; lane.high ^= roundConstant.high; lane.low ^= roundConstant.low; } }, _doFinalize: function () { // Shortcuts var data = this._data; var dataWords = data.words; var nBitsTotal = this._nDataBytes * 8; var nBitsLeft = data.sigBytes * 8; var blockSizeBits = this.blockSize * 32; // Add padding dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; data.sigBytes = dataWords.length * 4; // Hash final blocks this._process(); // Shortcuts var state = this._state; var outputLengthBytes = this.cfg.outputLength / 8; var outputLengthLanes = outputLengthBytes / 8; // Squeeze var hashWords = []; for (var i = 0; i < outputLengthLanes; i++) { // Shortcuts var lane = state[i]; var laneMsw = lane.high; var laneLsw = lane.low; // Swap endian laneMsw = ( (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) ); laneLsw = ( (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) ); // Squeeze state to retrieve hash hashWords.push(laneLsw); hashWords.push(laneMsw); } // Return final computed hash return new WordArray.init(hashWords, outputLengthBytes); }, clone: function () { var clone = Hasher.clone.call(this); var state = clone._state = this._state.slice(0); for (var i = 0; i < 25; i++) { state[i] = state[i].clone(); } return clone; } }); /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.SHA3('message'); * var hash = CryptoJS.SHA3(wordArray); */ C.SHA3 = Hasher._createHelper(SHA3); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacSHA3(message, key); */ C.HmacSHA3 = Hasher._createHmacHelper(SHA3); }(Math)); return CryptoJS.SHA3; })); /***/ }), /***/ 89557: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(43240), __webpack_require__(81380)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_x64 = C.x64; var X64Word = C_x64.Word; var X64WordArray = C_x64.WordArray; var C_algo = C.algo; var SHA512 = C_algo.SHA512; /** * SHA-384 hash algorithm. */ var SHA384 = C_algo.SHA384 = SHA512.extend({ _doReset: function () { this._hash = new X64WordArray.init([ new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) ]); }, _doFinalize: function () { var hash = SHA512._doFinalize.call(this); hash.sigBytes -= 16; return hash; } }); /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.SHA384('message'); * var hash = CryptoJS.SHA384(wordArray); */ C.SHA384 = SHA512._createHelper(SHA384); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacSHA384(message, key); */ C.HmacSHA384 = SHA512._createHmacHelper(SHA384); }()); return CryptoJS.SHA384; })); /***/ }), /***/ 81380: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(43240)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var Hasher = C_lib.Hasher; var C_x64 = C.x64; var X64Word = C_x64.Word; var X64WordArray = C_x64.WordArray; var C_algo = C.algo; function X64Word_create() { return X64Word.create.apply(X64Word, arguments); } // Constants var K = [ X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) ]; // Reusable objects var W = []; (function () { for (var i = 0; i < 80; i++) { W[i] = X64Word_create(); } }()); /** * SHA-512 hash algorithm. */ var SHA512 = C_algo.SHA512 = Hasher.extend({ _doReset: function () { this._hash = new X64WordArray.init([ new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) ]); }, _doProcessBlock: function (M, offset) { // Shortcuts var H = this._hash.words; var H0 = H[0]; var H1 = H[1]; var H2 = H[2]; var H3 = H[3]; var H4 = H[4]; var H5 = H[5]; var H6 = H[6]; var H7 = H[7]; var H0h = H0.high; var H0l = H0.low; var H1h = H1.high; var H1l = H1.low; var H2h = H2.high; var H2l = H2.low; var H3h = H3.high; var H3l = H3.low; var H4h = H4.high; var H4l = H4.low; var H5h = H5.high; var H5l = H5.low; var H6h = H6.high; var H6l = H6.low; var H7h = H7.high; var H7l = H7.low; // Working variables var ah = H0h; var al = H0l; var bh = H1h; var bl = H1l; var ch = H2h; var cl = H2l; var dh = H3h; var dl = H3l; var eh = H4h; var el = H4l; var fh = H5h; var fl = H5l; var gh = H6h; var gl = H6l; var hh = H7h; var hl = H7l; // Rounds for (var i = 0; i < 80; i++) { var Wil; var Wih; // Shortcut var Wi = W[i]; // Extend message if (i < 16) { Wih = Wi.high = M[offset + i * 2] | 0; Wil = Wi.low = M[offset + i * 2 + 1] | 0; } else { // Gamma0 var gamma0x = W[i - 15]; var gamma0xh = gamma0x.high; var gamma0xl = gamma0x.low; var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); // Gamma1 var gamma1x = W[i - 2]; var gamma1xh = gamma1x.high; var gamma1xl = gamma1x.low; var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] var Wi7 = W[i - 7]; var Wi7h = Wi7.high; var Wi7l = Wi7.low; var Wi16 = W[i - 16]; var Wi16h = Wi16.high; var Wi16l = Wi16.low; Wil = gamma0l + Wi7l; Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); Wil = Wil + gamma1l; Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); Wil = Wil + Wi16l; Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); Wi.high = Wih; Wi.low = Wil; } var chh = (eh & fh) ^ (~eh & gh); var chl = (el & fl) ^ (~el & gl); var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); var majl = (al & bl) ^ (al & cl) ^ (bl & cl); var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); // t1 = h + sigma1 + ch + K[i] + W[i] var Ki = K[i]; var Kih = Ki.high; var Kil = Ki.low; var t1l = hl + sigma1l; var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); var t1l = t1l + chl; var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); var t1l = t1l + Kil; var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); var t1l = t1l + Wil; var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); // t2 = sigma0 + maj var t2l = sigma0l + majl; var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); // Update working variables hh = gh; hl = gl; gh = fh; gl = fl; fh = eh; fl = el; el = (dl + t1l) | 0; eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; dh = ch; dl = cl; ch = bh; cl = bl; bh = ah; bl = al; al = (t1l + t2l) | 0; ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; } // Intermediate hash value H0l = H0.low = (H0l + al); H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); H1l = H1.low = (H1l + bl); H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); H2l = H2.low = (H2l + cl); H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); H3l = H3.low = (H3l + dl); H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); H4l = H4.low = (H4l + el); H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); H5l = H5.low = (H5l + fl); H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); H6l = H6.low = (H6l + gl); H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); H7l = H7.low = (H7l + hl); H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); }, _doFinalize: function () { // Shortcuts var data = this._data; var dataWords = data.words; var nBitsTotal = this._nDataBytes * 8; var nBitsLeft = data.sigBytes * 8; // Add padding dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; data.sigBytes = dataWords.length * 4; // Hash final blocks this._process(); // Convert hash to 32-bit word array before returning var hash = this._hash.toX32(); // Return final computed hash return hash; }, clone: function () { var clone = Hasher.clone.call(this); clone._hash = this._hash.clone(); return clone; }, blockSize: 1024/32 }); /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.SHA512('message'); * var hash = CryptoJS.SHA512(wordArray); */ C.SHA512 = Hasher._createHelper(SHA512); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacSHA512(message, key); */ C.HmacSHA512 = Hasher._createHmacHelper(SHA512); }()); return CryptoJS.SHA512; })); /***/ }), /***/ 7628: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021), __webpack_require__(80754), __webpack_require__(84636), __webpack_require__(39506), __webpack_require__(57165)); } else {} }(this, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var BlockCipher = C_lib.BlockCipher; var C_algo = C.algo; // Permuted Choice 1 constants var PC1 = [ 57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4 ]; // Permuted Choice 2 constants var PC2 = [ 14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32 ]; // Cumulative bit shift constants var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; // SBOXes and round permutation constants var SBOX_P = [ { 0x0: 0x808200, 0x10000000: 0x8000, 0x20000000: 0x808002, 0x30000000: 0x2, 0x40000000: 0x200, 0x50000000: 0x808202, 0x60000000: 0x800202, 0x70000000: 0x800000, 0x80000000: 0x202, 0x90000000: 0x800200, 0xa0000000: 0x8200, 0xb0000000: 0x808000, 0xc0000000: 0x8002, 0xd0000000: 0x800002, 0xe0000000: 0x0, 0xf0000000: 0x8202, 0x8000000: 0x0, 0x18000000: 0x808202, 0x28000000: 0x8202, 0x38000000: 0x8000, 0x48000000: 0x808200, 0x58000000: 0x200, 0x68000000: 0x808002, 0x78000000: 0x2, 0x88000000: 0x800200, 0x98000000: 0x8200, 0xa8000000: 0x808000, 0xb8000000: 0x800202, 0xc8000000: 0x800002, 0xd8000000: 0x8002, 0xe8000000: 0x202, 0xf8000000: 0x800000, 0x1: 0x8000, 0x10000001: 0x2, 0x20000001: 0x808200, 0x30000001: 0x800000, 0x40000001: 0x808002, 0x50000001: 0x8200, 0x60000001: 0x200, 0x70000001: 0x800202, 0x80000001: 0x808202, 0x90000001: 0x808000, 0xa0000001: 0x800002, 0xb0000001: 0x8202, 0xc0000001: 0x202, 0xd0000001: 0x800200, 0xe0000001: 0x8002, 0xf0000001: 0x0, 0x8000001: 0x808202, 0x18000001: 0x808000, 0x28000001: 0x800000, 0x38000001: 0x200, 0x48000001: 0x8000, 0x58000001: 0x800002, 0x68000001: 0x2, 0x78000001: 0x8202, 0x88000001: 0x8002, 0x98000001: 0x800202, 0xa8000001: 0x202, 0xb8000001: 0x808200, 0xc8000001: 0x800200, 0xd8000001: 0x0, 0xe8000001: 0x8200, 0xf8000001: 0x808002 }, { 0x0: 0x40084010, 0x1000000: 0x4000, 0x2000000: 0x80000, 0x3000000: 0x40080010, 0x4000000: 0x40000010, 0x5000000: 0x40084000, 0x6000000: 0x40004000, 0x7000000: 0x10, 0x8000000: 0x84000, 0x9000000: 0x40004010, 0xa000000: 0x40000000, 0xb000000: 0x84010, 0xc000000: 0x80010, 0xd000000: 0x0, 0xe000000: 0x4010, 0xf000000: 0x40080000, 0x800000: 0x40004000, 0x1800000: 0x84010, 0x2800000: 0x10, 0x3800000: 0x40004010, 0x4800000: 0x40084010, 0x5800000: 0x40000000, 0x6800000: 0x80000, 0x7800000: 0x40080010, 0x8800000: 0x80010, 0x9800000: 0x0, 0xa800000: 0x4000, 0xb800000: 0x40080000, 0xc800000: 0x40000010, 0xd800000: 0x84000, 0xe800000: 0x40084000, 0xf800000: 0x4010, 0x10000000: 0x0, 0x11000000: 0x40080010, 0x12000000: 0x40004010, 0x13000000: 0x40084000, 0x14000000: 0x40080000, 0x15000000: 0x10, 0x16000000: 0x84010, 0x17000000: 0x4000, 0x18000000: 0x4010, 0x19000000: 0x80000, 0x1a000000: 0x80010, 0x1b000000: 0x40000010, 0x1c000000: 0x84000, 0x1d000000: 0x40004000, 0x1e000000: 0x40000000, 0x1f000000: 0x40084010, 0x10800000: 0x84010, 0x11800000: 0x80000, 0x12800000: 0x40080000, 0x13800000: 0x4000, 0x14800000: 0x40004000, 0x15800000: 0x40084010, 0x16800000: 0x10, 0x17800000: 0x40000000, 0x18800000: 0x40084000, 0x19800000: 0x40000010, 0x1a800000: 0x40004010, 0x1b800000: 0x80010, 0x1c800000: 0x0, 0x1d800000: 0x4010, 0x1e800000: 0x40080010, 0x1f800000: 0x84000 }, { 0x0: 0x104, 0x100000: 0x0, 0x200000: 0x4000100, 0x300000: 0x10104, 0x400000: 0x10004, 0x500000: 0x4000004, 0x600000: 0x4010104, 0x700000: 0x4010000, 0x800000: 0x4000000, 0x900000: 0x4010100, 0xa00000: 0x10100, 0xb00000: 0x4010004, 0xc00000: 0x4000104, 0xd00000: 0x10000, 0xe00000: 0x4, 0xf00000: 0x100, 0x80000: 0x4010100, 0x180000: 0x4010004, 0x280000: 0x0, 0x380000: 0x4000100, 0x480000: 0x4000004, 0x580000: 0x10000, 0x680000: 0x10004, 0x780000: 0x104, 0x880000: 0x4, 0x980000: 0x100, 0xa80000: 0x4010000, 0xb80000: 0x10104, 0xc80000: 0x10100, 0xd80000: 0x4000104, 0xe80000: 0x4010104, 0xf80000: 0x4000000, 0x1000000: 0x4010100, 0x1100000: 0x10004, 0x1200000: 0x10000, 0x1300000: 0x4000100, 0x1400000: 0x100, 0x1500000: 0x4010104, 0x1600000: 0x4000004, 0x1700000: 0x0, 0x1800000: 0x4000104, 0x1900000: 0x4000000, 0x1a00000: 0x4, 0x1b00000: 0x10100, 0x1c00000: 0x4010000, 0x1d00000: 0x104, 0x1e00000: 0x10104, 0x1f00000: 0x4010004, 0x1080000: 0x4000000, 0x1180000: 0x104, 0x1280000: 0x4010100, 0x1380000: 0x0, 0x1480000: 0x10004, 0x1580000: 0x4000100, 0x1680000: 0x100, 0x1780000: 0x4010004, 0x1880000: 0x10000, 0x1980000: 0x4010104, 0x1a80000: 0x10104, 0x1b80000: 0x4000004, 0x1c80000: 0x4000104, 0x1d80000: 0x4010000, 0x1e80000: 0x4, 0x1f80000: 0x10100 }, { 0x0: 0x80401000, 0x10000: 0x80001040, 0x20000: 0x401040, 0x30000: 0x80400000, 0x40000: 0x0, 0x50000: 0x401000, 0x60000: 0x80000040, 0x70000: 0x400040, 0x80000: 0x80000000, 0x90000: 0x400000, 0xa0000: 0x40, 0xb0000: 0x80001000, 0xc0000: 0x80400040, 0xd0000: 0x1040, 0xe0000: 0x1000, 0xf0000: 0x80401040, 0x8000: 0x80001040, 0x18000: 0x40, 0x28000: 0x80400040, 0x38000: 0x80001000, 0x48000: 0x401000, 0x58000: 0x80401040, 0x68000: 0x0, 0x78000: 0x80400000, 0x88000: 0x1000, 0x98000: 0x80401000, 0xa8000: 0x400000, 0xb8000: 0x1040, 0xc8000: 0x80000000, 0xd8000: 0x400040, 0xe8000: 0x401040, 0xf8000: 0x80000040, 0x100000: 0x400040, 0x110000: 0x401000, 0x120000: 0x80000040, 0x130000: 0x0, 0x140000: 0x1040, 0x150000: 0x80400040, 0x160000: 0x80401000, 0x170000: 0x80001040, 0x180000: 0x80401040, 0x190000: 0x80000000, 0x1a0000: 0x80400000, 0x1b0000: 0x401040, 0x1c0000: 0x80001000, 0x1d0000: 0x400000, 0x1e0000: 0x40, 0x1f0000: 0x1000, 0x108000: 0x80400000, 0x118000: 0x80401040, 0x128000: 0x0, 0x138000: 0x401000, 0x148000: 0x400040, 0x158000: 0x80000000, 0x168000: 0x80001040, 0x178000: 0x40, 0x188000: 0x80000040, 0x198000: 0x1000, 0x1a8000: 0x80001000, 0x1b8000: 0x80400040, 0x1c8000: 0x1040, 0x1d8000: 0x80401000, 0x1e8000: 0x400000, 0x1f8000: 0x401040 }, { 0x0: 0x80, 0x1000: 0x1040000, 0x2000: 0x40000, 0x3000: 0x20000000, 0x4000: 0x20040080, 0x5000: 0x1000080, 0x6000: 0x21000080, 0x7000: 0x40080, 0x8000: 0x1000000, 0x9000: 0x20040000, 0xa000: 0x20000080, 0xb000: 0x21040080, 0xc000: 0x21040000, 0xd000: 0x0, 0xe000: 0x1040080, 0xf000: 0x21000000, 0x800: 0x1040080, 0x1800: 0x21000080, 0x2800: 0x80, 0x3800: 0x1040000, 0x4800: 0x40000, 0x5800: 0x20040080, 0x6800: 0x21040000, 0x7800: 0x20000000, 0x8800: 0x20040000, 0x9800: 0x0, 0xa800: 0x21040080, 0xb800: 0x1000080, 0xc800: 0x20000080, 0xd800: 0x21000000, 0xe800: 0x1000000, 0xf800: 0x40080, 0x10000: 0x40000, 0x11000: 0x80, 0x12000: 0x20000000, 0x13000: 0x21000080, 0x14000: 0x1000080, 0x15000: 0x21040000, 0x16000: 0x20040080, 0x17000: 0x1000000, 0x18000: 0x21040080, 0x19000: 0x21000000, 0x1a000: 0x1040000, 0x1b000: 0x20040000, 0x1c000: 0x40080, 0x1d000: 0x20000080, 0x1e000: 0x0, 0x1f000: 0x1040080, 0x10800: 0x21000080, 0x11800: 0x1000000, 0x12800: 0x1040000, 0x13800: 0x20040080, 0x14800: 0x20000000, 0x15800: 0x1040080, 0x16800: 0x80, 0x17800: 0x21040000, 0x18800: 0x40080, 0x19800: 0x21040080, 0x1a800: 0x0, 0x1b800: 0x21000000, 0x1c800: 0x1000080, 0x1d800: 0x40000, 0x1e800: 0x20040000, 0x1f800: 0x20000080 }, { 0x0: 0x10000008, 0x100: 0x2000, 0x200: 0x10200000, 0x300: 0x10202008, 0x400: 0x10002000, 0x500: 0x200000, 0x600: 0x200008, 0x700: 0x10000000, 0x800: 0x0, 0x900: 0x10002008, 0xa00: 0x202000, 0xb00: 0x8, 0xc00: 0x10200008, 0xd00: 0x202008, 0xe00: 0x2008, 0xf00: 0x10202000, 0x80: 0x10200000, 0x180: 0x10202008, 0x280: 0x8, 0x380: 0x200000, 0x480: 0x202008, 0x580: 0x10000008, 0x680: 0x10002000, 0x780: 0x2008, 0x880: 0x200008, 0x980: 0x2000, 0xa80: 0x10002008, 0xb80: 0x10200008, 0xc80: 0x0, 0xd80: 0x10202000, 0xe80: 0x202000, 0xf80: 0x10000000, 0x1000: 0x10002000, 0x1100: 0x10200008, 0x1200: 0x10202008, 0x1300: 0x2008, 0x1400: 0x200000, 0x1500: 0x10000000, 0x1600: 0x10000008, 0x1700: 0x202000, 0x1800: 0x202008, 0x1900: 0x0, 0x1a00: 0x8, 0x1b00: 0x10200000, 0x1c00: 0x2000, 0x1d00: 0x10002008, 0x1e00: 0x10202000, 0x1f00: 0x200008, 0x1080: 0x8, 0x1180: 0x202000, 0x1280: 0x200000, 0x1380: 0x10000008, 0x1480: 0x10002000, 0x1580: 0x2008, 0x1680: 0x10202008, 0x1780: 0x10200000, 0x1880: 0x10202000, 0x1980: 0x10200008, 0x1a80: 0x2000, 0x1b80: 0x202008, 0x1c80: 0x200008, 0x1d80: 0x0, 0x1e80: 0x10000000, 0x1f80: 0x10002008 }, { 0x0: 0x100000, 0x10: 0x2000401, 0x20: 0x400, 0x30: 0x100401, 0x40: 0x2100401, 0x50: 0x0, 0x60: 0x1, 0x70: 0x2100001, 0x80: 0x2000400, 0x90: 0x100001, 0xa0: 0x2000001, 0xb0: 0x2100400, 0xc0: 0x2100000, 0xd0: 0x401, 0xe0: 0x100400, 0xf0: 0x2000000, 0x8: 0x2100001, 0x18: 0x0, 0x28: 0x2000401, 0x38: 0x2100400, 0x48: 0x100000, 0x58: 0x2000001, 0x68: 0x2000000, 0x78: 0x401, 0x88: 0x100401, 0x98: 0x2000400, 0xa8: 0x2100000, 0xb8: 0x100001, 0xc8: 0x400, 0xd8: 0x2100401, 0xe8: 0x1, 0xf8: 0x100400, 0x100: 0x2000000, 0x110: 0x100000, 0x120: 0x2000401, 0x130: 0x2100001, 0x140: 0x100001, 0x150: 0x2000400, 0x160: 0x2100400, 0x170: 0x100401, 0x180: 0x401, 0x190: 0x2100401, 0x1a0: 0x100400, 0x1b0: 0x1, 0x1c0: 0x0, 0x1d0: 0x2100000, 0x1e0: 0x2000001, 0x1f0: 0x400, 0x108: 0x100400, 0x118: 0x2000401, 0x128: 0x2100001, 0x138: 0x1, 0x148: 0x2000000, 0x158: 0x100000, 0x168: 0x401, 0x178: 0x2100400, 0x188: 0x2000001, 0x198: 0x2100000, 0x1a8: 0x0, 0x1b8: 0x2100401, 0x1c8: 0x100401, 0x1d8: 0x400, 0x1e8: 0x2000400, 0x1f8: 0x100001 }, { 0x0: 0x8000820, 0x1: 0x20000, 0x2: 0x8000000, 0x3: 0x20, 0x4: 0x20020, 0x5: 0x8020820, 0x6: 0x8020800, 0x7: 0x800, 0x8: 0x8020000, 0x9: 0x8000800, 0xa: 0x20800, 0xb: 0x8020020, 0xc: 0x820, 0xd: 0x0, 0xe: 0x8000020, 0xf: 0x20820, 0x80000000: 0x800, 0x80000001: 0x8020820, 0x80000002: 0x8000820, 0x80000003: 0x8000000, 0x80000004: 0x8020000, 0x80000005: 0x20800, 0x80000006: 0x20820, 0x80000007: 0x20, 0x80000008: 0x8000020, 0x80000009: 0x820, 0x8000000a: 0x20020, 0x8000000b: 0x8020800, 0x8000000c: 0x0, 0x8000000d: 0x8020020, 0x8000000e: 0x8000800, 0x8000000f: 0x20000, 0x10: 0x20820, 0x11: 0x8020800, 0x12: 0x20, 0x13: 0x800, 0x14: 0x8000800, 0x15: 0x8000020, 0x16: 0x8020020, 0x17: 0x20000, 0x18: 0x0, 0x19: 0x20020, 0x1a: 0x8020000, 0x1b: 0x8000820, 0x1c: 0x8020820, 0x1d: 0x20800, 0x1e: 0x820, 0x1f: 0x8000000, 0x80000010: 0x20000, 0x80000011: 0x800, 0x80000012: 0x8020020, 0x80000013: 0x20820, 0x80000014: 0x20, 0x80000015: 0x8020000, 0x80000016: 0x8000000, 0x80000017: 0x8000820, 0x80000018: 0x8020820, 0x80000019: 0x8000020, 0x8000001a: 0x8000800, 0x8000001b: 0x0, 0x8000001c: 0x20800, 0x8000001d: 0x820, 0x8000001e: 0x20020, 0x8000001f: 0x8020800 } ]; // Masks that select the SBOX input var SBOX_MASK = [ 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f ]; /** * DES block cipher algorithm. */ var DES = C_algo.DES = BlockCipher.extend({ _doReset: function () { // Shortcuts var key = this._key; var keyWords = key.words; // Select 56 bits according to PC1 var keyBits = []; for (var i = 0; i < 56; i++) { var keyBitPos = PC1[i] - 1; keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; } // Assemble 16 subkeys var subKeys = this._subKeys = []; for (var nSubKey = 0; nSubKey < 16; nSubKey++) { // Create subkey var subKey = subKeys[nSubKey] = []; // Shortcut var bitShift = BIT_SHIFTS[nSubKey]; // Select 48 bits according to PC2 for (var i = 0; i < 24; i++) { // Select from the left 28 key bits subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); // Select from the right 28 key bits subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); } // Since each subkey is applied to an expanded 32-bit input, // the subkey can be broken into 8 values scaled to 32-bits, // which allows the key to be used without expansion subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); for (var i = 1; i < 7; i++) { subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); } subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); } // Compute inverse subkeys var invSubKeys = this._invSubKeys = []; for (var i = 0; i < 16; i++) { invSubKeys[i] = subKeys[15 - i]; } }, encryptBlock: function (M, offset) { this._doCryptBlock(M, offset, this._subKeys); }, decryptBlock: function (M, offset) { this._doCryptBlock(M, offset, this._invSubKeys); }, _doCryptBlock: function (M, offset, subKeys) { // Get input this._lBlock = M[offset]; this._rBlock = M[offset + 1]; // Initial permutation exchangeLR.call(this, 4, 0x0f0f0f0f); exchangeLR.call(this, 16, 0x0000ffff); exchangeRL.call(this, 2, 0x33333333); exchangeRL.call(this, 8, 0x00ff00ff); exchangeLR.call(this, 1, 0x55555555); // Rounds for (var round = 0; round < 16; round++) { // Shortcuts var subKey = subKeys[round]; var lBlock = this._lBlock; var rBlock = this._rBlock; // Feistel function var f = 0; for (var i = 0; i < 8; i++) { f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; } this._lBlock = rBlock; this._rBlock = lBlock ^ f; } // Undo swap from last round var t = this._lBlock; this._lBlock = this._rBlock; this._rBlock = t; // Final permutation exchangeLR.call(this, 1, 0x55555555); exchangeRL.call(this, 8, 0x00ff00ff); exchangeRL.call(this, 2, 0x33333333); exchangeLR.call(this, 16, 0x0000ffff); exchangeLR.call(this, 4, 0x0f0f0f0f); // Set output M[offset] = this._lBlock; M[offset + 1] = this._rBlock; }, keySize: 64/32, ivSize: 64/32, blockSize: 64/32 }); // Swap bits across the left and right words function exchangeLR(offset, mask) { var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; this._rBlock ^= t; this._lBlock ^= t << offset; } function exchangeRL(offset, mask) { var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; this._lBlock ^= t; this._rBlock ^= t << offset; } /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); */ C.DES = BlockCipher._createHelper(DES); /** * Triple-DES block cipher algorithm. */ var TripleDES = C_algo.TripleDES = BlockCipher.extend({ _doReset: function () { // Shortcuts var key = this._key; var keyWords = key.words; // Make sure the key length is valid (64, 128 or >= 192 bit) if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) { throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.'); } // Extend the key according to the keying options defined in 3DES standard var key1 = keyWords.slice(0, 2); var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); // Create DES instances this._des1 = DES.createEncryptor(WordArray.create(key1)); this._des2 = DES.createEncryptor(WordArray.create(key2)); this._des3 = DES.createEncryptor(WordArray.create(key3)); }, encryptBlock: function (M, offset) { this._des1.encryptBlock(M, offset); this._des2.decryptBlock(M, offset); this._des3.encryptBlock(M, offset); }, decryptBlock: function (M, offset) { this._des3.decryptBlock(M, offset); this._des2.encryptBlock(M, offset); this._des1.decryptBlock(M, offset); }, keySize: 192/32, ivSize: 64/32, blockSize: 64/32 }); /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); */ C.TripleDES = BlockCipher._createHelper(TripleDES); }()); return CryptoJS.TripleDES; })); /***/ }), /***/ 43240: /***/ (function(module, exports, __webpack_require__) { ;(function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(19021)); } else {} }(this, function (CryptoJS) { (function (undefined) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var Base = C_lib.Base; var X32WordArray = C_lib.WordArray; /** * x64 namespace. */ var C_x64 = C.x64 = {}; /** * A 64-bit word. */ var X64Word = C_x64.Word = Base.extend({ /** * Initializes a newly created 64-bit word. * * @param {number} high The high 32 bits. * @param {number} low The low 32 bits. * * @example * * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); */ init: function (high, low) { this.high = high; this.low = low; } /** * Bitwise NOTs this word. * * @return {X64Word} A new x64-Word object after negating. * * @example * * var negated = x64Word.not(); */ // not: function () { // var high = ~this.high; // var low = ~this.low; // return X64Word.create(high, low); // }, /** * Bitwise ANDs this word with the passed word. * * @param {X64Word} word The x64-Word to AND with this word. * * @return {X64Word} A new x64-Word object after ANDing. * * @example * * var anded = x64Word.and(anotherX64Word); */ // and: function (word) { // var high = this.high & word.high; // var low = this.low & word.low; // return X64Word.create(high, low); // }, /** * Bitwise ORs this word with the passed word. * * @param {X64Word} word The x64-Word to OR with this word. * * @return {X64Word} A new x64-Word object after ORing. * * @example * * var ored = x64Word.or(anotherX64Word); */ // or: function (word) { // var high = this.high | word.high; // var low = this.low | word.low; // return X64Word.create(high, low); // }, /** * Bitwise XORs this word with the passed word. * * @param {X64Word} word The x64-Word to XOR with this word. * * @return {X64Word} A new x64-Word object after XORing. * * @example * * var xored = x64Word.xor(anotherX64Word); */ // xor: function (word) { // var high = this.high ^ word.high; // var low = this.low ^ word.low; // return X64Word.create(high, low); // }, /** * Shifts this word n bits to the left. * * @param {number} n The number of bits to shift. * * @return {X64Word} A new x64-Word object after shifting. * * @example * * var shifted = x64Word.shiftL(25); */ // shiftL: function (n) { // if (n < 32) { // var high = (this.high << n) | (this.low >>> (32 - n)); // var low = this.low << n; // } else { // var high = this.low << (n - 32); // var low = 0; // } // return X64Word.create(high, low); // }, /** * Shifts this word n bits to the right. * * @param {number} n The number of bits to shift. * * @return {X64Word} A new x64-Word object after shifting. * * @example * * var shifted = x64Word.shiftR(7); */ // shiftR: function (n) { // if (n < 32) { // var low = (this.low >>> n) | (this.high << (32 - n)); // var high = this.high >>> n; // } else { // var low = this.high >>> (n - 32); // var high = 0; // } // return X64Word.create(high, low); // }, /** * Rotates this word n bits to the left. * * @param {number} n The number of bits to rotate. * * @return {X64Word} A new x64-Word object after rotating. * * @example * * var rotated = x64Word.rotL(25); */ // rotL: function (n) { // return this.shiftL(n).or(this.shiftR(64 - n)); // }, /** * Rotates this word n bits to the right. * * @param {number} n The number of bits to rotate. * * @return {X64Word} A new x64-Word object after rotating. * * @example * * var rotated = x64Word.rotR(7); */ // rotR: function (n) { // return this.shiftR(n).or(this.shiftL(64 - n)); // }, /** * Adds this word with the passed word. * * @param {X64Word} word The x64-Word to add with this word. * * @return {X64Word} A new x64-Word object after adding. * * @example * * var added = x64Word.add(anotherX64Word); */ // add: function (word) { // var low = (this.low + word.low) | 0; // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; // var high = (this.high + word.high + carry) | 0; // return X64Word.create(high, low); // } }); /** * An array of 64-bit words. * * @property {Array} words The array of CryptoJS.x64.Word objects. * @property {number} sigBytes The number of significant bytes in this word array. */ var X64WordArray = C_x64.WordArray = Base.extend({ /** * Initializes a newly created word array. * * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. * @param {number} sigBytes (Optional) The number of significant bytes in the words. * * @example * * var wordArray = CryptoJS.x64.WordArray.create(); * * var wordArray = CryptoJS.x64.WordArray.create([ * CryptoJS.x64.Word.create(0x00010203, 0x04050607), * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) * ]); * * var wordArray = CryptoJS.x64.WordArray.create([ * CryptoJS.x64.Word.create(0x00010203, 0x04050607), * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) * ], 10); */ init: function (words, sigBytes) { words = this.words = words || []; if (sigBytes != undefined) { this.sigBytes = sigBytes; } else { this.sigBytes = words.length * 8; } }, /** * Converts this 64-bit word array to a 32-bit word array. * * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. * * @example * * var x32WordArray = x64WordArray.toX32(); */ toX32: function () { // Shortcuts var x64Words = this.words; var x64WordsLength = x64Words.length; // Convert var x32Words = []; for (var i = 0; i < x64WordsLength; i++) { var x64Word = x64Words[i]; x32Words.push(x64Word.high); x32Words.push(x64Word.low); } return X32WordArray.create(x32Words, this.sigBytes); }, /** * Creates a copy of this word array. * * @return {X64WordArray} The clone. * * @example * * var clone = x64WordArray.clone(); */ clone: function () { var clone = Base.clone.call(this); // Clone "words" array var words = clone.words = this.words.slice(0); // Clone each X64Word object var wordsLength = words.length; for (var i = 0; i < wordsLength; i++) { words[i] = words[i].clone(); } return clone; } }); }()); return CryptoJS; })); /***/ }), /***/ 30454: /***/ ((module) => { "use strict"; var token = '%[a-f0-9]{2}'; var singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi'); var multiMatcher = new RegExp('(' + token + ')+', 'gi'); function decodeComponents(components, split) { try { // Try to decode the entire string first return [decodeURIComponent(components.join(''))]; } catch (err) { // Do nothing } if (components.length === 1) { return components; } split = split || 1; // Split the array in 2 parts var left = components.slice(0, split); var right = components.slice(split); return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right)); } function decode(input) { try { return decodeURIComponent(input); } catch (err) { var tokens = input.match(singleMatcher) || []; for (var i = 1; i < tokens.length; i++) { input = decodeComponents(tokens, i).join(''); tokens = input.match(singleMatcher) || []; } return input; } } function customDecodeURIComponent(input) { // Keep track of all the replacements and prefill the map with the `BOM` var replaceMap = { '%FE%FF': '\uFFFD\uFFFD', '%FF%FE': '\uFFFD\uFFFD' }; var match = multiMatcher.exec(input); while (match) { try { // Decode as big chunks as possible replaceMap[match[0]] = decodeURIComponent(match[0]); } catch (err) { var result = decode(match[0]); if (result !== match[0]) { replaceMap[match[0]] = result; } } match = multiMatcher.exec(input); } // Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else replaceMap['%C2'] = '\uFFFD'; var entries = Object.keys(replaceMap); for (var i = 0; i < entries.length; i++) { // Replace all decoded components var key = entries[i]; input = input.replace(new RegExp(key, 'g'), replaceMap[key]); } return input; } module.exports = function (encodedURI) { if (typeof encodedURI !== 'string') { throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`'); } try { encodedURI = encodedURI.replace(/\+/g, ' '); // Try the built in decoder first return decodeURIComponent(encodedURI); } catch (err) { // Fallback to a more advanced decoder return customDecodeURIComponent(encodedURI); } }; /***/ }), /***/ 30041: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $defineProperty = __webpack_require__(30655); var $SyntaxError = __webpack_require__(58068); var $TypeError = __webpack_require__(69675); var gopd = __webpack_require__(75795); /** @type {import('.')} */ module.exports = function defineDataProperty( obj, property, value ) { if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { throw new $TypeError('`obj` must be an object or a function`'); } if (typeof property !== 'string' && typeof property !== 'symbol') { throw new $TypeError('`property` must be a string or a symbol`'); } if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); } if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); } if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); } if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { throw new $TypeError('`loose`, if provided, must be a boolean'); } var nonEnumerable = arguments.length > 3 ? arguments[3] : null; var nonWritable = arguments.length > 4 ? arguments[4] : null; var nonConfigurable = arguments.length > 5 ? arguments[5] : null; var loose = arguments.length > 6 ? arguments[6] : false; /* @type {false | TypedPropertyDescriptor} */ var desc = !!gopd && gopd(obj, property); if ($defineProperty) { $defineProperty(obj, property, { configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, value: value, writable: nonWritable === null && desc ? desc.writable : !nonWritable }); } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable obj[property] = value; // eslint-disable-line no-param-reassign } else { throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); } }; /***/ }), /***/ 7176: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var callBind = __webpack_require__(73126); var gOPD = __webpack_require__(75795); var hasProtoAccessor; try { // eslint-disable-next-line no-extra-parens, no-proto hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; } catch (e) { if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { throw e; } } // eslint-disable-next-line no-extra-parens var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); var $Object = Object; var $getPrototypeOf = $Object.getPrototypeOf; /** @type {import('./get')} */ module.exports = desc && typeof desc.get === 'function' ? callBind([desc.get]) : typeof $getPrototypeOf === 'function' ? /** @type {import('./get')} */ function getDunder(value) { // eslint-disable-next-line eqeqeq return $getPrototypeOf(value == null ? value : $Object(value)); } : false; /***/ }), /***/ 30655: /***/ ((module) => { "use strict"; /** @type {import('.')} */ var $defineProperty = Object.defineProperty || false; if ($defineProperty) { try { $defineProperty({}, 'a', { value: 1 }); } catch (e) { // IE 8 has a broken defineProperty $defineProperty = false; } } module.exports = $defineProperty; /***/ }), /***/ 41237: /***/ ((module) => { "use strict"; /** @type {import('./eval')} */ module.exports = EvalError; /***/ }), /***/ 69383: /***/ ((module) => { "use strict"; /** @type {import('.')} */ module.exports = Error; /***/ }), /***/ 79290: /***/ ((module) => { "use strict"; /** @type {import('./range')} */ module.exports = RangeError; /***/ }), /***/ 79538: /***/ ((module) => { "use strict"; /** @type {import('./ref')} */ module.exports = ReferenceError; /***/ }), /***/ 58068: /***/ ((module) => { "use strict"; /** @type {import('./syntax')} */ module.exports = SyntaxError; /***/ }), /***/ 69675: /***/ ((module) => { "use strict"; /** @type {import('./type')} */ module.exports = TypeError; /***/ }), /***/ 35345: /***/ ((module) => { "use strict"; /** @type {import('./uri')} */ module.exports = URIError; /***/ }), /***/ 79612: /***/ ((module) => { "use strict"; /** @type {import('.')} */ module.exports = Object; /***/ }), /***/ 73055: /***/ ((module) => { "use strict"; module.exports = function (obj, predicate) { var ret = {}; var keys = Object.keys(obj); var isArr = Array.isArray(predicate); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var val = obj[key]; if (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) { ret[key] = val; } } return ret; }; /***/ }), /***/ 82682: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isCallable = __webpack_require__(69600); var toStr = Object.prototype.toString; var hasOwnProperty = Object.prototype.hasOwnProperty; var forEachArray = function forEachArray(array, iterator, receiver) { for (var i = 0, len = array.length; i < len; i++) { if (hasOwnProperty.call(array, i)) { if (receiver == null) { iterator(array[i], i, array); } else { iterator.call(receiver, array[i], i, array); } } } }; var forEachString = function forEachString(string, iterator, receiver) { for (var i = 0, len = string.length; i < len; i++) { // no such thing as a sparse string. if (receiver == null) { iterator(string.charAt(i), i, string); } else { iterator.call(receiver, string.charAt(i), i, string); } } }; var forEachObject = function forEachObject(object, iterator, receiver) { for (var k in object) { if (hasOwnProperty.call(object, k)) { if (receiver == null) { iterator(object[k], k, object); } else { iterator.call(receiver, object[k], k, object); } } } }; var forEach = function forEach(list, iterator, thisArg) { if (!isCallable(iterator)) { throw new TypeError('iterator must be a function'); } var receiver; if (arguments.length >= 3) { receiver = thisArg; } if (toStr.call(list) === '[object Array]') { forEachArray(list, iterator, receiver); } else if (typeof list === 'string') { forEachString(list, iterator, receiver); } else { forEachObject(list, iterator, receiver); } }; module.exports = forEach; /***/ }), /***/ 89353: /***/ ((module) => { "use strict"; /* eslint no-invalid-this: 1 */ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; var toStr = Object.prototype.toString; var max = Math.max; var funcType = '[object Function]'; var concatty = function concatty(a, b) { var arr = []; for (var i = 0; i < a.length; i += 1) { arr[i] = a[i]; } for (var j = 0; j < b.length; j += 1) { arr[j + a.length] = b[j]; } return arr; }; var slicy = function slicy(arrLike, offset) { var arr = []; for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { arr[j] = arrLike[i]; } return arr; }; var joiny = function (arr, joiner) { var str = ''; for (var i = 0; i < arr.length; i += 1) { str += arr[i]; if (i + 1 < arr.length) { str += joiner; } } return str; }; module.exports = function bind(that) { var target = this; if (typeof target !== 'function' || toStr.apply(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } var args = slicy(arguments, 1); var bound; var binder = function () { if (this instanceof bound) { var result = target.apply( this, concatty(args, arguments) ); if (Object(result) === result) { return result; } return this; } return target.apply( that, concatty(args, arguments) ); }; var boundLength = max(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { boundArgs[i] = '$' + i; } bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ 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; }; /***/ }), /***/ 66743: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var implementation = __webpack_require__(89353); module.exports = Function.prototype.bind || implementation; /***/ }), /***/ 70453: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var undefined; var $Object = __webpack_require__(79612); var $Error = __webpack_require__(69383); var $EvalError = __webpack_require__(41237); var $RangeError = __webpack_require__(79290); var $ReferenceError = __webpack_require__(79538); var $SyntaxError = __webpack_require__(58068); var $TypeError = __webpack_require__(69675); var $URIError = __webpack_require__(35345); var abs = __webpack_require__(71514); var floor = __webpack_require__(58968); var max = __webpack_require__(6188); var min = __webpack_require__(68002); var pow = __webpack_require__(75880); var round = __webpack_require__(70414); var sign = __webpack_require__(73093); var $Function = Function; // eslint-disable-next-line consistent-return var getEvalledConstructor = function (expressionSyntax) { try { return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); } catch (e) {} }; var $gOPD = __webpack_require__(75795); var $defineProperty = __webpack_require__(30655); var throwTypeError = function () { throw new $TypeError(); }; var ThrowTypeError = $gOPD ? (function () { try { // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties arguments.callee; // IE 8 does not throw here return throwTypeError; } catch (calleeThrows) { try { // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') return $gOPD(arguments, 'callee').get; } catch (gOPDthrows) { return throwTypeError; } } }()) : throwTypeError; var hasSymbols = __webpack_require__(64039)(); var getProto = __webpack_require__(93628); var $ObjectGPO = __webpack_require__(71064); var $ReflectGPO = __webpack_require__(48648); var $apply = __webpack_require__(11002); var $call = __webpack_require__(10076); var needsEval = {}; var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); var INTRINSICS = { __proto__: null, '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, '%Array%': Array, '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, '%AsyncFromSyncIteratorPrototype%': undefined, '%AsyncFunction%': needsEval, '%AsyncGenerator%': needsEval, '%AsyncGeneratorFunction%': needsEval, '%AsyncIteratorPrototype%': needsEval, '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, '%Boolean%': Boolean, '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, '%Date%': Date, '%decodeURI%': decodeURI, '%decodeURIComponent%': decodeURIComponent, '%encodeURI%': encodeURI, '%encodeURIComponent%': encodeURIComponent, '%Error%': $Error, '%eval%': eval, // eslint-disable-line no-eval '%EvalError%': $EvalError, '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, '%Function%': $Function, '%GeneratorFunction%': needsEval, '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, '%isFinite%': isFinite, '%isNaN%': isNaN, '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, '%JSON%': typeof JSON === 'object' ? JSON : undefined, '%Map%': typeof Map === 'undefined' ? undefined : Map, '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), '%Math%': Math, '%Number%': Number, '%Object%': $Object, '%Object.getOwnPropertyDescriptor%': $gOPD, '%parseFloat%': parseFloat, '%parseInt%': parseInt, '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, '%RangeError%': $RangeError, '%ReferenceError%': $ReferenceError, '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, '%RegExp%': RegExp, '%Set%': typeof Set === 'undefined' ? undefined : Set, '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, '%String%': String, '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, '%Symbol%': hasSymbols ? Symbol : undefined, '%SyntaxError%': $SyntaxError, '%ThrowTypeError%': ThrowTypeError, '%TypedArray%': TypedArray, '%TypeError%': $TypeError, '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, '%URIError%': $URIError, '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, '%Function.prototype.call%': $call, '%Function.prototype.apply%': $apply, '%Object.defineProperty%': $defineProperty, '%Object.getPrototypeOf%': $ObjectGPO, '%Math.abs%': abs, '%Math.floor%': floor, '%Math.max%': max, '%Math.min%': min, '%Math.pow%': pow, '%Math.round%': round, '%Math.sign%': sign, '%Reflect.getPrototypeOf%': $ReflectGPO }; if (getProto) { try { null.error; // eslint-disable-line no-unused-expressions } catch (e) { // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 var errorProto = getProto(getProto(e)); INTRINSICS['%Error.prototype%'] = errorProto; } } var doEval = function doEval(name) { var value; if (name === '%AsyncFunction%') { value = getEvalledConstructor('async function () {}'); } else if (name === '%GeneratorFunction%') { value = getEvalledConstructor('function* () {}'); } else if (name === '%AsyncGeneratorFunction%') { value = getEvalledConstructor('async function* () {}'); } else if (name === '%AsyncGenerator%') { var fn = doEval('%AsyncGeneratorFunction%'); if (fn) { value = fn.prototype; } } else if (name === '%AsyncIteratorPrototype%') { var gen = doEval('%AsyncGenerator%'); if (gen && getProto) { value = getProto(gen.prototype); } } INTRINSICS[name] = value; return value; }; var LEGACY_ALIASES = { __proto__: null, '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], '%ArrayPrototype%': ['Array', 'prototype'], '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], '%ArrayProto_values%': ['Array', 'prototype', 'values'], '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], '%BooleanPrototype%': ['Boolean', 'prototype'], '%DataViewPrototype%': ['DataView', 'prototype'], '%DatePrototype%': ['Date', 'prototype'], '%ErrorPrototype%': ['Error', 'prototype'], '%EvalErrorPrototype%': ['EvalError', 'prototype'], '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], '%FunctionPrototype%': ['Function', 'prototype'], '%Generator%': ['GeneratorFunction', 'prototype'], '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], '%JSONParse%': ['JSON', 'parse'], '%JSONStringify%': ['JSON', 'stringify'], '%MapPrototype%': ['Map', 'prototype'], '%NumberPrototype%': ['Number', 'prototype'], '%ObjectPrototype%': ['Object', 'prototype'], '%ObjProto_toString%': ['Object', 'prototype', 'toString'], '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], '%PromisePrototype%': ['Promise', 'prototype'], '%PromiseProto_then%': ['Promise', 'prototype', 'then'], '%Promise_all%': ['Promise', 'all'], '%Promise_reject%': ['Promise', 'reject'], '%Promise_resolve%': ['Promise', 'resolve'], '%RangeErrorPrototype%': ['RangeError', 'prototype'], '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], '%RegExpPrototype%': ['RegExp', 'prototype'], '%SetPrototype%': ['Set', 'prototype'], '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], '%StringPrototype%': ['String', 'prototype'], '%SymbolPrototype%': ['Symbol', 'prototype'], '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], '%TypedArrayPrototype%': ['TypedArray', 'prototype'], '%TypeErrorPrototype%': ['TypeError', 'prototype'], '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], '%URIErrorPrototype%': ['URIError', 'prototype'], '%WeakMapPrototype%': ['WeakMap', 'prototype'], '%WeakSetPrototype%': ['WeakSet', 'prototype'] }; var bind = __webpack_require__(66743); var hasOwn = __webpack_require__(9957); var $concat = bind.call($call, Array.prototype.concat); var $spliceApply = bind.call($apply, Array.prototype.splice); var $replace = bind.call($call, String.prototype.replace); var $strSlice = bind.call($call, String.prototype.slice); var $exec = bind.call($call, RegExp.prototype.exec); /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ var stringToPath = function stringToPath(string) { var first = $strSlice(string, 0, 1); var last = $strSlice(string, -1); if (first === '%' && last !== '%') { throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); } else if (last === '%' && first !== '%') { throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); } var result = []; $replace(string, rePropName, function (match, number, quote, subString) { result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; }); return result; }; /* end adaptation */ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { var intrinsicName = name; var alias; if (hasOwn(LEGACY_ALIASES, intrinsicName)) { alias = LEGACY_ALIASES[intrinsicName]; intrinsicName = '%' + alias[0] + '%'; } if (hasOwn(INTRINSICS, intrinsicName)) { var value = INTRINSICS[intrinsicName]; if (value === needsEval) { value = doEval(intrinsicName); } if (typeof value === 'undefined' && !allowMissing) { throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); } return { alias: alias, name: intrinsicName, value: value }; } throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); }; module.exports = function GetIntrinsic(name, allowMissing) { if (typeof name !== 'string' || name.length === 0) { throw new $TypeError('intrinsic name must be a non-empty string'); } if (arguments.length > 1 && typeof allowMissing !== 'boolean') { throw new $TypeError('"allowMissing" argument must be a boolean'); } if ($exec(/^%?[^%]*%?$/, name) === null) { throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); } var parts = stringToPath(name); var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); var intrinsicRealName = intrinsic.name; var value = intrinsic.value; var skipFurtherCaching = false; var alias = intrinsic.alias; if (alias) { intrinsicBaseName = alias[0]; $spliceApply(parts, $concat([0, 1], alias)); } for (var i = 1, isOwn = true; i < parts.length; i += 1) { var part = parts[i]; var first = $strSlice(part, 0, 1); var last = $strSlice(part, -1); if ( ( (first === '"' || first === "'" || first === '`') || (last === '"' || last === "'" || last === '`') ) && first !== last ) { throw new $SyntaxError('property names with quotes must have matching quotes'); } if (part === 'constructor' || !isOwn) { skipFurtherCaching = true; } intrinsicBaseName += '.' + part; intrinsicRealName = '%' + intrinsicBaseName + '%'; if (hasOwn(INTRINSICS, intrinsicRealName)) { value = INTRINSICS[intrinsicRealName]; } else if (value != null) { if (!(part in value)) { if (!allowMissing) { throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); } return void undefined; } if ($gOPD && (i + 1) >= parts.length) { var desc = $gOPD(value, part); isOwn = !!desc; // By convention, when a data property is converted to an accessor // property to emulate a data property that does not suffer from // the override mistake, that accessor's getter is marked with // an `originalValue` property. Here, when we detect this, we // uphold the illusion by pretending to see that original data // property, i.e., returning the value rather than the getter // itself. if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { value = desc.get; } else { value = value[part]; } } else { isOwn = hasOwn(value, part); value = value[part]; } if (isOwn && !skipFurtherCaching) { INTRINSICS[intrinsicRealName] = value; } } } return value; }; /***/ }), /***/ 71064: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $Object = __webpack_require__(79612); /** @type {import('./Object.getPrototypeOf')} */ module.exports = $Object.getPrototypeOf || null; /***/ }), /***/ 48648: /***/ ((module) => { "use strict"; /** @type {import('./Reflect.getPrototypeOf')} */ module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; /***/ }), /***/ 93628: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var reflectGetProto = __webpack_require__(48648); var originalGetProto = __webpack_require__(71064); var getDunderProto = __webpack_require__(7176); /** @type {import('.')} */ module.exports = reflectGetProto ? function getProto(O) { // @ts-expect-error TS can't narrow inside a closure, for some reason return reflectGetProto(O); } : originalGetProto ? function getProto(O) { if (!O || (typeof O !== 'object' && typeof O !== 'function')) { throw new TypeError('getProto: not an object'); } // @ts-expect-error TS can't narrow inside a closure, for some reason return originalGetProto(O); } : getDunderProto ? function getProto(O) { // @ts-expect-error TS can't narrow inside a closure, for some reason return getDunderProto(O); } : null; /***/ }), /***/ 6549: /***/ ((module) => { "use strict"; /** @type {import('./gOPD')} */ module.exports = Object.getOwnPropertyDescriptor; /***/ }), /***/ 75795: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /** @type {import('.')} */ var $gOPD = __webpack_require__(6549); if ($gOPD) { try { $gOPD([], 'length'); } catch (e) { // IE 8 has a broken gOPD $gOPD = null; } } module.exports = $gOPD; /***/ }), /***/ 84860: /***/ (function(module, exports) { var global = typeof self !== 'undefined' ? self : this; var __self__ = (function () { function F() { this.fetch = false; this.DOMException = global.DOMException } F.prototype = global; return new F(); })(); (function(self) { var irrelevant = (function (exports) { var support = { searchParams: 'URLSearchParams' in self, iterable: 'Symbol' in self && 'iterator' in Symbol, blob: 'FileReader' in self && 'Blob' in self && (function() { try { new Blob(); return true } catch (e) { return false } })(), formData: 'FormData' in self, arrayBuffer: 'ArrayBuffer' in self }; function isDataView(obj) { return obj && DataView.prototype.isPrototypeOf(obj) } if (support.arrayBuffer) { var viewClasses = [ '[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]' ]; var isArrayBufferView = ArrayBuffer.isView || function(obj) { return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1 }; } function normalizeName(name) { if (typeof name !== 'string') { name = String(name); } 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 = String(value); } return value } // Build a destructive iterator for the value list function iteratorFor(items) { var iterator = { next: function() { var value = items.shift(); return {done: value === undefined, value: value} } }; if (support.iterable) { iterator[Symbol.iterator] = function() { return iterator }; } return iterator } function Headers(headers) { this.map = {}; if (headers instanceof Headers) { headers.forEach(function(value, name) { this.append(name, value); }, this); } else if (Array.isArray(headers)) { headers.forEach(function(header) { this.append(header[0], header[1]); }, this); } else if (headers) { Object.getOwnPropertyNames(headers).forEach(function(name) { this.append(name, headers[name]); }, this); } } Headers.prototype.append = function(name, value) { name = normalizeName(name); value = normalizeValue(value); var oldValue = this.map[name]; this.map[name] = oldValue ? oldValue + ', ' + value : value; }; Headers.prototype['delete'] = function(name) { delete this.map[normalizeName(name)]; }; Headers.prototype.get = function(name) { name = normalizeName(name); return this.has(name) ? this.map[name] : null }; Headers.prototype.has = function(name) { return this.map.hasOwnProperty(normalizeName(name)) }; Headers.prototype.set = function(name, value) { this.map[normalizeName(name)] = normalizeValue(value); }; Headers.prototype.forEach = function(callback, thisArg) { for (var name in this.map) { if (this.map.hasOwnProperty(name)) { callback.call(thisArg, this.map[name], name, this); } } }; Headers.prototype.keys = function() { var items = []; this.forEach(function(value, name) { items.push(name); }); return iteratorFor(items) }; Headers.prototype.values = function() { var items = []; this.forEach(function(value) { items.push(value); }); return iteratorFor(items) }; Headers.prototype.entries = function() { var items = []; this.forEach(function(value, name) { items.push([name, value]); }); return iteratorFor(items) }; if (support.iterable) { Headers.prototype[Symbol.iterator] = Headers.prototype.entries; } function consumed(body) { if (body.bodyUsed) { return Promise.reject(new TypeError('Already read')) } body.bodyUsed = true; } function fileReaderReady(reader) { return new Promise(function(resolve, reject) { reader.onload = function() { resolve(reader.result); }; reader.onerror = function() { reject(reader.error); }; }) } function readBlobAsArrayBuffer(blob) { var reader = new FileReader(); var promise = fileReaderReady(reader); reader.readAsArrayBuffer(blob); return promise } function readBlobAsText(blob) { var reader = new FileReader(); var promise = fileReaderReady(reader); reader.readAsText(blob); return promise } function readArrayBufferAsText(buf) { var view = new Uint8Array(buf); var chars = new Array(view.length); for (var i = 0; i < view.length; i++) { chars[i] = String.fromCharCode(view[i]); } return chars.join('') } function bufferClone(buf) { if (buf.slice) { return buf.slice(0) } else { var view = new Uint8Array(buf.byteLength); view.set(new Uint8Array(buf)); return view.buffer } } function Body() { this.bodyUsed = false; this._initBody = function(body) { this._bodyInit = body; if (!body) { this._bodyText = ''; } else 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 (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { this._bodyText = body.toString(); } else if (support.arrayBuffer && support.blob && isDataView(body)) { this._bodyArrayBuffer = bufferClone(body.buffer); // IE 10-11 can't handle a DataView body. this._bodyInit = new Blob([this._bodyArrayBuffer]); } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { this._bodyArrayBuffer = bufferClone(body); } else { this._bodyText = body = Object.prototype.toString.call(body); } if (!this.headers.get('content-type')) { if (typeof body === 'string') { this.headers.set('content-type', 'text/plain;charset=UTF-8'); } else if (this._bodyBlob && this._bodyBlob.type) { this.headers.set('content-type', this._bodyBlob.type); } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); } } }; if (support.blob) { this.blob = function() { var rejected = consumed(this); if (rejected) { return rejected } if (this._bodyBlob) { return Promise.resolve(this._bodyBlob) } else if (this._bodyArrayBuffer) { return Promise.resolve(new Blob([this._bodyArrayBuffer])) } else if (this._bodyFormData) { throw new Error('could not read FormData body as blob') } else { return Promise.resolve(new Blob([this._bodyText])) } }; this.arrayBuffer = function() { if (this._bodyArrayBuffer) { return consumed(this) || Promise.resolve(this._bodyArrayBuffer) } else { 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._bodyArrayBuffer) { return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) } else if (this._bodyFormData) { throw new Error('could not read FormData body as text') } else { return Promise.resolve(this._bodyText) } }; if (support.formData) { this.formData = function() { return this.text().then(decode) }; } this.json = function() { return this.text().then(JSON.parse) }; 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(input, options) { options = options || {}; var body = options.body; if (input instanceof Request) { if (input.bodyUsed) { throw new TypeError('Already read') } this.url = input.url; this.credentials = input.credentials; if (!options.headers) { this.headers = new Headers(input.headers); } this.method = input.method; this.mode = input.mode; this.signal = input.signal; if (!body && input._bodyInit != null) { body = input._bodyInit; input.bodyUsed = true; } } else { this.url = String(input); } this.credentials = options.credentials || this.credentials || 'same-origin'; if (options.headers || !this.headers) { this.headers = new Headers(options.headers); } this.method = normalizeMethod(options.method || this.method || 'GET'); this.mode = options.mode || this.mode || null; this.signal = options.signal || this.signal; this.referrer = null; if ((this.method === 'GET' || this.method === 'HEAD') && body) { throw new TypeError('Body not allowed for GET or HEAD requests') } this._initBody(body); } Request.prototype.clone = function() { return new Request(this, {body: this._bodyInit}) }; 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 parseHeaders(rawHeaders) { var headers = new Headers(); // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space // https://tools.ietf.org/html/rfc7230#section-3.2 var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' '); preProcessedHeaders.split(/\r?\n/).forEach(function(line) { var parts = line.split(':'); var key = parts.shift().trim(); if (key) { var value = parts.join(':').trim(); headers.append(key, value); } }); return headers } Body.call(Request.prototype); function Response(bodyInit, options) { if (!options) { options = {}; } this.type = 'default'; this.status = options.status === undefined ? 200 : options.status; this.ok = this.status >= 200 && this.status < 300; this.statusText = 'statusText' in options ? options.statusText : 'OK'; this.headers = new Headers(options.headers); this.url = options.url || ''; this._initBody(bodyInit); } Body.call(Response.prototype); Response.prototype.clone = function() { return new Response(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new Headers(this.headers), url: this.url }) }; Response.error = function() { var response = new Response(null, {status: 0, statusText: ''}); response.type = 'error'; return response }; var redirectStatuses = [301, 302, 303, 307, 308]; Response.redirect = function(url, status) { if (redirectStatuses.indexOf(status) === -1) { throw new RangeError('Invalid status code') } return new Response(null, {status: status, headers: {location: url}}) }; exports.DOMException = self.DOMException; try { new exports.DOMException(); } catch (err) { exports.DOMException = function(message, name) { this.message = message; this.name = name; var error = Error(message); this.stack = error.stack; }; exports.DOMException.prototype = Object.create(Error.prototype); exports.DOMException.prototype.constructor = exports.DOMException; } function fetch(input, init) { return new Promise(function(resolve, reject) { var request = new Request(input, init); if (request.signal && request.signal.aborted) { return reject(new exports.DOMException('Aborted', 'AbortError')) } var xhr = new XMLHttpRequest(); function abortXhr() { xhr.abort(); } xhr.onload = function() { var options = { status: xhr.status, statusText: xhr.statusText, headers: parseHeaders(xhr.getAllResponseHeaders() || '') }; options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL'); var body = 'response' in xhr ? xhr.response : xhr.responseText; resolve(new Response(body, options)); }; xhr.onerror = function() { reject(new TypeError('Network request failed')); }; xhr.ontimeout = function() { reject(new TypeError('Network request failed')); }; xhr.onabort = function() { reject(new exports.DOMException('Aborted', 'AbortError')); }; xhr.open(request.method, request.url, true); if (request.credentials === 'include') { xhr.withCredentials = true; } else if (request.credentials === 'omit') { xhr.withCredentials = false; } if ('responseType' in xhr && support.blob) { xhr.responseType = 'blob'; } request.headers.forEach(function(value, name) { xhr.setRequestHeader(name, value); }); if (request.signal) { request.signal.addEventListener('abort', abortXhr); xhr.onreadystatechange = function() { // DONE (success or failure) if (xhr.readyState === 4) { request.signal.removeEventListener('abort', abortXhr); } }; } xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit); }) } fetch.polyfill = true; if (!self.fetch) { self.fetch = fetch; self.Headers = Headers; self.Request = Request; self.Response = Response; } exports.Headers = Headers; exports.Request = Request; exports.Response = Response; exports.fetch = fetch; Object.defineProperty(exports, '__esModule', { value: true }); return exports; })({}); })(__self__); __self__.fetch.ponyfill = true; // Remove "polyfill" property added by whatwg-fetch delete __self__.fetch.polyfill; // Choose between native implementation (global) or custom implementation (__self__) // var ctx = global.fetch ? global : __self__; var ctx = __self__; // this line disable service worker support temporarily exports = ctx.fetch // To enable: import fetch from 'cross-fetch' exports["default"] = ctx.fetch // For TypeScript consumers without esModuleInterop. exports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch' exports.Headers = ctx.Headers exports.Request = ctx.Request exports.Response = ctx.Response module.exports = exports /***/ }), /***/ 5845: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Wk: () => (/* binding */ formatError), /* harmony export */ eO: () => (/* binding */ GraphQLError), /* harmony export */ yJ: () => (/* binding */ printError) /* harmony export */ }); /* harmony import */ var _jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12464); /* harmony import */ var _language_location_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72409); /* harmony import */ var _language_printLocation_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62072); function toNormalizedOptions(args) { const firstArg = args[0]; if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) { return { nodes: firstArg, source: args[1], positions: args[2], path: args[3], originalError: args[4], extensions: args[5], }; } return firstArg; } /** * A GraphQLError describes an Error found during the parse, validate, or * execute phases of performing a GraphQL operation. In addition to a message * and stack trace, it also includes information about the locations in a * GraphQL document and/or execution result that correspond to the Error. */ class GraphQLError extends Error { /** * An array of `{ line, column }` locations within the source GraphQL document * which correspond to this error. * * Errors during validation often contain multiple locations, for example to * point out two things with the same name. Errors during execution include a * single location, the field which produced the error. * * Enumerable, and appears in the result of JSON.stringify(). */ /** * An array describing the JSON-path into the execution response which * corresponds to this error. Only included for errors during execution. * * Enumerable, and appears in the result of JSON.stringify(). */ /** * An array of GraphQL AST Nodes corresponding to this error. */ /** * The source GraphQL document for the first location of this error. * * Note that if this Error represents more than one node, the source may not * represent nodes after the first node. */ /** * An array of character offsets within the source GraphQL document * which correspond to this error. */ /** * The original error thrown from a field resolver during execution. */ /** * Extension fields to add to the formatted error. */ /** * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead. */ constructor(message, ...rawArgs) { var _this$nodes, _nodeLocations$, _ref; const { nodes, source, positions, path, originalError, extensions } = toNormalizedOptions(rawArgs); super(message); this.name = 'GraphQLError'; this.path = path !== null && path !== void 0 ? path : undefined; this.originalError = originalError !== null && originalError !== void 0 ? originalError : undefined; // Compute list of blame nodes. this.nodes = undefinedIfEmpty( Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined, ); const nodeLocations = undefinedIfEmpty( (_this$nodes = this.nodes) === null || _this$nodes === void 0 ? void 0 : _this$nodes.map((node) => node.loc).filter((loc) => loc != null), ); // Compute locations in the source for the given nodes/positions. this.source = source !== null && source !== void 0 ? source : nodeLocations === null || nodeLocations === void 0 ? void 0 : (_nodeLocations$ = nodeLocations[0]) === null || _nodeLocations$ === void 0 ? void 0 : _nodeLocations$.source; this.positions = positions !== null && positions !== void 0 ? positions : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => loc.start); this.locations = positions && source ? positions.map((pos) => (0,_language_location_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getLocation */ .g)(source, pos)) : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => (0,_language_location_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getLocation */ .g)(loc.source, loc.start)); const originalExtensions = (0,_jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isObjectLike */ .Z)( originalError === null || originalError === void 0 ? void 0 : originalError.extensions, ) ? originalError === null || originalError === void 0 ? void 0 : originalError.extensions : undefined; this.extensions = (_ref = extensions !== null && extensions !== void 0 ? extensions : originalExtensions) !== null && _ref !== void 0 ? _ref : Object.create(null); // Only properties prescribed by the spec should be enumerable. // Keep the rest as non-enumerable. Object.defineProperties(this, { message: { writable: true, enumerable: true, }, name: { enumerable: false, }, nodes: { enumerable: false, }, source: { enumerable: false, }, positions: { enumerable: false, }, originalError: { enumerable: false, }, }); // Include (non-enumerable) stack trace. /* c8 ignore start */ // FIXME: https://github.com/graphql/graphql-js/issues/2317 if ( originalError !== null && originalError !== void 0 && originalError.stack ) { Object.defineProperty(this, 'stack', { value: originalError.stack, writable: true, configurable: true, }); } else if (Error.captureStackTrace) { Error.captureStackTrace(this, GraphQLError); } else { Object.defineProperty(this, 'stack', { value: Error().stack, writable: true, configurable: true, }); } /* c8 ignore stop */ } get [Symbol.toStringTag]() { return 'GraphQLError'; } toString() { let output = this.message; if (this.nodes) { for (const node of this.nodes) { if (node.loc) { output += '\n\n' + (0,_language_printLocation_mjs__WEBPACK_IMPORTED_MODULE_2__/* .printLocation */ .V)(node.loc); } } } else if (this.source && this.locations) { for (const location of this.locations) { output += '\n\n' + (0,_language_printLocation_mjs__WEBPACK_IMPORTED_MODULE_2__/* .printSourceLocation */ .C)(this.source, location); } } return output; } toJSON() { const formattedError = { message: this.message, }; if (this.locations != null) { formattedError.locations = this.locations; } if (this.path != null) { formattedError.path = this.path; } if (this.extensions != null && Object.keys(this.extensions).length > 0) { formattedError.extensions = this.extensions; } return formattedError; } } function undefinedIfEmpty(array) { return array === undefined || array.length === 0 ? undefined : array; } /** * See: https://spec.graphql.org/draft/#sec-Errors */ /** * Prints a GraphQLError to a string, representing useful location information * about the error's position in the source. * * @deprecated Please use `error.toString` instead. Will be removed in v17 */ function printError(error) { return error.toString(); } /** * Given a GraphQLError, format it according to the rules described by the * Response Format, Errors section of the GraphQL Specification. * * @deprecated Please use `error.toJSON` instead. Will be removed in v17 */ function formatError(error) { return error.toJSON(); } /***/ }), /***/ 93547: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ I: () => (/* binding */ syntaxError) /* harmony export */ }); /* harmony import */ var _GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5845); /** * Produces a GraphQLError representing a syntax error, containing useful * descriptive information about the syntax error's position in the source. */ function syntaxError(source, position, description) { return new _GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__/* .GraphQLError */ .eO(`Syntax Error: ${description}`, { source, positions: [position], }); } /***/ }), /***/ 18346: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { BREAK: () => (/* reexport */ language_visitor/* BREAK */.sP), BreakingChangeType: () => (/* reexport */ BreakingChangeType), DEFAULT_DEPRECATION_REASON: () => (/* reexport */ DEFAULT_DEPRECATION_REASON), DangerousChangeType: () => (/* reexport */ DangerousChangeType), DirectiveLocation: () => (/* reexport */ directiveLocation/* DirectiveLocation */.H), ExecutableDefinitionsRule: () => (/* reexport */ ExecutableDefinitionsRule), FieldsOnCorrectTypeRule: () => (/* reexport */ FieldsOnCorrectTypeRule), FragmentsOnCompositeTypesRule: () => (/* reexport */ FragmentsOnCompositeTypesRule), GRAPHQL_MAX_INT: () => (/* reexport */ GRAPHQL_MAX_INT), GRAPHQL_MIN_INT: () => (/* reexport */ GRAPHQL_MIN_INT), GraphQLBoolean: () => (/* reexport */ GraphQLBoolean), GraphQLDeprecatedDirective: () => (/* reexport */ GraphQLDeprecatedDirective), GraphQLDirective: () => (/* reexport */ GraphQLDirective), GraphQLEnumType: () => (/* reexport */ GraphQLEnumType), GraphQLError: () => (/* reexport */ GraphQLError/* GraphQLError */.eO), GraphQLFloat: () => (/* reexport */ GraphQLFloat), GraphQLID: () => (/* reexport */ GraphQLID), GraphQLIncludeDirective: () => (/* reexport */ GraphQLIncludeDirective), GraphQLInputObjectType: () => (/* reexport */ GraphQLInputObjectType), GraphQLInt: () => (/* reexport */ GraphQLInt), GraphQLInterfaceType: () => (/* reexport */ GraphQLInterfaceType), GraphQLList: () => (/* reexport */ GraphQLList), GraphQLNonNull: () => (/* reexport */ GraphQLNonNull), GraphQLObjectType: () => (/* reexport */ GraphQLObjectType), GraphQLOneOfDirective: () => (/* reexport */ GraphQLOneOfDirective), GraphQLScalarType: () => (/* reexport */ GraphQLScalarType), GraphQLSchema: () => (/* reexport */ GraphQLSchema), GraphQLSkipDirective: () => (/* reexport */ GraphQLSkipDirective), GraphQLSpecifiedByDirective: () => (/* reexport */ GraphQLSpecifiedByDirective), GraphQLString: () => (/* reexport */ GraphQLString), GraphQLUnionType: () => (/* reexport */ GraphQLUnionType), Kind: () => (/* reexport */ kinds/* Kind */.b), KnownArgumentNamesRule: () => (/* reexport */ KnownArgumentNamesRule), KnownDirectivesRule: () => (/* reexport */ KnownDirectivesRule), KnownFragmentNamesRule: () => (/* reexport */ KnownFragmentNamesRule), KnownTypeNamesRule: () => (/* reexport */ KnownTypeNamesRule), Lexer: () => (/* reexport */ language_lexer/* Lexer */.J), Location: () => (/* reexport */ ast/* Location */.aZ), LoneAnonymousOperationRule: () => (/* reexport */ LoneAnonymousOperationRule), LoneSchemaDefinitionRule: () => (/* reexport */ LoneSchemaDefinitionRule), MaxIntrospectionDepthRule: () => (/* reexport */ MaxIntrospectionDepthRule), NoDeprecatedCustomRule: () => (/* reexport */ NoDeprecatedCustomRule), NoFragmentCyclesRule: () => (/* reexport */ NoFragmentCyclesRule), NoSchemaIntrospectionCustomRule: () => (/* reexport */ NoSchemaIntrospectionCustomRule), NoUndefinedVariablesRule: () => (/* reexport */ NoUndefinedVariablesRule), NoUnusedFragmentsRule: () => (/* reexport */ NoUnusedFragmentsRule), NoUnusedVariablesRule: () => (/* reexport */ NoUnusedVariablesRule), OperationTypeNode: () => (/* reexport */ ast/* OperationTypeNode */.cE), OverlappingFieldsCanBeMergedRule: () => (/* reexport */ OverlappingFieldsCanBeMergedRule), PossibleFragmentSpreadsRule: () => (/* reexport */ PossibleFragmentSpreadsRule), PossibleTypeExtensionsRule: () => (/* reexport */ PossibleTypeExtensionsRule), ProvidedRequiredArgumentsRule: () => (/* reexport */ ProvidedRequiredArgumentsRule), ScalarLeafsRule: () => (/* reexport */ ScalarLeafsRule), SchemaMetaFieldDef: () => (/* reexport */ SchemaMetaFieldDef), SingleFieldSubscriptionsRule: () => (/* reexport */ SingleFieldSubscriptionsRule), Source: () => (/* reexport */ language_source/* Source */.k), Token: () => (/* reexport */ ast/* Token */.ou), TokenKind: () => (/* reexport */ language_tokenKind/* TokenKind */.Y), TypeInfo: () => (/* reexport */ TypeInfo), TypeKind: () => (/* reexport */ TypeKind), TypeMetaFieldDef: () => (/* reexport */ TypeMetaFieldDef), TypeNameMetaFieldDef: () => (/* reexport */ TypeNameMetaFieldDef), UniqueArgumentDefinitionNamesRule: () => (/* reexport */ UniqueArgumentDefinitionNamesRule), UniqueArgumentNamesRule: () => (/* reexport */ UniqueArgumentNamesRule), UniqueDirectiveNamesRule: () => (/* reexport */ UniqueDirectiveNamesRule), UniqueDirectivesPerLocationRule: () => (/* reexport */ UniqueDirectivesPerLocationRule), UniqueEnumValueNamesRule: () => (/* reexport */ UniqueEnumValueNamesRule), UniqueFieldDefinitionNamesRule: () => (/* reexport */ UniqueFieldDefinitionNamesRule), UniqueFragmentNamesRule: () => (/* reexport */ UniqueFragmentNamesRule), UniqueInputFieldNamesRule: () => (/* reexport */ UniqueInputFieldNamesRule), UniqueOperationNamesRule: () => (/* reexport */ UniqueOperationNamesRule), UniqueOperationTypesRule: () => (/* reexport */ UniqueOperationTypesRule), UniqueTypeNamesRule: () => (/* reexport */ UniqueTypeNamesRule), UniqueVariableNamesRule: () => (/* reexport */ UniqueVariableNamesRule), ValidationContext: () => (/* reexport */ ValidationContext), ValuesOfCorrectTypeRule: () => (/* reexport */ ValuesOfCorrectTypeRule), VariablesAreInputTypesRule: () => (/* reexport */ VariablesAreInputTypesRule), VariablesInAllowedPositionRule: () => (/* reexport */ VariablesInAllowedPositionRule), __Directive: () => (/* reexport */ __Directive), __DirectiveLocation: () => (/* reexport */ __DirectiveLocation), __EnumValue: () => (/* reexport */ __EnumValue), __Field: () => (/* reexport */ __Field), __InputValue: () => (/* reexport */ __InputValue), __Schema: () => (/* reexport */ __Schema), __Type: () => (/* reexport */ __Type), __TypeKind: () => (/* reexport */ __TypeKind), assertAbstractType: () => (/* reexport */ assertAbstractType), assertCompositeType: () => (/* reexport */ assertCompositeType), assertDirective: () => (/* reexport */ assertDirective), assertEnumType: () => (/* reexport */ assertEnumType), assertEnumValueName: () => (/* reexport */ assertEnumValueName), assertInputObjectType: () => (/* reexport */ assertInputObjectType), assertInputType: () => (/* reexport */ assertInputType), assertInterfaceType: () => (/* reexport */ assertInterfaceType), assertLeafType: () => (/* reexport */ assertLeafType), assertListType: () => (/* reexport */ assertListType), assertName: () => (/* reexport */ assertName), assertNamedType: () => (/* reexport */ assertNamedType), assertNonNullType: () => (/* reexport */ assertNonNullType), assertNullableType: () => (/* reexport */ assertNullableType), assertObjectType: () => (/* reexport */ assertObjectType), assertOutputType: () => (/* reexport */ assertOutputType), assertScalarType: () => (/* reexport */ assertScalarType), assertSchema: () => (/* reexport */ assertSchema), assertType: () => (/* reexport */ assertType), assertUnionType: () => (/* reexport */ assertUnionType), assertValidName: () => (/* reexport */ assertValidName), assertValidSchema: () => (/* reexport */ assertValidSchema), assertWrappingType: () => (/* reexport */ assertWrappingType), astFromValue: () => (/* reexport */ astFromValue), buildASTSchema: () => (/* reexport */ buildASTSchema), buildClientSchema: () => (/* reexport */ buildClientSchema), buildSchema: () => (/* reexport */ buildSchema), coerceInputValue: () => (/* reexport */ coerceInputValue), concatAST: () => (/* reexport */ concatAST), createSourceEventStream: () => (/* reexport */ createSourceEventStream), defaultFieldResolver: () => (/* reexport */ defaultFieldResolver), defaultTypeResolver: () => (/* reexport */ defaultTypeResolver), doTypesOverlap: () => (/* reexport */ doTypesOverlap), execute: () => (/* reexport */ execute), executeSync: () => (/* reexport */ executeSync), extendSchema: () => (/* reexport */ extendSchema), findBreakingChanges: () => (/* reexport */ findBreakingChanges), findDangerousChanges: () => (/* reexport */ findDangerousChanges), formatError: () => (/* reexport */ GraphQLError/* formatError */.Wk), getArgumentValues: () => (/* reexport */ getArgumentValues), getDirectiveValues: () => (/* reexport */ getDirectiveValues), getEnterLeaveForKind: () => (/* reexport */ language_visitor/* getEnterLeaveForKind */.XO), getIntrospectionQuery: () => (/* reexport */ getIntrospectionQuery), getLocation: () => (/* reexport */ language_location/* getLocation */.g), getNamedType: () => (/* reexport */ getNamedType), getNullableType: () => (/* reexport */ getNullableType), getOperationAST: () => (/* reexport */ getOperationAST), getOperationRootType: () => (/* reexport */ getOperationRootType), getVariableValues: () => (/* reexport */ getVariableValues), getVisitFn: () => (/* reexport */ language_visitor/* getVisitFn */.UY), graphql: () => (/* reexport */ graphql), graphqlSync: () => (/* reexport */ graphqlSync), introspectionFromSchema: () => (/* reexport */ introspectionFromSchema), introspectionTypes: () => (/* reexport */ introspectionTypes), isAbstractType: () => (/* reexport */ isAbstractType), isCompositeType: () => (/* reexport */ isCompositeType), isConstValueNode: () => (/* reexport */ predicates/* isConstValueNode */.TZ), isDefinitionNode: () => (/* reexport */ predicates/* isDefinitionNode */.MD), isDirective: () => (/* reexport */ isDirective), isEnumType: () => (/* reexport */ isEnumType), isEqualType: () => (/* reexport */ isEqualType), isExecutableDefinitionNode: () => (/* reexport */ predicates/* isExecutableDefinitionNode */._m), isInputObjectType: () => (/* reexport */ isInputObjectType), isInputType: () => (/* reexport */ isInputType), isInterfaceType: () => (/* reexport */ isInterfaceType), isIntrospectionType: () => (/* reexport */ isIntrospectionType), isLeafType: () => (/* reexport */ isLeafType), isListType: () => (/* reexport */ isListType), isNamedType: () => (/* reexport */ isNamedType), isNonNullType: () => (/* reexport */ isNonNullType), isNullableType: () => (/* reexport */ isNullableType), isObjectType: () => (/* reexport */ isObjectType), isOutputType: () => (/* reexport */ isOutputType), isRequiredArgument: () => (/* reexport */ isRequiredArgument), isRequiredInputField: () => (/* reexport */ isRequiredInputField), isScalarType: () => (/* reexport */ isScalarType), isSchema: () => (/* reexport */ isSchema), isSelectionNode: () => (/* reexport */ predicates/* isSelectionNode */.VK), isSpecifiedDirective: () => (/* reexport */ isSpecifiedDirective), isSpecifiedScalarType: () => (/* reexport */ isSpecifiedScalarType), isType: () => (/* reexport */ isType), isTypeDefinitionNode: () => (/* reexport */ predicates/* isTypeDefinitionNode */.a6), isTypeExtensionNode: () => (/* reexport */ predicates/* isTypeExtensionNode */.i7), isTypeNode: () => (/* reexport */ predicates/* isTypeNode */.dI), isTypeSubTypeOf: () => (/* reexport */ isTypeSubTypeOf), isTypeSystemDefinitionNode: () => (/* reexport */ predicates/* isTypeSystemDefinitionNode */.xu), isTypeSystemExtensionNode: () => (/* reexport */ predicates/* isTypeSystemExtensionNode */.fT), isUnionType: () => (/* reexport */ isUnionType), isValidNameError: () => (/* reexport */ isValidNameError), isValueNode: () => (/* reexport */ predicates/* isValueNode */.aR), isWrappingType: () => (/* reexport */ isWrappingType), lexicographicSortSchema: () => (/* reexport */ lexicographicSortSchema), locatedError: () => (/* reexport */ locatedError), parse: () => (/* reexport */ parser/* parse */.qg), parseConstValue: () => (/* reexport */ parser/* parseConstValue */.u8), parseType: () => (/* reexport */ parser/* parseType */.Mb), parseValue: () => (/* reexport */ parser/* parseValue */.$x), print: () => (/* reexport */ printer.print), printError: () => (/* reexport */ GraphQLError/* printError */.yJ), printIntrospectionSchema: () => (/* reexport */ printIntrospectionSchema), printLocation: () => (/* reexport */ printLocation/* printLocation */.V), printSchema: () => (/* reexport */ printSchema), printSourceLocation: () => (/* reexport */ printLocation/* printSourceLocation */.C), printType: () => (/* reexport */ printType), recommendedRules: () => (/* reexport */ recommendedRules), resolveObjMapThunk: () => (/* reexport */ resolveObjMapThunk), resolveReadonlyArrayThunk: () => (/* reexport */ resolveReadonlyArrayThunk), responsePathAsArray: () => (/* reexport */ pathToArray), separateOperations: () => (/* reexport */ separateOperations), specifiedDirectives: () => (/* reexport */ specifiedDirectives), specifiedRules: () => (/* reexport */ specifiedRules), specifiedScalarTypes: () => (/* reexport */ specifiedScalarTypes), stripIgnoredCharacters: () => (/* reexport */ stripIgnoredCharacters), subscribe: () => (/* reexport */ subscribe), syntaxError: () => (/* reexport */ syntaxError/* syntaxError */.I), typeFromAST: () => (/* reexport */ typeFromAST), validate: () => (/* reexport */ validate), validateSchema: () => (/* reexport */ validateSchema), valueFromAST: () => (/* reexport */ valueFromAST), valueFromASTUntyped: () => (/* reexport */ valueFromASTUntyped), version: () => (/* reexport */ version), versionInfo: () => (/* reexport */ versionInfo), visit: () => (/* reexport */ language_visitor/* visit */.YR), visitInParallel: () => (/* reexport */ language_visitor/* visitInParallel */.oP), visitWithTypeInfo: () => (/* reexport */ visitWithTypeInfo) }); ;// ./node_modules/graphql/version.mjs // Note: This file is autogenerated using "resources/gen-version.js" script and // automatically updated by "npm version" command. /** * A string containing the version of the GraphQL.js library */ const version = '16.11.0'; /** * An object containing the components of the GraphQL.js version string */ const versionInfo = Object.freeze({ major: 16, minor: 11, patch: 0, preReleaseTag: null, }); // EXTERNAL MODULE: ./node_modules/graphql/jsutils/devAssert.mjs var devAssert = __webpack_require__(30599); ;// ./node_modules/graphql/jsutils/isPromise.mjs /** * Returns true if the value acts like a Promise, i.e. has a "then" function, * otherwise returns false. */ function isPromise(value) { return ( typeof (value === null || value === void 0 ? void 0 : value.then) === 'function' ); } // EXTERNAL MODULE: ./node_modules/graphql/language/parser.mjs var parser = __webpack_require__(66005); // EXTERNAL MODULE: ./node_modules/graphql/jsutils/inspect.mjs var inspect = __webpack_require__(75640); // EXTERNAL MODULE: ./node_modules/graphql/error/GraphQLError.mjs var GraphQLError = __webpack_require__(5845); // EXTERNAL MODULE: ./node_modules/graphql/language/ast.mjs var ast = __webpack_require__(75136); ;// ./node_modules/graphql/jsutils/didYouMean.mjs const MAX_SUGGESTIONS = 5; /** * Given [ A, B, C ] return ' Did you mean A, B, or C?'. */ function didYouMean(firstArg, secondArg) { const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [undefined, firstArg]; let message = ' Did you mean '; if (subMessage) { message += subMessage + ' '; } const suggestions = suggestionsArg.map((x) => `"${x}"`); switch (suggestions.length) { case 0: return ''; case 1: return message + suggestions[0] + '?'; case 2: return message + suggestions[0] + ' or ' + suggestions[1] + '?'; } const selected = suggestions.slice(0, MAX_SUGGESTIONS); const lastItem = selected.pop(); return message + selected.join(', ') + ', or ' + lastItem + '?'; } ;// ./node_modules/graphql/jsutils/identityFunc.mjs /** * Returns the first argument it receives. */ function identityFunc(x) { return x; } // EXTERNAL MODULE: ./node_modules/graphql/jsutils/instanceOf.mjs var instanceOf = __webpack_require__(96090); // EXTERNAL MODULE: ./node_modules/graphql/jsutils/isObjectLike.mjs var isObjectLike = __webpack_require__(12464); ;// ./node_modules/graphql/jsutils/keyMap.mjs /** * Creates a keyed JS object from an array, given a function to produce the keys * for each value in the array. * * This provides a convenient lookup for the array items if the key function * produces unique results. * ```ts * const phoneBook = [ * { name: 'Jon', num: '555-1234' }, * { name: 'Jenny', num: '867-5309' } * ] * * const entriesByName = keyMap( * phoneBook, * entry => entry.name * ) * * // { * // Jon: { name: 'Jon', num: '555-1234' }, * // Jenny: { name: 'Jenny', num: '867-5309' } * // } * * const jennyEntry = entriesByName['Jenny'] * * // { name: 'Jenny', num: '857-6309' } * ``` */ function keyMap(list, keyFn) { const result = Object.create(null); for (const item of list) { result[keyFn(item)] = item; } return result; } ;// ./node_modules/graphql/jsutils/keyValMap.mjs /** * Creates a keyed JS object from an array, given a function to produce the keys * and a function to produce the values from each item in the array. * ```ts * const phoneBook = [ * { name: 'Jon', num: '555-1234' }, * { name: 'Jenny', num: '867-5309' } * ] * * // { Jon: '555-1234', Jenny: '867-5309' } * const phonesByName = keyValMap( * phoneBook, * entry => entry.name, * entry => entry.num * ) * ``` */ function keyValMap(list, keyFn, valFn) { const result = Object.create(null); for (const item of list) { result[keyFn(item)] = valFn(item); } return result; } ;// ./node_modules/graphql/jsutils/mapValue.mjs /** * Creates an object map with the same keys as `map` and values generated by * running each value of `map` thru `fn`. */ function mapValue(map, fn) { const result = Object.create(null); for (const key of Object.keys(map)) { result[key] = fn(map[key], key); } return result; } ;// ./node_modules/graphql/jsutils/naturalCompare.mjs /** * Returns a number indicating whether a reference string comes before, or after, * or is the same as the given string in natural sort order. * * See: https://en.wikipedia.org/wiki/Natural_sort_order * */ function naturalCompare(aStr, bStr) { let aIndex = 0; let bIndex = 0; while (aIndex < aStr.length && bIndex < bStr.length) { let aChar = aStr.charCodeAt(aIndex); let bChar = bStr.charCodeAt(bIndex); if (isDigit(aChar) && isDigit(bChar)) { let aNum = 0; do { ++aIndex; aNum = aNum * 10 + aChar - DIGIT_0; aChar = aStr.charCodeAt(aIndex); } while (isDigit(aChar) && aNum > 0); let bNum = 0; do { ++bIndex; bNum = bNum * 10 + bChar - DIGIT_0; bChar = bStr.charCodeAt(bIndex); } while (isDigit(bChar) && bNum > 0); if (aNum < bNum) { return -1; } if (aNum > bNum) { return 1; } } else { if (aChar < bChar) { return -1; } if (aChar > bChar) { return 1; } ++aIndex; ++bIndex; } } return aStr.length - bStr.length; } const DIGIT_0 = 48; const DIGIT_9 = 57; function isDigit(code) { return !isNaN(code) && DIGIT_0 <= code && code <= DIGIT_9; } ;// ./node_modules/graphql/jsutils/suggestionList.mjs /** * Given an invalid input string and a list of valid options, returns a filtered * list of valid options sorted based on their similarity with the input. */ function suggestionList(input, options) { const optionsByDistance = Object.create(null); const lexicalDistance = new LexicalDistance(input); const threshold = Math.floor(input.length * 0.4) + 1; for (const option of options) { const distance = lexicalDistance.measure(option, threshold); if (distance !== undefined) { optionsByDistance[option] = distance; } } return Object.keys(optionsByDistance).sort((a, b) => { const distanceDiff = optionsByDistance[a] - optionsByDistance[b]; return distanceDiff !== 0 ? distanceDiff : naturalCompare(a, b); }); } /** * Computes the lexical distance between strings A and B. * * The "distance" between two strings is given by counting the minimum number * of edits needed to transform string A into string B. An edit can be an * insertion, deletion, or substitution of a single character, or a swap of two * adjacent characters. * * Includes a custom alteration from Damerau-Levenshtein to treat case changes * as a single edit which helps identify mis-cased values with an edit distance * of 1. * * This distance can be useful for detecting typos in input or sorting */ class LexicalDistance { constructor(input) { this._input = input; this._inputLowerCase = input.toLowerCase(); this._inputArray = stringToArray(this._inputLowerCase); this._rows = [ new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0), ]; } measure(option, threshold) { if (this._input === option) { return 0; } const optionLowerCase = option.toLowerCase(); // Any case change counts as a single edit if (this._inputLowerCase === optionLowerCase) { return 1; } let a = stringToArray(optionLowerCase); let b = this._inputArray; if (a.length < b.length) { const tmp = a; a = b; b = tmp; } const aLength = a.length; const bLength = b.length; if (aLength - bLength > threshold) { return undefined; } const rows = this._rows; for (let j = 0; j <= bLength; j++) { rows[0][j] = j; } for (let i = 1; i <= aLength; i++) { const upRow = rows[(i - 1) % 3]; const currentRow = rows[i % 3]; let smallestCell = (currentRow[0] = i); for (let j = 1; j <= bLength; j++) { const cost = a[i - 1] === b[j - 1] ? 0 : 1; let currentCell = Math.min( upRow[j] + 1, // delete currentRow[j - 1] + 1, // insert upRow[j - 1] + cost, // substitute ); if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { // transposition const doubleDiagonalCell = rows[(i - 2) % 3][j - 2]; currentCell = Math.min(currentCell, doubleDiagonalCell + 1); } if (currentCell < smallestCell) { smallestCell = currentCell; } currentRow[j] = currentCell; } // Early exit, since distance can't go smaller than smallest element of the previous row. if (smallestCell > threshold) { return undefined; } } const distance = rows[aLength % 3][bLength]; return distance <= threshold ? distance : undefined; } } function stringToArray(str) { const strLength = str.length; const array = new Array(strLength); for (let i = 0; i < strLength; ++i) { array[i] = str.charCodeAt(i); } return array; } ;// ./node_modules/graphql/jsutils/toObjMap.mjs function toObjMap(obj) { if (obj == null) { return Object.create(null); } if (Object.getPrototypeOf(obj) === null) { return obj; } const map = Object.create(null); for (const [key, value] of Object.entries(obj)) { map[key] = value; } return map; } // EXTERNAL MODULE: ./node_modules/graphql/language/kinds.mjs var kinds = __webpack_require__(73061); // EXTERNAL MODULE: ./node_modules/graphql/language/printer.mjs var printer = __webpack_require__(99352); ;// ./node_modules/graphql/utilities/valueFromASTUntyped.mjs /** * Produces a JavaScript value given a GraphQL Value AST. * * Unlike `valueFromAST()`, no type is provided. The resulting JavaScript value * will reflect the provided GraphQL value AST. * * | GraphQL Value | JavaScript Value | * | -------------------- | ---------------- | * | Input Object | Object | * | List | Array | * | Boolean | Boolean | * | String / Enum | String | * | Int / Float | Number | * | Null | null | * */ function valueFromASTUntyped(valueNode, variables) { switch (valueNode.kind) { case kinds/* Kind */.b.NULL: return null; case kinds/* Kind */.b.INT: return parseInt(valueNode.value, 10); case kinds/* Kind */.b.FLOAT: return parseFloat(valueNode.value); case kinds/* Kind */.b.STRING: case kinds/* Kind */.b.ENUM: case kinds/* Kind */.b.BOOLEAN: return valueNode.value; case kinds/* Kind */.b.LIST: return valueNode.values.map((node) => valueFromASTUntyped(node, variables), ); case kinds/* Kind */.b.OBJECT: return keyValMap( valueNode.fields, (field) => field.name.value, (field) => valueFromASTUntyped(field.value, variables), ); case kinds/* Kind */.b.VARIABLE: return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value]; } } // EXTERNAL MODULE: ./node_modules/graphql/language/characterClasses.mjs var characterClasses = __webpack_require__(50175); ;// ./node_modules/graphql/type/assertName.mjs /** * Upholds the spec rules about naming. */ function assertName(name) { name != null || (0,devAssert/* devAssert */.U)(false, 'Must provide name.'); typeof name === 'string' || (0,devAssert/* devAssert */.U)(false, 'Expected name to be a string.'); if (name.length === 0) { throw new GraphQLError/* GraphQLError */.eO('Expected name to be a non-empty string.'); } for (let i = 1; i < name.length; ++i) { if (!(0,characterClasses/* isNameContinue */.xr)(name.charCodeAt(i))) { throw new GraphQLError/* GraphQLError */.eO( `Names must only contain [_a-zA-Z0-9] but "${name}" does not.`, ); } } if (!(0,characterClasses/* isNameStart */.un)(name.charCodeAt(0))) { throw new GraphQLError/* GraphQLError */.eO( `Names must start with [_a-zA-Z] but "${name}" does not.`, ); } return name; } /** * Upholds the spec rules about naming enum values. * * @internal */ function assertEnumValueName(name) { if (name === 'true' || name === 'false' || name === 'null') { throw new GraphQLError/* GraphQLError */.eO(`Enum values cannot be named: ${name}`); } return assertName(name); } ;// ./node_modules/graphql/type/definition.mjs function isType(type) { return ( isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type) || isListType(type) || isNonNullType(type) ); } function assertType(type) { if (!isType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL type.`); } return type; } /** * There are predicates for each kind of GraphQL type. */ function isScalarType(type) { return (0,instanceOf/* instanceOf */.h)(type, GraphQLScalarType); } function assertScalarType(type) { if (!isScalarType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL Scalar type.`); } return type; } function isObjectType(type) { return (0,instanceOf/* instanceOf */.h)(type, GraphQLObjectType); } function assertObjectType(type) { if (!isObjectType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL Object type.`); } return type; } function isInterfaceType(type) { return (0,instanceOf/* instanceOf */.h)(type, GraphQLInterfaceType); } function assertInterfaceType(type) { if (!isInterfaceType(type)) { throw new Error( `Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL Interface type.`, ); } return type; } function isUnionType(type) { return (0,instanceOf/* instanceOf */.h)(type, GraphQLUnionType); } function assertUnionType(type) { if (!isUnionType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL Union type.`); } return type; } function isEnumType(type) { return (0,instanceOf/* instanceOf */.h)(type, GraphQLEnumType); } function assertEnumType(type) { if (!isEnumType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL Enum type.`); } return type; } function isInputObjectType(type) { return (0,instanceOf/* instanceOf */.h)(type, GraphQLInputObjectType); } function assertInputObjectType(type) { if (!isInputObjectType(type)) { throw new Error( `Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL Input Object type.`, ); } return type; } function isListType(type) { return (0,instanceOf/* instanceOf */.h)(type, GraphQLList); } function assertListType(type) { if (!isListType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL List type.`); } return type; } function isNonNullType(type) { return (0,instanceOf/* instanceOf */.h)(type, GraphQLNonNull); } function assertNonNullType(type) { if (!isNonNullType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL Non-Null type.`); } 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) { if (!isInputType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL input type.`); } 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) { if (!isOutputType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL output type.`); } return type; } /** * These types may describe types which may be leaf values. */ function isLeafType(type) { return isScalarType(type) || isEnumType(type); } function assertLeafType(type) { if (!isLeafType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL leaf type.`); } 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) { if (!isCompositeType(type)) { throw new Error( `Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL composite type.`, ); } return type; } /** * These types may describe the parent context of a selection set. */ function isAbstractType(type) { return isInterfaceType(type) || isUnionType(type); } function assertAbstractType(type) { if (!isAbstractType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL abstract type.`); } 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: * * ```ts * const PersonType = new GraphQLObjectType({ * name: 'Person', * fields: () => ({ * parents: { type: new GraphQLList(PersonType) }, * children: { type: new GraphQLList(PersonType) }, * }) * }) * ``` */ class GraphQLList { constructor(ofType) { isType(ofType) || (0,devAssert/* devAssert */.U)(false, `Expected ${(0,inspect/* inspect */.N)(ofType)} to be a GraphQL type.`); this.ofType = ofType; } get [Symbol.toStringTag]() { return 'GraphQLList'; } toString() { return '[' + String(this.ofType) + ']'; } toJSON() { return this.toString(); } } /** * 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: * * ```ts * const RowType = new GraphQLObjectType({ * name: 'Row', * fields: () => ({ * id: { type: new GraphQLNonNull(GraphQLString) }, * }) * }) * ``` * Note: the enforcement of non-nullability occurs within the executor. */ class GraphQLNonNull { constructor(ofType) { isNullableType(ofType) || (0,devAssert/* devAssert */.U)( false, `Expected ${(0,inspect/* inspect */.N)(ofType)} to be a GraphQL nullable type.`, ); this.ofType = ofType; } get [Symbol.toStringTag]() { return 'GraphQLNonNull'; } toString() { return String(this.ofType) + '!'; } toJSON() { return this.toString(); } } /** * These types wrap and modify other types */ function isWrappingType(type) { return isListType(type) || isNonNullType(type); } function assertWrappingType(type) { if (!isWrappingType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL wrapping type.`); } return type; } /** * These types can all accept null as a value. */ function isNullableType(type) { return isType(type) && !isNonNullType(type); } function assertNullableType(type) { if (!isNullableType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL nullable type.`); } return type; } function getNullableType(type) { 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) { if (!isNamedType(type)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(type)} to be a GraphQL named type.`); } return type; } function getNamedType(type) { if (type) { let 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 resolveReadonlyArrayThunk(thunk) { return typeof thunk === 'function' ? thunk() : thunk; } function resolveObjMapThunk(thunk) { return typeof thunk === 'function' ? thunk() : thunk; } /** * Custom extensions * * @remarks * Use a unique identifier name for your extension, for example the name of * your library or project. Do not use a shortened identifier as this increases * the risk of conflicts. We recommend you add at most one extension field, * an object which can contain all the values you need. */ /** * 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 returns `null` or 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. It is always better to validate * * Example: * * ```ts * const OddType = new GraphQLScalarType({ * name: 'Odd', * serialize(value) { * if (!Number.isFinite(value)) { * throw new Error( * `Scalar "Odd" cannot represent "${value}" since it is not a finite number.`, * ); * } * * if (value % 2 === 0) { * throw new Error(`Scalar "Odd" cannot represent "${value}" since it is even.`); * } * return value; * } * }); * ``` */ class GraphQLScalarType { constructor(config) { var _config$parseValue, _config$serialize, _config$parseLiteral, _config$extensionASTN; const parseValue = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : identityFunc; this.name = assertName(config.name); this.description = config.description; this.specifiedByURL = config.specifiedByURL; this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : identityFunc; this.parseValue = parseValue; this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : (node, variables) => parseValue(valueFromASTUntyped(node, variables)); this.extensions = toObjMap(config.extensions); this.astNode = config.astNode; this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : []; config.specifiedByURL == null || typeof config.specifiedByURL === 'string' || (0,devAssert/* devAssert */.U)( false, `${this.name} must provide "specifiedByURL" as a string, ` + `but got: ${(0,inspect/* inspect */.N)(config.specifiedByURL)}.`, ); config.serialize == null || typeof config.serialize === 'function' || (0,devAssert/* devAssert */.U)( false, `${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.`, ); if (config.parseLiteral) { (typeof config.parseValue === 'function' && typeof config.parseLiteral === 'function') || (0,devAssert/* devAssert */.U)( false, `${this.name} must provide both "parseValue" and "parseLiteral" functions.`, ); } } get [Symbol.toStringTag]() { return 'GraphQLScalarType'; } toConfig() { return { name: this.name, description: this.description, specifiedByURL: this.specifiedByURL, serialize: this.serialize, parseValue: this.parseValue, parseLiteral: this.parseLiteral, extensions: this.extensions, astNode: this.astNode, extensionASTNodes: this.extensionASTNodes, }; } toString() { return this.name; } toJSON() { return this.toString(); } } /** * 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: * * ```ts * 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: * * ```ts * const PersonType = new GraphQLObjectType({ * name: 'Person', * fields: () => ({ * name: { type: GraphQLString }, * bestFriend: { type: PersonType }, * }) * }); * ``` */ class GraphQLObjectType { constructor(config) { var _config$extensionASTN2; this.name = assertName(config.name); this.description = config.description; this.isTypeOf = config.isTypeOf; this.extensions = toObjMap(config.extensions); this.astNode = config.astNode; this.extensionASTNodes = (_config$extensionASTN2 = config.extensionASTNodes) !== null && _config$extensionASTN2 !== void 0 ? _config$extensionASTN2 : []; this._fields = () => defineFieldMap(config); this._interfaces = () => defineInterfaces(config); config.isTypeOf == null || typeof config.isTypeOf === 'function' || (0,devAssert/* devAssert */.U)( false, `${this.name} must provide "isTypeOf" as a function, ` + `but got: ${(0,inspect/* inspect */.N)(config.isTypeOf)}.`, ); } get [Symbol.toStringTag]() { return 'GraphQLObjectType'; } getFields() { if (typeof this._fields === 'function') { this._fields = this._fields(); } return this._fields; } getInterfaces() { if (typeof this._interfaces === 'function') { this._interfaces = this._interfaces(); } return this._interfaces; } toConfig() { return { name: this.name, description: this.description, interfaces: this.getInterfaces(), fields: fieldsToFieldsConfig(this.getFields()), isTypeOf: this.isTypeOf, extensions: this.extensions, astNode: this.astNode, extensionASTNodes: this.extensionASTNodes, }; } toString() { return this.name; } toJSON() { return this.toString(); } } function defineInterfaces(config) { var _config$interfaces; const interfaces = resolveReadonlyArrayThunk( (_config$interfaces = config.interfaces) !== null && _config$interfaces !== void 0 ? _config$interfaces : [], ); Array.isArray(interfaces) || (0,devAssert/* devAssert */.U)( false, `${config.name} interfaces must be an Array or a function which returns an Array.`, ); return interfaces; } function defineFieldMap(config) { const fieldMap = resolveObjMapThunk(config.fields); isPlainObj(fieldMap) || (0,devAssert/* devAssert */.U)( false, `${config.name} fields must be an object with field names as keys or a function which returns such an object.`, ); return mapValue(fieldMap, (fieldConfig, fieldName) => { var _fieldConfig$args; isPlainObj(fieldConfig) || (0,devAssert/* devAssert */.U)( false, `${config.name}.${fieldName} field config must be an object.`, ); fieldConfig.resolve == null || typeof fieldConfig.resolve === 'function' || (0,devAssert/* devAssert */.U)( false, `${config.name}.${fieldName} field resolver must be a function if ` + `provided, but got: ${(0,inspect/* inspect */.N)(fieldConfig.resolve)}.`, ); const argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {}; isPlainObj(argsConfig) || (0,devAssert/* devAssert */.U)( false, `${config.name}.${fieldName} args must be an object with argument names as keys.`, ); return { name: assertName(fieldName), description: fieldConfig.description, type: fieldConfig.type, args: defineArguments(argsConfig), resolve: fieldConfig.resolve, subscribe: fieldConfig.subscribe, deprecationReason: fieldConfig.deprecationReason, extensions: toObjMap(fieldConfig.extensions), astNode: fieldConfig.astNode, }; }); } function defineArguments(config) { return Object.entries(config).map(([argName, argConfig]) => ({ name: assertName(argName), description: argConfig.description, type: argConfig.type, defaultValue: argConfig.defaultValue, deprecationReason: argConfig.deprecationReason, extensions: toObjMap(argConfig.extensions), astNode: argConfig.astNode, })); } function isPlainObj(obj) { return (0,isObjectLike/* isObjectLike */.Z)(obj) && !Array.isArray(obj); } function fieldsToFieldsConfig(fields) { return mapValue(fields, (field) => ({ description: field.description, type: field.type, args: argsToArgsConfig(field.args), resolve: field.resolve, subscribe: field.subscribe, deprecationReason: field.deprecationReason, extensions: field.extensions, astNode: field.astNode, })); } /** * @internal */ function argsToArgsConfig(args) { return keyValMap( args, (arg) => arg.name, (arg) => ({ description: arg.description, type: arg.type, defaultValue: arg.defaultValue, deprecationReason: arg.deprecationReason, extensions: arg.extensions, astNode: arg.astNode, }), ); } 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: * * ```ts * const EntityType = new GraphQLInterfaceType({ * name: 'Entity', * fields: { * name: { type: GraphQLString } * } * }); * ``` */ class GraphQLInterfaceType { constructor(config) { var _config$extensionASTN3; this.name = assertName(config.name); this.description = config.description; this.resolveType = config.resolveType; this.extensions = toObjMap(config.extensions); this.astNode = config.astNode; this.extensionASTNodes = (_config$extensionASTN3 = config.extensionASTNodes) !== null && _config$extensionASTN3 !== void 0 ? _config$extensionASTN3 : []; this._fields = defineFieldMap.bind(undefined, config); this._interfaces = defineInterfaces.bind(undefined, config); config.resolveType == null || typeof config.resolveType === 'function' || (0,devAssert/* devAssert */.U)( false, `${this.name} must provide "resolveType" as a function, ` + `but got: ${(0,inspect/* inspect */.N)(config.resolveType)}.`, ); } get [Symbol.toStringTag]() { return 'GraphQLInterfaceType'; } getFields() { if (typeof this._fields === 'function') { this._fields = this._fields(); } return this._fields; } getInterfaces() { if (typeof this._interfaces === 'function') { this._interfaces = this._interfaces(); } return this._interfaces; } toConfig() { return { name: this.name, description: this.description, interfaces: this.getInterfaces(), fields: fieldsToFieldsConfig(this.getFields()), resolveType: this.resolveType, extensions: this.extensions, astNode: this.astNode, extensionASTNodes: this.extensionASTNodes, }; } toString() { return this.name; } toJSON() { return this.toString(); } } /** * 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: * * ```ts * const PetType = new GraphQLUnionType({ * name: 'Pet', * types: [ DogType, CatType ], * resolveType(value) { * if (value instanceof Dog) { * return DogType; * } * if (value instanceof Cat) { * return CatType; * } * } * }); * ``` */ class GraphQLUnionType { constructor(config) { var _config$extensionASTN4; this.name = assertName(config.name); this.description = config.description; this.resolveType = config.resolveType; this.extensions = toObjMap(config.extensions); this.astNode = config.astNode; this.extensionASTNodes = (_config$extensionASTN4 = config.extensionASTNodes) !== null && _config$extensionASTN4 !== void 0 ? _config$extensionASTN4 : []; this._types = defineTypes.bind(undefined, config); config.resolveType == null || typeof config.resolveType === 'function' || (0,devAssert/* devAssert */.U)( false, `${this.name} must provide "resolveType" as a function, ` + `but got: ${(0,inspect/* inspect */.N)(config.resolveType)}.`, ); } get [Symbol.toStringTag]() { return 'GraphQLUnionType'; } getTypes() { if (typeof this._types === 'function') { this._types = this._types(); } return this._types; } toConfig() { return { name: this.name, description: this.description, types: this.getTypes(), resolveType: this.resolveType, extensions: this.extensions, astNode: this.astNode, extensionASTNodes: this.extensionASTNodes, }; } toString() { return this.name; } toJSON() { return this.toString(); } } function defineTypes(config) { const types = resolveReadonlyArrayThunk(config.types); Array.isArray(types) || (0,devAssert/* devAssert */.U)( false, `Must provide Array of types or a function which returns such an array for Union ${config.name}.`, ); 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: * * ```ts * 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. */ class GraphQLEnumType { /* */ constructor(config) { var _config$extensionASTN5; this.name = assertName(config.name); this.description = config.description; this.extensions = toObjMap(config.extensions); this.astNode = config.astNode; this.extensionASTNodes = (_config$extensionASTN5 = config.extensionASTNodes) !== null && _config$extensionASTN5 !== void 0 ? _config$extensionASTN5 : []; this._values = typeof config.values === 'function' ? config.values : defineEnumValues(this.name, config.values); this._valueLookup = null; this._nameLookup = null; } get [Symbol.toStringTag]() { return 'GraphQLEnumType'; } getValues() { if (typeof this._values === 'function') { this._values = defineEnumValues(this.name, this._values()); } return this._values; } getValue(name) { if (this._nameLookup === null) { this._nameLookup = keyMap(this.getValues(), (value) => value.name); } return this._nameLookup[name]; } serialize(outputValue) { if (this._valueLookup === null) { this._valueLookup = new Map( this.getValues().map((enumValue) => [enumValue.value, enumValue]), ); } const enumValue = this._valueLookup.get(outputValue); if (enumValue === undefined) { throw new GraphQLError/* GraphQLError */.eO( `Enum "${this.name}" cannot represent value: ${(0,inspect/* inspect */.N)(outputValue)}`, ); } return enumValue.name; } parseValue(inputValue) /* T */ { if (typeof inputValue !== 'string') { const valueStr = (0,inspect/* inspect */.N)(inputValue); throw new GraphQLError/* GraphQLError */.eO( `Enum "${this.name}" cannot represent non-string value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr), ); } const enumValue = this.getValue(inputValue); if (enumValue == null) { throw new GraphQLError/* GraphQLError */.eO( `Value "${inputValue}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, inputValue), ); } return enumValue.value; } parseLiteral(valueNode, _variables) /* T */ { // Note: variables will be resolved to a value before calling this function. if (valueNode.kind !== kinds/* Kind */.b.ENUM) { const valueStr = (0,printer.print)(valueNode); throw new GraphQLError/* GraphQLError */.eO( `Enum "${this.name}" cannot represent non-enum value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr), { nodes: valueNode, }, ); } const enumValue = this.getValue(valueNode.value); if (enumValue == null) { const valueStr = (0,printer.print)(valueNode); throw new GraphQLError/* GraphQLError */.eO( `Value "${valueStr}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, valueStr), { nodes: valueNode, }, ); } return enumValue.value; } toConfig() { const values = keyValMap( this.getValues(), (value) => value.name, (value) => ({ description: value.description, value: value.value, deprecationReason: value.deprecationReason, extensions: value.extensions, astNode: value.astNode, }), ); return { name: this.name, description: this.description, values, extensions: this.extensions, astNode: this.astNode, extensionASTNodes: this.extensionASTNodes, }; } toString() { return this.name; } toJSON() { return this.toString(); } } function didYouMeanEnumValue(enumType, unknownValueStr) { const allNames = enumType.getValues().map((value) => value.name); const suggestedValues = suggestionList(unknownValueStr, allNames); return didYouMean('the enum value', suggestedValues); } function defineEnumValues(typeName, valueMap) { isPlainObj(valueMap) || (0,devAssert/* devAssert */.U)( false, `${typeName} values must be an object with value names as keys.`, ); return Object.entries(valueMap).map(([valueName, valueConfig]) => { isPlainObj(valueConfig) || (0,devAssert/* devAssert */.U)( false, `${typeName}.${valueName} must refer to an object with a "value" key ` + `representing an internal value but got: ${(0,inspect/* inspect */.N)(valueConfig)}.`, ); return { name: assertEnumValueName(valueName), description: valueConfig.description, value: valueConfig.value !== undefined ? valueConfig.value : valueName, deprecationReason: valueConfig.deprecationReason, extensions: toObjMap(valueConfig.extensions), astNode: valueConfig.astNode, }; }); } /** * 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: * * ```ts * const GeoPoint = new GraphQLInputObjectType({ * name: 'GeoPoint', * fields: { * lat: { type: new GraphQLNonNull(GraphQLFloat) }, * lon: { type: new GraphQLNonNull(GraphQLFloat) }, * alt: { type: GraphQLFloat, defaultValue: 0 }, * } * }); * ``` */ class GraphQLInputObjectType { constructor(config) { var _config$extensionASTN6, _config$isOneOf; this.name = assertName(config.name); this.description = config.description; this.extensions = toObjMap(config.extensions); this.astNode = config.astNode; this.extensionASTNodes = (_config$extensionASTN6 = config.extensionASTNodes) !== null && _config$extensionASTN6 !== void 0 ? _config$extensionASTN6 : []; this.isOneOf = (_config$isOneOf = config.isOneOf) !== null && _config$isOneOf !== void 0 ? _config$isOneOf : false; this._fields = defineInputFieldMap.bind(undefined, config); } get [Symbol.toStringTag]() { return 'GraphQLInputObjectType'; } getFields() { if (typeof this._fields === 'function') { this._fields = this._fields(); } return this._fields; } toConfig() { const fields = mapValue(this.getFields(), (field) => ({ description: field.description, type: field.type, defaultValue: field.defaultValue, deprecationReason: field.deprecationReason, extensions: field.extensions, astNode: field.astNode, })); return { name: this.name, description: this.description, fields, extensions: this.extensions, astNode: this.astNode, extensionASTNodes: this.extensionASTNodes, isOneOf: this.isOneOf, }; } toString() { return this.name; } toJSON() { return this.toString(); } } function defineInputFieldMap(config) { const fieldMap = resolveObjMapThunk(config.fields); isPlainObj(fieldMap) || (0,devAssert/* devAssert */.U)( false, `${config.name} fields must be an object with field names as keys or a function which returns such an object.`, ); return mapValue(fieldMap, (fieldConfig, fieldName) => { !('resolve' in fieldConfig) || (0,devAssert/* devAssert */.U)( false, `${config.name}.${fieldName} field has a resolve property, but Input Types cannot define resolvers.`, ); return { name: assertName(fieldName), description: fieldConfig.description, type: fieldConfig.type, defaultValue: fieldConfig.defaultValue, deprecationReason: fieldConfig.deprecationReason, extensions: toObjMap(fieldConfig.extensions), astNode: fieldConfig.astNode, }; }); } function isRequiredInputField(field) { return isNonNullType(field.type) && field.defaultValue === undefined; } ;// ./node_modules/graphql/utilities/typeComparators.mjs /** * Provided two types, return true if the types are equal (invariant). */ function isEqualType(typeA, typeB) { // Equivalent types are equal. if (typeA === typeB) { return true; } // If either type is non-null, the other must also be non-null. if (isNonNullType(typeA) && isNonNullType(typeB)) { return isEqualType(typeA.ofType, typeB.ofType); } // If either type is a list, the other must also be a list. if (isListType(typeA) && isListType(typeB)) { return isEqualType(typeA.ofType, typeB.ofType); } // Otherwise the types are not equal. return false; } /** * Provided a type and a super type, return true if the first type is either * equal or a subset of the second super type (covariant). */ function isTypeSubTypeOf(schema, maybeSubType, superType) { // Equivalent type is a valid subtype if (maybeSubType === superType) { return true; } // If superType is non-null, maybeSubType must also be non-null. if (isNonNullType(superType)) { if (isNonNullType(maybeSubType)) { return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType); } return false; } if (isNonNullType(maybeSubType)) { // If superType is nullable, maybeSubType may be non-null or nullable. return isTypeSubTypeOf(schema, maybeSubType.ofType, superType); } // If superType type is a list, maybeSubType type must also be a list. if (isListType(superType)) { if (isListType(maybeSubType)) { return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType); } return false; } if (isListType(maybeSubType)) { // If superType is not a list, maybeSubType must also be not a list. return false; } // If superType type is an abstract type, check if it is super type of maybeSubType. // Otherwise, the child type is not a valid subtype of the parent type. return ( isAbstractType(superType) && (isInterfaceType(maybeSubType) || isObjectType(maybeSubType)) && schema.isSubType(superType, maybeSubType) ); } /** * Provided two composite types, determine if they "overlap". Two composite * types overlap when the Sets of possible concrete types for each intersect. * * This is often used to determine if a fragment of a given type could possibly * be visited in a context of another type. * * This function is commutative. */ function doTypesOverlap(schema, typeA, typeB) { // Equivalent types overlap if (typeA === typeB) { return true; } if (isAbstractType(typeA)) { if (isAbstractType(typeB)) { // If both types are abstract, then determine if there is any intersection // between possible concrete types of each. return schema .getPossibleTypes(typeA) .some((type) => schema.isSubType(typeB, type)); } // Determine if the latter type is a possible concrete type of the former. return schema.isSubType(typeA, typeB); } if (isAbstractType(typeB)) { // Determine if the former type is a possible concrete type of the latter. return schema.isSubType(typeB, typeA); } // Otherwise the types do not overlap. return false; } // EXTERNAL MODULE: ./node_modules/graphql/language/directiveLocation.mjs var directiveLocation = __webpack_require__(35026); ;// ./node_modules/graphql/type/scalars.mjs /** * Maximum possible Int value as per GraphQL Spec (32-bit signed integer). * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe up-to 2^53 - 1 * */ const GRAPHQL_MAX_INT = 2147483647; /** * Minimum possible Int value as per GraphQL Spec (32-bit signed integer). * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe starting at -(2^53 - 1) * */ const GRAPHQL_MIN_INT = -2147483648; const GraphQLInt = new GraphQLScalarType({ name: 'Int', description: 'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.', serialize(outputValue) { const coercedValue = serializeObject(outputValue); if (typeof coercedValue === 'boolean') { return coercedValue ? 1 : 0; } let num = coercedValue; if (typeof coercedValue === 'string' && coercedValue !== '') { num = Number(coercedValue); } if (typeof num !== 'number' || !Number.isInteger(num)) { throw new GraphQLError/* GraphQLError */.eO( `Int cannot represent non-integer value: ${(0,inspect/* inspect */.N)(coercedValue)}`, ); } if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) { throw new GraphQLError/* GraphQLError */.eO( 'Int cannot represent non 32-bit signed integer value: ' + (0,inspect/* inspect */.N)(coercedValue), ); } return num; }, parseValue(inputValue) { if (typeof inputValue !== 'number' || !Number.isInteger(inputValue)) { throw new GraphQLError/* GraphQLError */.eO( `Int cannot represent non-integer value: ${(0,inspect/* inspect */.N)(inputValue)}`, ); } if (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) { throw new GraphQLError/* GraphQLError */.eO( `Int cannot represent non 32-bit signed integer value: ${inputValue}`, ); } return inputValue; }, parseLiteral(valueNode) { if (valueNode.kind !== kinds/* Kind */.b.INT) { throw new GraphQLError/* GraphQLError */.eO( `Int cannot represent non-integer value: ${(0,printer.print)(valueNode)}`, { nodes: valueNode, }, ); } const num = parseInt(valueNode.value, 10); if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) { throw new GraphQLError/* GraphQLError */.eO( `Int cannot represent non 32-bit signed integer value: ${valueNode.value}`, { nodes: valueNode, }, ); } return num; }, }); const GraphQLFloat = new GraphQLScalarType({ name: 'Float', description: 'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).', serialize(outputValue) { const coercedValue = serializeObject(outputValue); if (typeof coercedValue === 'boolean') { return coercedValue ? 1 : 0; } let num = coercedValue; if (typeof coercedValue === 'string' && coercedValue !== '') { num = Number(coercedValue); } if (typeof num !== 'number' || !Number.isFinite(num)) { throw new GraphQLError/* GraphQLError */.eO( `Float cannot represent non numeric value: ${(0,inspect/* inspect */.N)(coercedValue)}`, ); } return num; }, parseValue(inputValue) { if (typeof inputValue !== 'number' || !Number.isFinite(inputValue)) { throw new GraphQLError/* GraphQLError */.eO( `Float cannot represent non numeric value: ${(0,inspect/* inspect */.N)(inputValue)}`, ); } return inputValue; }, parseLiteral(valueNode) { if (valueNode.kind !== kinds/* Kind */.b.FLOAT && valueNode.kind !== kinds/* Kind */.b.INT) { throw new GraphQLError/* GraphQLError */.eO( `Float cannot represent non numeric value: ${(0,printer.print)(valueNode)}`, valueNode, ); } return parseFloat(valueNode.value); }, }); const GraphQLString = new GraphQLScalarType({ name: 'String', description: 'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.', serialize(outputValue) { const coercedValue = serializeObject(outputValue); // Serialize string, boolean and number values to a string, but do not // attempt to coerce object, function, symbol, or other types as strings. if (typeof coercedValue === 'string') { return coercedValue; } if (typeof coercedValue === 'boolean') { return coercedValue ? 'true' : 'false'; } if (typeof coercedValue === 'number' && Number.isFinite(coercedValue)) { return coercedValue.toString(); } throw new GraphQLError/* GraphQLError */.eO( `String cannot represent value: ${(0,inspect/* inspect */.N)(outputValue)}`, ); }, parseValue(inputValue) { if (typeof inputValue !== 'string') { throw new GraphQLError/* GraphQLError */.eO( `String cannot represent a non string value: ${(0,inspect/* inspect */.N)(inputValue)}`, ); } return inputValue; }, parseLiteral(valueNode) { if (valueNode.kind !== kinds/* Kind */.b.STRING) { throw new GraphQLError/* GraphQLError */.eO( `String cannot represent a non string value: ${(0,printer.print)(valueNode)}`, { nodes: valueNode, }, ); } return valueNode.value; }, }); const GraphQLBoolean = new GraphQLScalarType({ name: 'Boolean', description: 'The `Boolean` scalar type represents `true` or `false`.', serialize(outputValue) { const coercedValue = serializeObject(outputValue); if (typeof coercedValue === 'boolean') { return coercedValue; } if (Number.isFinite(coercedValue)) { return coercedValue !== 0; } throw new GraphQLError/* GraphQLError */.eO( `Boolean cannot represent a non boolean value: ${(0,inspect/* inspect */.N)(coercedValue)}`, ); }, parseValue(inputValue) { if (typeof inputValue !== 'boolean') { throw new GraphQLError/* GraphQLError */.eO( `Boolean cannot represent a non boolean value: ${(0,inspect/* inspect */.N)(inputValue)}`, ); } return inputValue; }, parseLiteral(valueNode) { if (valueNode.kind !== kinds/* Kind */.b.BOOLEAN) { throw new GraphQLError/* GraphQLError */.eO( `Boolean cannot represent a non boolean value: ${(0,printer.print)(valueNode)}`, { nodes: valueNode, }, ); } return valueNode.value; }, }); const GraphQLID = new GraphQLScalarType({ name: 'ID', description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.', serialize(outputValue) { const coercedValue = serializeObject(outputValue); if (typeof coercedValue === 'string') { return coercedValue; } if (Number.isInteger(coercedValue)) { return String(coercedValue); } throw new GraphQLError/* GraphQLError */.eO( `ID cannot represent value: ${(0,inspect/* inspect */.N)(outputValue)}`, ); }, parseValue(inputValue) { if (typeof inputValue === 'string') { return inputValue; } if (typeof inputValue === 'number' && Number.isInteger(inputValue)) { return inputValue.toString(); } throw new GraphQLError/* GraphQLError */.eO(`ID cannot represent value: ${(0,inspect/* inspect */.N)(inputValue)}`); }, parseLiteral(valueNode) { if (valueNode.kind !== kinds/* Kind */.b.STRING && valueNode.kind !== kinds/* Kind */.b.INT) { throw new GraphQLError/* GraphQLError */.eO( 'ID cannot represent a non-string and non-integer value: ' + (0,printer.print)(valueNode), { nodes: valueNode, }, ); } return valueNode.value; }, }); const specifiedScalarTypes = Object.freeze([ GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID, ]); function isSpecifiedScalarType(type) { return specifiedScalarTypes.some(({ name }) => type.name === name); } // Support serializing objects with custom valueOf() or toJSON() functions - // a common way to represent a complex value which can be represented as // a string (ex: MongoDB id objects). function serializeObject(outputValue) { if ((0,isObjectLike/* isObjectLike */.Z)(outputValue)) { if (typeof outputValue.valueOf === 'function') { const valueOfResult = outputValue.valueOf(); if (!(0,isObjectLike/* isObjectLike */.Z)(valueOfResult)) { return valueOfResult; } } if (typeof outputValue.toJSON === 'function') { return outputValue.toJSON(); } } return outputValue; } ;// ./node_modules/graphql/type/directives.mjs /** * Test if the given value is a GraphQL directive. */ function isDirective(directive) { return (0,instanceOf/* instanceOf */.h)(directive, GraphQLDirective); } function assertDirective(directive) { if (!isDirective(directive)) { throw new Error( `Expected ${(0,inspect/* inspect */.N)(directive)} to be a GraphQL directive.`, ); } return directive; } /** * Custom extensions * * @remarks * Use a unique identifier name for your extension, for example the name of * your library or project. Do not use a shortened identifier as this increases * the risk of conflicts. We recommend you add at most one extension field, * an object which can contain all the values you need. */ /** * Directives are used by the GraphQL runtime as a way of modifying execution * behavior. Type system creators will usually not create these directly. */ class GraphQLDirective { constructor(config) { var _config$isRepeatable, _config$args; this.name = assertName(config.name); this.description = config.description; this.locations = config.locations; this.isRepeatable = (_config$isRepeatable = config.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false; this.extensions = toObjMap(config.extensions); this.astNode = config.astNode; Array.isArray(config.locations) || (0,devAssert/* devAssert */.U)(false, `@${config.name} locations must be an Array.`); const args = (_config$args = config.args) !== null && _config$args !== void 0 ? _config$args : {}; ((0,isObjectLike/* isObjectLike */.Z)(args) && !Array.isArray(args)) || (0,devAssert/* devAssert */.U)( false, `@${config.name} args must be an object with argument names as keys.`, ); this.args = defineArguments(args); } get [Symbol.toStringTag]() { return 'GraphQLDirective'; } toConfig() { return { name: this.name, description: this.description, locations: this.locations, args: argsToArgsConfig(this.args), isRepeatable: this.isRepeatable, extensions: this.extensions, astNode: this.astNode, }; } toString() { return '@' + this.name; } toJSON() { return this.toString(); } } /** * Used to conditionally include fields or fragments. */ const GraphQLIncludeDirective = new GraphQLDirective({ name: 'include', description: 'Directs the executor to include this field or fragment only when the `if` argument is true.', locations: [ directiveLocation/* DirectiveLocation */.H.FIELD, directiveLocation/* DirectiveLocation */.H.FRAGMENT_SPREAD, directiveLocation/* DirectiveLocation */.H.INLINE_FRAGMENT, ], args: { if: { type: new GraphQLNonNull(GraphQLBoolean), description: 'Included when true.', }, }, }); /** * Used to conditionally skip (exclude) fields or fragments. */ const GraphQLSkipDirective = new GraphQLDirective({ name: 'skip', description: 'Directs the executor to skip this field or fragment when the `if` argument is true.', locations: [ directiveLocation/* DirectiveLocation */.H.FIELD, directiveLocation/* DirectiveLocation */.H.FRAGMENT_SPREAD, directiveLocation/* DirectiveLocation */.H.INLINE_FRAGMENT, ], args: { if: { type: new GraphQLNonNull(GraphQLBoolean), description: 'Skipped when true.', }, }, }); /** * Constant string used for default reason for a deprecation. */ const DEFAULT_DEPRECATION_REASON = 'No longer supported'; /** * Used to declare element of a GraphQL schema as deprecated. */ const GraphQLDeprecatedDirective = new GraphQLDirective({ name: 'deprecated', description: 'Marks an element of a GraphQL schema as no longer supported.', locations: [ directiveLocation/* DirectiveLocation */.H.FIELD_DEFINITION, directiveLocation/* DirectiveLocation */.H.ARGUMENT_DEFINITION, directiveLocation/* DirectiveLocation */.H.INPUT_FIELD_DEFINITION, directiveLocation/* DirectiveLocation */.H.ENUM_VALUE, ], args: { reason: { type: GraphQLString, description: 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).', defaultValue: DEFAULT_DEPRECATION_REASON, }, }, }); /** * Used to provide a URL for specifying the behavior of custom scalar definitions. */ const GraphQLSpecifiedByDirective = new GraphQLDirective({ name: 'specifiedBy', description: 'Exposes a URL that specifies the behavior of this scalar.', locations: [directiveLocation/* DirectiveLocation */.H.SCALAR], args: { url: { type: new GraphQLNonNull(GraphQLString), description: 'The URL that specifies the behavior of this scalar.', }, }, }); /** * Used to indicate an Input Object is a OneOf Input Object. */ const GraphQLOneOfDirective = new GraphQLDirective({ name: 'oneOf', description: 'Indicates exactly one field must be supplied and this field must not be `null`.', locations: [directiveLocation/* DirectiveLocation */.H.INPUT_OBJECT], args: {}, }); /** * The full list of specified directives. */ const specifiedDirectives = Object.freeze([ GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective, GraphQLOneOfDirective, ]); function isSpecifiedDirective(directive) { return specifiedDirectives.some(({ name }) => name === directive.name); } // EXTERNAL MODULE: ./node_modules/graphql/jsutils/invariant.mjs var invariant = __webpack_require__(37544); ;// ./node_modules/graphql/jsutils/isIterableObject.mjs /** * Returns true if the provided object is an Object (i.e. not a string literal) * and implements the Iterator protocol. * * This may be used in place of [Array.isArray()][isArray] to determine if * an object should be iterated-over e.g. Array, Map, Set, Int8Array, * TypedArray, etc. but excludes string literals. * * @example * ```ts * isIterableObject([ 1, 2, 3 ]) // true * isIterableObject(new Map()) // true * isIterableObject('ABC') // false * isIterableObject({ key: 'value' }) // false * isIterableObject({ length: 1, 0: 'Alpha' }) // false * ``` */ function isIterableObject(maybeIterable) { return ( typeof maybeIterable === 'object' && typeof (maybeIterable === null || maybeIterable === void 0 ? void 0 : maybeIterable[Symbol.iterator]) === 'function' ); } ;// ./node_modules/graphql/utilities/astFromValue.mjs /** * Produces a GraphQL Value AST given a JavaScript object. * Function will match JavaScript/JSON values to GraphQL AST schema format * by using suggested GraphQLInputType. For example: * * astFromValue("value", GraphQLString) * * A GraphQL type must be provided, which will be used to interpret different * JavaScript values. * * | JSON Value | GraphQL Value | * | ------------- | -------------------- | * | Object | Input Object | * | Array | List | * | Boolean | Boolean | * | String | String / Enum Value | * | Number | Int / Float | * | Unknown | Enum Value | * | null | NullValue | * */ function astFromValue(value, type) { if (isNonNullType(type)) { const astValue = astFromValue(value, type.ofType); if ( (astValue === null || astValue === void 0 ? void 0 : astValue.kind) === kinds/* Kind */.b.NULL ) { return null; } return astValue; } // only explicit null, not undefined, NaN if (value === null) { return { kind: kinds/* Kind */.b.NULL, }; } // undefined if (value === undefined) { return null; } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but // the value is not an array, convert the value using the list's item type. if (isListType(type)) { const itemType = type.ofType; if (isIterableObject(value)) { const valuesNodes = []; for (const item of value) { const itemNode = astFromValue(item, itemType); if (itemNode != null) { valuesNodes.push(itemNode); } } return { kind: kinds/* Kind */.b.LIST, values: valuesNodes, }; } return astFromValue(value, itemType); } // Populate the fields of the input object by creating ASTs from each value // in the JavaScript object according to the fields in the input type. if (isInputObjectType(type)) { if (!(0,isObjectLike/* isObjectLike */.Z)(value)) { return null; } const fieldNodes = []; for (const field of Object.values(type.getFields())) { const fieldValue = astFromValue(value[field.name], field.type); if (fieldValue) { fieldNodes.push({ kind: kinds/* Kind */.b.OBJECT_FIELD, name: { kind: kinds/* Kind */.b.NAME, value: field.name, }, value: fieldValue, }); } } return { kind: kinds/* Kind */.b.OBJECT, fields: fieldNodes, }; } if (isLeafType(type)) { // Since value is an internally represented value, it must be serialized // to an externally represented value before converting into an AST. const serialized = type.serialize(value); if (serialized == null) { return null; } // Others serialize based on their corresponding JavaScript scalar types. if (typeof serialized === 'boolean') { return { kind: kinds/* Kind */.b.BOOLEAN, value: serialized, }; } // JavaScript numbers can be Int or Float values. if (typeof serialized === 'number' && Number.isFinite(serialized)) { const stringNum = String(serialized); return integerStringRegExp.test(stringNum) ? { kind: kinds/* Kind */.b.INT, value: stringNum, } : { kind: kinds/* Kind */.b.FLOAT, value: stringNum, }; } if (typeof serialized === 'string') { // Enum types use Enum literals. if (isEnumType(type)) { return { kind: kinds/* Kind */.b.ENUM, value: serialized, }; } // ID types can use Int literals. if (type === GraphQLID && integerStringRegExp.test(serialized)) { return { kind: kinds/* Kind */.b.INT, value: serialized, }; } return { kind: kinds/* Kind */.b.STRING, value: serialized, }; } throw new TypeError(`Cannot convert value to AST: ${(0,inspect/* inspect */.N)(serialized)}.`); } /* c8 ignore next 3 */ // Not reachable, all possible types have been considered. false || (0,invariant/* invariant */.V)(false, 'Unexpected input type: ' + (0,inspect/* inspect */.N)(type)); } /** * IntValue: * - NegativeSign? 0 * - NegativeSign? NonZeroDigit ( Digit+ )? */ const integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/; ;// ./node_modules/graphql/type/introspection.mjs const __Schema = new GraphQLObjectType({ name: '__Schema', description: 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.', fields: () => ({ description: { type: GraphQLString, resolve: (schema) => schema.description, }, types: { description: 'A list of all types supported by this server.', type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Type))), resolve(schema) { return Object.values(schema.getTypeMap()); }, }, queryType: { description: 'The type that query operations will be rooted at.', type: new GraphQLNonNull(__Type), resolve: (schema) => schema.getQueryType(), }, mutationType: { description: 'If this server supports mutation, the type that mutation operations will be rooted at.', type: __Type, resolve: (schema) => schema.getMutationType(), }, subscriptionType: { description: 'If this server support subscription, the type that subscription operations will be rooted at.', type: __Type, resolve: (schema) => schema.getSubscriptionType(), }, directives: { description: 'A list of all directives supported by this server.', type: new GraphQLNonNull( new GraphQLList(new GraphQLNonNull(__Directive)), ), resolve: (schema) => schema.getDirectives(), }, }), }); const __Directive = new GraphQLObjectType({ name: '__Directive', description: "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", fields: () => ({ name: { type: new GraphQLNonNull(GraphQLString), resolve: (directive) => directive.name, }, description: { type: GraphQLString, resolve: (directive) => directive.description, }, isRepeatable: { type: new GraphQLNonNull(GraphQLBoolean), resolve: (directive) => directive.isRepeatable, }, locations: { type: new GraphQLNonNull( new GraphQLList(new GraphQLNonNull(__DirectiveLocation)), ), resolve: (directive) => directive.locations, }, args: { type: new GraphQLNonNull( new GraphQLList(new GraphQLNonNull(__InputValue)), ), args: { includeDeprecated: { type: GraphQLBoolean, defaultValue: false, }, }, resolve(field, { includeDeprecated }) { return includeDeprecated ? field.args : field.args.filter((arg) => arg.deprecationReason == null); }, }, }), }); const __DirectiveLocation = new GraphQLEnumType({ name: '__DirectiveLocation', description: 'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.', values: { QUERY: { value: directiveLocation/* DirectiveLocation */.H.QUERY, description: 'Location adjacent to a query operation.', }, MUTATION: { value: directiveLocation/* DirectiveLocation */.H.MUTATION, description: 'Location adjacent to a mutation operation.', }, SUBSCRIPTION: { value: directiveLocation/* DirectiveLocation */.H.SUBSCRIPTION, description: 'Location adjacent to a subscription operation.', }, FIELD: { value: directiveLocation/* DirectiveLocation */.H.FIELD, description: 'Location adjacent to a field.', }, FRAGMENT_DEFINITION: { value: directiveLocation/* DirectiveLocation */.H.FRAGMENT_DEFINITION, description: 'Location adjacent to a fragment definition.', }, FRAGMENT_SPREAD: { value: directiveLocation/* DirectiveLocation */.H.FRAGMENT_SPREAD, description: 'Location adjacent to a fragment spread.', }, INLINE_FRAGMENT: { value: directiveLocation/* DirectiveLocation */.H.INLINE_FRAGMENT, description: 'Location adjacent to an inline fragment.', }, VARIABLE_DEFINITION: { value: directiveLocation/* DirectiveLocation */.H.VARIABLE_DEFINITION, description: 'Location adjacent to a variable definition.', }, SCHEMA: { value: directiveLocation/* DirectiveLocation */.H.SCHEMA, description: 'Location adjacent to a schema definition.', }, SCALAR: { value: directiveLocation/* DirectiveLocation */.H.SCALAR, description: 'Location adjacent to a scalar definition.', }, OBJECT: { value: directiveLocation/* DirectiveLocation */.H.OBJECT, description: 'Location adjacent to an object type definition.', }, FIELD_DEFINITION: { value: directiveLocation/* DirectiveLocation */.H.FIELD_DEFINITION, description: 'Location adjacent to a field definition.', }, ARGUMENT_DEFINITION: { value: directiveLocation/* DirectiveLocation */.H.ARGUMENT_DEFINITION, description: 'Location adjacent to an argument definition.', }, INTERFACE: { value: directiveLocation/* DirectiveLocation */.H.INTERFACE, description: 'Location adjacent to an interface definition.', }, UNION: { value: directiveLocation/* DirectiveLocation */.H.UNION, description: 'Location adjacent to a union definition.', }, ENUM: { value: directiveLocation/* DirectiveLocation */.H.ENUM, description: 'Location adjacent to an enum definition.', }, ENUM_VALUE: { value: directiveLocation/* DirectiveLocation */.H.ENUM_VALUE, description: 'Location adjacent to an enum value definition.', }, INPUT_OBJECT: { value: directiveLocation/* DirectiveLocation */.H.INPUT_OBJECT, description: 'Location adjacent to an input object type definition.', }, INPUT_FIELD_DEFINITION: { value: directiveLocation/* DirectiveLocation */.H.INPUT_FIELD_DEFINITION, description: 'Location adjacent to an input object field definition.', }, }, }); const __Type = new GraphQLObjectType({ name: '__Type', description: 'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.', fields: () => ({ kind: { type: new GraphQLNonNull(__TypeKind), resolve(type) { if (isScalarType(type)) { return TypeKind.SCALAR; } if (isObjectType(type)) { return TypeKind.OBJECT; } if (isInterfaceType(type)) { return TypeKind.INTERFACE; } if (isUnionType(type)) { return TypeKind.UNION; } if (isEnumType(type)) { return TypeKind.ENUM; } if (isInputObjectType(type)) { return TypeKind.INPUT_OBJECT; } if (isListType(type)) { return TypeKind.LIST; } if (isNonNullType(type)) { return TypeKind.NON_NULL; } /* c8 ignore next 3 */ // Not reachable, all possible types have been considered) false || (0,invariant/* invariant */.V)(false, `Unexpected type: "${(0,inspect/* inspect */.N)(type)}".`); }, }, name: { type: GraphQLString, resolve: (type) => ('name' in type ? type.name : undefined), }, description: { type: GraphQLString, resolve: ( type, // FIXME: add test case ) => /* c8 ignore next */ 'description' in type ? type.description : undefined, }, specifiedByURL: { type: GraphQLString, resolve: (obj) => 'specifiedByURL' in obj ? obj.specifiedByURL : undefined, }, fields: { type: new GraphQLList(new GraphQLNonNull(__Field)), args: { includeDeprecated: { type: GraphQLBoolean, defaultValue: false, }, }, resolve(type, { includeDeprecated }) { if (isObjectType(type) || isInterfaceType(type)) { const fields = Object.values(type.getFields()); return includeDeprecated ? fields : fields.filter((field) => field.deprecationReason == null); } }, }, interfaces: { type: new GraphQLList(new GraphQLNonNull(__Type)), resolve(type) { if (isObjectType(type) || isInterfaceType(type)) { return type.getInterfaces(); } }, }, possibleTypes: { type: new GraphQLList(new GraphQLNonNull(__Type)), resolve(type, _args, _context, { schema }) { if (isAbstractType(type)) { return schema.getPossibleTypes(type); } }, }, enumValues: { type: new GraphQLList(new GraphQLNonNull(__EnumValue)), args: { includeDeprecated: { type: GraphQLBoolean, defaultValue: false, }, }, resolve(type, { includeDeprecated }) { if (isEnumType(type)) { const values = type.getValues(); return includeDeprecated ? values : values.filter((field) => field.deprecationReason == null); } }, }, inputFields: { type: new GraphQLList(new GraphQLNonNull(__InputValue)), args: { includeDeprecated: { type: GraphQLBoolean, defaultValue: false, }, }, resolve(type, { includeDeprecated }) { if (isInputObjectType(type)) { const values = Object.values(type.getFields()); return includeDeprecated ? values : values.filter((field) => field.deprecationReason == null); } }, }, ofType: { type: __Type, resolve: (type) => ('ofType' in type ? type.ofType : undefined), }, isOneOf: { type: GraphQLBoolean, resolve: (type) => { if (isInputObjectType(type)) { return type.isOneOf; } }, }, }), }); const __Field = new GraphQLObjectType({ name: '__Field', description: 'Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.', fields: () => ({ name: { type: new GraphQLNonNull(GraphQLString), resolve: (field) => field.name, }, description: { type: GraphQLString, resolve: (field) => field.description, }, args: { type: new GraphQLNonNull( new GraphQLList(new GraphQLNonNull(__InputValue)), ), args: { includeDeprecated: { type: GraphQLBoolean, defaultValue: false, }, }, resolve(field, { includeDeprecated }) { return includeDeprecated ? field.args : field.args.filter((arg) => arg.deprecationReason == null); }, }, type: { type: new GraphQLNonNull(__Type), resolve: (field) => field.type, }, isDeprecated: { type: new GraphQLNonNull(GraphQLBoolean), resolve: (field) => field.deprecationReason != null, }, deprecationReason: { type: GraphQLString, resolve: (field) => field.deprecationReason, }, }), }); const __InputValue = new GraphQLObjectType({ name: '__InputValue', description: 'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.', fields: () => ({ name: { type: new GraphQLNonNull(GraphQLString), resolve: (inputValue) => inputValue.name, }, description: { type: GraphQLString, resolve: (inputValue) => inputValue.description, }, type: { type: new GraphQLNonNull(__Type), resolve: (inputValue) => inputValue.type, }, defaultValue: { type: GraphQLString, description: 'A GraphQL-formatted string representing the default value for this input value.', resolve(inputValue) { const { type, defaultValue } = inputValue; const valueAST = astFromValue(defaultValue, type); return valueAST ? (0,printer.print)(valueAST) : null; }, }, isDeprecated: { type: new GraphQLNonNull(GraphQLBoolean), resolve: (field) => field.deprecationReason != null, }, deprecationReason: { type: GraphQLString, resolve: (obj) => obj.deprecationReason, }, }), }); const __EnumValue = new GraphQLObjectType({ name: '__EnumValue', description: 'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.', fields: () => ({ name: { type: new GraphQLNonNull(GraphQLString), resolve: (enumValue) => enumValue.name, }, description: { type: GraphQLString, resolve: (enumValue) => enumValue.description, }, isDeprecated: { type: new GraphQLNonNull(GraphQLBoolean), resolve: (enumValue) => enumValue.deprecationReason != null, }, deprecationReason: { type: GraphQLString, resolve: (enumValue) => enumValue.deprecationReason, }, }), }); var TypeKind; (function (TypeKind) { TypeKind['SCALAR'] = 'SCALAR'; TypeKind['OBJECT'] = 'OBJECT'; TypeKind['INTERFACE'] = 'INTERFACE'; TypeKind['UNION'] = 'UNION'; TypeKind['ENUM'] = 'ENUM'; TypeKind['INPUT_OBJECT'] = 'INPUT_OBJECT'; TypeKind['LIST'] = 'LIST'; TypeKind['NON_NULL'] = 'NON_NULL'; })(TypeKind || (TypeKind = {})); const __TypeKind = new GraphQLEnumType({ name: '__TypeKind', description: 'An enum describing what kind of type a given `__Type` is.', values: { SCALAR: { value: TypeKind.SCALAR, description: 'Indicates this type is a scalar.', }, OBJECT: { value: TypeKind.OBJECT, description: 'Indicates this type is an object. `fields` and `interfaces` are valid fields.', }, INTERFACE: { value: TypeKind.INTERFACE, description: 'Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.', }, UNION: { value: TypeKind.UNION, description: 'Indicates this type is a union. `possibleTypes` is a valid field.', }, ENUM: { value: TypeKind.ENUM, description: 'Indicates this type is an enum. `enumValues` is a valid field.', }, INPUT_OBJECT: { value: TypeKind.INPUT_OBJECT, description: 'Indicates this type is an input object. `inputFields` is a valid field.', }, LIST: { value: TypeKind.LIST, description: 'Indicates this type is a list. `ofType` is a valid field.', }, NON_NULL: { value: TypeKind.NON_NULL, description: 'Indicates this type is a non-null. `ofType` is a valid field.', }, }, }); /** * Note that these are GraphQLField and not GraphQLFieldConfig, * so the format for args is different. */ const SchemaMetaFieldDef = { name: '__schema', type: new GraphQLNonNull(__Schema), description: 'Access the current type schema of this server.', args: [], resolve: (_source, _args, _context, { schema }) => schema, deprecationReason: undefined, extensions: Object.create(null), astNode: undefined, }; const TypeMetaFieldDef = { name: '__type', type: __Type, description: 'Request the type information of a single type.', args: [ { name: 'name', description: undefined, type: new GraphQLNonNull(GraphQLString), defaultValue: undefined, deprecationReason: undefined, extensions: Object.create(null), astNode: undefined, }, ], resolve: (_source, { name }, _context, { schema }) => schema.getType(name), deprecationReason: undefined, extensions: Object.create(null), astNode: undefined, }; const TypeNameMetaFieldDef = { name: '__typename', type: new GraphQLNonNull(GraphQLString), description: 'The name of the current Object type at runtime.', args: [], resolve: (_source, _args, _context, { parentType }) => parentType.name, deprecationReason: undefined, extensions: Object.create(null), astNode: undefined, }; const introspectionTypes = Object.freeze([ __Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind, ]); function isIntrospectionType(type) { return introspectionTypes.some(({ name }) => type.name === name); } ;// ./node_modules/graphql/type/schema.mjs /** * Test if the given value is a GraphQL schema. */ function isSchema(schema) { return (0,instanceOf/* instanceOf */.h)(schema, GraphQLSchema); } function assertSchema(schema) { if (!isSchema(schema)) { throw new Error(`Expected ${(0,inspect/* inspect */.N)(schema)} to be a GraphQL schema.`); } return schema; } /** * Custom extensions * * @remarks * Use a unique identifier name for your extension, for example the name of * your library or project. Do not use a shortened identifier as this increases * the risk of conflicts. We recommend you add at most one extension field, * an object which can contain all the values you need. */ /** * Schema Definition * * A Schema is created by supplying the root types of each type of operation, * query and mutation (optional). A schema definition is then supplied to the * validator and executor. * * Example: * * ```ts * const MyAppSchema = new GraphQLSchema({ * query: MyAppQueryRootType, * mutation: MyAppMutationRootType, * }) * ``` * * Note: When the schema is constructed, by default only the types that are * reachable by traversing the root types are included, other types must be * explicitly referenced. * * Example: * * ```ts * const characterInterface = new GraphQLInterfaceType({ * name: 'Character', * ... * }); * * const humanType = new GraphQLObjectType({ * name: 'Human', * interfaces: [characterInterface], * ... * }); * * const droidType = new GraphQLObjectType({ * name: 'Droid', * interfaces: [characterInterface], * ... * }); * * const schema = new GraphQLSchema({ * query: new GraphQLObjectType({ * name: 'Query', * fields: { * hero: { type: characterInterface, ... }, * } * }), * ... * // Since this schema references only the `Character` interface it's * // necessary to explicitly list the types that implement it if * // you want them to be included in the final schema. * types: [humanType, droidType], * }) * ``` * * Note: If an array of `directives` are provided to GraphQLSchema, that will be * the exact list of directives represented and allowed. If `directives` is not * provided then a default set of the specified directives (e.g. `@include` and * `@skip`) will be used. If you wish to provide *additional* directives to these * specified directives, you must explicitly declare them. Example: * * ```ts * const MyAppSchema = new GraphQLSchema({ * ... * directives: specifiedDirectives.concat([ myCustomDirective ]), * }) * ``` */ class GraphQLSchema { // Used as a cache for validateSchema(). constructor(config) { var _config$extensionASTN, _config$directives; // If this schema was built from a source known to be valid, then it may be // marked with assumeValid to avoid an additional type system validation. this.__validationErrors = config.assumeValid === true ? [] : undefined; // Check for common mistakes during construction to produce early errors. (0,isObjectLike/* isObjectLike */.Z)(config) || (0,devAssert/* devAssert */.U)(false, 'Must provide configuration object.'); !config.types || Array.isArray(config.types) || (0,devAssert/* devAssert */.U)( false, `"types" must be Array if provided but got: ${(0,inspect/* inspect */.N)(config.types)}.`, ); !config.directives || Array.isArray(config.directives) || (0,devAssert/* devAssert */.U)( false, '"directives" must be Array if provided but got: ' + `${(0,inspect/* inspect */.N)(config.directives)}.`, ); this.description = config.description; this.extensions = toObjMap(config.extensions); this.astNode = config.astNode; this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : []; this._queryType = config.query; this._mutationType = config.mutation; this._subscriptionType = config.subscription; // Provide specified directives (e.g. @include and @skip) by default. this._directives = (_config$directives = config.directives) !== null && _config$directives !== void 0 ? _config$directives : specifiedDirectives; // To preserve order of user-provided types, we add first to add them to // the set of "collected" types, so `collectReferencedTypes` ignore them. const allReferencedTypes = new Set(config.types); if (config.types != null) { for (const type of config.types) { // When we ready to process this type, we remove it from "collected" types // and then add it together with all dependent types in the correct position. allReferencedTypes.delete(type); collectReferencedTypes(type, allReferencedTypes); } } if (this._queryType != null) { collectReferencedTypes(this._queryType, allReferencedTypes); } if (this._mutationType != null) { collectReferencedTypes(this._mutationType, allReferencedTypes); } if (this._subscriptionType != null) { collectReferencedTypes(this._subscriptionType, allReferencedTypes); } for (const directive of this._directives) { // Directives are not validated until validateSchema() is called. if (isDirective(directive)) { for (const arg of directive.args) { collectReferencedTypes(arg.type, allReferencedTypes); } } } collectReferencedTypes(__Schema, allReferencedTypes); // Storing the resulting map for reference by the schema. this._typeMap = Object.create(null); this._subTypeMap = Object.create(null); // Keep track of all implementations by interface name. this._implementationsMap = Object.create(null); for (const namedType of allReferencedTypes) { if (namedType == null) { continue; } const typeName = namedType.name; typeName || (0,devAssert/* devAssert */.U)( false, 'One of the provided types for building the Schema is missing a name.', ); if (this._typeMap[typeName] !== undefined) { throw new Error( `Schema must contain uniquely named types but contains multiple types named "${typeName}".`, ); } this._typeMap[typeName] = namedType; if (isInterfaceType(namedType)) { // Store implementations by interface. for (const iface of namedType.getInterfaces()) { if (isInterfaceType(iface)) { let implementations = this._implementationsMap[iface.name]; if (implementations === undefined) { implementations = this._implementationsMap[iface.name] = { objects: [], interfaces: [], }; } implementations.interfaces.push(namedType); } } } else if (isObjectType(namedType)) { // Store implementations by objects. for (const iface of namedType.getInterfaces()) { if (isInterfaceType(iface)) { let implementations = this._implementationsMap[iface.name]; if (implementations === undefined) { implementations = this._implementationsMap[iface.name] = { objects: [], interfaces: [], }; } implementations.objects.push(namedType); } } } } } get [Symbol.toStringTag]() { return 'GraphQLSchema'; } getQueryType() { return this._queryType; } getMutationType() { return this._mutationType; } getSubscriptionType() { return this._subscriptionType; } getRootType(operation) { switch (operation) { case ast/* OperationTypeNode */.cE.QUERY: return this.getQueryType(); case ast/* OperationTypeNode */.cE.MUTATION: return this.getMutationType(); case ast/* OperationTypeNode */.cE.SUBSCRIPTION: return this.getSubscriptionType(); } } getTypeMap() { return this._typeMap; } getType(name) { return this.getTypeMap()[name]; } getPossibleTypes(abstractType) { return isUnionType(abstractType) ? abstractType.getTypes() : this.getImplementations(abstractType).objects; } getImplementations(interfaceType) { const implementations = this._implementationsMap[interfaceType.name]; return implementations !== null && implementations !== void 0 ? implementations : { objects: [], interfaces: [], }; } isSubType(abstractType, maybeSubType) { let map = this._subTypeMap[abstractType.name]; if (map === undefined) { map = Object.create(null); if (isUnionType(abstractType)) { for (const type of abstractType.getTypes()) { map[type.name] = true; } } else { const implementations = this.getImplementations(abstractType); for (const type of implementations.objects) { map[type.name] = true; } for (const type of implementations.interfaces) { map[type.name] = true; } } this._subTypeMap[abstractType.name] = map; } return map[maybeSubType.name] !== undefined; } getDirectives() { return this._directives; } getDirective(name) { return this.getDirectives().find((directive) => directive.name === name); } toConfig() { return { description: this.description, query: this.getQueryType(), mutation: this.getMutationType(), subscription: this.getSubscriptionType(), types: Object.values(this.getTypeMap()), directives: this.getDirectives(), extensions: this.extensions, astNode: this.astNode, extensionASTNodes: this.extensionASTNodes, assumeValid: this.__validationErrors !== undefined, }; } } function collectReferencedTypes(type, typeSet) { const namedType = getNamedType(type); if (!typeSet.has(namedType)) { typeSet.add(namedType); if (isUnionType(namedType)) { for (const memberType of namedType.getTypes()) { collectReferencedTypes(memberType, typeSet); } } else if (isObjectType(namedType) || isInterfaceType(namedType)) { for (const interfaceType of namedType.getInterfaces()) { collectReferencedTypes(interfaceType, typeSet); } for (const field of Object.values(namedType.getFields())) { collectReferencedTypes(field.type, typeSet); for (const arg of field.args) { collectReferencedTypes(arg.type, typeSet); } } } else if (isInputObjectType(namedType)) { for (const field of Object.values(namedType.getFields())) { collectReferencedTypes(field.type, typeSet); } } } return typeSet; } ;// ./node_modules/graphql/type/validate.mjs /** * Implements the "Type Validation" sub-sections of the specification's * "Type System" section. * * Validation runs synchronously, returning an array of encountered errors, or * an empty array if no errors were encountered and the Schema is valid. */ function validateSchema(schema) { // First check to ensure the provided value is in fact a GraphQLSchema. assertSchema(schema); // If this Schema has already been validated, return the previous results. if (schema.__validationErrors) { return schema.__validationErrors; } // Validate the schema, producing a list of errors. const context = new SchemaValidationContext(schema); validateRootTypes(context); validateDirectives(context); validateTypes(context); // Persist the results of validation before returning to ensure validation // does not run multiple times for this schema. const errors = context.getErrors(); schema.__validationErrors = errors; return errors; } /** * Utility function which asserts a schema is valid by throwing an error if * it is invalid. */ function assertValidSchema(schema) { const errors = validateSchema(schema); if (errors.length !== 0) { throw new Error(errors.map((error) => error.message).join('\n\n')); } } class SchemaValidationContext { constructor(schema) { this._errors = []; this.schema = schema; } reportError(message, nodes) { const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes; this._errors.push( new GraphQLError/* GraphQLError */.eO(message, { nodes: _nodes, }), ); } getErrors() { return this._errors; } } function validateRootTypes(context) { const schema = context.schema; const queryType = schema.getQueryType(); if (!queryType) { context.reportError('Query root type must be provided.', schema.astNode); } else if (!isObjectType(queryType)) { var _getOperationTypeNode; context.reportError( `Query root type must be Object type, it cannot be ${(0,inspect/* inspect */.N)( queryType, )}.`, (_getOperationTypeNode = getOperationTypeNode( schema, ast/* OperationTypeNode */.cE.QUERY, )) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode, ); } const mutationType = schema.getMutationType(); if (mutationType && !isObjectType(mutationType)) { var _getOperationTypeNode2; context.reportError( 'Mutation root type must be Object type if provided, it cannot be ' + `${(0,inspect/* inspect */.N)(mutationType)}.`, (_getOperationTypeNode2 = getOperationTypeNode( schema, ast/* OperationTypeNode */.cE.MUTATION, )) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode, ); } const subscriptionType = schema.getSubscriptionType(); if (subscriptionType && !isObjectType(subscriptionType)) { var _getOperationTypeNode3; context.reportError( 'Subscription root type must be Object type if provided, it cannot be ' + `${(0,inspect/* inspect */.N)(subscriptionType)}.`, (_getOperationTypeNode3 = getOperationTypeNode( schema, ast/* OperationTypeNode */.cE.SUBSCRIPTION, )) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode, ); } } function getOperationTypeNode(schema, operation) { var _flatMap$find; return (_flatMap$find = [schema.astNode, ...schema.extensionASTNodes] .flatMap( // FIXME: https://github.com/graphql/graphql-js/issues/2203 (schemaNode) => { var _schemaNode$operation; return ( /* c8 ignore next */ (_schemaNode$operation = schemaNode === null || schemaNode === void 0 ? void 0 : schemaNode.operationTypes) !== null && _schemaNode$operation !== void 0 ? _schemaNode$operation : [] ); }, ) .find((operationNode) => operationNode.operation === operation)) === null || _flatMap$find === void 0 ? void 0 : _flatMap$find.type; } function validateDirectives(context) { for (const directive of context.schema.getDirectives()) { // Ensure all directives are in fact GraphQL directives. if (!isDirective(directive)) { context.reportError( `Expected directive but got: ${(0,inspect/* inspect */.N)(directive)}.`, directive === null || directive === void 0 ? void 0 : directive.astNode, ); continue; } // Ensure they are named correctly. validateName(context, directive); if (directive.locations.length === 0) { context.reportError( `Directive @${directive.name} must include 1 or more locations.`, directive.astNode, ); } // Ensure the arguments are valid. for (const arg of directive.args) { // Ensure they are named correctly. validateName(context, arg); // Ensure the type is an input type. if (!isInputType(arg.type)) { context.reportError( `The type of @${directive.name}(${arg.name}:) must be Input Type ` + `but got: ${(0,inspect/* inspect */.N)(arg.type)}.`, arg.astNode, ); } if (isRequiredArgument(arg) && arg.deprecationReason != null) { var _arg$astNode; context.reportError( `Required argument @${directive.name}(${arg.name}:) cannot be deprecated.`, [ getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0 ? void 0 : _arg$astNode.type, ], ); } } } } function validateName(context, node) { // Ensure names are valid, however introspection types opt out. if (node.name.startsWith('__')) { context.reportError( `Name "${node.name}" must not begin with "__", which is reserved by GraphQL introspection.`, node.astNode, ); } } function validateTypes(context) { const validateInputObjectCircularRefs = createInputObjectCircularRefsValidator(context); const typeMap = context.schema.getTypeMap(); for (const type of Object.values(typeMap)) { // Ensure all provided types are in fact GraphQL type. if (!isNamedType(type)) { context.reportError( `Expected GraphQL named type but got: ${(0,inspect/* inspect */.N)(type)}.`, type.astNode, ); continue; } // Ensure it is named correctly (excluding introspection types). if (!isIntrospectionType(type)) { validateName(context, type); } if (isObjectType(type)) { // Ensure fields are valid validateFields(context, type); // Ensure objects implement the interfaces they claim to. validateInterfaces(context, type); } else if (isInterfaceType(type)) { // Ensure fields are valid. validateFields(context, type); // Ensure interfaces implement the interfaces they claim to. validateInterfaces(context, type); } else if (isUnionType(type)) { // Ensure Unions include valid member types. validateUnionMembers(context, type); } else if (isEnumType(type)) { // Ensure Enums have valid values. validateEnumValues(context, type); } else if (isInputObjectType(type)) { // Ensure Input Object fields are valid. validateInputFields(context, type); // Ensure Input Objects do not contain non-nullable circular references validateInputObjectCircularRefs(type); } } } function validateFields(context, type) { const fields = Object.values(type.getFields()); // Objects and Interfaces both must define one or more fields. if (fields.length === 0) { context.reportError(`Type ${type.name} must define one or more fields.`, [ type.astNode, ...type.extensionASTNodes, ]); } for (const field of fields) { // Ensure they are named correctly. validateName(context, field); // Ensure the type is an output type if (!isOutputType(field.type)) { var _field$astNode; context.reportError( `The type of ${type.name}.${field.name} must be Output Type ` + `but got: ${(0,inspect/* inspect */.N)(field.type)}.`, (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type, ); } // Ensure the arguments are valid for (const arg of field.args) { const argName = arg.name; // Ensure they are named correctly. validateName(context, arg); // Ensure the type is an input type if (!isInputType(arg.type)) { var _arg$astNode2; context.reportError( `The type of ${type.name}.${field.name}(${argName}:) must be Input ` + `Type but got: ${(0,inspect/* inspect */.N)(arg.type)}.`, (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type, ); } if (isRequiredArgument(arg) && arg.deprecationReason != null) { var _arg$astNode3; context.reportError( `Required argument ${type.name}.${field.name}(${argName}:) cannot be deprecated.`, [ getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0 ? void 0 : _arg$astNode3.type, ], ); } } } } function validateInterfaces(context, type) { const ifaceTypeNames = Object.create(null); for (const iface of type.getInterfaces()) { if (!isInterfaceType(iface)) { context.reportError( `Type ${(0,inspect/* inspect */.N)(type)} must only implement Interface types, ` + `it cannot implement ${(0,inspect/* inspect */.N)(iface)}.`, getAllImplementsInterfaceNodes(type, iface), ); continue; } if (type === iface) { context.reportError( `Type ${type.name} cannot implement itself because it would create a circular reference.`, getAllImplementsInterfaceNodes(type, iface), ); continue; } if (ifaceTypeNames[iface.name]) { context.reportError( `Type ${type.name} can only implement ${iface.name} once.`, getAllImplementsInterfaceNodes(type, iface), ); continue; } ifaceTypeNames[iface.name] = true; validateTypeImplementsAncestors(context, type, iface); validateTypeImplementsInterface(context, type, iface); } } function validateTypeImplementsInterface(context, type, iface) { const typeFieldMap = type.getFields(); // Assert each interface field is implemented. for (const ifaceField of Object.values(iface.getFields())) { const fieldName = ifaceField.name; const typeField = typeFieldMap[fieldName]; // Assert interface field exists on type. if (!typeField) { context.reportError( `Interface field ${iface.name}.${fieldName} expected but ${type.name} does not provide it.`, [ifaceField.astNode, type.astNode, ...type.extensionASTNodes], ); continue; } // Assert interface field type is satisfied by type field type, by being // a valid subtype. (covariant) if (!isTypeSubTypeOf(context.schema, typeField.type, ifaceField.type)) { var _ifaceField$astNode, _typeField$astNode; context.reportError( `Interface field ${iface.name}.${fieldName} expects type ` + `${(0,inspect/* inspect */.N)(ifaceField.type)} but ${type.name}.${fieldName} ` + `is type ${(0,inspect/* inspect */.N)(typeField.type)}.`, [ (_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode === void 0 ? void 0 : _ifaceField$astNode.type, (_typeField$astNode = typeField.astNode) === null || _typeField$astNode === void 0 ? void 0 : _typeField$astNode.type, ], ); } // Assert each interface field arg is implemented. for (const ifaceArg of ifaceField.args) { const argName = ifaceArg.name; const typeArg = typeField.args.find((arg) => arg.name === argName); // Assert interface field arg exists on object field. if (!typeArg) { context.reportError( `Interface field argument ${iface.name}.${fieldName}(${argName}:) expected but ${type.name}.${fieldName} does not provide it.`, [ifaceArg.astNode, typeField.astNode], ); continue; } // Assert interface field arg type matches object field arg type. // (invariant) // TODO: change to contravariant? if (!isEqualType(ifaceArg.type, typeArg.type)) { var _ifaceArg$astNode, _typeArg$astNode; context.reportError( `Interface field argument ${iface.name}.${fieldName}(${argName}:) ` + `expects type ${(0,inspect/* inspect */.N)(ifaceArg.type)} but ` + `${type.name}.${fieldName}(${argName}:) is type ` + `${(0,inspect/* inspect */.N)(typeArg.type)}.`, [ (_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode === void 0 ? void 0 : _ifaceArg$astNode.type, (_typeArg$astNode = typeArg.astNode) === null || _typeArg$astNode === void 0 ? void 0 : _typeArg$astNode.type, ], ); } // TODO: validate default values? } // Assert additional arguments must not be required. for (const typeArg of typeField.args) { const argName = typeArg.name; const ifaceArg = ifaceField.args.find((arg) => arg.name === argName); if (!ifaceArg && isRequiredArgument(typeArg)) { context.reportError( `Object field ${type.name}.${fieldName} includes required argument ${argName} that is missing from the Interface field ${iface.name}.${fieldName}.`, [typeArg.astNode, ifaceField.astNode], ); } } } } function validateTypeImplementsAncestors(context, type, iface) { const ifaceInterfaces = type.getInterfaces(); for (const transitive of iface.getInterfaces()) { if (!ifaceInterfaces.includes(transitive)) { context.reportError( transitive === type ? `Type ${type.name} cannot implement ${iface.name} because it would create a circular reference.` : `Type ${type.name} must implement ${transitive.name} because it is implemented by ${iface.name}.`, [ ...getAllImplementsInterfaceNodes(iface, transitive), ...getAllImplementsInterfaceNodes(type, iface), ], ); } } } function validateUnionMembers(context, union) { const memberTypes = union.getTypes(); if (memberTypes.length === 0) { context.reportError( `Union type ${union.name} must define one or more member types.`, [union.astNode, ...union.extensionASTNodes], ); } const includedTypeNames = Object.create(null); for (const memberType of memberTypes) { if (includedTypeNames[memberType.name]) { context.reportError( `Union type ${union.name} can only include type ${memberType.name} once.`, getUnionMemberTypeNodes(union, memberType.name), ); continue; } includedTypeNames[memberType.name] = true; if (!isObjectType(memberType)) { context.reportError( `Union type ${union.name} can only include Object types, ` + `it cannot include ${(0,inspect/* inspect */.N)(memberType)}.`, getUnionMemberTypeNodes(union, String(memberType)), ); } } } function validateEnumValues(context, enumType) { const enumValues = enumType.getValues(); if (enumValues.length === 0) { context.reportError( `Enum type ${enumType.name} must define one or more values.`, [enumType.astNode, ...enumType.extensionASTNodes], ); } for (const enumValue of enumValues) { // Ensure valid name. validateName(context, enumValue); } } function validateInputFields(context, inputObj) { const fields = Object.values(inputObj.getFields()); if (fields.length === 0) { context.reportError( `Input Object type ${inputObj.name} must define one or more fields.`, [inputObj.astNode, ...inputObj.extensionASTNodes], ); } // Ensure the arguments are valid for (const field of fields) { // Ensure they are named correctly. validateName(context, field); // Ensure the type is an input type if (!isInputType(field.type)) { var _field$astNode2; context.reportError( `The type of ${inputObj.name}.${field.name} must be Input Type ` + `but got: ${(0,inspect/* inspect */.N)(field.type)}.`, (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type, ); } if (isRequiredInputField(field) && field.deprecationReason != null) { var _field$astNode3; context.reportError( `Required input field ${inputObj.name}.${field.name} cannot be deprecated.`, [ getDeprecatedDirectiveNode(field.astNode), (_field$astNode3 = field.astNode) === null || _field$astNode3 === void 0 ? void 0 : _field$astNode3.type, ], ); } if (inputObj.isOneOf) { validateOneOfInputObjectField(inputObj, field, context); } } } function validateOneOfInputObjectField(type, field, context) { if (isNonNullType(field.type)) { var _field$astNode4; context.reportError( `OneOf input field ${type.name}.${field.name} must be nullable.`, (_field$astNode4 = field.astNode) === null || _field$astNode4 === void 0 ? void 0 : _field$astNode4.type, ); } if (field.defaultValue !== undefined) { context.reportError( `OneOf input field ${type.name}.${field.name} cannot have a default value.`, field.astNode, ); } } function createInputObjectCircularRefsValidator(context) { // Modified copy of algorithm from 'src/validation/rules/NoFragmentCycles.js'. // Tracks already visited types to maintain O(N) and to ensure that cycles // are not redundantly reported. const visitedTypes = Object.create(null); // Array of types nodes used to produce meaningful errors const fieldPath = []; // Position in the type path const fieldPathIndexByTypeName = Object.create(null); return detectCycleRecursive; // This does a straight-forward DFS to find cycles. // It does not terminate when a cycle was found but continues to explore // the graph to find all possible cycles. function detectCycleRecursive(inputObj) { if (visitedTypes[inputObj.name]) { return; } visitedTypes[inputObj.name] = true; fieldPathIndexByTypeName[inputObj.name] = fieldPath.length; const fields = Object.values(inputObj.getFields()); for (const field of fields) { if (isNonNullType(field.type) && isInputObjectType(field.type.ofType)) { const fieldType = field.type.ofType; const cycleIndex = fieldPathIndexByTypeName[fieldType.name]; fieldPath.push(field); if (cycleIndex === undefined) { detectCycleRecursive(fieldType); } else { const cyclePath = fieldPath.slice(cycleIndex); const pathStr = cyclePath.map((fieldObj) => fieldObj.name).join('.'); context.reportError( `Cannot reference Input Object "${fieldType.name}" within itself through a series of non-null fields: "${pathStr}".`, cyclePath.map((fieldObj) => fieldObj.astNode), ); } fieldPath.pop(); } } fieldPathIndexByTypeName[inputObj.name] = undefined; } } function getAllImplementsInterfaceNodes(type, iface) { const { astNode, extensionASTNodes } = type; const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203 return nodes .flatMap((typeNode) => { var _typeNode$interfaces; return ( /* c8 ignore next */ (_typeNode$interfaces = typeNode.interfaces) !== null && _typeNode$interfaces !== void 0 ? _typeNode$interfaces : [] ); }) .filter((ifaceNode) => ifaceNode.name.value === iface.name); } function getUnionMemberTypeNodes(union, typeName) { const { astNode, extensionASTNodes } = union; const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203 return nodes .flatMap((unionNode) => { var _unionNode$types; return ( /* c8 ignore next */ (_unionNode$types = unionNode.types) !== null && _unionNode$types !== void 0 ? _unionNode$types : [] ); }) .filter((typeNode) => typeNode.name.value === typeName); } function getDeprecatedDirectiveNode(definitionNode) { var _definitionNode$direc; return definitionNode === null || definitionNode === void 0 ? void 0 : (_definitionNode$direc = definitionNode.directives) === null || _definitionNode$direc === void 0 ? void 0 : _definitionNode$direc.find( (node) => node.name.value === GraphQLDeprecatedDirective.name, ); } // EXTERNAL MODULE: ./node_modules/graphql/language/visitor.mjs var language_visitor = __webpack_require__(11786); ;// ./node_modules/graphql/utilities/typeFromAST.mjs function typeFromAST(schema, typeNode) { switch (typeNode.kind) { case kinds/* Kind */.b.LIST_TYPE: { const innerType = typeFromAST(schema, typeNode.type); return innerType && new GraphQLList(innerType); } case kinds/* Kind */.b.NON_NULL_TYPE: { const innerType = typeFromAST(schema, typeNode.type); return innerType && new GraphQLNonNull(innerType); } case kinds/* Kind */.b.NAMED_TYPE: return schema.getType(typeNode.name.value); } } ;// ./node_modules/graphql/utilities/TypeInfo.mjs /** * TypeInfo is a utility class which, given a GraphQL schema, can keep track * of the current field and type definitions at any point in a GraphQL document * AST during a recursive descent by calling `enter(node)` and `leave(node)`. */ class TypeInfo { constructor( schema, /** * Initial type may be provided in rare cases to facilitate traversals * beginning somewhere other than documents. */ initialType, /** @deprecated will be removed in 17.0.0 */ getFieldDefFn, ) { this._schema = schema; this._typeStack = []; this._parentTypeStack = []; this._inputTypeStack = []; this._fieldDefStack = []; this._defaultValueStack = []; this._directive = null; this._argument = null; this._enumValue = null; this._getFieldDef = getFieldDefFn !== null && getFieldDefFn !== void 0 ? getFieldDefFn : getFieldDef; if (initialType) { if (isInputType(initialType)) { this._inputTypeStack.push(initialType); } if (isCompositeType(initialType)) { this._parentTypeStack.push(initialType); } if (isOutputType(initialType)) { this._typeStack.push(initialType); } } } get [Symbol.toStringTag]() { return 'TypeInfo'; } getType() { if (this._typeStack.length > 0) { return this._typeStack[this._typeStack.length - 1]; } } getParentType() { if (this._parentTypeStack.length > 0) { return this._parentTypeStack[this._parentTypeStack.length - 1]; } } getInputType() { if (this._inputTypeStack.length > 0) { return this._inputTypeStack[this._inputTypeStack.length - 1]; } } getParentInputType() { if (this._inputTypeStack.length > 1) { return this._inputTypeStack[this._inputTypeStack.length - 2]; } } getFieldDef() { if (this._fieldDefStack.length > 0) { return this._fieldDefStack[this._fieldDefStack.length - 1]; } } getDefaultValue() { if (this._defaultValueStack.length > 0) { return this._defaultValueStack[this._defaultValueStack.length - 1]; } } getDirective() { return this._directive; } getArgument() { return this._argument; } getEnumValue() { return this._enumValue; } enter(node) { const schema = this._schema; // Note: many of the types below are explicitly typed as "unknown" to drop // any assumptions of a valid schema to ensure runtime types are properly // checked before continuing since TypeInfo is used as part of validation // which occurs before guarantees of schema and document validity. switch (node.kind) { case kinds/* Kind */.b.SELECTION_SET: { const namedType = getNamedType(this.getType()); this._parentTypeStack.push( isCompositeType(namedType) ? namedType : undefined, ); break; } case kinds/* Kind */.b.FIELD: { const parentType = this.getParentType(); let fieldDef; let fieldType; if (parentType) { fieldDef = this._getFieldDef(schema, parentType, node); if (fieldDef) { fieldType = fieldDef.type; } } this._fieldDefStack.push(fieldDef); this._typeStack.push(isOutputType(fieldType) ? fieldType : undefined); break; } case kinds/* Kind */.b.DIRECTIVE: this._directive = schema.getDirective(node.name.value); break; case kinds/* Kind */.b.OPERATION_DEFINITION: { const rootType = schema.getRootType(node.operation); this._typeStack.push(isObjectType(rootType) ? rootType : undefined); break; } case kinds/* Kind */.b.INLINE_FRAGMENT: case kinds/* Kind */.b.FRAGMENT_DEFINITION: { const typeConditionAST = node.typeCondition; const outputType = typeConditionAST ? typeFromAST(schema, typeConditionAST) : getNamedType(this.getType()); this._typeStack.push(isOutputType(outputType) ? outputType : undefined); break; } case kinds/* Kind */.b.VARIABLE_DEFINITION: { const inputType = typeFromAST(schema, node.type); this._inputTypeStack.push( isInputType(inputType) ? inputType : undefined, ); break; } case kinds/* Kind */.b.ARGUMENT: { var _this$getDirective; let argDef; let argType; const fieldOrDirective = (_this$getDirective = this.getDirective()) !== null && _this$getDirective !== void 0 ? _this$getDirective : this.getFieldDef(); if (fieldOrDirective) { argDef = fieldOrDirective.args.find( (arg) => arg.name === node.name.value, ); if (argDef) { argType = argDef.type; } } this._argument = argDef; this._defaultValueStack.push(argDef ? argDef.defaultValue : undefined); this._inputTypeStack.push(isInputType(argType) ? argType : undefined); break; } case kinds/* Kind */.b.LIST: { const listType = getNullableType(this.getInputType()); const itemType = isListType(listType) ? listType.ofType : listType; // List positions never have a default value. this._defaultValueStack.push(undefined); this._inputTypeStack.push(isInputType(itemType) ? itemType : undefined); break; } case kinds/* Kind */.b.OBJECT_FIELD: { const objectType = getNamedType(this.getInputType()); let inputFieldType; let inputField; if (isInputObjectType(objectType)) { inputField = objectType.getFields()[node.name.value]; if (inputField) { inputFieldType = inputField.type; } } this._defaultValueStack.push( inputField ? inputField.defaultValue : undefined, ); this._inputTypeStack.push( isInputType(inputFieldType) ? inputFieldType : undefined, ); break; } case kinds/* Kind */.b.ENUM: { const enumType = getNamedType(this.getInputType()); let enumValue; if (isEnumType(enumType)) { enumValue = enumType.getValue(node.value); } this._enumValue = enumValue; break; } default: // Ignore other nodes } } leave(node) { switch (node.kind) { case kinds/* Kind */.b.SELECTION_SET: this._parentTypeStack.pop(); break; case kinds/* Kind */.b.FIELD: this._fieldDefStack.pop(); this._typeStack.pop(); break; case kinds/* Kind */.b.DIRECTIVE: this._directive = null; break; case kinds/* Kind */.b.OPERATION_DEFINITION: case kinds/* Kind */.b.INLINE_FRAGMENT: case kinds/* Kind */.b.FRAGMENT_DEFINITION: this._typeStack.pop(); break; case kinds/* Kind */.b.VARIABLE_DEFINITION: this._inputTypeStack.pop(); break; case kinds/* Kind */.b.ARGUMENT: this._argument = null; this._defaultValueStack.pop(); this._inputTypeStack.pop(); break; case kinds/* Kind */.b.LIST: case kinds/* Kind */.b.OBJECT_FIELD: this._defaultValueStack.pop(); this._inputTypeStack.pop(); break; case kinds/* Kind */.b.ENUM: this._enumValue = null; break; default: // Ignore other nodes } } } /** * Not exactly the same as the executor's definition of getFieldDef, in this * statically evaluated environment we do not always have an Object type, * and need to handle Interface and Union types. */ function getFieldDef(schema, parentType, fieldNode) { const name = fieldNode.name.value; if ( name === SchemaMetaFieldDef.name && schema.getQueryType() === parentType ) { return SchemaMetaFieldDef; } if (name === TypeMetaFieldDef.name && schema.getQueryType() === parentType) { return TypeMetaFieldDef; } if (name === TypeNameMetaFieldDef.name && isCompositeType(parentType)) { return TypeNameMetaFieldDef; } if (isObjectType(parentType) || isInterfaceType(parentType)) { return parentType.getFields()[name]; } } /** * Creates a new visitor instance which maintains a provided TypeInfo instance * along with visiting visitor. */ function visitWithTypeInfo(typeInfo, visitor) { return { enter(...args) { const node = args[0]; typeInfo.enter(node); const fn = (0,language_visitor/* getEnterLeaveForKind */.XO)(visitor, node.kind).enter; if (fn) { const result = fn.apply(visitor, args); if (result !== undefined) { typeInfo.leave(node); if ((0,ast/* isNode */.Ll)(result)) { typeInfo.enter(result); } } return result; } }, leave(...args) { const node = args[0]; const fn = (0,language_visitor/* getEnterLeaveForKind */.XO)(visitor, node.kind).leave; let result; if (fn) { result = fn.apply(visitor, args); } typeInfo.leave(node); return result; }, }; } // EXTERNAL MODULE: ./node_modules/graphql/language/predicates.mjs var predicates = __webpack_require__(48710); ;// ./node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs /** * Executable definitions * * A GraphQL document is only valid for execution if all definitions are either * operation or fragment definitions. * * See https://spec.graphql.org/draft/#sec-Executable-Definitions */ function ExecutableDefinitionsRule(context) { return { Document(node) { for (const definition of node.definitions) { if (!(0,predicates/* isExecutableDefinitionNode */._m)(definition)) { const defName = definition.kind === kinds/* Kind */.b.SCHEMA_DEFINITION || definition.kind === kinds/* Kind */.b.SCHEMA_EXTENSION ? 'schema' : '"' + definition.name.value + '"'; context.reportError( new GraphQLError/* GraphQLError */.eO(`The ${defName} definition is not executable.`, { nodes: definition, }), ); } } return false; }, }; } ;// ./node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs /** * Fields on correct type * * A GraphQL document is only valid if all fields selected are defined by the * parent type, or are an allowed meta field such as __typename. * * See https://spec.graphql.org/draft/#sec-Field-Selections */ function FieldsOnCorrectTypeRule(context) { return { Field(node) { const type = context.getParentType(); if (type) { const fieldDef = context.getFieldDef(); if (!fieldDef) { // This field doesn't exist, lets look for suggestions. const schema = context.getSchema(); const fieldName = node.name.value; // First determine if there are any suggested types to condition on. let suggestion = didYouMean( 'to use an inline fragment on', getSuggestedTypeNames(schema, type, fieldName), ); // If there are no suggested types, then perhaps this was a typo? if (suggestion === '') { suggestion = didYouMean(getSuggestedFieldNames(type, fieldName)); } // Report an error, including helpful suggestions. context.reportError( new GraphQLError/* GraphQLError */.eO( `Cannot query field "${fieldName}" on type "${type.name}".` + suggestion, { nodes: node, }, ), ); } } }, }; } /** * Go through all of the implementations of type, as well as the interfaces that * they implement. If any of those types include the provided field, suggest them, * sorted by how often the type is referenced. */ function getSuggestedTypeNames(schema, type, fieldName) { if (!isAbstractType(type)) { // Must be an Object type, which does not have possible fields. return []; } const suggestedTypes = new Set(); const usageCount = Object.create(null); for (const possibleType of schema.getPossibleTypes(type)) { if (!possibleType.getFields()[fieldName]) { continue; } // This object type defines this field. suggestedTypes.add(possibleType); usageCount[possibleType.name] = 1; for (const possibleInterface of possibleType.getInterfaces()) { var _usageCount$possibleI; if (!possibleInterface.getFields()[fieldName]) { continue; } // This interface type defines this field. suggestedTypes.add(possibleInterface); usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1; } } return [...suggestedTypes] .sort((typeA, typeB) => { // Suggest both interface and object types based on how common they are. const usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name]; if (usageCountDiff !== 0) { return usageCountDiff; } // Suggest super types first followed by subtypes if (isInterfaceType(typeA) && schema.isSubType(typeA, typeB)) { return -1; } if (isInterfaceType(typeB) && schema.isSubType(typeB, typeA)) { return 1; } return naturalCompare(typeA.name, typeB.name); }) .map((x) => x.name); } /** * For the field name provided, determine if there are any similar field names * that may be the result of a typo. */ function getSuggestedFieldNames(type, fieldName) { if (isObjectType(type) || isInterfaceType(type)) { const possibleFieldNames = Object.keys(type.getFields()); return suggestionList(fieldName, possibleFieldNames); } // Otherwise, must be a Union type, which does not define fields. return []; } ;// ./node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs /** * Fragments on composite type * * Fragments use a type condition to determine if they apply, since fragments * can only be spread into a composite type (object, interface, or union), the * type condition must also be a composite type. * * See https://spec.graphql.org/draft/#sec-Fragments-On-Composite-Types */ function FragmentsOnCompositeTypesRule(context) { return { InlineFragment(node) { const typeCondition = node.typeCondition; if (typeCondition) { const type = typeFromAST(context.getSchema(), typeCondition); if (type && !isCompositeType(type)) { const typeStr = (0,printer.print)(typeCondition); context.reportError( new GraphQLError/* GraphQLError */.eO( `Fragment cannot condition on non composite type "${typeStr}".`, { nodes: typeCondition, }, ), ); } } }, FragmentDefinition(node) { const type = typeFromAST(context.getSchema(), node.typeCondition); if (type && !isCompositeType(type)) { const typeStr = (0,printer.print)(node.typeCondition); context.reportError( new GraphQLError/* GraphQLError */.eO( `Fragment "${node.name.value}" cannot condition on non composite type "${typeStr}".`, { nodes: node.typeCondition, }, ), ); } }, }; } ;// ./node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs /** * Known argument names * * A GraphQL field is only valid if all supplied arguments are defined by * that field. * * See https://spec.graphql.org/draft/#sec-Argument-Names * See https://spec.graphql.org/draft/#sec-Directives-Are-In-Valid-Locations */ function KnownArgumentNamesRule(context) { return { // eslint-disable-next-line new-cap ...KnownArgumentNamesOnDirectivesRule(context), Argument(argNode) { const argDef = context.getArgument(); const fieldDef = context.getFieldDef(); const parentType = context.getParentType(); if (!argDef && fieldDef && parentType) { const argName = argNode.name.value; const knownArgsNames = fieldDef.args.map((arg) => arg.name); const suggestions = suggestionList(argName, knownArgsNames); context.reportError( new GraphQLError/* GraphQLError */.eO( `Unknown argument "${argName}" on field "${parentType.name}.${fieldDef.name}".` + didYouMean(suggestions), { nodes: argNode, }, ), ); } }, }; } /** * @internal */ function KnownArgumentNamesOnDirectivesRule(context) { const directiveArgs = Object.create(null); const schema = context.getSchema(); const definedDirectives = schema ? schema.getDirectives() : specifiedDirectives; for (const directive of definedDirectives) { directiveArgs[directive.name] = directive.args.map((arg) => arg.name); } const astDefinitions = context.getDocument().definitions; for (const def of astDefinitions) { if (def.kind === kinds/* Kind */.b.DIRECTIVE_DEFINITION) { var _def$arguments; // FIXME: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : []; directiveArgs[def.name.value] = argsNodes.map((arg) => arg.name.value); } } return { Directive(directiveNode) { const directiveName = directiveNode.name.value; const knownArgs = directiveArgs[directiveName]; if (directiveNode.arguments && knownArgs) { for (const argNode of directiveNode.arguments) { const argName = argNode.name.value; if (!knownArgs.includes(argName)) { const suggestions = suggestionList(argName, knownArgs); context.reportError( new GraphQLError/* GraphQLError */.eO( `Unknown argument "${argName}" on directive "@${directiveName}".` + didYouMean(suggestions), { nodes: argNode, }, ), ); } } } return false; }, }; } ;// ./node_modules/graphql/validation/rules/KnownDirectivesRule.mjs /** * Known directives * * A GraphQL document is only valid if all `@directives` are known by the * schema and legally positioned. * * See https://spec.graphql.org/draft/#sec-Directives-Are-Defined */ function KnownDirectivesRule(context) { const locationsMap = Object.create(null); const schema = context.getSchema(); const definedDirectives = schema ? schema.getDirectives() : specifiedDirectives; for (const directive of definedDirectives) { locationsMap[directive.name] = directive.locations; } const astDefinitions = context.getDocument().definitions; for (const def of astDefinitions) { if (def.kind === kinds/* Kind */.b.DIRECTIVE_DEFINITION) { locationsMap[def.name.value] = def.locations.map((name) => name.value); } } return { Directive(node, _key, _parent, _path, ancestors) { const name = node.name.value; const locations = locationsMap[name]; if (!locations) { context.reportError( new GraphQLError/* GraphQLError */.eO(`Unknown directive "@${name}".`, { nodes: node, }), ); return; } const candidateLocation = getDirectiveLocationForASTPath(ancestors); if (candidateLocation && !locations.includes(candidateLocation)) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Directive "@${name}" may not be used on ${candidateLocation}.`, { nodes: node, }, ), ); } }, }; } function getDirectiveLocationForASTPath(ancestors) { const appliedTo = ancestors[ancestors.length - 1]; 'kind' in appliedTo || (0,invariant/* invariant */.V)(false); switch (appliedTo.kind) { case kinds/* Kind */.b.OPERATION_DEFINITION: return getDirectiveLocationForOperation(appliedTo.operation); case kinds/* Kind */.b.FIELD: return directiveLocation/* DirectiveLocation */.H.FIELD; case kinds/* Kind */.b.FRAGMENT_SPREAD: return directiveLocation/* DirectiveLocation */.H.FRAGMENT_SPREAD; case kinds/* Kind */.b.INLINE_FRAGMENT: return directiveLocation/* DirectiveLocation */.H.INLINE_FRAGMENT; case kinds/* Kind */.b.FRAGMENT_DEFINITION: return directiveLocation/* DirectiveLocation */.H.FRAGMENT_DEFINITION; case kinds/* Kind */.b.VARIABLE_DEFINITION: return directiveLocation/* DirectiveLocation */.H.VARIABLE_DEFINITION; case kinds/* Kind */.b.SCHEMA_DEFINITION: case kinds/* Kind */.b.SCHEMA_EXTENSION: return directiveLocation/* DirectiveLocation */.H.SCHEMA; case kinds/* Kind */.b.SCALAR_TYPE_DEFINITION: case kinds/* Kind */.b.SCALAR_TYPE_EXTENSION: return directiveLocation/* DirectiveLocation */.H.SCALAR; case kinds/* Kind */.b.OBJECT_TYPE_DEFINITION: case kinds/* Kind */.b.OBJECT_TYPE_EXTENSION: return directiveLocation/* DirectiveLocation */.H.OBJECT; case kinds/* Kind */.b.FIELD_DEFINITION: return directiveLocation/* DirectiveLocation */.H.FIELD_DEFINITION; case kinds/* Kind */.b.INTERFACE_TYPE_DEFINITION: case kinds/* Kind */.b.INTERFACE_TYPE_EXTENSION: return directiveLocation/* DirectiveLocation */.H.INTERFACE; case kinds/* Kind */.b.UNION_TYPE_DEFINITION: case kinds/* Kind */.b.UNION_TYPE_EXTENSION: return directiveLocation/* DirectiveLocation */.H.UNION; case kinds/* Kind */.b.ENUM_TYPE_DEFINITION: case kinds/* Kind */.b.ENUM_TYPE_EXTENSION: return directiveLocation/* DirectiveLocation */.H.ENUM; case kinds/* Kind */.b.ENUM_VALUE_DEFINITION: return directiveLocation/* DirectiveLocation */.H.ENUM_VALUE; case kinds/* Kind */.b.INPUT_OBJECT_TYPE_DEFINITION: case kinds/* Kind */.b.INPUT_OBJECT_TYPE_EXTENSION: return directiveLocation/* DirectiveLocation */.H.INPUT_OBJECT; case kinds/* Kind */.b.INPUT_VALUE_DEFINITION: { const parentNode = ancestors[ancestors.length - 3]; 'kind' in parentNode || (0,invariant/* invariant */.V)(false); return parentNode.kind === kinds/* Kind */.b.INPUT_OBJECT_TYPE_DEFINITION ? directiveLocation/* DirectiveLocation */.H.INPUT_FIELD_DEFINITION : directiveLocation/* DirectiveLocation */.H.ARGUMENT_DEFINITION; } // Not reachable, all possible types have been considered. /* c8 ignore next */ default: false || (0,invariant/* invariant */.V)(false, 'Unexpected kind: ' + (0,inspect/* inspect */.N)(appliedTo.kind)); } } function getDirectiveLocationForOperation(operation) { switch (operation) { case ast/* OperationTypeNode */.cE.QUERY: return directiveLocation/* DirectiveLocation */.H.QUERY; case ast/* OperationTypeNode */.cE.MUTATION: return directiveLocation/* DirectiveLocation */.H.MUTATION; case ast/* OperationTypeNode */.cE.SUBSCRIPTION: return directiveLocation/* DirectiveLocation */.H.SUBSCRIPTION; } } ;// ./node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs /** * Known fragment names * * A GraphQL document is only valid if all `...Fragment` fragment spreads refer * to fragments defined in the same document. * * See https://spec.graphql.org/draft/#sec-Fragment-spread-target-defined */ function KnownFragmentNamesRule(context) { return { FragmentSpread(node) { const fragmentName = node.name.value; const fragment = context.getFragment(fragmentName); if (!fragment) { context.reportError( new GraphQLError/* GraphQLError */.eO(`Unknown fragment "${fragmentName}".`, { nodes: node.name, }), ); } }, }; } ;// ./node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs /** * Known type names * * A GraphQL document is only valid if referenced types (specifically * variable definitions and fragment conditions) are defined by the type schema. * * See https://spec.graphql.org/draft/#sec-Fragment-Spread-Type-Existence */ function KnownTypeNamesRule(context) { const schema = context.getSchema(); const existingTypesMap = schema ? schema.getTypeMap() : Object.create(null); const definedTypes = Object.create(null); for (const def of context.getDocument().definitions) { if ((0,predicates/* isTypeDefinitionNode */.a6)(def)) { definedTypes[def.name.value] = true; } } const typeNames = [ ...Object.keys(existingTypesMap), ...Object.keys(definedTypes), ]; return { NamedType(node, _1, parent, _2, ancestors) { const typeName = node.name.value; if (!existingTypesMap[typeName] && !definedTypes[typeName]) { var _ancestors$; const definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0 ? _ancestors$ : parent; const isSDL = definitionNode != null && isSDLNode(definitionNode); if (isSDL && standardTypeNames.includes(typeName)) { return; } const suggestedTypes = suggestionList( typeName, isSDL ? standardTypeNames.concat(typeNames) : typeNames, ); context.reportError( new GraphQLError/* GraphQLError */.eO( `Unknown type "${typeName}".` + didYouMean(suggestedTypes), { nodes: node, }, ), ); } }, }; } const standardTypeNames = [...specifiedScalarTypes, ...introspectionTypes].map( (type) => type.name, ); function isSDLNode(value) { return ( 'kind' in value && ((0,predicates/* isTypeSystemDefinitionNode */.xu)(value) || (0,predicates/* isTypeSystemExtensionNode */.fT)(value)) ); } ;// ./node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs /** * Lone anonymous operation * * A GraphQL document is only valid if when it contains an anonymous operation * (the query short-hand) that it contains only that one operation definition. * * See https://spec.graphql.org/draft/#sec-Lone-Anonymous-Operation */ function LoneAnonymousOperationRule(context) { let operationCount = 0; return { Document(node) { operationCount = node.definitions.filter( (definition) => definition.kind === kinds/* Kind */.b.OPERATION_DEFINITION, ).length; }, OperationDefinition(node) { if (!node.name && operationCount > 1) { context.reportError( new GraphQLError/* GraphQLError */.eO( 'This anonymous operation must be the only defined operation.', { nodes: node, }, ), ); } }, }; } ;// ./node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs /** * Lone Schema definition * * A GraphQL document is only valid if it contains only one schema definition. */ function LoneSchemaDefinitionRule(context) { var _ref, _ref2, _oldSchema$astNode; const oldSchema = context.getSchema(); const alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0 ? _oldSchema$astNode : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getQueryType()) !== null && _ref2 !== void 0 ? _ref2 : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getMutationType()) !== null && _ref !== void 0 ? _ref : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getSubscriptionType(); let schemaDefinitionsCount = 0; return { SchemaDefinition(node) { if (alreadyDefined) { context.reportError( new GraphQLError/* GraphQLError */.eO( 'Cannot define a new schema within a schema extension.', { nodes: node, }, ), ); return; } if (schemaDefinitionsCount > 0) { context.reportError( new GraphQLError/* GraphQLError */.eO('Must provide only one schema definition.', { nodes: node, }), ); } ++schemaDefinitionsCount; }, }; } ;// ./node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs const MAX_LISTS_DEPTH = 3; function MaxIntrospectionDepthRule(context) { /** * Counts the depth of list fields in "__Type" recursively and * returns `true` if the limit has been reached. */ function checkDepth(node, visitedFragments = Object.create(null), depth = 0) { if (node.kind === kinds/* Kind */.b.FRAGMENT_SPREAD) { const fragmentName = node.name.value; if (visitedFragments[fragmentName] === true) { // Fragment cycles are handled by `NoFragmentCyclesRule`. return false; } const fragment = context.getFragment(fragmentName); if (!fragment) { // Missing fragments checks are handled by `KnownFragmentNamesRule`. return false; } // Rather than following an immutable programming pattern which has // significant memory and garbage collection overhead, we've opted to // take a mutable approach for efficiency's sake. Importantly visiting a // fragment twice is fine, so long as you don't do one visit inside the // other. try { visitedFragments[fragmentName] = true; return checkDepth(fragment, visitedFragments, depth); } finally { visitedFragments[fragmentName] = undefined; } } if ( node.kind === kinds/* Kind */.b.FIELD && // check all introspection lists (node.name.value === 'fields' || node.name.value === 'interfaces' || node.name.value === 'possibleTypes' || node.name.value === 'inputFields') ) { // eslint-disable-next-line no-param-reassign depth++; if (depth >= MAX_LISTS_DEPTH) { return true; } } // handles fields and inline fragments if ('selectionSet' in node && node.selectionSet) { for (const child of node.selectionSet.selections) { if (checkDepth(child, visitedFragments, depth)) { return true; } } } return false; } return { Field(node) { if (node.name.value === '__schema' || node.name.value === '__type') { if (checkDepth(node)) { context.reportError( new GraphQLError/* GraphQLError */.eO('Maximum introspection depth exceeded', { nodes: [node], }), ); return false; } } }, }; } ;// ./node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs /** * No fragment cycles * * The graph of fragment spreads must not form any cycles including spreading itself. * Otherwise an operation could infinitely spread or infinitely execute on cycles in the underlying data. * * See https://spec.graphql.org/draft/#sec-Fragment-spreads-must-not-form-cycles */ function NoFragmentCyclesRule(context) { // Tracks already visited fragments to maintain O(N) and to ensure that cycles // are not redundantly reported. const visitedFrags = Object.create(null); // Array of AST nodes used to produce meaningful errors const spreadPath = []; // Position in the spread path const spreadPathIndexByName = Object.create(null); return { OperationDefinition: () => false, FragmentDefinition(node) { detectCycleRecursive(node); return false; }, }; // This does a straight-forward DFS to find cycles. // It does not terminate when a cycle was found but continues to explore // the graph to find all possible cycles. function detectCycleRecursive(fragment) { if (visitedFrags[fragment.name.value]) { return; } const fragmentName = fragment.name.value; visitedFrags[fragmentName] = true; const spreadNodes = context.getFragmentSpreads(fragment.selectionSet); if (spreadNodes.length === 0) { return; } spreadPathIndexByName[fragmentName] = spreadPath.length; for (const spreadNode of spreadNodes) { const spreadName = spreadNode.name.value; const cycleIndex = spreadPathIndexByName[spreadName]; spreadPath.push(spreadNode); if (cycleIndex === undefined) { const spreadFragment = context.getFragment(spreadName); if (spreadFragment) { detectCycleRecursive(spreadFragment); } } else { const cyclePath = spreadPath.slice(cycleIndex); const viaPath = cyclePath .slice(0, -1) .map((s) => '"' + s.name.value + '"') .join(', '); context.reportError( new GraphQLError/* GraphQLError */.eO( `Cannot spread fragment "${spreadName}" within itself` + (viaPath !== '' ? ` via ${viaPath}.` : '.'), { nodes: cyclePath, }, ), ); } spreadPath.pop(); } spreadPathIndexByName[fragmentName] = undefined; } } ;// ./node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs /** * No undefined variables * * A GraphQL operation is only valid if all variables encountered, both directly * and via fragment spreads, are defined by that operation. * * See https://spec.graphql.org/draft/#sec-All-Variable-Uses-Defined */ function NoUndefinedVariablesRule(context) { let variableNameDefined = Object.create(null); return { OperationDefinition: { enter() { variableNameDefined = Object.create(null); }, leave(operation) { const usages = context.getRecursiveVariableUsages(operation); for (const { node } of usages) { const varName = node.name.value; if (variableNameDefined[varName] !== true) { context.reportError( new GraphQLError/* GraphQLError */.eO( operation.name ? `Variable "$${varName}" is not defined by operation "${operation.name.value}".` : `Variable "$${varName}" is not defined.`, { nodes: [node, operation], }, ), ); } } }, }, VariableDefinition(node) { variableNameDefined[node.variable.name.value] = true; }, }; } ;// ./node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs /** * No unused fragments * * A GraphQL document is only valid if all fragment definitions are spread * within operations, or spread within other fragments spread within operations. * * See https://spec.graphql.org/draft/#sec-Fragments-Must-Be-Used */ function NoUnusedFragmentsRule(context) { const operationDefs = []; const fragmentDefs = []; return { OperationDefinition(node) { operationDefs.push(node); return false; }, FragmentDefinition(node) { fragmentDefs.push(node); return false; }, Document: { leave() { const fragmentNameUsed = Object.create(null); for (const operation of operationDefs) { for (const fragment of context.getRecursivelyReferencedFragments( operation, )) { fragmentNameUsed[fragment.name.value] = true; } } for (const fragmentDef of fragmentDefs) { const fragName = fragmentDef.name.value; if (fragmentNameUsed[fragName] !== true) { context.reportError( new GraphQLError/* GraphQLError */.eO(`Fragment "${fragName}" is never used.`, { nodes: fragmentDef, }), ); } } }, }, }; } ;// ./node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs /** * No unused variables * * A GraphQL operation is only valid if all variables defined by an operation * are used, either directly or within a spread fragment. * * See https://spec.graphql.org/draft/#sec-All-Variables-Used */ function NoUnusedVariablesRule(context) { let variableDefs = []; return { OperationDefinition: { enter() { variableDefs = []; }, leave(operation) { const variableNameUsed = Object.create(null); const usages = context.getRecursiveVariableUsages(operation); for (const { node } of usages) { variableNameUsed[node.name.value] = true; } for (const variableDef of variableDefs) { const variableName = variableDef.variable.name.value; if (variableNameUsed[variableName] !== true) { context.reportError( new GraphQLError/* GraphQLError */.eO( operation.name ? `Variable "$${variableName}" is never used in operation "${operation.name.value}".` : `Variable "$${variableName}" is never used.`, { nodes: variableDef, }, ), ); } } }, }, VariableDefinition(def) { variableDefs.push(def); }, }; } ;// ./node_modules/graphql/utilities/sortValueNode.mjs /** * Sort ValueNode. * * This function returns a sorted copy of the given ValueNode. * * @internal */ function sortValueNode(valueNode) { switch (valueNode.kind) { case kinds/* Kind */.b.OBJECT: return { ...valueNode, fields: sortFields(valueNode.fields) }; case kinds/* Kind */.b.LIST: return { ...valueNode, values: valueNode.values.map(sortValueNode) }; case kinds/* Kind */.b.INT: case kinds/* Kind */.b.FLOAT: case kinds/* Kind */.b.STRING: case kinds/* Kind */.b.BOOLEAN: case kinds/* Kind */.b.NULL: case kinds/* Kind */.b.ENUM: case kinds/* Kind */.b.VARIABLE: return valueNode; } } function sortFields(fields) { return fields .map((fieldNode) => ({ ...fieldNode, value: sortValueNode(fieldNode.value), })) .sort((fieldA, fieldB) => naturalCompare(fieldA.name.value, fieldB.name.value), ); } ;// ./node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs function reasonMessage(reason) { if (Array.isArray(reason)) { return reason .map( ([responseName, subReason]) => `subfields "${responseName}" conflict because ` + reasonMessage(subReason), ) .join(' and '); } return reason; } /** * Overlapping fields can be merged * * A selection set is only valid if all fields (including spreading any * fragments) either correspond to distinct response names or can be merged * without ambiguity. * * See https://spec.graphql.org/draft/#sec-Field-Selection-Merging */ function OverlappingFieldsCanBeMergedRule(context) { // A memoization for when fields and a fragment or two fragments are compared // "between" each other for conflicts. Comparisons made be made many times, // so memoizing this can dramatically improve the performance of this validator. const comparedFieldsAndFragmentPairs = new OrderedPairSet(); const comparedFragmentPairs = new PairSet(); // A cache for the "field map" and list of fragment names found in any given // selection set. Selection sets may be asked for this information multiple // times, so this improves the performance of this validator. const cachedFieldsAndFragmentNames = new Map(); return { SelectionSet(selectionSet) { const conflicts = findConflictsWithinSelectionSet( context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, context.getParentType(), selectionSet, ); for (const [[responseName, reason], fields1, fields2] of conflicts) { const reasonMsg = reasonMessage(reason); context.reportError( new GraphQLError/* GraphQLError */.eO( `Fields "${responseName}" conflict because ${reasonMsg}. Use different aliases on the fields to fetch both if this was intentional.`, { nodes: fields1.concat(fields2), }, ), ); } }, }; } /** * Algorithm: * * Conflicts occur when two fields exist in a query which will produce the same * response name, but represent differing values, thus creating a conflict. * The algorithm below finds all conflicts via making a series of comparisons * between fields. In order to compare as few fields as possible, this makes * a series of comparisons "within" sets of fields and "between" sets of fields. * * Given any selection set, a collection produces both a set of fields by * also including all inline fragments, as well as a list of fragments * referenced by fragment spreads. * * A) Each selection set represented in the document first compares "within" its * collected set of fields, finding any conflicts between every pair of * overlapping fields. * Note: This is the *only time* that a the fields "within" a set are compared * to each other. After this only fields "between" sets are compared. * * B) Also, if any fragment is referenced in a selection set, then a * comparison is made "between" the original set of fields and the * referenced fragment. * * C) Also, if multiple fragments are referenced, then comparisons * are made "between" each referenced fragment. * * D) When comparing "between" a set of fields and a referenced fragment, first * a comparison is made between each field in the original set of fields and * each field in the the referenced set of fields. * * E) Also, if any fragment is referenced in the referenced selection set, * then a comparison is made "between" the original set of fields and the * referenced fragment (recursively referring to step D). * * F) When comparing "between" two fragments, first a comparison is made between * each field in the first referenced set of fields and each field in the the * second referenced set of fields. * * G) Also, any fragments referenced by the first must be compared to the * second, and any fragments referenced by the second must be compared to the * first (recursively referring to step F). * * H) When comparing two fields, if both have selection sets, then a comparison * is made "between" both selection sets, first comparing the set of fields in * the first selection set with the set of fields in the second. * * I) Also, if any fragment is referenced in either selection set, then a * comparison is made "between" the other set of fields and the * referenced fragment. * * J) Also, if two fragments are referenced in both selection sets, then a * comparison is made "between" the two fragments. * */ // Find all conflicts found "within" a selection set, including those found // via spreading in fragments. Called when visiting each SelectionSet in the // GraphQL Document. function findConflictsWithinSelectionSet( context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, parentType, selectionSet, ) { const conflicts = []; const [fieldMap, fragmentNames] = getFieldsAndFragmentNames( context, cachedFieldsAndFragmentNames, parentType, selectionSet, ); // (A) Find find all conflicts "within" the fields of this selection set. // Note: this is the *only place* `collectConflictsWithin` is called. collectConflictsWithin( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, fieldMap, ); if (fragmentNames.length !== 0) { // (B) Then collect conflicts between these fields and those represented by // each spread fragment name found. for (let i = 0; i < fragmentNames.length; i++) { collectConflictsBetweenFieldsAndFragment( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, false, fieldMap, fragmentNames[i], ); // (C) Then compare this fragment with all other fragments found in this // selection set to collect conflicts between fragments spread together. // This compares each item in the list of fragment names to every other // item in that same list (except for itself). for (let j = i + 1; j < fragmentNames.length; j++) { collectConflictsBetweenFragments( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, false, fragmentNames[i], fragmentNames[j], ); } } } return conflicts; } // Collect all conflicts found between a set of fields and a fragment reference // including via spreading in any nested fragments. function collectConflictsBetweenFieldsAndFragment( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentName, ) { // Memoize so the fields and fragments are not compared for conflicts more // than once. if ( comparedFieldsAndFragmentPairs.has( fieldMap, fragmentName, areMutuallyExclusive, ) ) { return; } comparedFieldsAndFragmentPairs.add( fieldMap, fragmentName, areMutuallyExclusive, ); const fragment = context.getFragment(fragmentName); if (!fragment) { return; } const [fieldMap2, referencedFragmentNames] = getReferencedFieldsAndFragmentNames( context, cachedFieldsAndFragmentNames, fragment, ); // Do not compare a fragment's fieldMap to itself. if (fieldMap === fieldMap2) { return; } // (D) First collect any conflicts between the provided collection of fields // and the collection of fields represented by the given fragment. collectConflictsBetween( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fieldMap2, ); // (E) Then collect any conflicts between the provided collection of fields // and any fragment names found in the given fragment. for (const referencedFragmentName of referencedFragmentNames) { collectConflictsBetweenFieldsAndFragment( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap, referencedFragmentName, ); } } // Collect all conflicts found between two fragments, including via spreading in // any nested fragments. function collectConflictsBetweenFragments( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2, ) { // No need to compare a fragment to itself. if (fragmentName1 === fragmentName2) { return; } // Memoize so two fragments are not compared for conflicts more than once. if ( comparedFragmentPairs.has( fragmentName1, fragmentName2, areMutuallyExclusive, ) ) { return; } comparedFragmentPairs.add(fragmentName1, fragmentName2, areMutuallyExclusive); const fragment1 = context.getFragment(fragmentName1); const fragment2 = context.getFragment(fragmentName2); if (!fragment1 || !fragment2) { return; } const [fieldMap1, referencedFragmentNames1] = getReferencedFieldsAndFragmentNames( context, cachedFieldsAndFragmentNames, fragment1, ); const [fieldMap2, referencedFragmentNames2] = getReferencedFieldsAndFragmentNames( context, cachedFieldsAndFragmentNames, fragment2, ); // (F) First, collect all conflicts between these two collections of fields // (not including any nested fragments). collectConflictsBetween( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2, ); // (G) Then collect conflicts between the first fragment and any nested // fragments spread in the second fragment. for (const referencedFragmentName2 of referencedFragmentNames2) { collectConflictsBetweenFragments( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, referencedFragmentName2, ); } // (G) Then collect conflicts between the second fragment and any nested // fragments spread in the first fragment. for (const referencedFragmentName1 of referencedFragmentNames1) { collectConflictsBetweenFragments( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, referencedFragmentName1, fragmentName2, ); } } // Find all conflicts found between two selection sets, including those found // via spreading in fragments. Called when determining if conflicts exist // between the sub-fields of two overlapping fields. function findConflictsBetweenSubSelectionSets( context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, parentType1, selectionSet1, parentType2, selectionSet2, ) { const conflicts = []; const [fieldMap1, fragmentNames1] = getFieldsAndFragmentNames( context, cachedFieldsAndFragmentNames, parentType1, selectionSet1, ); const [fieldMap2, fragmentNames2] = getFieldsAndFragmentNames( context, cachedFieldsAndFragmentNames, parentType2, selectionSet2, ); // (H) First, collect all conflicts between these two collections of field. collectConflictsBetween( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2, ); // (I) Then collect conflicts between the first collection of fields and // those referenced by each fragment name associated with the second. for (const fragmentName2 of fragmentNames2) { collectConflictsBetweenFieldsAndFragment( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fragmentName2, ); } // (I) Then collect conflicts between the second collection of fields and // those referenced by each fragment name associated with the first. for (const fragmentName1 of fragmentNames1) { collectConflictsBetweenFieldsAndFragment( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fieldMap2, fragmentName1, ); } // (J) Also collect conflicts between any fragment names by the first and // fragment names by the second. This compares each item in the first set of // names to each item in the second set of names. for (const fragmentName1 of fragmentNames1) { for (const fragmentName2 of fragmentNames2) { collectConflictsBetweenFragments( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2, ); } } return conflicts; } // Collect all Conflicts "within" one collection of fields. function collectConflictsWithin( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, fieldMap, ) { // A field map is a keyed collection, where each key represents a response // name and the value at that key is a list of all fields which provide that // response name. For every response name, if there are multiple fields, they // must be compared to find a potential conflict. for (const [responseName, fields] of Object.entries(fieldMap)) { // This compares every field in the list to every other field in this list // (except to itself). If the list only has one item, nothing needs to // be compared. if (fields.length > 1) { for (let i = 0; i < fields.length; i++) { for (let j = i + 1; j < fields.length; j++) { const conflict = findConflict( context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, false, // within one collection is never mutually exclusive responseName, fields[i], fields[j], ); if (conflict) { conflicts.push(conflict); } } } } } } // Collect all Conflicts between two collections of fields. This is similar to, // but different from the `collectConflictsWithin` function above. This check // assumes that `collectConflictsWithin` has already been called on each // provided collection of fields. This is true because this validator traverses // each individual selection set. function collectConflictsBetween( context, conflicts, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2, ) { // A field map is a keyed collection, where each key represents a response // name and the value at that key is a list of all fields which provide that // response name. For any response name which appears in both provided field // maps, each field from the first field map must be compared to every field // in the second field map to find potential conflicts. for (const [responseName, fields1] of Object.entries(fieldMap1)) { const fields2 = fieldMap2[responseName]; if (fields2) { for (const field1 of fields1) { for (const field2 of fields2) { const conflict = findConflict( context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2, ); if (conflict) { conflicts.push(conflict); } } } } } } // Determines if there is a conflict between two particular fields, including // comparing their sub-fields. function findConflict( context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2, ) { const [parentType1, node1, def1] = field1; const [parentType2, node2, def2] = field2; // If it is known that two fields could not possibly apply at the same // time, due to the parent types, then it is safe to permit them to diverge // in aliased field or arguments used as they will not present any ambiguity // by differing. // It is known that two parent types could never overlap if they are // different Object types. Interface or Union types might overlap - if not // in the current state of the schema, then perhaps in some future version, // thus may not safely diverge. const areMutuallyExclusive = parentFieldsAreMutuallyExclusive || (parentType1 !== parentType2 && isObjectType(parentType1) && isObjectType(parentType2)); if (!areMutuallyExclusive) { // Two aliases must refer to the same field. const name1 = node1.name.value; const name2 = node2.name.value; if (name1 !== name2) { return [ [responseName, `"${name1}" and "${name2}" are different fields`], [node1], [node2], ]; } // Two field calls must have the same arguments. if (!sameArguments(node1, node2)) { return [ [responseName, 'they have differing arguments'], [node1], [node2], ]; } } // The return type for each field. const type1 = def1 === null || def1 === void 0 ? void 0 : def1.type; const type2 = def2 === null || def2 === void 0 ? void 0 : def2.type; if (type1 && type2 && doTypesConflict(type1, type2)) { return [ [ responseName, `they return conflicting types "${(0,inspect/* inspect */.N)(type1)}" and "${(0,inspect/* inspect */.N)( type2, )}"`, ], [node1], [node2], ]; } // Collect and compare sub-fields. Use the same "visited fragment names" list // for both collections so fields in a fragment reference are never // compared to themselves. const selectionSet1 = node1.selectionSet; const selectionSet2 = node2.selectionSet; if (selectionSet1 && selectionSet2) { const conflicts = findConflictsBetweenSubSelectionSets( context, cachedFieldsAndFragmentNames, comparedFieldsAndFragmentPairs, comparedFragmentPairs, areMutuallyExclusive, getNamedType(type1), selectionSet1, getNamedType(type2), selectionSet2, ); return subfieldConflicts(conflicts, responseName, node1, node2); } } function sameArguments(node1, node2) { const args1 = node1.arguments; const args2 = node2.arguments; if (args1 === undefined || args1.length === 0) { return args2 === undefined || args2.length === 0; } if (args2 === undefined || args2.length === 0) { return false; } /* c8 ignore next */ if (args1.length !== args2.length) { /* c8 ignore next */ return false; /* c8 ignore next */ } const values2 = new Map(args2.map(({ name, value }) => [name.value, value])); return args1.every((arg1) => { const value1 = arg1.value; const value2 = values2.get(arg1.name.value); if (value2 === undefined) { return false; } return stringifyValue(value1) === stringifyValue(value2); }); } function stringifyValue(value) { return (0,printer.print)(sortValueNode(value)); } // Two types conflict if both types could not apply to a value simultaneously. // Composite types are ignored as their individual field types will be compared // later recursively. However List and Non-Null types must match. function doTypesConflict(type1, type2) { if (isListType(type1)) { return isListType(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true; } if (isListType(type2)) { return true; } if (isNonNullType(type1)) { return isNonNullType(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true; } if (isNonNullType(type2)) { return true; } if (isLeafType(type1) || isLeafType(type2)) { return type1 !== type2; } return false; } // Given a selection set, return the collection of fields (a mapping of response // name to field nodes and definitions) as well as a list of fragment names // referenced via fragment spreads. function getFieldsAndFragmentNames( context, cachedFieldsAndFragmentNames, parentType, selectionSet, ) { const cached = cachedFieldsAndFragmentNames.get(selectionSet); if (cached) { return cached; } const nodeAndDefs = Object.create(null); const fragmentNames = Object.create(null); _collectFieldsAndFragmentNames( context, parentType, selectionSet, nodeAndDefs, fragmentNames, ); const result = [nodeAndDefs, Object.keys(fragmentNames)]; cachedFieldsAndFragmentNames.set(selectionSet, result); return result; } // Given a reference to a fragment, return the represented collection of fields // as well as a list of nested fragment names referenced via fragment spreads. function getReferencedFieldsAndFragmentNames( context, cachedFieldsAndFragmentNames, fragment, ) { // Short-circuit building a type from the node if possible. const cached = cachedFieldsAndFragmentNames.get(fragment.selectionSet); if (cached) { return cached; } const fragmentType = typeFromAST(context.getSchema(), fragment.typeCondition); return getFieldsAndFragmentNames( context, cachedFieldsAndFragmentNames, fragmentType, fragment.selectionSet, ); } function _collectFieldsAndFragmentNames( context, parentType, selectionSet, nodeAndDefs, fragmentNames, ) { for (const selection of selectionSet.selections) { switch (selection.kind) { case kinds/* Kind */.b.FIELD: { const fieldName = selection.name.value; let fieldDef; if (isObjectType(parentType) || isInterfaceType(parentType)) { fieldDef = parentType.getFields()[fieldName]; } const responseName = selection.alias ? selection.alias.value : fieldName; if (!nodeAndDefs[responseName]) { nodeAndDefs[responseName] = []; } nodeAndDefs[responseName].push([parentType, selection, fieldDef]); break; } case kinds/* Kind */.b.FRAGMENT_SPREAD: fragmentNames[selection.name.value] = true; break; case kinds/* Kind */.b.INLINE_FRAGMENT: { const typeCondition = selection.typeCondition; const inlineFragmentType = typeCondition ? typeFromAST(context.getSchema(), typeCondition) : parentType; _collectFieldsAndFragmentNames( context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames, ); break; } } } } // Given a series of Conflicts which occurred between two sub-fields, generate // a single Conflict. function subfieldConflicts(conflicts, responseName, node1, node2) { if (conflicts.length > 0) { return [ [responseName, conflicts.map(([reason]) => reason)], [node1, ...conflicts.map(([, fields1]) => fields1).flat()], [node2, ...conflicts.map(([, , fields2]) => fields2).flat()], ]; } } /** * A way to keep track of pairs of things where the ordering of the pair * matters. * * Provides a third argument for has/set to allow flagging the pair as * weakly or strongly present within the collection. */ class OrderedPairSet { constructor() { this._data = new Map(); } has(a, b, weaklyPresent) { var _this$_data$get; const result = (_this$_data$get = this._data.get(a)) === null || _this$_data$get === void 0 ? void 0 : _this$_data$get.get(b); if (result === undefined) { return false; } return weaklyPresent ? true : weaklyPresent === result; } add(a, b, weaklyPresent) { const map = this._data.get(a); if (map === undefined) { this._data.set(a, new Map([[b, weaklyPresent]])); } else { map.set(b, weaklyPresent); } } } /** * A way to keep track of pairs of similar things when the ordering of the pair * does not matter. */ class PairSet { constructor() { this._orderedPairSet = new OrderedPairSet(); } has(a, b, weaklyPresent) { return a < b ? this._orderedPairSet.has(a, b, weaklyPresent) : this._orderedPairSet.has(b, a, weaklyPresent); } add(a, b, weaklyPresent) { if (a < b) { this._orderedPairSet.add(a, b, weaklyPresent); } else { this._orderedPairSet.add(b, a, weaklyPresent); } } } ;// ./node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs /** * Possible fragment spread * * A fragment spread is only valid if the type condition could ever possibly * be true: if there is a non-empty intersection of the possible parent types, * and possible types which pass the type condition. */ function PossibleFragmentSpreadsRule(context) { return { InlineFragment(node) { const fragType = context.getType(); const parentType = context.getParentType(); if ( isCompositeType(fragType) && isCompositeType(parentType) && !doTypesOverlap(context.getSchema(), fragType, parentType) ) { const parentTypeStr = (0,inspect/* inspect */.N)(parentType); const fragTypeStr = (0,inspect/* inspect */.N)(fragType); context.reportError( new GraphQLError/* GraphQLError */.eO( `Fragment cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, { nodes: node, }, ), ); } }, FragmentSpread(node) { const fragName = node.name.value; const fragType = getFragmentType(context, fragName); const parentType = context.getParentType(); if ( fragType && parentType && !doTypesOverlap(context.getSchema(), fragType, parentType) ) { const parentTypeStr = (0,inspect/* inspect */.N)(parentType); const fragTypeStr = (0,inspect/* inspect */.N)(fragType); context.reportError( new GraphQLError/* GraphQLError */.eO( `Fragment "${fragName}" cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, { nodes: node, }, ), ); } }, }; } function getFragmentType(context, name) { const frag = context.getFragment(name); if (frag) { const type = typeFromAST(context.getSchema(), frag.typeCondition); if (isCompositeType(type)) { return type; } } } ;// ./node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs /** * Possible type extension * * A type extension is only valid if the type is defined and has the same kind. */ function PossibleTypeExtensionsRule(context) { const schema = context.getSchema(); const definedTypes = Object.create(null); for (const def of context.getDocument().definitions) { if ((0,predicates/* isTypeDefinitionNode */.a6)(def)) { definedTypes[def.name.value] = def; } } return { ScalarTypeExtension: checkExtension, ObjectTypeExtension: checkExtension, InterfaceTypeExtension: checkExtension, UnionTypeExtension: checkExtension, EnumTypeExtension: checkExtension, InputObjectTypeExtension: checkExtension, }; function checkExtension(node) { const typeName = node.name.value; const defNode = definedTypes[typeName]; const existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName); let expectedKind; if (defNode) { expectedKind = defKindToExtKind[defNode.kind]; } else if (existingType) { expectedKind = typeToExtKind(existingType); } if (expectedKind) { if (expectedKind !== node.kind) { const kindStr = extensionKindToTypeName(node.kind); context.reportError( new GraphQLError/* GraphQLError */.eO(`Cannot extend non-${kindStr} type "${typeName}".`, { nodes: defNode ? [defNode, node] : node, }), ); } } else { const allTypeNames = Object.keys({ ...definedTypes, ...(schema === null || schema === void 0 ? void 0 : schema.getTypeMap()), }); const suggestedTypes = suggestionList(typeName, allTypeNames); context.reportError( new GraphQLError/* GraphQLError */.eO( `Cannot extend type "${typeName}" because it is not defined.` + didYouMean(suggestedTypes), { nodes: node.name, }, ), ); } } } const defKindToExtKind = { [kinds/* Kind */.b.SCALAR_TYPE_DEFINITION]: kinds/* Kind */.b.SCALAR_TYPE_EXTENSION, [kinds/* Kind */.b.OBJECT_TYPE_DEFINITION]: kinds/* Kind */.b.OBJECT_TYPE_EXTENSION, [kinds/* Kind */.b.INTERFACE_TYPE_DEFINITION]: kinds/* Kind */.b.INTERFACE_TYPE_EXTENSION, [kinds/* Kind */.b.UNION_TYPE_DEFINITION]: kinds/* Kind */.b.UNION_TYPE_EXTENSION, [kinds/* Kind */.b.ENUM_TYPE_DEFINITION]: kinds/* Kind */.b.ENUM_TYPE_EXTENSION, [kinds/* Kind */.b.INPUT_OBJECT_TYPE_DEFINITION]: kinds/* Kind */.b.INPUT_OBJECT_TYPE_EXTENSION, }; function typeToExtKind(type) { if (isScalarType(type)) { return kinds/* Kind */.b.SCALAR_TYPE_EXTENSION; } if (isObjectType(type)) { return kinds/* Kind */.b.OBJECT_TYPE_EXTENSION; } if (isInterfaceType(type)) { return kinds/* Kind */.b.INTERFACE_TYPE_EXTENSION; } if (isUnionType(type)) { return kinds/* Kind */.b.UNION_TYPE_EXTENSION; } if (isEnumType(type)) { return kinds/* Kind */.b.ENUM_TYPE_EXTENSION; } if (isInputObjectType(type)) { return kinds/* Kind */.b.INPUT_OBJECT_TYPE_EXTENSION; } /* c8 ignore next 3 */ // Not reachable. All possible types have been considered false || (0,invariant/* invariant */.V)(false, 'Unexpected type: ' + (0,inspect/* inspect */.N)(type)); } function extensionKindToTypeName(kind) { switch (kind) { case kinds/* Kind */.b.SCALAR_TYPE_EXTENSION: return 'scalar'; case kinds/* Kind */.b.OBJECT_TYPE_EXTENSION: return 'object'; case kinds/* Kind */.b.INTERFACE_TYPE_EXTENSION: return 'interface'; case kinds/* Kind */.b.UNION_TYPE_EXTENSION: return 'union'; case kinds/* Kind */.b.ENUM_TYPE_EXTENSION: return 'enum'; case kinds/* Kind */.b.INPUT_OBJECT_TYPE_EXTENSION: return 'input object'; // Not reachable. All possible types have been considered /* c8 ignore next */ default: false || (0,invariant/* invariant */.V)(false, 'Unexpected kind: ' + (0,inspect/* inspect */.N)(kind)); } } ;// ./node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs /** * Provided required arguments * * A field or directive is only valid if all required (non-null without a * default value) field arguments have been provided. */ function ProvidedRequiredArgumentsRule(context) { return { // eslint-disable-next-line new-cap ...ProvidedRequiredArgumentsOnDirectivesRule(context), Field: { // Validate on leave to allow for deeper errors to appear first. leave(fieldNode) { var _fieldNode$arguments; const fieldDef = context.getFieldDef(); if (!fieldDef) { return false; } const providedArgs = new Set( // FIXME: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ (_fieldNode$arguments = fieldNode.arguments) === null || _fieldNode$arguments === void 0 ? void 0 : _fieldNode$arguments.map((arg) => arg.name.value), ); for (const argDef of fieldDef.args) { if (!providedArgs.has(argDef.name) && isRequiredArgument(argDef)) { const argTypeStr = (0,inspect/* inspect */.N)(argDef.type); context.reportError( new GraphQLError/* GraphQLError */.eO( `Field "${fieldDef.name}" argument "${argDef.name}" of type "${argTypeStr}" is required, but it was not provided.`, { nodes: fieldNode, }, ), ); } } }, }, }; } /** * @internal */ function ProvidedRequiredArgumentsOnDirectivesRule(context) { var _schema$getDirectives; const requiredArgsMap = Object.create(null); const schema = context.getSchema(); const definedDirectives = (_schema$getDirectives = schema === null || schema === void 0 ? void 0 : schema.getDirectives()) !== null && _schema$getDirectives !== void 0 ? _schema$getDirectives : specifiedDirectives; for (const directive of definedDirectives) { requiredArgsMap[directive.name] = keyMap( directive.args.filter(isRequiredArgument), (arg) => arg.name, ); } const astDefinitions = context.getDocument().definitions; for (const def of astDefinitions) { if (def.kind === kinds/* Kind */.b.DIRECTIVE_DEFINITION) { var _def$arguments; // FIXME: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : []; requiredArgsMap[def.name.value] = keyMap( argNodes.filter(isRequiredArgumentNode), (arg) => arg.name.value, ); } } return { Directive: { // Validate on leave to allow for deeper errors to appear first. leave(directiveNode) { const directiveName = directiveNode.name.value; const requiredArgs = requiredArgsMap[directiveName]; if (requiredArgs) { var _directiveNode$argume; // FIXME: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : []; const argNodeMap = new Set(argNodes.map((arg) => arg.name.value)); for (const [argName, argDef] of Object.entries(requiredArgs)) { if (!argNodeMap.has(argName)) { const argType = isType(argDef.type) ? (0,inspect/* inspect */.N)(argDef.type) : (0,printer.print)(argDef.type); context.reportError( new GraphQLError/* GraphQLError */.eO( `Directive "@${directiveName}" argument "${argName}" of type "${argType}" is required, but it was not provided.`, { nodes: directiveNode, }, ), ); } } } }, }, }; } function isRequiredArgumentNode(arg) { return arg.type.kind === kinds/* Kind */.b.NON_NULL_TYPE && arg.defaultValue == null; } ;// ./node_modules/graphql/validation/rules/ScalarLeafsRule.mjs /** * Scalar leafs * * A GraphQL document is valid only if all leaf fields (fields without * sub selections) are of scalar or enum types. */ function ScalarLeafsRule(context) { return { Field(node) { const type = context.getType(); const selectionSet = node.selectionSet; if (type) { if (isLeafType(getNamedType(type))) { if (selectionSet) { const fieldName = node.name.value; const typeStr = (0,inspect/* inspect */.N)(type); context.reportError( new GraphQLError/* GraphQLError */.eO( `Field "${fieldName}" must not have a selection since type "${typeStr}" has no subfields.`, { nodes: selectionSet, }, ), ); } } else if (!selectionSet) { const fieldName = node.name.value; const typeStr = (0,inspect/* inspect */.N)(type); context.reportError( new GraphQLError/* GraphQLError */.eO( `Field "${fieldName}" of type "${typeStr}" must have a selection of subfields. Did you mean "${fieldName} { ... }"?`, { nodes: node, }, ), ); } else if (selectionSet.selections.length === 0) { const fieldName = node.name.value; const typeStr = (0,inspect/* inspect */.N)(type); context.reportError( new GraphQLError/* GraphQLError */.eO( `Field "${fieldName}" of type "${typeStr}" must have at least one field selected.`, { nodes: node, }, ), ); } } }, }; } ;// ./node_modules/graphql/jsutils/printPathArray.mjs /** * Build a string describing the path. */ function printPathArray(path) { return path .map((key) => typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key, ) .join(''); } ;// ./node_modules/graphql/jsutils/Path.mjs /** * Given a Path and a key, return a new Path containing the new key. */ function addPath(prev, key, typename) { return { prev, key, typename, }; } /** * Given a Path, return an Array of the path keys. */ function pathToArray(path) { const flattened = []; let curr = path; while (curr) { flattened.push(curr.key); curr = curr.prev; } return flattened.reverse(); } ;// ./node_modules/graphql/utilities/coerceInputValue.mjs /** * Coerces a JavaScript value given a GraphQL Input Type. */ function coerceInputValue(inputValue, type, onError = defaultOnError) { return coerceInputValueImpl(inputValue, type, onError, undefined); } function defaultOnError(path, invalidValue, error) { let errorPrefix = 'Invalid value ' + (0,inspect/* inspect */.N)(invalidValue); if (path.length > 0) { errorPrefix += ` at "value${printPathArray(path)}"`; } error.message = errorPrefix + ': ' + error.message; throw error; } function coerceInputValueImpl(inputValue, type, onError, path) { if (isNonNullType(type)) { if (inputValue != null) { return coerceInputValueImpl(inputValue, type.ofType, onError, path); } onError( pathToArray(path), inputValue, new GraphQLError/* GraphQLError */.eO( `Expected non-nullable type "${(0,inspect/* inspect */.N)(type)}" not to be null.`, ), ); return; } if (inputValue == null) { // Explicitly return the value null. return null; } if (isListType(type)) { const itemType = type.ofType; if (isIterableObject(inputValue)) { return Array.from(inputValue, (itemValue, index) => { const itemPath = addPath(path, index, undefined); return coerceInputValueImpl(itemValue, itemType, onError, itemPath); }); } // Lists accept a non-list value as a list of one. return [coerceInputValueImpl(inputValue, itemType, onError, path)]; } if (isInputObjectType(type)) { if (!(0,isObjectLike/* isObjectLike */.Z)(inputValue) || Array.isArray(inputValue)) { onError( pathToArray(path), inputValue, new GraphQLError/* GraphQLError */.eO(`Expected type "${type.name}" to be an object.`), ); return; } const coercedValue = {}; const fieldDefs = type.getFields(); for (const field of Object.values(fieldDefs)) { const fieldValue = inputValue[field.name]; if (fieldValue === undefined) { if (field.defaultValue !== undefined) { coercedValue[field.name] = field.defaultValue; } else if (isNonNullType(field.type)) { const typeStr = (0,inspect/* inspect */.N)(field.type); onError( pathToArray(path), inputValue, new GraphQLError/* GraphQLError */.eO( `Field "${field.name}" of required type "${typeStr}" was not provided.`, ), ); } continue; } coercedValue[field.name] = coerceInputValueImpl( fieldValue, field.type, onError, addPath(path, field.name, type.name), ); } // Ensure every provided field is defined. for (const fieldName of Object.keys(inputValue)) { if (!fieldDefs[fieldName]) { const suggestions = suggestionList( fieldName, Object.keys(type.getFields()), ); onError( pathToArray(path), inputValue, new GraphQLError/* GraphQLError */.eO( `Field "${fieldName}" is not defined by type "${type.name}".` + didYouMean(suggestions), ), ); } } if (type.isOneOf) { const keys = Object.keys(coercedValue); if (keys.length !== 1) { onError( pathToArray(path), inputValue, new GraphQLError/* GraphQLError */.eO( `Exactly one key must be specified for OneOf type "${type.name}".`, ), ); } const key = keys[0]; const value = coercedValue[key]; if (value === null) { onError( pathToArray(path).concat(key), value, new GraphQLError/* GraphQLError */.eO(`Field "${key}" must be non-null.`), ); } } return coercedValue; } if (isLeafType(type)) { let parseResult; // Scalars and Enums determine if a input value is valid via parseValue(), // which can throw to indicate failure. If it throws, maintain a reference // to the original error. try { parseResult = type.parseValue(inputValue); } catch (error) { if (error instanceof GraphQLError/* GraphQLError */.eO) { onError(pathToArray(path), inputValue, error); } else { onError( pathToArray(path), inputValue, new GraphQLError/* GraphQLError */.eO(`Expected type "${type.name}". ` + error.message, { originalError: error, }), ); } return; } if (parseResult === undefined) { onError( pathToArray(path), inputValue, new GraphQLError/* GraphQLError */.eO(`Expected type "${type.name}".`), ); } return parseResult; } /* c8 ignore next 3 */ // Not reachable, all possible types have been considered. false || (0,invariant/* invariant */.V)(false, 'Unexpected input type: ' + (0,inspect/* inspect */.N)(type)); } ;// ./node_modules/graphql/utilities/valueFromAST.mjs /** * Produces a JavaScript value given a GraphQL Value AST. * * A GraphQL type must be provided, which will be used to interpret different * GraphQL Value literals. * * Returns `undefined` when the value could not be validly coerced according to * the provided type. * * | GraphQL Value | JSON Value | * | -------------------- | ------------- | * | Input Object | Object | * | List | Array | * | Boolean | Boolean | * | String | String | * | Int / Float | Number | * | Enum Value | Unknown | * | NullValue | null | * */ function valueFromAST(valueNode, type, variables) { if (!valueNode) { // When there is no node, then there is also no value. // Importantly, this is different from returning the value null. return; } if (valueNode.kind === kinds/* Kind */.b.VARIABLE) { const variableName = valueNode.name.value; if (variables == null || variables[variableName] === undefined) { // No valid return value. return; } const variableValue = variables[variableName]; if (variableValue === null && isNonNullType(type)) { return; // Invalid: intentionally return no value. } // Note: This does no further checking that this variable is correct. // This assumes that this query has been validated and the variable // usage here is of the correct type. return variableValue; } if (isNonNullType(type)) { if (valueNode.kind === kinds/* Kind */.b.NULL) { return; // Invalid: intentionally return no value. } return valueFromAST(valueNode, type.ofType, variables); } if (valueNode.kind === kinds/* Kind */.b.NULL) { // This is explicitly returning the value null. return null; } if (isListType(type)) { const itemType = type.ofType; if (valueNode.kind === kinds/* Kind */.b.LIST) { const coercedValues = []; for (const itemNode of valueNode.values) { if (isMissingVariable(itemNode, variables)) { // If an array contains a missing variable, it is either coerced to // null or if the item type is non-null, it considered invalid. if (isNonNullType(itemType)) { return; // Invalid: intentionally return no value. } coercedValues.push(null); } else { const itemValue = valueFromAST(itemNode, itemType, variables); if (itemValue === undefined) { return; // Invalid: intentionally return no value. } coercedValues.push(itemValue); } } return coercedValues; } const coercedValue = valueFromAST(valueNode, itemType, variables); if (coercedValue === undefined) { return; // Invalid: intentionally return no value. } return [coercedValue]; } if (isInputObjectType(type)) { if (valueNode.kind !== kinds/* Kind */.b.OBJECT) { return; // Invalid: intentionally return no value. } const coercedObj = Object.create(null); const fieldNodes = keyMap(valueNode.fields, (field) => field.name.value); for (const field of Object.values(type.getFields())) { const fieldNode = fieldNodes[field.name]; if (!fieldNode || isMissingVariable(fieldNode.value, variables)) { if (field.defaultValue !== undefined) { coercedObj[field.name] = field.defaultValue; } else if (isNonNullType(field.type)) { return; // Invalid: intentionally return no value. } continue; } const fieldValue = valueFromAST(fieldNode.value, field.type, variables); if (fieldValue === undefined) { return; // Invalid: intentionally return no value. } coercedObj[field.name] = fieldValue; } if (type.isOneOf) { const keys = Object.keys(coercedObj); if (keys.length !== 1) { return; // Invalid: not exactly one key, intentionally return no value. } if (coercedObj[keys[0]] === null) { return; // Invalid: value not non-null, intentionally return no value. } } return coercedObj; } if (isLeafType(type)) { // Scalars and Enums fulfill parsing a literal value via parseLiteral(). // Invalid values represent a failure to parse correctly, in which case // no value is returned. let result; try { result = type.parseLiteral(valueNode, variables); } catch (_error) { return; // Invalid: intentionally return no value. } if (result === undefined) { return; // Invalid: intentionally return no value. } return result; } /* c8 ignore next 3 */ // Not reachable, all possible input types have been considered. false || (0,invariant/* invariant */.V)(false, 'Unexpected input type: ' + (0,inspect/* inspect */.N)(type)); } // Returns true if the provided valueNode is a variable which is not defined // in the set of variables. function isMissingVariable(valueNode, variables) { return ( valueNode.kind === kinds/* Kind */.b.VARIABLE && (variables == null || variables[valueNode.name.value] === undefined) ); } ;// ./node_modules/graphql/execution/values.mjs /** * Prepares an object map of variableValues of the correct type based on the * provided variable definitions and arbitrary input. If the input cannot be * parsed to match the variable definitions, a GraphQLError will be thrown. * * Note: The returned value is a plain Object with a prototype, since it is * exposed to user code. Care should be taken to not pull values from the * Object prototype. */ function getVariableValues(schema, varDefNodes, inputs, options) { const errors = []; const maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors; try { const coerced = coerceVariableValues( schema, varDefNodes, inputs, (error) => { if (maxErrors != null && errors.length >= maxErrors) { throw new GraphQLError/* GraphQLError */.eO( 'Too many errors processing variables, error limit reached. Execution aborted.', ); } errors.push(error); }, ); if (errors.length === 0) { return { coerced, }; } } catch (error) { errors.push(error); } return { errors, }; } function coerceVariableValues(schema, varDefNodes, inputs, onError) { const coercedValues = {}; for (const varDefNode of varDefNodes) { const varName = varDefNode.variable.name.value; const varType = typeFromAST(schema, varDefNode.type); if (!isInputType(varType)) { // Must use input types for variables. This should be caught during // validation, however is checked again here for safety. const varTypeStr = (0,printer.print)(varDefNode.type); onError( new GraphQLError/* GraphQLError */.eO( `Variable "$${varName}" expected value of type "${varTypeStr}" which cannot be used as an input type.`, { nodes: varDefNode.type, }, ), ); continue; } if (!values_hasOwnProperty(inputs, varName)) { if (varDefNode.defaultValue) { coercedValues[varName] = valueFromAST(varDefNode.defaultValue, varType); } else if (isNonNullType(varType)) { const varTypeStr = (0,inspect/* inspect */.N)(varType); onError( new GraphQLError/* GraphQLError */.eO( `Variable "$${varName}" of required type "${varTypeStr}" was not provided.`, { nodes: varDefNode, }, ), ); } continue; } const value = inputs[varName]; if (value === null && isNonNullType(varType)) { const varTypeStr = (0,inspect/* inspect */.N)(varType); onError( new GraphQLError/* GraphQLError */.eO( `Variable "$${varName}" of non-null type "${varTypeStr}" must not be null.`, { nodes: varDefNode, }, ), ); continue; } coercedValues[varName] = coerceInputValue( value, varType, (path, invalidValue, error) => { let prefix = `Variable "$${varName}" got invalid value ` + (0,inspect/* inspect */.N)(invalidValue); if (path.length > 0) { prefix += ` at "${varName}${printPathArray(path)}"`; } onError( new GraphQLError/* GraphQLError */.eO(prefix + '; ' + error.message, { nodes: varDefNode, originalError: error, }), ); }, ); } return coercedValues; } /** * Prepares an object map of argument values given a list of argument * definitions and list of argument AST nodes. * * Note: The returned value is a plain Object with a prototype, since it is * exposed to user code. Care should be taken to not pull values from the * Object prototype. */ function getArgumentValues(def, node, variableValues) { var _node$arguments; const coercedValues = {}; // FIXME: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const argumentNodes = (_node$arguments = node.arguments) !== null && _node$arguments !== void 0 ? _node$arguments : []; const argNodeMap = keyMap(argumentNodes, (arg) => arg.name.value); for (const argDef of def.args) { const name = argDef.name; const argType = argDef.type; const argumentNode = argNodeMap[name]; if (!argumentNode) { if (argDef.defaultValue !== undefined) { coercedValues[name] = argDef.defaultValue; } else if (isNonNullType(argType)) { throw new GraphQLError/* GraphQLError */.eO( `Argument "${name}" of required type "${(0,inspect/* inspect */.N)(argType)}" ` + 'was not provided.', { nodes: node, }, ); } continue; } const valueNode = argumentNode.value; let isNull = valueNode.kind === kinds/* Kind */.b.NULL; if (valueNode.kind === kinds/* Kind */.b.VARIABLE) { const variableName = valueNode.name.value; if ( variableValues == null || !values_hasOwnProperty(variableValues, variableName) ) { if (argDef.defaultValue !== undefined) { coercedValues[name] = argDef.defaultValue; } else if (isNonNullType(argType)) { throw new GraphQLError/* GraphQLError */.eO( `Argument "${name}" of required type "${(0,inspect/* inspect */.N)(argType)}" ` + `was provided the variable "$${variableName}" which was not provided a runtime value.`, { nodes: valueNode, }, ); } continue; } isNull = variableValues[variableName] == null; } if (isNull && isNonNullType(argType)) { throw new GraphQLError/* GraphQLError */.eO( `Argument "${name}" of non-null type "${(0,inspect/* inspect */.N)(argType)}" ` + 'must not be null.', { nodes: valueNode, }, ); } const coercedValue = valueFromAST(valueNode, argType, variableValues); if (coercedValue === undefined) { // Note: ValuesOfCorrectTypeRule validation should catch this before // execution. This is a runtime check to ensure execution does not // continue with an invalid argument value. throw new GraphQLError/* GraphQLError */.eO( `Argument "${name}" has invalid value ${(0,printer.print)(valueNode)}.`, { nodes: valueNode, }, ); } coercedValues[name] = coercedValue; } return coercedValues; } /** * Prepares an object map of argument values given a directive definition * and a AST node which may contain directives. Optionally also accepts a map * of variable values. * * If the directive does not exist on the node, returns undefined. * * Note: The returned value is a plain Object with a prototype, since it is * exposed to user code. Care should be taken to not pull values from the * Object prototype. */ function getDirectiveValues(directiveDef, node, variableValues) { var _node$directives; const directiveNode = (_node$directives = node.directives) === null || _node$directives === void 0 ? void 0 : _node$directives.find( (directive) => directive.name.value === directiveDef.name, ); if (directiveNode) { return getArgumentValues(directiveDef, directiveNode, variableValues); } } function values_hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } ;// ./node_modules/graphql/execution/collectFields.mjs /** * Given a selectionSet, collects all of the fields and returns them. * * CollectFields requires the "runtime type" of an object. For a field that * returns an Interface or Union type, the "runtime type" will be the actual * object type returned by that field. * * @internal */ function collectFields( schema, fragments, variableValues, runtimeType, selectionSet, ) { const fields = new Map(); collectFieldsImpl( schema, fragments, variableValues, runtimeType, selectionSet, fields, new Set(), ); return fields; } /** * Given an array of field nodes, collects all of the subfields of the passed * in fields, and returns them at the end. * * CollectSubFields requires the "return type" of an object. For a field that * returns an Interface or Union type, the "return type" will be the actual * object type returned by that field. * * @internal */ function collectSubfields( schema, fragments, variableValues, returnType, fieldNodes, ) { const subFieldNodes = new Map(); const visitedFragmentNames = new Set(); for (const node of fieldNodes) { if (node.selectionSet) { collectFieldsImpl( schema, fragments, variableValues, returnType, node.selectionSet, subFieldNodes, visitedFragmentNames, ); } } return subFieldNodes; } function collectFieldsImpl( schema, fragments, variableValues, runtimeType, selectionSet, fields, visitedFragmentNames, ) { for (const selection of selectionSet.selections) { switch (selection.kind) { case kinds/* Kind */.b.FIELD: { if (!shouldIncludeNode(variableValues, selection)) { continue; } const name = getFieldEntryKey(selection); const fieldList = fields.get(name); if (fieldList !== undefined) { fieldList.push(selection); } else { fields.set(name, [selection]); } break; } case kinds/* Kind */.b.INLINE_FRAGMENT: { if ( !shouldIncludeNode(variableValues, selection) || !doesFragmentConditionMatch(schema, selection, runtimeType) ) { continue; } collectFieldsImpl( schema, fragments, variableValues, runtimeType, selection.selectionSet, fields, visitedFragmentNames, ); break; } case kinds/* Kind */.b.FRAGMENT_SPREAD: { const fragName = selection.name.value; if ( visitedFragmentNames.has(fragName) || !shouldIncludeNode(variableValues, selection) ) { continue; } visitedFragmentNames.add(fragName); const fragment = fragments[fragName]; if ( !fragment || !doesFragmentConditionMatch(schema, fragment, runtimeType) ) { continue; } collectFieldsImpl( schema, fragments, variableValues, runtimeType, fragment.selectionSet, fields, visitedFragmentNames, ); break; } } } } /** * Determines if a field should be included based on the `@include` and `@skip` * directives, where `@skip` has higher precedence than `@include`. */ function shouldIncludeNode(variableValues, node) { const skip = getDirectiveValues(GraphQLSkipDirective, node, variableValues); if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) { return false; } const include = getDirectiveValues( GraphQLIncludeDirective, node, variableValues, ); if ( (include === null || include === void 0 ? void 0 : include.if) === false ) { return false; } return true; } /** * Determines if a fragment is applicable to the given type. */ function doesFragmentConditionMatch(schema, fragment, type) { const typeConditionNode = fragment.typeCondition; if (!typeConditionNode) { return true; } const conditionalType = typeFromAST(schema, typeConditionNode); if (conditionalType === type) { return true; } if (isAbstractType(conditionalType)) { return schema.isSubType(conditionalType, type); } return false; } /** * Implements the logic to compute the key of a given field's entry */ function getFieldEntryKey(node) { return node.alias ? node.alias.value : node.name.value; } ;// ./node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs /** * Subscriptions must only include a non-introspection field. * * A GraphQL subscription is valid only if it contains a single root field and * that root field is not an introspection field. * * See https://spec.graphql.org/draft/#sec-Single-root-field */ function SingleFieldSubscriptionsRule(context) { return { OperationDefinition(node) { if (node.operation === 'subscription') { const schema = context.getSchema(); const subscriptionType = schema.getSubscriptionType(); if (subscriptionType) { const operationName = node.name ? node.name.value : null; const variableValues = Object.create(null); const document = context.getDocument(); const fragments = Object.create(null); for (const definition of document.definitions) { if (definition.kind === kinds/* Kind */.b.FRAGMENT_DEFINITION) { fragments[definition.name.value] = definition; } } const fields = collectFields( schema, fragments, variableValues, subscriptionType, node.selectionSet, ); if (fields.size > 1) { const fieldSelectionLists = [...fields.values()]; const extraFieldSelectionLists = fieldSelectionLists.slice(1); const extraFieldSelections = extraFieldSelectionLists.flat(); context.reportError( new GraphQLError/* GraphQLError */.eO( operationName != null ? `Subscription "${operationName}" must select only one top level field.` : 'Anonymous Subscription must select only one top level field.', { nodes: extraFieldSelections, }, ), ); } for (const fieldNodes of fields.values()) { const field = fieldNodes[0]; const fieldName = field.name.value; if (fieldName.startsWith('__')) { context.reportError( new GraphQLError/* GraphQLError */.eO( operationName != null ? `Subscription "${operationName}" must not select an introspection top level field.` : 'Anonymous Subscription must not select an introspection top level field.', { nodes: fieldNodes, }, ), ); } } } } }, }; } ;// ./node_modules/graphql/jsutils/groupBy.mjs /** * Groups array items into a Map, given a function to produce grouping key. */ function groupBy(list, keyFn) { const result = new Map(); for (const item of list) { const key = keyFn(item); const group = result.get(key); if (group === undefined) { result.set(key, [item]); } else { group.push(item); } } return result; } ;// ./node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs /** * Unique argument definition names * * A GraphQL Object or Interface type is only valid if all its fields have uniquely named arguments. * A GraphQL Directive is only valid if all its arguments are uniquely named. */ function UniqueArgumentDefinitionNamesRule(context) { return { DirectiveDefinition(directiveNode) { var _directiveNode$argume; // FIXME: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const argumentNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : []; return checkArgUniqueness(`@${directiveNode.name.value}`, argumentNodes); }, InterfaceTypeDefinition: checkArgUniquenessPerField, InterfaceTypeExtension: checkArgUniquenessPerField, ObjectTypeDefinition: checkArgUniquenessPerField, ObjectTypeExtension: checkArgUniquenessPerField, }; function checkArgUniquenessPerField(typeNode) { var _typeNode$fields; const typeName = typeNode.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const fieldNodes = (_typeNode$fields = typeNode.fields) !== null && _typeNode$fields !== void 0 ? _typeNode$fields : []; for (const fieldDef of fieldNodes) { var _fieldDef$arguments; const fieldName = fieldDef.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const argumentNodes = (_fieldDef$arguments = fieldDef.arguments) !== null && _fieldDef$arguments !== void 0 ? _fieldDef$arguments : []; checkArgUniqueness(`${typeName}.${fieldName}`, argumentNodes); } return false; } function checkArgUniqueness(parentName, argumentNodes) { const seenArgs = groupBy(argumentNodes, (arg) => arg.name.value); for (const [argName, argNodes] of seenArgs) { if (argNodes.length > 1) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Argument "${parentName}(${argName}:)" can only be defined once.`, { nodes: argNodes.map((node) => node.name), }, ), ); } } return false; } } ;// ./node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs /** * Unique argument names * * A GraphQL field or directive is only valid if all supplied arguments are * uniquely named. * * See https://spec.graphql.org/draft/#sec-Argument-Names */ function UniqueArgumentNamesRule(context) { return { Field: checkArgUniqueness, Directive: checkArgUniqueness, }; function checkArgUniqueness(parentNode) { var _parentNode$arguments; // FIXME: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const argumentNodes = (_parentNode$arguments = parentNode.arguments) !== null && _parentNode$arguments !== void 0 ? _parentNode$arguments : []; const seenArgs = groupBy(argumentNodes, (arg) => arg.name.value); for (const [argName, argNodes] of seenArgs) { if (argNodes.length > 1) { context.reportError( new GraphQLError/* GraphQLError */.eO( `There can be only one argument named "${argName}".`, { nodes: argNodes.map((node) => node.name), }, ), ); } } } } ;// ./node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs /** * Unique directive names * * A GraphQL document is only valid if all defined directives have unique names. */ function UniqueDirectiveNamesRule(context) { const knownDirectiveNames = Object.create(null); const schema = context.getSchema(); return { DirectiveDefinition(node) { const directiveName = node.name.value; if ( schema !== null && schema !== void 0 && schema.getDirective(directiveName) ) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Directive "@${directiveName}" already exists in the schema. It cannot be redefined.`, { nodes: node.name, }, ), ); return; } if (knownDirectiveNames[directiveName]) { context.reportError( new GraphQLError/* GraphQLError */.eO( `There can be only one directive named "@${directiveName}".`, { nodes: [knownDirectiveNames[directiveName], node.name], }, ), ); } else { knownDirectiveNames[directiveName] = node.name; } return false; }, }; } ;// ./node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs /** * Unique directive names per location * * A GraphQL document is only valid if all non-repeatable directives at * a given location are uniquely named. * * See https://spec.graphql.org/draft/#sec-Directives-Are-Unique-Per-Location */ function UniqueDirectivesPerLocationRule(context) { const uniqueDirectiveMap = Object.create(null); const schema = context.getSchema(); const definedDirectives = schema ? schema.getDirectives() : specifiedDirectives; for (const directive of definedDirectives) { uniqueDirectiveMap[directive.name] = !directive.isRepeatable; } const astDefinitions = context.getDocument().definitions; for (const def of astDefinitions) { if (def.kind === kinds/* Kind */.b.DIRECTIVE_DEFINITION) { uniqueDirectiveMap[def.name.value] = !def.repeatable; } } const schemaDirectives = Object.create(null); const typeDirectivesMap = Object.create(null); return { // Many different AST nodes may contain directives. Rather than listing // them all, just listen for entering any node, and check to see if it // defines any directives. enter(node) { if (!('directives' in node) || !node.directives) { return; } let seenDirectives; if ( node.kind === kinds/* Kind */.b.SCHEMA_DEFINITION || node.kind === kinds/* Kind */.b.SCHEMA_EXTENSION ) { seenDirectives = schemaDirectives; } else if ((0,predicates/* isTypeDefinitionNode */.a6)(node) || (0,predicates/* isTypeExtensionNode */.i7)(node)) { const typeName = node.name.value; seenDirectives = typeDirectivesMap[typeName]; if (seenDirectives === undefined) { typeDirectivesMap[typeName] = seenDirectives = Object.create(null); } } else { seenDirectives = Object.create(null); } for (const directive of node.directives) { const directiveName = directive.name.value; if (uniqueDirectiveMap[directiveName]) { if (seenDirectives[directiveName]) { context.reportError( new GraphQLError/* GraphQLError */.eO( `The directive "@${directiveName}" can only be used once at this location.`, { nodes: [seenDirectives[directiveName], directive], }, ), ); } else { seenDirectives[directiveName] = directive; } } } }, }; } ;// ./node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs /** * Unique enum value names * * A GraphQL enum type is only valid if all its values are uniquely named. */ function UniqueEnumValueNamesRule(context) { const schema = context.getSchema(); const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null); const knownValueNames = Object.create(null); return { EnumTypeDefinition: checkValueUniqueness, EnumTypeExtension: checkValueUniqueness, }; function checkValueUniqueness(node) { var _node$values; const typeName = node.name.value; if (!knownValueNames[typeName]) { knownValueNames[typeName] = Object.create(null); } // FIXME: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const valueNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : []; const valueNames = knownValueNames[typeName]; for (const valueDef of valueNodes) { const valueName = valueDef.name.value; const existingType = existingTypeMap[typeName]; if (isEnumType(existingType) && existingType.getValue(valueName)) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Enum value "${typeName}.${valueName}" already exists in the schema. It cannot also be defined in this type extension.`, { nodes: valueDef.name, }, ), ); } else if (valueNames[valueName]) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Enum value "${typeName}.${valueName}" can only be defined once.`, { nodes: [valueNames[valueName], valueDef.name], }, ), ); } else { valueNames[valueName] = valueDef.name; } } return false; } } ;// ./node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs /** * Unique field definition names * * A GraphQL complex type is only valid if all its fields are uniquely named. */ function UniqueFieldDefinitionNamesRule(context) { const schema = context.getSchema(); const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null); const knownFieldNames = Object.create(null); return { InputObjectTypeDefinition: checkFieldUniqueness, InputObjectTypeExtension: checkFieldUniqueness, InterfaceTypeDefinition: checkFieldUniqueness, InterfaceTypeExtension: checkFieldUniqueness, ObjectTypeDefinition: checkFieldUniqueness, ObjectTypeExtension: checkFieldUniqueness, }; function checkFieldUniqueness(node) { var _node$fields; const typeName = node.name.value; if (!knownFieldNames[typeName]) { knownFieldNames[typeName] = Object.create(null); } // FIXME: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const fieldNodes = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : []; const fieldNames = knownFieldNames[typeName]; for (const fieldDef of fieldNodes) { const fieldName = fieldDef.name.value; if (hasField(existingTypeMap[typeName], fieldName)) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Field "${typeName}.${fieldName}" already exists in the schema. It cannot also be defined in this type extension.`, { nodes: fieldDef.name, }, ), ); } else if (fieldNames[fieldName]) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Field "${typeName}.${fieldName}" can only be defined once.`, { nodes: [fieldNames[fieldName], fieldDef.name], }, ), ); } else { fieldNames[fieldName] = fieldDef.name; } } return false; } } function hasField(type, fieldName) { if (isObjectType(type) || isInterfaceType(type) || isInputObjectType(type)) { return type.getFields()[fieldName] != null; } return false; } ;// ./node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs /** * Unique fragment names * * A GraphQL document is only valid if all defined fragments have unique names. * * See https://spec.graphql.org/draft/#sec-Fragment-Name-Uniqueness */ function UniqueFragmentNamesRule(context) { const knownFragmentNames = Object.create(null); return { OperationDefinition: () => false, FragmentDefinition(node) { const fragmentName = node.name.value; if (knownFragmentNames[fragmentName]) { context.reportError( new GraphQLError/* GraphQLError */.eO( `There can be only one fragment named "${fragmentName}".`, { nodes: [knownFragmentNames[fragmentName], node.name], }, ), ); } else { knownFragmentNames[fragmentName] = node.name; } return false; }, }; } ;// ./node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs /** * Unique input field names * * A GraphQL input object value is only valid if all supplied fields are * uniquely named. * * See https://spec.graphql.org/draft/#sec-Input-Object-Field-Uniqueness */ function UniqueInputFieldNamesRule(context) { const knownNameStack = []; let knownNames = Object.create(null); return { ObjectValue: { enter() { knownNameStack.push(knownNames); knownNames = Object.create(null); }, leave() { const prevKnownNames = knownNameStack.pop(); prevKnownNames || (0,invariant/* invariant */.V)(false); knownNames = prevKnownNames; }, }, ObjectField(node) { const fieldName = node.name.value; if (knownNames[fieldName]) { context.reportError( new GraphQLError/* GraphQLError */.eO( `There can be only one input field named "${fieldName}".`, { nodes: [knownNames[fieldName], node.name], }, ), ); } else { knownNames[fieldName] = node.name; } }, }; } ;// ./node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs /** * Unique operation names * * A GraphQL document is only valid if all defined operations have unique names. * * See https://spec.graphql.org/draft/#sec-Operation-Name-Uniqueness */ function UniqueOperationNamesRule(context) { const knownOperationNames = Object.create(null); return { OperationDefinition(node) { const operationName = node.name; if (operationName) { if (knownOperationNames[operationName.value]) { context.reportError( new GraphQLError/* GraphQLError */.eO( `There can be only one operation named "${operationName.value}".`, { nodes: [ knownOperationNames[operationName.value], operationName, ], }, ), ); } else { knownOperationNames[operationName.value] = operationName; } } return false; }, FragmentDefinition: () => false, }; } ;// ./node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs /** * Unique operation types * * A GraphQL document is only valid if it has only one type per operation. */ function UniqueOperationTypesRule(context) { const schema = context.getSchema(); const definedOperationTypes = Object.create(null); const existingOperationTypes = schema ? { query: schema.getQueryType(), mutation: schema.getMutationType(), subscription: schema.getSubscriptionType(), } : {}; return { SchemaDefinition: checkOperationTypes, SchemaExtension: checkOperationTypes, }; function checkOperationTypes(node) { var _node$operationTypes; // See: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : []; for (const operationType of operationTypesNodes) { const operation = operationType.operation; const alreadyDefinedOperationType = definedOperationTypes[operation]; if (existingOperationTypes[operation]) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Type for ${operation} already defined in the schema. It cannot be redefined.`, { nodes: operationType, }, ), ); } else if (alreadyDefinedOperationType) { context.reportError( new GraphQLError/* GraphQLError */.eO( `There can be only one ${operation} type in schema.`, { nodes: [alreadyDefinedOperationType, operationType], }, ), ); } else { definedOperationTypes[operation] = operationType; } } return false; } } ;// ./node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs /** * Unique type names * * A GraphQL document is only valid if all defined types have unique names. */ function UniqueTypeNamesRule(context) { const knownTypeNames = Object.create(null); const schema = context.getSchema(); return { ScalarTypeDefinition: checkTypeName, ObjectTypeDefinition: checkTypeName, InterfaceTypeDefinition: checkTypeName, UnionTypeDefinition: checkTypeName, EnumTypeDefinition: checkTypeName, InputObjectTypeDefinition: checkTypeName, }; function checkTypeName(node) { const typeName = node.name.value; if (schema !== null && schema !== void 0 && schema.getType(typeName)) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Type "${typeName}" already exists in the schema. It cannot also be defined in this type definition.`, { nodes: node.name, }, ), ); return; } if (knownTypeNames[typeName]) { context.reportError( new GraphQLError/* GraphQLError */.eO(`There can be only one type named "${typeName}".`, { nodes: [knownTypeNames[typeName], node.name], }), ); } else { knownTypeNames[typeName] = node.name; } return false; } } ;// ./node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs /** * Unique variable names * * A GraphQL operation is only valid if all its variables are uniquely named. */ function UniqueVariableNamesRule(context) { return { OperationDefinition(operationNode) { var _operationNode$variab; // See: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const variableDefinitions = (_operationNode$variab = operationNode.variableDefinitions) !== null && _operationNode$variab !== void 0 ? _operationNode$variab : []; const seenVariableDefinitions = groupBy( variableDefinitions, (node) => node.variable.name.value, ); for (const [variableName, variableNodes] of seenVariableDefinitions) { if (variableNodes.length > 1) { context.reportError( new GraphQLError/* GraphQLError */.eO( `There can be only one variable named "$${variableName}".`, { nodes: variableNodes.map((node) => node.variable.name), }, ), ); } } }, }; } ;// ./node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs /** * Value literals of correct type * * A GraphQL document is only valid if all value literals are of the type * expected at their position. * * See https://spec.graphql.org/draft/#sec-Values-of-Correct-Type */ function ValuesOfCorrectTypeRule(context) { let variableDefinitions = {}; return { OperationDefinition: { enter() { variableDefinitions = {}; }, }, VariableDefinition(definition) { variableDefinitions[definition.variable.name.value] = definition; }, ListValue(node) { // Note: TypeInfo will traverse into a list's item type, so look to the // parent input type to check if it is a list. const type = getNullableType(context.getParentInputType()); if (!isListType(type)) { isValidValueNode(context, node); return false; // Don't traverse further. } }, ObjectValue(node) { const type = getNamedType(context.getInputType()); if (!isInputObjectType(type)) { isValidValueNode(context, node); return false; // Don't traverse further. } // Ensure every required field exists. const fieldNodeMap = keyMap(node.fields, (field) => field.name.value); for (const fieldDef of Object.values(type.getFields())) { const fieldNode = fieldNodeMap[fieldDef.name]; if (!fieldNode && isRequiredInputField(fieldDef)) { const typeStr = (0,inspect/* inspect */.N)(fieldDef.type); context.reportError( new GraphQLError/* GraphQLError */.eO( `Field "${type.name}.${fieldDef.name}" of required type "${typeStr}" was not provided.`, { nodes: node, }, ), ); } } if (type.isOneOf) { validateOneOfInputObject( context, node, type, fieldNodeMap, variableDefinitions, ); } }, ObjectField(node) { const parentType = getNamedType(context.getParentInputType()); const fieldType = context.getInputType(); if (!fieldType && isInputObjectType(parentType)) { const suggestions = suggestionList( node.name.value, Object.keys(parentType.getFields()), ); context.reportError( new GraphQLError/* GraphQLError */.eO( `Field "${node.name.value}" is not defined by type "${parentType.name}".` + didYouMean(suggestions), { nodes: node, }, ), ); } }, NullValue(node) { const type = context.getInputType(); if (isNonNullType(type)) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Expected value of type "${(0,inspect/* inspect */.N)(type)}", found ${(0,printer.print)(node)}.`, { nodes: node, }, ), ); } }, EnumValue: (node) => isValidValueNode(context, node), IntValue: (node) => isValidValueNode(context, node), FloatValue: (node) => isValidValueNode(context, node), StringValue: (node) => isValidValueNode(context, node), BooleanValue: (node) => isValidValueNode(context, node), }; } /** * Any value literal may be a valid representation of a Scalar, depending on * that scalar type. */ function isValidValueNode(context, node) { // Report any error at the full type expected by the location. const locationType = context.getInputType(); if (!locationType) { return; } const type = getNamedType(locationType); if (!isLeafType(type)) { const typeStr = (0,inspect/* inspect */.N)(locationType); context.reportError( new GraphQLError/* GraphQLError */.eO( `Expected value of type "${typeStr}", found ${(0,printer.print)(node)}.`, { nodes: node, }, ), ); return; } // Scalars and Enums determine if a literal value is valid via parseLiteral(), // which may throw or return an invalid value to indicate failure. try { const parseResult = type.parseLiteral( node, undefined, /* variables */ ); if (parseResult === undefined) { const typeStr = (0,inspect/* inspect */.N)(locationType); context.reportError( new GraphQLError/* GraphQLError */.eO( `Expected value of type "${typeStr}", found ${(0,printer.print)(node)}.`, { nodes: node, }, ), ); } } catch (error) { const typeStr = (0,inspect/* inspect */.N)(locationType); if (error instanceof GraphQLError/* GraphQLError */.eO) { context.reportError(error); } else { context.reportError( new GraphQLError/* GraphQLError */.eO( `Expected value of type "${typeStr}", found ${(0,printer.print)(node)}; ` + error.message, { nodes: node, originalError: error, }, ), ); } } } function validateOneOfInputObject( context, node, type, fieldNodeMap, variableDefinitions, ) { var _fieldNodeMap$keys$; const keys = Object.keys(fieldNodeMap); const isNotExactlyOneField = keys.length !== 1; if (isNotExactlyOneField) { context.reportError( new GraphQLError/* GraphQLError */.eO( `OneOf Input Object "${type.name}" must specify exactly one key.`, { nodes: [node], }, ), ); return; } const value = (_fieldNodeMap$keys$ = fieldNodeMap[keys[0]]) === null || _fieldNodeMap$keys$ === void 0 ? void 0 : _fieldNodeMap$keys$.value; const isNullLiteral = !value || value.kind === kinds/* Kind */.b.NULL; const isVariable = (value === null || value === void 0 ? void 0 : value.kind) === kinds/* Kind */.b.VARIABLE; if (isNullLiteral) { context.reportError( new GraphQLError/* GraphQLError */.eO(`Field "${type.name}.${keys[0]}" must be non-null.`, { nodes: [node], }), ); return; } if (isVariable) { const variableName = value.name.value; const definition = variableDefinitions[variableName]; const isNullableVariable = definition.type.kind !== kinds/* Kind */.b.NON_NULL_TYPE; if (isNullableVariable) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Variable "${variableName}" must be non-nullable to be used for OneOf Input Object "${type.name}".`, { nodes: [node], }, ), ); } } } ;// ./node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs /** * Variables are input types * * A GraphQL operation is only valid if all the variables it defines are of * input types (scalar, enum, or input object). * * See https://spec.graphql.org/draft/#sec-Variables-Are-Input-Types */ function VariablesAreInputTypesRule(context) { return { VariableDefinition(node) { const type = typeFromAST(context.getSchema(), node.type); if (type !== undefined && !isInputType(type)) { const variableName = node.variable.name.value; const typeName = (0,printer.print)(node.type); context.reportError( new GraphQLError/* GraphQLError */.eO( `Variable "$${variableName}" cannot be non-input type "${typeName}".`, { nodes: node.type, }, ), ); } }, }; } ;// ./node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs /** * Variables in allowed position * * Variable usages must be compatible with the arguments they are passed to. * * See https://spec.graphql.org/draft/#sec-All-Variable-Usages-are-Allowed */ function VariablesInAllowedPositionRule(context) { let varDefMap = Object.create(null); return { OperationDefinition: { enter() { varDefMap = Object.create(null); }, leave(operation) { const usages = context.getRecursiveVariableUsages(operation); for (const { node, type, defaultValue, parentType } of usages) { const varName = node.name.value; const varDef = varDefMap[varName]; if (varDef && type) { // A var type is allowed if it is the same or more strict (e.g. is // a subtype of) than the expected type. It can be more strict if // the variable type is non-null when the expected type is nullable. // If both are list types, the variable item type can be more strict // than the expected item type (contravariant). const schema = context.getSchema(); const varType = typeFromAST(schema, varDef.type); if ( varType && !allowedVariableUsage( schema, varType, varDef.defaultValue, type, defaultValue, ) ) { const varTypeStr = (0,inspect/* inspect */.N)(varType); const typeStr = (0,inspect/* inspect */.N)(type); context.reportError( new GraphQLError/* GraphQLError */.eO( `Variable "$${varName}" of type "${varTypeStr}" used in position expecting type "${typeStr}".`, { nodes: [varDef, node], }, ), ); } if ( isInputObjectType(parentType) && parentType.isOneOf && isNullableType(varType) ) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Variable "$${varName}" is of type "${varType}" but must be non-nullable to be used for OneOf Input Object "${parentType}".`, { nodes: [varDef, node], }, ), ); } } } }, }, VariableDefinition(node) { varDefMap[node.variable.name.value] = node; }, }; } /** * Returns true if the variable is allowed in the location it was found, * which includes considering if default values exist for either the variable * or the location at which it is located. */ function allowedVariableUsage( schema, varType, varDefaultValue, locationType, locationDefaultValue, ) { if (isNonNullType(locationType) && !isNonNullType(varType)) { const hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== kinds/* Kind */.b.NULL; const hasLocationDefaultValue = locationDefaultValue !== undefined; if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) { return false; } const nullableLocationType = locationType.ofType; return isTypeSubTypeOf(schema, varType, nullableLocationType); } return isTypeSubTypeOf(schema, varType, locationType); } ;// ./node_modules/graphql/validation/specifiedRules.mjs // Spec Section: "Executable Definitions" // Spec Section: "Field Selections on Objects, Interfaces, and Unions Types" // Spec Section: "Fragments on Composite Types" // Spec Section: "Argument Names" // Spec Section: "Directives Are Defined" // Spec Section: "Fragment spread target defined" // Spec Section: "Fragment Spread Type Existence" // Spec Section: "Lone Anonymous Operation" // SDL-specific validation rules // TODO: Spec Section // Spec Section: "Fragments must not form cycles" // Spec Section: "All Variable Used Defined" // Spec Section: "Fragments must be used" // Spec Section: "All Variables Used" // Spec Section: "Field Selection Merging" // Spec Section: "Fragment spread is possible" // Spec Section: "Argument Optionality" // Spec Section: "Leaf Field Selections" // Spec Section: "Subscriptions with Single Root Field" // Spec Section: "Argument Uniqueness" // Spec Section: "Directives Are Unique Per Location" // Spec Section: "Fragment Name Uniqueness" // Spec Section: "Input Object Field Uniqueness" // Spec Section: "Operation Name Uniqueness" // Spec Section: "Variable Uniqueness" // Spec Section: "Value Type Correctness" // Spec Section: "Variables are Input Types" // Spec Section: "All Variable Usages Are Allowed" /** * Technically these aren't part of the spec but they are strongly encouraged * validation rules. */ const recommendedRules = Object.freeze([MaxIntrospectionDepthRule]); /** * This set includes all validation rules defined by the GraphQL spec. * * The order of the rules in this list has been adjusted to lead to the * most clear output when encountering multiple validation errors. */ const specifiedRules = Object.freeze([ ExecutableDefinitionsRule, UniqueOperationNamesRule, LoneAnonymousOperationRule, SingleFieldSubscriptionsRule, KnownTypeNamesRule, FragmentsOnCompositeTypesRule, VariablesAreInputTypesRule, ScalarLeafsRule, FieldsOnCorrectTypeRule, UniqueFragmentNamesRule, KnownFragmentNamesRule, NoUnusedFragmentsRule, PossibleFragmentSpreadsRule, NoFragmentCyclesRule, UniqueVariableNamesRule, NoUndefinedVariablesRule, NoUnusedVariablesRule, KnownDirectivesRule, UniqueDirectivesPerLocationRule, KnownArgumentNamesRule, UniqueArgumentNamesRule, ValuesOfCorrectTypeRule, ProvidedRequiredArgumentsRule, VariablesInAllowedPositionRule, OverlappingFieldsCanBeMergedRule, UniqueInputFieldNamesRule, ...recommendedRules, ]); /** * @internal */ const specifiedSDLRules = Object.freeze([ LoneSchemaDefinitionRule, UniqueOperationTypesRule, UniqueTypeNamesRule, UniqueEnumValueNamesRule, UniqueFieldDefinitionNamesRule, UniqueArgumentDefinitionNamesRule, UniqueDirectiveNamesRule, KnownTypeNamesRule, KnownDirectivesRule, UniqueDirectivesPerLocationRule, PossibleTypeExtensionsRule, KnownArgumentNamesOnDirectivesRule, UniqueArgumentNamesRule, UniqueInputFieldNamesRule, ProvidedRequiredArgumentsOnDirectivesRule, ]); ;// ./node_modules/graphql/validation/ValidationContext.mjs /** * An instance of this class is passed as the "this" context to all validators, * allowing access to commonly useful contextual information from within a * validation rule. */ class ASTValidationContext { constructor(ast, onError) { this._ast = ast; this._fragments = undefined; this._fragmentSpreads = new Map(); this._recursivelyReferencedFragments = new Map(); this._onError = onError; } get [Symbol.toStringTag]() { return 'ASTValidationContext'; } reportError(error) { this._onError(error); } getDocument() { return this._ast; } getFragment(name) { let fragments; if (this._fragments) { fragments = this._fragments; } else { fragments = Object.create(null); for (const defNode of this.getDocument().definitions) { if (defNode.kind === kinds/* Kind */.b.FRAGMENT_DEFINITION) { fragments[defNode.name.value] = defNode; } } this._fragments = fragments; } return fragments[name]; } getFragmentSpreads(node) { let spreads = this._fragmentSpreads.get(node); if (!spreads) { spreads = []; const setsToVisit = [node]; let set; while ((set = setsToVisit.pop())) { for (const selection of set.selections) { if (selection.kind === kinds/* Kind */.b.FRAGMENT_SPREAD) { spreads.push(selection); } else if (selection.selectionSet) { setsToVisit.push(selection.selectionSet); } } } this._fragmentSpreads.set(node, spreads); } return spreads; } getRecursivelyReferencedFragments(operation) { let fragments = this._recursivelyReferencedFragments.get(operation); if (!fragments) { fragments = []; const collectedNames = Object.create(null); const nodesToVisit = [operation.selectionSet]; let node; while ((node = nodesToVisit.pop())) { for (const spread of this.getFragmentSpreads(node)) { const fragName = spread.name.value; if (collectedNames[fragName] !== true) { collectedNames[fragName] = true; const fragment = this.getFragment(fragName); if (fragment) { fragments.push(fragment); nodesToVisit.push(fragment.selectionSet); } } } } this._recursivelyReferencedFragments.set(operation, fragments); } return fragments; } } class SDLValidationContext extends ASTValidationContext { constructor(ast, schema, onError) { super(ast, onError); this._schema = schema; } get [Symbol.toStringTag]() { return 'SDLValidationContext'; } getSchema() { return this._schema; } } class ValidationContext extends ASTValidationContext { constructor(schema, ast, typeInfo, onError) { super(ast, onError); this._schema = schema; this._typeInfo = typeInfo; this._variableUsages = new Map(); this._recursiveVariableUsages = new Map(); } get [Symbol.toStringTag]() { return 'ValidationContext'; } getSchema() { return this._schema; } getVariableUsages(node) { let usages = this._variableUsages.get(node); if (!usages) { const newUsages = []; const typeInfo = new TypeInfo(this._schema); (0,language_visitor/* visit */.YR)( node, visitWithTypeInfo(typeInfo, { VariableDefinition: () => false, Variable(variable) { newUsages.push({ node: variable, type: typeInfo.getInputType(), defaultValue: typeInfo.getDefaultValue(), parentType: typeInfo.getParentInputType(), }); }, }), ); usages = newUsages; this._variableUsages.set(node, usages); } return usages; } getRecursiveVariableUsages(operation) { let usages = this._recursiveVariableUsages.get(operation); if (!usages) { usages = this.getVariableUsages(operation); for (const frag of this.getRecursivelyReferencedFragments(operation)) { usages = usages.concat(this.getVariableUsages(frag)); } this._recursiveVariableUsages.set(operation, usages); } return usages; } getType() { return this._typeInfo.getType(); } getParentType() { return this._typeInfo.getParentType(); } getInputType() { return this._typeInfo.getInputType(); } getParentInputType() { return this._typeInfo.getParentInputType(); } getFieldDef() { return this._typeInfo.getFieldDef(); } getDirective() { return this._typeInfo.getDirective(); } getArgument() { return this._typeInfo.getArgument(); } getEnumValue() { return this._typeInfo.getEnumValue(); } } ;// ./node_modules/graphql/validation/validate.mjs /** * Implements the "Validation" section of the spec. * * Validation runs synchronously, returning an array of encountered errors, or * an empty array if no errors were encountered and the document is valid. * * A list of specific validation rules may be provided. If not provided, the * default list of rules defined by the GraphQL specification will be used. * * Each validation rules is a function which returns a visitor * (see the language/visitor API). Visitor methods are expected to return * GraphQLErrors, or Arrays of GraphQLErrors when invalid. * * Validate will stop validation after a `maxErrors` limit has been reached. * Attackers can send pathologically invalid queries to induce a DoS attack, * so by default `maxErrors` set to 100 errors. * * Optionally a custom TypeInfo instance may be provided. If not provided, one * will be created from the provided schema. */ function validate( schema, documentAST, rules = specifiedRules, options, /** @deprecated will be removed in 17.0.0 */ typeInfo = new TypeInfo(schema), ) { var _options$maxErrors; const maxErrors = (_options$maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors) !== null && _options$maxErrors !== void 0 ? _options$maxErrors : 100; documentAST || (0,devAssert/* devAssert */.U)(false, 'Must provide document.'); // If the schema used for validation is invalid, throw an error. assertValidSchema(schema); const abortObj = Object.freeze({}); const errors = []; const context = new ValidationContext( schema, documentAST, typeInfo, (error) => { if (errors.length >= maxErrors) { errors.push( new GraphQLError/* GraphQLError */.eO( 'Too many validation errors, error limit reached. Validation aborted.', ), ); // eslint-disable-next-line @typescript-eslint/no-throw-literal throw abortObj; } errors.push(error); }, ); // This uses a specialized visitor which runs multiple visitors in parallel, // while maintaining the visitor skip and break API. const visitor = (0,language_visitor/* visitInParallel */.oP)(rules.map((rule) => rule(context))); // Visit the whole document with each instance of all provided rules. try { (0,language_visitor/* visit */.YR)(documentAST, visitWithTypeInfo(typeInfo, visitor)); } catch (e) { if (e !== abortObj) { throw e; } } return errors; } /** * @internal */ function validateSDL( documentAST, schemaToExtend, rules = specifiedSDLRules, ) { const errors = []; const context = new SDLValidationContext( documentAST, schemaToExtend, (error) => { errors.push(error); }, ); const visitors = rules.map((rule) => rule(context)); (0,language_visitor/* visit */.YR)(documentAST, (0,language_visitor/* visitInParallel */.oP)(visitors)); return errors; } /** * Utility function which asserts a SDL document is valid by throwing an error * if it is invalid. * * @internal */ function assertValidSDL(documentAST) { const errors = validateSDL(documentAST); if (errors.length !== 0) { throw new Error(errors.map((error) => error.message).join('\n\n')); } } /** * Utility function which asserts a SDL document is valid by throwing an error * if it is invalid. * * @internal */ function assertValidSDLExtension(documentAST, schema) { const errors = validateSDL(documentAST, schema); if (errors.length !== 0) { throw new Error(errors.map((error) => error.message).join('\n\n')); } } ;// ./node_modules/graphql/jsutils/memoize3.mjs /** * Memoizes the provided three-argument function. */ function memoize3(fn) { let cache0; return function memoized(a1, a2, a3) { if (cache0 === undefined) { cache0 = new WeakMap(); } let cache1 = cache0.get(a1); if (cache1 === undefined) { cache1 = new WeakMap(); cache0.set(a1, cache1); } let cache2 = cache1.get(a2); if (cache2 === undefined) { cache2 = new WeakMap(); cache1.set(a2, cache2); } let fnResult = cache2.get(a3); if (fnResult === undefined) { fnResult = fn(a1, a2, a3); cache2.set(a3, fnResult); } return fnResult; }; } ;// ./node_modules/graphql/jsutils/promiseForObject.mjs /** * This function transforms a JS object `ObjMap>` into * a `Promise>` * * This is akin to bluebird's `Promise.props`, but implemented only using * `Promise.all` so it will work with any implementation of ES6 promises. */ function promiseForObject(object) { return Promise.all(Object.values(object)).then((resolvedValues) => { const resolvedObject = Object.create(null); for (const [i, key] of Object.keys(object).entries()) { resolvedObject[key] = resolvedValues[i]; } return resolvedObject; }); } ;// ./node_modules/graphql/jsutils/promiseReduce.mjs /** * Similar to Array.prototype.reduce(), however the reducing callback may return * a Promise, in which case reduction will continue after each promise resolves. * * If the callback does not return a Promise, then this function will also not * return a Promise. */ function promiseReduce(values, callbackFn, initialValue) { let accumulator = initialValue; for (const value of values) { accumulator = isPromise(accumulator) ? accumulator.then((resolved) => callbackFn(resolved, value)) : callbackFn(accumulator, value); } return accumulator; } ;// ./node_modules/graphql/jsutils/toError.mjs /** * Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface. */ function toError(thrownValue) { return thrownValue instanceof Error ? thrownValue : new NonErrorThrown(thrownValue); } class NonErrorThrown extends Error { constructor(thrownValue) { super('Unexpected error value: ' + (0,inspect/* inspect */.N)(thrownValue)); this.name = 'NonErrorThrown'; this.thrownValue = thrownValue; } } ;// ./node_modules/graphql/error/locatedError.mjs /** * Given an arbitrary value, presumably thrown while attempting to execute a * GraphQL operation, produce a new GraphQLError aware of the location in the * document responsible for the original Error. */ function locatedError(rawOriginalError, nodes, path) { var _nodes; const originalError = toError(rawOriginalError); // Note: this uses a brand-check to support GraphQL errors originating from other contexts. if (isLocatedGraphQLError(originalError)) { return originalError; } return new GraphQLError/* GraphQLError */.eO(originalError.message, { nodes: (_nodes = originalError.nodes) !== null && _nodes !== void 0 ? _nodes : nodes, source: originalError.source, positions: originalError.positions, path, originalError, }); } function isLocatedGraphQLError(error) { return Array.isArray(error.path); } ;// ./node_modules/graphql/execution/execute.mjs /** * A memoized collection of relevant subfields with regard to the return * type. Memoizing ensures the subfields are not repeatedly calculated, which * saves overhead when resolving lists of values. */ const execute_collectSubfields = memoize3((exeContext, returnType, fieldNodes) => collectSubfields( exeContext.schema, exeContext.fragments, exeContext.variableValues, returnType, fieldNodes, ), ); /** * Terminology * * "Definitions" are the generic name for top-level statements in the document. * Examples of this include: * 1) Operations (such as a query) * 2) Fragments * * "Operations" are a generic name for requests in the document. * Examples of this include: * 1) query, * 2) mutation * * "Selections" are the definitions that can appear legally and at * single level of the query. These include: * 1) field references e.g `a` * 2) fragment "spreads" e.g. `...c` * 3) inline fragment "spreads" e.g. `...on Type { a }` */ /** * Data that must be available at all points during query execution. * * Namely, schema of the type system that is currently executing, * and the fragments defined in the query document */ /** * Implements the "Executing requests" section of the GraphQL specification. * * Returns either a synchronous ExecutionResult (if all encountered resolvers * are synchronous), or a Promise of an ExecutionResult that will eventually be * resolved and never rejected. * * If the arguments to this function do not result in a legal execution context, * a GraphQLError will be thrown immediately explaining the invalid input. */ function execute(args) { // Temporary for v15 to v16 migration. Remove in v17 arguments.length < 2 || (0,devAssert/* devAssert */.U)( false, 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.', ); const { schema, document, variableValues, rootValue } = args; // If arguments are missing or incorrect, throw an error. assertValidExecutionArguments(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments, // a "Response" with only errors is returned. const exeContext = buildExecutionContext(args); // Return early errors if execution context failed. if (!('schema' in exeContext)) { return { errors: exeContext, }; } // Return a Promise that will eventually resolve to the data described by // The "Response" section of the GraphQL specification. // // If errors are encountered while executing a GraphQL field, only that // field and its descendants will be omitted, and sibling fields will still // be executed. An execution which encounters errors will still result in a // resolved Promise. // // Errors from sub-fields of a NonNull type may propagate to the top level, // at which point we still log the error and null the parent field, which // in this case is the entire response. try { const { operation } = exeContext; const result = executeOperation(exeContext, operation, rootValue); if (isPromise(result)) { return result.then( (data) => buildResponse(data, exeContext.errors), (error) => { exeContext.errors.push(error); return buildResponse(null, exeContext.errors); }, ); } return buildResponse(result, exeContext.errors); } catch (error) { exeContext.errors.push(error); return buildResponse(null, exeContext.errors); } } /** * Also implements the "Executing requests" section of the GraphQL specification. * However, it guarantees to complete synchronously (or throw an error) assuming * that all field resolvers are also synchronous. */ function executeSync(args) { const result = execute(args); // Assert that the execution was synchronous. if (isPromise(result)) { throw new Error('GraphQL execution failed to complete synchronously.'); } return result; } /** * Given a completed execution context and data, build the `{ errors, data }` * response defined by the "Response" section of the GraphQL specification. */ function buildResponse(data, errors) { return errors.length === 0 ? { data, } : { errors, data, }; } /** * Essential assertions before executing to provide developer feedback for * improper use of the GraphQL library. * * @internal */ function assertValidExecutionArguments( schema, document, rawVariableValues, ) { document || (0,devAssert/* devAssert */.U)(false, 'Must provide document.'); // If the schema used for execution is invalid, throw an error. assertValidSchema(schema); // Variables, if provided, must be an object. rawVariableValues == null || (0,isObjectLike/* isObjectLike */.Z)(rawVariableValues) || (0,devAssert/* devAssert */.U)( false, 'Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.', ); } /** * Constructs a ExecutionContext object from the arguments passed to * execute, which we will pass throughout the other execution methods. * * Throws a GraphQLError if a valid execution context cannot be created. * * @internal */ function buildExecutionContext(args) { var _definition$name, _operation$variableDe, _options$maxCoercionE; const { schema, document, rootValue, contextValue, variableValues: rawVariableValues, operationName, fieldResolver, typeResolver, subscribeFieldResolver, options, } = args; let operation; const fragments = Object.create(null); for (const definition of document.definitions) { switch (definition.kind) { case kinds/* Kind */.b.OPERATION_DEFINITION: if (operationName == null) { if (operation !== undefined) { return [ new GraphQLError/* GraphQLError */.eO( 'Must provide operation name if query contains multiple operations.', ), ]; } operation = definition; } else if ( ((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName ) { operation = definition; } break; case kinds/* Kind */.b.FRAGMENT_DEFINITION: fragments[definition.name.value] = definition; break; default: // ignore non-executable definitions } } if (!operation) { if (operationName != null) { return [new GraphQLError/* GraphQLError */.eO(`Unknown operation named "${operationName}".`)]; } return [new GraphQLError/* GraphQLError */.eO('Must provide an operation.')]; } // FIXME: https://github.com/graphql/graphql-js/issues/2203 /* c8 ignore next */ const variableDefinitions = (_operation$variableDe = operation.variableDefinitions) !== null && _operation$variableDe !== void 0 ? _operation$variableDe : []; const coercedVariableValues = getVariableValues( schema, variableDefinitions, rawVariableValues !== null && rawVariableValues !== void 0 ? rawVariableValues : {}, { maxErrors: (_options$maxCoercionE = options === null || options === void 0 ? void 0 : options.maxCoercionErrors) !== null && _options$maxCoercionE !== void 0 ? _options$maxCoercionE : 50, }, ); if (coercedVariableValues.errors) { return coercedVariableValues.errors; } return { schema, fragments, rootValue, contextValue, operation, variableValues: coercedVariableValues.coerced, fieldResolver: fieldResolver !== null && fieldResolver !== void 0 ? fieldResolver : defaultFieldResolver, typeResolver: typeResolver !== null && typeResolver !== void 0 ? typeResolver : defaultTypeResolver, subscribeFieldResolver: subscribeFieldResolver !== null && subscribeFieldResolver !== void 0 ? subscribeFieldResolver : defaultFieldResolver, errors: [], }; } /** * Implements the "Executing operations" section of the spec. */ function executeOperation(exeContext, operation, rootValue) { const rootType = exeContext.schema.getRootType(operation.operation); if (rootType == null) { throw new GraphQLError/* GraphQLError */.eO( `Schema is not configured to execute ${operation.operation} operation.`, { nodes: operation, }, ); } const rootFields = collectFields( exeContext.schema, exeContext.fragments, exeContext.variableValues, rootType, operation.selectionSet, ); const path = undefined; switch (operation.operation) { case ast/* OperationTypeNode */.cE.QUERY: return executeFields(exeContext, rootType, rootValue, path, rootFields); case ast/* OperationTypeNode */.cE.MUTATION: return executeFieldsSerially( exeContext, rootType, rootValue, path, rootFields, ); case ast/* OperationTypeNode */.cE.SUBSCRIPTION: // TODO: deprecate `subscribe` and move all logic here // Temporary solution until we finish merging execute and subscribe together return executeFields(exeContext, rootType, rootValue, path, rootFields); } } /** * Implements the "Executing selection sets" section of the spec * for fields that must be executed serially. */ function executeFieldsSerially( exeContext, parentType, sourceValue, path, fields, ) { return promiseReduce( fields.entries(), (results, [responseName, fieldNodes]) => { const fieldPath = addPath(path, responseName, parentType.name); const result = executeField( exeContext, parentType, sourceValue, fieldNodes, fieldPath, ); if (result === undefined) { return results; } if (isPromise(result)) { return result.then((resolvedResult) => { results[responseName] = resolvedResult; return results; }); } results[responseName] = result; return results; }, Object.create(null), ); } /** * Implements the "Executing selection sets" section of the spec * for fields that may be executed in parallel. */ function executeFields(exeContext, parentType, sourceValue, path, fields) { const results = Object.create(null); let containsPromise = false; try { for (const [responseName, fieldNodes] of fields.entries()) { const fieldPath = addPath(path, responseName, parentType.name); const result = executeField( exeContext, parentType, sourceValue, fieldNodes, fieldPath, ); if (result !== undefined) { results[responseName] = result; if (isPromise(result)) { containsPromise = true; } } } } catch (error) { if (containsPromise) { // Ensure that any promises returned by other fields are handled, as they may also reject. return promiseForObject(results).finally(() => { throw error; }); } throw error; } // If there are no promises, we can just return the object if (!containsPromise) { return results; } // Otherwise, results is a map from field name to the result of resolving that // field, which is possibly a promise. Return a promise that will return this // same map, but with any promises replaced with the values they resolved to. return promiseForObject(results); } /** * Implements the "Executing fields" section of the spec * In particular, this function figures out the value that the field returns by * calling its resolve function, then calls completeValue to complete promises, * serialize scalars, or execute the sub-selection-set for objects. */ function executeField(exeContext, parentType, source, fieldNodes, path) { var _fieldDef$resolve; const fieldDef = execute_getFieldDef(exeContext.schema, parentType, fieldNodes[0]); if (!fieldDef) { return; } const returnType = fieldDef.type; const resolveFn = (_fieldDef$resolve = fieldDef.resolve) !== null && _fieldDef$resolve !== void 0 ? _fieldDef$resolve : exeContext.fieldResolver; const info = buildResolveInfo( exeContext, fieldDef, fieldNodes, parentType, path, ); // Get the resolve function, regardless of if its result is normal or abrupt (error). try { // Build a JS object of arguments from the field.arguments AST, using the // variables scope to fulfill any variable references. // TODO: find a way to memoize, in case this field is within a List type. const args = getArgumentValues( fieldDef, fieldNodes[0], exeContext.variableValues, ); // The resolve function's optional third argument is a context value that // is provided to every resolve function within an execution. It is commonly // used to represent an authenticated user, or request-specific caches. const contextValue = exeContext.contextValue; const result = resolveFn(source, args, contextValue, info); let completed; if (isPromise(result)) { completed = result.then((resolved) => completeValue(exeContext, returnType, fieldNodes, info, path, resolved), ); } else { completed = completeValue( exeContext, returnType, fieldNodes, info, path, result, ); } if (isPromise(completed)) { // Note: we don't rely on a `catch` method, but we do expect "thenable" // to take a second callback for the error case. return completed.then(undefined, (rawError) => { const error = locatedError(rawError, fieldNodes, pathToArray(path)); return handleFieldError(error, returnType, exeContext); }); } return completed; } catch (rawError) { const error = locatedError(rawError, fieldNodes, pathToArray(path)); return handleFieldError(error, returnType, exeContext); } } /** * @internal */ function buildResolveInfo( exeContext, fieldDef, fieldNodes, parentType, path, ) { // The resolve function's optional fourth argument is a collection of // information about the current execution state. return { fieldName: fieldDef.name, fieldNodes, returnType: fieldDef.type, parentType, path, schema: exeContext.schema, fragments: exeContext.fragments, rootValue: exeContext.rootValue, operation: exeContext.operation, variableValues: exeContext.variableValues, }; } function handleFieldError(error, returnType, exeContext) { // If the field type is non-nullable, then it is resolved without any // protection from errors, however it still properly locates the error. if (isNonNullType(returnType)) { throw error; } // Otherwise, error protection is applied, logging the error and resolving // a null value for this field if one is encountered. exeContext.errors.push(error); return null; } /** * Implements the instructions for completeValue as defined in the * "Value Completion" section of the spec. * * If the field type is Non-Null, then this recursively completes the value * for the inner type. It throws a field error if that completion returns null, * as per the "Nullability" section of the spec. * * If the field type is a List, then this recursively completes the value * for the inner type on each item in the list. * * If the field type is a Scalar or Enum, ensures the completed value is a legal * value of the type by calling the `serialize` method of GraphQL type * definition. * * If the field is an abstract type, determine the runtime type of the value * and then complete based on that type * * Otherwise, the field type expects a sub-selection set, and will complete the * value by executing all sub-selections. */ function completeValue(exeContext, returnType, fieldNodes, info, path, result) { // If result is an Error, throw a located error. if (result instanceof Error) { throw result; } // If field type is NonNull, complete for inner type, and throw field error // if result is null. if (isNonNullType(returnType)) { const completed = completeValue( exeContext, returnType.ofType, fieldNodes, info, path, result, ); if (completed === null) { throw new Error( `Cannot return null for non-nullable field ${info.parentType.name}.${info.fieldName}.`, ); } return completed; } // If result value is null or undefined then return null. if (result == null) { return null; } // If field type is List, complete each item in the list with the inner type if (isListType(returnType)) { return completeListValue( exeContext, returnType, fieldNodes, info, path, result, ); } // If field type is a leaf type, Scalar or Enum, serialize to a valid value, // returning null if serialization is not possible. if (isLeafType(returnType)) { return completeLeafValue(returnType, result); } // If field type is an abstract type, Interface or Union, determine the // runtime Object type and complete for that type. if (isAbstractType(returnType)) { return completeAbstractValue( exeContext, returnType, fieldNodes, info, path, result, ); } // If field type is Object, execute and complete all sub-selections. if (isObjectType(returnType)) { return completeObjectValue( exeContext, returnType, fieldNodes, info, path, result, ); } /* c8 ignore next 6 */ // Not reachable, all possible output types have been considered. false || (0,invariant/* invariant */.V)( false, 'Cannot complete value of unexpected output type: ' + (0,inspect/* inspect */.N)(returnType), ); } /** * Complete a list value by completing each item in the list with the * inner type */ function completeListValue( exeContext, returnType, fieldNodes, info, path, result, ) { if (!isIterableObject(result)) { throw new GraphQLError/* GraphQLError */.eO( `Expected Iterable, but did not find one for field "${info.parentType.name}.${info.fieldName}".`, ); } // This is specified as a simple map, however we're optimizing the path // where the list contains no Promises by avoiding creating another Promise. const itemType = returnType.ofType; let containsPromise = false; const completedResults = Array.from(result, (item, index) => { // No need to modify the info object containing the path, // since from here on it is not ever accessed by resolver functions. const itemPath = addPath(path, index, undefined); try { let completedItem; if (isPromise(item)) { completedItem = item.then((resolved) => completeValue( exeContext, itemType, fieldNodes, info, itemPath, resolved, ), ); } else { completedItem = completeValue( exeContext, itemType, fieldNodes, info, itemPath, item, ); } if (isPromise(completedItem)) { containsPromise = true; // Note: we don't rely on a `catch` method, but we do expect "thenable" // to take a second callback for the error case. return completedItem.then(undefined, (rawError) => { const error = locatedError( rawError, fieldNodes, pathToArray(itemPath), ); return handleFieldError(error, itemType, exeContext); }); } return completedItem; } catch (rawError) { const error = locatedError(rawError, fieldNodes, pathToArray(itemPath)); return handleFieldError(error, itemType, exeContext); } }); return containsPromise ? Promise.all(completedResults) : completedResults; } /** * Complete a Scalar or Enum by serializing to a valid value, returning * null if serialization is not possible. */ function completeLeafValue(returnType, result) { const serializedResult = returnType.serialize(result); if (serializedResult == null) { throw new Error( `Expected \`${(0,inspect/* inspect */.N)(returnType)}.serialize(${(0,inspect/* inspect */.N)(result)})\` to ` + `return non-nullable value, returned: ${(0,inspect/* inspect */.N)(serializedResult)}`, ); } return serializedResult; } /** * Complete a value of an abstract type by determining the runtime object type * of that value, then complete the value for that type. */ function completeAbstractValue( exeContext, returnType, fieldNodes, info, path, result, ) { var _returnType$resolveTy; const resolveTypeFn = (_returnType$resolveTy = returnType.resolveType) !== null && _returnType$resolveTy !== void 0 ? _returnType$resolveTy : exeContext.typeResolver; const contextValue = exeContext.contextValue; const runtimeType = resolveTypeFn(result, contextValue, info, returnType); if (isPromise(runtimeType)) { return runtimeType.then((resolvedRuntimeType) => completeObjectValue( exeContext, ensureValidRuntimeType( resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result, ), fieldNodes, info, path, result, ), ); } return completeObjectValue( exeContext, ensureValidRuntimeType( runtimeType, exeContext, returnType, fieldNodes, info, result, ), fieldNodes, info, path, result, ); } function ensureValidRuntimeType( runtimeTypeName, exeContext, returnType, fieldNodes, info, result, ) { if (runtimeTypeName == null) { throw new GraphQLError/* GraphQLError */.eO( `Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}". Either the "${returnType.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`, fieldNodes, ); } // releases before 16.0.0 supported returning `GraphQLObjectType` from `resolveType` // TODO: remove in 17.0.0 release if (isObjectType(runtimeTypeName)) { throw new GraphQLError/* GraphQLError */.eO( 'Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.', ); } if (typeof runtimeTypeName !== 'string') { throw new GraphQLError/* GraphQLError */.eO( `Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}" with ` + `value ${(0,inspect/* inspect */.N)(result)}, received "${(0,inspect/* inspect */.N)(runtimeTypeName)}".`, ); } const runtimeType = exeContext.schema.getType(runtimeTypeName); if (runtimeType == null) { throw new GraphQLError/* GraphQLError */.eO( `Abstract type "${returnType.name}" was resolved to a type "${runtimeTypeName}" that does not exist inside the schema.`, { nodes: fieldNodes, }, ); } if (!isObjectType(runtimeType)) { throw new GraphQLError/* GraphQLError */.eO( `Abstract type "${returnType.name}" was resolved to a non-object type "${runtimeTypeName}".`, { nodes: fieldNodes, }, ); } if (!exeContext.schema.isSubType(returnType, runtimeType)) { throw new GraphQLError/* GraphQLError */.eO( `Runtime Object type "${runtimeType.name}" is not a possible type for "${returnType.name}".`, { nodes: fieldNodes, }, ); } return runtimeType; } /** * Complete an Object value by executing all sub-selections. */ function completeObjectValue( exeContext, returnType, fieldNodes, info, path, result, ) { // Collect sub-fields to execute to complete this value. const subFieldNodes = execute_collectSubfields(exeContext, returnType, fieldNodes); // If there is an isTypeOf predicate function, call it with the // current result. If isTypeOf returns false, then raise an error rather // than continuing execution. if (returnType.isTypeOf) { const isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info); if (isPromise(isTypeOf)) { return isTypeOf.then((resolvedIsTypeOf) => { if (!resolvedIsTypeOf) { throw invalidReturnTypeError(returnType, result, fieldNodes); } return executeFields( exeContext, returnType, result, path, subFieldNodes, ); }); } if (!isTypeOf) { throw invalidReturnTypeError(returnType, result, fieldNodes); } } return executeFields(exeContext, returnType, result, path, subFieldNodes); } function invalidReturnTypeError(returnType, result, fieldNodes) { return new GraphQLError/* GraphQLError */.eO( `Expected value of type "${returnType.name}" but got: ${(0,inspect/* inspect */.N)(result)}.`, { nodes: fieldNodes, }, ); } /** * If a resolveType function is not given, then a default resolve behavior is * used which attempts two strategies: * * First, See if the provided value has a `__typename` field defined, if so, use * that value as name of the resolved type. * * Otherwise, test each possible type for the abstract type by calling * isTypeOf for the object being coerced, returning the first type that matches. */ const defaultTypeResolver = function ( value, contextValue, info, abstractType, ) { // First, look for `__typename`. if ((0,isObjectLike/* isObjectLike */.Z)(value) && typeof value.__typename === 'string') { return value.__typename; } // Otherwise, test each possible type. const possibleTypes = info.schema.getPossibleTypes(abstractType); const promisedIsTypeOfResults = []; for (let i = 0; i < possibleTypes.length; i++) { const type = possibleTypes[i]; if (type.isTypeOf) { const isTypeOfResult = type.isTypeOf(value, contextValue, info); if (isPromise(isTypeOfResult)) { promisedIsTypeOfResults[i] = isTypeOfResult; } else if (isTypeOfResult) { return type.name; } } } if (promisedIsTypeOfResults.length) { return Promise.all(promisedIsTypeOfResults).then((isTypeOfResults) => { for (let i = 0; i < isTypeOfResults.length; i++) { if (isTypeOfResults[i]) { return possibleTypes[i].name; } } }); } }; /** * If a resolve function is not given, then a default resolve behavior is used * which takes the property of the source object of the same name as the field * and returns it as the result, or if it's a function, returns the result * of calling that function while passing along args and context value. */ const defaultFieldResolver = function ( source, args, contextValue, info, ) { // ensure source is a value for which property access is acceptable. if ((0,isObjectLike/* isObjectLike */.Z)(source) || typeof source === 'function') { const property = source[info.fieldName]; if (typeof property === 'function') { return source[info.fieldName](args, contextValue, info); } return property; } }; /** * This method looks up the field on the given type definition. * It has special casing for the three introspection fields, * __schema, __type and __typename. __typename is special because * it can always be queried as a field, even in situations where no * other fields are allowed, like on a Union. __schema and __type * could get automatically added to the query type, but that would * require mutating type definitions, which would cause issues. * * @internal */ function execute_getFieldDef(schema, parentType, fieldNode) { const fieldName = fieldNode.name.value; if ( fieldName === SchemaMetaFieldDef.name && schema.getQueryType() === parentType ) { return SchemaMetaFieldDef; } else if ( fieldName === TypeMetaFieldDef.name && schema.getQueryType() === parentType ) { return TypeMetaFieldDef; } else if (fieldName === TypeNameMetaFieldDef.name) { return TypeNameMetaFieldDef; } return parentType.getFields()[fieldName]; } ;// ./node_modules/graphql/graphql.mjs /** * This is the primary entry point function for fulfilling GraphQL operations * by parsing, validating, and executing a GraphQL document along side a * GraphQL schema. * * More sophisticated GraphQL servers, such as those which persist queries, * may wish to separate the validation and execution phases to a static time * tooling step, and a server runtime step. * * Accepts either an object with named arguments, or individual arguments: * * schema: * The GraphQL type system to use when validating and executing a query. * source: * A GraphQL language formatted string representing the requested operation. * rootValue: * The value provided as the first argument to resolver functions on the top * level type (e.g. the query object type). * contextValue: * The context value is provided as an argument to resolver functions after * field arguments. It is used to pass shared information useful at any point * during executing this query, for example the currently logged in user and * connections to databases or other services. * variableValues: * A mapping of variable name to runtime value to use for all variables * defined in the requestString. * operationName: * The name of the operation to use if requestString contains multiple * possible operations. Can be omitted if requestString contains only * one operation. * fieldResolver: * A resolver function to use when one is not provided by the schema. * If not provided, the default field resolver is used (which looks for a * value or method on the source value with the field's name). * typeResolver: * A type resolver function to use when none is provided by the schema. * If not provided, the default type resolver is used (which looks for a * `__typename` field or alternatively calls the `isTypeOf` method). */ function graphql(args) { // Always return a Promise for a consistent API. return new Promise((resolve) => resolve(graphqlImpl(args))); } /** * The graphqlSync function also fulfills GraphQL operations by parsing, * validating, and executing a GraphQL document along side a GraphQL schema. * However, it guarantees to complete synchronously (or throw an error) assuming * that all field resolvers are also synchronous. */ function graphqlSync(args) { const result = graphqlImpl(args); // Assert that the execution was synchronous. if (isPromise(result)) { throw new Error('GraphQL execution failed to complete synchronously.'); } return result; } function graphqlImpl(args) { // Temporary for v15 to v16 migration. Remove in v17 arguments.length < 2 || (0,devAssert/* devAssert */.U)( false, 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.', ); const { schema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver, } = args; // Validate Schema const schemaValidationErrors = validateSchema(schema); if (schemaValidationErrors.length > 0) { return { errors: schemaValidationErrors, }; } // Parse let document; try { document = (0,parser/* parse */.qg)(source); } catch (syntaxError) { return { errors: [syntaxError], }; } // Validate const validationErrors = validate(schema, document); if (validationErrors.length > 0) { return { errors: validationErrors, }; } // Execute return execute({ schema, document, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver, }); } // EXTERNAL MODULE: ./node_modules/graphql/language/source.mjs var language_source = __webpack_require__(48575); // EXTERNAL MODULE: ./node_modules/graphql/language/location.mjs var language_location = __webpack_require__(72409); // EXTERNAL MODULE: ./node_modules/graphql/language/printLocation.mjs var printLocation = __webpack_require__(62072); // EXTERNAL MODULE: ./node_modules/graphql/language/lexer.mjs var language_lexer = __webpack_require__(21238); // EXTERNAL MODULE: ./node_modules/graphql/language/tokenKind.mjs var language_tokenKind = __webpack_require__(24925); ;// ./node_modules/graphql/jsutils/isAsyncIterable.mjs /** * Returns true if the provided object implements the AsyncIterator protocol via * implementing a `Symbol.asyncIterator` method. */ function isAsyncIterable(maybeAsyncIterable) { return ( typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0 ? void 0 : maybeAsyncIterable[Symbol.asyncIterator]) === 'function' ); } ;// ./node_modules/graphql/execution/mapAsyncIterator.mjs /** * Given an AsyncIterable and a callback function, return an AsyncIterator * which produces values mapped via calling the callback function. */ function mapAsyncIterator(iterable, callback) { const iterator = iterable[Symbol.asyncIterator](); async function mapResult(result) { if (result.done) { return result; } try { return { value: await callback(result.value), done: false, }; } catch (error) { /* c8 ignore start */ // FIXME: add test case if (typeof iterator.return === 'function') { try { await iterator.return(); } catch (_e) { /* ignore error */ } } throw error; /* c8 ignore stop */ } } return { async next() { return mapResult(await iterator.next()); }, async return() { // If iterator.return() does not exist, then type R must be undefined. return typeof iterator.return === 'function' ? mapResult(await iterator.return()) : { value: undefined, done: true, }; }, async throw(error) { if (typeof iterator.throw === 'function') { return mapResult(await iterator.throw(error)); } throw error; }, [Symbol.asyncIterator]() { return this; }, }; } ;// ./node_modules/graphql/execution/subscribe.mjs /** * Implements the "Subscribe" algorithm described in the GraphQL specification. * * Returns a Promise which resolves to either an AsyncIterator (if successful) * or an ExecutionResult (error). The promise will be rejected if the schema or * other arguments to this function are invalid, or if the resolved event stream * is not an async iterable. * * If the client-provided arguments to this function do not result in a * compliant subscription, a GraphQL Response (ExecutionResult) with * descriptive errors and no data will be returned. * * If the source stream could not be created due to faulty subscription * resolver logic or underlying systems, the promise will resolve to a single * ExecutionResult containing `errors` and no `data`. * * If the operation succeeded, the promise resolves to an AsyncIterator, which * yields a stream of ExecutionResults representing the response stream. * * Accepts either an object with named arguments, or individual arguments. */ async function subscribe(args) { // Temporary for v15 to v16 migration. Remove in v17 arguments.length < 2 || (0,devAssert/* devAssert */.U)( false, 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.', ); const resultOrStream = await createSourceEventStream(args); if (!isAsyncIterable(resultOrStream)) { return resultOrStream; } // For each payload yielded from a subscription, map it over the normal // GraphQL `execute` function, with `payload` as the rootValue. // This implements the "MapSourceToResponseEvent" algorithm described in // the GraphQL specification. The `execute` function provides the // "ExecuteSubscriptionEvent" algorithm, as it is nearly identical to the // "ExecuteQuery" algorithm, for which `execute` is also used. const mapSourceToResponse = (payload) => execute({ ...args, rootValue: payload }); // Map every source value to a ExecutionResult value as described above. return mapAsyncIterator(resultOrStream, mapSourceToResponse); } function toNormalizedArgs(args) { const firstArg = args[0]; if (firstArg && 'document' in firstArg) { return firstArg; } return { schema: firstArg, // FIXME: when underlying TS bug fixed, see https://github.com/microsoft/TypeScript/issues/31613 document: args[1], rootValue: args[2], contextValue: args[3], variableValues: args[4], operationName: args[5], subscribeFieldResolver: args[6], }; } /** * Implements the "CreateSourceEventStream" algorithm described in the * GraphQL specification, resolving the subscription source event stream. * * Returns a Promise which resolves to either an AsyncIterable (if successful) * or an ExecutionResult (error). The promise will be rejected if the schema or * other arguments to this function are invalid, or if the resolved event stream * is not an async iterable. * * If the client-provided arguments to this function do not result in a * compliant subscription, a GraphQL Response (ExecutionResult) with * descriptive errors and no data will be returned. * * If the the source stream could not be created due to faulty subscription * resolver logic or underlying systems, the promise will resolve to a single * ExecutionResult containing `errors` and no `data`. * * If the operation succeeded, the promise resolves to the AsyncIterable for the * event stream returned by the resolver. * * A Source Event Stream represents a sequence of events, each of which triggers * a GraphQL execution for that event. * * This may be useful when hosting the stateful subscription service in a * different process or machine than the stateless GraphQL execution engine, * or otherwise separating these two steps. For more on this, see the * "Supporting Subscriptions at Scale" information in the GraphQL specification. */ async function createSourceEventStream(...rawArgs) { const args = toNormalizedArgs(rawArgs); const { schema, document, variableValues } = args; // If arguments are missing or incorrectly typed, this is an internal // developer mistake which should throw an early error. assertValidExecutionArguments(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments, // a "Response" with only errors is returned. const exeContext = buildExecutionContext(args); // Return early errors if execution context failed. if (!('schema' in exeContext)) { return { errors: exeContext, }; } try { const eventStream = await executeSubscription(exeContext); // Assert field returned an event stream, otherwise yield an error. if (!isAsyncIterable(eventStream)) { throw new Error( 'Subscription field must return Async Iterable. ' + `Received: ${(0,inspect/* inspect */.N)(eventStream)}.`, ); } return eventStream; } catch (error) { // If it GraphQLError, report it as an ExecutionResult, containing only errors and no data. // Otherwise treat the error as a system-class error and re-throw it. if (error instanceof GraphQLError/* GraphQLError */.eO) { return { errors: [error], }; } throw error; } } async function executeSubscription(exeContext) { const { schema, fragments, operation, variableValues, rootValue } = exeContext; const rootType = schema.getSubscriptionType(); if (rootType == null) { throw new GraphQLError/* GraphQLError */.eO( 'Schema is not configured to execute subscription operation.', { nodes: operation, }, ); } const rootFields = collectFields( schema, fragments, variableValues, rootType, operation.selectionSet, ); const [responseName, fieldNodes] = [...rootFields.entries()][0]; const fieldDef = execute_getFieldDef(schema, rootType, fieldNodes[0]); if (!fieldDef) { const fieldName = fieldNodes[0].name.value; throw new GraphQLError/* GraphQLError */.eO( `The subscription field "${fieldName}" is not defined.`, { nodes: fieldNodes, }, ); } const path = addPath(undefined, responseName, rootType.name); const info = buildResolveInfo( exeContext, fieldDef, fieldNodes, rootType, path, ); try { var _fieldDef$subscribe; // Implements the "ResolveFieldEventStream" algorithm from GraphQL specification. // It differs from "ResolveFieldValue" due to providing a different `resolveFn`. // Build a JS object of arguments from the field.arguments AST, using the // variables scope to fulfill any variable references. const args = getArgumentValues(fieldDef, fieldNodes[0], variableValues); // The resolve function's optional third argument is a context value that // is provided to every resolve function within an execution. It is commonly // used to represent an authenticated user, or request-specific caches. const contextValue = exeContext.contextValue; // Call the `subscribe()` resolver or the default resolver to produce an // AsyncIterable yielding raw payloads. const resolveFn = (_fieldDef$subscribe = fieldDef.subscribe) !== null && _fieldDef$subscribe !== void 0 ? _fieldDef$subscribe : exeContext.subscribeFieldResolver; const eventStream = await resolveFn(rootValue, args, contextValue, info); if (eventStream instanceof Error) { throw eventStream; } return eventStream; } catch (error) { throw locatedError(error, fieldNodes, pathToArray(path)); } } ;// ./node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs /** * No deprecated * * A GraphQL document is only valid if all selected fields and all used enum values have not been * deprecated. * * Note: This rule is optional and is not part of the Validation section of the GraphQL * Specification. The main purpose of this rule is detection of deprecated usages and not * necessarily to forbid their use when querying a service. */ function NoDeprecatedCustomRule(context) { return { Field(node) { const fieldDef = context.getFieldDef(); const deprecationReason = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.deprecationReason; if (fieldDef && deprecationReason != null) { const parentType = context.getParentType(); parentType != null || (0,invariant/* invariant */.V)(false); context.reportError( new GraphQLError/* GraphQLError */.eO( `The field ${parentType.name}.${fieldDef.name} is deprecated. ${deprecationReason}`, { nodes: node, }, ), ); } }, Argument(node) { const argDef = context.getArgument(); const deprecationReason = argDef === null || argDef === void 0 ? void 0 : argDef.deprecationReason; if (argDef && deprecationReason != null) { const directiveDef = context.getDirective(); if (directiveDef != null) { context.reportError( new GraphQLError/* GraphQLError */.eO( `Directive "@${directiveDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, { nodes: node, }, ), ); } else { const parentType = context.getParentType(); const fieldDef = context.getFieldDef(); (parentType != null && fieldDef != null) || (0,invariant/* invariant */.V)(false); context.reportError( new GraphQLError/* GraphQLError */.eO( `Field "${parentType.name}.${fieldDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, { nodes: node, }, ), ); } } }, ObjectField(node) { const inputObjectDef = getNamedType(context.getParentInputType()); if (isInputObjectType(inputObjectDef)) { const inputFieldDef = inputObjectDef.getFields()[node.name.value]; const deprecationReason = inputFieldDef === null || inputFieldDef === void 0 ? void 0 : inputFieldDef.deprecationReason; if (deprecationReason != null) { context.reportError( new GraphQLError/* GraphQLError */.eO( `The input field ${inputObjectDef.name}.${inputFieldDef.name} is deprecated. ${deprecationReason}`, { nodes: node, }, ), ); } } }, EnumValue(node) { const enumValueDef = context.getEnumValue(); const deprecationReason = enumValueDef === null || enumValueDef === void 0 ? void 0 : enumValueDef.deprecationReason; if (enumValueDef && deprecationReason != null) { const enumTypeDef = getNamedType(context.getInputType()); enumTypeDef != null || (0,invariant/* invariant */.V)(false); context.reportError( new GraphQLError/* GraphQLError */.eO( `The enum value "${enumTypeDef.name}.${enumValueDef.name}" is deprecated. ${deprecationReason}`, { nodes: node, }, ), ); } }, }; } ;// ./node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs /** * Prohibit introspection queries * * A GraphQL document is only valid if all fields selected are not fields that * return an introspection type. * * Note: This rule is optional and is not part of the Validation section of the * GraphQL Specification. This rule effectively disables introspection, which * does not reflect best practices and should only be done if absolutely necessary. */ function NoSchemaIntrospectionCustomRule(context) { return { Field(node) { const type = getNamedType(context.getType()); if (type && isIntrospectionType(type)) { context.reportError( new GraphQLError/* GraphQLError */.eO( `GraphQL introspection has been disabled, but the requested query contained the field "${node.name.value}".`, { nodes: node, }, ), ); } }, }; } // EXTERNAL MODULE: ./node_modules/graphql/error/syntaxError.mjs var syntaxError = __webpack_require__(93547); ;// ./node_modules/graphql/utilities/getIntrospectionQuery.mjs /** * Produce the GraphQL query recommended for a full schema introspection. * Accepts optional IntrospectionOptions. */ function getIntrospectionQuery(options) { const optionsWithDefault = { descriptions: true, specifiedByUrl: false, directiveIsRepeatable: false, schemaDescription: false, inputValueDeprecation: false, oneOf: false, ...options, }; const descriptions = optionsWithDefault.descriptions ? 'description' : ''; const specifiedByUrl = optionsWithDefault.specifiedByUrl ? 'specifiedByURL' : ''; const directiveIsRepeatable = optionsWithDefault.directiveIsRepeatable ? 'isRepeatable' : ''; const schemaDescription = optionsWithDefault.schemaDescription ? descriptions : ''; function inputDeprecation(str) { return optionsWithDefault.inputValueDeprecation ? str : ''; } const oneOf = optionsWithDefault.oneOf ? 'isOneOf' : ''; return ` query IntrospectionQuery { __schema { ${schemaDescription} queryType { name kind } mutationType { name kind } subscriptionType { name kind } types { ...FullType } directives { name ${descriptions} ${directiveIsRepeatable} locations args${inputDeprecation('(includeDeprecated: true)')} { ...InputValue } } } } fragment FullType on __Type { kind name ${descriptions} ${specifiedByUrl} ${oneOf} fields(includeDeprecated: true) { name ${descriptions} args${inputDeprecation('(includeDeprecated: true)')} { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields${inputDeprecation('(includeDeprecated: true)')} { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name ${descriptions} isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name ${descriptions} type { ...TypeRef } defaultValue ${inputDeprecation('isDeprecated')} ${inputDeprecation('deprecationReason')} } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } } } } } `; } ;// ./node_modules/graphql/utilities/getOperationAST.mjs /** * Returns an operation AST given a document AST and optionally an operation * name. If a name is not provided, an operation is only returned if only one is * provided in the document. */ function getOperationAST(documentAST, operationName) { let operation = null; for (const definition of documentAST.definitions) { if (definition.kind === kinds/* Kind */.b.OPERATION_DEFINITION) { var _definition$name; if (operationName == null) { // If no operation name was provided, only return an Operation if there // is one defined in the document. Upon encountering the second, return // null. if (operation) { return null; } operation = definition; } else if ( ((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName ) { return definition; } } } return operation; } ;// ./node_modules/graphql/utilities/getOperationRootType.mjs /** * Extracts the root type of the operation from the schema. * * @deprecated Please use `GraphQLSchema.getRootType` instead. Will be removed in v17 */ function getOperationRootType(schema, operation) { if (operation.operation === 'query') { const queryType = schema.getQueryType(); if (!queryType) { throw new GraphQLError/* GraphQLError */.eO( 'Schema does not define the required query root type.', { nodes: operation, }, ); } return queryType; } if (operation.operation === 'mutation') { const mutationType = schema.getMutationType(); if (!mutationType) { throw new GraphQLError/* GraphQLError */.eO('Schema is not configured for mutations.', { nodes: operation, }); } return mutationType; } if (operation.operation === 'subscription') { const subscriptionType = schema.getSubscriptionType(); if (!subscriptionType) { throw new GraphQLError/* GraphQLError */.eO('Schema is not configured for subscriptions.', { nodes: operation, }); } return subscriptionType; } throw new GraphQLError/* GraphQLError */.eO( 'Can only have query, mutation and subscription operations.', { nodes: operation, }, ); } ;// ./node_modules/graphql/utilities/introspectionFromSchema.mjs /** * Build an IntrospectionQuery from a GraphQLSchema * * IntrospectionQuery is useful for utilities that care about type and field * relationships, but do not need to traverse through those relationships. * * This is the inverse of buildClientSchema. The primary use case is outside * of the server context, for instance when doing schema comparisons. */ function introspectionFromSchema(schema, options) { const optionsWithDefaults = { specifiedByUrl: true, directiveIsRepeatable: true, schemaDescription: true, inputValueDeprecation: true, oneOf: true, ...options, }; const document = (0,parser/* parse */.qg)(getIntrospectionQuery(optionsWithDefaults)); const result = executeSync({ schema, document, }); (!result.errors && result.data) || (0,invariant/* invariant */.V)(false); return result.data; } ;// ./node_modules/graphql/utilities/buildClientSchema.mjs /** * Build a GraphQLSchema for use by client tools. * * Given the result of a client running the introspection query, creates and * returns a GraphQLSchema instance which can be then used with all graphql-js * tools, but cannot be used to execute a query, as introspection does not * represent the "resolver", "parse" or "serialize" functions or any other * server-internal mechanisms. * * This function expects a complete introspection result. Don't forget to check * the "errors" field of a server response before calling this function. */ function buildClientSchema(introspection, options) { ((0,isObjectLike/* isObjectLike */.Z)(introspection) && (0,isObjectLike/* isObjectLike */.Z)(introspection.__schema)) || (0,devAssert/* devAssert */.U)( false, `Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,inspect/* inspect */.N)( introspection, )}.`, ); // Get the schema from the introspection result. const schemaIntrospection = introspection.__schema; // Iterate through all types, getting the type definition for each. const typeMap = keyValMap( schemaIntrospection.types, (typeIntrospection) => typeIntrospection.name, (typeIntrospection) => buildType(typeIntrospection), ); // Include standard types only if they are used. for (const stdType of [...specifiedScalarTypes, ...introspectionTypes]) { if (typeMap[stdType.name]) { typeMap[stdType.name] = stdType; } } // Get the root Query, Mutation, and Subscription types. const queryType = schemaIntrospection.queryType ? getObjectType(schemaIntrospection.queryType) : null; const mutationType = schemaIntrospection.mutationType ? getObjectType(schemaIntrospection.mutationType) : null; const subscriptionType = schemaIntrospection.subscriptionType ? getObjectType(schemaIntrospection.subscriptionType) : null; // Get the directives supported by Introspection, assuming empty-set if // directives were not queried for. const directives = schemaIntrospection.directives ? schemaIntrospection.directives.map(buildDirective) : []; // Then produce and return a Schema with these types. return new GraphQLSchema({ description: schemaIntrospection.description, query: queryType, mutation: mutationType, subscription: subscriptionType, types: Object.values(typeMap), directives, assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid, }); // Given a type reference in introspection, return the GraphQLType instance. // preferring cached instances before building new instances. function getType(typeRef) { if (typeRef.kind === TypeKind.LIST) { const itemRef = typeRef.ofType; if (!itemRef) { throw new Error('Decorated type deeper than introspection query.'); } return new GraphQLList(getType(itemRef)); } if (typeRef.kind === TypeKind.NON_NULL) { const nullableRef = typeRef.ofType; if (!nullableRef) { throw new Error('Decorated type deeper than introspection query.'); } const nullableType = getType(nullableRef); return new GraphQLNonNull(assertNullableType(nullableType)); } return getNamedType(typeRef); } function getNamedType(typeRef) { const typeName = typeRef.name; if (!typeName) { throw new Error(`Unknown type reference: ${(0,inspect/* inspect */.N)(typeRef)}.`); } const type = typeMap[typeName]; if (!type) { throw new Error( `Invalid or incomplete schema, unknown type: ${typeName}. Ensure that a full introspection query is used in order to build a client schema.`, ); } return type; } function getObjectType(typeRef) { return assertObjectType(getNamedType(typeRef)); } function getInterfaceType(typeRef) { return assertInterfaceType(getNamedType(typeRef)); } // Given a type's introspection result, construct the correct // GraphQLType instance. function buildType(type) { // eslint-disable-next-line @typescript-eslint/prefer-optional-chain if (type != null && type.name != null && type.kind != null) { // FIXME: Properly type IntrospectionType, it's a breaking change so fix in v17 // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check switch (type.kind) { case TypeKind.SCALAR: return buildScalarDef(type); case TypeKind.OBJECT: return buildObjectDef(type); case TypeKind.INTERFACE: return buildInterfaceDef(type); case TypeKind.UNION: return buildUnionDef(type); case TypeKind.ENUM: return buildEnumDef(type); case TypeKind.INPUT_OBJECT: return buildInputObjectDef(type); } } const typeStr = (0,inspect/* inspect */.N)(type); throw new Error( `Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${typeStr}.`, ); } function buildScalarDef(scalarIntrospection) { return new GraphQLScalarType({ name: scalarIntrospection.name, description: scalarIntrospection.description, specifiedByURL: scalarIntrospection.specifiedByURL, }); } function buildImplementationsList(implementingIntrospection) { // TODO: Temporary workaround until GraphQL ecosystem will fully support // 'interfaces' on interface types. if ( implementingIntrospection.interfaces === null && implementingIntrospection.kind === TypeKind.INTERFACE ) { return []; } if (!implementingIntrospection.interfaces) { const implementingIntrospectionStr = (0,inspect/* inspect */.N)(implementingIntrospection); throw new Error( `Introspection result missing interfaces: ${implementingIntrospectionStr}.`, ); } return implementingIntrospection.interfaces.map(getInterfaceType); } function buildObjectDef(objectIntrospection) { return new GraphQLObjectType({ name: objectIntrospection.name, description: objectIntrospection.description, interfaces: () => buildImplementationsList(objectIntrospection), fields: () => buildFieldDefMap(objectIntrospection), }); } function buildInterfaceDef(interfaceIntrospection) { return new GraphQLInterfaceType({ name: interfaceIntrospection.name, description: interfaceIntrospection.description, interfaces: () => buildImplementationsList(interfaceIntrospection), fields: () => buildFieldDefMap(interfaceIntrospection), }); } function buildUnionDef(unionIntrospection) { if (!unionIntrospection.possibleTypes) { const unionIntrospectionStr = (0,inspect/* inspect */.N)(unionIntrospection); throw new Error( `Introspection result missing possibleTypes: ${unionIntrospectionStr}.`, ); } return new GraphQLUnionType({ name: unionIntrospection.name, description: unionIntrospection.description, types: () => unionIntrospection.possibleTypes.map(getObjectType), }); } function buildEnumDef(enumIntrospection) { if (!enumIntrospection.enumValues) { const enumIntrospectionStr = (0,inspect/* inspect */.N)(enumIntrospection); throw new Error( `Introspection result missing enumValues: ${enumIntrospectionStr}.`, ); } return new GraphQLEnumType({ name: enumIntrospection.name, description: enumIntrospection.description, values: keyValMap( enumIntrospection.enumValues, (valueIntrospection) => valueIntrospection.name, (valueIntrospection) => ({ description: valueIntrospection.description, deprecationReason: valueIntrospection.deprecationReason, }), ), }); } function buildInputObjectDef(inputObjectIntrospection) { if (!inputObjectIntrospection.inputFields) { const inputObjectIntrospectionStr = (0,inspect/* inspect */.N)(inputObjectIntrospection); throw new Error( `Introspection result missing inputFields: ${inputObjectIntrospectionStr}.`, ); } return new GraphQLInputObjectType({ name: inputObjectIntrospection.name, description: inputObjectIntrospection.description, fields: () => buildInputValueDefMap(inputObjectIntrospection.inputFields), isOneOf: inputObjectIntrospection.isOneOf, }); } function buildFieldDefMap(typeIntrospection) { if (!typeIntrospection.fields) { throw new Error( `Introspection result missing fields: ${(0,inspect/* inspect */.N)(typeIntrospection)}.`, ); } return keyValMap( typeIntrospection.fields, (fieldIntrospection) => fieldIntrospection.name, buildField, ); } function buildField(fieldIntrospection) { const type = getType(fieldIntrospection.type); if (!isOutputType(type)) { const typeStr = (0,inspect/* inspect */.N)(type); throw new Error( `Introspection must provide output type for fields, but received: ${typeStr}.`, ); } if (!fieldIntrospection.args) { const fieldIntrospectionStr = (0,inspect/* inspect */.N)(fieldIntrospection); throw new Error( `Introspection result missing field args: ${fieldIntrospectionStr}.`, ); } return { description: fieldIntrospection.description, deprecationReason: fieldIntrospection.deprecationReason, type, args: buildInputValueDefMap(fieldIntrospection.args), }; } function buildInputValueDefMap(inputValueIntrospections) { return keyValMap( inputValueIntrospections, (inputValue) => inputValue.name, buildInputValue, ); } function buildInputValue(inputValueIntrospection) { const type = getType(inputValueIntrospection.type); if (!isInputType(type)) { const typeStr = (0,inspect/* inspect */.N)(type); throw new Error( `Introspection must provide input type for arguments, but received: ${typeStr}.`, ); } const defaultValue = inputValueIntrospection.defaultValue != null ? valueFromAST((0,parser/* parseValue */.$x)(inputValueIntrospection.defaultValue), type) : undefined; return { description: inputValueIntrospection.description, type, defaultValue, deprecationReason: inputValueIntrospection.deprecationReason, }; } function buildDirective(directiveIntrospection) { if (!directiveIntrospection.args) { const directiveIntrospectionStr = (0,inspect/* inspect */.N)(directiveIntrospection); throw new Error( `Introspection result missing directive args: ${directiveIntrospectionStr}.`, ); } if (!directiveIntrospection.locations) { const directiveIntrospectionStr = (0,inspect/* inspect */.N)(directiveIntrospection); throw new Error( `Introspection result missing directive locations: ${directiveIntrospectionStr}.`, ); } return new GraphQLDirective({ name: directiveIntrospection.name, description: directiveIntrospection.description, isRepeatable: directiveIntrospection.isRepeatable, locations: directiveIntrospection.locations.slice(), args: buildInputValueDefMap(directiveIntrospection.args), }); } } ;// ./node_modules/graphql/utilities/extendSchema.mjs /** * Produces a new schema given an existing schema and a document which may * contain GraphQL type extensions and definitions. The original schema will * remain unaltered. * * Because a schema represents a graph of references, a schema cannot be * extended without effectively making an entire copy. We do not know until it's * too late if subgraphs remain unchanged. * * This algorithm copies the provided schema, applying extensions while * producing the copy. The original schema remains unaltered. */ function extendSchema(schema, documentAST, options) { assertSchema(schema); (documentAST != null && documentAST.kind === kinds/* Kind */.b.DOCUMENT) || (0,devAssert/* devAssert */.U)(false, 'Must provide valid Document AST.'); if ( (options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true ) { assertValidSDLExtension(documentAST, schema); } const schemaConfig = schema.toConfig(); const extendedConfig = extendSchemaImpl(schemaConfig, documentAST, options); return schemaConfig === extendedConfig ? schema : new GraphQLSchema(extendedConfig); } /** * @internal */ function extendSchemaImpl(schemaConfig, documentAST, options) { var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid; // Collect the type definitions and extensions found in the document. const typeDefs = []; const typeExtensionsMap = Object.create(null); // New directives and types are separate because a directives and types can // have the same name. For example, a type named "skip". const directiveDefs = []; let schemaDef; // Schema extensions are collected which may add additional operation types. const schemaExtensions = []; for (const def of documentAST.definitions) { if (def.kind === kinds/* Kind */.b.SCHEMA_DEFINITION) { schemaDef = def; } else if (def.kind === kinds/* Kind */.b.SCHEMA_EXTENSION) { schemaExtensions.push(def); } else if ((0,predicates/* isTypeDefinitionNode */.a6)(def)) { typeDefs.push(def); } else if ((0,predicates/* isTypeExtensionNode */.i7)(def)) { const extendedTypeName = def.name.value; const existingTypeExtensions = typeExtensionsMap[extendedTypeName]; typeExtensionsMap[extendedTypeName] = existingTypeExtensions ? existingTypeExtensions.concat([def]) : [def]; } else if (def.kind === kinds/* Kind */.b.DIRECTIVE_DEFINITION) { directiveDefs.push(def); } } // If this document contains no new types, extensions, or directives then // return the same unmodified GraphQLSchema instance. if ( Object.keys(typeExtensionsMap).length === 0 && typeDefs.length === 0 && directiveDefs.length === 0 && schemaExtensions.length === 0 && schemaDef == null ) { return schemaConfig; } const typeMap = Object.create(null); for (const existingType of schemaConfig.types) { typeMap[existingType.name] = extendNamedType(existingType); } for (const typeNode of typeDefs) { var _stdTypeMap$name; const name = typeNode.name.value; typeMap[name] = (_stdTypeMap$name = stdTypeMap[name]) !== null && _stdTypeMap$name !== void 0 ? _stdTypeMap$name : buildType(typeNode); } const operationTypes = { // Get the extended root operation types. query: schemaConfig.query && replaceNamedType(schemaConfig.query), mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation), subscription: schemaConfig.subscription && replaceNamedType(schemaConfig.subscription), // Then, incorporate schema definition and all schema extensions. ...(schemaDef && getOperationTypes([schemaDef])), ...getOperationTypes(schemaExtensions), }; // Then produce and return a Schema config with these types. return { description: (_schemaDef = schemaDef) === null || _schemaDef === void 0 ? void 0 : (_schemaDef$descriptio = _schemaDef.description) === null || _schemaDef$descriptio === void 0 ? void 0 : _schemaDef$descriptio.value, ...operationTypes, types: Object.values(typeMap), directives: [ ...schemaConfig.directives.map(replaceDirective), ...directiveDefs.map(buildDirective), ], extensions: Object.create(null), astNode: (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0 ? _schemaDef2 : schemaConfig.astNode, extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions), assumeValid: (_options$assumeValid = options === null || options === void 0 ? void 0 : options.assumeValid) !== null && _options$assumeValid !== void 0 ? _options$assumeValid : false, }; // Below are functions used for producing this schema that have closed over // this scope and have access to the schema, cache, and newly defined types. function replaceType(type) { if (isListType(type)) { // @ts-expect-error return new GraphQLList(replaceType(type.ofType)); } if (isNonNullType(type)) { // @ts-expect-error return new GraphQLNonNull(replaceType(type.ofType)); } // @ts-expect-error FIXME return replaceNamedType(type); } function replaceNamedType(type) { // Note: While this could make early assertions to get the correctly // typed values, that would throw immediately while type system // validation with validateSchema() will produce more actionable results. return typeMap[type.name]; } function replaceDirective(directive) { const config = directive.toConfig(); return new GraphQLDirective({ ...config, args: mapValue(config.args, extendArg), }); } function extendNamedType(type) { if (isIntrospectionType(type) || isSpecifiedScalarType(type)) { // Builtin types are not extended. return type; } if (isScalarType(type)) { return extendScalarType(type); } if (isObjectType(type)) { return extendObjectType(type); } if (isInterfaceType(type)) { return extendInterfaceType(type); } if (isUnionType(type)) { return extendUnionType(type); } if (isEnumType(type)) { return extendEnumType(type); } if (isInputObjectType(type)) { return extendInputObjectType(type); } /* c8 ignore next 3 */ // Not reachable, all possible type definition nodes have been considered. false || (0,invariant/* invariant */.V)(false, 'Unexpected type: ' + (0,inspect/* inspect */.N)(type)); } function extendInputObjectType(type) { var _typeExtensionsMap$co; const config = type.toConfig(); const extensions = (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : []; return new GraphQLInputObjectType({ ...config, fields: () => ({ ...mapValue(config.fields, (field) => ({ ...field, type: replaceType(field.type), })), ...buildInputFieldMap(extensions), }), extensionASTNodes: config.extensionASTNodes.concat(extensions), }); } function extendEnumType(type) { var _typeExtensionsMap$ty; const config = type.toConfig(); const extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : []; return new GraphQLEnumType({ ...config, values: { ...config.values, ...buildEnumValueMap(extensions) }, extensionASTNodes: config.extensionASTNodes.concat(extensions), }); } function extendScalarType(type) { var _typeExtensionsMap$co2; const config = type.toConfig(); const extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : []; let specifiedByURL = config.specifiedByURL; for (const extensionNode of extensions) { var _getSpecifiedByURL; specifiedByURL = (_getSpecifiedByURL = getSpecifiedByURL(extensionNode)) !== null && _getSpecifiedByURL !== void 0 ? _getSpecifiedByURL : specifiedByURL; } return new GraphQLScalarType({ ...config, specifiedByURL, extensionASTNodes: config.extensionASTNodes.concat(extensions), }); } function extendObjectType(type) { var _typeExtensionsMap$co3; const config = type.toConfig(); const extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : []; return new GraphQLObjectType({ ...config, interfaces: () => [ ...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions), ], fields: () => ({ ...mapValue(config.fields, extendField), ...buildFieldMap(extensions), }), extensionASTNodes: config.extensionASTNodes.concat(extensions), }); } function extendInterfaceType(type) { var _typeExtensionsMap$co4; const config = type.toConfig(); const extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : []; return new GraphQLInterfaceType({ ...config, interfaces: () => [ ...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions), ], fields: () => ({ ...mapValue(config.fields, extendField), ...buildFieldMap(extensions), }), extensionASTNodes: config.extensionASTNodes.concat(extensions), }); } function extendUnionType(type) { var _typeExtensionsMap$co5; const config = type.toConfig(); const extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : []; return new GraphQLUnionType({ ...config, types: () => [ ...type.getTypes().map(replaceNamedType), ...buildUnionTypes(extensions), ], extensionASTNodes: config.extensionASTNodes.concat(extensions), }); } function extendField(field) { return { ...field, type: replaceType(field.type), args: field.args && mapValue(field.args, extendArg), }; } function extendArg(arg) { return { ...arg, type: replaceType(arg.type) }; } function getOperationTypes(nodes) { const opTypes = {}; for (const node of nodes) { var _node$operationTypes; // FIXME: https://github.com/graphql/graphql-js/issues/2203 const operationTypesNodes = /* c8 ignore next */ (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : []; for (const operationType of operationTypesNodes) { // Note: While this could make early assertions to get the correctly // typed values below, that would throw immediately while type system // validation with validateSchema() will produce more actionable results. // @ts-expect-error opTypes[operationType.operation] = getNamedType(operationType.type); } } return opTypes; } function getNamedType(node) { var _stdTypeMap$name2; const name = node.name.value; const type = (_stdTypeMap$name2 = stdTypeMap[name]) !== null && _stdTypeMap$name2 !== void 0 ? _stdTypeMap$name2 : typeMap[name]; if (type === undefined) { throw new Error(`Unknown type: "${name}".`); } return type; } function getWrappedType(node) { if (node.kind === kinds/* Kind */.b.LIST_TYPE) { return new GraphQLList(getWrappedType(node.type)); } if (node.kind === kinds/* Kind */.b.NON_NULL_TYPE) { return new GraphQLNonNull(getWrappedType(node.type)); } return getNamedType(node); } function buildDirective(node) { var _node$description; return new GraphQLDirective({ name: node.name.value, description: (_node$description = node.description) === null || _node$description === void 0 ? void 0 : _node$description.value, // @ts-expect-error locations: node.locations.map(({ value }) => value), isRepeatable: node.repeatable, args: buildArgumentMap(node.arguments), astNode: node, }); } function buildFieldMap(nodes) { const fieldConfigMap = Object.create(null); for (const node of nodes) { var _node$fields; // FIXME: https://github.com/graphql/graphql-js/issues/2203 const nodeFields = /* c8 ignore next */ (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : []; for (const field of nodeFields) { var _field$description; fieldConfigMap[field.name.value] = { // Note: While this could make assertions to get the correctly typed // value, that would throw immediately while type system validation // with validateSchema() will produce more actionable results. type: getWrappedType(field.type), description: (_field$description = field.description) === null || _field$description === void 0 ? void 0 : _field$description.value, args: buildArgumentMap(field.arguments), deprecationReason: getDeprecationReason(field), astNode: field, }; } } return fieldConfigMap; } function buildArgumentMap(args) { // FIXME: https://github.com/graphql/graphql-js/issues/2203 const argsNodes = /* c8 ignore next */ args !== null && args !== void 0 ? args : []; const argConfigMap = Object.create(null); for (const arg of argsNodes) { var _arg$description; // Note: While this could make assertions to get the correctly typed // value, that would throw immediately while type system validation // with validateSchema() will produce more actionable results. const type = getWrappedType(arg.type); argConfigMap[arg.name.value] = { type, description: (_arg$description = arg.description) === null || _arg$description === void 0 ? void 0 : _arg$description.value, defaultValue: valueFromAST(arg.defaultValue, type), deprecationReason: getDeprecationReason(arg), astNode: arg, }; } return argConfigMap; } function buildInputFieldMap(nodes) { const inputFieldMap = Object.create(null); for (const node of nodes) { var _node$fields2; // FIXME: https://github.com/graphql/graphql-js/issues/2203 const fieldsNodes = /* c8 ignore next */ (_node$fields2 = node.fields) !== null && _node$fields2 !== void 0 ? _node$fields2 : []; for (const field of fieldsNodes) { var _field$description2; // Note: While this could make assertions to get the correctly typed // value, that would throw immediately while type system validation // with validateSchema() will produce more actionable results. const type = getWrappedType(field.type); inputFieldMap[field.name.value] = { type, description: (_field$description2 = field.description) === null || _field$description2 === void 0 ? void 0 : _field$description2.value, defaultValue: valueFromAST(field.defaultValue, type), deprecationReason: getDeprecationReason(field), astNode: field, }; } } return inputFieldMap; } function buildEnumValueMap(nodes) { const enumValueMap = Object.create(null); for (const node of nodes) { var _node$values; // FIXME: https://github.com/graphql/graphql-js/issues/2203 const valuesNodes = /* c8 ignore next */ (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : []; for (const value of valuesNodes) { var _value$description; enumValueMap[value.name.value] = { description: (_value$description = value.description) === null || _value$description === void 0 ? void 0 : _value$description.value, deprecationReason: getDeprecationReason(value), astNode: value, }; } } return enumValueMap; } function buildInterfaces(nodes) { // Note: While this could make assertions to get the correctly typed // values below, that would throw immediately while type system // validation with validateSchema() will produce more actionable results. // @ts-expect-error return nodes.flatMap( // FIXME: https://github.com/graphql/graphql-js/issues/2203 (node) => { var _node$interfaces$map, _node$interfaces; return ( /* c8 ignore next */ (_node$interfaces$map = (_node$interfaces = node.interfaces) === null || _node$interfaces === void 0 ? void 0 : _node$interfaces.map(getNamedType)) !== null && _node$interfaces$map !== void 0 ? _node$interfaces$map : [] ); }, ); } function buildUnionTypes(nodes) { // Note: While this could make assertions to get the correctly typed // values below, that would throw immediately while type system // validation with validateSchema() will produce more actionable results. // @ts-expect-error return nodes.flatMap( // FIXME: https://github.com/graphql/graphql-js/issues/2203 (node) => { var _node$types$map, _node$types; return ( /* c8 ignore next */ (_node$types$map = (_node$types = node.types) === null || _node$types === void 0 ? void 0 : _node$types.map(getNamedType)) !== null && _node$types$map !== void 0 ? _node$types$map : [] ); }, ); } function buildType(astNode) { var _typeExtensionsMap$na; const name = astNode.name.value; const extensionASTNodes = (_typeExtensionsMap$na = typeExtensionsMap[name]) !== null && _typeExtensionsMap$na !== void 0 ? _typeExtensionsMap$na : []; switch (astNode.kind) { case kinds/* Kind */.b.OBJECT_TYPE_DEFINITION: { var _astNode$description; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLObjectType({ name, description: (_astNode$description = astNode.description) === null || _astNode$description === void 0 ? void 0 : _astNode$description.value, interfaces: () => buildInterfaces(allNodes), fields: () => buildFieldMap(allNodes), astNode, extensionASTNodes, }); } case kinds/* Kind */.b.INTERFACE_TYPE_DEFINITION: { var _astNode$description2; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLInterfaceType({ name, description: (_astNode$description2 = astNode.description) === null || _astNode$description2 === void 0 ? void 0 : _astNode$description2.value, interfaces: () => buildInterfaces(allNodes), fields: () => buildFieldMap(allNodes), astNode, extensionASTNodes, }); } case kinds/* Kind */.b.ENUM_TYPE_DEFINITION: { var _astNode$description3; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLEnumType({ name, description: (_astNode$description3 = astNode.description) === null || _astNode$description3 === void 0 ? void 0 : _astNode$description3.value, values: buildEnumValueMap(allNodes), astNode, extensionASTNodes, }); } case kinds/* Kind */.b.UNION_TYPE_DEFINITION: { var _astNode$description4; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLUnionType({ name, description: (_astNode$description4 = astNode.description) === null || _astNode$description4 === void 0 ? void 0 : _astNode$description4.value, types: () => buildUnionTypes(allNodes), astNode, extensionASTNodes, }); } case kinds/* Kind */.b.SCALAR_TYPE_DEFINITION: { var _astNode$description5; return new GraphQLScalarType({ name, description: (_astNode$description5 = astNode.description) === null || _astNode$description5 === void 0 ? void 0 : _astNode$description5.value, specifiedByURL: getSpecifiedByURL(astNode), astNode, extensionASTNodes, }); } case kinds/* Kind */.b.INPUT_OBJECT_TYPE_DEFINITION: { var _astNode$description6; const allNodes = [astNode, ...extensionASTNodes]; return new GraphQLInputObjectType({ name, description: (_astNode$description6 = astNode.description) === null || _astNode$description6 === void 0 ? void 0 : _astNode$description6.value, fields: () => buildInputFieldMap(allNodes), astNode, extensionASTNodes, isOneOf: isOneOf(astNode), }); } } } } const stdTypeMap = keyMap( [...specifiedScalarTypes, ...introspectionTypes], (type) => type.name, ); /** * Given a field or enum value node, returns the string value for the * deprecation reason. */ function getDeprecationReason(node) { const deprecated = getDirectiveValues(GraphQLDeprecatedDirective, node); // @ts-expect-error validated by `getDirectiveValues` return deprecated === null || deprecated === void 0 ? void 0 : deprecated.reason; } /** * Given a scalar node, returns the string value for the specifiedByURL. */ function getSpecifiedByURL(node) { const specifiedBy = getDirectiveValues(GraphQLSpecifiedByDirective, node); // @ts-expect-error validated by `getDirectiveValues` return specifiedBy === null || specifiedBy === void 0 ? void 0 : specifiedBy.url; } /** * Given an input object node, returns if the node should be OneOf. */ function isOneOf(node) { return Boolean(getDirectiveValues(GraphQLOneOfDirective, node)); } ;// ./node_modules/graphql/utilities/buildASTSchema.mjs /** * This takes the ast of a schema document produced by the parse function in * src/language/parser.js. * * If no schema definition is provided, then it will look for types named Query, * Mutation and Subscription. * * Given that AST it constructs a GraphQLSchema. The resulting schema * has no resolve methods, so execution will use default resolvers. */ function buildASTSchema(documentAST, options) { (documentAST != null && documentAST.kind === kinds/* Kind */.b.DOCUMENT) || (0,devAssert/* devAssert */.U)(false, 'Must provide valid Document AST.'); if ( (options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true ) { assertValidSDL(documentAST); } const emptySchemaConfig = { description: undefined, types: [], directives: [], extensions: Object.create(null), extensionASTNodes: [], assumeValid: false, }; const config = extendSchemaImpl(emptySchemaConfig, documentAST, options); if (config.astNode == null) { for (const type of config.types) { switch (type.name) { // Note: While this could make early assertions to get the correctly // typed values below, that would throw immediately while type system // validation with validateSchema() will produce more actionable results. case 'Query': // @ts-expect-error validated in `validateSchema` config.query = type; break; case 'Mutation': // @ts-expect-error validated in `validateSchema` config.mutation = type; break; case 'Subscription': // @ts-expect-error validated in `validateSchema` config.subscription = type; break; } } } const directives = [ ...config.directives, // If specified directives were not explicitly declared, add them. ...specifiedDirectives.filter((stdDirective) => config.directives.every( (directive) => directive.name !== stdDirective.name, ), ), ]; return new GraphQLSchema({ ...config, directives }); } /** * A helper function to build a GraphQLSchema directly from a source * document. */ function buildSchema(source, options) { const document = (0,parser/* parse */.qg)(source, { noLocation: options === null || options === void 0 ? void 0 : options.noLocation, allowLegacyFragmentVariables: options === null || options === void 0 ? void 0 : options.allowLegacyFragmentVariables, }); return buildASTSchema(document, { assumeValidSDL: options === null || options === void 0 ? void 0 : options.assumeValidSDL, assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid, }); } ;// ./node_modules/graphql/utilities/lexicographicSortSchema.mjs /** * Sort GraphQLSchema. * * This function returns a sorted copy of the given GraphQLSchema. */ function lexicographicSortSchema(schema) { const schemaConfig = schema.toConfig(); const typeMap = keyValMap( sortByName(schemaConfig.types), (type) => type.name, sortNamedType, ); return new GraphQLSchema({ ...schemaConfig, types: Object.values(typeMap), directives: sortByName(schemaConfig.directives).map(sortDirective), query: replaceMaybeType(schemaConfig.query), mutation: replaceMaybeType(schemaConfig.mutation), subscription: replaceMaybeType(schemaConfig.subscription), }); function replaceType(type) { if (isListType(type)) { // @ts-expect-error return new GraphQLList(replaceType(type.ofType)); } else if (isNonNullType(type)) { // @ts-expect-error return new GraphQLNonNull(replaceType(type.ofType)); } // @ts-expect-error FIXME: TS Conversion return replaceNamedType(type); } function replaceNamedType(type) { return typeMap[type.name]; } function replaceMaybeType(maybeType) { return maybeType && replaceNamedType(maybeType); } function sortDirective(directive) { const config = directive.toConfig(); return new GraphQLDirective({ ...config, locations: sortBy(config.locations, (x) => x), args: sortArgs(config.args), }); } function sortArgs(args) { return sortObjMap(args, (arg) => ({ ...arg, type: replaceType(arg.type) })); } function sortFields(fieldsMap) { return sortObjMap(fieldsMap, (field) => ({ ...field, type: replaceType(field.type), args: field.args && sortArgs(field.args), })); } function sortInputFields(fieldsMap) { return sortObjMap(fieldsMap, (field) => ({ ...field, type: replaceType(field.type), })); } function sortTypes(array) { return sortByName(array).map(replaceNamedType); } function sortNamedType(type) { if (isScalarType(type) || isIntrospectionType(type)) { return type; } if (isObjectType(type)) { const config = type.toConfig(); return new GraphQLObjectType({ ...config, interfaces: () => sortTypes(config.interfaces), fields: () => sortFields(config.fields), }); } if (isInterfaceType(type)) { const config = type.toConfig(); return new GraphQLInterfaceType({ ...config, interfaces: () => sortTypes(config.interfaces), fields: () => sortFields(config.fields), }); } if (isUnionType(type)) { const config = type.toConfig(); return new GraphQLUnionType({ ...config, types: () => sortTypes(config.types), }); } if (isEnumType(type)) { const config = type.toConfig(); return new GraphQLEnumType({ ...config, values: sortObjMap(config.values, (value) => value), }); } if (isInputObjectType(type)) { const config = type.toConfig(); return new GraphQLInputObjectType({ ...config, fields: () => sortInputFields(config.fields), }); } /* c8 ignore next 3 */ // Not reachable, all possible types have been considered. false || (0,invariant/* invariant */.V)(false, 'Unexpected type: ' + (0,inspect/* inspect */.N)(type)); } } function sortObjMap(map, sortValueFn) { const sortedMap = Object.create(null); for (const key of Object.keys(map).sort(naturalCompare)) { sortedMap[key] = sortValueFn(map[key]); } return sortedMap; } function sortByName(array) { return sortBy(array, (obj) => obj.name); } function sortBy(array, mapToKey) { return array.slice().sort((obj1, obj2) => { const key1 = mapToKey(obj1); const key2 = mapToKey(obj2); return naturalCompare(key1, key2); }); } // EXTERNAL MODULE: ./node_modules/graphql/language/blockString.mjs var language_blockString = __webpack_require__(43052); ;// ./node_modules/graphql/utilities/printSchema.mjs function printSchema(schema) { return printFilteredSchema( schema, (n) => !isSpecifiedDirective(n), isDefinedType, ); } function printIntrospectionSchema(schema) { return printFilteredSchema(schema, isSpecifiedDirective, isIntrospectionType); } function isDefinedType(type) { return !isSpecifiedScalarType(type) && !isIntrospectionType(type); } function printFilteredSchema(schema, directiveFilter, typeFilter) { const directives = schema.getDirectives().filter(directiveFilter); const types = Object.values(schema.getTypeMap()).filter(typeFilter); return [ printSchemaDefinition(schema), ...directives.map((directive) => printDirective(directive)), ...types.map((type) => printType(type)), ] .filter(Boolean) .join('\n\n'); } function printSchemaDefinition(schema) { if (schema.description == null && isSchemaOfCommonNames(schema)) { return; } const operationTypes = []; const queryType = schema.getQueryType(); if (queryType) { operationTypes.push(` query: ${queryType.name}`); } const mutationType = schema.getMutationType(); if (mutationType) { operationTypes.push(` mutation: ${mutationType.name}`); } const subscriptionType = schema.getSubscriptionType(); if (subscriptionType) { operationTypes.push(` subscription: ${subscriptionType.name}`); } return printDescription(schema) + `schema {\n${operationTypes.join('\n')}\n}`; } /** * GraphQL schema define root types for each type of operation. These types are * the same as any other type and can be named in any manner, however there is * a common naming convention: * * ```graphql * schema { * query: Query * mutation: Mutation * subscription: Subscription * } * ``` * * When using this naming convention, the schema description can be omitted. */ function isSchemaOfCommonNames(schema) { const queryType = schema.getQueryType(); if (queryType && queryType.name !== 'Query') { return false; } const mutationType = schema.getMutationType(); if (mutationType && mutationType.name !== 'Mutation') { return false; } const subscriptionType = schema.getSubscriptionType(); if (subscriptionType && subscriptionType.name !== 'Subscription') { return false; } return true; } function printType(type) { if (isScalarType(type)) { return printScalar(type); } if (isObjectType(type)) { return printObject(type); } if (isInterfaceType(type)) { return printInterface(type); } if (isUnionType(type)) { return printUnion(type); } if (isEnumType(type)) { return printEnum(type); } if (isInputObjectType(type)) { return printInputObject(type); } /* c8 ignore next 3 */ // Not reachable, all possible types have been considered. false || (0,invariant/* invariant */.V)(false, 'Unexpected type: ' + (0,inspect/* inspect */.N)(type)); } function printScalar(type) { return ( printDescription(type) + `scalar ${type.name}` + printSpecifiedByURL(type) ); } function printImplementedInterfaces(type) { const interfaces = type.getInterfaces(); return interfaces.length ? ' implements ' + interfaces.map((i) => i.name).join(' & ') : ''; } function printObject(type) { return ( printDescription(type) + `type ${type.name}` + printImplementedInterfaces(type) + printFields(type) ); } function printInterface(type) { return ( printDescription(type) + `interface ${type.name}` + printImplementedInterfaces(type) + printFields(type) ); } function printUnion(type) { const types = type.getTypes(); const possibleTypes = types.length ? ' = ' + types.join(' | ') : ''; return printDescription(type) + 'union ' + type.name + possibleTypes; } function printEnum(type) { const values = type .getValues() .map( (value, i) => printDescription(value, ' ', !i) + ' ' + value.name + printDeprecated(value.deprecationReason), ); return printDescription(type) + `enum ${type.name}` + printBlock(values); } function printInputObject(type) { const fields = Object.values(type.getFields()).map( (f, i) => printDescription(f, ' ', !i) + ' ' + printInputValue(f), ); return ( printDescription(type) + `input ${type.name}` + (type.isOneOf ? ' @oneOf' : '') + printBlock(fields) ); } function printFields(type) { const fields = Object.values(type.getFields()).map( (f, i) => printDescription(f, ' ', !i) + ' ' + f.name + printArgs(f.args, ' ') + ': ' + String(f.type) + printDeprecated(f.deprecationReason), ); return printBlock(fields); } function printBlock(items) { return items.length !== 0 ? ' {\n' + items.join('\n') + '\n}' : ''; } function printArgs(args, indentation = '') { if (args.length === 0) { return ''; } // If every arg does not have a description, print them on one line. if (args.every((arg) => !arg.description)) { return '(' + args.map(printInputValue).join(', ') + ')'; } return ( '(\n' + args .map( (arg, i) => printDescription(arg, ' ' + indentation, !i) + ' ' + indentation + printInputValue(arg), ) .join('\n') + '\n' + indentation + ')' ); } function printInputValue(arg) { const defaultAST = astFromValue(arg.defaultValue, arg.type); let argDecl = arg.name + ': ' + String(arg.type); if (defaultAST) { argDecl += ` = ${(0,printer.print)(defaultAST)}`; } return argDecl + printDeprecated(arg.deprecationReason); } function printDirective(directive) { return ( printDescription(directive) + 'directive @' + directive.name + printArgs(directive.args) + (directive.isRepeatable ? ' repeatable' : '') + ' on ' + directive.locations.join(' | ') ); } function printDeprecated(reason) { if (reason == null) { return ''; } if (reason !== DEFAULT_DEPRECATION_REASON) { const astValue = (0,printer.print)({ kind: kinds/* Kind */.b.STRING, value: reason, }); return ` @deprecated(reason: ${astValue})`; } return ' @deprecated'; } function printSpecifiedByURL(scalar) { if (scalar.specifiedByURL == null) { return ''; } const astValue = (0,printer.print)({ kind: kinds/* Kind */.b.STRING, value: scalar.specifiedByURL, }); return ` @specifiedBy(url: ${astValue})`; } function printDescription(def, indentation = '', firstInBlock = true) { const { description } = def; if (description == null) { return ''; } const blockString = (0,printer.print)({ kind: kinds/* Kind */.b.STRING, value: description, block: (0,language_blockString/* isPrintableAsBlockString */.CS)(description), }); const prefix = indentation && !firstInBlock ? '\n' + indentation : indentation; return prefix + blockString.replace(/\n/g, '\n' + indentation) + '\n'; } ;// ./node_modules/graphql/utilities/concatAST.mjs /** * Provided a collection of ASTs, presumably each from different files, * concatenate the ASTs together into batched AST, useful for validating many * GraphQL source files which together represent one conceptual application. */ function concatAST(documents) { const definitions = []; for (const doc of documents) { definitions.push(...doc.definitions); } return { kind: kinds/* Kind */.b.DOCUMENT, definitions, }; } ;// ./node_modules/graphql/utilities/separateOperations.mjs /** * separateOperations accepts a single AST document which may contain many * operations and fragments and returns a collection of AST documents each of * which contains a single operation as well the fragment definitions it * refers to. */ function separateOperations(documentAST) { const operations = []; const depGraph = Object.create(null); // Populate metadata and build a dependency graph. for (const definitionNode of documentAST.definitions) { switch (definitionNode.kind) { case kinds/* Kind */.b.OPERATION_DEFINITION: operations.push(definitionNode); break; case kinds/* Kind */.b.FRAGMENT_DEFINITION: depGraph[definitionNode.name.value] = collectDependencies( definitionNode.selectionSet, ); break; default: // ignore non-executable definitions } } // For each operation, produce a new synthesized AST which includes only what // is necessary for completing that operation. const separatedDocumentASTs = Object.create(null); for (const operation of operations) { const dependencies = new Set(); for (const fragmentName of collectDependencies(operation.selectionSet)) { collectTransitiveDependencies(dependencies, depGraph, fragmentName); } // Provides the empty string for anonymous operations. const operationName = operation.name ? operation.name.value : ''; // The list of definition nodes to be included for this operation, sorted // to retain the same order as the original document. separatedDocumentASTs[operationName] = { kind: kinds/* Kind */.b.DOCUMENT, definitions: documentAST.definitions.filter( (node) => node === operation || (node.kind === kinds/* Kind */.b.FRAGMENT_DEFINITION && dependencies.has(node.name.value)), ), }; } return separatedDocumentASTs; } // From a dependency graph, collects a list of transitive dependencies by // recursing through a dependency graph. function collectTransitiveDependencies(collected, depGraph, fromName) { if (!collected.has(fromName)) { collected.add(fromName); const immediateDeps = depGraph[fromName]; if (immediateDeps !== undefined) { for (const toName of immediateDeps) { collectTransitiveDependencies(collected, depGraph, toName); } } } } function collectDependencies(selectionSet) { const dependencies = []; (0,language_visitor/* visit */.YR)(selectionSet, { FragmentSpread(node) { dependencies.push(node.name.value); }, }); return dependencies; } ;// ./node_modules/graphql/utilities/stripIgnoredCharacters.mjs /** * Strips characters that are not significant to the validity or execution * of a GraphQL document: * - UnicodeBOM * - WhiteSpace * - LineTerminator * - Comment * - Comma * - BlockString indentation * * Note: It is required to have a delimiter character between neighboring * non-punctuator tokens and this function always uses single space as delimiter. * * It is guaranteed that both input and output documents if parsed would result * in the exact same AST except for nodes location. * * Warning: It is guaranteed that this function will always produce stable results. * However, it's not guaranteed that it will stay the same between different * releases due to bugfixes or changes in the GraphQL specification. * * Query example: * * ```graphql * query SomeQuery($foo: String!, $bar: String) { * someField(foo: $foo, bar: $bar) { * a * b { * c * d * } * } * } * ``` * * Becomes: * * ```graphql * query SomeQuery($foo:String!$bar:String){someField(foo:$foo bar:$bar){a b{c d}}} * ``` * * SDL example: * * ```graphql * """ * Type description * """ * type Foo { * """ * Field description * """ * bar: String * } * ``` * * Becomes: * * ```graphql * """Type description""" type Foo{"""Field description""" bar:String} * ``` */ function stripIgnoredCharacters(source) { const sourceObj = (0,language_source/* isSource */._)(source) ? source : new language_source/* Source */.k(source); const body = sourceObj.body; const lexer = new language_lexer/* Lexer */.J(sourceObj); let strippedBody = ''; let wasLastAddedTokenNonPunctuator = false; while (lexer.advance().kind !== language_tokenKind/* TokenKind */.Y.EOF) { const currentToken = lexer.token; const tokenKind = currentToken.kind; /** * Every two non-punctuator tokens should have space between them. * Also prevent case of non-punctuator token following by spread resulting * in invalid token (e.g. `1...` is invalid Float token). */ const isNonPunctuator = !(0,language_lexer/* isPunctuatorTokenKind */.Z)(currentToken.kind); if (wasLastAddedTokenNonPunctuator) { if (isNonPunctuator || currentToken.kind === language_tokenKind/* TokenKind */.Y.SPREAD) { strippedBody += ' '; } } const tokenBody = body.slice(currentToken.start, currentToken.end); if (tokenKind === language_tokenKind/* TokenKind */.Y.BLOCK_STRING) { strippedBody += (0,language_blockString/* printBlockString */.yo)(currentToken.value, { minimize: true, }); } else { strippedBody += tokenBody; } wasLastAddedTokenNonPunctuator = isNonPunctuator; } return strippedBody; } ;// ./node_modules/graphql/utilities/assertValidName.mjs /* c8 ignore start */ /** * Upholds the spec rules about naming. * @deprecated Please use `assertName` instead. Will be removed in v17 */ function assertValidName(name) { const error = isValidNameError(name); if (error) { throw error; } return name; } /** * Returns an Error if a name is invalid. * @deprecated Please use `assertName` instead. Will be removed in v17 */ function isValidNameError(name) { typeof name === 'string' || (0,devAssert/* devAssert */.U)(false, 'Expected name to be a string.'); if (name.startsWith('__')) { return new GraphQLError/* GraphQLError */.eO( `Name "${name}" must not begin with "__", which is reserved by GraphQL introspection.`, ); } try { assertName(name); } catch (error) { return error; } } /* c8 ignore stop */ ;// ./node_modules/graphql/utilities/findBreakingChanges.mjs var BreakingChangeType; (function (BreakingChangeType) { BreakingChangeType['TYPE_REMOVED'] = 'TYPE_REMOVED'; BreakingChangeType['TYPE_CHANGED_KIND'] = 'TYPE_CHANGED_KIND'; BreakingChangeType['TYPE_REMOVED_FROM_UNION'] = 'TYPE_REMOVED_FROM_UNION'; BreakingChangeType['VALUE_REMOVED_FROM_ENUM'] = 'VALUE_REMOVED_FROM_ENUM'; BreakingChangeType['REQUIRED_INPUT_FIELD_ADDED'] = 'REQUIRED_INPUT_FIELD_ADDED'; BreakingChangeType['IMPLEMENTED_INTERFACE_REMOVED'] = 'IMPLEMENTED_INTERFACE_REMOVED'; BreakingChangeType['FIELD_REMOVED'] = 'FIELD_REMOVED'; BreakingChangeType['FIELD_CHANGED_KIND'] = 'FIELD_CHANGED_KIND'; BreakingChangeType['REQUIRED_ARG_ADDED'] = 'REQUIRED_ARG_ADDED'; BreakingChangeType['ARG_REMOVED'] = 'ARG_REMOVED'; BreakingChangeType['ARG_CHANGED_KIND'] = 'ARG_CHANGED_KIND'; BreakingChangeType['DIRECTIVE_REMOVED'] = 'DIRECTIVE_REMOVED'; BreakingChangeType['DIRECTIVE_ARG_REMOVED'] = 'DIRECTIVE_ARG_REMOVED'; BreakingChangeType['REQUIRED_DIRECTIVE_ARG_ADDED'] = 'REQUIRED_DIRECTIVE_ARG_ADDED'; BreakingChangeType['DIRECTIVE_REPEATABLE_REMOVED'] = 'DIRECTIVE_REPEATABLE_REMOVED'; BreakingChangeType['DIRECTIVE_LOCATION_REMOVED'] = 'DIRECTIVE_LOCATION_REMOVED'; })(BreakingChangeType || (BreakingChangeType = {})); var DangerousChangeType; (function (DangerousChangeType) { DangerousChangeType['VALUE_ADDED_TO_ENUM'] = 'VALUE_ADDED_TO_ENUM'; DangerousChangeType['TYPE_ADDED_TO_UNION'] = 'TYPE_ADDED_TO_UNION'; DangerousChangeType['OPTIONAL_INPUT_FIELD_ADDED'] = 'OPTIONAL_INPUT_FIELD_ADDED'; DangerousChangeType['OPTIONAL_ARG_ADDED'] = 'OPTIONAL_ARG_ADDED'; DangerousChangeType['IMPLEMENTED_INTERFACE_ADDED'] = 'IMPLEMENTED_INTERFACE_ADDED'; DangerousChangeType['ARG_DEFAULT_VALUE_CHANGE'] = 'ARG_DEFAULT_VALUE_CHANGE'; })(DangerousChangeType || (DangerousChangeType = {})); /** * Given two schemas, returns an Array containing descriptions of all the types * of breaking changes covered by the other functions down below. */ function findBreakingChanges(oldSchema, newSchema) { // @ts-expect-error return findSchemaChanges(oldSchema, newSchema).filter( (change) => change.type in BreakingChangeType, ); } /** * Given two schemas, returns an Array containing descriptions of all the types * of potentially dangerous changes covered by the other functions down below. */ function findDangerousChanges(oldSchema, newSchema) { // @ts-expect-error return findSchemaChanges(oldSchema, newSchema).filter( (change) => change.type in DangerousChangeType, ); } function findSchemaChanges(oldSchema, newSchema) { return [ ...findTypeChanges(oldSchema, newSchema), ...findDirectiveChanges(oldSchema, newSchema), ]; } function findDirectiveChanges(oldSchema, newSchema) { const schemaChanges = []; const directivesDiff = diff( oldSchema.getDirectives(), newSchema.getDirectives(), ); for (const oldDirective of directivesDiff.removed) { schemaChanges.push({ type: BreakingChangeType.DIRECTIVE_REMOVED, description: `${oldDirective.name} was removed.`, }); } for (const [oldDirective, newDirective] of directivesDiff.persisted) { const argsDiff = diff(oldDirective.args, newDirective.args); for (const newArg of argsDiff.added) { if (isRequiredArgument(newArg)) { schemaChanges.push({ type: BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED, description: `A required arg ${newArg.name} on directive ${oldDirective.name} was added.`, }); } } for (const oldArg of argsDiff.removed) { schemaChanges.push({ type: BreakingChangeType.DIRECTIVE_ARG_REMOVED, description: `${oldArg.name} was removed from ${oldDirective.name}.`, }); } if (oldDirective.isRepeatable && !newDirective.isRepeatable) { schemaChanges.push({ type: BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED, description: `Repeatable flag was removed from ${oldDirective.name}.`, }); } for (const location of oldDirective.locations) { if (!newDirective.locations.includes(location)) { schemaChanges.push({ type: BreakingChangeType.DIRECTIVE_LOCATION_REMOVED, description: `${location} was removed from ${oldDirective.name}.`, }); } } } return schemaChanges; } function findTypeChanges(oldSchema, newSchema) { const schemaChanges = []; const typesDiff = diff( Object.values(oldSchema.getTypeMap()), Object.values(newSchema.getTypeMap()), ); for (const oldType of typesDiff.removed) { schemaChanges.push({ type: BreakingChangeType.TYPE_REMOVED, description: isSpecifiedScalarType(oldType) ? `Standard scalar ${oldType.name} was removed because it is not referenced anymore.` : `${oldType.name} was removed.`, }); } for (const [oldType, newType] of typesDiff.persisted) { if (isEnumType(oldType) && isEnumType(newType)) { schemaChanges.push(...findEnumTypeChanges(oldType, newType)); } else if (isUnionType(oldType) && isUnionType(newType)) { schemaChanges.push(...findUnionTypeChanges(oldType, newType)); } else if (isInputObjectType(oldType) && isInputObjectType(newType)) { schemaChanges.push(...findInputObjectTypeChanges(oldType, newType)); } else if (isObjectType(oldType) && isObjectType(newType)) { schemaChanges.push( ...findFieldChanges(oldType, newType), ...findImplementedInterfacesChanges(oldType, newType), ); } else if (isInterfaceType(oldType) && isInterfaceType(newType)) { schemaChanges.push( ...findFieldChanges(oldType, newType), ...findImplementedInterfacesChanges(oldType, newType), ); } else if (oldType.constructor !== newType.constructor) { schemaChanges.push({ type: BreakingChangeType.TYPE_CHANGED_KIND, description: `${oldType.name} changed from ` + `${typeKindName(oldType)} to ${typeKindName(newType)}.`, }); } } return schemaChanges; } function findInputObjectTypeChanges(oldType, newType) { const schemaChanges = []; const fieldsDiff = diff( Object.values(oldType.getFields()), Object.values(newType.getFields()), ); for (const newField of fieldsDiff.added) { if (isRequiredInputField(newField)) { schemaChanges.push({ type: BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED, description: `A required field ${newField.name} on input type ${oldType.name} was added.`, }); } else { schemaChanges.push({ type: DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED, description: `An optional field ${newField.name} on input type ${oldType.name} was added.`, }); } } for (const oldField of fieldsDiff.removed) { schemaChanges.push({ type: BreakingChangeType.FIELD_REMOVED, description: `${oldType.name}.${oldField.name} was removed.`, }); } for (const [oldField, newField] of fieldsDiff.persisted) { const isSafe = isChangeSafeForInputObjectFieldOrFieldArg( oldField.type, newField.type, ); if (!isSafe) { schemaChanges.push({ type: BreakingChangeType.FIELD_CHANGED_KIND, description: `${oldType.name}.${oldField.name} changed type from ` + `${String(oldField.type)} to ${String(newField.type)}.`, }); } } return schemaChanges; } function findUnionTypeChanges(oldType, newType) { const schemaChanges = []; const possibleTypesDiff = diff(oldType.getTypes(), newType.getTypes()); for (const newPossibleType of possibleTypesDiff.added) { schemaChanges.push({ type: DangerousChangeType.TYPE_ADDED_TO_UNION, description: `${newPossibleType.name} was added to union type ${oldType.name}.`, }); } for (const oldPossibleType of possibleTypesDiff.removed) { schemaChanges.push({ type: BreakingChangeType.TYPE_REMOVED_FROM_UNION, description: `${oldPossibleType.name} was removed from union type ${oldType.name}.`, }); } return schemaChanges; } function findEnumTypeChanges(oldType, newType) { const schemaChanges = []; const valuesDiff = diff(oldType.getValues(), newType.getValues()); for (const newValue of valuesDiff.added) { schemaChanges.push({ type: DangerousChangeType.VALUE_ADDED_TO_ENUM, description: `${newValue.name} was added to enum type ${oldType.name}.`, }); } for (const oldValue of valuesDiff.removed) { schemaChanges.push({ type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM, description: `${oldValue.name} was removed from enum type ${oldType.name}.`, }); } return schemaChanges; } function findImplementedInterfacesChanges(oldType, newType) { const schemaChanges = []; const interfacesDiff = diff(oldType.getInterfaces(), newType.getInterfaces()); for (const newInterface of interfacesDiff.added) { schemaChanges.push({ type: DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED, description: `${newInterface.name} added to interfaces implemented by ${oldType.name}.`, }); } for (const oldInterface of interfacesDiff.removed) { schemaChanges.push({ type: BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED, description: `${oldType.name} no longer implements interface ${oldInterface.name}.`, }); } return schemaChanges; } function findFieldChanges(oldType, newType) { const schemaChanges = []; const fieldsDiff = diff( Object.values(oldType.getFields()), Object.values(newType.getFields()), ); for (const oldField of fieldsDiff.removed) { schemaChanges.push({ type: BreakingChangeType.FIELD_REMOVED, description: `${oldType.name}.${oldField.name} was removed.`, }); } for (const [oldField, newField] of fieldsDiff.persisted) { schemaChanges.push(...findArgChanges(oldType, oldField, newField)); const isSafe = isChangeSafeForObjectOrInterfaceField( oldField.type, newField.type, ); if (!isSafe) { schemaChanges.push({ type: BreakingChangeType.FIELD_CHANGED_KIND, description: `${oldType.name}.${oldField.name} changed type from ` + `${String(oldField.type)} to ${String(newField.type)}.`, }); } } return schemaChanges; } function findArgChanges(oldType, oldField, newField) { const schemaChanges = []; const argsDiff = diff(oldField.args, newField.args); for (const oldArg of argsDiff.removed) { schemaChanges.push({ type: BreakingChangeType.ARG_REMOVED, description: `${oldType.name}.${oldField.name} arg ${oldArg.name} was removed.`, }); } for (const [oldArg, newArg] of argsDiff.persisted) { const isSafe = isChangeSafeForInputObjectFieldOrFieldArg( oldArg.type, newArg.type, ); if (!isSafe) { schemaChanges.push({ type: BreakingChangeType.ARG_CHANGED_KIND, description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed type from ` + `${String(oldArg.type)} to ${String(newArg.type)}.`, }); } else if (oldArg.defaultValue !== undefined) { if (newArg.defaultValue === undefined) { schemaChanges.push({ type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE, description: `${oldType.name}.${oldField.name} arg ${oldArg.name} defaultValue was removed.`, }); } else { // Since we looking only for client's observable changes we should // compare default values in the same representation as they are // represented inside introspection. const oldValueStr = findBreakingChanges_stringifyValue(oldArg.defaultValue, oldArg.type); const newValueStr = findBreakingChanges_stringifyValue(newArg.defaultValue, newArg.type); if (oldValueStr !== newValueStr) { schemaChanges.push({ type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE, description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed defaultValue from ${oldValueStr} to ${newValueStr}.`, }); } } } } for (const newArg of argsDiff.added) { if (isRequiredArgument(newArg)) { schemaChanges.push({ type: BreakingChangeType.REQUIRED_ARG_ADDED, description: `A required arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.`, }); } else { schemaChanges.push({ type: DangerousChangeType.OPTIONAL_ARG_ADDED, description: `An optional arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.`, }); } } return schemaChanges; } function isChangeSafeForObjectOrInterfaceField(oldType, newType) { if (isListType(oldType)) { return ( // if they're both lists, make sure the underlying types are compatible (isListType(newType) && isChangeSafeForObjectOrInterfaceField( oldType.ofType, newType.ofType, )) || // moving from nullable to non-null of the same underlying type is safe (isNonNullType(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType)) ); } if (isNonNullType(oldType)) { // if they're both non-null, make sure the underlying types are compatible return ( isNonNullType(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType) ); } return ( // if they're both named types, see if their names are equivalent (isNamedType(newType) && oldType.name === newType.name) || // moving from nullable to non-null of the same underlying type is safe (isNonNullType(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType)) ); } function isChangeSafeForInputObjectFieldOrFieldArg(oldType, newType) { if (isListType(oldType)) { // if they're both lists, make sure the underlying types are compatible return ( isListType(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType) ); } if (isNonNullType(oldType)) { return ( // if they're both non-null, make sure the underlying types are // compatible (isNonNullType(newType) && isChangeSafeForInputObjectFieldOrFieldArg( oldType.ofType, newType.ofType, )) || // moving from non-null to nullable of the same underlying type is safe (!isNonNullType(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType)) ); } // if they're both named types, see if their names are equivalent return isNamedType(newType) && oldType.name === newType.name; } function typeKindName(type) { if (isScalarType(type)) { return 'a Scalar type'; } if (isObjectType(type)) { return 'an Object type'; } if (isInterfaceType(type)) { return 'an Interface type'; } if (isUnionType(type)) { return 'a Union type'; } if (isEnumType(type)) { return 'an Enum type'; } if (isInputObjectType(type)) { return 'an Input type'; } /* c8 ignore next 3 */ // Not reachable, all possible types have been considered. false || (0,invariant/* invariant */.V)(false, 'Unexpected type: ' + (0,inspect/* inspect */.N)(type)); } function findBreakingChanges_stringifyValue(value, type) { const ast = astFromValue(value, type); ast != null || (0,invariant/* invariant */.V)(false); return (0,printer.print)(sortValueNode(ast)); } function diff(oldArray, newArray) { const added = []; const removed = []; const persisted = []; const oldMap = keyMap(oldArray, ({ name }) => name); const newMap = keyMap(newArray, ({ name }) => name); for (const oldItem of oldArray) { const newItem = newMap[oldItem.name]; if (newItem === undefined) { removed.push(oldItem); } else { persisted.push([oldItem, newItem]); } } for (const newItem of newArray) { if (oldMap[newItem.name] === undefined) { added.push(newItem); } } return { added, persisted, removed, }; } ;// ./node_modules/graphql/index.mjs /** * GraphQL.js provides a reference implementation for the GraphQL specification * but is also a useful utility for operating on GraphQL files and building * sophisticated tools. * * This primary module exports a general purpose function for fulfilling all * steps of the GraphQL specification in a single operation, but also includes * utilities for every part of the GraphQL specification: * * - Parsing the GraphQL language. * - Building a GraphQL type schema. * - Validating a GraphQL request against a type schema. * - Executing a GraphQL request against a type schema. * * This also includes utility functions for operating on GraphQL types and * GraphQL documents to facilitate building tools. * * You may also import from each sub-directory directly. For example, the * following two import statements are equivalent: * * ```ts * import { parse } from 'graphql'; * import { parse } from 'graphql/language'; * ``` * * @packageDocumentation */ // The GraphQL.js version info. // The primary entry point into fulfilling a GraphQL request. // Create and operate on GraphQL type definitions and schema. // Parse and operate on GraphQL language source files. // Execute GraphQL queries. // Validate GraphQL documents. // Create, format, and print GraphQL errors. // Utilities for operating on GraphQL type schema and parsed sources. /***/ }), /***/ 30599: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ U: () => (/* binding */ devAssert) /* harmony export */ }); function devAssert(condition, message) { const booleanCondition = Boolean(condition); if (!booleanCondition) { throw new Error(message); } } /***/ }), /***/ 75640: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ N: () => (/* binding */ inspect) /* harmony export */ }); const MAX_ARRAY_LENGTH = 10; const MAX_RECURSIVE_DEPTH = 2; /** * Used to print values in error messages. */ function inspect(value) { return formatValue(value, []); } function formatValue(value, seenValues) { switch (typeof value) { case 'string': return JSON.stringify(value); case 'function': return value.name ? `[function ${value.name}]` : '[function]'; case 'object': return formatObjectValue(value, seenValues); default: return String(value); } } function formatObjectValue(value, previouslySeenValues) { if (value === null) { return 'null'; } if (previouslySeenValues.includes(value)) { return '[Circular]'; } const seenValues = [...previouslySeenValues, value]; if (isJSONable(value)) { const jsonValue = value.toJSON(); // check for infinite recursion if (jsonValue !== value) { return typeof jsonValue === 'string' ? jsonValue : formatValue(jsonValue, seenValues); } } else if (Array.isArray(value)) { return formatArray(value, seenValues); } return formatObject(value, seenValues); } function isJSONable(value) { return typeof value.toJSON === 'function'; } function formatObject(object, seenValues) { const entries = Object.entries(object); if (entries.length === 0) { return '{}'; } if (seenValues.length > MAX_RECURSIVE_DEPTH) { return '[' + getObjectTag(object) + ']'; } const properties = entries.map( ([key, value]) => key + ': ' + formatValue(value, seenValues), ); return '{ ' + properties.join(', ') + ' }'; } function formatArray(array, seenValues) { if (array.length === 0) { return '[]'; } if (seenValues.length > MAX_RECURSIVE_DEPTH) { return '[Array]'; } const len = Math.min(MAX_ARRAY_LENGTH, array.length); const remaining = array.length - len; const items = []; for (let i = 0; i < len; ++i) { items.push(formatValue(array[i], seenValues)); } if (remaining === 1) { items.push('... 1 more item'); } else if (remaining > 1) { items.push(`... ${remaining} more items`); } return '[' + items.join(', ') + ']'; } function getObjectTag(object) { const tag = Object.prototype.toString .call(object) .replace(/^\[object /, '') .replace(/]$/, ''); if (tag === 'Object' && typeof object.constructor === 'function') { const name = object.constructor.name; if (typeof name === 'string' && name !== '') { return name; } } return tag; } /***/ }), /***/ 96090: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ h: () => (/* binding */ instanceOf) /* harmony export */ }); /* harmony import */ var _inspect_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75640); /* c8 ignore next 3 */ const isProduction = globalThis.process && // eslint-disable-next-line no-undef "production" === 'production'; /** * A replacement for instanceof which includes an error warning when multi-realm * constructors are detected. * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production * See: https://webpack.js.org/guides/production/ */ const instanceOf = /* c8 ignore next 6 */ // FIXME: https://github.com/graphql/graphql-js/issues/2317 isProduction ? function instanceOf(value, constructor) { return value instanceof constructor; } : function instanceOf(value, constructor) { if (value instanceof constructor) { return true; } if (typeof value === 'object' && value !== null) { var _value$constructor; // Prefer Symbol.toStringTag since it is immune to minification. const className = constructor.prototype[Symbol.toStringTag]; const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library. Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009 ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name; if (className === valueClassName) { const stringifiedValue = (0,_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__/* .inspect */ .N)(value); throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other relied on modules, use "resolutions" to ensure only one version is installed. https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and spurious results.`); } } return false; }; /***/ }), /***/ 37544: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ V: () => (/* binding */ invariant) /* harmony export */ }); function invariant(condition, message) { const booleanCondition = Boolean(condition); if (!booleanCondition) { throw new Error( message != null ? message : 'Unexpected invariant triggered.', ); } } /***/ }), /***/ 12464: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: () => (/* binding */ isObjectLike) /* harmony export */ }); /** * Return true if `value` is object-like. A value is object-like if it's not * `null` and has a `typeof` result of "object". */ function isObjectLike(value) { return typeof value == 'object' && value !== null; } /***/ }), /***/ 75136: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Ll: () => (/* binding */ isNode), /* harmony export */ aD: () => (/* binding */ QueryDocumentKeys), /* harmony export */ aZ: () => (/* binding */ Location), /* harmony export */ cE: () => (/* binding */ OperationTypeNode), /* harmony export */ ou: () => (/* binding */ Token) /* harmony export */ }); /** * Contains a range of UTF-8 character offsets and token references that * identify the region of the source from which the AST derived. */ class Location { /** * The character offset at which this Node begins. */ /** * The character offset at which this Node ends. */ /** * The Token at which this Node begins. */ /** * The Token at which this Node ends. */ /** * The Source document the AST represents. */ constructor(startToken, endToken, source) { this.start = startToken.start; this.end = endToken.end; this.startToken = startToken; this.endToken = endToken; this.source = source; } get [Symbol.toStringTag]() { return 'Location'; } toJSON() { return { start: this.start, end: this.end, }; } } /** * Represents a range of characters represented by a lexical token * within a Source. */ class Token { /** * The kind of Token. */ /** * The character offset at which this Node begins. */ /** * The character offset at which this Node ends. */ /** * The 1-indexed line number on which this Token appears. */ /** * The 1-indexed column number at which this Token begins. */ /** * For non-punctuation tokens, represents the interpreted value of the token. * * Note: is undefined for punctuation tokens, but typed as string for * convenience in the parser. */ /** * Tokens exist as nodes in a double-linked-list amongst all tokens * including ignored tokens. is always the first node and * the last. */ constructor(kind, start, end, line, column, value) { this.kind = kind; this.start = start; this.end = end; this.line = line; this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion this.value = value; this.prev = null; this.next = null; } get [Symbol.toStringTag]() { return 'Token'; } toJSON() { return { kind: this.kind, value: this.value, line: this.line, column: this.column, }; } } /** * The list of all possible AST node types. */ /** * @internal */ const QueryDocumentKeys = { Name: [], Document: ['definitions'], OperationDefinition: [ 'name', 'variableDefinitions', 'directives', 'selectionSet', ], VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'], Variable: ['name'], SelectionSet: ['selections'], Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'], Argument: ['name', 'value'], FragmentSpread: ['name', 'directives'], InlineFragment: ['typeCondition', 'directives', 'selectionSet'], FragmentDefinition: [ 'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0 'variableDefinitions', 'typeCondition', 'directives', 'selectionSet', ], IntValue: [], FloatValue: [], StringValue: [], BooleanValue: [], NullValue: [], EnumValue: [], ListValue: ['values'], ObjectValue: ['fields'], ObjectField: ['name', 'value'], Directive: ['name', 'arguments'], NamedType: ['name'], ListType: ['type'], NonNullType: ['type'], SchemaDefinition: ['description', 'directives', 'operationTypes'], OperationTypeDefinition: ['type'], ScalarTypeDefinition: ['description', 'name', 'directives'], ObjectTypeDefinition: [ 'description', 'name', 'interfaces', 'directives', 'fields', ], FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'], InputValueDefinition: [ 'description', 'name', 'type', 'defaultValue', 'directives', ], InterfaceTypeDefinition: [ 'description', 'name', 'interfaces', 'directives', 'fields', ], UnionTypeDefinition: ['description', 'name', 'directives', 'types'], EnumTypeDefinition: ['description', 'name', 'directives', 'values'], EnumValueDefinition: ['description', 'name', 'directives'], InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'], DirectiveDefinition: ['description', 'name', 'arguments', 'locations'], SchemaExtension: ['directives', 'operationTypes'], ScalarTypeExtension: ['name', 'directives'], ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'], InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'], UnionTypeExtension: ['name', 'directives', 'types'], EnumTypeExtension: ['name', 'directives', 'values'], InputObjectTypeExtension: ['name', 'directives', 'fields'], }; const kindValues = new Set(Object.keys(QueryDocumentKeys)); /** * @internal */ function isNode(maybeNode) { const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind; return typeof maybeKind === 'string' && kindValues.has(maybeKind); } /** Name */ var OperationTypeNode; (function (OperationTypeNode) { OperationTypeNode['QUERY'] = 'query'; OperationTypeNode['MUTATION'] = 'mutation'; OperationTypeNode['SUBSCRIPTION'] = 'subscription'; })(OperationTypeNode || (OperationTypeNode = {})); /***/ }), /***/ 43052: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ CS: () => (/* binding */ isPrintableAsBlockString), /* harmony export */ OC: () => (/* binding */ dedentBlockStringLines), /* harmony export */ yo: () => (/* binding */ printBlockString) /* harmony export */ }); /* harmony import */ var _characterClasses_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50175); /** * Produces the value of a block string from its parsed raw value, similar to * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc. * * This implements the GraphQL spec's BlockStringValue() static algorithm. * * @internal */ function dedentBlockStringLines(lines) { var _firstNonEmptyLine2; let commonIndent = Number.MAX_SAFE_INTEGER; let firstNonEmptyLine = null; let lastNonEmptyLine = -1; for (let i = 0; i < lines.length; ++i) { var _firstNonEmptyLine; const line = lines[i]; const indent = leadingWhitespace(line); if (indent === line.length) { continue; // skip empty lines } firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i; lastNonEmptyLine = i; if (i !== 0 && indent < commonIndent) { commonIndent = indent; } } return lines // Remove common indentation from all lines but first. .map((line, i) => (i === 0 ? line : line.slice(commonIndent))) // Remove leading and trailing blank lines. .slice( (_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== void 0 ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1, ); } function leadingWhitespace(str) { let i = 0; while (i < str.length && (0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isWhiteSpace */ .i0)(str.charCodeAt(i))) { ++i; } return i; } /** * @internal */ function isPrintableAsBlockString(value) { if (value === '') { return true; // empty string is printable } let isEmptyLine = true; let hasIndent = false; let hasCommonIndent = true; let seenNonEmptyLine = false; for (let i = 0; i < value.length; ++i) { switch (value.codePointAt(i)) { case 0x0000: case 0x0001: case 0x0002: case 0x0003: case 0x0004: case 0x0005: case 0x0006: case 0x0007: case 0x0008: case 0x000b: case 0x000c: case 0x000e: case 0x000f: return false; // Has non-printable characters case 0x000d: // \r return false; // Has \r or \r\n which will be replaced as \n case 10: // \n if (isEmptyLine && !seenNonEmptyLine) { return false; // Has leading new line } seenNonEmptyLine = true; isEmptyLine = true; hasIndent = false; break; case 9: // \t case 32: // hasIndent || (hasIndent = isEmptyLine); break; default: hasCommonIndent && (hasCommonIndent = hasIndent); isEmptyLine = false; } } if (isEmptyLine) { return false; // Has trailing empty lines } if (hasCommonIndent && seenNonEmptyLine) { return false; // Has internal indent } return true; } /** * Print a block string in the indented block form by adding a leading and * trailing blank line. However, if a block string starts with whitespace and is * a single-line, adding a leading blank line would strip that whitespace. * * @internal */ function printBlockString(value, options) { const escapedValue = value.replace(/"""/g, '\\"""'); // Expand a block string's raw value into independent lines. const lines = escapedValue.split(/\r\n|[\n\r]/g); const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line const forceLeadingNewLine = lines.length > 1 && lines .slice(1) .every((line) => line.length === 0 || (0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isWhiteSpace */ .i0)(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""'); // Trailing quote (single or double) or slash forces trailing new line const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes; const hasTrailingSlash = value.endsWith('\\'); const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash; const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability (!isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes); let result = ''; // Format a multi-line block quote to account for leading space. const skipLeadingNewLine = isSingleLine && (0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isWhiteSpace */ .i0)(value.charCodeAt(0)); if ((printAsMultipleLines && !skipLeadingNewLine) || forceLeadingNewLine) { result += '\n'; } result += escapedValue; if (printAsMultipleLines || forceTrailingNewline) { result += '\n'; } return '"""' + result + '"""'; } /***/ }), /***/ 50175: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ i0: () => (/* binding */ isWhiteSpace), /* harmony export */ un: () => (/* binding */ isNameStart), /* harmony export */ xr: () => (/* binding */ isNameContinue), /* harmony export */ yp: () => (/* binding */ isDigit) /* harmony export */ }); /* unused harmony export isLetter */ /** * ``` * WhiteSpace :: * - "Horizontal Tab (U+0009)" * - "Space (U+0020)" * ``` * @internal */ function isWhiteSpace(code) { return code === 0x0009 || code === 0x0020; } /** * ``` * Digit :: one of * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9` * ``` * @internal */ function isDigit(code) { return code >= 0x0030 && code <= 0x0039; } /** * ``` * Letter :: one of * - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M` * - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z` * - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m` * - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z` * ``` * @internal */ function isLetter(code) { return ( (code >= 0x0061 && code <= 0x007a) || // A-Z (code >= 0x0041 && code <= 0x005a) // a-z ); } /** * ``` * NameStart :: * - Letter * - `_` * ``` * @internal */ function isNameStart(code) { return isLetter(code) || code === 0x005f; } /** * ``` * NameContinue :: * - Letter * - Digit * - `_` * ``` * @internal */ function isNameContinue(code) { return isLetter(code) || isDigit(code) || code === 0x005f; } /***/ }), /***/ 35026: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ H: () => (/* binding */ DirectiveLocation) /* harmony export */ }); /** * The set of allowed directive location values. */ var DirectiveLocation; (function (DirectiveLocation) { DirectiveLocation['QUERY'] = 'QUERY'; DirectiveLocation['MUTATION'] = 'MUTATION'; DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION'; DirectiveLocation['FIELD'] = 'FIELD'; DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION'; DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD'; DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT'; DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION'; DirectiveLocation['SCHEMA'] = 'SCHEMA'; DirectiveLocation['SCALAR'] = 'SCALAR'; DirectiveLocation['OBJECT'] = 'OBJECT'; DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION'; DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION'; DirectiveLocation['INTERFACE'] = 'INTERFACE'; DirectiveLocation['UNION'] = 'UNION'; DirectiveLocation['ENUM'] = 'ENUM'; DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE'; DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT'; DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION'; })(DirectiveLocation || (DirectiveLocation = {})); /** * The enum type representing the directive location values. * * @deprecated Please use `DirectiveLocation`. Will be remove in v17. */ /***/ }), /***/ 73061: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ b: () => (/* binding */ Kind) /* harmony export */ }); /** * The set of allowed kind values for AST nodes. */ var Kind; (function (Kind) { Kind['NAME'] = 'Name'; Kind['DOCUMENT'] = 'Document'; Kind['OPERATION_DEFINITION'] = 'OperationDefinition'; Kind['VARIABLE_DEFINITION'] = 'VariableDefinition'; Kind['SELECTION_SET'] = 'SelectionSet'; Kind['FIELD'] = 'Field'; Kind['ARGUMENT'] = 'Argument'; Kind['FRAGMENT_SPREAD'] = 'FragmentSpread'; Kind['INLINE_FRAGMENT'] = 'InlineFragment'; Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition'; Kind['VARIABLE'] = 'Variable'; Kind['INT'] = 'IntValue'; Kind['FLOAT'] = 'FloatValue'; Kind['STRING'] = 'StringValue'; Kind['BOOLEAN'] = 'BooleanValue'; Kind['NULL'] = 'NullValue'; Kind['ENUM'] = 'EnumValue'; Kind['LIST'] = 'ListValue'; Kind['OBJECT'] = 'ObjectValue'; Kind['OBJECT_FIELD'] = 'ObjectField'; Kind['DIRECTIVE'] = 'Directive'; Kind['NAMED_TYPE'] = 'NamedType'; Kind['LIST_TYPE'] = 'ListType'; Kind['NON_NULL_TYPE'] = 'NonNullType'; Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition'; Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition'; Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition'; Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition'; Kind['FIELD_DEFINITION'] = 'FieldDefinition'; Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition'; Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition'; Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition'; Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition'; Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition'; Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition'; Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition'; Kind['SCHEMA_EXTENSION'] = 'SchemaExtension'; Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension'; Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension'; Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension'; Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension'; Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension'; Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension'; })(Kind || (Kind = {})); /** * The enum type representing the possible kind values of AST nodes. * * @deprecated Please use `Kind`. Will be remove in v17. */ /***/ }), /***/ 21238: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ J: () => (/* binding */ Lexer), /* harmony export */ Z: () => (/* binding */ isPunctuatorTokenKind) /* harmony export */ }); /* harmony import */ var _error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93547); /* harmony import */ var _ast_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75136); /* harmony import */ var _blockString_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43052); /* harmony import */ var _characterClasses_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50175); /* harmony import */ var _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24925); /** * Given a Source object, creates a Lexer for that source. * A Lexer is a stateful stream generator in that every time * it is advanced, it returns the next token in the Source. Assuming the * source lexes, the final Token emitted by the lexer will be of kind * EOF, after which the lexer will repeatedly return the same EOF token * whenever called. */ class Lexer { /** * The previously focused non-ignored token. */ /** * The currently focused non-ignored token. */ /** * The (1-indexed) line containing the current token. */ /** * The character offset at which the current line begins. */ constructor(source) { const startOfFileToken = new _ast_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Token */ .ou(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.SOF, 0, 0, 0, 0); this.source = source; this.lastToken = startOfFileToken; this.token = startOfFileToken; this.line = 1; this.lineStart = 0; } get [Symbol.toStringTag]() { return 'Lexer'; } /** * Advances the token stream to the next non-ignored token. */ advance() { this.lastToken = this.token; const token = (this.token = this.lookahead()); return token; } /** * Looks ahead and returns the next non-ignored token, but does not change * the state of Lexer. */ lookahead() { let token = this.token; if (token.kind !== _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.EOF) { do { if (token.next) { token = token.next; } else { // Read the next token and form a link in the token linked-list. const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing. token.next = nextToken; // @ts-expect-error prev is only mutable during parsing. nextToken.prev = token; token = nextToken; } } while (token.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.COMMENT); } return token; } } /** * @internal */ function isPunctuatorTokenKind(kind) { return ( kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.BANG || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.DOLLAR || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.AMP || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.PAREN_L || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.PAREN_R || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.SPREAD || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.COLON || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.EQUALS || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.AT || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.BRACKET_L || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.BRACKET_R || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.BRACE_L || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.PIPE || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.BRACE_R ); } /** * A Unicode scalar value is any Unicode code point except surrogate code * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and * 0xE000 to 0x10FFFF. * * SourceCharacter :: * - "Any Unicode scalar value" */ function isUnicodeScalarValue(code) { return ( (code >= 0x0000 && code <= 0xd7ff) || (code >= 0xe000 && code <= 0x10ffff) ); } /** * The GraphQL specification defines source text as a sequence of unicode scalar * values (which Unicode defines to exclude surrogate code points). However * JavaScript defines strings as a sequence of UTF-16 code units which may * include surrogates. A surrogate pair is a valid source character as it * encodes a supplementary code point (above U+FFFF), but unpaired surrogate * code points are not valid source characters. */ function isSupplementaryCodePoint(body, location) { return ( isLeadingSurrogate(body.charCodeAt(location)) && isTrailingSurrogate(body.charCodeAt(location + 1)) ); } function isLeadingSurrogate(code) { return code >= 0xd800 && code <= 0xdbff; } function isTrailingSurrogate(code) { return code >= 0xdc00 && code <= 0xdfff; } /** * Prints the code point (or end of file reference) at a given location in a * source for use in error messages. * * Printable ASCII is printed quoted, while other points are printed in Unicode * code point form (ie. U+1234). */ function printCodePointAt(lexer, location) { const code = lexer.source.body.codePointAt(location); if (code === undefined) { return _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.EOF; } else if (code >= 0x0020 && code <= 0x007e) { // Printable ASCII const char = String.fromCodePoint(code); return char === '"' ? "'\"'" : `"${char}"`; } // Unicode code point return 'U+' + code.toString(16).toUpperCase().padStart(4, '0'); } /** * Create a token with line and column location information. */ function createToken(lexer, kind, start, end, value) { const line = lexer.line; const col = 1 + start - lexer.lineStart; return new _ast_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Token */ .ou(kind, start, end, line, col, value); } /** * Gets the next token from the source starting at the given position. * * This skips over whitespace until it finds the next lexable token, then lexes * punctuators immediately or calls the appropriate helper function for more * complicated tokens. */ function readNextToken(lexer, start) { const body = lexer.source.body; const bodyLength = body.length; let position = start; while (position < bodyLength) { const code = body.charCodeAt(position); // SourceCharacter switch (code) { // Ignored :: // - UnicodeBOM // - WhiteSpace // - LineTerminator // - Comment // - Comma // // UnicodeBOM :: "Byte Order Mark (U+FEFF)" // // WhiteSpace :: // - "Horizontal Tab (U+0009)" // - "Space (U+0020)" // // Comma :: , case 0xfeff: // case 0x0009: // \t case 0x0020: // case 0x002c: // , ++position; continue; // LineTerminator :: // - "New Line (U+000A)" // - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"] // - "Carriage Return (U+000D)" "New Line (U+000A)" case 0x000a: // \n ++position; ++lexer.line; lexer.lineStart = position; continue; case 0x000d: // \r if (body.charCodeAt(position + 1) === 0x000a) { position += 2; } else { ++position; } ++lexer.line; lexer.lineStart = position; continue; // Comment case 0x0023: // # return readComment(lexer, position); // Token :: // - Punctuator // - Name // - IntValue // - FloatValue // - StringValue // // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | } case 0x0021: // ! return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.BANG, position, position + 1); case 0x0024: // $ return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.DOLLAR, position, position + 1); case 0x0026: // & return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.AMP, position, position + 1); case 0x0028: // ( return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.PAREN_L, position, position + 1); case 0x0029: // ) return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.PAREN_R, position, position + 1); case 0x002e: // . if ( body.charCodeAt(position + 1) === 0x002e && body.charCodeAt(position + 2) === 0x002e ) { return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.SPREAD, position, position + 3); } break; case 0x003a: // : return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.COLON, position, position + 1); case 0x003d: // = return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.EQUALS, position, position + 1); case 0x0040: // @ return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.AT, position, position + 1); case 0x005b: // [ return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.BRACKET_L, position, position + 1); case 0x005d: // ] return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.BRACKET_R, position, position + 1); case 0x007b: // { return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.BRACE_L, position, position + 1); case 0x007c: // | return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.PIPE, position, position + 1); case 0x007d: // } return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.BRACE_R, position, position + 1); // StringValue case 0x0022: // " if ( body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022 ) { return readBlockString(lexer, position); } return readString(lexer, position); } // IntValue | FloatValue (Digit | -) if ((0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isDigit */ .yp)(code) || code === 0x002d) { return readNumber(lexer, position, code); } // Name if ((0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isNameStart */ .un)(code)) { return readName(lexer, position); } throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_3__/* .syntaxError */ .I)( lexer.source, position, code === 0x0027 ? 'Unexpected single quote character (\'), did you mean to use a double quote (")?' : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position) ? `Unexpected character: ${printCodePointAt(lexer, position)}.` : `Invalid character: ${printCodePointAt(lexer, position)}.`, ); } return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.EOF, bodyLength, bodyLength); } /** * Reads a comment token from the source file. * * ``` * Comment :: # CommentChar* [lookahead != CommentChar] * * CommentChar :: SourceCharacter but not LineTerminator * ``` */ function readComment(lexer, start) { const body = lexer.source.body; const bodyLength = body.length; let position = start + 1; while (position < bodyLength) { const code = body.charCodeAt(position); // LineTerminator (\n | \r) if (code === 0x000a || code === 0x000d) { break; } // SourceCharacter if (isUnicodeScalarValue(code)) { ++position; } else if (isSupplementaryCodePoint(body, position)) { position += 2; } else { break; } } return createToken( lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.COMMENT, start, position, body.slice(start + 1, position), ); } /** * Reads a number token from the source file, either a FloatValue or an IntValue * depending on whether a FractionalPart or ExponentPart is encountered. * * ``` * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}] * * IntegerPart :: * - NegativeSign? 0 * - NegativeSign? NonZeroDigit Digit* * * NegativeSign :: - * * NonZeroDigit :: Digit but not `0` * * FloatValue :: * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}] * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}] * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}] * * FractionalPart :: . Digit+ * * ExponentPart :: ExponentIndicator Sign? Digit+ * * ExponentIndicator :: one of `e` `E` * * Sign :: one of + - * ``` */ function readNumber(lexer, start, firstCode) { const body = lexer.source.body; let position = start; let code = firstCode; let isFloat = false; // NegativeSign (-) if (code === 0x002d) { code = body.charCodeAt(++position); } // Zero (0) if (code === 0x0030) { code = body.charCodeAt(++position); if ((0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isDigit */ .yp)(code)) { throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_3__/* .syntaxError */ .I)( lexer.source, position, `Invalid number, unexpected digit after 0: ${printCodePointAt( lexer, position, )}.`, ); } } else { position = readDigits(lexer, position, code); code = body.charCodeAt(position); } // Full stop (.) if (code === 0x002e) { isFloat = true; code = body.charCodeAt(++position); position = readDigits(lexer, position, code); code = body.charCodeAt(position); } // E e if (code === 0x0045 || code === 0x0065) { isFloat = true; code = body.charCodeAt(++position); // + - if (code === 0x002b || code === 0x002d) { code = body.charCodeAt(++position); } position = readDigits(lexer, position, code); code = body.charCodeAt(position); } // Numbers cannot be followed by . or NameStart if (code === 0x002e || (0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isNameStart */ .un)(code)) { throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_3__/* .syntaxError */ .I)( lexer.source, position, `Invalid number, expected digit but got: ${printCodePointAt( lexer, position, )}.`, ); } return createToken( lexer, isFloat ? _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.FLOAT : _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.INT, start, position, body.slice(start, position), ); } /** * Returns the new position in the source after reading one or more digits. */ function readDigits(lexer, start, firstCode) { if (!(0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isDigit */ .yp)(firstCode)) { throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_3__/* .syntaxError */ .I)( lexer.source, start, `Invalid number, expected digit but got: ${printCodePointAt( lexer, start, )}.`, ); } const body = lexer.source.body; let position = start + 1; // +1 to skip first firstCode while ((0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isDigit */ .yp)(body.charCodeAt(position))) { ++position; } return position; } /** * Reads a single-quote string token from the source file. * * ``` * StringValue :: * - `""` [lookahead != `"`] * - `"` StringCharacter+ `"` * * StringCharacter :: * - SourceCharacter but not `"` or `\` or LineTerminator * - `\u` EscapedUnicode * - `\` EscapedCharacter * * EscapedUnicode :: * - `{` HexDigit+ `}` * - HexDigit HexDigit HexDigit HexDigit * * EscapedCharacter :: one of `"` `\` `/` `b` `f` `n` `r` `t` * ``` */ function readString(lexer, start) { const body = lexer.source.body; const bodyLength = body.length; let position = start + 1; let chunkStart = position; let value = ''; while (position < bodyLength) { const code = body.charCodeAt(position); // Closing Quote (") if (code === 0x0022) { value += body.slice(chunkStart, position); return createToken(lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.STRING, start, position + 1, value); } // Escape Sequence (\) if (code === 0x005c) { value += body.slice(chunkStart, position); const escape = body.charCodeAt(position + 1) === 0x0075 // u ? body.charCodeAt(position + 2) === 0x007b // { ? readEscapedUnicodeVariableWidth(lexer, position) : readEscapedUnicodeFixedWidth(lexer, position) : readEscapedCharacter(lexer, position); value += escape.value; position += escape.size; chunkStart = position; continue; } // LineTerminator (\n | \r) if (code === 0x000a || code === 0x000d) { break; } // SourceCharacter if (isUnicodeScalarValue(code)) { ++position; } else if (isSupplementaryCodePoint(body, position)) { position += 2; } else { throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_3__/* .syntaxError */ .I)( lexer.source, position, `Invalid character within String: ${printCodePointAt( lexer, position, )}.`, ); } } throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_3__/* .syntaxError */ .I)(lexer.source, position, 'Unterminated string.'); } // The string value and lexed size of an escape sequence. function readEscapedUnicodeVariableWidth(lexer, position) { const body = lexer.source.body; let point = 0; let size = 3; // Cannot be larger than 12 chars (\u{00000000}). while (size < 12) { const code = body.charCodeAt(position + size++); // Closing Brace (}) if (code === 0x007d) { // Must be at least 5 chars (\u{0}) and encode a Unicode scalar value. if (size < 5 || !isUnicodeScalarValue(point)) { break; } return { value: String.fromCodePoint(point), size, }; } // Append this hex digit to the code point. point = (point << 4) | readHexDigit(code); if (point < 0) { break; } } throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_3__/* .syntaxError */ .I)( lexer.source, position, `Invalid Unicode escape sequence: "${body.slice( position, position + size, )}".`, ); } function readEscapedUnicodeFixedWidth(lexer, position) { const body = lexer.source.body; const code = read16BitHexCode(body, position + 2); if (isUnicodeScalarValue(code)) { return { value: String.fromCodePoint(code), size: 6, }; } // GraphQL allows JSON-style surrogate pair escape sequences, but only when // a valid pair is formed. if (isLeadingSurrogate(code)) { // \u if ( body.charCodeAt(position + 6) === 0x005c && body.charCodeAt(position + 7) === 0x0075 ) { const trailingCode = read16BitHexCode(body, position + 8); if (isTrailingSurrogate(trailingCode)) { // JavaScript defines strings as a sequence of UTF-16 code units and // encodes Unicode code points above U+FFFF using a surrogate pair of // code units. Since this is a surrogate pair escape sequence, just // include both codes into the JavaScript string value. Had JavaScript // not been internally based on UTF-16, then this surrogate pair would // be decoded to retrieve the supplementary code point. return { value: String.fromCodePoint(code, trailingCode), size: 12, }; } } } throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_3__/* .syntaxError */ .I)( lexer.source, position, `Invalid Unicode escape sequence: "${body.slice(position, position + 6)}".`, ); } /** * Reads four hexadecimal characters and returns the positive integer that 16bit * hexadecimal string represents. For example, "000f" will return 15, and "dead" * will return 57005. * * Returns a negative number if any char was not a valid hexadecimal digit. */ function read16BitHexCode(body, position) { // readHexDigit() returns -1 on error. ORing a negative value with any other // value always produces a negative value. return ( (readHexDigit(body.charCodeAt(position)) << 12) | (readHexDigit(body.charCodeAt(position + 1)) << 8) | (readHexDigit(body.charCodeAt(position + 2)) << 4) | readHexDigit(body.charCodeAt(position + 3)) ); } /** * Reads a hexadecimal character and returns its positive integer value (0-15). * * '0' becomes 0, '9' becomes 9 * 'A' becomes 10, 'F' becomes 15 * 'a' becomes 10, 'f' becomes 15 * * Returns -1 if the provided character code was not a valid hexadecimal digit. * * HexDigit :: one of * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9` * - `A` `B` `C` `D` `E` `F` * - `a` `b` `c` `d` `e` `f` */ function readHexDigit(code) { return code >= 0x0030 && code <= 0x0039 // 0-9 ? code - 0x0030 : code >= 0x0041 && code <= 0x0046 // A-F ? code - 0x0037 : code >= 0x0061 && code <= 0x0066 // a-f ? code - 0x0057 : -1; } /** * | Escaped Character | Code Point | Character Name | * | ----------------- | ---------- | ---------------------------- | * | `"` | U+0022 | double quote | * | `\` | U+005C | reverse solidus (back slash) | * | `/` | U+002F | solidus (forward slash) | * | `b` | U+0008 | backspace | * | `f` | U+000C | form feed | * | `n` | U+000A | line feed (new line) | * | `r` | U+000D | carriage return | * | `t` | U+0009 | horizontal tab | */ function readEscapedCharacter(lexer, position) { const body = lexer.source.body; const code = body.charCodeAt(position + 1); switch (code) { case 0x0022: // " return { value: '\u0022', size: 2, }; case 0x005c: // \ return { value: '\u005c', size: 2, }; case 0x002f: // / return { value: '\u002f', size: 2, }; case 0x0062: // b return { value: '\u0008', size: 2, }; case 0x0066: // f return { value: '\u000c', size: 2, }; case 0x006e: // n return { value: '\u000a', size: 2, }; case 0x0072: // r return { value: '\u000d', size: 2, }; case 0x0074: // t return { value: '\u0009', size: 2, }; } throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_3__/* .syntaxError */ .I)( lexer.source, position, `Invalid character escape sequence: "${body.slice( position, position + 2, )}".`, ); } /** * Reads a block string token from the source file. * * ``` * StringValue :: * - `"""` BlockStringCharacter* `"""` * * BlockStringCharacter :: * - SourceCharacter but not `"""` or `\"""` * - `\"""` * ``` */ function readBlockString(lexer, start) { const body = lexer.source.body; const bodyLength = body.length; let lineStart = lexer.lineStart; let position = start + 3; let chunkStart = position; let currentLine = ''; const blockLines = []; while (position < bodyLength) { const code = body.charCodeAt(position); // Closing Triple-Quote (""") if ( code === 0x0022 && body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022 ) { currentLine += body.slice(chunkStart, position); blockLines.push(currentLine); const token = createToken( lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.BLOCK_STRING, start, position + 3, // Return a string of the lines joined with U+000A. (0,_blockString_mjs__WEBPACK_IMPORTED_MODULE_4__/* .dedentBlockStringLines */ .OC)(blockLines).join('\n'), ); lexer.line += blockLines.length - 1; lexer.lineStart = lineStart; return token; } // Escaped Triple-Quote (\""") if ( code === 0x005c && body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022 && body.charCodeAt(position + 3) === 0x0022 ) { currentLine += body.slice(chunkStart, position); chunkStart = position + 1; // skip only slash position += 4; continue; } // LineTerminator if (code === 0x000a || code === 0x000d) { currentLine += body.slice(chunkStart, position); blockLines.push(currentLine); if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) { position += 2; } else { ++position; } currentLine = ''; chunkStart = position; lineStart = position; continue; } // SourceCharacter if (isUnicodeScalarValue(code)) { ++position; } else if (isSupplementaryCodePoint(body, position)) { position += 2; } else { throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_3__/* .syntaxError */ .I)( lexer.source, position, `Invalid character within String: ${printCodePointAt( lexer, position, )}.`, ); } } throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_3__/* .syntaxError */ .I)(lexer.source, position, 'Unterminated string.'); } /** * Reads an alphanumeric + underscore name from the source. * * ``` * Name :: * - NameStart NameContinue* [lookahead != NameContinue] * ``` */ function readName(lexer, start) { const body = lexer.source.body; const bodyLength = body.length; let position = start + 1; while (position < bodyLength) { const code = body.charCodeAt(position); if ((0,_characterClasses_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isNameContinue */ .xr)(code)) { ++position; } else { break; } } return createToken( lexer, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_1__/* .TokenKind */ .Y.NAME, start, position, body.slice(start, position), ); } /***/ }), /***/ 72409: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ g: () => (/* binding */ getLocation) /* harmony export */ }); /* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37544); const LineRegExp = /\r\n|[\n\r]/g; /** * Represents a location in a Source. */ /** * Takes a Source and a UTF-8 character offset, and returns the corresponding * line and column as a SourceLocation. */ function getLocation(source, position) { let lastLineStart = 0; let line = 1; for (const match of source.body.matchAll(LineRegExp)) { typeof match.index === 'number' || (0,_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_0__/* .invariant */ .V)(false); if (match.index >= position) { break; } lastLineStart = match.index + match[0].length; line += 1; } return { line, column: position + 1 - lastLineStart, }; } /***/ }), /***/ 66005: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ $x: () => (/* binding */ parseValue), /* harmony export */ Mb: () => (/* binding */ parseType), /* harmony export */ qg: () => (/* binding */ parse), /* harmony export */ u8: () => (/* binding */ parseConstValue) /* harmony export */ }); /* unused harmony export Parser */ /* harmony import */ var _error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(93547); /* harmony import */ var _ast_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75136); /* harmony import */ var _directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(35026); /* harmony import */ var _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(73061); /* harmony import */ var _lexer_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21238); /* harmony import */ var _source_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48575); /* harmony import */ var _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24925); /** * Configuration options to control parser behavior */ /** * Given a GraphQL source, parses it into a Document. * Throws GraphQLError if a syntax error is encountered. */ function parse(source, options) { const parser = new Parser(source, options); const document = parser.parseDocument(); Object.defineProperty(document, 'tokenCount', { enumerable: false, value: parser.tokenCount, }); return document; } /** * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for * that value. * Throws GraphQLError if a syntax error is encountered. * * This is useful within tools that operate upon GraphQL Values directly and * in isolation of complete GraphQL documents. * * Consider providing the results to the utility function: valueFromAST(). */ function parseValue(source, options) { const parser = new Parser(source, options); parser.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.SOF); const value = parser.parseValueLiteral(false); parser.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.EOF); return value; } /** * Similar to parseValue(), but raises a parse error if it encounters a * variable. The return type will be a constant value. */ function parseConstValue(source, options) { const parser = new Parser(source, options); parser.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.SOF); const value = parser.parseConstValueLiteral(); parser.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.EOF); return value; } /** * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for * that type. * Throws GraphQLError if a syntax error is encountered. * * This is useful within tools that operate upon GraphQL Types directly and * in isolation of complete GraphQL documents. * * Consider providing the results to the utility function: typeFromAST(). */ function parseType(source, options) { const parser = new Parser(source, options); parser.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.SOF); const type = parser.parseTypeReference(); parser.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.EOF); return type; } /** * This class is exported only to assist people in implementing their own parsers * without duplicating too much code and should be used only as last resort for cases * such as experimental syntax or if certain features could not be contributed upstream. * * It is still part of the internal API and is versioned, so any changes to it are never * considered breaking changes. If you still need to support multiple versions of the * library, please use the `versionInfo` variable for version detection. * * @internal */ class Parser { constructor(source, options = {}) { const sourceObj = (0,_source_mjs__WEBPACK_IMPORTED_MODULE_1__/* .isSource */ ._)(source) ? source : new _source_mjs__WEBPACK_IMPORTED_MODULE_1__/* .Source */ .k(source); this._lexer = new _lexer_mjs__WEBPACK_IMPORTED_MODULE_2__/* .Lexer */ .J(sourceObj); this._options = options; this._tokenCounter = 0; } get tokenCount() { return this._tokenCounter; } /** * Converts a name lex token into a name parse node. */ parseName() { const token = this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.NAME); return this.node(token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.NAME, value: token.value, }); } // Implements the parsing rules in the Document section. /** * Document : Definition+ */ parseDocument() { return this.node(this._lexer.token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.DOCUMENT, definitions: this.many( _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.SOF, this.parseDefinition, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.EOF, ), }); } /** * Definition : * - ExecutableDefinition * - TypeSystemDefinition * - TypeSystemExtension * * ExecutableDefinition : * - OperationDefinition * - FragmentDefinition * * TypeSystemDefinition : * - SchemaDefinition * - TypeDefinition * - DirectiveDefinition * * TypeDefinition : * - ScalarTypeDefinition * - ObjectTypeDefinition * - InterfaceTypeDefinition * - UnionTypeDefinition * - EnumTypeDefinition * - InputObjectTypeDefinition */ parseDefinition() { if (this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_L)) { return this.parseOperationDefinition(); } // Many definitions begin with a description and require a lookahead. const hasDescription = this.peekDescription(); const keywordToken = hasDescription ? this._lexer.lookahead() : this._lexer.token; if (keywordToken.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.NAME) { switch (keywordToken.value) { case 'schema': return this.parseSchemaDefinition(); case 'scalar': return this.parseScalarTypeDefinition(); case 'type': return this.parseObjectTypeDefinition(); case 'interface': return this.parseInterfaceTypeDefinition(); case 'union': return this.parseUnionTypeDefinition(); case 'enum': return this.parseEnumTypeDefinition(); case 'input': return this.parseInputObjectTypeDefinition(); case 'directive': return this.parseDirectiveDefinition(); } if (hasDescription) { throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_4__/* .syntaxError */ .I)( this._lexer.source, this._lexer.token.start, 'Unexpected description, descriptions are supported only on type definitions.', ); } switch (keywordToken.value) { case 'query': case 'mutation': case 'subscription': return this.parseOperationDefinition(); case 'fragment': return this.parseFragmentDefinition(); case 'extend': return this.parseTypeSystemExtension(); } } throw this.unexpected(keywordToken); } // Implements the parsing rules in the Operations section. /** * OperationDefinition : * - SelectionSet * - OperationType Name? VariableDefinitions? Directives? SelectionSet */ parseOperationDefinition() { const start = this._lexer.token; if (this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_L)) { return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.OPERATION_DEFINITION, operation: _ast_mjs__WEBPACK_IMPORTED_MODULE_5__/* .OperationTypeNode */ .cE.QUERY, name: undefined, variableDefinitions: [], directives: [], selectionSet: this.parseSelectionSet(), }); } const operation = this.parseOperationType(); let name; if (this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.NAME)) { name = this.parseName(); } return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.OPERATION_DEFINITION, operation, name, variableDefinitions: this.parseVariableDefinitions(), directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet(), }); } /** * OperationType : one of query mutation subscription */ parseOperationType() { const operationToken = this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.NAME); switch (operationToken.value) { case 'query': return _ast_mjs__WEBPACK_IMPORTED_MODULE_5__/* .OperationTypeNode */ .cE.QUERY; case 'mutation': return _ast_mjs__WEBPACK_IMPORTED_MODULE_5__/* .OperationTypeNode */ .cE.MUTATION; case 'subscription': return _ast_mjs__WEBPACK_IMPORTED_MODULE_5__/* .OperationTypeNode */ .cE.SUBSCRIPTION; } throw this.unexpected(operationToken); } /** * VariableDefinitions : ( VariableDefinition+ ) */ parseVariableDefinitions() { return this.optionalMany( _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.PAREN_L, this.parseVariableDefinition, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.PAREN_R, ); } /** * VariableDefinition : Variable : Type DefaultValue? Directives[Const]? */ parseVariableDefinition() { return this.node(this._lexer.token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.VARIABLE_DEFINITION, variable: this.parseVariable(), type: (this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.COLON), this.parseTypeReference()), defaultValue: this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.EQUALS) ? this.parseConstValueLiteral() : undefined, directives: this.parseConstDirectives(), }); } /** * Variable : $ Name */ parseVariable() { const start = this._lexer.token; this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.DOLLAR); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.VARIABLE, name: this.parseName(), }); } /** * ``` * SelectionSet : { Selection+ } * ``` */ parseSelectionSet() { return this.node(this._lexer.token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.SELECTION_SET, selections: this.many( _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_L, this.parseSelection, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_R, ), }); } /** * Selection : * - Field * - FragmentSpread * - InlineFragment */ parseSelection() { return this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.SPREAD) ? this.parseFragment() : this.parseField(); } /** * Field : Alias? Name Arguments? Directives? SelectionSet? * * Alias : Name : */ parseField() { const start = this._lexer.token; const nameOrAlias = this.parseName(); let alias; let name; if (this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.COLON)) { alias = nameOrAlias; name = this.parseName(); } else { name = nameOrAlias; } return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.FIELD, alias, name, arguments: this.parseArguments(false), directives: this.parseDirectives(false), selectionSet: this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_L) ? this.parseSelectionSet() : undefined, }); } /** * Arguments[Const] : ( Argument[?Const]+ ) */ parseArguments(isConst) { const item = isConst ? this.parseConstArgument : this.parseArgument; return this.optionalMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.PAREN_L, item, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.PAREN_R); } /** * Argument[Const] : Name : Value[?Const] */ parseArgument(isConst = false) { const start = this._lexer.token; const name = this.parseName(); this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.COLON); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.ARGUMENT, name, value: this.parseValueLiteral(isConst), }); } parseConstArgument() { return this.parseArgument(true); } // Implements the parsing rules in the Fragments section. /** * Corresponds to both FragmentSpread and InlineFragment in the spec. * * FragmentSpread : ... FragmentName Directives? * * InlineFragment : ... TypeCondition? Directives? SelectionSet */ parseFragment() { const start = this._lexer.token; this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.SPREAD); const hasTypeCondition = this.expectOptionalKeyword('on'); if (!hasTypeCondition && this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.NAME)) { return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.FRAGMENT_SPREAD, name: this.parseFragmentName(), directives: this.parseDirectives(false), }); } return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.INLINE_FRAGMENT, typeCondition: hasTypeCondition ? this.parseNamedType() : undefined, directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet(), }); } /** * FragmentDefinition : * - fragment FragmentName on TypeCondition Directives? SelectionSet * * TypeCondition : NamedType */ parseFragmentDefinition() { const start = this._lexer.token; this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes // the grammar of FragmentDefinition: // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet if (this._options.allowLegacyFragmentVariables === true) { return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.FRAGMENT_DEFINITION, name: this.parseFragmentName(), variableDefinitions: this.parseVariableDefinitions(), typeCondition: (this.expectKeyword('on'), this.parseNamedType()), directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet(), }); } return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.FRAGMENT_DEFINITION, name: this.parseFragmentName(), typeCondition: (this.expectKeyword('on'), this.parseNamedType()), directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet(), }); } /** * FragmentName : Name but not `on` */ parseFragmentName() { if (this._lexer.token.value === 'on') { throw this.unexpected(); } return this.parseName(); } // Implements the parsing rules in the Values section. /** * Value[Const] : * - [~Const] Variable * - IntValue * - FloatValue * - StringValue * - BooleanValue * - NullValue * - EnumValue * - ListValue[?Const] * - ObjectValue[?Const] * * BooleanValue : one of `true` `false` * * NullValue : `null` * * EnumValue : Name but not `true`, `false` or `null` */ parseValueLiteral(isConst) { const token = this._lexer.token; switch (token.kind) { case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACKET_L: return this.parseList(isConst); case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_L: return this.parseObject(isConst); case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.INT: this.advanceLexer(); return this.node(token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.INT, value: token.value, }); case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.FLOAT: this.advanceLexer(); return this.node(token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.FLOAT, value: token.value, }); case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.STRING: case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BLOCK_STRING: return this.parseStringLiteral(); case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.NAME: this.advanceLexer(); switch (token.value) { case 'true': return this.node(token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.BOOLEAN, value: true, }); case 'false': return this.node(token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.BOOLEAN, value: false, }); case 'null': return this.node(token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.NULL, }); default: return this.node(token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.ENUM, value: token.value, }); } case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.DOLLAR: if (isConst) { this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.DOLLAR); if (this._lexer.token.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.NAME) { const varName = this._lexer.token.value; throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_4__/* .syntaxError */ .I)( this._lexer.source, token.start, `Unexpected variable "$${varName}" in constant value.`, ); } else { throw this.unexpected(token); } } return this.parseVariable(); default: throw this.unexpected(); } } parseConstValueLiteral() { return this.parseValueLiteral(true); } parseStringLiteral() { const token = this._lexer.token; this.advanceLexer(); return this.node(token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.STRING, value: token.value, block: token.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BLOCK_STRING, }); } /** * ListValue[Const] : * - [ ] * - [ Value[?Const]+ ] */ parseList(isConst) { const item = () => this.parseValueLiteral(isConst); return this.node(this._lexer.token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.LIST, values: this.any(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACKET_L, item, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACKET_R), }); } /** * ``` * ObjectValue[Const] : * - { } * - { ObjectField[?Const]+ } * ``` */ parseObject(isConst) { const item = () => this.parseObjectField(isConst); return this.node(this._lexer.token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.OBJECT, fields: this.any(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_L, item, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_R), }); } /** * ObjectField[Const] : Name : Value[?Const] */ parseObjectField(isConst) { const start = this._lexer.token; const name = this.parseName(); this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.COLON); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.OBJECT_FIELD, name, value: this.parseValueLiteral(isConst), }); } // Implements the parsing rules in the Directives section. /** * Directives[Const] : Directive[?Const]+ */ parseDirectives(isConst) { const directives = []; while (this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.AT)) { directives.push(this.parseDirective(isConst)); } return directives; } parseConstDirectives() { return this.parseDirectives(true); } /** * ``` * Directive[Const] : @ Name Arguments[?Const]? * ``` */ parseDirective(isConst) { const start = this._lexer.token; this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.AT); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.DIRECTIVE, name: this.parseName(), arguments: this.parseArguments(isConst), }); } // Implements the parsing rules in the Types section. /** * Type : * - NamedType * - ListType * - NonNullType */ parseTypeReference() { const start = this._lexer.token; let type; if (this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACKET_L)) { const innerType = this.parseTypeReference(); this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACKET_R); type = this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.LIST_TYPE, type: innerType, }); } else { type = this.parseNamedType(); } if (this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BANG)) { return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.NON_NULL_TYPE, type, }); } return type; } /** * NamedType : Name */ parseNamedType() { return this.node(this._lexer.token, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.NAMED_TYPE, name: this.parseName(), }); } // Implements the parsing rules in the Type Definition section. peekDescription() { return this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.STRING) || this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BLOCK_STRING); } /** * Description : StringValue */ parseDescription() { if (this.peekDescription()) { return this.parseStringLiteral(); } } /** * ``` * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ } * ``` */ parseSchemaDefinition() { const start = this._lexer.token; const description = this.parseDescription(); this.expectKeyword('schema'); const directives = this.parseConstDirectives(); const operationTypes = this.many( _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_L, this.parseOperationTypeDefinition, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_R, ); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.SCHEMA_DEFINITION, description, directives, operationTypes, }); } /** * OperationTypeDefinition : OperationType : NamedType */ parseOperationTypeDefinition() { const start = this._lexer.token; const operation = this.parseOperationType(); this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.COLON); const type = this.parseNamedType(); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.OPERATION_TYPE_DEFINITION, operation, type, }); } /** * ScalarTypeDefinition : Description? scalar Name Directives[Const]? */ parseScalarTypeDefinition() { const start = this._lexer.token; const description = this.parseDescription(); this.expectKeyword('scalar'); const name = this.parseName(); const directives = this.parseConstDirectives(); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.SCALAR_TYPE_DEFINITION, description, name, directives, }); } /** * ObjectTypeDefinition : * Description? * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition? */ parseObjectTypeDefinition() { const start = this._lexer.token; const description = this.parseDescription(); this.expectKeyword('type'); const name = this.parseName(); const interfaces = this.parseImplementsInterfaces(); const directives = this.parseConstDirectives(); const fields = this.parseFieldsDefinition(); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.OBJECT_TYPE_DEFINITION, description, name, interfaces, directives, fields, }); } /** * ImplementsInterfaces : * - implements `&`? NamedType * - ImplementsInterfaces & NamedType */ parseImplementsInterfaces() { return this.expectOptionalKeyword('implements') ? this.delimitedMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.AMP, this.parseNamedType) : []; } /** * ``` * FieldsDefinition : { FieldDefinition+ } * ``` */ parseFieldsDefinition() { return this.optionalMany( _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_L, this.parseFieldDefinition, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_R, ); } /** * FieldDefinition : * - Description? Name ArgumentsDefinition? : Type Directives[Const]? */ parseFieldDefinition() { const start = this._lexer.token; const description = this.parseDescription(); const name = this.parseName(); const args = this.parseArgumentDefs(); this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.COLON); const type = this.parseTypeReference(); const directives = this.parseConstDirectives(); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.FIELD_DEFINITION, description, name, arguments: args, type, directives, }); } /** * ArgumentsDefinition : ( InputValueDefinition+ ) */ parseArgumentDefs() { return this.optionalMany( _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.PAREN_L, this.parseInputValueDef, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.PAREN_R, ); } /** * InputValueDefinition : * - Description? Name : Type DefaultValue? Directives[Const]? */ parseInputValueDef() { const start = this._lexer.token; const description = this.parseDescription(); const name = this.parseName(); this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.COLON); const type = this.parseTypeReference(); let defaultValue; if (this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.EQUALS)) { defaultValue = this.parseConstValueLiteral(); } const directives = this.parseConstDirectives(); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.INPUT_VALUE_DEFINITION, description, name, type, defaultValue, directives, }); } /** * InterfaceTypeDefinition : * - Description? interface Name Directives[Const]? FieldsDefinition? */ parseInterfaceTypeDefinition() { const start = this._lexer.token; const description = this.parseDescription(); this.expectKeyword('interface'); const name = this.parseName(); const interfaces = this.parseImplementsInterfaces(); const directives = this.parseConstDirectives(); const fields = this.parseFieldsDefinition(); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.INTERFACE_TYPE_DEFINITION, description, name, interfaces, directives, fields, }); } /** * UnionTypeDefinition : * - Description? union Name Directives[Const]? UnionMemberTypes? */ parseUnionTypeDefinition() { const start = this._lexer.token; const description = this.parseDescription(); this.expectKeyword('union'); const name = this.parseName(); const directives = this.parseConstDirectives(); const types = this.parseUnionMemberTypes(); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.UNION_TYPE_DEFINITION, description, name, directives, types, }); } /** * UnionMemberTypes : * - = `|`? NamedType * - UnionMemberTypes | NamedType */ parseUnionMemberTypes() { return this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.EQUALS) ? this.delimitedMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.PIPE, this.parseNamedType) : []; } /** * EnumTypeDefinition : * - Description? enum Name Directives[Const]? EnumValuesDefinition? */ parseEnumTypeDefinition() { const start = this._lexer.token; const description = this.parseDescription(); this.expectKeyword('enum'); const name = this.parseName(); const directives = this.parseConstDirectives(); const values = this.parseEnumValuesDefinition(); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.ENUM_TYPE_DEFINITION, description, name, directives, values, }); } /** * ``` * EnumValuesDefinition : { EnumValueDefinition+ } * ``` */ parseEnumValuesDefinition() { return this.optionalMany( _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_L, this.parseEnumValueDefinition, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_R, ); } /** * EnumValueDefinition : Description? EnumValue Directives[Const]? */ parseEnumValueDefinition() { const start = this._lexer.token; const description = this.parseDescription(); const name = this.parseEnumValueName(); const directives = this.parseConstDirectives(); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.ENUM_VALUE_DEFINITION, description, name, directives, }); } /** * EnumValue : Name but not `true`, `false` or `null` */ parseEnumValueName() { if ( this._lexer.token.value === 'true' || this._lexer.token.value === 'false' || this._lexer.token.value === 'null' ) { throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_4__/* .syntaxError */ .I)( this._lexer.source, this._lexer.token.start, `${getTokenDesc( this._lexer.token, )} is reserved and cannot be used for an enum value.`, ); } return this.parseName(); } /** * InputObjectTypeDefinition : * - Description? input Name Directives[Const]? InputFieldsDefinition? */ parseInputObjectTypeDefinition() { const start = this._lexer.token; const description = this.parseDescription(); this.expectKeyword('input'); const name = this.parseName(); const directives = this.parseConstDirectives(); const fields = this.parseInputFieldsDefinition(); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.INPUT_OBJECT_TYPE_DEFINITION, description, name, directives, fields, }); } /** * ``` * InputFieldsDefinition : { InputValueDefinition+ } * ``` */ parseInputFieldsDefinition() { return this.optionalMany( _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_L, this.parseInputValueDef, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_R, ); } /** * TypeSystemExtension : * - SchemaExtension * - TypeExtension * * TypeExtension : * - ScalarTypeExtension * - ObjectTypeExtension * - InterfaceTypeExtension * - UnionTypeExtension * - EnumTypeExtension * - InputObjectTypeDefinition */ parseTypeSystemExtension() { const keywordToken = this._lexer.lookahead(); if (keywordToken.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.NAME) { switch (keywordToken.value) { case 'schema': return this.parseSchemaExtension(); case 'scalar': return this.parseScalarTypeExtension(); case 'type': return this.parseObjectTypeExtension(); case 'interface': return this.parseInterfaceTypeExtension(); case 'union': return this.parseUnionTypeExtension(); case 'enum': return this.parseEnumTypeExtension(); case 'input': return this.parseInputObjectTypeExtension(); } } throw this.unexpected(keywordToken); } /** * ``` * SchemaExtension : * - extend schema Directives[Const]? { OperationTypeDefinition+ } * - extend schema Directives[Const] * ``` */ parseSchemaExtension() { const start = this._lexer.token; this.expectKeyword('extend'); this.expectKeyword('schema'); const directives = this.parseConstDirectives(); const operationTypes = this.optionalMany( _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_L, this.parseOperationTypeDefinition, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.BRACE_R, ); if (directives.length === 0 && operationTypes.length === 0) { throw this.unexpected(); } return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.SCHEMA_EXTENSION, directives, operationTypes, }); } /** * ScalarTypeExtension : * - extend scalar Name Directives[Const] */ parseScalarTypeExtension() { const start = this._lexer.token; this.expectKeyword('extend'); this.expectKeyword('scalar'); const name = this.parseName(); const directives = this.parseConstDirectives(); if (directives.length === 0) { throw this.unexpected(); } return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.SCALAR_TYPE_EXTENSION, name, directives, }); } /** * ObjectTypeExtension : * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition * - extend type Name ImplementsInterfaces? Directives[Const] * - extend type Name ImplementsInterfaces */ parseObjectTypeExtension() { const start = this._lexer.token; this.expectKeyword('extend'); this.expectKeyword('type'); const name = this.parseName(); const interfaces = this.parseImplementsInterfaces(); const directives = this.parseConstDirectives(); const fields = this.parseFieldsDefinition(); if ( interfaces.length === 0 && directives.length === 0 && fields.length === 0 ) { throw this.unexpected(); } return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.OBJECT_TYPE_EXTENSION, name, interfaces, directives, fields, }); } /** * InterfaceTypeExtension : * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition * - extend interface Name ImplementsInterfaces? Directives[Const] * - extend interface Name ImplementsInterfaces */ parseInterfaceTypeExtension() { const start = this._lexer.token; this.expectKeyword('extend'); this.expectKeyword('interface'); const name = this.parseName(); const interfaces = this.parseImplementsInterfaces(); const directives = this.parseConstDirectives(); const fields = this.parseFieldsDefinition(); if ( interfaces.length === 0 && directives.length === 0 && fields.length === 0 ) { throw this.unexpected(); } return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.INTERFACE_TYPE_EXTENSION, name, interfaces, directives, fields, }); } /** * UnionTypeExtension : * - extend union Name Directives[Const]? UnionMemberTypes * - extend union Name Directives[Const] */ parseUnionTypeExtension() { const start = this._lexer.token; this.expectKeyword('extend'); this.expectKeyword('union'); const name = this.parseName(); const directives = this.parseConstDirectives(); const types = this.parseUnionMemberTypes(); if (directives.length === 0 && types.length === 0) { throw this.unexpected(); } return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.UNION_TYPE_EXTENSION, name, directives, types, }); } /** * EnumTypeExtension : * - extend enum Name Directives[Const]? EnumValuesDefinition * - extend enum Name Directives[Const] */ parseEnumTypeExtension() { const start = this._lexer.token; this.expectKeyword('extend'); this.expectKeyword('enum'); const name = this.parseName(); const directives = this.parseConstDirectives(); const values = this.parseEnumValuesDefinition(); if (directives.length === 0 && values.length === 0) { throw this.unexpected(); } return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.ENUM_TYPE_EXTENSION, name, directives, values, }); } /** * InputObjectTypeExtension : * - extend input Name Directives[Const]? InputFieldsDefinition * - extend input Name Directives[Const] */ parseInputObjectTypeExtension() { const start = this._lexer.token; this.expectKeyword('extend'); this.expectKeyword('input'); const name = this.parseName(); const directives = this.parseConstDirectives(); const fields = this.parseInputFieldsDefinition(); if (directives.length === 0 && fields.length === 0) { throw this.unexpected(); } return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.INPUT_OBJECT_TYPE_EXTENSION, name, directives, fields, }); } /** * ``` * DirectiveDefinition : * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations * ``` */ parseDirectiveDefinition() { const start = this._lexer.token; const description = this.parseDescription(); this.expectKeyword('directive'); this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.AT); const name = this.parseName(); const args = this.parseArgumentDefs(); const repeatable = this.expectOptionalKeyword('repeatable'); this.expectKeyword('on'); const locations = this.parseDirectiveLocations(); return this.node(start, { kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_3__/* .Kind */ .b.DIRECTIVE_DEFINITION, description, name, arguments: args, repeatable, locations, }); } /** * DirectiveLocations : * - `|`? DirectiveLocation * - DirectiveLocations | DirectiveLocation */ parseDirectiveLocations() { return this.delimitedMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.PIPE, this.parseDirectiveLocation); } /* * DirectiveLocation : * - ExecutableDirectiveLocation * - TypeSystemDirectiveLocation * * ExecutableDirectiveLocation : one of * `QUERY` * `MUTATION` * `SUBSCRIPTION` * `FIELD` * `FRAGMENT_DEFINITION` * `FRAGMENT_SPREAD` * `INLINE_FRAGMENT` * * TypeSystemDirectiveLocation : one of * `SCHEMA` * `SCALAR` * `OBJECT` * `FIELD_DEFINITION` * `ARGUMENT_DEFINITION` * `INTERFACE` * `UNION` * `ENUM` * `ENUM_VALUE` * `INPUT_OBJECT` * `INPUT_FIELD_DEFINITION` */ parseDirectiveLocation() { const start = this._lexer.token; const name = this.parseName(); if (Object.prototype.hasOwnProperty.call(_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_6__/* .DirectiveLocation */ .H, name.value)) { return name; } throw this.unexpected(start); } // Core parsing utility functions /** * Returns a node that, if configured to do so, sets a "loc" field as a * location object, used to identify the place in the source that created a * given parsed object. */ node(startToken, node) { if (this._options.noLocation !== true) { node.loc = new _ast_mjs__WEBPACK_IMPORTED_MODULE_5__/* .Location */ .aZ( startToken, this._lexer.lastToken, this._lexer.source, ); } return node; } /** * Determines if the next token is of a given kind */ peek(kind) { return this._lexer.token.kind === kind; } /** * If the next token is of the given kind, return that token after advancing the lexer. * Otherwise, do not change the parser state and throw an error. */ expectToken(kind) { const token = this._lexer.token; if (token.kind === kind) { this.advanceLexer(); return token; } throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_4__/* .syntaxError */ .I)( this._lexer.source, token.start, `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`, ); } /** * If the next token is of the given kind, return "true" after advancing the lexer. * Otherwise, do not change the parser state and return "false". */ expectOptionalToken(kind) { const token = this._lexer.token; if (token.kind === kind) { this.advanceLexer(); return true; } return false; } /** * If the next token is a given keyword, advance the lexer. * Otherwise, do not change the parser state and throw an error. */ expectKeyword(value) { const token = this._lexer.token; if (token.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.NAME && token.value === value) { this.advanceLexer(); } else { throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_4__/* .syntaxError */ .I)( this._lexer.source, token.start, `Expected "${value}", found ${getTokenDesc(token)}.`, ); } } /** * If the next token is a given keyword, return "true" after advancing the lexer. * Otherwise, do not change the parser state and return "false". */ expectOptionalKeyword(value) { const token = this._lexer.token; if (token.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.NAME && token.value === value) { this.advanceLexer(); return true; } return false; } /** * Helper function for creating an error when an unexpected lexed token is encountered. */ unexpected(atToken) { const token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token; return (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_4__/* .syntaxError */ .I)( this._lexer.source, token.start, `Unexpected ${getTokenDesc(token)}.`, ); } /** * Returns a possibly empty list of parse nodes, determined by the parseFn. * This list begins with a lex token of openKind and ends with a lex token of closeKind. * Advances the parser to the next lex token after the closing token. */ any(openKind, parseFn, closeKind) { this.expectToken(openKind); const nodes = []; while (!this.expectOptionalToken(closeKind)) { nodes.push(parseFn.call(this)); } return nodes; } /** * Returns a list of parse nodes, determined by the parseFn. * It can be empty only if open token is missing otherwise it will always return non-empty list * that begins with a lex token of openKind and ends with a lex token of closeKind. * Advances the parser to the next lex token after the closing token. */ optionalMany(openKind, parseFn, closeKind) { if (this.expectOptionalToken(openKind)) { const nodes = []; do { nodes.push(parseFn.call(this)); } while (!this.expectOptionalToken(closeKind)); return nodes; } return []; } /** * Returns a non-empty list of parse nodes, determined by the parseFn. * This list begins with a lex token of openKind and ends with a lex token of closeKind. * Advances the parser to the next lex token after the closing token. */ many(openKind, parseFn, closeKind) { this.expectToken(openKind); const nodes = []; do { nodes.push(parseFn.call(this)); } while (!this.expectOptionalToken(closeKind)); return nodes; } /** * Returns a non-empty list of parse nodes, determined by the parseFn. * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind. * Advances the parser to the next lex token after last item in the list. */ delimitedMany(delimiterKind, parseFn) { this.expectOptionalToken(delimiterKind); const nodes = []; do { nodes.push(parseFn.call(this)); } while (this.expectOptionalToken(delimiterKind)); return nodes; } advanceLexer() { const { maxTokens } = this._options; const token = this._lexer.advance(); if (token.kind !== _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_0__/* .TokenKind */ .Y.EOF) { ++this._tokenCounter; if (maxTokens !== undefined && this._tokenCounter > maxTokens) { throw (0,_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_4__/* .syntaxError */ .I)( this._lexer.source, token.start, `Document contains more that ${maxTokens} tokens. Parsing aborted.`, ); } } } } /** * A helper function to describe a token as a string for debugging. */ function getTokenDesc(token) { const value = token.value; return getTokenKindDesc(token.kind) + (value != null ? ` "${value}"` : ''); } /** * A helper function to describe a token kind as a string for debugging. */ function getTokenKindDesc(kind) { return (0,_lexer_mjs__WEBPACK_IMPORTED_MODULE_2__/* .isPunctuatorTokenKind */ .Z)(kind) ? `"${kind}"` : kind; } /***/ }), /***/ 48710: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ MD: () => (/* binding */ isDefinitionNode), /* harmony export */ TZ: () => (/* binding */ isConstValueNode), /* harmony export */ VK: () => (/* binding */ isSelectionNode), /* harmony export */ _m: () => (/* binding */ isExecutableDefinitionNode), /* harmony export */ a6: () => (/* binding */ isTypeDefinitionNode), /* harmony export */ aR: () => (/* binding */ isValueNode), /* harmony export */ dI: () => (/* binding */ isTypeNode), /* harmony export */ fT: () => (/* binding */ isTypeSystemExtensionNode), /* harmony export */ i7: () => (/* binding */ isTypeExtensionNode), /* harmony export */ xu: () => (/* binding */ isTypeSystemDefinitionNode) /* harmony export */ }); /* harmony import */ var _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73061); function isDefinitionNode(node) { return ( isExecutableDefinitionNode(node) || isTypeSystemDefinitionNode(node) || isTypeSystemExtensionNode(node) ); } function isExecutableDefinitionNode(node) { return ( node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.OPERATION_DEFINITION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.FRAGMENT_DEFINITION ); } function isSelectionNode(node) { return ( node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.FIELD || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.FRAGMENT_SPREAD || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.INLINE_FRAGMENT ); } function isValueNode(node) { return ( node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.VARIABLE || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.INT || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.FLOAT || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.STRING || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.BOOLEAN || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.NULL || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.ENUM || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.LIST || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.OBJECT ); } function isConstValueNode(node) { return ( isValueNode(node) && (node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.LIST ? node.values.some(isConstValueNode) : node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.OBJECT ? node.fields.some((field) => isConstValueNode(field.value)) : node.kind !== _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.VARIABLE) ); } function isTypeNode(node) { return ( node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.NAMED_TYPE || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.LIST_TYPE || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.NON_NULL_TYPE ); } function isTypeSystemDefinitionNode(node) { return ( node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.SCHEMA_DEFINITION || isTypeDefinitionNode(node) || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.DIRECTIVE_DEFINITION ); } function isTypeDefinitionNode(node) { return ( node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.SCALAR_TYPE_DEFINITION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.OBJECT_TYPE_DEFINITION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.INTERFACE_TYPE_DEFINITION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.UNION_TYPE_DEFINITION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.ENUM_TYPE_DEFINITION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.INPUT_OBJECT_TYPE_DEFINITION ); } function isTypeSystemExtensionNode(node) { return node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.SCHEMA_EXTENSION || isTypeExtensionNode(node); } function isTypeExtensionNode(node) { return ( node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.SCALAR_TYPE_EXTENSION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.OBJECT_TYPE_EXTENSION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.INTERFACE_TYPE_EXTENSION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.UNION_TYPE_EXTENSION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.ENUM_TYPE_EXTENSION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__/* .Kind */ .b.INPUT_OBJECT_TYPE_EXTENSION ); } /***/ }), /***/ 62072: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ C: () => (/* binding */ printSourceLocation), /* harmony export */ V: () => (/* binding */ printLocation) /* harmony export */ }); /* harmony import */ var _location_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72409); /** * Render a helpful description of the location in the GraphQL Source document. */ function printLocation(location) { return printSourceLocation( location.source, (0,_location_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getLocation */ .g)(location.source, location.start), ); } /** * Render a helpful description of the location in the GraphQL Source document. */ function printSourceLocation(source, sourceLocation) { const firstLineColumnOffset = source.locationOffset.column - 1; const body = ''.padStart(firstLineColumnOffset) + source.body; const lineIndex = sourceLocation.line - 1; const lineOffset = source.locationOffset.line - 1; const lineNum = sourceLocation.line + lineOffset; const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0; const columnNum = sourceLocation.column + columnOffset; const locationStr = `${source.name}:${lineNum}:${columnNum}\n`; const lines = body.split(/\r\n|[\n\r]/g); const locationLine = lines[lineIndex]; // Special case for minified documents if (locationLine.length > 120) { const subLineIndex = Math.floor(columnNum / 80); const subLineColumnNum = columnNum % 80; const subLines = []; for (let i = 0; i < locationLine.length; i += 80) { subLines.push(locationLine.slice(i, i + 80)); } return ( locationStr + printPrefixedLines([ [`${lineNum} |`, subLines[0]], ...subLines.slice(1, subLineIndex + 1).map((subLine) => ['|', subLine]), ['|', '^'.padStart(subLineColumnNum)], ['|', subLines[subLineIndex + 1]], ]) ); } return ( locationStr + printPrefixedLines([ // Lines specified like this: ["prefix", "string"], [`${lineNum - 1} |`, lines[lineIndex - 1]], [`${lineNum} |`, locationLine], ['|', '^'.padStart(columnNum)], [`${lineNum + 1} |`, lines[lineIndex + 1]], ]) ); } function printPrefixedLines(lines) { const existingLines = lines.filter(([_, line]) => line !== undefined); const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length)); return existingLines .map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : '')) .join('\n'); } /***/ }), /***/ 95410: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ T: () => (/* binding */ printString) /* harmony export */ }); /** * Prints a string as a GraphQL StringValue literal. Replaces control characters * and excluded characters (" U+0022 and \\ U+005C) with escape sequences. */ function printString(str) { return `"${str.replace(escapedRegExp, escapedReplacer)}"`; } // eslint-disable-next-line no-control-regex const escapedRegExp = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g; function escapedReplacer(str) { return escapeSequences[str.charCodeAt(0)]; } // prettier-ignore const escapeSequences = [ '\\u0000', '\\u0001', '\\u0002', '\\u0003', '\\u0004', '\\u0005', '\\u0006', '\\u0007', '\\b', '\\t', '\\n', '\\u000B', '\\f', '\\r', '\\u000E', '\\u000F', '\\u0010', '\\u0011', '\\u0012', '\\u0013', '\\u0014', '\\u0015', '\\u0016', '\\u0017', '\\u0018', '\\u0019', '\\u001A', '\\u001B', '\\u001C', '\\u001D', '\\u001E', '\\u001F', '', '', '\\"', '', '', '', '', '', '', '', '', '', '', '', '', '', // 2F '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', // 3F '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', // 4F '', '', '', '', '', '', '', '', '', '', '', '', '\\\\', '', '', '', // 5F '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', // 6F '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '\\u007F', '\\u0080', '\\u0081', '\\u0082', '\\u0083', '\\u0084', '\\u0085', '\\u0086', '\\u0087', '\\u0088', '\\u0089', '\\u008A', '\\u008B', '\\u008C', '\\u008D', '\\u008E', '\\u008F', '\\u0090', '\\u0091', '\\u0092', '\\u0093', '\\u0094', '\\u0095', '\\u0096', '\\u0097', '\\u0098', '\\u0099', '\\u009A', '\\u009B', '\\u009C', '\\u009D', '\\u009E', '\\u009F', ]; /***/ }), /***/ 48575: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ _: () => (/* binding */ isSource), /* harmony export */ k: () => (/* binding */ Source) /* harmony export */ }); /* harmony import */ var _jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30599); /* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75640); /* harmony import */ var _jsutils_instanceOf_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(96090); /** * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are * optional, but they are useful for clients who store GraphQL documents in source files. * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might * be useful for `name` to be `"Foo.graphql"` and location to be `{ line: 40, column: 1 }`. * The `line` and `column` properties in `locationOffset` are 1-indexed. */ class Source { constructor( body, name = 'GraphQL request', locationOffset = { line: 1, column: 1, }, ) { typeof body === 'string' || (0,_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_0__/* .devAssert */ .U)(false, `Body must be a string. Received: ${(0,_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__/* .inspect */ .N)(body)}.`); this.body = body; this.name = name; this.locationOffset = locationOffset; this.locationOffset.line > 0 || (0,_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_0__/* .devAssert */ .U)( false, 'line in locationOffset is 1-indexed and must be positive.', ); this.locationOffset.column > 0 || (0,_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_0__/* .devAssert */ .U)( false, 'column in locationOffset is 1-indexed and must be positive.', ); } get [Symbol.toStringTag]() { return 'Source'; } } /** * Test if the given value is a Source object. * * @internal */ function isSource(source) { return (0,_jsutils_instanceOf_mjs__WEBPACK_IMPORTED_MODULE_2__/* .instanceOf */ .h)(source, Source); } /***/ }), /***/ 24925: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Y: () => (/* binding */ TokenKind) /* harmony export */ }); /** * An exported enum describing the different kinds of tokens that the * lexer emits. */ var TokenKind; (function (TokenKind) { TokenKind['SOF'] = ''; TokenKind['EOF'] = ''; TokenKind['BANG'] = '!'; TokenKind['DOLLAR'] = '$'; TokenKind['AMP'] = '&'; TokenKind['PAREN_L'] = '('; TokenKind['PAREN_R'] = ')'; TokenKind['SPREAD'] = '...'; TokenKind['COLON'] = ':'; TokenKind['EQUALS'] = '='; TokenKind['AT'] = '@'; TokenKind['BRACKET_L'] = '['; TokenKind['BRACKET_R'] = ']'; TokenKind['BRACE_L'] = '{'; TokenKind['PIPE'] = '|'; TokenKind['BRACE_R'] = '}'; TokenKind['NAME'] = 'Name'; TokenKind['INT'] = 'Int'; TokenKind['FLOAT'] = 'Float'; TokenKind['STRING'] = 'String'; TokenKind['BLOCK_STRING'] = 'BlockString'; TokenKind['COMMENT'] = 'Comment'; })(TokenKind || (TokenKind = {})); /** * The enum type representing the token kinds values. * * @deprecated Please use `TokenKind`. Will be remove in v17. */ /***/ }), /***/ 11786: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ UY: () => (/* binding */ getVisitFn), /* harmony export */ XO: () => (/* binding */ getEnterLeaveForKind), /* harmony export */ YR: () => (/* binding */ visit), /* harmony export */ oP: () => (/* binding */ visitInParallel), /* harmony export */ sP: () => (/* binding */ BREAK) /* harmony export */ }); /* harmony import */ var _jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30599); /* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75640); /* harmony import */ var _ast_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75136); /* harmony import */ var _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73061); /** * A visitor is provided to visit, it contains the collection of * relevant functions to be called during the visitor's traversal. */ const BREAK = Object.freeze({}); /** * visit() will walk through an AST using a depth-first traversal, calling * the visitor's enter function at each node in the traversal, and calling the * leave function after visiting that node and all of its child nodes. * * By returning different values from the enter and leave functions, the * behavior of the visitor can be altered, including skipping over a sub-tree of * the AST (by returning false), editing the AST by returning a value or null * to remove the value, or to stop the whole traversal by returning BREAK. * * When using visit() to edit an AST, the original AST will not be modified, and * a new version of the AST with the changes applied will be returned from the * visit function. * * ```ts * const editedAST = visit(ast, { * enter(node, key, parent, path, ancestors) { * // @return * // undefined: no action * // false: skip visiting this node * // visitor.BREAK: stop visiting altogether * // null: delete this node * // any value: replace this node with the returned value * }, * leave(node, key, parent, path, ancestors) { * // @return * // undefined: no action * // false: no action * // visitor.BREAK: stop visiting altogether * // null: delete this node * // any value: replace this node with the returned value * } * }); * ``` * * Alternatively to providing enter() and leave() functions, a visitor can * instead provide functions named the same as the kinds of AST nodes, or * enter/leave visitors at a named key, leading to three permutations of the * visitor API: * * 1) Named visitors triggered when entering a node of a specific kind. * * ```ts * visit(ast, { * Kind(node) { * // enter the "Kind" node * } * }) * ``` * * 2) Named visitors that trigger upon entering and leaving a node of a specific kind. * * ```ts * visit(ast, { * Kind: { * enter(node) { * // enter the "Kind" node * } * leave(node) { * // leave the "Kind" node * } * } * }) * ``` * * 3) Generic visitors that trigger upon entering and leaving any node. * * ```ts * visit(ast, { * enter(node) { * // enter any node * }, * leave(node) { * // leave any node * } * }) * ``` */ function visit(root, visitor, visitorKeys = _ast_mjs__WEBPACK_IMPORTED_MODULE_0__/* .QueryDocumentKeys */ .aD) { const enterLeaveMap = new Map(); for (const kind of Object.values(_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b)) { enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind)); } /* eslint-disable no-undef-init */ let stack = undefined; let inArray = Array.isArray(root); let keys = [root]; let index = -1; let edits = []; let node = root; let key = undefined; let parent = undefined; const path = []; const ancestors = []; /* eslint-enable no-undef-init */ do { index++; const isLeaving = index === keys.length; const isEdited = isLeaving && edits.length !== 0; if (isLeaving) { key = ancestors.length === 0 ? undefined : path[path.length - 1]; node = parent; parent = ancestors.pop(); if (isEdited) { if (inArray) { node = node.slice(); let editOffset = 0; for (const [editKey, editValue] of edits) { const arrayKey = editKey - editOffset; if (editValue === null) { node.splice(arrayKey, 1); editOffset++; } else { node[arrayKey] = editValue; } } } else { node = { ...node }; for (const [editKey, editValue] of edits) { node[editKey] = editValue; } } } index = stack.index; keys = stack.keys; edits = stack.edits; inArray = stack.inArray; stack = stack.prev; } else if (parent) { key = inArray ? index : keys[index]; node = parent[key]; if (node === null || node === undefined) { continue; } path.push(key); } let result; if (!Array.isArray(node)) { var _enterLeaveMap$get, _enterLeaveMap$get2; (0,_ast_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isNode */ .Ll)(node) || (0,_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_2__/* .devAssert */ .U)(false, `Invalid AST Node: ${(0,_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_3__/* .inspect */ .N)(node)}.`); const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter; result = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors); if (result === BREAK) { break; } if (result === false) { if (!isLeaving) { path.pop(); continue; } } else if (result !== undefined) { edits.push([key, result]); if (!isLeaving) { if ((0,_ast_mjs__WEBPACK_IMPORTED_MODULE_0__/* .isNode */ .Ll)(result)) { node = result; } else { path.pop(); continue; } } } } if (result === undefined && isEdited) { edits.push([key, node]); } if (isLeaving) { path.pop(); } else { var _node$kind; stack = { inArray, index, keys, edits, prev: stack, }; inArray = Array.isArray(node); keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : []; index = -1; edits = []; if (parent) { ancestors.push(parent); } parent = node; } } while (stack !== undefined); if (edits.length !== 0) { // New root return edits[edits.length - 1][1]; } return root; } /** * Creates a new visitor instance which delegates to many visitors to run in * parallel. Each visitor will be visited for each node before moving on. * * If a prior visitor edits a node, no following visitors will see that node. */ function visitInParallel(visitors) { const skipping = new Array(visitors.length).fill(null); const mergedVisitor = Object.create(null); for (const kind of Object.values(_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__/* .Kind */ .b)) { let hasVisitor = false; const enterList = new Array(visitors.length).fill(undefined); const leaveList = new Array(visitors.length).fill(undefined); for (let i = 0; i < visitors.length; ++i) { const { enter, leave } = getEnterLeaveForKind(visitors[i], kind); hasVisitor || (hasVisitor = enter != null || leave != null); enterList[i] = enter; leaveList[i] = leave; } if (!hasVisitor) { continue; } const mergedEnterLeave = { enter(...args) { const node = args[0]; for (let i = 0; i < visitors.length; i++) { if (skipping[i] === null) { var _enterList$i; const result = (_enterList$i = enterList[i]) === null || _enterList$i === void 0 ? void 0 : _enterList$i.apply(visitors[i], args); if (result === false) { skipping[i] = node; } else if (result === BREAK) { skipping[i] = BREAK; } else if (result !== undefined) { return result; } } } }, leave(...args) { const node = args[0]; for (let i = 0; i < visitors.length; i++) { if (skipping[i] === null) { var _leaveList$i; const result = (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0 ? void 0 : _leaveList$i.apply(visitors[i], args); if (result === BREAK) { skipping[i] = BREAK; } else if (result !== undefined && result !== false) { return result; } } else if (skipping[i] === node) { skipping[i] = null; } } }, }; mergedVisitor[kind] = mergedEnterLeave; } return mergedVisitor; } /** * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind. */ function getEnterLeaveForKind(visitor, kind) { const kindVisitor = visitor[kind]; if (typeof kindVisitor === 'object') { // { Kind: { enter() {}, leave() {} } } return kindVisitor; } else if (typeof kindVisitor === 'function') { // { Kind() {} } return { enter: kindVisitor, leave: undefined, }; } // { enter() {}, leave() {} } return { enter: visitor.enter, leave: visitor.leave, }; } /** * Given a visitor instance, if it is leaving or not, and a node kind, return * the function the visitor runtime should call. * * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17 */ /* c8 ignore next 8 */ function getVisitFn(visitor, kind, isLeaving) { const { enter, leave } = getEnterLeaveForKind(visitor, kind); return isLeaving ? leave : enter; } /***/ }), /***/ 30592: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $defineProperty = __webpack_require__(30655); var hasPropertyDescriptors = function hasPropertyDescriptors() { return !!$defineProperty; }; hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { // node v0.6 has a bug where array lengths can be Set but not Defined if (!$defineProperty) { return null; } try { return $defineProperty([], 'length', { value: 1 }).length !== 1; } catch (e) { // In Firefox 4-22, defining length on an array throws an exception. return true; } }; module.exports = hasPropertyDescriptors; /***/ }), /***/ 64039: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var origSymbol = typeof Symbol !== 'undefined' && Symbol; var hasSymbolSham = __webpack_require__(41333); /** @type {import('.')} */ module.exports = function hasNativeSymbols() { if (typeof origSymbol !== 'function') { return false; } if (typeof Symbol !== 'function') { return false; } if (typeof origSymbol('foo') !== 'symbol') { return false; } if (typeof Symbol('bar') !== 'symbol') { return false; } return hasSymbolSham(); }; /***/ }), /***/ 41333: /***/ ((module) => { "use strict"; /** @type {import('./shams')} */ /* eslint complexity: [2, 18], max-statements: [2, 33] */ module.exports = function hasSymbols() { if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } if (typeof Symbol.iterator === 'symbol') { return true; } /** @type {{ [k in symbol]?: unknown }} */ var obj = {}; var sym = Symbol('test'); var symObj = Object(sym); if (typeof sym === 'string') { return false; } if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } // temp disabled per https://github.com/ljharb/object.assign/issues/17 // if (sym instanceof Symbol) { return false; } // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 // if (!(symObj instanceof Symbol)) { return false; } // if (typeof Symbol.prototype.toString !== 'function') { return false; } // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } var symVal = 42; obj[sym] = symVal; for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } var syms = Object.getOwnPropertySymbols(obj); if (syms.length !== 1 || syms[0] !== sym) { return false; } if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } if (typeof Object.getOwnPropertyDescriptor === 'function') { // eslint-disable-next-line no-extra-parens var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } } return true; }; /***/ }), /***/ 49092: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var hasSymbols = __webpack_require__(41333); /** @type {import('.')} */ module.exports = function hasToStringTagShams() { return hasSymbols() && !!Symbol.toStringTag; }; /***/ }), /***/ 9957: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var call = Function.prototype.call; var $hasOwn = Object.prototype.hasOwnProperty; var bind = __webpack_require__(66743); /** @type {import('.')} */ module.exports = bind.call(call, $hasOwn); /***/ }), /***/ 3072: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b? Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119; function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d; exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t}; exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p}; exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z; /***/ }), /***/ 73404: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; if (true) { module.exports = __webpack_require__(3072); } else {} /***/ }), /***/ 56698: /***/ ((module) => { if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }) } }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor var TempCtor = function () {} TempCtor.prototype = superCtor.prototype ctor.prototype = new TempCtor() ctor.prototype.constructor = ctor } } } /***/ }), /***/ 20311: /***/ ((module) => { "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; /***/ }), /***/ 47244: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var hasToStringTag = __webpack_require__(49092)(); var callBound = __webpack_require__(38075); var $toString = callBound('Object.prototype.toString'); var isStandardArguments = function isArguments(value) { if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) { return false; } return $toString(value) === '[object Arguments]'; }; var isLegacyArguments = function isArguments(value) { if (isStandardArguments(value)) { return true; } return value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && $toString(value) !== '[object Array]' && $toString(value.callee) === '[object Function]'; }; var supportsStandardArguments = (function () { return isStandardArguments(arguments); }()); isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments; /***/ }), /***/ 69600: /***/ ((module) => { "use strict"; var fnToStr = Function.prototype.toString; var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; var badArrayLike; var isCallableMarker; if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { try { badArrayLike = Object.defineProperty({}, 'length', { get: function () { throw isCallableMarker; } }); isCallableMarker = {}; // eslint-disable-next-line no-throw-literal reflectApply(function () { throw 42; }, null, badArrayLike); } catch (_) { if (_ !== isCallableMarker) { reflectApply = null; } } } else { reflectApply = null; } var constructorRegex = /^\s*class\b/; var isES6ClassFn = function isES6ClassFunction(value) { try { var fnStr = fnToStr.call(value); return constructorRegex.test(fnStr); } catch (e) { return false; // not a function } }; var tryFunctionObject = function tryFunctionToStr(value) { try { if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } catch (e) { return false; } }; var toStr = Object.prototype.toString; var objectClass = '[object Object]'; var fnClass = '[object Function]'; var genClass = '[object GeneratorFunction]'; var ddaClass = '[object HTMLAllCollection]'; // IE 11 var ddaClass2 = '[object HTML document.all class]'; var ddaClass3 = '[object HTMLCollection]'; // IE 9-10 var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing var isDDA = function isDocumentDotAll() { return false; }; if (typeof document === 'object') { // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly var all = document.all; if (toStr.call(all) === toStr.call(document.all)) { isDDA = function isDocumentDotAll(value) { /* globals document: false */ // in IE 6-8, typeof document.all is "object" and it's truthy if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) { try { var str = toStr.call(value); return ( str === ddaClass || str === ddaClass2 || str === ddaClass3 // opera 12.16 || str === objectClass // IE 6-8 ) && value('') == null; // eslint-disable-line eqeqeq } catch (e) { /**/ } } return false; }; } } module.exports = reflectApply ? function isCallable(value) { if (isDDA(value)) { return true; } if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } try { reflectApply(value, null, badArrayLike); } catch (e) { if (e !== isCallableMarker) { return false; } } return !isES6ClassFn(value) && tryFunctionObject(value); } : function isCallable(value) { if (isDDA(value)) { return true; } 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); if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; } return tryFunctionObject(value); }; /***/ }), /***/ 48184: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var toStr = Object.prototype.toString; var fnToStr = Function.prototype.toString; var isFnRegex = /^\s*(?:function)?\*/; var hasToStringTag = __webpack_require__(49092)(); var getProto = Object.getPrototypeOf; var getGeneratorFunc = function () { // eslint-disable-line consistent-return if (!hasToStringTag) { return false; } try { return Function('return function*() {}')(); } catch (e) { } }; var GeneratorFunction; 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]'; } if (!getProto) { return false; } if (typeof GeneratorFunction === 'undefined') { var generatorFunc = getGeneratorFunc(); GeneratorFunction = generatorFunc ? getProto(generatorFunc) : false; } return getProto(fn) === GeneratorFunction; }; /***/ }), /***/ 35680: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var whichTypedArray = __webpack_require__(25767); /** @type {import('.')} */ module.exports = function isTypedArray(value) { return !!whichTypedArray(value); }; /***/ }), /***/ 11441: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var camel2hyphen = __webpack_require__(28028); var isDimension = function (feature) { var re = /[height|width]$/; return re.test(feature); }; var obj2mq = function (obj) { var mq = ''; var features = Object.keys(obj); features.forEach(function (feature, index) { var value = obj[feature]; feature = camel2hyphen(feature); // Add px to dimension features if (isDimension(feature) && typeof value === 'number') { value = value + 'px'; } if (value === true) { mq += feature; } else if (value === false) { mq += 'not ' + feature; } else { mq += '(' + feature + ': ' + value + ')'; } if (index < features.length-1) { mq += ' and ' } }); return mq; }; var json2mq = function (query) { var mq = ''; if (typeof query === 'string') { return query; } // Handling array of media queries if (query instanceof Array) { query.forEach(function (q, index) { mq += obj2mq(q); if (index < query.length-1) { mq += ', ' } }); return mq; } // Handling single media query return obj2mq(query); }; module.exports = json2mq; /***/ }), /***/ 6765: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ InvalidTokenError: () => (/* binding */ n), /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); function e(e){this.message=e}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r= true&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (o); //# sourceMappingURL=jwt-decode.esm.js.map /***/ }), /***/ 51757: /***/ (function(__unused_webpack_module, exports) { /*! MIT License Copyright (c) 2018 Arturas Molcanovas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ (function (global, factory) { true ? factory(exports) : 0; }(typeof self !== 'undefined' ? self : this, function (exports) { 'use strict'; var _driver = 'localforage-driver-memory'; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ function __values(o) { var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; if (m) return m.call(o); return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; } /*! MIT License Copyright (c) 2018 Arturas Molcanovas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** * Abstracts constructing a Blob object, so it also works in older * browsers that don't support the native Blob constructor. (i.e. * old QtWebKit versions, at least). * Abstracts constructing a Blob object, so it also works in older * browsers that don't support the native Blob constructor. (i.e. * old QtWebKit versions, at least). * * @param parts * @param properties */ function createBlob(parts, properties) { /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */ parts = parts || []; properties = properties || {}; try { return new Blob(parts, properties); } catch (e) { if (e.name !== 'TypeError') { throw e; } //tslint:disable-next-line:variable-name var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder; var builder = new Builder(); for (var i = 0; i < parts.length; i += 1) { builder.append(parts[i]); } return builder.getBlob(properties.type); } } var BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/; var SERIALIZED_MARKER_LENGTH = "__lfsc__:" /* SERIALIZED_MARKER */.length; var TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + "arbf" /* TYPE_ARRAYBUFFER */.length; //tslint:disable:no-magic-numbers no-bitwise prefer-switch no-unbound-method var toString = Object.prototype.toString; function stringToBuffer(serializedString) { // Fill the string into a ArrayBuffer. var bufferLength = serializedString.length * 0.75; var len = serializedString.length; if (serializedString[serializedString.length - 1] === '=') { bufferLength--; if (serializedString[serializedString.length - 2] === '=') { bufferLength--; } } var buffer = new ArrayBuffer(bufferLength); var bytes = new Uint8Array(buffer); for (var i = 0, p = 0; i < len; i += 4) { var encoded1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" /* BASE_CHARS */.indexOf(serializedString[i]); var encoded2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" /* BASE_CHARS */.indexOf(serializedString[i + 1]); var encoded3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" /* BASE_CHARS */.indexOf(serializedString[i + 2]); var encoded4 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" /* BASE_CHARS */.indexOf(serializedString[i + 3]); bytes[p++] = (encoded1 << 2) | (encoded2 >> 4); bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2); bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63); } return buffer; } /** * Converts a buffer to a string to store, serialized, in the backend * storage library. */ function bufferToString(buffer) { // base64-arraybuffer var bytes = new Uint8Array(buffer); var base64String = ''; for (var i = 0; i < bytes.length; i += 3) { /*jslint bitwise: true */ base64String += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" /* BASE_CHARS */[bytes[i] >> 2]; base64String += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" /* BASE_CHARS */[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)]; base64String += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" /* BASE_CHARS */[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)]; base64String += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" /* BASE_CHARS */[bytes[i + 2] & 63]; } if (bytes.length % 3 === 2) { base64String = base64String.substring(0, base64String.length - 1) + '='; } else if (bytes.length % 3 === 1) { base64String = base64String.substring(0, base64String.length - 2) + '=='; } return base64String; } /** * Serialize a value, afterwards executing a callback (which usually * instructs the `setItem()` callback/promise to be executed). This is how * we store binary data with localStorage. * @param value * @param callback */ function serialize(value, callback) { var valueType = ''; if (value) { valueType = toString.call(value); } // Cannot use `value instanceof ArrayBuffer` or such here, as these // checks fail when running the tests using casper.js... if (value && (valueType === '[object ArrayBuffer]' || (value.buffer && toString.call(value.buffer) === '[object ArrayBuffer]'))) { // Convert binary arrays to a string and prefix the string with // a special marker. var buffer = void 0; var marker = "__lfsc__:" /* SERIALIZED_MARKER */; if (value instanceof ArrayBuffer) { buffer = value; marker += "arbf" /* TYPE_ARRAYBUFFER */; } else { buffer = value.buffer; if (valueType === '[object Int8Array]') { marker += "si08" /* TYPE_INT8ARRAY */; } else if (valueType === '[object Uint8Array]') { marker += "ui08" /* TYPE_UINT8ARRAY */; } else if (valueType === '[object Uint8ClampedArray]') { marker += "uic8" /* TYPE_UINT8CLAMPEDARRAY */; } else if (valueType === '[object Int16Array]') { marker += "si16" /* TYPE_INT16ARRAY */; } else if (valueType === '[object Uint16Array]') { marker += "ur16" /* TYPE_UINT16ARRAY */; } else if (valueType === '[object Int32Array]') { marker += "si32" /* TYPE_INT32ARRAY */; } else if (valueType === '[object Uint32Array]') { marker += "ui32" /* TYPE_UINT32ARRAY */; } else if (valueType === '[object Float32Array]') { marker += "fl32" /* TYPE_FLOAT32ARRAY */; } else if (valueType === '[object Float64Array]') { marker += "fl64" /* TYPE_FLOAT64ARRAY */; } else { callback(new Error('Failed to get type for BinaryArray')); } } callback(marker + bufferToString(buffer)); } else if (valueType === '[object Blob]') { // Convert the blob to a binaryArray and then to a string. var fileReader = new FileReader(); fileReader.onload = function () { // Backwards-compatible prefix for the blob type. //tslint:disable-next-line:restrict-plus-operands var str = "~~local_forage_type~" /* BLOB_TYPE_PREFIX */ + value.type + "~" + bufferToString(this.result); callback("__lfsc__:" /* SERIALIZED_MARKER */ + "blob" /* TYPE_BLOB */ + str); }; fileReader.readAsArrayBuffer(value); } else { try { callback(JSON.stringify(value)); } catch (e) { console.error('Couldn\'t convert value into a JSON string: ', value); callback(null, e); } } } /** * Deserialize data we've inserted into a value column/field. We place * special markers into our strings to mark them as encoded; this isn't * as nice as a meta field, but it's the only sane thing we can do whilst * keeping localStorage support intact. * * Oftentimes this will just deserialize JSON content, but if we have a * special marker (SERIALIZED_MARKER, defined above), we will extract * some kind of arraybuffer/binary data/typed array out of the string. * @param value */ function deserialize(value) { // If we haven't marked this string as being specially serialized (i.e. // something other than serialized JSON), we can just return it and be // done with it. if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== "__lfsc__:" /* SERIALIZED_MARKER */) { return JSON.parse(value); } // The following code deals with deserializing some kind of Blob or // TypedArray. First we separate out the type of data we're dealing // with from the data itself. var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH); var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH); var blobType; // Backwards-compatible blob type serialization strategy. // DBs created with older versions of localForage will simply not have the blob type. if (type === "blob" /* TYPE_BLOB */ && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) { var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX); blobType = matcher[1]; serializedString = serializedString.substring(matcher[0].length); } var buffer = stringToBuffer(serializedString); // Return the right type based on the code/type set during // serialization. switch (type) { case "arbf" /* TYPE_ARRAYBUFFER */: return buffer; case "blob" /* TYPE_BLOB */: return createBlob([buffer], { type: blobType }); case "si08" /* TYPE_INT8ARRAY */: return new Int8Array(buffer); case "ui08" /* TYPE_UINT8ARRAY */: return new Uint8Array(buffer); case "uic8" /* TYPE_UINT8CLAMPEDARRAY */: return new Uint8ClampedArray(buffer); case "si16" /* TYPE_INT16ARRAY */: return new Int16Array(buffer); case "ur16" /* TYPE_UINT16ARRAY */: return new Uint16Array(buffer); case "si32" /* TYPE_INT32ARRAY */: return new Int32Array(buffer); case "ui32" /* TYPE_UINT32ARRAY */: return new Uint32Array(buffer); case "fl32" /* TYPE_FLOAT32ARRAY */: return new Float32Array(buffer); case "fl64" /* TYPE_FLOAT64ARRAY */: return new Float64Array(buffer); default: throw new Error('Unkown type: ' + type); } } function clone(obj) { var e_1, _a; if (obj === null || typeof (obj) !== 'object' || 'isActiveClone' in obj) { return obj; } var temp = obj instanceof Date ? new Date(obj) : (obj.constructor()); try { for (var _b = __values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) { var key = _c.value; if (Object.prototype.hasOwnProperty.call(obj, key)) { obj['isActiveClone'] = null; temp[key] = clone(obj[key]); delete obj['isActiveClone']; } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } return temp; } function getKeyPrefix(options, defaultConfig) { return (options.name || defaultConfig.name) + "/" + (options.storeName || defaultConfig.storeName) + "/"; } function executeCallback(promise, callback) { if (callback) { promise.then(function (result) { callback(null, result); }, function (error) { callback(error); }); } } function getCallback() { var _args = []; for (var _i = 0; _i < arguments.length; _i++) { _args[_i] = arguments[_i]; } if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { return arguments[arguments.length - 1]; } } //tslint:disable-next-line:no-ignored-initial-value function dropInstanceCommon(options, callback) { var _this = this; callback = getCallback.apply(this, arguments); options = (typeof options !== 'function' && options) || {}; if (!options.name) { var currentConfig = this.config(); options.name = options.name || currentConfig.name; options.storeName = options.storeName || currentConfig.storeName; } var promise; if (!options.name) { promise = Promise.reject('Invalid arguments'); } else { promise = new Promise(function (resolve) { if (!options.storeName) { resolve(options.name + "/"); } else { resolve(getKeyPrefix(options, _this._defaultConfig)); } }); } return { promise: promise, callback: callback }; } function normaliseKey(key) { // Cast the key to a string, as that's all we can set as a key. if (typeof key !== 'string') { console.warn(key + " used as a key, but it is not a string."); key = String(key); } return key; } var serialiser = { bufferToString: bufferToString, deserialize: deserialize, serialize: serialize, stringToBuffer: stringToBuffer }; var stores = {}; /** @internal */ var Store = /** @class */ (function () { function Store(kp) { this.kp = kp; this.data = {}; } Store.resolve = function (kp) { if (!stores[kp]) { stores[kp] = new Store(kp); } return stores[kp]; }; Store.prototype.clear = function () { this.data = {}; }; Store.prototype.drop = function () { this.clear(); delete stores[this.kp]; }; Store.prototype.get = function (key) { return this.data[key]; }; Store.prototype.key = function (idx) { return this.keys()[idx]; }; Store.prototype.keys = function () { return Object.keys(this.data); }; Store.prototype.rm = function (k) { delete this.data[k]; }; Store.prototype.set = function (k, v) { this.data[k] = v; }; return Store; }()); function _initStorage(options) { var opts = options ? clone(options) : {}; var kp = getKeyPrefix(opts, this._defaultConfig); var store = Store.resolve(kp); this._dbInfo = opts; this._dbInfo.serializer = serialiser; this._dbInfo.keyPrefix = kp; this._dbInfo.mStore = store; return Promise.resolve(); } function clear(callback) { var _this = this; var promise = this.ready().then(function () { _this._dbInfo.mStore.clear(); }); executeCallback(promise, callback); return promise; } function dropInstance(_options, _cb) { var _a = dropInstanceCommon.apply(this, arguments), promise = _a.promise, callback = _a.callback; var outPromise = promise.then(function (keyPrefix) { Store.resolve(keyPrefix).drop(); }); executeCallback(outPromise, callback); return promise; } function getItem(key$, callback) { var _this = this; key$ = normaliseKey(key$); var promise = this.ready().then(function () { var result = _this._dbInfo.mStore.get(key$); // Deserialise if the result is not null or undefined return result == null ? null : _this._dbInfo.serializer.deserialize(result); //tslint:disable-line:triple-equals }); executeCallback(promise, callback); return promise; } function iterate(iterator, callback) { var _this = this; var promise = this.ready().then(function () { var store = _this._dbInfo.mStore; var keys = store.keys(); for (var i = 0; i < keys.length; i++) { var value = store.get(keys[i]); // If a result was found, parse it from the serialized // string into a JS object. If result isn't truthy, the // key is likely undefined and we'll pass it straight // to the iterator. if (value) { value = _this._dbInfo.serializer.deserialize(value); } value = iterator(value, keys[i], i + 1); if (value !== undefined) { return value; } } }); executeCallback(promise, callback); return promise; } function key(idx, callback) { var _this = this; var promise = this.ready().then(function () { var result; try { result = _this._dbInfo.mStore.key(idx); if (result === undefined) { result = null; } } catch (_a) { result = null; } return result; }); executeCallback(promise, callback); return promise; } function keys(callback) { var _this = this; var promise = this.ready().then(function () { return _this._dbInfo.mStore.keys(); }); executeCallback(promise, callback); return promise; } function length(callback) { var promise = this.keys().then(function (keys$) { return keys$.length; }); executeCallback(promise, callback); return promise; } function removeItem(key$, callback) { var _this = this; key$ = normaliseKey(key$); var promise = this.ready().then(function () { _this._dbInfo.mStore.rm(key$); }); executeCallback(promise, callback); return promise; } function setItem(key$, value, callback) { var _this = this; key$ = normaliseKey(key$); var promise = this.ready().then(function () { if (value === undefined) { value = null; } // Save the original value to pass to the callback. var originalValue = value; return new Promise(function (resolve, reject) { _this._dbInfo.serializer.serialize(value, function (value$, error) { if (error) { reject(error); } else { try { _this._dbInfo.mStore.set(key$, value$); resolve(originalValue); } catch (e) { reject(e); } } }); }); }); executeCallback(promise, callback); return promise; } var _support = true; exports._support = _support; exports._driver = _driver; exports._initStorage = _initStorage; exports.clear = clear; exports.dropInstance = dropInstance; exports.getItem = getItem; exports.iterate = iterate; exports.key = key; exports.keys = keys; exports.length = length; exports.removeItem = removeItem; exports.setItem = setItem; Object.defineProperty(exports, '__esModule', { value: true }); })); //# sourceMappingURL=umd.js.map /***/ }), /***/ 73790: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /*! localForage -- Offline Storage, Improved Version 1.10.0 https://localforage.github.io/localForage (c) 2013-2017 Mozilla, Apache License 2.0 */ (function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=undefined;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw (f.code="MODULE_NOT_FOUND", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=undefined;for(var o=0;o element; its readystatechange event will be fired asynchronously once it is inserted // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called. var scriptEl = global.document.createElement('script'); scriptEl.onreadystatechange = function () { nextTick(); scriptEl.onreadystatechange = null; scriptEl.parentNode.removeChild(scriptEl); scriptEl = null; }; global.document.documentElement.appendChild(scriptEl); }; } else { scheduleDrain = function () { setTimeout(nextTick, 0); }; } } var draining; var queue = []; //named nextTick for less confusing stack traces function nextTick() { draining = true; var i, oldQueue; var len = queue.length; while (len) { oldQueue = queue; queue = []; i = -1; while (++i < len) { oldQueue[i](); } len = queue.length; } draining = false; } module.exports = immediate; function immediate(task) { if (queue.push(task) === 1 && !draining) { scheduleDrain(); } } }).call(this,typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof self !== "undefined" ? self : true ? window : 0) },{}],2:[function(_dereq_,module,exports){ 'use strict'; var immediate = _dereq_(1); /* istanbul ignore next */ function INTERNAL() {} var handlers = {}; var REJECTED = ['REJECTED']; var FULFILLED = ['FULFILLED']; var PENDING = ['PENDING']; module.exports = Promise; function Promise(resolver) { if (typeof resolver !== 'function') { throw new TypeError('resolver must be a function'); } this.state = PENDING; this.queue = []; this.outcome = void 0; if (resolver !== INTERNAL) { safelyResolveThenable(this, resolver); } } Promise.prototype["catch"] = function (onRejected) { return this.then(null, onRejected); }; Promise.prototype.then = function (onFulfilled, onRejected) { if (typeof onFulfilled !== 'function' && this.state === FULFILLED || typeof onRejected !== 'function' && this.state === REJECTED) { return this; } var promise = new this.constructor(INTERNAL); if (this.state !== PENDING) { var resolver = this.state === FULFILLED ? onFulfilled : onRejected; unwrap(promise, resolver, this.outcome); } else { this.queue.push(new QueueItem(promise, onFulfilled, onRejected)); } return promise; }; function QueueItem(promise, onFulfilled, onRejected) { this.promise = promise; if (typeof onFulfilled === 'function') { this.onFulfilled = onFulfilled; this.callFulfilled = this.otherCallFulfilled; } if (typeof onRejected === 'function') { this.onRejected = onRejected; this.callRejected = this.otherCallRejected; } } QueueItem.prototype.callFulfilled = function (value) { handlers.resolve(this.promise, value); }; QueueItem.prototype.otherCallFulfilled = function (value) { unwrap(this.promise, this.onFulfilled, value); }; QueueItem.prototype.callRejected = function (value) { handlers.reject(this.promise, value); }; QueueItem.prototype.otherCallRejected = function (value) { unwrap(this.promise, this.onRejected, value); }; function unwrap(promise, func, value) { immediate(function () { var returnValue; try { returnValue = func(value); } catch (e) { return handlers.reject(promise, e); } if (returnValue === promise) { handlers.reject(promise, new TypeError('Cannot resolve promise with itself')); } else { handlers.resolve(promise, returnValue); } }); } handlers.resolve = function (self, value) { var result = tryCatch(getThen, value); if (result.status === 'error') { return handlers.reject(self, result.value); } var thenable = result.value; if (thenable) { safelyResolveThenable(self, thenable); } else { self.state = FULFILLED; self.outcome = value; var i = -1; var len = self.queue.length; while (++i < len) { self.queue[i].callFulfilled(value); } } return self; }; handlers.reject = function (self, error) { self.state = REJECTED; self.outcome = error; var i = -1; var len = self.queue.length; while (++i < len) { self.queue[i].callRejected(error); } return self; }; function getThen(obj) { // Make sure we only access the accessor once as required by the spec var then = obj && obj.then; if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') { return function appyThen() { then.apply(obj, arguments); }; } } function safelyResolveThenable(self, thenable) { // Either fulfill, reject or reject with error var called = false; function onError(value) { if (called) { return; } called = true; handlers.reject(self, value); } function onSuccess(value) { if (called) { return; } called = true; handlers.resolve(self, value); } function tryToUnwrap() { thenable(onSuccess, onError); } var result = tryCatch(tryToUnwrap); if (result.status === 'error') { onError(result.value); } } function tryCatch(func, value) { var out = {}; try { out.value = func(value); out.status = 'success'; } catch (e) { out.status = 'error'; out.value = e; } return out; } Promise.resolve = resolve; function resolve(value) { if (value instanceof this) { return value; } return handlers.resolve(new this(INTERNAL), value); } Promise.reject = reject; function reject(reason) { var promise = new this(INTERNAL); return handlers.reject(promise, reason); } Promise.all = all; function all(iterable) { var self = this; if (Object.prototype.toString.call(iterable) !== '[object Array]') { return this.reject(new TypeError('must be an array')); } var len = iterable.length; var called = false; if (!len) { return this.resolve([]); } var values = new Array(len); var resolved = 0; var i = -1; var promise = new this(INTERNAL); while (++i < len) { allResolver(iterable[i], i); } return promise; function allResolver(value, i) { self.resolve(value).then(resolveFromAll, function (error) { if (!called) { called = true; handlers.reject(promise, error); } }); function resolveFromAll(outValue) { values[i] = outValue; if (++resolved === len && !called) { called = true; handlers.resolve(promise, values); } } } } Promise.race = race; function race(iterable) { var self = this; if (Object.prototype.toString.call(iterable) !== '[object Array]') { return this.reject(new TypeError('must be an array')); } var len = iterable.length; var called = false; if (!len) { return this.resolve([]); } var i = -1; var promise = new this(INTERNAL); while (++i < len) { resolver(iterable[i]); } return promise; function resolver(value) { self.resolve(value).then(function (response) { if (!called) { called = true; handlers.resolve(promise, response); } }, function (error) { if (!called) { called = true; handlers.reject(promise, error); } }); } } },{"1":1}],3:[function(_dereq_,module,exports){ (function (global){ 'use strict'; if (typeof global.Promise !== 'function') { global.Promise = _dereq_(2); } }).call(this,typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof self !== "undefined" ? self : true ? window : 0) },{"2":2}],4:[function(_dereq_,module,exports){ 'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function getIDB() { /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */ try { if (typeof indexedDB !== 'undefined') { return indexedDB; } if (typeof webkitIndexedDB !== 'undefined') { return webkitIndexedDB; } if (typeof mozIndexedDB !== 'undefined') { return mozIndexedDB; } if (typeof OIndexedDB !== 'undefined') { return OIndexedDB; } if (typeof msIndexedDB !== 'undefined') { return msIndexedDB; } } catch (e) { return; } } var idb = getIDB(); function isIndexedDBValid() { try { // Initialize IndexedDB; fall back to vendor-prefixed versions // if needed. if (!idb || !idb.open) { return false; } // We mimic PouchDB here; // // We test for openDatabase because IE Mobile identifies itself // as Safari. Oh the lulz... var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform); var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1; // Safari <10.1 does not meet our requirements for IDB support // (see: https://github.com/pouchdb/pouchdb/issues/5572). // Safari 10.1 shipped with fetch, we can use that to detect it. // Note: this creates issues with `window.fetch` polyfills and // overrides; see: // https://github.com/localForage/localForage/issues/856 return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' && // some outdated implementations of IDB that appear on Samsung // and HTC Android devices <4.4 are missing IDBKeyRange // See: https://github.com/mozilla/localForage/issues/128 // See: https://github.com/mozilla/localForage/issues/272 typeof IDBKeyRange !== 'undefined'; } catch (e) { return false; } } // Abstracts constructing a Blob object, so it also works in older // browsers that don't support the native Blob constructor. (i.e. // old QtWebKit versions, at least). // Abstracts constructing a Blob object, so it also works in older // browsers that don't support the native Blob constructor. (i.e. // old QtWebKit versions, at least). function createBlob(parts, properties) { /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */ parts = parts || []; properties = properties || {}; try { return new Blob(parts, properties); } catch (e) { if (e.name !== 'TypeError') { throw e; } var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder; var builder = new Builder(); for (var i = 0; i < parts.length; i += 1) { builder.append(parts[i]); } return builder.getBlob(properties.type); } } // This is CommonJS because lie is an external dependency, so Rollup // can just ignore it. if (typeof Promise === 'undefined') { // In the "nopromises" build this will just throw if you don't have // a global promise object, but it would throw anyway later. _dereq_(3); } var Promise$1 = Promise; function executeCallback(promise, callback) { if (callback) { promise.then(function (result) { callback(null, result); }, function (error) { callback(error); }); } } function executeTwoCallbacks(promise, callback, errorCallback) { if (typeof callback === 'function') { promise.then(callback); } if (typeof errorCallback === 'function') { promise["catch"](errorCallback); } } function normalizeKey(key) { // Cast the key to a string, as that's all we can set as a key. if (typeof key !== 'string') { console.warn(key + ' used as a key, but it is not a string.'); key = String(key); } return key; } function getCallback() { if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { return arguments[arguments.length - 1]; } } // Some code originally from async_storage.js in // [Gaia](https://github.com/mozilla-b2g/gaia). var DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support'; var supportsBlobs = void 0; var dbContexts = {}; var toString = Object.prototype.toString; // Transaction Modes var READ_ONLY = 'readonly'; var READ_WRITE = 'readwrite'; // Transform a binary string to an array buffer, because otherwise // weird stuff happens when you try to work with the binary string directly. // It is known. // From http://stackoverflow.com/questions/14967647/ (continues on next line) // encode-decode-image-with-base64-breaks-image (2013-04-21) function _binStringToArrayBuffer(bin) { var length = bin.length; var buf = new ArrayBuffer(length); var arr = new Uint8Array(buf); for (var i = 0; i < length; i++) { arr[i] = bin.charCodeAt(i); } return buf; } // // Blobs are not supported in all versions of IndexedDB, notably // Chrome <37 and Android <5. In those versions, storing a blob will throw. // // Various other blob bugs exist in Chrome v37-42 (inclusive). // Detecting them is expensive and confusing to users, and Chrome 37-42 // is at very low usage worldwide, so we do a hacky userAgent check instead. // // content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120 // 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916 // FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836 // // Code borrowed from PouchDB. See: // https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js // function _checkBlobSupportWithoutCaching(idb) { return new Promise$1(function (resolve) { var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE); var blob = createBlob(['']); txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key'); txn.onabort = function (e) { // If the transaction aborts now its due to not being able to // write to the database, likely due to the disk being full e.preventDefault(); e.stopPropagation(); resolve(false); }; txn.oncomplete = function () { var matchedChrome = navigator.userAgent.match(/Chrome\/(\d+)/); var matchedEdge = navigator.userAgent.match(/Edge\//); // MS Edge pretends to be Chrome 42: // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43); }; })["catch"](function () { return false; // error, so assume unsupported }); } function _checkBlobSupport(idb) { if (typeof supportsBlobs === 'boolean') { return Promise$1.resolve(supportsBlobs); } return _checkBlobSupportWithoutCaching(idb).then(function (value) { supportsBlobs = value; return supportsBlobs; }); } function _deferReadiness(dbInfo) { var dbContext = dbContexts[dbInfo.name]; // Create a deferred object representing the current database operation. var deferredOperation = {}; deferredOperation.promise = new Promise$1(function (resolve, reject) { deferredOperation.resolve = resolve; deferredOperation.reject = reject; }); // Enqueue the deferred operation. dbContext.deferredOperations.push(deferredOperation); // Chain its promise to the database readiness. if (!dbContext.dbReady) { dbContext.dbReady = deferredOperation.promise; } else { dbContext.dbReady = dbContext.dbReady.then(function () { return deferredOperation.promise; }); } } function _advanceReadiness(dbInfo) { var dbContext = dbContexts[dbInfo.name]; // Dequeue a deferred operation. var deferredOperation = dbContext.deferredOperations.pop(); // Resolve its promise (which is part of the database readiness // chain of promises). if (deferredOperation) { deferredOperation.resolve(); return deferredOperation.promise; } } function _rejectReadiness(dbInfo, err) { var dbContext = dbContexts[dbInfo.name]; // Dequeue a deferred operation. var deferredOperation = dbContext.deferredOperations.pop(); // Reject its promise (which is part of the database readiness // chain of promises). if (deferredOperation) { deferredOperation.reject(err); return deferredOperation.promise; } } function _getConnection(dbInfo, upgradeNeeded) { return new Promise$1(function (resolve, reject) { dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext(); if (dbInfo.db) { if (upgradeNeeded) { _deferReadiness(dbInfo); dbInfo.db.close(); } else { return resolve(dbInfo.db); } } var dbArgs = [dbInfo.name]; if (upgradeNeeded) { dbArgs.push(dbInfo.version); } var openreq = idb.open.apply(idb, dbArgs); if (upgradeNeeded) { openreq.onupgradeneeded = function (e) { var db = openreq.result; try { db.createObjectStore(dbInfo.storeName); if (e.oldVersion <= 1) { // Added when support for blob shims was added db.createObjectStore(DETECT_BLOB_SUPPORT_STORE); } } catch (ex) { if (ex.name === 'ConstraintError') { console.warn('The database "' + dbInfo.name + '"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage "' + dbInfo.storeName + '" already exists.'); } else { throw ex; } } }; } openreq.onerror = function (e) { e.preventDefault(); reject(openreq.error); }; openreq.onsuccess = function () { var db = openreq.result; db.onversionchange = function (e) { // Triggered when the database is modified (e.g. adding an objectStore) or // deleted (even when initiated by other sessions in different tabs). // Closing the connection here prevents those operations from being blocked. // If the database is accessed again later by this instance, the connection // will be reopened or the database recreated as needed. e.target.close(); }; resolve(db); _advanceReadiness(dbInfo); }; }); } function _getOriginalConnection(dbInfo) { return _getConnection(dbInfo, false); } function _getUpgradedConnection(dbInfo) { return _getConnection(dbInfo, true); } function _isUpgradeNeeded(dbInfo, defaultVersion) { if (!dbInfo.db) { return true; } var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName); var isDowngrade = dbInfo.version < dbInfo.db.version; var isUpgrade = dbInfo.version > dbInfo.db.version; if (isDowngrade) { // If the version is not the default one // then warn for impossible downgrade. if (dbInfo.version !== defaultVersion) { console.warn('The database "' + dbInfo.name + '"' + " can't be downgraded from version " + dbInfo.db.version + ' to version ' + dbInfo.version + '.'); } // Align the versions to prevent errors. dbInfo.version = dbInfo.db.version; } if (isUpgrade || isNewStore) { // If the store is new then increment the version (if needed). // This will trigger an "upgradeneeded" event which is required // for creating a store. if (isNewStore) { var incVersion = dbInfo.db.version + 1; if (incVersion > dbInfo.version) { dbInfo.version = incVersion; } } return true; } return false; } // encode a blob for indexeddb engines that don't support blobs function _encodeBlob(blob) { return new Promise$1(function (resolve, reject) { var reader = new FileReader(); reader.onerror = reject; reader.onloadend = function (e) { var base64 = btoa(e.target.result || ''); resolve({ __local_forage_encoded_blob: true, data: base64, type: blob.type }); }; reader.readAsBinaryString(blob); }); } // decode an encoded blob function _decodeBlob(encodedBlob) { var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data)); return createBlob([arrayBuff], { type: encodedBlob.type }); } // is this one of our fancy encoded blobs? function _isEncodedBlob(value) { return value && value.__local_forage_encoded_blob; } // Specialize the default `ready()` function by making it dependent // on the current database operations. Thus, the driver will be actually // ready when it's been initialized (default) *and* there are no pending // operations on the database (initiated by some other instances). function _fullyReady(callback) { var self = this; var promise = self._initReady().then(function () { var dbContext = dbContexts[self._dbInfo.name]; if (dbContext && dbContext.dbReady) { return dbContext.dbReady; } }); executeTwoCallbacks(promise, callback, callback); return promise; } // Try to establish a new db connection to replace the // current one which is broken (i.e. experiencing // InvalidStateError while creating a transaction). function _tryReconnect(dbInfo) { _deferReadiness(dbInfo); var dbContext = dbContexts[dbInfo.name]; var forages = dbContext.forages; for (var i = 0; i < forages.length; i++) { var forage = forages[i]; if (forage._dbInfo.db) { forage._dbInfo.db.close(); forage._dbInfo.db = null; } } dbInfo.db = null; return _getOriginalConnection(dbInfo).then(function (db) { dbInfo.db = db; if (_isUpgradeNeeded(dbInfo)) { // Reopen the database for upgrading. return _getUpgradedConnection(dbInfo); } return db; }).then(function (db) { // store the latest db reference // in case the db was upgraded dbInfo.db = dbContext.db = db; for (var i = 0; i < forages.length; i++) { forages[i]._dbInfo.db = db; } })["catch"](function (err) { _rejectReadiness(dbInfo, err); throw err; }); } // FF doesn't like Promises (micro-tasks) and IDDB store operations, // so we have to do it with callbacks function createTransaction(dbInfo, mode, callback, retries) { if (retries === undefined) { retries = 1; } try { var tx = dbInfo.db.transaction(dbInfo.storeName, mode); callback(null, tx); } catch (err) { if (retries > 0 && (!dbInfo.db || err.name === 'InvalidStateError' || err.name === 'NotFoundError')) { return Promise$1.resolve().then(function () { if (!dbInfo.db || err.name === 'NotFoundError' && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) { // increase the db version, to create the new ObjectStore if (dbInfo.db) { dbInfo.version = dbInfo.db.version + 1; } // Reopen the database for upgrading. return _getUpgradedConnection(dbInfo); } }).then(function () { return _tryReconnect(dbInfo).then(function () { createTransaction(dbInfo, mode, callback, retries - 1); }); })["catch"](callback); } callback(err); } } function createDbContext() { return { // Running localForages sharing a database. forages: [], // Shared database. db: null, // Database readiness (promise). dbReady: null, // Deferred operations on the database. deferredOperations: [] }; } // Open the IndexedDB database (automatically creates one if one didn't // previously exist), using any options set in the config. function _initStorage(options) { var self = this; var dbInfo = { db: null }; if (options) { for (var i in options) { dbInfo[i] = options[i]; } } // Get the current context of the database; var dbContext = dbContexts[dbInfo.name]; // ...or create a new context. if (!dbContext) { dbContext = createDbContext(); // Register the new context in the global container. dbContexts[dbInfo.name] = dbContext; } // Register itself as a running localForage in the current context. dbContext.forages.push(self); // Replace the default `ready()` function with the specialized one. if (!self._initReady) { self._initReady = self.ready; self.ready = _fullyReady; } // Create an array of initialization states of the related localForages. var initPromises = []; function ignoreErrors() { // Don't handle errors here, // just makes sure related localForages aren't pending. return Promise$1.resolve(); } for (var j = 0; j < dbContext.forages.length; j++) { var forage = dbContext.forages[j]; if (forage !== self) { // Don't wait for itself... initPromises.push(forage._initReady()["catch"](ignoreErrors)); } } // Take a snapshot of the related localForages. var forages = dbContext.forages.slice(0); // Initialize the connection process only when // all the related localForages aren't pending. return Promise$1.all(initPromises).then(function () { dbInfo.db = dbContext.db; // Get the connection or open a new one without upgrade. return _getOriginalConnection(dbInfo); }).then(function (db) { dbInfo.db = db; if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) { // Reopen the database for upgrading. return _getUpgradedConnection(dbInfo); } return db; }).then(function (db) { dbInfo.db = dbContext.db = db; self._dbInfo = dbInfo; // Share the final connection amongst related localForages. for (var k = 0; k < forages.length; k++) { var forage = forages[k]; if (forage !== self) { // Self is already up-to-date. forage._dbInfo.db = dbInfo.db; forage._dbInfo.version = dbInfo.version; } } }); } function getItem(key, callback) { var self = this; key = normalizeKey(key); var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); var req = store.get(key); req.onsuccess = function () { var value = req.result; if (value === undefined) { value = null; } if (_isEncodedBlob(value)) { value = _decodeBlob(value); } resolve(value); }; req.onerror = function () { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } // Iterate over all items stored in database. function iterate(iterator, callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); var req = store.openCursor(); var iterationNumber = 1; req.onsuccess = function () { var cursor = req.result; if (cursor) { var value = cursor.value; if (_isEncodedBlob(value)) { value = _decodeBlob(value); } var result = iterator(value, cursor.key, iterationNumber++); // when the iterator callback returns any // (non-`undefined`) value, then we stop // the iteration immediately if (result !== void 0) { resolve(result); } else { cursor["continue"](); } } else { resolve(); } }; req.onerror = function () { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function setItem(key, value, callback) { var self = this; key = normalizeKey(key); var promise = new Promise$1(function (resolve, reject) { var dbInfo; self.ready().then(function () { dbInfo = self._dbInfo; if (toString.call(value) === '[object Blob]') { return _checkBlobSupport(dbInfo.db).then(function (blobSupport) { if (blobSupport) { return value; } return _encodeBlob(value); }); } return value; }).then(function (value) { createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); // The reason we don't _save_ null is because IE 10 does // not support saving the `null` type in IndexedDB. How // ironic, given the bug below! // See: https://github.com/mozilla/localForage/issues/161 if (value === null) { value = undefined; } var req = store.put(value, key); transaction.oncomplete = function () { // Cast to undefined so the value passed to // callback/promise is the same as what one would get out // of `getItem()` later. This leads to some weirdness // (setItem('foo', undefined) will return `null`), but // it's not my fault localStorage is our baseline and that // it's weird. if (value === undefined) { value = null; } resolve(value); }; transaction.onabort = transaction.onerror = function () { var err = req.error ? req.error : req.transaction.error; reject(err); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function removeItem(key, callback) { var self = this; key = normalizeKey(key); var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); // We use a Grunt task to make this safe for IE and some // versions of Android (including those used by Cordova). // Normally IE won't like `.delete()` and will insist on // using `['delete']()`, but we have a build step that // fixes this for us now. var req = store["delete"](key); transaction.oncomplete = function () { resolve(); }; transaction.onerror = function () { reject(req.error); }; // The request will be also be aborted if we've exceeded our storage // space. transaction.onabort = function () { var err = req.error ? req.error : req.transaction.error; reject(err); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function clear(callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); var req = store.clear(); transaction.oncomplete = function () { resolve(); }; transaction.onabort = transaction.onerror = function () { var err = req.error ? req.error : req.transaction.error; reject(err); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function length(callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); var req = store.count(); req.onsuccess = function () { resolve(req.result); }; req.onerror = function () { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function key(n, callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { if (n < 0) { resolve(null); return; } self.ready().then(function () { createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); var advanced = false; var req = store.openKeyCursor(); req.onsuccess = function () { var cursor = req.result; if (!cursor) { // this means there weren't enough keys resolve(null); return; } if (n === 0) { // We have the first key, return it if that's what they // wanted. resolve(cursor.key); } else { if (!advanced) { // Otherwise, ask the cursor to skip ahead n // records. advanced = true; cursor.advance(n); } else { // When we get here, we've got the nth key. resolve(cursor.key); } } }; req.onerror = function () { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function keys(callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); var req = store.openKeyCursor(); var keys = []; req.onsuccess = function () { var cursor = req.result; if (!cursor) { resolve(keys); return; } keys.push(cursor.key); cursor["continue"](); }; req.onerror = function () { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function dropInstance(options, callback) { callback = getCallback.apply(this, arguments); var currentConfig = this.config(); options = typeof options !== 'function' && options || {}; if (!options.name) { options.name = options.name || currentConfig.name; options.storeName = options.storeName || currentConfig.storeName; } var self = this; var promise; if (!options.name) { promise = Promise$1.reject('Invalid arguments'); } else { var isCurrentDb = options.name === currentConfig.name && self._dbInfo.db; var dbPromise = isCurrentDb ? Promise$1.resolve(self._dbInfo.db) : _getOriginalConnection(options).then(function (db) { var dbContext = dbContexts[options.name]; var forages = dbContext.forages; dbContext.db = db; for (var i = 0; i < forages.length; i++) { forages[i]._dbInfo.db = db; } return db; }); if (!options.storeName) { promise = dbPromise.then(function (db) { _deferReadiness(options); var dbContext = dbContexts[options.name]; var forages = dbContext.forages; db.close(); for (var i = 0; i < forages.length; i++) { var forage = forages[i]; forage._dbInfo.db = null; } var dropDBPromise = new Promise$1(function (resolve, reject) { var req = idb.deleteDatabase(options.name); req.onerror = function () { var db = req.result; if (db) { db.close(); } reject(req.error); }; req.onblocked = function () { // Closing all open connections in onversionchange handler should prevent this situation, but if // we do get here, it just means the request remains pending - eventually it will succeed or error console.warn('dropInstance blocked for database "' + options.name + '" until all open connections are closed'); }; req.onsuccess = function () { var db = req.result; if (db) { db.close(); } resolve(db); }; }); return dropDBPromise.then(function (db) { dbContext.db = db; for (var i = 0; i < forages.length; i++) { var _forage = forages[i]; _advanceReadiness(_forage._dbInfo); } })["catch"](function (err) { (_rejectReadiness(options, err) || Promise$1.resolve())["catch"](function () {}); throw err; }); }); } else { promise = dbPromise.then(function (db) { if (!db.objectStoreNames.contains(options.storeName)) { return; } var newVersion = db.version + 1; _deferReadiness(options); var dbContext = dbContexts[options.name]; var forages = dbContext.forages; db.close(); for (var i = 0; i < forages.length; i++) { var forage = forages[i]; forage._dbInfo.db = null; forage._dbInfo.version = newVersion; } var dropObjectPromise = new Promise$1(function (resolve, reject) { var req = idb.open(options.name, newVersion); req.onerror = function (err) { var db = req.result; db.close(); reject(err); }; req.onupgradeneeded = function () { var db = req.result; db.deleteObjectStore(options.storeName); }; req.onsuccess = function () { var db = req.result; db.close(); resolve(db); }; }); return dropObjectPromise.then(function (db) { dbContext.db = db; for (var j = 0; j < forages.length; j++) { var _forage2 = forages[j]; _forage2._dbInfo.db = db; _advanceReadiness(_forage2._dbInfo); } })["catch"](function (err) { (_rejectReadiness(options, err) || Promise$1.resolve())["catch"](function () {}); throw err; }); }); } } executeCallback(promise, callback); return promise; } var asyncStorage = { _driver: 'asyncStorage', _initStorage: _initStorage, _support: isIndexedDBValid(), iterate: iterate, getItem: getItem, setItem: setItem, removeItem: removeItem, clear: clear, length: length, key: key, keys: keys, dropInstance: dropInstance }; function isWebSQLValid() { return typeof openDatabase === 'function'; } // Sadly, the best way to save binary data in WebSQL/localStorage is serializing // it to Base64, so this is how we store it to prevent very strange errors with less // verbose ways of binary <-> string data storage. var BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var BLOB_TYPE_PREFIX = '~~local_forage_type~'; var BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/; var SERIALIZED_MARKER = '__lfsc__:'; var SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length; // OMG the serializations! var TYPE_ARRAYBUFFER = 'arbf'; var TYPE_BLOB = 'blob'; var TYPE_INT8ARRAY = 'si08'; var TYPE_UINT8ARRAY = 'ui08'; var TYPE_UINT8CLAMPEDARRAY = 'uic8'; var TYPE_INT16ARRAY = 'si16'; var TYPE_INT32ARRAY = 'si32'; var TYPE_UINT16ARRAY = 'ur16'; var TYPE_UINT32ARRAY = 'ui32'; var TYPE_FLOAT32ARRAY = 'fl32'; var TYPE_FLOAT64ARRAY = 'fl64'; var TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length; var toString$1 = Object.prototype.toString; function stringToBuffer(serializedString) { // Fill the string into a ArrayBuffer. var bufferLength = serializedString.length * 0.75; var len = serializedString.length; var i; var p = 0; var encoded1, encoded2, encoded3, encoded4; if (serializedString[serializedString.length - 1] === '=') { bufferLength--; if (serializedString[serializedString.length - 2] === '=') { bufferLength--; } } var buffer = new ArrayBuffer(bufferLength); var bytes = new Uint8Array(buffer); for (i = 0; i < len; i += 4) { encoded1 = BASE_CHARS.indexOf(serializedString[i]); encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]); encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]); encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]); /*jslint bitwise: true */ bytes[p++] = encoded1 << 2 | encoded2 >> 4; bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2; bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; } return buffer; } // Converts a buffer to a string to store, serialized, in the backend // storage library. function bufferToString(buffer) { // base64-arraybuffer var bytes = new Uint8Array(buffer); var base64String = ''; var i; for (i = 0; i < bytes.length; i += 3) { /*jslint bitwise: true */ base64String += BASE_CHARS[bytes[i] >> 2]; base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4]; base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6]; base64String += BASE_CHARS[bytes[i + 2] & 63]; } if (bytes.length % 3 === 2) { base64String = base64String.substring(0, base64String.length - 1) + '='; } else if (bytes.length % 3 === 1) { base64String = base64String.substring(0, base64String.length - 2) + '=='; } return base64String; } // Serialize a value, afterwards executing a callback (which usually // instructs the `setItem()` callback/promise to be executed). This is how // we store binary data with localStorage. function serialize(value, callback) { var valueType = ''; if (value) { valueType = toString$1.call(value); } // Cannot use `value instanceof ArrayBuffer` or such here, as these // checks fail when running the tests using casper.js... // // TODO: See why those tests fail and use a better solution. if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) { // Convert binary arrays to a string and prefix the string with // a special marker. var buffer; var marker = SERIALIZED_MARKER; if (value instanceof ArrayBuffer) { buffer = value; marker += TYPE_ARRAYBUFFER; } else { buffer = value.buffer; if (valueType === '[object Int8Array]') { marker += TYPE_INT8ARRAY; } else if (valueType === '[object Uint8Array]') { marker += TYPE_UINT8ARRAY; } else if (valueType === '[object Uint8ClampedArray]') { marker += TYPE_UINT8CLAMPEDARRAY; } else if (valueType === '[object Int16Array]') { marker += TYPE_INT16ARRAY; } else if (valueType === '[object Uint16Array]') { marker += TYPE_UINT16ARRAY; } else if (valueType === '[object Int32Array]') { marker += TYPE_INT32ARRAY; } else if (valueType === '[object Uint32Array]') { marker += TYPE_UINT32ARRAY; } else if (valueType === '[object Float32Array]') { marker += TYPE_FLOAT32ARRAY; } else if (valueType === '[object Float64Array]') { marker += TYPE_FLOAT64ARRAY; } else { callback(new Error('Failed to get type for BinaryArray')); } } callback(marker + bufferToString(buffer)); } else if (valueType === '[object Blob]') { // Conver the blob to a binaryArray and then to a string. var fileReader = new FileReader(); fileReader.onload = function () { // Backwards-compatible prefix for the blob type. var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result); callback(SERIALIZED_MARKER + TYPE_BLOB + str); }; fileReader.readAsArrayBuffer(value); } else { try { callback(JSON.stringify(value)); } catch (e) { console.error("Couldn't convert value into a JSON string: ", value); callback(null, e); } } } // Deserialize data we've inserted into a value column/field. We place // special markers into our strings to mark them as encoded; this isn't // as nice as a meta field, but it's the only sane thing we can do whilst // keeping localStorage support intact. // // Oftentimes this will just deserialize JSON content, but if we have a // special marker (SERIALIZED_MARKER, defined above), we will extract // some kind of arraybuffer/binary data/typed array out of the string. function deserialize(value) { // If we haven't marked this string as being specially serialized (i.e. // something other than serialized JSON), we can just return it and be // done with it. if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) { return JSON.parse(value); } // The following code deals with deserializing some kind of Blob or // TypedArray. First we separate out the type of data we're dealing // with from the data itself. var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH); var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH); var blobType; // Backwards-compatible blob type serialization strategy. // DBs created with older versions of localForage will simply not have the blob type. if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) { var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX); blobType = matcher[1]; serializedString = serializedString.substring(matcher[0].length); } var buffer = stringToBuffer(serializedString); // Return the right type based on the code/type set during // serialization. switch (type) { case TYPE_ARRAYBUFFER: return buffer; case TYPE_BLOB: return createBlob([buffer], { type: blobType }); case TYPE_INT8ARRAY: return new Int8Array(buffer); case TYPE_UINT8ARRAY: return new Uint8Array(buffer); case TYPE_UINT8CLAMPEDARRAY: return new Uint8ClampedArray(buffer); case TYPE_INT16ARRAY: return new Int16Array(buffer); case TYPE_UINT16ARRAY: return new Uint16Array(buffer); case TYPE_INT32ARRAY: return new Int32Array(buffer); case TYPE_UINT32ARRAY: return new Uint32Array(buffer); case TYPE_FLOAT32ARRAY: return new Float32Array(buffer); case TYPE_FLOAT64ARRAY: return new Float64Array(buffer); default: throw new Error('Unkown type: ' + type); } } var localforageSerializer = { serialize: serialize, deserialize: deserialize, stringToBuffer: stringToBuffer, bufferToString: bufferToString }; /* * Includes code from: * * base64-arraybuffer * https://github.com/niklasvh/base64-arraybuffer * * Copyright (c) 2012 Niklas von Hertzen * Licensed under the MIT license. */ function createDbTable(t, dbInfo, callback, errorCallback) { t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback); } // Open the WebSQL database (automatically creates one if one didn't // previously exist), using any options set in the config. function _initStorage$1(options) { var self = this; var dbInfo = { db: null }; if (options) { for (var i in options) { dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i]; } } var dbInfoPromise = new Promise$1(function (resolve, reject) { // Open the database; the openDatabase API will automatically // create it for us if it doesn't exist. try { dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size); } catch (e) { return reject(e); } // Create our key/value table if it doesn't exist. dbInfo.db.transaction(function (t) { createDbTable(t, dbInfo, function () { self._dbInfo = dbInfo; resolve(); }, function (t, error) { reject(error); }); }, reject); }); dbInfo.serializer = localforageSerializer; return dbInfoPromise; } function tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) { t.executeSql(sqlStatement, args, callback, function (t, error) { if (error.code === error.SYNTAX_ERR) { t.executeSql('SELECT name FROM sqlite_master ' + "WHERE type='table' AND name = ?", [dbInfo.storeName], function (t, results) { if (!results.rows.length) { // if the table is missing (was deleted) // re-create it table and retry createDbTable(t, dbInfo, function () { t.executeSql(sqlStatement, args, callback, errorCallback); }, errorCallback); } else { errorCallback(t, error); } }, errorCallback); } else { errorCallback(t, error); } }, errorCallback); } function getItem$1(key, callback) { var self = this; key = normalizeKey(key); var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) { var result = results.rows.length ? results.rows.item(0).value : null; // Check to see if this is serialized content we need to // unpack. if (result) { result = dbInfo.serializer.deserialize(result); } resolve(result); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function iterate$1(iterator, callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName, [], function (t, results) { var rows = results.rows; var length = rows.length; for (var i = 0; i < length; i++) { var item = rows.item(i); var result = item.value; // Check to see if this is serialized content // we need to unpack. if (result) { result = dbInfo.serializer.deserialize(result); } result = iterator(result, item.key, i + 1); // void(0) prevents problems with redefinition // of `undefined`. if (result !== void 0) { resolve(result); return; } } resolve(); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function _setItem(key, value, callback, retriesLeft) { var self = this; key = normalizeKey(key); var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { // The localStorage API doesn't return undefined values in an // "expected" way, so undefined is always cast to null in all // drivers. See: https://github.com/mozilla/localForage/pull/42 if (value === undefined) { value = null; } // Save the original value to pass to the callback. var originalValue = value; var dbInfo = self._dbInfo; dbInfo.serializer.serialize(value, function (value, error) { if (error) { reject(error); } else { dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'INSERT OR REPLACE INTO ' + dbInfo.storeName + ' ' + '(key, value) VALUES (?, ?)', [key, value], function () { resolve(originalValue); }, function (t, error) { reject(error); }); }, function (sqlError) { // The transaction failed; check // to see if it's a quota error. if (sqlError.code === sqlError.QUOTA_ERR) { // We reject the callback outright for now, but // it's worth trying to re-run the transaction. // Even if the user accepts the prompt to use // more storage on Safari, this error will // be called. // // Try to re-run the transaction. if (retriesLeft > 0) { resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1])); return; } reject(sqlError); } }); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function setItem$1(key, value, callback) { return _setItem.apply(this, [key, value, callback, 1]); } function removeItem$1(key, callback) { var self = this; key = normalizeKey(key); var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () { resolve(); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } // Deletes every item in the table. // TODO: Find out if this resets the AUTO_INCREMENT number. function clear$1(callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName, [], function () { resolve(); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } // Does a simple `COUNT(key)` to get the number of items stored in // localForage. function length$1(callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { // Ahhh, SQL makes this one soooooo easy. tryExecuteSql(t, dbInfo, 'SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) { var result = results.rows.item(0).c; resolve(result); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } // Return the key located at key index X; essentially gets the key from a // `WHERE id = ?`. This is the most efficient way I can think to implement // this rarely-used (in my experience) part of the API, but it can seem // inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so // the ID of each key will change every time it's updated. Perhaps a stored // procedure for the `setItem()` SQL would solve this problem? // TODO: Don't change ID on `setItem()`. function key$1(n, callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) { var result = results.rows.length ? results.rows.item(0).key : null; resolve(result); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function keys$1(callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName, [], function (t, results) { var keys = []; for (var i = 0; i < results.rows.length; i++) { keys.push(results.rows.item(i).key); } resolve(keys); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } // https://www.w3.org/TR/webdatabase/#databases // > There is no way to enumerate or delete the databases available for an origin from this API. function getAllStoreNames(db) { return new Promise$1(function (resolve, reject) { db.transaction(function (t) { t.executeSql('SELECT name FROM sqlite_master ' + "WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function (t, results) { var storeNames = []; for (var i = 0; i < results.rows.length; i++) { storeNames.push(results.rows.item(i).name); } resolve({ db: db, storeNames: storeNames }); }, function (t, error) { reject(error); }); }, function (sqlError) { reject(sqlError); }); }); } function dropInstance$1(options, callback) { callback = getCallback.apply(this, arguments); var currentConfig = this.config(); options = typeof options !== 'function' && options || {}; if (!options.name) { options.name = options.name || currentConfig.name; options.storeName = options.storeName || currentConfig.storeName; } var self = this; var promise; if (!options.name) { promise = Promise$1.reject('Invalid arguments'); } else { promise = new Promise$1(function (resolve) { var db; if (options.name === currentConfig.name) { // use the db reference of the current instance db = self._dbInfo.db; } else { db = openDatabase(options.name, '', '', 0); } if (!options.storeName) { // drop all database tables resolve(getAllStoreNames(db)); } else { resolve({ db: db, storeNames: [options.storeName] }); } }).then(function (operationInfo) { return new Promise$1(function (resolve, reject) { operationInfo.db.transaction(function (t) { function dropTable(storeName) { return new Promise$1(function (resolve, reject) { t.executeSql('DROP TABLE IF EXISTS ' + storeName, [], function () { resolve(); }, function (t, error) { reject(error); }); }); } var operations = []; for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) { operations.push(dropTable(operationInfo.storeNames[i])); } Promise$1.all(operations).then(function () { resolve(); })["catch"](function (e) { reject(e); }); }, function (sqlError) { reject(sqlError); }); }); }); } executeCallback(promise, callback); return promise; } var webSQLStorage = { _driver: 'webSQLStorage', _initStorage: _initStorage$1, _support: isWebSQLValid(), iterate: iterate$1, getItem: getItem$1, setItem: setItem$1, removeItem: removeItem$1, clear: clear$1, length: length$1, key: key$1, keys: keys$1, dropInstance: dropInstance$1 }; function isLocalStorageValid() { try { return typeof localStorage !== 'undefined' && 'setItem' in localStorage && // in IE8 typeof localStorage.setItem === 'object' !!localStorage.setItem; } catch (e) { return false; } } function _getKeyPrefix(options, defaultConfig) { var keyPrefix = options.name + '/'; if (options.storeName !== defaultConfig.storeName) { keyPrefix += options.storeName + '/'; } return keyPrefix; } // Check if localStorage throws when saving an item function checkIfLocalStorageThrows() { var localStorageTestKey = '_localforage_support_test'; try { localStorage.setItem(localStorageTestKey, true); localStorage.removeItem(localStorageTestKey); return false; } catch (e) { return true; } } // Check if localStorage is usable and allows to save an item // This method checks if localStorage is usable in Safari Private Browsing // mode, or in any other case where the available quota for localStorage // is 0 and there wasn't any saved items yet. function _isLocalStorageUsable() { return !checkIfLocalStorageThrows() || localStorage.length > 0; } // Config the localStorage backend, using options set in the config. function _initStorage$2(options) { var self = this; var dbInfo = {}; if (options) { for (var i in options) { dbInfo[i] = options[i]; } } dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig); if (!_isLocalStorageUsable()) { return Promise$1.reject(); } self._dbInfo = dbInfo; dbInfo.serializer = localforageSerializer; return Promise$1.resolve(); } // Remove all keys from the datastore, effectively destroying all data in // the app's key/value store! function clear$2(callback) { var self = this; var promise = self.ready().then(function () { var keyPrefix = self._dbInfo.keyPrefix; for (var i = localStorage.length - 1; i >= 0; i--) { var key = localStorage.key(i); if (key.indexOf(keyPrefix) === 0) { localStorage.removeItem(key); } } }); executeCallback(promise, callback); return promise; } // Retrieve an item from the store. Unlike the original async_storage // library in Gaia, we don't modify return values at all. If a key's value // is `undefined`, we pass that value to the callback function. function getItem$2(key, callback) { var self = this; key = normalizeKey(key); var promise = self.ready().then(function () { var dbInfo = self._dbInfo; var result = localStorage.getItem(dbInfo.keyPrefix + key); // If a result was found, parse it from the serialized // string into a JS object. If result isn't truthy, the key // is likely undefined and we'll pass it straight to the // callback. if (result) { result = dbInfo.serializer.deserialize(result); } return result; }); executeCallback(promise, callback); return promise; } // Iterate over all items in the store. function iterate$2(iterator, callback) { var self = this; var promise = self.ready().then(function () { var dbInfo = self._dbInfo; var keyPrefix = dbInfo.keyPrefix; var keyPrefixLength = keyPrefix.length; var length = localStorage.length; // We use a dedicated iterator instead of the `i` variable below // so other keys we fetch in localStorage aren't counted in // the `iterationNumber` argument passed to the `iterate()` // callback. // // See: github.com/mozilla/localForage/pull/435#discussion_r38061530 var iterationNumber = 1; for (var i = 0; i < length; i++) { var key = localStorage.key(i); if (key.indexOf(keyPrefix) !== 0) { continue; } var value = localStorage.getItem(key); // If a result was found, parse it from the serialized // string into a JS object. If result isn't truthy, the // key is likely undefined and we'll pass it straight // to the iterator. if (value) { value = dbInfo.serializer.deserialize(value); } value = iterator(value, key.substring(keyPrefixLength), iterationNumber++); if (value !== void 0) { return value; } } }); executeCallback(promise, callback); return promise; } // Same as localStorage's key() method, except takes a callback. function key$2(n, callback) { var self = this; var promise = self.ready().then(function () { var dbInfo = self._dbInfo; var result; try { result = localStorage.key(n); } catch (error) { result = null; } // Remove the prefix from the key, if a key is found. if (result) { result = result.substring(dbInfo.keyPrefix.length); } return result; }); executeCallback(promise, callback); return promise; } function keys$2(callback) { var self = this; var promise = self.ready().then(function () { var dbInfo = self._dbInfo; var length = localStorage.length; var keys = []; for (var i = 0; i < length; i++) { var itemKey = localStorage.key(i); if (itemKey.indexOf(dbInfo.keyPrefix) === 0) { keys.push(itemKey.substring(dbInfo.keyPrefix.length)); } } return keys; }); executeCallback(promise, callback); return promise; } // Supply the number of keys in the datastore to the callback function. function length$2(callback) { var self = this; var promise = self.keys().then(function (keys) { return keys.length; }); executeCallback(promise, callback); return promise; } // Remove an item from the store, nice and simple. function removeItem$2(key, callback) { var self = this; key = normalizeKey(key); var promise = self.ready().then(function () { var dbInfo = self._dbInfo; localStorage.removeItem(dbInfo.keyPrefix + key); }); executeCallback(promise, callback); return promise; } // Set a key's value and run an optional callback once the value is set. // Unlike Gaia's implementation, the callback function is passed the value, // in case you want to operate on that value only after you're sure it // saved, or something like that. function setItem$2(key, value, callback) { var self = this; key = normalizeKey(key); var promise = self.ready().then(function () { // Convert undefined values to null. // https://github.com/mozilla/localForage/pull/42 if (value === undefined) { value = null; } // Save the original value to pass to the callback. var originalValue = value; return new Promise$1(function (resolve, reject) { var dbInfo = self._dbInfo; dbInfo.serializer.serialize(value, function (value, error) { if (error) { reject(error); } else { try { localStorage.setItem(dbInfo.keyPrefix + key, value); resolve(originalValue); } catch (e) { // localStorage capacity exceeded. // TODO: Make this a specific error/event. if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') { reject(e); } reject(e); } } }); }); }); executeCallback(promise, callback); return promise; } function dropInstance$2(options, callback) { callback = getCallback.apply(this, arguments); options = typeof options !== 'function' && options || {}; if (!options.name) { var currentConfig = this.config(); options.name = options.name || currentConfig.name; options.storeName = options.storeName || currentConfig.storeName; } var self = this; var promise; if (!options.name) { promise = Promise$1.reject('Invalid arguments'); } else { promise = new Promise$1(function (resolve) { if (!options.storeName) { resolve(options.name + '/'); } else { resolve(_getKeyPrefix(options, self._defaultConfig)); } }).then(function (keyPrefix) { for (var i = localStorage.length - 1; i >= 0; i--) { var key = localStorage.key(i); if (key.indexOf(keyPrefix) === 0) { localStorage.removeItem(key); } } }); } executeCallback(promise, callback); return promise; } var localStorageWrapper = { _driver: 'localStorageWrapper', _initStorage: _initStorage$2, _support: isLocalStorageValid(), iterate: iterate$2, getItem: getItem$2, setItem: setItem$2, removeItem: removeItem$2, clear: clear$2, length: length$2, key: key$2, keys: keys$2, dropInstance: dropInstance$2 }; var sameValue = function sameValue(x, y) { return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y); }; var includes = function includes(array, searchElement) { var len = array.length; var i = 0; while (i < len) { if (sameValue(array[i], searchElement)) { return true; } i++; } return false; }; var isArray = Array.isArray || function (arg) { return Object.prototype.toString.call(arg) === '[object Array]'; }; // Drivers are stored here when `defineDriver()` is called. // They are shared across all instances of localForage. var DefinedDrivers = {}; var DriverSupport = {}; var DefaultDrivers = { INDEXEDDB: asyncStorage, WEBSQL: webSQLStorage, LOCALSTORAGE: localStorageWrapper }; var DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver]; var OptionalDriverMethods = ['dropInstance']; var LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'].concat(OptionalDriverMethods); var DefaultConfig = { description: '', driver: DefaultDriverOrder.slice(), name: 'localforage', // Default DB size is _JUST UNDER_ 5MB, as it's the highest size // we can use without a prompt. size: 4980736, storeName: 'keyvaluepairs', version: 1.0 }; function callWhenReady(localForageInstance, libraryMethod) { localForageInstance[libraryMethod] = function () { var _args = arguments; return localForageInstance.ready().then(function () { return localForageInstance[libraryMethod].apply(localForageInstance, _args); }); }; } function extend() { for (var i = 1; i < arguments.length; i++) { var arg = arguments[i]; if (arg) { for (var _key in arg) { if (arg.hasOwnProperty(_key)) { if (isArray(arg[_key])) { arguments[0][_key] = arg[_key].slice(); } else { arguments[0][_key] = arg[_key]; } } } } } return arguments[0]; } var LocalForage = function () { function LocalForage(options) { _classCallCheck(this, LocalForage); for (var driverTypeKey in DefaultDrivers) { if (DefaultDrivers.hasOwnProperty(driverTypeKey)) { var driver = DefaultDrivers[driverTypeKey]; var driverName = driver._driver; this[driverTypeKey] = driverName; if (!DefinedDrivers[driverName]) { // we don't need to wait for the promise, // since the default drivers can be defined // in a blocking manner this.defineDriver(driver); } } } this._defaultConfig = extend({}, DefaultConfig); this._config = extend({}, this._defaultConfig, options); this._driverSet = null; this._initDriver = null; this._ready = false; this._dbInfo = null; this._wrapLibraryMethodsWithReady(); this.setDriver(this._config.driver)["catch"](function () {}); } // Set any config values for localForage; can be called anytime before // the first API call (e.g. `getItem`, `setItem`). // We loop through options so we don't overwrite existing config // values. LocalForage.prototype.config = function config(options) { // If the options argument is an object, we use it to set values. // Otherwise, we return either a specified config value or all // config values. if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { // If localforage is ready and fully initialized, we can't set // any new configuration values. Instead, we return an error. if (this._ready) { return new Error("Can't call config() after localforage " + 'has been used.'); } for (var i in options) { if (i === 'storeName') { options[i] = options[i].replace(/\W/g, '_'); } if (i === 'version' && typeof options[i] !== 'number') { return new Error('Database version must be a number.'); } this._config[i] = options[i]; } // after all config options are set and // the driver option is used, try setting it if ('driver' in options && options.driver) { return this.setDriver(this._config.driver); } return true; } else if (typeof options === 'string') { return this._config[options]; } else { return this._config; } }; // Used to define a custom driver, shared across all instances of // localForage. LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) { var promise = new Promise$1(function (resolve, reject) { try { var driverName = driverObject._driver; var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver'); // A driver name should be defined and not overlap with the // library-defined, default drivers. if (!driverObject._driver) { reject(complianceError); return; } var driverMethods = LibraryMethods.concat('_initStorage'); for (var i = 0, len = driverMethods.length; i < len; i++) { var driverMethodName = driverMethods[i]; // when the property is there, // it should be a method even when optional var isRequired = !includes(OptionalDriverMethods, driverMethodName); if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== 'function') { reject(complianceError); return; } } var configureMissingMethods = function configureMissingMethods() { var methodNotImplementedFactory = function methodNotImplementedFactory(methodName) { return function () { var error = new Error('Method ' + methodName + ' is not implemented by the current driver'); var promise = Promise$1.reject(error); executeCallback(promise, arguments[arguments.length - 1]); return promise; }; }; for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) { var optionalDriverMethod = OptionalDriverMethods[_i]; if (!driverObject[optionalDriverMethod]) { driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod); } } }; configureMissingMethods(); var setDriverSupport = function setDriverSupport(support) { if (DefinedDrivers[driverName]) { console.info('Redefining LocalForage driver: ' + driverName); } DefinedDrivers[driverName] = driverObject; DriverSupport[driverName] = support; // don't use a then, so that we can define // drivers that have simple _support methods // in a blocking manner resolve(); }; if ('_support' in driverObject) { if (driverObject._support && typeof driverObject._support === 'function') { driverObject._support().then(setDriverSupport, reject); } else { setDriverSupport(!!driverObject._support); } } else { setDriverSupport(true); } } catch (e) { reject(e); } }); executeTwoCallbacks(promise, callback, errorCallback); return promise; }; LocalForage.prototype.driver = function driver() { return this._driver || null; }; LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) { var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error('Driver not found.')); executeTwoCallbacks(getDriverPromise, callback, errorCallback); return getDriverPromise; }; LocalForage.prototype.getSerializer = function getSerializer(callback) { var serializerPromise = Promise$1.resolve(localforageSerializer); executeTwoCallbacks(serializerPromise, callback); return serializerPromise; }; LocalForage.prototype.ready = function ready(callback) { var self = this; var promise = self._driverSet.then(function () { if (self._ready === null) { self._ready = self._initDriver(); } return self._ready; }); executeTwoCallbacks(promise, callback, callback); return promise; }; LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) { var self = this; if (!isArray(drivers)) { drivers = [drivers]; } var supportedDrivers = this._getSupportedDrivers(drivers); function setDriverToConfig() { self._config.driver = self.driver(); } function extendSelfWithDriver(driver) { self._extend(driver); setDriverToConfig(); self._ready = self._initStorage(self._config); return self._ready; } function initDriver(supportedDrivers) { return function () { var currentDriverIndex = 0; function driverPromiseLoop() { while (currentDriverIndex < supportedDrivers.length) { var driverName = supportedDrivers[currentDriverIndex]; currentDriverIndex++; self._dbInfo = null; self._ready = null; return self.getDriver(driverName).then(extendSelfWithDriver)["catch"](driverPromiseLoop); } setDriverToConfig(); var error = new Error('No available storage method found.'); self._driverSet = Promise$1.reject(error); return self._driverSet; } return driverPromiseLoop(); }; } // There might be a driver initialization in progress // so wait for it to finish in order to avoid a possible // race condition to set _dbInfo var oldDriverSetDone = this._driverSet !== null ? this._driverSet["catch"](function () { return Promise$1.resolve(); }) : Promise$1.resolve(); this._driverSet = oldDriverSetDone.then(function () { var driverName = supportedDrivers[0]; self._dbInfo = null; self._ready = null; return self.getDriver(driverName).then(function (driver) { self._driver = driver._driver; setDriverToConfig(); self._wrapLibraryMethodsWithReady(); self._initDriver = initDriver(supportedDrivers); }); })["catch"](function () { setDriverToConfig(); var error = new Error('No available storage method found.'); self._driverSet = Promise$1.reject(error); return self._driverSet; }); executeTwoCallbacks(this._driverSet, callback, errorCallback); return this._driverSet; }; LocalForage.prototype.supports = function supports(driverName) { return !!DriverSupport[driverName]; }; LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) { extend(this, libraryMethodsAndProperties); }; LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) { var supportedDrivers = []; for (var i = 0, len = drivers.length; i < len; i++) { var driverName = drivers[i]; if (this.supports(driverName)) { supportedDrivers.push(driverName); } } return supportedDrivers; }; LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() { // Add a stub for each driver API method that delays the call to the // corresponding driver method until localForage is ready. These stubs // will be replaced by the driver methods as soon as the driver is // loaded, so there is no performance impact. for (var i = 0, len = LibraryMethods.length; i < len; i++) { callWhenReady(this, LibraryMethods[i]); } }; LocalForage.prototype.createInstance = function createInstance(options) { return new LocalForage(options); }; return LocalForage; }(); // The actual localForage object that we expose as a module or via a // global. It's extended by pulling in one of our other libraries. var localforage_js = new LocalForage(); module.exports = localforage_js; },{"3":3}]},{},[4])(4) }); /***/ }), /***/ 55580: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getNative = __webpack_require__(56110), root = __webpack_require__(9325); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); module.exports = DataView; /***/ }), /***/ 21549: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var hashClear = __webpack_require__(22032), hashDelete = __webpack_require__(63862), hashGet = __webpack_require__(66721), hashHas = __webpack_require__(12749), hashSet = __webpack_require__(35749); /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; module.exports = Hash; /***/ }), /***/ 30980: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseCreate = __webpack_require__(39344), baseLodash = __webpack_require__(94033); /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295; /** * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. * * @private * @constructor * @param {*} value The value to wrap. */ function LazyWrapper(value) { this.__wrapped__ = value; this.__actions__ = []; this.__dir__ = 1; this.__filtered__ = false; this.__iteratees__ = []; this.__takeCount__ = MAX_ARRAY_LENGTH; this.__views__ = []; } // Ensure `LazyWrapper` is an instance of `baseLodash`. LazyWrapper.prototype = baseCreate(baseLodash.prototype); LazyWrapper.prototype.constructor = LazyWrapper; module.exports = LazyWrapper; /***/ }), /***/ 80079: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var listCacheClear = __webpack_require__(63702), listCacheDelete = __webpack_require__(70080), listCacheGet = __webpack_require__(24739), listCacheHas = __webpack_require__(48655), listCacheSet = __webpack_require__(31175); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /***/ 56017: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseCreate = __webpack_require__(39344), baseLodash = __webpack_require__(94033); /** * The base constructor for creating `lodash` wrapper objects. * * @private * @param {*} value The value to wrap. * @param {boolean} [chainAll] Enable explicit method chain sequences. */ function LodashWrapper(value, chainAll) { this.__wrapped__ = value; this.__actions__ = []; this.__chain__ = !!chainAll; this.__index__ = 0; this.__values__ = undefined; } LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; module.exports = LodashWrapper; /***/ }), /***/ 68223: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getNative = __webpack_require__(56110), root = __webpack_require__(9325); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /***/ 53661: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var mapCacheClear = __webpack_require__(63040), mapCacheDelete = __webpack_require__(17670), mapCacheGet = __webpack_require__(90289), mapCacheHas = __webpack_require__(4509), mapCacheSet = __webpack_require__(72949); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /***/ 32804: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getNative = __webpack_require__(56110), root = __webpack_require__(9325); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }), /***/ 76545: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getNative = __webpack_require__(56110), root = __webpack_require__(9325); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /***/ 38859: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var MapCache = __webpack_require__(53661), setCacheAdd = __webpack_require__(31380), setCacheHas = __webpack_require__(51459); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache; /***/ }), /***/ 37217: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var ListCache = __webpack_require__(80079), stackClear = __webpack_require__(51420), stackDelete = __webpack_require__(90938), stackGet = __webpack_require__(63605), stackHas = __webpack_require__(29817), stackSet = __webpack_require__(80945); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /***/ 51873: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var root = __webpack_require__(9325); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /***/ 37828: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var root = __webpack_require__(9325); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /***/ 28303: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getNative = __webpack_require__(56110), root = __webpack_require__(9325); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /***/ 91033: /***/ ((module) => { /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } module.exports = apply; /***/ }), /***/ 83729: /***/ ((module) => { /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } module.exports = arrayEach; /***/ }), /***/ 79770: /***/ ((module) => { /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } module.exports = arrayFilter; /***/ }), /***/ 15325: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIndexOf = __webpack_require__(96131); /** * A specialized version of `_.includes` for arrays without support for * specifying an index to search from. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; /***/ }), /***/ 29905: /***/ ((module) => { /** * This function is like `arrayIncludes` except that it accepts a comparator. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { return true; } } return false; } module.exports = arrayIncludesWith; /***/ }), /***/ 70695: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseTimes = __webpack_require__(78096), isArguments = __webpack_require__(72428), isArray = __webpack_require__(56449), isBuffer = __webpack_require__(3656), isIndex = __webpack_require__(30361), isTypedArray = __webpack_require__(37167); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /***/ 34932: /***/ ((module) => { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /***/ 14528: /***/ ((module) => { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /***/ 40882: /***/ ((module) => { /** * A specialized version of `_.reduce` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as * the initial value. * @returns {*} Returns the accumulated value. */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { accumulator = iteratee(accumulator, array[index], index, array); } return accumulator; } module.exports = arrayReduce; /***/ }), /***/ 14248: /***/ ((module) => { /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } module.exports = arraySome; /***/ }), /***/ 99811: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseProperty = __webpack_require__(47237); /** * Gets the size of an ASCII `string`. * * @private * @param {string} string The string inspect. * @returns {number} Returns the string size. */ var asciiSize = baseProperty('length'); module.exports = asciiSize; /***/ }), /***/ 61074: /***/ ((module) => { /** * Converts an ASCII `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function asciiToArray(string) { return string.split(''); } module.exports = asciiToArray; /***/ }), /***/ 1733: /***/ ((module) => { /** Used to match words composed of alphanumeric characters. */ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; /** * Splits an ASCII `string` into an array of its words. * * @private * @param {string} The string to inspect. * @returns {Array} Returns the words of `string`. */ function asciiWords(string) { return string.match(reAsciiWord) || []; } module.exports = asciiWords; /***/ }), /***/ 87805: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseAssignValue = __webpack_require__(43360), eq = __webpack_require__(75288); /** * This function is like `assignValue` except that it doesn't assign * `undefined` values. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignMergeValue; /***/ }), /***/ 16547: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseAssignValue = __webpack_require__(43360), eq = __webpack_require__(75288); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /***/ 26025: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var eq = __webpack_require__(75288); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /***/ 74733: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var copyObject = __webpack_require__(21791), keys = __webpack_require__(95950); /** * The base implementation of `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssign(object, source) { return object && copyObject(source, keys(source), object); } module.exports = baseAssign; /***/ }), /***/ 43838: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var copyObject = __webpack_require__(21791), keysIn = __webpack_require__(37241); /** * The base implementation of `_.assignIn` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssignIn(object, source) { return object && copyObject(source, keysIn(source), object); } module.exports = baseAssignIn; /***/ }), /***/ 43360: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var defineProperty = __webpack_require__(93243); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /***/ 9999: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Stack = __webpack_require__(37217), arrayEach = __webpack_require__(83729), assignValue = __webpack_require__(16547), baseAssign = __webpack_require__(74733), baseAssignIn = __webpack_require__(43838), cloneBuffer = __webpack_require__(93290), copyArray = __webpack_require__(23007), copySymbols = __webpack_require__(92271), copySymbolsIn = __webpack_require__(48948), getAllKeys = __webpack_require__(50002), getAllKeysIn = __webpack_require__(83349), getTag = __webpack_require__(5861), initCloneArray = __webpack_require__(76189), initCloneByTag = __webpack_require__(77199), initCloneObject = __webpack_require__(35529), isArray = __webpack_require__(56449), isBuffer = __webpack_require__(3656), isMap = __webpack_require__(87730), isObject = __webpack_require__(23805), isSet = __webpack_require__(38440), keys = __webpack_require__(95950), keysIn = __webpack_require__(37241); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values supported by `_.clone`. */ var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; /** * The base implementation of `_.clone` and `_.cloneDeep` which tracks * traversed objects. * * @private * @param {*} value The value to clone. * @param {boolean} bitmask The bitmask flags. * 1 - Deep clone * 2 - Flatten inherited properties * 4 - Clone symbols * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ function baseClone(value, bitmask, customizer, key, object, stack) { var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== undefined) { return result; } if (!isObject(value)) { return value; } var isArr = isArray(value); if (isArr) { result = initCloneArray(value); if (!isDeep) { return copyArray(value, result); } } else { var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; if (isBuffer(value)) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { result = (isFlat || isFunc) ? {} : initCloneObject(value); if (!isDeep) { return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { return object ? value : {}; } result = initCloneByTag(value, tag, isDeep); } } // Check for circular references and return its corresponding clone. stack || (stack = new Stack); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); if (isSet(value)) { value.forEach(function(subValue) { result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); } else if (isMap(value)) { value.forEach(function(subValue, key) { result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); } var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : (isFlat ? keysIn : keys); var props = isArr ? undefined : keysFunc(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } module.exports = baseClone; /***/ }), /***/ 39344: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isObject = __webpack_require__(23805); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = baseCreate; /***/ }), /***/ 80909: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseForOwn = __webpack_require__(30641), createBaseEach = __webpack_require__(38329); /** * The base implementation of `_.forEach` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array|Object} Returns `collection`. */ var baseEach = createBaseEach(baseForOwn); module.exports = baseEach; /***/ }), /***/ 2523: /***/ ((module) => { /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { return index; } } return -1; } module.exports = baseFindIndex; /***/ }), /***/ 83120: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayPush = __webpack_require__(14528), isFlattenable = __webpack_require__(45891); /** * The base implementation of `_.flatten` with support for restricting flattening. * * @private * @param {Array} array The array to flatten. * @param {number} depth The maximum recursion depth. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. * @param {Array} [result=[]] The initial result value. * @returns {Array} Returns the new flattened array. */ function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; predicate || (predicate = isFlattenable); result || (result = []); while (++index < length) { var value = array[index]; if (depth > 0 && predicate(value)) { if (depth > 1) { // Recursively flatten arrays (susceptible to call stack limits). baseFlatten(value, depth - 1, predicate, isStrict, result); } else { arrayPush(result, value); } } else if (!isStrict) { result[result.length] = value; } } return result; } module.exports = baseFlatten; /***/ }), /***/ 86649: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var createBaseFor = __webpack_require__(83221); /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = createBaseFor(); module.exports = baseFor; /***/ }), /***/ 30641: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseFor = __webpack_require__(86649), keys = __webpack_require__(95950); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } module.exports = baseForOwn; /***/ }), /***/ 47422: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var castPath = __webpack_require__(31769), toKey = __webpack_require__(77797); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /***/ 82199: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayPush = __webpack_require__(14528), isArray = __webpack_require__(56449); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; /***/ }), /***/ 72552: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Symbol = __webpack_require__(51873), getRawTag = __webpack_require__(659), objectToString = __webpack_require__(59350); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /***/ 28077: /***/ ((module) => { /** * The base implementation of `_.hasIn` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } module.exports = baseHasIn; /***/ }), /***/ 96131: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseFindIndex = __webpack_require__(2523), baseIsNaN = __webpack_require__(85463), strictIndexOf = __webpack_require__(76959); /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } module.exports = baseIndexOf; /***/ }), /***/ 27185: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var SetCache = __webpack_require__(38859), arrayIncludes = __webpack_require__(15325), arrayIncludesWith = __webpack_require__(29905), arrayMap = __webpack_require__(34932), baseUnary = __webpack_require__(27301), cacheHas = __webpack_require__(19219); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** * The base implementation of methods like `_.intersection`, without support * for iteratee shorthands, that accepts an array of arrays to inspect. * * @private * @param {Array} arrays The arrays to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of shared values. */ function baseIntersection(arrays, iteratee, comparator) { var includes = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result = []; while (othIndex--) { var array = arrays[othIndex]; if (othIndex && iteratee) { array = arrayMap(array, baseUnary(iteratee)); } maxLength = nativeMin(array.length, maxLength); caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) ? new SetCache(othIndex && array) : undefined; } array = arrays[0]; var index = -1, seen = caches[0]; outer: while (++index < length && result.length < maxLength) { var value = array[index], computed = iteratee ? iteratee(value) : value; value = (comparator || value !== 0) ? value : 0; if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator) )) { othIndex = othLength; while (--othIndex) { var cache = caches[othIndex]; if (!(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator)) ) { continue outer; } } if (seen) { seen.push(computed); } result.push(value); } } return result; } module.exports = baseIntersection; /***/ }), /***/ 27534: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGetTag = __webpack_require__(72552), isObjectLike = __webpack_require__(40346); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } module.exports = baseIsArguments; /***/ }), /***/ 60270: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIsEqualDeep = __webpack_require__(87068), isObjectLike = __webpack_require__(40346); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }), /***/ 87068: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Stack = __webpack_require__(37217), equalArrays = __webpack_require__(25911), equalByTag = __webpack_require__(21986), equalObjects = __webpack_require__(50689), getTag = __webpack_require__(5861), isArray = __webpack_require__(56449), isBuffer = __webpack_require__(3656), isTypedArray = __webpack_require__(37167); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; /***/ }), /***/ 29172: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getTag = __webpack_require__(5861), isObjectLike = __webpack_require__(40346); /** `Object#toString` result references. */ var mapTag = '[object Map]'; /** * The base implementation of `_.isMap` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. */ function baseIsMap(value) { return isObjectLike(value) && getTag(value) == mapTag; } module.exports = baseIsMap; /***/ }), /***/ 41799: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Stack = __webpack_require__(37217), baseIsEqual = __webpack_require__(60270); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new Stack; if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; } } } return true; } module.exports = baseIsMatch; /***/ }), /***/ 85463: /***/ ((module) => { /** * The base implementation of `_.isNaN` without support for number objects. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. */ function baseIsNaN(value) { return value !== value; } module.exports = baseIsNaN; /***/ }), /***/ 45083: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isFunction = __webpack_require__(1882), isMasked = __webpack_require__(87296), isObject = __webpack_require__(23805), toSource = __webpack_require__(47473); /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } module.exports = baseIsNative; /***/ }), /***/ 16038: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getTag = __webpack_require__(5861), isObjectLike = __webpack_require__(40346); /** `Object#toString` result references. */ var setTag = '[object Set]'; /** * The base implementation of `_.isSet` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. */ function baseIsSet(value) { return isObjectLike(value) && getTag(value) == setTag; } module.exports = baseIsSet; /***/ }), /***/ 4901: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGetTag = __webpack_require__(72552), isLength = __webpack_require__(30294), isObjectLike = __webpack_require__(40346); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }), /***/ 15389: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseMatches = __webpack_require__(93663), baseMatchesProperty = __webpack_require__(87978), identity = __webpack_require__(83488), isArray = __webpack_require__(56449), property = __webpack_require__(50583); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }), /***/ 88984: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isPrototype = __webpack_require__(55527), nativeKeys = __webpack_require__(3650); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } module.exports = baseKeys; /***/ }), /***/ 72903: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isObject = __webpack_require__(23805), isPrototype = __webpack_require__(55527), nativeKeysIn = __webpack_require__(90181); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } module.exports = baseKeysIn; /***/ }), /***/ 94033: /***/ ((module) => { /** * The function whose prototype chain sequence wrappers inherit from. * * @private */ function baseLodash() { // No operation performed. } module.exports = baseLodash; /***/ }), /***/ 93663: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIsMatch = __webpack_require__(41799), getMatchData = __webpack_require__(10776), matchesStrictComparable = __webpack_require__(67197); /** * The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } module.exports = baseMatches; /***/ }), /***/ 87978: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIsEqual = __webpack_require__(60270), get = __webpack_require__(58156), hasIn = __webpack_require__(80631), isKey = __webpack_require__(28586), isStrictComparable = __webpack_require__(30756), matchesStrictComparable = __webpack_require__(67197), toKey = __webpack_require__(77797); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } module.exports = baseMatchesProperty; /***/ }), /***/ 85250: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Stack = __webpack_require__(37217), assignMergeValue = __webpack_require__(87805), baseFor = __webpack_require__(86649), baseMergeDeep = __webpack_require__(42824), isObject = __webpack_require__(23805), keysIn = __webpack_require__(37241), safeGet = __webpack_require__(14974); /** * The base implementation of `_.merge` without support for multiple sources. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {number} srcIndex The index of `source`. * @param {Function} [customizer] The function to customize merged values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } baseFor(source, function(srcValue, key) { stack || (stack = new Stack); if (isObject(srcValue)) { baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { newValue = srcValue; } assignMergeValue(object, key, newValue); } }, keysIn); } module.exports = baseMerge; /***/ }), /***/ 42824: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var assignMergeValue = __webpack_require__(87805), cloneBuffer = __webpack_require__(93290), cloneTypedArray = __webpack_require__(71961), copyArray = __webpack_require__(23007), initCloneObject = __webpack_require__(35529), isArguments = __webpack_require__(72428), isArray = __webpack_require__(56449), isArrayLikeObject = __webpack_require__(83693), isBuffer = __webpack_require__(3656), isFunction = __webpack_require__(1882), isObject = __webpack_require__(23805), isPlainObject = __webpack_require__(11331), isTypedArray = __webpack_require__(37167), safeGet = __webpack_require__(14974), toPlainObject = __webpack_require__(69884); /** * A specialized version of `baseMerge` for arrays and objects which performs * deep merges and tracks traversed objects enabling objects with circular * references to be merged. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {string} key The key of the value to merge. * @param {number} srcIndex The index of `source`. * @param {Function} mergeFunc The function to merge values. * @param {Function} [customizer] The function to customize assigned values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, (key + ''), object, source, stack) : undefined; var isCommon = newValue === undefined; if (isCommon) { var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || isFunction(objValue)) { newValue = initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack['delete'](srcValue); } assignMergeValue(object, key, newValue); } module.exports = baseMergeDeep; /***/ }), /***/ 76001: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var basePickBy = __webpack_require__(97420), hasIn = __webpack_require__(80631); /** * The base implementation of `_.pick` without support for individual * property identifiers. * * @private * @param {Object} object The source object. * @param {string[]} paths The property paths to pick. * @returns {Object} Returns the new object. */ function basePick(object, paths) { return basePickBy(object, paths, function(value, path) { return hasIn(object, path); }); } module.exports = basePick; /***/ }), /***/ 97420: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGet = __webpack_require__(47422), baseSet = __webpack_require__(73170), castPath = __webpack_require__(31769); /** * The base implementation of `_.pickBy` without support for iteratee shorthands. * * @private * @param {Object} object The source object. * @param {string[]} paths The property paths to pick. * @param {Function} predicate The function invoked per property. * @returns {Object} Returns the new object. */ function basePickBy(object, paths, predicate) { var index = -1, length = paths.length, result = {}; while (++index < length) { var path = paths[index], value = baseGet(object, path); if (predicate(value, path)) { baseSet(result, castPath(path, object), value); } } return result; } module.exports = basePickBy; /***/ }), /***/ 47237: /***/ ((module) => { /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { return object == null ? undefined : object[key]; }; } module.exports = baseProperty; /***/ }), /***/ 17255: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGet = __webpack_require__(47422); /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } module.exports = basePropertyDeep; /***/ }), /***/ 54552: /***/ ((module) => { /** * The base implementation of `_.propertyOf` without support for deep paths. * * @private * @param {Object} object The object to query. * @returns {Function} Returns the new accessor function. */ function basePropertyOf(object) { return function(key) { return object == null ? undefined : object[key]; }; } module.exports = basePropertyOf; /***/ }), /***/ 50306: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseUnset = __webpack_require__(19931), isIndex = __webpack_require__(30361); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * The base implementation of `_.pullAt` without support for individual * indexes or capturing the removed elements. * * @private * @param {Array} array The array to modify. * @param {number[]} indexes The indexes of elements to remove. * @returns {Array} Returns `array`. */ function basePullAt(array, indexes) { var length = array ? indexes.length : 0, lastIndex = length - 1; while (length--) { var index = indexes[length]; if (length == lastIndex || index !== previous) { var previous = index; if (isIndex(index)) { splice.call(array, index, 1); } else { baseUnset(array, index); } } } return array; } module.exports = basePullAt; /***/ }), /***/ 84051: /***/ ((module) => { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeFloor = Math.floor; /** * The base implementation of `_.repeat` which doesn't coerce arguments. * * @private * @param {string} string The string to repeat. * @param {number} n The number of times to repeat the string. * @returns {string} Returns the repeated string. */ function baseRepeat(string, n) { var result = ''; if (!string || n < 1 || n > MAX_SAFE_INTEGER) { return result; } // Leverage the exponentiation by squaring algorithm for a faster repeat. // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. do { if (n % 2) { result += string; } n = nativeFloor(n / 2); if (n) { string += string; } } while (n); return result; } module.exports = baseRepeat; /***/ }), /***/ 69302: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var identity = __webpack_require__(83488), overRest = __webpack_require__(56757), setToString = __webpack_require__(32865); /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { return setToString(overRest(func, start, identity), func + ''); } module.exports = baseRest; /***/ }), /***/ 73170: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var assignValue = __webpack_require__(16547), castPath = __webpack_require__(31769), isIndex = __webpack_require__(30361), isObject = __webpack_require__(23805), toKey = __webpack_require__(77797); /** * The base implementation of `_.set`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { if (!isObject(object)) { return object; } path = castPath(path, object); var index = -1, length = path.length, lastIndex = length - 1, nested = object; while (nested != null && ++index < length) { var key = toKey(path[index]), newValue = value; if (key === '__proto__' || key === 'constructor' || key === 'prototype') { return object; } if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; if (newValue === undefined) { newValue = isObject(objValue) ? objValue : (isIndex(path[index + 1]) ? [] : {}); } } assignValue(nested, key, newValue); nested = nested[key]; } return object; } module.exports = baseSet; /***/ }), /***/ 68882: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var identity = __webpack_require__(83488), metaMap = __webpack_require__(48152); /** * The base implementation of `setData` without support for hot loop shorting. * * @private * @param {Function} func The function to associate metadata with. * @param {*} data The metadata. * @returns {Function} Returns `func`. */ var baseSetData = !metaMap ? identity : function(func, data) { metaMap.set(func, data); return func; }; module.exports = baseSetData; /***/ }), /***/ 19570: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var constant = __webpack_require__(37334), defineProperty = __webpack_require__(93243), identity = __webpack_require__(83488); /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !defineProperty ? identity : function(func, string) { return defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(string), 'writable': true }); }; module.exports = baseSetToString; /***/ }), /***/ 25160: /***/ ((module) => { /** * The base implementation of `_.slice` without an iteratee call guard. * * @private * @param {Array} array The array to slice. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the slice of `array`. */ function baseSlice(array, start, end) { var index = -1, length = array.length; if (start < 0) { start = -start > length ? 0 : (length + start); } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : ((end - start) >>> 0); start >>>= 0; var result = Array(length); while (++index < length) { result[index] = array[index + start]; } return result; } module.exports = baseSlice; /***/ }), /***/ 90916: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseEach = __webpack_require__(80909); /** * The base implementation of `_.some` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function baseSome(collection, predicate) { var result; baseEach(collection, function(value, index, collection) { result = predicate(value, index, collection); return !result; }); return !!result; } module.exports = baseSome; /***/ }), /***/ 78096: /***/ ((module) => { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }), /***/ 91372: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayMap = __webpack_require__(34932); /** * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array * of key-value pairs for `object` corresponding to the property names of `props`. * * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. * @returns {Object} Returns the key-value pairs. */ function baseToPairs(object, props) { return arrayMap(props, function(key) { return [key, object[key]]; }); } module.exports = baseToPairs; /***/ }), /***/ 77556: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Symbol = __webpack_require__(51873), arrayMap = __webpack_require__(34932), isArray = __webpack_require__(56449), isSymbol = __webpack_require__(44394); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = baseToString; /***/ }), /***/ 54128: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var trimmedEndIndex = __webpack_require__(31800); /** Used to match leading whitespace. */ var reTrimStart = /^\s+/; /** * The base implementation of `_.trim`. * * @private * @param {string} string The string to trim. * @returns {string} Returns the trimmed string. */ function baseTrim(string) { return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') : string; } module.exports = baseTrim; /***/ }), /***/ 27301: /***/ ((module) => { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /***/ 55765: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var SetCache = __webpack_require__(38859), arrayIncludes = __webpack_require__(15325), arrayIncludesWith = __webpack_require__(29905), cacheHas = __webpack_require__(19219), createSet = __webpack_require__(44517), setToArray = __webpack_require__(84247); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * The base implementation of `_.uniqBy` without support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new duplicate free array. */ function baseUniq(array, iteratee, comparator) { var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; if (comparator) { isCommon = false; includes = arrayIncludesWith; } else if (length >= LARGE_ARRAY_SIZE) { var set = iteratee ? null : createSet(array); if (set) { return setToArray(set); } isCommon = false; includes = cacheHas; seen = new SetCache; } else { seen = iteratee ? [] : result; } outer: while (++index < length) { var value = array[index], computed = iteratee ? iteratee(value) : value; value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var seenIndex = seen.length; while (seenIndex--) { if (seen[seenIndex] === computed) { continue outer; } } if (iteratee) { seen.push(computed); } result.push(value); } else if (!includes(seen, computed, comparator)) { if (seen !== result) { seen.push(computed); } result.push(value); } } return result; } module.exports = baseUniq; /***/ }), /***/ 19931: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var castPath = __webpack_require__(31769), last = __webpack_require__(68090), parent = __webpack_require__(68969), toKey = __webpack_require__(77797); /** * The base implementation of `_.unset`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The property path to unset. * @returns {boolean} Returns `true` if the property is deleted, else `false`. */ function baseUnset(object, path) { path = castPath(path, object); object = parent(object, path); return object == null || delete object[toKey(last(path))]; } module.exports = baseUnset; /***/ }), /***/ 19219: /***/ ((module) => { /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } module.exports = cacheHas; /***/ }), /***/ 80741: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isArrayLikeObject = __webpack_require__(83693); /** * Casts `value` to an empty array if it's not an array like object. * * @private * @param {*} value The value to inspect. * @returns {Array|Object} Returns the cast array-like object. */ function castArrayLikeObject(value) { return isArrayLikeObject(value) ? value : []; } module.exports = castArrayLikeObject; /***/ }), /***/ 31769: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isArray = __webpack_require__(56449), isKey = __webpack_require__(28586), stringToPath = __webpack_require__(61802), toString = __webpack_require__(13222); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /***/ 28754: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseSlice = __webpack_require__(25160); /** * Casts `array` to a slice if it's needed. * * @private * @param {Array} array The array to inspect. * @param {number} start The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the cast slice. */ function castSlice(array, start, end) { var length = array.length; end = end === undefined ? length : end; return (!start && end >= length) ? array : baseSlice(array, start, end); } module.exports = castSlice; /***/ }), /***/ 49653: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Uint8Array = __webpack_require__(37828); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /***/ 93290: /***/ ((module, exports, __webpack_require__) => { /* module decorator */ module = __webpack_require__.nmd(module); var root = __webpack_require__(9325); /** Detect free variable `exports`. */ var freeExports = true && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = cloneBuffer; /***/ }), /***/ 76169: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var cloneArrayBuffer = __webpack_require__(49653); /** * Creates a clone of `dataView`. * * @private * @param {Object} dataView The data view to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned data view. */ function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } module.exports = cloneDataView; /***/ }), /***/ 73201: /***/ ((module) => { /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** * Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } module.exports = cloneRegExp; /***/ }), /***/ 93736: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Symbol = __webpack_require__(51873); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a clone of the `symbol` object. * * @private * @param {Object} symbol The symbol object to clone. * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } module.exports = cloneSymbol; /***/ }), /***/ 71961: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var cloneArrayBuffer = __webpack_require__(49653); /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } module.exports = cloneTypedArray; /***/ }), /***/ 91596: /***/ ((module) => { /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Creates an array that is the composition of partially applied arguments, * placeholders, and provided arguments into a single array of arguments. * * @private * @param {Array} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. * @returns {Array} Returns the new array of composed arguments. */ function composeArgs(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(leftLength + rangeLength), isUncurried = !isCurried; while (++leftIndex < leftLength) { result[leftIndex] = partials[leftIndex]; } while (++argsIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[holders[argsIndex]] = args[argsIndex]; } } while (rangeLength--) { result[leftIndex++] = args[argsIndex++]; } return result; } module.exports = composeArgs; /***/ }), /***/ 53320: /***/ ((module) => { /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * This function is like `composeArgs` except that the arguments composition * is tailored for `_.partialRight`. * * @private * @param {Array} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. * @returns {Array} Returns the new array of composed arguments. */ function composeArgsRight(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(rangeLength + rightLength), isUncurried = !isCurried; while (++argsIndex < rangeLength) { result[argsIndex] = args[argsIndex]; } var offset = argsIndex; while (++rightIndex < rightLength) { result[offset + rightIndex] = partials[rightIndex]; } while (++holdersIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[offset + holders[holdersIndex]] = args[argsIndex++]; } } return result; } module.exports = composeArgsRight; /***/ }), /***/ 23007: /***/ ((module) => { /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyArray; /***/ }), /***/ 21791: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var assignValue = __webpack_require__(16547), baseAssignValue = __webpack_require__(43360); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /***/ 92271: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var copyObject = __webpack_require__(21791), getSymbols = __webpack_require__(4664); /** * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbols(source, object) { return copyObject(source, getSymbols(source), object); } module.exports = copySymbols; /***/ }), /***/ 48948: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var copyObject = __webpack_require__(21791), getSymbolsIn = __webpack_require__(86375); /** * Copies own and inherited symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbolsIn(source, object) { return copyObject(source, getSymbolsIn(source), object); } module.exports = copySymbolsIn; /***/ }), /***/ 55481: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var root = __webpack_require__(9325); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; /***/ }), /***/ 58523: /***/ ((module) => { /** * Gets the number of `placeholder` occurrences in `array`. * * @private * @param {Array} array The array to inspect. * @param {*} placeholder The placeholder to search for. * @returns {number} Returns the placeholder count. */ function countHolders(array, placeholder) { var length = array.length, result = 0; while (length--) { if (array[length] === placeholder) { ++result; } } return result; } module.exports = countHolders; /***/ }), /***/ 20999: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseRest = __webpack_require__(69302), isIterateeCall = __webpack_require__(36800); /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } module.exports = createAssigner; /***/ }), /***/ 38329: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isArrayLike = __webpack_require__(64894); /** * Creates a `baseEach` or `baseEachRight` function. * * @private * @param {Function} eachFunc The function to iterate over a collection. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); while ((fromRight ? index-- : ++index < length)) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } module.exports = createBaseEach; /***/ }), /***/ 83221: /***/ ((module) => { /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } module.exports = createBaseFor; /***/ }), /***/ 11842: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var createCtor = __webpack_require__(82819), root = __webpack_require__(9325); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1; /** * Creates a function that wraps `func` to invoke it with the optional `this` * binding of `thisArg`. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ function createBind(func, bitmask, thisArg) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper() { var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; return fn.apply(isBind ? thisArg : this, arguments); } return wrapper; } module.exports = createBind; /***/ }), /***/ 12507: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var castSlice = __webpack_require__(28754), hasUnicode = __webpack_require__(49698), stringToArray = __webpack_require__(63912), toString = __webpack_require__(13222); /** * Creates a function like `_.lowerFirst`. * * @private * @param {string} methodName The name of the `String` case method to use. * @returns {Function} Returns the new case function. */ function createCaseFirst(methodName) { return function(string) { string = toString(string); var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined; var chr = strSymbols ? strSymbols[0] : string.charAt(0); var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1); return chr[methodName]() + trailing; }; } module.exports = createCaseFirst; /***/ }), /***/ 45539: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayReduce = __webpack_require__(40882), deburr = __webpack_require__(50828), words = __webpack_require__(66645); /** Used to compose unicode capture groups. */ var rsApos = "['\u2019]"; /** Used to match apostrophes. */ var reApos = RegExp(rsApos, 'g'); /** * Creates a function like `_.camelCase`. * * @private * @param {Function} callback The function to combine each word. * @returns {Function} Returns the new compounder function. */ function createCompounder(callback) { return function(string) { return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); }; } module.exports = createCompounder; /***/ }), /***/ 82819: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseCreate = __webpack_require__(39344), isObject = __webpack_require__(23805); /** * Creates a function that produces an instance of `Ctor` regardless of * whether it was invoked as part of a `new` expression or by `call` or `apply`. * * @private * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { case 0: return new Ctor; case 1: return new Ctor(args[0]); case 2: return new Ctor(args[0], args[1]); case 3: return new Ctor(args[0], args[1], args[2]); case 4: return new Ctor(args[0], args[1], args[2], args[3]); case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } var thisBinding = baseCreate(Ctor.prototype), result = Ctor.apply(thisBinding, args); // Mimic the constructor's `return` behavior. // See https://es5.github.io/#x13.2.2 for more details. return isObject(result) ? result : thisBinding; }; } module.exports = createCtor; /***/ }), /***/ 77078: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var apply = __webpack_require__(91033), createCtor = __webpack_require__(82819), createHybrid = __webpack_require__(37471), createRecurry = __webpack_require__(18073), getHolder = __webpack_require__(11287), replaceHolders = __webpack_require__(36306), root = __webpack_require__(9325); /** * Creates a function that wraps `func` to enable currying. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createCurry(func, bitmask, arity) { var Ctor = createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length, placeholder = getHolder(wrapper); while (index--) { args[index] = arguments[index]; } var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) ? [] : replaceHolders(args, placeholder); length -= holders.length; if (length < arity) { return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; return apply(fn, this, args); } return wrapper; } module.exports = createCurry; /***/ }), /***/ 62006: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIteratee = __webpack_require__(15389), isArrayLike = __webpack_require__(64894), keys = __webpack_require__(95950); /** * Creates a `_.find` or `_.findLast` function. * * @private * @param {Function} findIndexFunc The function to find the collection index. * @returns {Function} Returns the new find function. */ function createFind(findIndexFunc) { return function(collection, predicate, fromIndex) { var iterable = Object(collection); if (!isArrayLike(collection)) { var iteratee = baseIteratee(predicate, 3); collection = keys(collection); predicate = function(key) { return iteratee(iterable[key], key, iterable); }; } var index = findIndexFunc(collection, predicate, fromIndex); return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; }; } module.exports = createFind; /***/ }), /***/ 66929: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var LodashWrapper = __webpack_require__(56017), flatRest = __webpack_require__(38816), getData = __webpack_require__(37381), getFuncName = __webpack_require__(62284), isArray = __webpack_require__(56449), isLaziable = __webpack_require__(85087); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** Used to compose bitmasks for function metadata. */ var WRAP_CURRY_FLAG = 8, WRAP_PARTIAL_FLAG = 32, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256; /** * Creates a `_.flow` or `_.flowRight` function. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new flow function. */ function createFlow(fromRight) { return flatRest(function(funcs) { var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru; if (fromRight) { funcs.reverse(); } while (index--) { var func = funcs[index]; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } if (prereq && !wrapper && getFuncName(func) == 'wrapper') { var wrapper = new LodashWrapper([], true); } } index = wrapper ? index : length; while (++index < length) { func = funcs[index]; var funcName = getFuncName(func), data = funcName == 'wrapper' ? getData(func) : undefined; if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1 ) { wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); } else { wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func); } } return function() { var args = arguments, value = args[0]; if (wrapper && args.length == 1 && isArray(value)) { return wrapper.plant(value).value(); } var index = 0, result = length ? funcs[index].apply(this, args) : value; while (++index < length) { result = funcs[index].call(this, result); } return result; }; }); } module.exports = createFlow; /***/ }), /***/ 37471: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var composeArgs = __webpack_require__(91596), composeArgsRight = __webpack_require__(53320), countHolders = __webpack_require__(58523), createCtor = __webpack_require__(82819), createRecurry = __webpack_require__(18073), getHolder = __webpack_require__(11287), reorder = __webpack_require__(68294), replaceHolders = __webpack_require__(36306), root = __webpack_require__(9325); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_ARY_FLAG = 128, WRAP_FLIP_FLAG = 512; /** * Creates a function that wraps `func` to invoke it with optional `this` * binding of `thisArg`, partial application, and currying. * * @private * @param {Function|string} func The function or method name to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [partialsRight] The arguments to append to those provided * to the new function. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined : createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { args = composeArgs(args, partials, holders, isCurried); } if (partialsRight) { args = composeArgsRight(args, partialsRight, holdersRight, isCurried); } length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func; length = args.length; if (argPos) { args = reorder(args, argPos); } else if (isFlip && length > 1) { args.reverse(); } if (isAry && ary < length) { args.length = ary; } if (this && this !== root && this instanceof wrapper) { fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } return wrapper; } module.exports = createHybrid; /***/ }), /***/ 57216: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseRepeat = __webpack_require__(84051), baseToString = __webpack_require__(77556), castSlice = __webpack_require__(28754), hasUnicode = __webpack_require__(49698), stringSize = __webpack_require__(81993), stringToArray = __webpack_require__(63912); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeCeil = Math.ceil; /** * Creates the padding for `string` based on `length`. The `chars` string * is truncated if the number of characters exceeds `length`. * * @private * @param {number} length The padding length. * @param {string} [chars=' '] The string used as padding. * @returns {string} Returns the padding for `string`. */ function createPadding(length, chars) { chars = chars === undefined ? ' ' : baseToString(chars); var charsLength = chars.length; if (charsLength < 2) { return charsLength ? baseRepeat(chars, length) : chars; } var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); return hasUnicode(chars) ? castSlice(stringToArray(result), 0, length).join('') : result.slice(0, length); } module.exports = createPadding; /***/ }), /***/ 24168: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var apply = __webpack_require__(91033), createCtor = __webpack_require__(82819), root = __webpack_require__(9325); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1; /** * Creates a function that wraps `func` to invoke it with the `this` binding * of `thisArg` and `partials` prepended to the arguments it receives. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper() { var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; } while (argsLength--) { args[leftIndex++] = arguments[++argsIndex]; } return apply(fn, isBind ? thisArg : this, args); } return wrapper; } module.exports = createPartial; /***/ }), /***/ 18073: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isLaziable = __webpack_require__(85087), setData = __webpack_require__(54641), setWrapToString = __webpack_require__(70981); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64; /** * Creates a function that wraps `func` to continue currying. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder value. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, newPartialsRight = isCurry ? undefined : partials; bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); } var newData = [ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity ]; var result = wrapFunc.apply(undefined, newData); if (isLaziable(func)) { setData(result, newData); } result.placeholder = placeholder; return setWrapToString(result, func, bitmask); } module.exports = createRecurry; /***/ }), /***/ 44517: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Set = __webpack_require__(76545), noop = __webpack_require__(63950), setToArray = __webpack_require__(84247); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Creates a set object of `values`. * * @private * @param {Array} values The values to add to the set. * @returns {Object} Returns the new set. */ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { return new Set(values); }; module.exports = createSet; /***/ }), /***/ 82963: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseToPairs = __webpack_require__(91372), getTag = __webpack_require__(5861), mapToArray = __webpack_require__(20317), setToPairs = __webpack_require__(70799); /** `Object#toString` result references. */ var mapTag = '[object Map]', setTag = '[object Set]'; /** * Creates a `_.toPairs` or `_.toPairsIn` function. * * @private * @param {Function} keysFunc The function to get the keys of a given object. * @returns {Function} Returns the new pairs function. */ function createToPairs(keysFunc) { return function(object) { var tag = getTag(object); if (tag == mapTag) { return mapToArray(object); } if (tag == setTag) { return setToPairs(object); } return baseToPairs(object, keysFunc(object)); }; } module.exports = createToPairs; /***/ }), /***/ 66977: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseSetData = __webpack_require__(68882), createBind = __webpack_require__(11842), createCurry = __webpack_require__(77078), createHybrid = __webpack_require__(37471), createPartial = __webpack_require__(24168), getData = __webpack_require__(37381), mergeData = __webpack_require__(3209), setData = __webpack_require__(54641), setWrapToString = __webpack_require__(70981), toInteger = __webpack_require__(61489); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * Creates a function that either curries or invokes `func` with optional * `this` binding and partially applied arguments. * * @private * @param {Function|string} func The function or method name to wrap. * @param {number} bitmask The bitmask flags. * 1 - `_.bind` * 2 - `_.bindKey` * 4 - `_.curry` or `_.curryRight` of a bound function * 8 - `_.curry` * 16 - `_.curryRight` * 32 - `_.partial` * 64 - `_.partialRight` * 128 - `_.rearg` * 256 - `_.ary` * 512 - `_.flip` * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to be partially applied. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; if (!isBindKey && typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } var length = partials ? partials.length : 0; if (!length) { bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); partials = holders = undefined; } ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); arity = arity === undefined ? arity : toInteger(arity); length -= holders ? holders.length : 0; if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { var partialsRight = partials, holdersRight = holders; partials = holders = undefined; } var data = isBindKey ? undefined : getData(func); var newData = [ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity ]; if (data) { mergeData(newData, data); } func = newData[0]; bitmask = newData[1]; thisArg = newData[2]; partials = newData[3]; holders = newData[4]; arity = newData[9] = newData[9] === undefined ? (isBindKey ? 0 : func.length) : nativeMax(newData[9] - length, 0); if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == WRAP_BIND_FLAG) { var result = createBind(func, bitmask, thisArg); } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { result = createCurry(func, bitmask, arity); } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { result = createPartial(func, bitmask, thisArg, partials); } else { result = createHybrid.apply(undefined, newData); } var setter = data ? baseSetData : setData; return setWrapToString(setter(result, newData), func, bitmask); } module.exports = createWrap; /***/ }), /***/ 53138: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isPlainObject = __webpack_require__(11331); /** * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain * objects. * * @private * @param {*} value The value to inspect. * @param {string} key The key of the property to inspect. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. */ function customOmitClone(value) { return isPlainObject(value) ? undefined : value; } module.exports = customOmitClone; /***/ }), /***/ 24647: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var basePropertyOf = __webpack_require__(54552); /** Used to map Latin Unicode letters to basic Latin letters. */ var deburredLetters = { // Latin-1 Supplement block. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', '\xc7': 'C', '\xe7': 'c', '\xd0': 'D', '\xf0': 'd', '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', '\xd1': 'N', '\xf1': 'n', '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', '\xc6': 'Ae', '\xe6': 'ae', '\xde': 'Th', '\xfe': 'th', '\xdf': 'ss', // Latin Extended-A block. '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', '\u0134': 'J', '\u0135': 'j', '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', '\u0163': 't', '\u0165': 't', '\u0167': 't', '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', '\u0174': 'W', '\u0175': 'w', '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', '\u0132': 'IJ', '\u0133': 'ij', '\u0152': 'Oe', '\u0153': 'oe', '\u0149': "'n", '\u017f': 's' }; /** * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A * letters to basic Latin letters. * * @private * @param {string} letter The matched letter to deburr. * @returns {string} Returns the deburred letter. */ var deburrLetter = basePropertyOf(deburredLetters); module.exports = deburrLetter; /***/ }), /***/ 93243: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getNative = __webpack_require__(56110); var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineProperty; /***/ }), /***/ 25911: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var SetCache = __webpack_require__(38859), arraySome = __webpack_require__(14248), cacheHas = __webpack_require__(19219); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Check that cyclic values are equal. var arrStacked = stack.get(array); var othStacked = stack.get(other); if (arrStacked && othStacked) { return arrStacked == other && othStacked == array; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } module.exports = equalArrays; /***/ }), /***/ 21986: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Symbol = __webpack_require__(51873), Uint8Array = __webpack_require__(37828), eq = __webpack_require__(75288), equalArrays = __webpack_require__(25911), mapToArray = __webpack_require__(20317), setToArray = __webpack_require__(84247); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]'; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || (object.byteOffset != other.byteOffset)) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } module.exports = equalByTag; /***/ }), /***/ 50689: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getAllKeys = __webpack_require__(50002); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Check that cyclic values are equal. var objStacked = stack.get(object); var othStacked = stack.get(other); if (objStacked && othStacked) { return objStacked == other && othStacked == object; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } module.exports = equalObjects; /***/ }), /***/ 38816: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var flatten = __webpack_require__(35970), overRest = __webpack_require__(56757), setToString = __webpack_require__(32865); /** * A specialized version of `baseRest` which flattens the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @returns {Function} Returns the new function. */ function flatRest(func) { return setToString(overRest(func, undefined, flatten), func + ''); } module.exports = flatRest; /***/ }), /***/ 34840: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g; module.exports = freeGlobal; /***/ }), /***/ 50002: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGetAllKeys = __webpack_require__(82199), getSymbols = __webpack_require__(4664), keys = __webpack_require__(95950); /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } module.exports = getAllKeys; /***/ }), /***/ 83349: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGetAllKeys = __webpack_require__(82199), getSymbolsIn = __webpack_require__(86375), keysIn = __webpack_require__(37241); /** * Creates an array of own and inherited enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeysIn(object) { return baseGetAllKeys(object, keysIn, getSymbolsIn); } module.exports = getAllKeysIn; /***/ }), /***/ 37381: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var metaMap = __webpack_require__(48152), noop = __webpack_require__(63950); /** * Gets metadata for `func`. * * @private * @param {Function} func The function to query. * @returns {*} Returns the metadata for `func`. */ var getData = !metaMap ? noop : function(func) { return metaMap.get(func); }; module.exports = getData; /***/ }), /***/ 62284: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var realNames = __webpack_require__(84629); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the name of `func`. * * @private * @param {Function} func The function to query. * @returns {string} Returns the function name. */ function getFuncName(func) { var result = (func.name + ''), array = realNames[result], length = hasOwnProperty.call(realNames, result) ? array.length : 0; while (length--) { var data = array[length], otherFunc = data.func; if (otherFunc == null || otherFunc == func) { return data.name; } } return result; } module.exports = getFuncName; /***/ }), /***/ 11287: /***/ ((module) => { /** * Gets the argument placeholder value for `func`. * * @private * @param {Function} func The function to inspect. * @returns {*} Returns the placeholder value. */ function getHolder(func) { var object = func; return object.placeholder; } module.exports = getHolder; /***/ }), /***/ 12651: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isKeyable = __webpack_require__(74218); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /***/ 10776: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isStrictComparable = __webpack_require__(30756), keys = __webpack_require__(95950); /** * Gets the property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } module.exports = getMatchData; /***/ }), /***/ 56110: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIsNative = __webpack_require__(45083), getValue = __webpack_require__(10392); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /***/ 28879: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var overArg = __webpack_require__(74335); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /***/ 659: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Symbol = __webpack_require__(51873); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /***/ 4664: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayFilter = __webpack_require__(79770), stubArray = __webpack_require__(63345); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /***/ 86375: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayPush = __webpack_require__(14528), getPrototype = __webpack_require__(28879), getSymbols = __webpack_require__(4664), stubArray = __webpack_require__(63345); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own and inherited enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); object = getPrototype(object); } return result; }; module.exports = getSymbolsIn; /***/ }), /***/ 5861: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var DataView = __webpack_require__(55580), Map = __webpack_require__(68223), Promise = __webpack_require__(32804), Set = __webpack_require__(76545), WeakMap = __webpack_require__(28303), baseGetTag = __webpack_require__(72552), toSource = __webpack_require__(47473); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /***/ 10392: /***/ ((module) => { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }), /***/ 75251: /***/ ((module) => { /** Used to match wrap detail comments. */ var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /; /** * Extracts wrapper details from the `source` body comment. * * @private * @param {string} source The source to inspect. * @returns {Array} Returns the wrapper details. */ function getWrapDetails(source) { var match = source.match(reWrapDetails); return match ? match[1].split(reSplitDetails) : []; } module.exports = getWrapDetails; /***/ }), /***/ 49326: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var castPath = __webpack_require__(31769), isArguments = __webpack_require__(72428), isArray = __webpack_require__(56449), isIndex = __webpack_require__(30361), isLength = __webpack_require__(30294), toKey = __webpack_require__(77797); /** * Checks if `path` exists on `object`. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { path = castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } module.exports = hasPath; /***/ }), /***/ 49698: /***/ ((module) => { /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsZWJ = '\\u200d'; /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); /** * Checks if `string` contains Unicode symbols. * * @private * @param {string} string The string to inspect. * @returns {boolean} Returns `true` if a symbol is found, else `false`. */ function hasUnicode(string) { return reHasUnicode.test(string); } module.exports = hasUnicode; /***/ }), /***/ 45434: /***/ ((module) => { /** Used to detect strings that need a more robust regexp to match words. */ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; /** * Checks if `string` contains a word composed of Unicode symbols. * * @private * @param {string} string The string to inspect. * @returns {boolean} Returns `true` if a word is found, else `false`. */ function hasUnicodeWord(string) { return reHasUnicodeWord.test(string); } module.exports = hasUnicodeWord; /***/ }), /***/ 22032: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var nativeCreate = __webpack_require__(81042); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } module.exports = hashClear; /***/ }), /***/ 63862: /***/ ((module) => { /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } module.exports = hashDelete; /***/ }), /***/ 66721: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var nativeCreate = __webpack_require__(81042); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; /***/ }), /***/ 12749: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var nativeCreate = __webpack_require__(81042); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; /***/ }), /***/ 35749: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var nativeCreate = __webpack_require__(81042); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } module.exports = hashSet; /***/ }), /***/ 76189: /***/ ((module) => { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Initializes an array clone. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the initialized clone. */ function initCloneArray(array) { var length = array.length, result = new array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result; } module.exports = initCloneArray; /***/ }), /***/ 77199: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var cloneArrayBuffer = __webpack_require__(49653), cloneDataView = __webpack_require__(76169), cloneRegExp = __webpack_require__(73201), cloneSymbol = __webpack_require__(93736), cloneTypedArray = __webpack_require__(71961); /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ function initCloneByTag(object, tag, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: return cloneArrayBuffer(object); case boolTag: case dateTag: return new Ctor(+object); case dataViewTag: return cloneDataView(object, isDeep); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: return cloneTypedArray(object, isDeep); case mapTag: return new Ctor; case numberTag: case stringTag: return new Ctor(object); case regexpTag: return cloneRegExp(object); case setTag: return new Ctor; case symbolTag: return cloneSymbol(object); } } module.exports = initCloneByTag; /***/ }), /***/ 35529: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseCreate = __webpack_require__(39344), getPrototype = __webpack_require__(28879), isPrototype = __webpack_require__(55527); /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototype(object)) : {}; } module.exports = initCloneObject; /***/ }), /***/ 62060: /***/ ((module) => { /** Used to match wrap detail comments. */ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; /** * Inserts wrapper `details` in a comment at the top of the `source` body. * * @private * @param {string} source The source to modify. * @returns {Array} details The details to insert. * @returns {string} Returns the modified source. */ function insertWrapDetails(source, details) { var length = details.length; if (!length) { return source; } var lastIndex = length - 1; details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; details = details.join(length > 2 ? ', ' : ' '); return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); } module.exports = insertWrapDetails; /***/ }), /***/ 45891: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Symbol = __webpack_require__(51873), isArguments = __webpack_require__(72428), isArray = __webpack_require__(56449); /** Built-in value references. */ var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; /** * Checks if `value` is a flattenable `arguments` object or array. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } module.exports = isFlattenable; /***/ }), /***/ 30361: /***/ ((module) => { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /***/ 36800: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var eq = __webpack_require__(75288), isArrayLike = __webpack_require__(64894), isIndex = __webpack_require__(30361), isObject = __webpack_require__(23805); /** * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, * else `false`. */ function isIterateeCall(value, index, object) { if (!isObject(object)) { return false; } var type = typeof index; if (type == 'number' ? (isArrayLike(object) && isIndex(index, object.length)) : (type == 'string' && index in object) ) { return eq(object[index], value); } return false; } module.exports = isIterateeCall; /***/ }), /***/ 28586: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isArray = __webpack_require__(56449), isSymbol = __webpack_require__(44394); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /***/ 74218: /***/ ((module) => { /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } module.exports = isKeyable; /***/ }), /***/ 85087: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var LazyWrapper = __webpack_require__(30980), getData = __webpack_require__(37381), getFuncName = __webpack_require__(62284), lodash = __webpack_require__(53758); /** * Checks if `func` has a lazy counterpart. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` has a lazy counterpart, * else `false`. */ function isLaziable(func) { var funcName = getFuncName(func), other = lodash[funcName]; if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { return false; } if (func === other) { return true; } var data = getData(other); return !!data && func === data[0]; } module.exports = isLaziable; /***/ }), /***/ 87296: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var coreJsData = __webpack_require__(55481); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } module.exports = isMasked; /***/ }), /***/ 55527: /***/ ((module) => { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /***/ 30756: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isObject = __webpack_require__(23805); /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` if suitable for strict * equality comparisons, else `false`. */ function isStrictComparable(value) { return value === value && !isObject(value); } module.exports = isStrictComparable; /***/ }), /***/ 63702: /***/ ((module) => { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }), /***/ 70080: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var assocIndexOf = __webpack_require__(26025); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }), /***/ 24739: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var assocIndexOf = __webpack_require__(26025); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listCacheGet; /***/ }), /***/ 48655: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var assocIndexOf = __webpack_require__(26025); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } module.exports = listCacheHas; /***/ }), /***/ 31175: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var assocIndexOf = __webpack_require__(26025); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }), /***/ 63040: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Hash = __webpack_require__(21549), ListCache = __webpack_require__(80079), Map = __webpack_require__(68223); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear; /***/ }), /***/ 17670: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getMapData = __webpack_require__(12651); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } module.exports = mapCacheDelete; /***/ }), /***/ 90289: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getMapData = __webpack_require__(12651); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } module.exports = mapCacheGet; /***/ }), /***/ 4509: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getMapData = __webpack_require__(12651); /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } module.exports = mapCacheHas; /***/ }), /***/ 72949: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getMapData = __webpack_require__(12651); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } module.exports = mapCacheSet; /***/ }), /***/ 20317: /***/ ((module) => { /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } module.exports = mapToArray; /***/ }), /***/ 67197: /***/ ((module) => { /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || (key in Object(object))); }; } module.exports = matchesStrictComparable; /***/ }), /***/ 62224: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var memoize = __webpack_require__(50104); /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } module.exports = memoizeCapped; /***/ }), /***/ 3209: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var composeArgs = __webpack_require__(91596), composeArgsRight = __webpack_require__(53320), replaceHolders = __webpack_require__(36306); /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** * Merges the function metadata of `source` into `data`. * * Merging metadata reduces the number of wrappers used to invoke a function. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` * may be applied regardless of execution order. Methods like `_.ary` and * `_.rearg` modify function arguments, making the order in which they are * executed important, preventing the merging of metadata. However, we make * an exception for a safe combined case where curried functions have `_.ary` * and or `_.rearg` applied. * * @private * @param {Array} data The destination metadata. * @param {Array} source The source metadata. * @returns {Array} Returns `data`. */ function mergeData(data, source) { var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); var isCombo = ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); // Exit early if metadata can't be merged. if (!(isCommon || isCombo)) { return data; } // Use source `thisArg` if available. if (srcBitmask & WRAP_BIND_FLAG) { data[2] = source[2]; // Set when currying a bound function. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; } // Compose partial arguments. var value = source[3]; if (value) { var partials = data[3]; data[3] = partials ? composeArgs(partials, value, source[4]) : value; data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; } // Compose partial right arguments. value = source[5]; if (value) { partials = data[5]; data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; } // Use source `argPos` if available. value = source[7]; if (value) { data[7] = value; } // Use source `ary` if it's smaller. if (srcBitmask & WRAP_ARY_FLAG) { data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); } // Use source `arity` if one is not provided. if (data[9] == null) { data[9] = source[9]; } // Use source `func` and merge bitmasks. data[0] = source[0]; data[1] = newBitmask; return data; } module.exports = mergeData; /***/ }), /***/ 48152: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var WeakMap = __webpack_require__(28303); /** Used to store function metadata. */ var metaMap = WeakMap && new WeakMap; module.exports = metaMap; /***/ }), /***/ 81042: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getNative = __webpack_require__(56110); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /***/ 3650: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var overArg = __webpack_require__(74335); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /***/ 90181: /***/ ((module) => { /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } module.exports = nativeKeysIn; /***/ }), /***/ 86009: /***/ ((module, exports, __webpack_require__) => { /* module decorator */ module = __webpack_require__.nmd(module); var freeGlobal = __webpack_require__(34840); /** Detect free variable `exports`. */ var freeExports = true && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /***/ }), /***/ 59350: /***/ ((module) => { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /***/ 74335: /***/ ((module) => { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /***/ 56757: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var apply = __webpack_require__(91033); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * A specialized version of `baseRest` which transforms the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @param {Function} transform The rest array transform. * @returns {Function} Returns the new function. */ function overRest(func, start, transform) { start = nativeMax(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return apply(func, this, otherArgs); }; } module.exports = overRest; /***/ }), /***/ 68969: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGet = __webpack_require__(47422), baseSlice = __webpack_require__(25160); /** * Gets the parent value at `path` of `object`. * * @private * @param {Object} object The object to query. * @param {Array} path The path to get the parent value of. * @returns {*} Returns the parent value. */ function parent(object, path) { return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); } module.exports = parent; /***/ }), /***/ 84629: /***/ ((module) => { /** Used to lookup unminified function names. */ var realNames = {}; module.exports = realNames; /***/ }), /***/ 68294: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var copyArray = __webpack_require__(23007), isIndex = __webpack_require__(30361); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMin = Math.min; /** * Reorder `array` according to the specified indexes where the element at * the first index is assigned as the first element, the element at * the second index is assigned as the second element, and so on. * * @private * @param {Array} array The array to reorder. * @param {Array} indexes The arranged array indexes. * @returns {Array} Returns `array`. */ function reorder(array, indexes) { var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array); while (length--) { var index = indexes[length]; array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; } return array; } module.exports = reorder; /***/ }), /***/ 36306: /***/ ((module) => { /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; /** * Replaces all `placeholder` elements in `array` with an internal placeholder * and returns an array of their indexes. * * @private * @param {Array} array The array to modify. * @param {*} placeholder The placeholder to replace. * @returns {Array} Returns the new array of placeholder indexes. */ function replaceHolders(array, placeholder) { var index = -1, length = array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value === placeholder || value === PLACEHOLDER) { array[index] = PLACEHOLDER; result[resIndex++] = index; } } return result; } module.exports = replaceHolders; /***/ }), /***/ 9325: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var freeGlobal = __webpack_require__(34840); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /***/ 14974: /***/ ((module) => { /** * Gets the value at `key`, unless `key` is "__proto__" or "constructor". * * @private * @param {Object} object The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function safeGet(object, key) { if (key === 'constructor' && typeof object[key] === 'function') { return; } if (key == '__proto__') { return; } return object[key]; } module.exports = safeGet; /***/ }), /***/ 31380: /***/ ((module) => { /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } module.exports = setCacheAdd; /***/ }), /***/ 51459: /***/ ((module) => { /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } module.exports = setCacheHas; /***/ }), /***/ 54641: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseSetData = __webpack_require__(68882), shortOut = __webpack_require__(51811); /** * Sets metadata for `func`. * * **Note:** If this function becomes hot, i.e. is invoked a lot in a short * period of time, it will trip its breaker and transition to an identity * function to avoid garbage collection pauses in V8. See * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) * for more details. * * @private * @param {Function} func The function to associate metadata with. * @param {*} data The metadata. * @returns {Function} Returns `func`. */ var setData = shortOut(baseSetData); module.exports = setData; /***/ }), /***/ 84247: /***/ ((module) => { /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } module.exports = setToArray; /***/ }), /***/ 70799: /***/ ((module) => { /** * Converts `set` to its value-value pairs. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the value-value pairs. */ function setToPairs(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = [value, value]; }); return result; } module.exports = setToPairs; /***/ }), /***/ 32865: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseSetToString = __webpack_require__(19570), shortOut = __webpack_require__(51811); /** * Sets the `toString` method of `func` to return `string`. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var setToString = shortOut(baseSetToString); module.exports = setToString; /***/ }), /***/ 70981: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getWrapDetails = __webpack_require__(75251), insertWrapDetails = __webpack_require__(62060), setToString = __webpack_require__(32865), updateWrapDetails = __webpack_require__(75948); /** * Sets the `toString` method of `wrapper` to mimic the source of `reference` * with wrapper details in a comment at the top of the source body. * * @private * @param {Function} wrapper The function to modify. * @param {Function} reference The reference function. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Function} Returns `wrapper`. */ function setWrapToString(wrapper, reference, bitmask) { var source = (reference + ''); return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); } module.exports = setWrapToString; /***/ }), /***/ 51811: /***/ ((module) => { /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeNow = Date.now; /** * Creates a function that'll short out and invoke `identity` instead * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` * milliseconds. * * @private * @param {Function} func The function to restrict. * @returns {Function} Returns the new shortable function. */ function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined, arguments); }; } module.exports = shortOut; /***/ }), /***/ 51420: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var ListCache = __webpack_require__(80079); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /***/ 90938: /***/ ((module) => { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }), /***/ 63605: /***/ ((module) => { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }), /***/ 29817: /***/ ((module) => { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }), /***/ 80945: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var ListCache = __webpack_require__(80079), Map = __webpack_require__(68223), MapCache = __webpack_require__(53661); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } module.exports = stackSet; /***/ }), /***/ 76959: /***/ ((module) => { /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } module.exports = strictIndexOf; /***/ }), /***/ 81993: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var asciiSize = __webpack_require__(99811), hasUnicode = __webpack_require__(49698), unicodeSize = __webpack_require__(77927); /** * Gets the number of symbols in `string`. * * @private * @param {string} string The string to inspect. * @returns {number} Returns the string size. */ function stringSize(string) { return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); } module.exports = stringSize; /***/ }), /***/ 63912: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var asciiToArray = __webpack_require__(61074), hasUnicode = __webpack_require__(49698), unicodeToArray = __webpack_require__(42054); /** * Converts `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function stringToArray(string) { return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); } module.exports = stringToArray; /***/ }), /***/ 61802: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var memoizeCapped = __webpack_require__(62224); /** Used to match property names within property paths. */ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (string.charCodeAt(0) === 46 /* . */) { result.push(''); } string.replace(rePropName, function(match, number, quote, subString) { result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); module.exports = stringToPath; /***/ }), /***/ 77797: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isSymbol = __webpack_require__(44394); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /***/ 47473: /***/ ((module) => { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }), /***/ 31800: /***/ ((module) => { /** Used to match a single whitespace character. */ var reWhitespace = /\s/; /** * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace * character of `string`. * * @private * @param {string} string The string to inspect. * @returns {number} Returns the index of the last non-whitespace character. */ function trimmedEndIndex(string) { var index = string.length; while (index-- && reWhitespace.test(string.charAt(index))) {} return index; } module.exports = trimmedEndIndex; /***/ }), /***/ 19856: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var basePropertyOf = __webpack_require__(54552); /** Used to map HTML entities to characters. */ var htmlUnescapes = { '&': '&', '<': '<', '>': '>', '"': '"', ''': "'" }; /** * Used by `_.unescape` to convert HTML entities to characters. * * @private * @param {string} chr The matched character to unescape. * @returns {string} Returns the unescaped character. */ var unescapeHtmlChar = basePropertyOf(htmlUnescapes); module.exports = unescapeHtmlChar; /***/ }), /***/ 77927: /***/ ((module) => { /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsAstral = '[' + rsAstralRange + ']', rsCombo = '[' + rsComboRange + ']', rsFitz = '\\ud83c[\\udffb-\\udfff]', rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ var reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** * Gets the size of a Unicode `string`. * * @private * @param {string} string The string inspect. * @returns {number} Returns the string size. */ function unicodeSize(string) { var result = reUnicode.lastIndex = 0; while (reUnicode.test(string)) { ++result; } return result; } module.exports = unicodeSize; /***/ }), /***/ 42054: /***/ ((module) => { /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsAstral = '[' + rsAstralRange + ']', rsCombo = '[' + rsComboRange + ']', rsFitz = '\\ud83c[\\udffb-\\udfff]', rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ var reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** * Converts a Unicode `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function unicodeToArray(string) { return string.match(reUnicode) || []; } module.exports = unicodeToArray; /***/ }), /***/ 22225: /***/ ((module) => { /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = '\\u2700-\\u27bf', rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', rsPunctuationRange = '\\u2000-\\u206f', rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', rsVarRange = '\\ufe0e\\ufe0f', rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; /** Used to compose unicode capture groups. */ var rsApos = "['\u2019]", rsBreak = '[' + rsBreakRange + ']', rsCombo = '[' + rsComboRange + ']', rsDigits = '\\d+', rsDingbat = '[' + rsDingbatRange + ']', rsLower = '[' + rsLowerRange + ']', rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', rsFitz = '\\ud83c[\\udffb-\\udfff]', rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', rsUpper = '[' + rsUpperRange + ']', rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; /** Used to match complex or compound words. */ var reUnicodeWord = RegExp([ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, rsUpper + '+' + rsOptContrUpper, rsOrdUpper, rsOrdLower, rsDigits, rsEmoji ].join('|'), 'g'); /** * Splits a Unicode `string` into an array of its words. * * @private * @param {string} The string to inspect. * @returns {Array} Returns the words of `string`. */ function unicodeWords(string) { return string.match(reUnicodeWord) || []; } module.exports = unicodeWords; /***/ }), /***/ 75948: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayEach = __webpack_require__(83729), arrayIncludes = __webpack_require__(15325); /** Used to compose bitmasks for function metadata. */ var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512; /** Used to associate wrap methods with their bit flags. */ var wrapFlags = [ ['ary', WRAP_ARY_FLAG], ['bind', WRAP_BIND_FLAG], ['bindKey', WRAP_BIND_KEY_FLAG], ['curry', WRAP_CURRY_FLAG], ['curryRight', WRAP_CURRY_RIGHT_FLAG], ['flip', WRAP_FLIP_FLAG], ['partial', WRAP_PARTIAL_FLAG], ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], ['rearg', WRAP_REARG_FLAG] ]; /** * Updates wrapper `details` based on `bitmask` flags. * * @private * @returns {Array} details The details to modify. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Array} Returns `details`. */ function updateWrapDetails(details, bitmask) { arrayEach(wrapFlags, function(pair) { var value = '_.' + pair[0]; if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { details.push(value); } }); return details.sort(); } module.exports = updateWrapDetails; /***/ }), /***/ 80257: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var LazyWrapper = __webpack_require__(30980), LodashWrapper = __webpack_require__(56017), copyArray = __webpack_require__(23007); /** * Creates a clone of `wrapper`. * * @private * @param {Object} wrapper The wrapper to clone. * @returns {Object} Returns the cloned wrapper. */ function wrapperClone(wrapper) { if (wrapper instanceof LazyWrapper) { return wrapper.clone(); } var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); result.__actions__ = copyArray(wrapper.__actions__); result.__index__ = wrapper.__index__; result.__values__ = wrapper.__values__; return result; } module.exports = wrapperClone; /***/ }), /***/ 64626: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var createWrap = __webpack_require__(66977); /** Used to compose bitmasks for function metadata. */ var WRAP_ARY_FLAG = 128; /** * Creates a function that invokes `func`, with up to `n` arguments, * ignoring any additional arguments. * * @static * @memberOf _ * @since 3.0.0 * @category Function * @param {Function} func The function to cap arguments for. * @param {number} [n=func.length] The arity cap. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.ary(parseInt, 1)); * // => [6, 8, 10] */ function ary(func, n, guard) { n = guard ? undefined : n; n = (func && n == null) ? func.length : n; return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); } module.exports = ary; /***/ }), /***/ 86139: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var assignValue = __webpack_require__(16547), copyObject = __webpack_require__(21791), createAssigner = __webpack_require__(20999), isArrayLike = __webpack_require__(64894), isPrototype = __webpack_require__(55527), keys = __webpack_require__(95950); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns own enumerable string keyed properties of source objects to the * destination object. Source objects are applied from left to right. * Subsequent sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object` and is loosely based on * [`Object.assign`](https://mdn.io/Object/assign). * * @static * @memberOf _ * @since 0.10.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @see _.assignIn * @example * * function Foo() { * this.a = 1; * } * * function Bar() { * this.c = 3; * } * * Foo.prototype.b = 2; * Bar.prototype.d = 4; * * _.assign({ 'a': 0 }, new Foo, new Bar); * // => { 'a': 1, 'c': 3 } */ var assign = createAssigner(function(object, source) { if (isPrototype(source) || isArrayLike(source)) { copyObject(source, keys(source), object); return; } for (var key in source) { if (hasOwnProperty.call(source, key)) { assignValue(object, key, source[key]); } } }); module.exports = assign; /***/ }), /***/ 84058: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var capitalize = __webpack_require__(14792), createCompounder = __webpack_require__(45539); /** * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the camel cased string. * @example * * _.camelCase('Foo Bar'); * // => 'fooBar' * * _.camelCase('--foo-bar--'); * // => 'fooBar' * * _.camelCase('__FOO_BAR__'); * // => 'fooBar' */ var camelCase = createCompounder(function(result, word, index) { word = word.toLowerCase(); return result + (index ? capitalize(word) : word); }); module.exports = camelCase; /***/ }), /***/ 14792: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var toString = __webpack_require__(13222), upperFirst = __webpack_require__(55808); /** * Converts the first character of `string` to upper case and the remaining * to lower case. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to capitalize. * @returns {string} Returns the capitalized string. * @example * * _.capitalize('FRED'); * // => 'Fred' */ function capitalize(string) { return upperFirst(toString(string).toLowerCase()); } module.exports = capitalize; /***/ }), /***/ 32629: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseClone = __webpack_require__(9999); /** Used to compose bitmasks for cloning. */ var CLONE_SYMBOLS_FLAG = 4; /** * Creates a shallow clone of `value`. * * **Note:** This method is loosely based on the * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) * and supports cloning arrays, array buffers, booleans, date objects, maps, * numbers, `Object` objects, regexes, sets, strings, symbols, and typed * arrays. The own enumerable properties of `arguments` objects are cloned * as plain objects. An empty object is returned for uncloneable values such * as error objects, functions, DOM nodes, and WeakMaps. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to clone. * @returns {*} Returns the cloned value. * @see _.cloneDeep * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; * * var shallow = _.clone(objects); * console.log(shallow[0] === objects[0]); * // => true */ function clone(value) { return baseClone(value, CLONE_SYMBOLS_FLAG); } module.exports = clone; /***/ }), /***/ 88055: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseClone = __webpack_require__(9999); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4; /** * This method is like `_.clone` except that it recursively clones `value`. * * @static * @memberOf _ * @since 1.0.0 * @category Lang * @param {*} value The value to recursively clone. * @returns {*} Returns the deep cloned value. * @see _.clone * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; * * var deep = _.cloneDeep(objects); * console.log(deep[0] === objects[0]); * // => false */ function cloneDeep(value) { return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } module.exports = cloneDeep; /***/ }), /***/ 37334: /***/ ((module) => { /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } module.exports = constant; /***/ }), /***/ 49747: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var createWrap = __webpack_require__(66977); /** Used to compose bitmasks for function metadata. */ var WRAP_CURRY_FLAG = 8; /** * Creates a function that accepts arguments of `func` and either invokes * `func` returning its result, if at least `arity` number of arguments have * been provided, or returns a function that accepts the remaining `func` * arguments, and so on. The arity of `func` may be specified if `func.length` * is not sufficient. * * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for provided arguments. * * **Note:** This method doesn't set the "length" property of curried functions. * * @static * @memberOf _ * @since 2.0.0 * @category Function * @param {Function} func The function to curry. * @param {number} [arity=func.length] The arity of `func`. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Function} Returns the new curried function. * @example * * var abc = function(a, b, c) { * return [a, b, c]; * }; * * var curried = _.curry(abc); * * curried(1)(2)(3); * // => [1, 2, 3] * * curried(1, 2)(3); * // => [1, 2, 3] * * curried(1, 2, 3); * // => [1, 2, 3] * * // Curried with placeholders. * curried(1)(_, 3)(2); * // => [1, 2, 3] */ function curry(func, arity, guard) { arity = guard ? undefined : arity; var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curry.placeholder; return result; } // Assign default placeholders. curry.placeholder = {}; module.exports = curry; /***/ }), /***/ 38221: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isObject = __webpack_require__(23805), now = __webpack_require__(10124), toNumber = __webpack_require__(99374); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max, nativeMin = Math.min; /** * Creates a debounced function that delays invoking `func` until after `wait` * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. * Provide `options` to indicate whether `func` should be invoked on the * leading and/or trailing edge of the `wait` timeout. The `func` is invoked * with the last arguments provided to the debounced function. Subsequent * calls to the debounced function return the result of the last `func` * invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is * invoked on the trailing edge of the timeout only if the debounced function * is invoked more than once during the `wait` timeout. * * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to debounce. * @param {number} [wait=0] The number of milliseconds to delay. * @param {Object} [options={}] The options object. * @param {boolean} [options.leading=false] * Specify invoking on the leading edge of the timeout. * @param {number} [options.maxWait] * The maximum time `func` is allowed to be delayed before it's invoked. * @param {boolean} [options.trailing=true] * Specify invoking on the trailing edge of the timeout. * @returns {Function} Returns the new debounced function. * @example * * // Avoid costly calculations while the window size is in flux. * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); * * // Invoke `sendMail` when clicked, debouncing subsequent calls. * jQuery(element).on('click', _.debounce(sendMail, 300, { * 'leading': true, * 'trailing': false * })); * * // Ensure `batchLog` is invoked once after 1 second of debounced calls. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); * var source = new EventSource('/stream'); * jQuery(source).on('message', debounced); * * // Cancel the trailing debounced invocation. * jQuery(window).on('popstate', debounced.cancel); */ function debounce(func, wait, options) { var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } wait = toNumber(wait) || 0; if (isObject(options)) { leading = !!options.leading; maxing = 'maxWait' in options; maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; trailing = 'trailing' in options ? !!options.trailing : trailing; } function invokeFunc(time) { var args = lastArgs, thisArg = lastThis; lastArgs = lastThis = undefined; lastInvokeTime = time; result = func.apply(thisArg, args); return result; } function leadingEdge(time) { // Reset any `maxWait` timer. lastInvokeTime = time; // Start the timer for the trailing edge. timerId = setTimeout(timerExpired, wait); // Invoke the leading edge. return leading ? invokeFunc(time) : result; } function remainingWait(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; } function shouldInvoke(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at the // trailing edge, the system time has gone backwards and we're treating // it as the trailing edge, or we've hit the `maxWait` limit. return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } function timerExpired() { var time = now(); if (shouldInvoke(time)) { return trailingEdge(time); } // Restart the timer. timerId = setTimeout(timerExpired, remainingWait(time)); } function trailingEdge(time) { timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been // debounced at least once. if (trailing && lastArgs) { return invokeFunc(time); } lastArgs = lastThis = undefined; return result; } function cancel() { if (timerId !== undefined) { clearTimeout(timerId); } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = undefined; } function flush() { return timerId === undefined ? result : trailingEdge(now()); } function debounced() { var time = now(), isInvoking = shouldInvoke(time); lastArgs = arguments; lastThis = this; lastCallTime = time; if (isInvoking) { if (timerId === undefined) { return leadingEdge(lastCallTime); } if (maxing) { // Handle invocations in a tight loop. clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } } if (timerId === undefined) { timerId = setTimeout(timerExpired, wait); } return result; } debounced.cancel = cancel; debounced.flush = flush; return debounced; } module.exports = debounce; /***/ }), /***/ 50828: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var deburrLetter = __webpack_require__(24647), toString = __webpack_require__(13222); /** Used to match Latin Unicode letters (excluding mathematical operators). */ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; /** Used to compose unicode character classes. */ var rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; /** Used to compose unicode capture groups. */ var rsCombo = '[' + rsComboRange + ']'; /** * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). */ var reComboMark = RegExp(rsCombo, 'g'); /** * Deburrs `string` by converting * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) * letters to basic Latin letters and removing * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to deburr. * @returns {string} Returns the deburred string. * @example * * _.deburr('déjà vu'); * // => 'deja vu' */ function deburr(string) { string = toString(string); return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); } module.exports = deburr; /***/ }), /***/ 75288: /***/ ((module) => { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /***/ 20681: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var createFind = __webpack_require__(62006), findLastIndex = __webpack_require__(94469); /** * This method is like `_.find` except that it iterates over elements of * `collection` from right to left. * * @static * @memberOf _ * @since 2.0.0 * @category Collection * @param {Array|Object} collection The collection to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=collection.length-1] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * * _.findLast([1, 2, 3, 4], function(n) { * return n % 2 == 1; * }); * // => 3 */ var findLast = createFind(findLastIndex); module.exports = findLast; /***/ }), /***/ 94469: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseFindIndex = __webpack_require__(2523), baseIteratee = __webpack_require__(15389), toInteger = __webpack_require__(61489); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max, nativeMin = Math.min; /** * This method is like `_.findIndex` except that it iterates over elements * of `collection` from right to left. * * @static * @memberOf _ * @since 2.0.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * * var users = [ * { 'user': 'barney', 'active': true }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': false } * ]; * * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); * // => 2 * * // The `_.matches` iteratee shorthand. * _.findLastIndex(users, { 'user': 'barney', 'active': true }); * // => 0 * * // The `_.matchesProperty` iteratee shorthand. * _.findLastIndex(users, ['active', false]); * // => 2 * * // The `_.property` iteratee shorthand. * _.findLastIndex(users, 'active'); * // => 0 */ function findLastIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = length - 1; if (fromIndex !== undefined) { index = toInteger(fromIndex); index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); } return baseFindIndex(array, baseIteratee(predicate, 3), index, true); } module.exports = findLastIndex; /***/ }), /***/ 35970: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseFlatten = __webpack_require__(83120); /** * Flattens `array` a single level deep. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to flatten. * @returns {Array} Returns the new flattened array. * @example * * _.flatten([1, [2, [3, [4]], 5]]); * // => [1, 2, [3, [4]], 5] */ function flatten(array) { var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } module.exports = flatten; /***/ }), /***/ 49870: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var createFlow = __webpack_require__(66929); /** * Creates a function that returns the result of invoking the given functions * with the `this` binding of the created function, where each successive * invocation is supplied the return value of the previous. * * @static * @memberOf _ * @since 3.0.0 * @category Util * @param {...(Function|Function[])} [funcs] The functions to invoke. * @returns {Function} Returns the new composite function. * @see _.flowRight * @example * * function square(n) { * return n * n; * } * * var addSquare = _.flow([_.add, square]); * addSquare(1, 2); * // => 9 */ var flow = createFlow(); module.exports = flow; /***/ }), /***/ 73424: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var mapping = __webpack_require__(16962), fallbackHolder = __webpack_require__(2874); /** Built-in value reference. */ var push = Array.prototype.push; /** * Creates a function, with an arity of `n`, that invokes `func` with the * arguments it receives. * * @private * @param {Function} func The function to wrap. * @param {number} n The arity of the new function. * @returns {Function} Returns the new function. */ function baseArity(func, n) { return n == 2 ? function(a, b) { return func.apply(undefined, arguments); } : function(a) { return func.apply(undefined, arguments); }; } /** * Creates a function that invokes `func`, with up to `n` arguments, ignoring * any additional arguments. * * @private * @param {Function} func The function to cap arguments for. * @param {number} n The arity cap. * @returns {Function} Returns the new function. */ function baseAry(func, n) { return n == 2 ? function(a, b) { return func(a, b); } : function(a) { return func(a); }; } /** * Creates a clone of `array`. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the cloned array. */ function cloneArray(array) { var length = array ? array.length : 0, result = Array(length); while (length--) { result[length] = array[length]; } return result; } /** * Creates a function that clones a given object using the assignment `func`. * * @private * @param {Function} func The assignment function. * @returns {Function} Returns the new cloner function. */ function createCloner(func) { return function(object) { return func({}, object); }; } /** * A specialized version of `_.spread` which flattens the spread array into * the arguments of the invoked `func`. * * @private * @param {Function} func The function to spread arguments over. * @param {number} start The start position of the spread. * @returns {Function} Returns the new function. */ function flatSpread(func, start) { return function() { var length = arguments.length, lastIndex = length - 1, args = Array(length); while (length--) { args[length] = arguments[length]; } var array = args[start], otherArgs = args.slice(0, start); if (array) { push.apply(otherArgs, array); } if (start != lastIndex) { push.apply(otherArgs, args.slice(start + 1)); } return func.apply(this, otherArgs); }; } /** * Creates a function that wraps `func` and uses `cloner` to clone the first * argument it receives. * * @private * @param {Function} func The function to wrap. * @param {Function} cloner The function to clone arguments. * @returns {Function} Returns the new immutable function. */ function wrapImmutable(func, cloner) { return function() { var length = arguments.length; if (!length) { return; } var args = Array(length); while (length--) { args[length] = arguments[length]; } var result = args[0] = cloner.apply(undefined, args); func.apply(undefined, args); return result; }; } /** * The base implementation of `convert` which accepts a `util` object of methods * required to perform conversions. * * @param {Object} util The util object. * @param {string} name The name of the function to convert. * @param {Function} func The function to convert. * @param {Object} [options] The options object. * @param {boolean} [options.cap=true] Specify capping iteratee arguments. * @param {boolean} [options.curry=true] Specify currying. * @param {boolean} [options.fixed=true] Specify fixed arity. * @param {boolean} [options.immutable=true] Specify immutable operations. * @param {boolean} [options.rearg=true] Specify rearranging arguments. * @returns {Function|Object} Returns the converted function or object. */ function baseConvert(util, name, func, options) { var isLib = typeof name == 'function', isObj = name === Object(name); if (isObj) { options = func; func = name; name = undefined; } if (func == null) { throw new TypeError; } options || (options = {}); var config = { 'cap': 'cap' in options ? options.cap : true, 'curry': 'curry' in options ? options.curry : true, 'fixed': 'fixed' in options ? options.fixed : true, 'immutable': 'immutable' in options ? options.immutable : true, 'rearg': 'rearg' in options ? options.rearg : true }; var defaultHolder = isLib ? func : fallbackHolder, forceCurry = ('curry' in options) && options.curry, forceFixed = ('fixed' in options) && options.fixed, forceRearg = ('rearg' in options) && options.rearg, pristine = isLib ? func.runInContext() : undefined; var helpers = isLib ? func : { 'ary': util.ary, 'assign': util.assign, 'clone': util.clone, 'curry': util.curry, 'forEach': util.forEach, 'isArray': util.isArray, 'isError': util.isError, 'isFunction': util.isFunction, 'isWeakMap': util.isWeakMap, 'iteratee': util.iteratee, 'keys': util.keys, 'rearg': util.rearg, 'toInteger': util.toInteger, 'toPath': util.toPath }; var ary = helpers.ary, assign = helpers.assign, clone = helpers.clone, curry = helpers.curry, each = helpers.forEach, isArray = helpers.isArray, isError = helpers.isError, isFunction = helpers.isFunction, isWeakMap = helpers.isWeakMap, keys = helpers.keys, rearg = helpers.rearg, toInteger = helpers.toInteger, toPath = helpers.toPath; var aryMethodKeys = keys(mapping.aryMethod); var wrappers = { 'castArray': function(castArray) { return function() { var value = arguments[0]; return isArray(value) ? castArray(cloneArray(value)) : castArray.apply(undefined, arguments); }; }, 'iteratee': function(iteratee) { return function() { var func = arguments[0], arity = arguments[1], result = iteratee(func, arity), length = result.length; if (config.cap && typeof arity == 'number') { arity = arity > 2 ? (arity - 2) : 1; return (length && length <= arity) ? result : baseAry(result, arity); } return result; }; }, 'mixin': function(mixin) { return function(source) { var func = this; if (!isFunction(func)) { return mixin(func, Object(source)); } var pairs = []; each(keys(source), function(key) { if (isFunction(source[key])) { pairs.push([key, func.prototype[key]]); } }); mixin(func, Object(source)); each(pairs, function(pair) { var value = pair[1]; if (isFunction(value)) { func.prototype[pair[0]] = value; } else { delete func.prototype[pair[0]]; } }); return func; }; }, 'nthArg': function(nthArg) { return function(n) { var arity = n < 0 ? 1 : (toInteger(n) + 1); return curry(nthArg(n), arity); }; }, 'rearg': function(rearg) { return function(func, indexes) { var arity = indexes ? indexes.length : 0; return curry(rearg(func, indexes), arity); }; }, 'runInContext': function(runInContext) { return function(context) { return baseConvert(util, runInContext(context), options); }; } }; /*--------------------------------------------------------------------------*/ /** * Casts `func` to a function with an arity capped iteratee if needed. * * @private * @param {string} name The name of the function to inspect. * @param {Function} func The function to inspect. * @returns {Function} Returns the cast function. */ function castCap(name, func) { if (config.cap) { var indexes = mapping.iterateeRearg[name]; if (indexes) { return iterateeRearg(func, indexes); } var n = !isLib && mapping.iterateeAry[name]; if (n) { return iterateeAry(func, n); } } return func; } /** * Casts `func` to a curried function if needed. * * @private * @param {string} name The name of the function to inspect. * @param {Function} func The function to inspect. * @param {number} n The arity of `func`. * @returns {Function} Returns the cast function. */ function castCurry(name, func, n) { return (forceCurry || (config.curry && n > 1)) ? curry(func, n) : func; } /** * Casts `func` to a fixed arity function if needed. * * @private * @param {string} name The name of the function to inspect. * @param {Function} func The function to inspect. * @param {number} n The arity cap. * @returns {Function} Returns the cast function. */ function castFixed(name, func, n) { if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { var data = mapping.methodSpread[name], start = data && data.start; return start === undefined ? ary(func, n) : flatSpread(func, start); } return func; } /** * Casts `func` to an rearged function if needed. * * @private * @param {string} name The name of the function to inspect. * @param {Function} func The function to inspect. * @param {number} n The arity of `func`. * @returns {Function} Returns the cast function. */ function castRearg(name, func, n) { return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name])) ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) : func; } /** * Creates a clone of `object` by `path`. * * @private * @param {Object} object The object to clone. * @param {Array|string} path The path to clone by. * @returns {Object} Returns the cloned object. */ function cloneByPath(object, path) { path = toPath(path); var index = -1, length = path.length, lastIndex = length - 1, result = clone(Object(object)), nested = result; while (nested != null && ++index < length) { var key = path[index], value = nested[key]; if (value != null && !(isFunction(value) || isError(value) || isWeakMap(value))) { nested[key] = clone(index == lastIndex ? value : Object(value)); } nested = nested[key]; } return result; } /** * Converts `lodash` to an immutable auto-curried iteratee-first data-last * version with conversion `options` applied. * * @param {Object} [options] The options object. See `baseConvert` for more details. * @returns {Function} Returns the converted `lodash`. */ function convertLib(options) { return _.runInContext.convert(options)(undefined); } /** * Create a converter function for `func` of `name`. * * @param {string} name The name of the function to convert. * @param {Function} func The function to convert. * @returns {Function} Returns the new converter function. */ function createConverter(name, func) { var realName = mapping.aliasToReal[name] || name, methodName = mapping.remap[realName] || realName, oldOptions = options; return function(options) { var newUtil = isLib ? pristine : helpers, newFunc = isLib ? pristine[methodName] : func, newOptions = assign(assign({}, oldOptions), options); return baseConvert(newUtil, realName, newFunc, newOptions); }; } /** * Creates a function that wraps `func` to invoke its iteratee, with up to `n` * arguments, ignoring any additional arguments. * * @private * @param {Function} func The function to cap iteratee arguments for. * @param {number} n The arity cap. * @returns {Function} Returns the new function. */ function iterateeAry(func, n) { return overArg(func, function(func) { return typeof func == 'function' ? baseAry(func, n) : func; }); } /** * Creates a function that wraps `func` to invoke its iteratee with arguments * arranged according to the specified `indexes` where the argument value at * the first index is provided as the first argument, the argument value at * the second index is provided as the second argument, and so on. * * @private * @param {Function} func The function to rearrange iteratee arguments for. * @param {number[]} indexes The arranged argument indexes. * @returns {Function} Returns the new function. */ function iterateeRearg(func, indexes) { return overArg(func, function(func) { var n = indexes.length; return baseArity(rearg(baseAry(func, n), indexes), n); }); } /** * Creates a function that invokes `func` with its first 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() { var length = arguments.length; if (!length) { return func(); } var args = Array(length); while (length--) { args[length] = arguments[length]; } var index = config.rearg ? 0 : (length - 1); args[index] = transform(args[index]); return func.apply(undefined, args); }; } /** * Creates a function that wraps `func` and applys the conversions * rules by `name`. * * @private * @param {string} name The name of the function to wrap. * @param {Function} func The function to wrap. * @returns {Function} Returns the converted function. */ function wrap(name, func, placeholder) { var result, realName = mapping.aliasToReal[name] || name, wrapped = func, wrapper = wrappers[realName]; if (wrapper) { wrapped = wrapper(func); } else if (config.immutable) { if (mapping.mutate.array[realName]) { wrapped = wrapImmutable(func, cloneArray); } else if (mapping.mutate.object[realName]) { wrapped = wrapImmutable(func, createCloner(func)); } else if (mapping.mutate.set[realName]) { wrapped = wrapImmutable(func, cloneByPath); } } each(aryMethodKeys, function(aryKey) { each(mapping.aryMethod[aryKey], function(otherName) { if (realName == otherName) { var data = mapping.methodSpread[realName], afterRearg = data && data.afterRearg; result = afterRearg ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); result = castCap(realName, result); result = castCurry(realName, result, aryKey); return false; } }); return !result; }); result || (result = wrapped); if (result == func) { result = forceCurry ? curry(result, 1) : function() { return func.apply(this, arguments); }; } result.convert = createConverter(realName, func); result.placeholder = func.placeholder = placeholder; return result; } /*--------------------------------------------------------------------------*/ if (!isObj) { return wrap(name, func, defaultHolder); } var _ = func; // Convert methods by ary cap. var pairs = []; each(aryMethodKeys, function(aryKey) { each(mapping.aryMethod[aryKey], function(key) { var func = _[mapping.remap[key] || key]; if (func) { pairs.push([key, wrap(key, func, _)]); } }); }); // Convert remaining methods. each(keys(_), function(key) { var func = _[key]; if (typeof func == 'function') { var length = pairs.length; while (length--) { if (pairs[length][0] == key) { return; } } func.convert = createConverter(key, func); pairs.push([key, func]); } }); // Assign to `_` leaving `_.prototype` unchanged to allow chaining. each(pairs, function(pair) { _[pair[0]] = pair[1]; }); _.convert = convertLib; _.placeholder = _; // Assign aliases. each(keys(_), function(key) { each(mapping.realToAlias[key] || [], function(alias) { _[alias] = _[key]; }); }); return _; } module.exports = baseConvert; /***/ }), /***/ 16962: /***/ ((__unused_webpack_module, exports) => { /** Used to map aliases to their real names. */ exports.aliasToReal = { // Lodash aliases. 'each': 'forEach', 'eachRight': 'forEachRight', 'entries': 'toPairs', 'entriesIn': 'toPairsIn', 'extend': 'assignIn', 'extendAll': 'assignInAll', 'extendAllWith': 'assignInAllWith', 'extendWith': 'assignInWith', 'first': 'head', // Methods that are curried variants of others. 'conforms': 'conformsTo', 'matches': 'isMatch', 'property': 'get', // Ramda aliases. '__': 'placeholder', 'F': 'stubFalse', 'T': 'stubTrue', 'all': 'every', 'allPass': 'overEvery', 'always': 'constant', 'any': 'some', 'anyPass': 'overSome', 'apply': 'spread', 'assoc': 'set', 'assocPath': 'set', 'complement': 'negate', 'compose': 'flowRight', 'contains': 'includes', 'dissoc': 'unset', 'dissocPath': 'unset', 'dropLast': 'dropRight', 'dropLastWhile': 'dropRightWhile', 'equals': 'isEqual', 'identical': 'eq', 'indexBy': 'keyBy', 'init': 'initial', 'invertObj': 'invert', 'juxt': 'over', 'omitAll': 'omit', 'nAry': 'ary', 'path': 'get', 'pathEq': 'matchesProperty', 'pathOr': 'getOr', 'paths': 'at', 'pickAll': 'pick', 'pipe': 'flow', 'pluck': 'map', 'prop': 'get', 'propEq': 'matchesProperty', 'propOr': 'getOr', 'props': 'at', 'symmetricDifference': 'xor', 'symmetricDifferenceBy': 'xorBy', 'symmetricDifferenceWith': 'xorWith', 'takeLast': 'takeRight', 'takeLastWhile': 'takeRightWhile', 'unapply': 'rest', 'unnest': 'flatten', 'useWith': 'overArgs', 'where': 'conformsTo', 'whereEq': 'isMatch', 'zipObj': 'zipObject' }; /** Used to map ary to method names. */ exports.aryMethod = { '1': [ 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse', 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words', 'zipAll' ], '2': [ 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', 'zipObjectDeep' ], '3': [ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith' ], '4': [ 'fill', 'setWith', 'updateWith' ] }; /** Used to map ary to rearg configs. */ exports.aryRearg = { '2': [1, 0], '3': [2, 0, 1], '4': [3, 2, 0, 1] }; /** Used to map method names to their iteratee ary. */ exports.iterateeAry = { 'dropRightWhile': 1, 'dropWhile': 1, 'every': 1, 'filter': 1, 'find': 1, 'findFrom': 1, 'findIndex': 1, 'findIndexFrom': 1, 'findKey': 1, 'findLast': 1, 'findLastFrom': 1, 'findLastIndex': 1, 'findLastIndexFrom': 1, 'findLastKey': 1, 'flatMap': 1, 'flatMapDeep': 1, 'flatMapDepth': 1, 'forEach': 1, 'forEachRight': 1, 'forIn': 1, 'forInRight': 1, 'forOwn': 1, 'forOwnRight': 1, 'map': 1, 'mapKeys': 1, 'mapValues': 1, 'partition': 1, 'reduce': 2, 'reduceRight': 2, 'reject': 1, 'remove': 1, 'some': 1, 'takeRightWhile': 1, 'takeWhile': 1, 'times': 1, 'transform': 2 }; /** Used to map method names to iteratee rearg configs. */ exports.iterateeRearg = { 'mapKeys': [1], 'reduceRight': [1, 0] }; /** Used to map method names to rearg configs. */ exports.methodRearg = { 'assignInAllWith': [1, 0], 'assignInWith': [1, 2, 0], 'assignAllWith': [1, 0], 'assignWith': [1, 2, 0], 'differenceBy': [1, 2, 0], 'differenceWith': [1, 2, 0], 'getOr': [2, 1, 0], 'intersectionBy': [1, 2, 0], 'intersectionWith': [1, 2, 0], 'isEqualWith': [1, 2, 0], 'isMatchWith': [2, 1, 0], 'mergeAllWith': [1, 0], 'mergeWith': [1, 2, 0], 'padChars': [2, 1, 0], 'padCharsEnd': [2, 1, 0], 'padCharsStart': [2, 1, 0], 'pullAllBy': [2, 1, 0], 'pullAllWith': [2, 1, 0], 'rangeStep': [1, 2, 0], 'rangeStepRight': [1, 2, 0], 'setWith': [3, 1, 2, 0], 'sortedIndexBy': [2, 1, 0], 'sortedLastIndexBy': [2, 1, 0], 'unionBy': [1, 2, 0], 'unionWith': [1, 2, 0], 'updateWith': [3, 1, 2, 0], 'xorBy': [1, 2, 0], 'xorWith': [1, 2, 0], 'zipWith': [1, 2, 0] }; /** Used to map method names to spread configs. */ exports.methodSpread = { 'assignAll': { 'start': 0 }, 'assignAllWith': { 'start': 0 }, 'assignInAll': { 'start': 0 }, 'assignInAllWith': { 'start': 0 }, 'defaultsAll': { 'start': 0 }, 'defaultsDeepAll': { 'start': 0 }, 'invokeArgs': { 'start': 2 }, 'invokeArgsMap': { 'start': 2 }, 'mergeAll': { 'start': 0 }, 'mergeAllWith': { 'start': 0 }, 'partial': { 'start': 1 }, 'partialRight': { 'start': 1 }, 'without': { 'start': 1 }, 'zipAll': { 'start': 0 } }; /** Used to identify methods which mutate arrays or objects. */ exports.mutate = { 'array': { 'fill': true, 'pull': true, 'pullAll': true, 'pullAllBy': true, 'pullAllWith': true, 'pullAt': true, 'remove': true, 'reverse': true }, 'object': { 'assign': true, 'assignAll': true, 'assignAllWith': true, 'assignIn': true, 'assignInAll': true, 'assignInAllWith': true, 'assignInWith': true, 'assignWith': true, 'defaults': true, 'defaultsAll': true, 'defaultsDeep': true, 'defaultsDeepAll': true, 'merge': true, 'mergeAll': true, 'mergeAllWith': true, 'mergeWith': true, }, 'set': { 'set': true, 'setWith': true, 'unset': true, 'update': true, 'updateWith': true } }; /** Used to map real names to their aliases. */ exports.realToAlias = (function() { var hasOwnProperty = Object.prototype.hasOwnProperty, object = exports.aliasToReal, result = {}; for (var key in object) { var value = object[key]; if (hasOwnProperty.call(result, value)) { result[value].push(key); } else { result[value] = [key]; } } return result; }()); /** Used to map method names to other names. */ exports.remap = { 'assignAll': 'assign', 'assignAllWith': 'assignWith', 'assignInAll': 'assignIn', 'assignInAllWith': 'assignInWith', 'curryN': 'curry', 'curryRightN': 'curryRight', 'defaultsAll': 'defaults', 'defaultsDeepAll': 'defaultsDeep', 'findFrom': 'find', 'findIndexFrom': 'findIndex', 'findLastFrom': 'findLast', 'findLastIndexFrom': 'findLastIndex', 'getOr': 'get', 'includesFrom': 'includes', 'indexOfFrom': 'indexOf', 'invokeArgs': 'invoke', 'invokeArgsMap': 'invokeMap', 'lastIndexOfFrom': 'lastIndexOf', 'mergeAll': 'merge', 'mergeAllWith': 'mergeWith', 'padChars': 'pad', 'padCharsEnd': 'padEnd', 'padCharsStart': 'padStart', 'propertyOf': 'get', 'rangeStep': 'range', 'rangeStepRight': 'rangeRight', 'restFrom': 'rest', 'spreadFrom': 'spread', 'trimChars': 'trim', 'trimCharsEnd': 'trimEnd', 'trimCharsStart': 'trimStart', 'zipAll': 'zip' }; /** Used to track methods that skip fixing their arity. */ exports.skipFixed = { 'castArray': true, 'flow': true, 'flowRight': true, 'iteratee': true, 'mixin': true, 'rearg': true, 'runInContext': true }; /** Used to track methods that skip rearranging arguments. */ exports.skipRearg = { 'add': true, 'assign': true, 'assignIn': true, 'bind': true, 'bindKey': true, 'concat': true, 'difference': true, 'divide': true, 'eq': true, 'gt': true, 'gte': true, 'isEqual': true, 'lt': true, 'lte': true, 'matchesProperty': true, 'merge': true, 'multiply': true, 'overArgs': true, 'partial': true, 'partialRight': true, 'propertyOf': true, 'random': true, 'range': true, 'rangeRight': true, 'subtract': true, 'zip': true, 'zipObject': true, 'zipObjectDeep': true }; /***/ }), /***/ 47934: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = { 'ary': __webpack_require__(64626), 'assign': __webpack_require__(74733), 'clone': __webpack_require__(32629), 'curry': __webpack_require__(49747), 'forEach': __webpack_require__(83729), 'isArray': __webpack_require__(56449), 'isError': __webpack_require__(23546), 'isFunction': __webpack_require__(1882), 'isWeakMap': __webpack_require__(47886), 'iteratee': __webpack_require__(33855), 'keys': __webpack_require__(88984), 'rearg': __webpack_require__(84195), 'toInteger': __webpack_require__(61489), 'toPath': __webpack_require__(42072) }; /***/ }), /***/ 79920: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseConvert = __webpack_require__(73424), util = __webpack_require__(47934); /** * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last * version with conversion `options` applied. If `name` is an object its methods * will be converted. * * @param {string} name The name of the function to wrap. * @param {Function} [func] The function to wrap. * @param {Object} [options] The options object. See `baseConvert` for more details. * @returns {Function|Object} Returns the converted function or object. */ function convert(name, func, options) { return baseConvert(util, name, func, options); } module.exports = convert; /***/ }), /***/ 72115: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var convert = __webpack_require__(79920), func = convert('isEqual', __webpack_require__(2404)); func.placeholder = __webpack_require__(2874); module.exports = func; /***/ }), /***/ 2874: /***/ ((module) => { /** * The default argument placeholder value for methods. * * @type {Object} */ module.exports = {}; /***/ }), /***/ 44377: /***/ ((module) => { /** * The inverse of `_.toPairs`; this method returns an object composed * from key-value `pairs`. * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} pairs The key-value pairs. * @returns {Object} Returns the new object. * @example * * _.fromPairs([['a', 1], ['b', 2]]); * // => { 'a': 1, 'b': 2 } */ function fromPairs(pairs) { var index = -1, length = pairs == null ? 0 : pairs.length, result = {}; while (++index < length) { var pair = pairs[index]; result[pair[0]] = pair[1]; } return result; } module.exports = fromPairs; /***/ }), /***/ 58156: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGet = __webpack_require__(47422); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /***/ 80631: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseHasIn = __webpack_require__(28077), hasPath = __webpack_require__(49326); /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b'); * // => true * * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); * // => false */ function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } module.exports = hasIn; /***/ }), /***/ 83488: /***/ ((module) => { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /***/ 80191: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayMap = __webpack_require__(34932), baseIntersection = __webpack_require__(27185), baseRest = __webpack_require__(69302), castArrayLikeObject = __webpack_require__(80741), last = __webpack_require__(68090); /** * This method is like `_.intersection` except that it accepts `comparator` * which is invoked to compare elements of `arrays`. The order and references * of result values are determined by the first array. The comparator is * invoked with two arguments: (arrVal, othVal). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new array of intersecting values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; * * _.intersectionWith(objects, others, _.isEqual); * // => [{ 'x': 1, 'y': 2 }] */ var intersectionWith = baseRest(function(arrays) { var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); comparator = typeof comparator == 'function' ? comparator : undefined; if (comparator) { mapped.pop(); } return (mapped.length && mapped[0] === arrays[0]) ? baseIntersection(mapped, undefined, comparator) : []; }); module.exports = intersectionWith; /***/ }), /***/ 72428: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIsArguments = __webpack_require__(27534), isObjectLike = __webpack_require__(40346); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /***/ 56449: /***/ ((module) => { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /***/ 64894: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isFunction = __webpack_require__(1882), isLength = __webpack_require__(30294); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /***/ 83693: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isArrayLike = __webpack_require__(64894), isObjectLike = __webpack_require__(40346); /** * This method is like `_.isArrayLike` except that it also checks if `value` * is an object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array-like object, * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); * // => true * * _.isArrayLikeObject(document.body.children); * // => true * * _.isArrayLikeObject('abc'); * // => false * * _.isArrayLikeObject(_.noop); * // => false */ function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } module.exports = isArrayLikeObject; /***/ }), /***/ 3656: /***/ ((module, exports, __webpack_require__) => { /* module decorator */ module = __webpack_require__.nmd(module); var root = __webpack_require__(9325), stubFalse = __webpack_require__(89935); /** Detect free variable `exports`. */ var freeExports = true && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /***/ }), /***/ 62193: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseKeys = __webpack_require__(88984), getTag = __webpack_require__(5861), isArguments = __webpack_require__(72428), isArray = __webpack_require__(56449), isArrayLike = __webpack_require__(64894), isBuffer = __webpack_require__(3656), isPrototype = __webpack_require__(55527), isTypedArray = __webpack_require__(37167); /** `Object#toString` result references. */ var mapTag = '[object Map]', setTag = '[object Set]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if `value` is an empty object, collection, map, or set. * * Objects are considered empty if they have no own enumerable string keyed * properties. * * Array-like values such as `arguments` objects, arrays, buffers, strings, or * jQuery-like collections are considered empty if they have a `length` of `0`. * Similarly, maps and sets are considered empty if they have a `size` of `0`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is empty, else `false`. * @example * * _.isEmpty(null); * // => true * * _.isEmpty(true); * // => true * * _.isEmpty(1); * // => true * * _.isEmpty([1, 2, 3]); * // => false * * _.isEmpty({ 'a': 1 }); * // => false */ function isEmpty(value) { if (value == null) { return true; } if (isArrayLike(value) && (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || isBuffer(value) || isTypedArray(value) || isArguments(value))) { return !value.length; } var tag = getTag(value); if (tag == mapTag || tag == setTag) { return !value.size; } if (isPrototype(value)) { return !baseKeys(value).length; } for (var key in value) { if (hasOwnProperty.call(value, key)) { return false; } } return true; } module.exports = isEmpty; /***/ }), /***/ 2404: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIsEqual = __webpack_require__(60270); /** * Performs a deep comparison between two values to determine if they are * equivalent. * * **Note:** This method supports comparing arrays, array buffers, booleans, * date objects, error objects, maps, numbers, `Object` objects, regexes, * sets, strings, symbols, and typed arrays. `Object` objects are compared * by their own, not inherited, enumerable properties. Functions and DOM * nodes are compared by strict equality, i.e. `===`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true * * object === other; * // => false */ function isEqual(value, other) { return baseIsEqual(value, other); } module.exports = isEqual; /***/ }), /***/ 23546: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGetTag = __webpack_require__(72552), isObjectLike = __webpack_require__(40346), isPlainObject = __webpack_require__(11331); /** `Object#toString` result references. */ var domExcTag = '[object DOMException]', errorTag = '[object Error]'; /** * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, * `SyntaxError`, `TypeError`, or `URIError` object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an error object, else `false`. * @example * * _.isError(new Error); * // => true * * _.isError(Error); * // => false */ function isError(value) { if (!isObjectLike(value)) { return false; } var tag = baseGetTag(value); return tag == errorTag || tag == domExcTag || (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); } module.exports = isError; /***/ }), /***/ 1882: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGetTag = __webpack_require__(72552), isObject = __webpack_require__(23805); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /***/ 30294: /***/ ((module) => { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /***/ 87730: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIsMap = __webpack_require__(29172), baseUnary = __webpack_require__(27301), nodeUtil = __webpack_require__(86009); /* Node.js helper references. */ var nodeIsMap = nodeUtil && nodeUtil.isMap; /** * Checks if `value` is classified as a `Map` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * * _.isMap(new Map); * // => true * * _.isMap(new WeakMap); * // => false */ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; module.exports = isMap; /***/ }), /***/ 98023: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGetTag = __webpack_require__(72552), isObjectLike = __webpack_require__(40346); /** `Object#toString` result references. */ var numberTag = '[object Number]'; /** * Checks if `value` is classified as a `Number` primitive or object. * * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are * classified as numbers, use the `_.isFinite` method. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * * _.isNumber(3); * // => true * * _.isNumber(Number.MIN_VALUE); * // => true * * _.isNumber(Infinity); * // => true * * _.isNumber('3'); * // => false */ function isNumber(value) { return typeof value == 'number' || (isObjectLike(value) && baseGetTag(value) == numberTag); } module.exports = isNumber; /***/ }), /***/ 23805: /***/ ((module) => { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /***/ 40346: /***/ ((module) => { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /***/ 11331: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGetTag = __webpack_require__(72552), getPrototype = __webpack_require__(28879), isObjectLike = __webpack_require__(40346); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; /***/ }), /***/ 38440: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIsSet = __webpack_require__(16038), baseUnary = __webpack_require__(27301), nodeUtil = __webpack_require__(86009); /* Node.js helper references. */ var nodeIsSet = nodeUtil && nodeUtil.isSet; /** * Checks if `value` is classified as a `Set` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * * _.isSet(new Set); * // => true * * _.isSet(new WeakSet); * // => false */ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; module.exports = isSet; /***/ }), /***/ 44394: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGetTag = __webpack_require__(72552), isObjectLike = __webpack_require__(40346); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /***/ 37167: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIsTypedArray = __webpack_require__(4901), baseUnary = __webpack_require__(27301), nodeUtil = __webpack_require__(86009); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /***/ 47886: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var getTag = __webpack_require__(5861), isObjectLike = __webpack_require__(40346); /** `Object#toString` result references. */ var weakMapTag = '[object WeakMap]'; /** * Checks if `value` is classified as a `WeakMap` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. * @example * * _.isWeakMap(new WeakMap); * // => true * * _.isWeakMap(new Map); * // => false */ function isWeakMap(value) { return isObjectLike(value) && getTag(value) == weakMapTag; } module.exports = isWeakMap; /***/ }), /***/ 33855: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseClone = __webpack_require__(9999), baseIteratee = __webpack_require__(15389); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1; /** * Creates a function that invokes `func` with the arguments of the created * function. If `func` is a property name, the created function returns the * property value for a given element. If `func` is an array or object, the * created function returns `true` for elements that contain the equivalent * source properties, otherwise it returns `false`. * * @static * @since 4.0.0 * @memberOf _ * @category Util * @param {*} [func=_.identity] The value to convert to a callback. * @returns {Function} Returns the callback. * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false } * ]; * * // The `_.matches` iteratee shorthand. * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); * // => [{ 'user': 'barney', 'age': 36, 'active': true }] * * // The `_.matchesProperty` iteratee shorthand. * _.filter(users, _.iteratee(['user', 'fred'])); * // => [{ 'user': 'fred', 'age': 40 }] * * // The `_.property` iteratee shorthand. * _.map(users, _.iteratee('user')); * // => ['barney', 'fred'] * * // Create custom iteratee shorthands. * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { * return !_.isRegExp(func) ? iteratee(func) : function(string) { * return func.test(string); * }; * }); * * _.filter(['abc', 'def'], /ef/); * // => ['def'] */ function iteratee(func) { return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); } module.exports = iteratee; /***/ }), /***/ 95950: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayLikeKeys = __webpack_require__(70695), baseKeys = __webpack_require__(88984), isArrayLike = __webpack_require__(64894); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /***/ 37241: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayLikeKeys = __webpack_require__(70695), baseKeysIn = __webpack_require__(72903), isArrayLike = __webpack_require__(64894); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; /***/ }), /***/ 68090: /***/ ((module) => { /** * Gets the last element of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to query. * @returns {*} Returns the last element of `array`. * @example * * _.last([1, 2, 3]); * // => 3 */ function last(array) { var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } module.exports = last; /***/ }), /***/ 50104: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var MapCache = __webpack_require__(53661); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }), /***/ 55364: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseMerge = __webpack_require__(85250), createAssigner = __webpack_require__(20999); /** * This method is like `_.assign` except that it recursively merges own and * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 0.5.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @example * * var object = { * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * * var other = { * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * * _.merge(object, other); * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); }); module.exports = merge; /***/ }), /***/ 63950: /***/ ((module) => { /** * This method returns `undefined`. * * @static * @memberOf _ * @since 2.3.0 * @category Util * @example * * _.times(2, _.noop); * // => [undefined, undefined] */ function noop() { // No operation performed. } module.exports = noop; /***/ }), /***/ 10124: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var root = __webpack_require__(9325); /** * Gets the timestamp of the number of milliseconds that have elapsed since * the Unix epoch (1 January 1970 00:00:00 UTC). * * @static * @memberOf _ * @since 2.4.0 * @category Date * @returns {number} Returns the timestamp. * @example * * _.defer(function(stamp) { * console.log(_.now() - stamp); * }, _.now()); * // => Logs the number of milliseconds it took for the deferred invocation. */ var now = function() { return root.Date.now(); }; module.exports = now; /***/ }), /***/ 90179: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayMap = __webpack_require__(34932), baseClone = __webpack_require__(9999), baseUnset = __webpack_require__(19931), castPath = __webpack_require__(31769), copyObject = __webpack_require__(21791), customOmitClone = __webpack_require__(53138), flatRest = __webpack_require__(38816), getAllKeysIn = __webpack_require__(83349); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** * The opposite of `_.pick`; this method creates an object composed of the * own and inherited enumerable property paths of `object` that are not omitted. * * **Note:** This method is considerably slower than `_.pick`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to omit. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.omit(object, ['a', 'c']); * // => { 'b': '2' } */ var omit = flatRest(function(object, paths) { var result = {}; if (object == null) { return result; } var isDeep = false; paths = arrayMap(paths, function(path) { path = castPath(path, object); isDeep || (isDeep = path.length > 1); return path; }); copyObject(object, getAllKeysIn(object), result); if (isDeep) { result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); } var length = paths.length; while (length--) { baseUnset(result, paths[length]); } return result; }); module.exports = omit; /***/ }), /***/ 52037: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var createPadding = __webpack_require__(57216), stringSize = __webpack_require__(81993), toInteger = __webpack_require__(61489), toString = __webpack_require__(13222); /** * Pads `string` on the left side if it's shorter than `length`. Padding * characters are truncated if they exceed `length`. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to pad. * @param {number} [length=0] The padding length. * @param {string} [chars=' '] The string used as padding. * @returns {string} Returns the padded string. * @example * * _.padStart('abc', 6); * // => ' abc' * * _.padStart('abc', 6, '_-'); * // => '_-_abc' * * _.padStart('abc', 3); * // => 'abc' */ function padStart(string, length, chars) { string = toString(string); length = toInteger(length); var strLength = length ? stringSize(string) : 0; return (length && strLength < length) ? (createPadding(length - strLength, chars) + string) : string; } module.exports = padStart; /***/ }), /***/ 44383: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var basePick = __webpack_require__(76001), flatRest = __webpack_require__(38816); /** * Creates an object composed of the picked `object` properties. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ var pick = flatRest(function(object, paths) { return object == null ? {} : basePick(object, paths); }); module.exports = pick; /***/ }), /***/ 50583: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseProperty = __webpack_require__(47237), basePropertyDeep = __webpack_require__(17255), isKey = __webpack_require__(28586), toKey = __webpack_require__(77797); /** * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. * @example * * var objects = [ * { 'a': { 'b': 2 } }, * { 'a': { 'b': 1 } } * ]; * * _.map(objects, _.property('a.b')); * // => [2, 1] * * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } module.exports = property; /***/ }), /***/ 84195: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var createWrap = __webpack_require__(66977), flatRest = __webpack_require__(38816); /** Used to compose bitmasks for function metadata. */ var WRAP_REARG_FLAG = 256; /** * Creates a function that invokes `func` with arguments arranged according * to the specified `indexes` where the argument value at the first index is * provided as the first argument, the argument value at the second index is * provided as the second argument, and so on. * * @static * @memberOf _ * @since 3.0.0 * @category Function * @param {Function} func The function to rearrange arguments for. * @param {...(number|number[])} indexes The arranged argument indexes. * @returns {Function} Returns the new function. * @example * * var rearged = _.rearg(function(a, b, c) { * return [a, b, c]; * }, [2, 0, 1]); * * rearged('b', 'c', 'a') * // => ['a', 'b', 'c'] */ var rearg = flatRest(function(func, indexes) { return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); }); module.exports = rearg; /***/ }), /***/ 14174: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIteratee = __webpack_require__(15389), basePullAt = __webpack_require__(50306); /** * Removes all elements from `array` that `predicate` returns truthy for * and returns an array of the removed elements. The predicate is invoked * with three arguments: (value, index, array). * * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` * to pull elements from an array by value. * * @static * @memberOf _ * @since 2.0.0 * @category Array * @param {Array} array The array to modify. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new array of removed elements. * @example * * var array = [1, 2, 3, 4]; * var evens = _.remove(array, function(n) { * return n % 2 == 0; * }); * * console.log(array); * // => [1, 3] * * console.log(evens); * // => [2, 4] */ function remove(array, predicate) { var result = []; if (!(array && array.length)) { return result; } var index = -1, indexes = [], length = array.length; predicate = baseIteratee(predicate, 3); while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result.push(value); indexes.push(index); } } basePullAt(array, indexes); return result; } module.exports = remove; /***/ }), /***/ 63560: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseSet = __webpack_require__(73170); /** * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, * it's created. Arrays are created for missing index properties while objects * are created for all other missing properties. Use `_.setWith` to customize * `path` creation. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @returns {Object} Returns `object`. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.set(object, 'a[0].b.c', 4); * console.log(object.a[0].b.c); * // => 4 * * _.set(object, ['x', '0', 'y', 'z'], 5); * console.log(object.x[0].y.z); * // => 5 */ function set(object, path, value) { return object == null ? object : baseSet(object, path, value); } module.exports = set; /***/ }), /***/ 42426: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arraySome = __webpack_require__(14248), baseIteratee = __webpack_require__(15389), baseSome = __webpack_require__(90916), isArray = __webpack_require__(56449), isIterateeCall = __webpack_require__(36800); /** * Checks if `predicate` returns truthy for **any** element of `collection`. * Iteration is stopped once `predicate` returns truthy. The predicate is * invoked with three arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. * @example * * _.some([null, 0, 'yes', false], Boolean); * // => true * * var users = [ * { 'user': 'barney', 'active': true }, * { 'user': 'fred', 'active': false } * ]; * * // The `_.matches` iteratee shorthand. * _.some(users, { 'user': 'barney', 'active': false }); * // => false * * // The `_.matchesProperty` iteratee shorthand. * _.some(users, ['active', false]); * // => true * * // The `_.property` iteratee shorthand. * _.some(users, 'active'); * // => true */ function some(collection, predicate, guard) { var func = isArray(collection) ? arraySome : baseSome; if (guard && isIterateeCall(collection, predicate, guard)) { predicate = undefined; } return func(collection, baseIteratee(predicate, 3)); } module.exports = some; /***/ }), /***/ 63345: /***/ ((module) => { /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } module.exports = stubArray; /***/ }), /***/ 89935: /***/ ((module) => { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /***/ 7350: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var debounce = __webpack_require__(38221), isObject = __webpack_require__(23805); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a throttled function that only invokes `func` at most once per * every `wait` milliseconds. The throttled function comes with a `cancel` * method to cancel delayed `func` invocations and a `flush` method to * immediately invoke them. Provide `options` to indicate whether `func` * should be invoked on the leading and/or trailing edge of the `wait` * timeout. The `func` is invoked with the last arguments provided to the * throttled function. Subsequent calls to the throttled function return the * result of the last `func` invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is * invoked on the trailing edge of the timeout only if the throttled function * is invoked more than once during the `wait` timeout. * * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.throttle` and `_.debounce`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to throttle. * @param {number} [wait=0] The number of milliseconds to throttle invocations to. * @param {Object} [options={}] The options object. * @param {boolean} [options.leading=true] * Specify invoking on the leading edge of the timeout. * @param {boolean} [options.trailing=true] * Specify invoking on the trailing edge of the timeout. * @returns {Function} Returns the new throttled function. * @example * * // Avoid excessively updating the position while scrolling. * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); * * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); * jQuery(element).on('click', throttled); * * // Cancel the trailing throttled invocation. * jQuery(window).on('popstate', throttled.cancel); */ function throttle(func, wait, options) { var leading = true, trailing = true; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } if (isObject(options)) { leading = 'leading' in options ? !!options.leading : leading; trailing = 'trailing' in options ? !!options.trailing : trailing; } return debounce(func, wait, { 'leading': leading, 'maxWait': wait, 'trailing': trailing }); } module.exports = throttle; /***/ }), /***/ 17400: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var toNumber = __webpack_require__(99374); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_INTEGER = 1.7976931348623157e+308; /** * Converts `value` to a finite number. * * @static * @memberOf _ * @since 4.12.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted number. * @example * * _.toFinite(3.2); * // => 3.2 * * _.toFinite(Number.MIN_VALUE); * // => 5e-324 * * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * * _.toFinite('3.2'); * // => 3.2 */ function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber(value); if (value === INFINITY || value === -INFINITY) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } return value === value ? value : 0; } module.exports = toFinite; /***/ }), /***/ 61489: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var toFinite = __webpack_require__(17400); /** * Converts `value` to an integer. * * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted integer. * @example * * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); * // => 0 * * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { var result = toFinite(value), remainder = result % 1; return result === result ? (remainder ? result - remainder : result) : 0; } module.exports = toInteger; /***/ }), /***/ 99374: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseTrim = __webpack_require__(54128), isObject = __webpack_require__(23805), isSymbol = __webpack_require__(44394); /** Used as references for various `Number` constants. */ var NAN = 0 / 0; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = baseTrim(value); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } module.exports = toNumber; /***/ }), /***/ 18938: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var createToPairs = __webpack_require__(82963), keys = __webpack_require__(95950); /** * Creates an array of own enumerable string keyed-value pairs for `object` * which can be consumed by `_.fromPairs`. If `object` is a map or set, its * entries are returned. * * @static * @memberOf _ * @since 4.0.0 * @alias entries * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.toPairs(new Foo); * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) */ var toPairs = createToPairs(keys); module.exports = toPairs; /***/ }), /***/ 42072: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayMap = __webpack_require__(34932), copyArray = __webpack_require__(23007), isArray = __webpack_require__(56449), isSymbol = __webpack_require__(44394), stringToPath = __webpack_require__(61802), toKey = __webpack_require__(77797), toString = __webpack_require__(13222); /** * Converts `value` to a property path array. * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {*} value The value to convert. * @returns {Array} Returns the new property path array. * @example * * _.toPath('a.b.c'); * // => ['a', 'b', 'c'] * * _.toPath('a[0].b.c'); * // => ['a', '0', 'b', 'c'] */ function toPath(value) { if (isArray(value)) { return arrayMap(value, toKey); } return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); } module.exports = toPath; /***/ }), /***/ 69884: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var copyObject = __webpack_require__(21791), keysIn = __webpack_require__(37241); /** * Converts `value` to a plain object flattening inherited enumerable string * keyed properties of `value` to own properties of the plain object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to convert. * @returns {Object} Returns the converted plain object. * @example * * function Foo() { * this.b = 2; * } * * Foo.prototype.c = 3; * * _.assign({ 'a': 1 }, new Foo); * // => { 'a': 1, 'b': 2 } * * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); * // => { 'a': 1, 'b': 2, 'c': 3 } */ function toPlainObject(value) { return copyObject(value, keysIn(value)); } module.exports = toPlainObject; /***/ }), /***/ 13222: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseToString = __webpack_require__(77556); /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } module.exports = toString; /***/ }), /***/ 75494: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var toString = __webpack_require__(13222), unescapeHtmlChar = __webpack_require__(19856); /** Used to match HTML entities and HTML characters. */ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reHasEscapedHtml = RegExp(reEscapedHtml.source); /** * The inverse of `_.escape`; this method converts the HTML entities * `&`, `<`, `>`, `"`, and `'` in `string` to * their corresponding characters. * * **Note:** No other HTML entities are unescaped. To unescape additional * HTML entities use a third-party library like [_he_](https://mths.be/he). * * @static * @memberOf _ * @since 0.6.0 * @category String * @param {string} [string=''] The string to unescape. * @returns {string} Returns the unescaped string. * @example * * _.unescape('fred, barney, & pebbles'); * // => 'fred, barney, & pebbles' */ function unescape(string) { string = toString(string); return (string && reHasEscapedHtml.test(string)) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string; } module.exports = unescape; /***/ }), /***/ 50014: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseIteratee = __webpack_require__(15389), baseUniq = __webpack_require__(55765); /** * This method is like `_.uniq` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which * uniqueness is computed. The order of result values is determined by the * order they occur in the array. The iteratee is invoked with one argument: * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. * @example * * _.uniqBy([2.1, 1.2, 2.3], Math.floor); * // => [2.1, 1.2] * * // The `_.property` iteratee shorthand. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ function uniqBy(array, iteratee) { return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : []; } module.exports = uniqBy; /***/ }), /***/ 97200: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var toString = __webpack_require__(13222); /** Used to generate unique IDs. */ var idCounter = 0; /** * Generates a unique ID. If `prefix` is given, the ID is appended to it. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {string} [prefix=''] The value to prefix the ID with. * @returns {string} Returns the unique ID. * @example * * _.uniqueId('contact_'); * // => 'contact_104' * * _.uniqueId(); * // => '105' */ function uniqueId(prefix) { var id = ++idCounter; return toString(prefix) + id; } module.exports = uniqueId; /***/ }), /***/ 55808: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var createCaseFirst = __webpack_require__(12507); /** * Converts the first character of `string` to upper case. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the converted string. * @example * * _.upperFirst('fred'); * // => 'Fred' * * _.upperFirst('FRED'); * // => 'FRED' */ var upperFirst = createCaseFirst('toUpperCase'); module.exports = upperFirst; /***/ }), /***/ 66645: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var asciiWords = __webpack_require__(1733), hasUnicodeWord = __webpack_require__(45434), toString = __webpack_require__(13222), unicodeWords = __webpack_require__(22225); /** * Splits `string` into an array of its words. * * @static * @memberOf _ * @since 3.0.0 * @category String * @param {string} [string=''] The string to inspect. * @param {RegExp|string} [pattern] The pattern to match words. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Array} Returns the words of `string`. * @example * * _.words('fred, barney, & pebbles'); * // => ['fred', 'barney', 'pebbles'] * * _.words('fred, barney, & pebbles', /[^, ]+/g); * // => ['fred', 'barney', '&', 'pebbles'] */ function words(string, pattern, guard) { string = toString(string); pattern = guard ? undefined : pattern; if (pattern === undefined) { return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); } return string.match(pattern) || []; } module.exports = words; /***/ }), /***/ 53758: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var LazyWrapper = __webpack_require__(30980), LodashWrapper = __webpack_require__(56017), baseLodash = __webpack_require__(94033), isArray = __webpack_require__(56449), isObjectLike = __webpack_require__(40346), wrapperClone = __webpack_require__(80257); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates a `lodash` object which wraps `value` to enable implicit method * chain sequences. Methods that operate on and return arrays, collections, * and functions can be chained together. Methods that retrieve a single value * or may return a primitive value will automatically end the chain sequence * and return the unwrapped value. Otherwise, the value must be unwrapped * with `_#value`. * * Explicit chain sequences, which must be unwrapped with `_#value`, may be * enabled using `_.chain`. * * The execution of chained methods is lazy, that is, it's deferred until * `_#value` is implicitly or explicitly called. * * Lazy evaluation allows several methods to support shortcut fusion. * Shortcut fusion is an optimization to merge iteratee calls; this avoids * the creation of intermediate arrays and can greatly reduce the number of * iteratee executions. Sections of a chain sequence qualify for shortcut * fusion if the section is applied to an array and iteratees accept only * one argument. The heuristic for whether a section qualifies for shortcut * fusion is subject to change. * * Chaining is supported in custom builds as long as the `_#value` method is * directly or indirectly included in the build. * * In addition to lodash methods, wrappers have `Array` and `String` methods. * * The wrapper `Array` methods are: * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` * * The wrapper `String` methods are: * `replace` and `split` * * The wrapper methods that support shortcut fusion are: * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` * * The chainable wrapper methods are: * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, * `zipObject`, `zipObjectDeep`, and `zipWith` * * The wrapper methods that are **not** chainable by default are: * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, * `upperFirst`, `value`, and `words` * * @name _ * @constructor * @category Seq * @param {*} value The value to wrap in a `lodash` instance. * @returns {Object} Returns the new `lodash` wrapper instance. * @example * * function square(n) { * return n * n; * } * * var wrapped = _([1, 2, 3]); * * // Returns an unwrapped value. * wrapped.reduce(_.add); * // => 6 * * // Returns a wrapped value. * var squares = wrapped.map(square); * * _.isArray(squares); * // => false * * _.isArray(squares.value()); * // => true */ function lodash(value) { if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { if (value instanceof LodashWrapper) { return value; } if (hasOwnProperty.call(value, '__wrapped__')) { return wrapperClone(value); } } return new LodashWrapper(value); } // Ensure wrappers are instances of `baseLodash`. lodash.prototype = baseLodash.prototype; lodash.prototype.constructor = lodash; module.exports = lodash; /***/ }), /***/ 71514: /***/ ((module) => { "use strict"; /** @type {import('./abs')} */ module.exports = Math.abs; /***/ }), /***/ 58968: /***/ ((module) => { "use strict"; /** @type {import('./floor')} */ module.exports = Math.floor; /***/ }), /***/ 94459: /***/ ((module) => { "use strict"; /** @type {import('./isNaN')} */ module.exports = Number.isNaN || function isNaN(a) { return a !== a; }; /***/ }), /***/ 6188: /***/ ((module) => { "use strict"; /** @type {import('./max')} */ module.exports = Math.max; /***/ }), /***/ 68002: /***/ ((module) => { "use strict"; /** @type {import('./min')} */ module.exports = Math.min; /***/ }), /***/ 75880: /***/ ((module) => { "use strict"; /** @type {import('./pow')} */ module.exports = Math.pow; /***/ }), /***/ 70414: /***/ ((module) => { "use strict"; /** @type {import('./round')} */ module.exports = Math.round; /***/ }), /***/ 73093: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var $isNaN = __webpack_require__(94459); /** @type {import('./sign')} */ module.exports = function sign(number) { if ($isNaN(number) || number === 0) { return number; } return number < 0 ? -1 : +1; }; /***/ }), /***/ 61509: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : Arabic [ar] //! author : Abdel Said: https://github.com/abdelsaid //! author : Ahmed Elkhatib //! author : forabi https://github.com/forabi ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var symbolMap = { 1: '١', 2: '٢', 3: '٣', 4: '٤', 5: '٥', 6: '٦', 7: '٧', 8: '٨', 9: '٩', 0: '٠', }, numberMap = { '١': '1', '٢': '2', '٣': '3', '٤': '4', '٥': '5', '٦': '6', '٧': '7', '٨': '8', '٩': '9', '٠': '0', }, pluralForm = function (n) { return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; }, plurals = { s: [ 'أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية', ], m: [ 'أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة', ], h: [ 'أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة', ], d: [ 'أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم', ], M: [ 'أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر', ], y: [ 'أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام', ], }, pluralize = function (u) { return function (number, withoutSuffix, string, isFuture) { var f = pluralForm(number), str = plurals[u][pluralForm(number)]; if (f === 2) { str = str[withoutSuffix ? 0 : 1]; } return str.replace(/%d/i, number); }; }, months = [ 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر', ]; var ar = moment.defineLocale('ar', { months: months, monthsShort: months, weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), weekdaysParseExact: true, longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'D/\u200FM/\u200FYYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY HH:mm', LLLL: 'dddd D MMMM YYYY HH:mm', }, meridiemParse: /ص|م/, isPM: function (input) { return 'م' === input; }, meridiem: function (hour, minute, isLower) { if (hour < 12) { return 'ص'; } else { return 'م'; } }, calendar: { sameDay: '[اليوم عند الساعة] LT', nextDay: '[غدًا عند الساعة] LT', nextWeek: 'dddd [عند الساعة] LT', lastDay: '[أمس عند الساعة] LT', lastWeek: 'dddd [عند الساعة] LT', sameElse: 'L', }, relativeTime: { future: 'بعد %s', past: 'منذ %s', s: pluralize('s'), ss: pluralize('s'), m: pluralize('m'), mm: pluralize('m'), h: pluralize('h'), hh: pluralize('h'), d: pluralize('d'), dd: pluralize('d'), M: pluralize('M'), MM: pluralize('M'), y: pluralize('y'), yy: pluralize('y'), }, preparse: function (string) { return string .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { return numberMap[match]; }) .replace(/،/g, ','); }, postformat: function (string) { return string .replace(/\d/g, function (match) { return symbolMap[match]; }) .replace(/,/g, '،'); }, week: { dow: 6, // Saturday is the first day of the week. doy: 12, // The week that contains Jan 12th is the first week of the year. }, }); return ar; }))); /***/ }), /***/ 77853: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : German [de] //! author : lluchs : https://github.com/lluchs //! author: Menelion Elensúle: https://github.com/Oire //! author : Mikolaj Dadela : https://github.com/mik01aj ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration function processRelativeTime(number, withoutSuffix, key, isFuture) { var format = { m: ['eine Minute', 'einer Minute'], h: ['eine Stunde', 'einer Stunde'], d: ['ein Tag', 'einem Tag'], dd: [number + ' Tage', number + ' Tagen'], w: ['eine Woche', 'einer Woche'], M: ['ein Monat', 'einem Monat'], MM: [number + ' Monate', number + ' Monaten'], y: ['ein Jahr', 'einem Jahr'], yy: [number + ' Jahre', number + ' Jahren'], }; return withoutSuffix ? format[key][0] : format[key][1]; } var de = moment.defineLocale('de', { months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( '_' ), monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), monthsParseExact: true, weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( '_' ), weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), weekdaysParseExact: true, longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'DD.MM.YYYY', LL: 'D. MMMM YYYY', LLL: 'D. MMMM YYYY HH:mm', LLLL: 'dddd, D. MMMM YYYY HH:mm', }, calendar: { sameDay: '[heute um] LT [Uhr]', sameElse: 'L', nextDay: '[morgen um] LT [Uhr]', nextWeek: 'dddd [um] LT [Uhr]', lastDay: '[gestern um] LT [Uhr]', lastWeek: '[letzten] dddd [um] LT [Uhr]', }, relativeTime: { future: 'in %s', past: 'vor %s', s: 'ein paar Sekunden', ss: '%d Sekunden', m: processRelativeTime, mm: '%d Minuten', h: processRelativeTime, hh: '%d Stunden', d: processRelativeTime, dd: processRelativeTime, w: processRelativeTime, ww: '%d Wochen', M: processRelativeTime, MM: processRelativeTime, y: processRelativeTime, yy: processRelativeTime, }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal: '%d.', week: { dow: 1, // Monday is the first day of the week. doy: 4, // The week that contains Jan 4th is the first week of the year. }, }); return de; }))); /***/ }), /***/ 53872: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : English (Australia) [en-au] //! author : Jared Morse : https://github.com/jarcoal ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var enAu = moment.defineLocale('en-au', { months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( '_' ), monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( '_' ), weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), longDateFormat: { LT: 'h:mm A', LTS: 'h:mm:ss A', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY h:mm A', LLLL: 'dddd, D MMMM YYYY h:mm A', }, calendar: { sameDay: '[Today at] LT', nextDay: '[Tomorrow at] LT', nextWeek: 'dddd [at] LT', lastDay: '[Yesterday at] LT', lastWeek: '[Last] dddd [at] LT', sameElse: 'L', }, relativeTime: { future: 'in %s', past: '%s ago', s: 'a few seconds', ss: '%d seconds', m: 'a minute', mm: '%d minutes', h: 'an hour', hh: '%d hours', d: 'a day', dd: '%d days', M: 'a month', MM: '%d months', y: 'a year', yy: '%d years', }, dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, ordinal: function (number) { var b = number % 10, output = ~~((number % 100) / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; return number + output; }, week: { dow: 0, // Sunday is the first day of the week. doy: 4, // The week that contains Jan 4th is the first week of the year. }, }); return enAu; }))); /***/ }), /***/ 28298: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : English (Canada) [en-ca] //! author : Jonathan Abourbih : https://github.com/jonbca ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var enCa = moment.defineLocale('en-ca', { months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( '_' ), monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( '_' ), weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), longDateFormat: { LT: 'h:mm A', LTS: 'h:mm:ss A', L: 'YYYY-MM-DD', LL: 'MMMM D, YYYY', LLL: 'MMMM D, YYYY h:mm A', LLLL: 'dddd, MMMM D, YYYY h:mm A', }, calendar: { sameDay: '[Today at] LT', nextDay: '[Tomorrow at] LT', nextWeek: 'dddd [at] LT', lastDay: '[Yesterday at] LT', lastWeek: '[Last] dddd [at] LT', sameElse: 'L', }, relativeTime: { future: 'in %s', past: '%s ago', s: 'a few seconds', ss: '%d seconds', m: 'a minute', mm: '%d minutes', h: 'an hour', hh: '%d hours', d: 'a day', dd: '%d days', M: 'a month', MM: '%d months', y: 'a year', yy: '%d years', }, dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, ordinal: function (number) { var b = number % 10, output = ~~((number % 100) / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; return number + output; }, }); return enCa; }))); /***/ }), /***/ 56195: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : English (United Kingdom) [en-gb] //! author : Chris Gedrim : https://github.com/chrisgedrim ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var enGb = moment.defineLocale('en-gb', { months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( '_' ), monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( '_' ), weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY HH:mm', LLLL: 'dddd, D MMMM YYYY HH:mm', }, calendar: { sameDay: '[Today at] LT', nextDay: '[Tomorrow at] LT', nextWeek: 'dddd [at] LT', lastDay: '[Yesterday at] LT', lastWeek: '[Last] dddd [at] LT', sameElse: 'L', }, relativeTime: { future: 'in %s', past: '%s ago', s: 'a few seconds', ss: '%d seconds', m: 'a minute', mm: '%d minutes', h: 'an hour', hh: '%d hours', d: 'a day', dd: '%d days', M: 'a month', MM: '%d months', y: 'a year', yy: '%d years', }, dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, ordinal: function (number) { var b = number % 10, output = ~~((number % 100) / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; return number + output; }, week: { dow: 1, // Monday is the first day of the week. doy: 4, // The week that contains Jan 4th is the first week of the year. }, }); return enGb; }))); /***/ }), /***/ 9033: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : English (India) [en-in] //! author : Jatin Agrawal : https://github.com/jatinag22 ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var enIn = moment.defineLocale('en-in', { months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( '_' ), monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( '_' ), weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), longDateFormat: { LT: 'h:mm A', LTS: 'h:mm:ss A', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY h:mm A', LLLL: 'dddd, D MMMM YYYY h:mm A', }, calendar: { sameDay: '[Today at] LT', nextDay: '[Tomorrow at] LT', nextWeek: 'dddd [at] LT', lastDay: '[Yesterday at] LT', lastWeek: '[Last] dddd [at] LT', sameElse: 'L', }, relativeTime: { future: 'in %s', past: '%s ago', s: 'a few seconds', ss: '%d seconds', m: 'a minute', mm: '%d minutes', h: 'an hour', hh: '%d hours', d: 'a day', dd: '%d days', M: 'a month', MM: '%d months', y: 'a year', yy: '%d years', }, dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, ordinal: function (number) { var b = number % 10, output = ~~((number % 100) / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; return number + output; }, week: { dow: 0, // Sunday is the first day of the week. doy: 6, // The week that contains Jan 1st is the first week of the year. }, }); return enIn; }))); /***/ }), /***/ 17730: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : Spanish (Mexico) [es-mx] //! author : JC Franco : https://github.com/jcfranco ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( '_' ), monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), monthsParse = [ /^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i, ], monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; var esMx = moment.defineLocale('es-mx', { months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( '_' ), monthsShort: function (m, format) { if (!m) { return monthsShortDot; } else if (/-MMM-/.test(format)) { return monthsShort[m.month()]; } else { return monthsShortDot[m.month()]; } }, monthsRegex: monthsRegex, monthsShortRegex: monthsRegex, monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, monthsParse: monthsParse, longMonthsParse: monthsParse, shortMonthsParse: monthsParse, weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), weekdaysParseExact: true, longDateFormat: { LT: 'H:mm', LTS: 'H:mm:ss', L: 'DD/MM/YYYY', LL: 'D [de] MMMM [de] YYYY', LLL: 'D [de] MMMM [de] YYYY H:mm', LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', }, calendar: { sameDay: function () { return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, nextDay: function () { return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, nextWeek: function () { return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, lastDay: function () { return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, lastWeek: function () { return ( '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT' ); }, sameElse: 'L', }, relativeTime: { future: 'en %s', past: 'hace %s', s: 'unos segundos', ss: '%d segundos', m: 'un minuto', mm: '%d minutos', h: 'una hora', hh: '%d horas', d: 'un día', dd: '%d días', w: 'una semana', ww: '%d semanas', M: 'un mes', MM: '%d meses', y: 'un año', yy: '%d años', }, dayOfMonthOrdinalParse: /\d{1,2}º/, ordinal: '%dº', week: { dow: 0, // Sunday is the first day of the week. doy: 4, // The week that contains Jan 4th is the first week of the year. }, invalidDate: 'Fecha inválida', }); return esMx; }))); /***/ }), /***/ 56575: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : Spanish (United States) [es-us] //! author : bustta : https://github.com/bustta //! author : chrisrodz : https://github.com/chrisrodz ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( '_' ), monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), monthsParse = [ /^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i, ], monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; var esUs = moment.defineLocale('es-us', { months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( '_' ), monthsShort: function (m, format) { if (!m) { return monthsShortDot; } else if (/-MMM-/.test(format)) { return monthsShort[m.month()]; } else { return monthsShortDot[m.month()]; } }, monthsRegex: monthsRegex, monthsShortRegex: monthsRegex, monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, monthsParse: monthsParse, longMonthsParse: monthsParse, shortMonthsParse: monthsParse, weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), weekdaysParseExact: true, longDateFormat: { LT: 'h:mm A', LTS: 'h:mm:ss A', L: 'MM/DD/YYYY', LL: 'D [de] MMMM [de] YYYY', LLL: 'D [de] MMMM [de] YYYY h:mm A', LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', }, calendar: { sameDay: function () { return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, nextDay: function () { return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, nextWeek: function () { return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, lastDay: function () { return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, lastWeek: function () { return ( '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT' ); }, sameElse: 'L', }, relativeTime: { future: 'en %s', past: 'hace %s', s: 'unos segundos', ss: '%d segundos', m: 'un minuto', mm: '%d minutos', h: 'una hora', hh: '%d horas', d: 'un día', dd: '%d días', w: 'una semana', ww: '%d semanas', M: 'un mes', MM: '%d meses', y: 'un año', yy: '%d años', }, dayOfMonthOrdinalParse: /\d{1,2}º/, ordinal: '%dº', week: { dow: 0, // Sunday is the first day of the week. doy: 6, // The week that contains Jan 6th is the first week of the year. }, }); return esUs; }))); /***/ }), /***/ 97650: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : Spanish [es] //! author : Julio Napurí : https://github.com/julionc ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( '_' ), monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), monthsParse = [ /^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i, ], monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; var es = moment.defineLocale('es', { months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( '_' ), monthsShort: function (m, format) { if (!m) { return monthsShortDot; } else if (/-MMM-/.test(format)) { return monthsShort[m.month()]; } else { return monthsShortDot[m.month()]; } }, monthsRegex: monthsRegex, monthsShortRegex: monthsRegex, monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, monthsParse: monthsParse, longMonthsParse: monthsParse, shortMonthsParse: monthsParse, weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), weekdaysParseExact: true, longDateFormat: { LT: 'H:mm', LTS: 'H:mm:ss', L: 'DD/MM/YYYY', LL: 'D [de] MMMM [de] YYYY', LLL: 'D [de] MMMM [de] YYYY H:mm', LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', }, calendar: { sameDay: function () { return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, nextDay: function () { return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, nextWeek: function () { return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, lastDay: function () { return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, lastWeek: function () { return ( '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT' ); }, sameElse: 'L', }, relativeTime: { future: 'en %s', past: 'hace %s', s: 'unos segundos', ss: '%d segundos', m: 'un minuto', mm: '%d minutos', h: 'una hora', hh: '%d horas', d: 'un día', dd: '%d días', w: 'una semana', ww: '%d semanas', M: 'un mes', MM: '%d meses', y: 'un año', yy: '%d años', }, dayOfMonthOrdinalParse: /\d{1,2}º/, ordinal: '%dº', week: { dow: 1, // Monday is the first day of the week. doy: 4, // The week that contains Jan 4th is the first week of the year. }, invalidDate: 'Fecha inválida', }); return es; }))); /***/ }), /***/ 85498: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : French [fr] //! author : John Fischer : https://github.com/jfroffice ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var monthsStrictRegex = /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, monthsShortStrictRegex = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i, monthsRegex = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, monthsParse = [ /^janv/i, /^févr/i, /^mars/i, /^avr/i, /^mai/i, /^juin/i, /^juil/i, /^août/i, /^sept/i, /^oct/i, /^nov/i, /^déc/i, ]; var fr = moment.defineLocale('fr', { months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( '_' ), monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( '_' ), monthsRegex: monthsRegex, monthsShortRegex: monthsRegex, monthsStrictRegex: monthsStrictRegex, monthsShortStrictRegex: monthsShortStrictRegex, monthsParse: monthsParse, longMonthsParse: monthsParse, shortMonthsParse: monthsParse, weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), weekdaysParseExact: true, longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY HH:mm', LLLL: 'dddd D MMMM YYYY HH:mm', }, calendar: { sameDay: '[Aujourd’hui à] LT', nextDay: '[Demain à] LT', nextWeek: 'dddd [à] LT', lastDay: '[Hier à] LT', lastWeek: 'dddd [dernier à] LT', sameElse: 'L', }, relativeTime: { future: 'dans %s', past: 'il y a %s', s: 'quelques secondes', ss: '%d secondes', m: 'une minute', mm: '%d minutes', h: 'une heure', hh: '%d heures', d: 'un jour', dd: '%d jours', w: 'une semaine', ww: '%d semaines', M: 'un mois', MM: '%d mois', y: 'un an', yy: '%d ans', }, dayOfMonthOrdinalParse: /\d{1,2}(er|)/, ordinal: function (number, period) { switch (period) { // TODO: Return 'e' when day of month > 1. Move this case inside // block for masculine words below. // See https://github.com/moment/moment/issues/3375 case 'D': return number + (number === 1 ? 'er' : ''); // Words with masculine grammatical gender: mois, trimestre, jour default: case 'M': case 'Q': case 'DDD': case 'd': return number + (number === 1 ? 'er' : 'e'); // Words with feminine grammatical gender: semaine case 'w': case 'W': return number + (number === 1 ? 're' : 'e'); } }, week: { dow: 1, // Monday is the first day of the week. doy: 4, // The week that contains Jan 4th is the first week of the year. }, }); return fr; }))); /***/ }), /***/ 88383: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : Italian [it] //! author : Lorenzo : https://github.com/aliem //! author: Mattia Larentis: https://github.com/nostalgiaz //! author: Marco : https://github.com/Manfre98 ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var it = moment.defineLocale('it', { months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( '_' ), monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( '_' ), weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY HH:mm', LLLL: 'dddd D MMMM YYYY HH:mm', }, calendar: { sameDay: function () { return ( '[Oggi a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + ']LT' ); }, nextDay: function () { return ( '[Domani a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + ']LT' ); }, nextWeek: function () { return ( 'dddd [a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + ']LT' ); }, lastDay: function () { return ( '[Ieri a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + ']LT' ); }, lastWeek: function () { switch (this.day()) { case 0: return ( '[La scorsa] dddd [a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + ']LT' ); default: return ( '[Lo scorso] dddd [a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + ']LT' ); } }, sameElse: 'L', }, relativeTime: { future: 'tra %s', past: '%s fa', s: 'alcuni secondi', ss: '%d secondi', m: 'un minuto', mm: '%d minuti', h: "un'ora", hh: '%d ore', d: 'un giorno', dd: '%d giorni', w: 'una settimana', ww: '%d settimane', M: 'un mese', MM: '%d mesi', y: 'un anno', yy: '%d anni', }, dayOfMonthOrdinalParse: /\d{1,2}º/, ordinal: '%dº', week: { dow: 1, // Monday is the first day of the week. doy: 4, // The week that contains Jan 4th is the first week of the year. }, }); return it; }))); /***/ }), /***/ 23827: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : Japanese [ja] //! author : LI Long : https://github.com/baryon ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var ja = moment.defineLocale('ja', { eras: [ { since: '2019-05-01', offset: 1, name: '令和', narrow: '㋿', abbr: 'R', }, { since: '1989-01-08', until: '2019-04-30', offset: 1, name: '平成', narrow: '㍻', abbr: 'H', }, { since: '1926-12-25', until: '1989-01-07', offset: 1, name: '昭和', narrow: '㍼', abbr: 'S', }, { since: '1912-07-30', until: '1926-12-24', offset: 1, name: '大正', narrow: '㍽', abbr: 'T', }, { since: '1873-01-01', until: '1912-07-29', offset: 6, name: '明治', narrow: '㍾', abbr: 'M', }, { since: '0001-01-01', until: '1873-12-31', offset: 1, name: '西暦', narrow: 'AD', abbr: 'AD', }, { since: '0000-12-31', until: -Infinity, offset: 1, name: '紀元前', narrow: 'BC', abbr: 'BC', }, ], eraYearOrdinalRegex: /(元|\d+)年/, eraYearOrdinalParse: function (input, match) { return match[1] === '元' ? 1 : parseInt(match[1] || input, 10); }, months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( '_' ), weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'), weekdaysShort: '日_月_火_水_木_金_土'.split('_'), weekdaysMin: '日_月_火_水_木_金_土'.split('_'), longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'YYYY/MM/DD', LL: 'YYYY年M月D日', LLL: 'YYYY年M月D日 HH:mm', LLLL: 'YYYY年M月D日 dddd HH:mm', l: 'YYYY/MM/DD', ll: 'YYYY年M月D日', lll: 'YYYY年M月D日 HH:mm', llll: 'YYYY年M月D日(ddd) HH:mm', }, meridiemParse: /午前|午後/i, isPM: function (input) { return input === '午後'; }, meridiem: function (hour, minute, isLower) { if (hour < 12) { return '午前'; } else { return '午後'; } }, calendar: { sameDay: '[今日] LT', nextDay: '[明日] LT', nextWeek: function (now) { if (now.week() !== this.week()) { return '[来週]dddd LT'; } else { return 'dddd LT'; } }, lastDay: '[昨日] LT', lastWeek: function (now) { if (this.week() !== now.week()) { return '[先週]dddd LT'; } else { return 'dddd LT'; } }, sameElse: 'L', }, dayOfMonthOrdinalParse: /\d{1,2}日/, ordinal: function (number, period) { switch (period) { case 'y': return number === 1 ? '元年' : number + '年'; case 'd': case 'D': case 'DDD': return number + '日'; default: return number; } }, relativeTime: { future: '%s後', past: '%s前', s: '数秒', ss: '%d秒', m: '1分', mm: '%d分', h: '1時間', hh: '%d時間', d: '1日', dd: '%d日', M: '1ヶ月', MM: '%dヶ月', y: '1年', yy: '%d年', }, }); return ja; }))); /***/ }), /***/ 82271: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : Russian [ru] //! author : Viktorminator : https://github.com/Viktorminator //! author : Menelion Elensúle : https://github.com/Oire //! author : Коренберг Марк : https://github.com/socketpair ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration function plural(word, num) { var forms = word.split('_'); return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]; } function relativeTimeWithPlural(number, withoutSuffix, key) { var format = { ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', hh: 'час_часа_часов', dd: 'день_дня_дней', ww: 'неделя_недели_недель', MM: 'месяц_месяца_месяцев', yy: 'год_года_лет', }; if (key === 'm') { return withoutSuffix ? 'минута' : 'минуту'; } else { return number + ' ' + plural(format[key], +number); } } var monthsParse = [ /^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i, ]; // http://new.gramota.ru/spravka/rules/139-prop : § 103 // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 var ru = moment.defineLocale('ru', { months: { format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split( '_' ), standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split( '_' ), }, monthsShort: { // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку? format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split( '_' ), standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split( '_' ), }, weekdays: { standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split( '_' ), format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split( '_' ), isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/, }, weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), monthsParse: monthsParse, longMonthsParse: monthsParse, shortMonthsParse: monthsParse, // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, // копия предыдущего monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, // полные названия с падежами monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i, // Выражение, которое соответствует только сокращённым формам monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i, longDateFormat: { LT: 'H:mm', LTS: 'H:mm:ss', L: 'DD.MM.YYYY', LL: 'D MMMM YYYY г.', LLL: 'D MMMM YYYY г., H:mm', LLLL: 'dddd, D MMMM YYYY г., H:mm', }, calendar: { sameDay: '[Сегодня, в] LT', nextDay: '[Завтра, в] LT', lastDay: '[Вчера, в] LT', nextWeek: function (now) { if (now.week() !== this.week()) { switch (this.day()) { case 0: return '[В следующее] dddd, [в] LT'; case 1: case 2: case 4: return '[В следующий] dddd, [в] LT'; case 3: case 5: case 6: return '[В следующую] dddd, [в] LT'; } } else { if (this.day() === 2) { return '[Во] dddd, [в] LT'; } else { return '[В] dddd, [в] LT'; } } }, lastWeek: function (now) { if (now.week() !== this.week()) { switch (this.day()) { case 0: return '[В прошлое] dddd, [в] LT'; case 1: case 2: case 4: return '[В прошлый] dddd, [в] LT'; case 3: case 5: case 6: return '[В прошлую] dddd, [в] LT'; } } else { if (this.day() === 2) { return '[Во] dddd, [в] LT'; } else { return '[В] dddd, [в] LT'; } } }, sameElse: 'L', }, relativeTime: { future: 'через %s', past: '%s назад', s: 'несколько секунд', ss: relativeTimeWithPlural, m: relativeTimeWithPlural, mm: relativeTimeWithPlural, h: 'час', hh: relativeTimeWithPlural, d: 'день', dd: relativeTimeWithPlural, w: 'неделя', ww: relativeTimeWithPlural, M: 'месяц', MM: relativeTimeWithPlural, y: 'год', yy: relativeTimeWithPlural, }, meridiemParse: /ночи|утра|дня|вечера/i, isPM: function (input) { return /^(дня|вечера)$/.test(input); }, meridiem: function (hour, minute, isLower) { if (hour < 4) { return 'ночи'; } else if (hour < 12) { return 'утра'; } else if (hour < 17) { return 'дня'; } else { return 'вечера'; } }, dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/, ordinal: function (number, period) { switch (period) { case 'M': case 'd': case 'DDD': return number + '-й'; case 'D': return number + '-го'; case 'w': case 'W': return number + '-я'; default: return number; } }, week: { dow: 1, // Monday is the first day of the week. doy: 4, // The week that contains Jan 4th is the first week of the year. }, }); return ru; }))); /***/ }), /***/ 50304: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { //! moment.js locale configuration //! locale : Chinese (Taiwan) [zh-tw] //! author : Ben : https://github.com/ben-lin //! author : Chris Lam : https://github.com/hehachris ;(function (global, factory) { true ? factory(__webpack_require__(95093)) : 0 }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var zhTw = moment.defineLocale('zh-tw', { months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( '_' ), monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( '_' ), weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), weekdaysMin: '日_一_二_三_四_五_六'.split('_'), longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'YYYY/MM/DD', LL: 'YYYY年M月D日', LLL: 'YYYY年M月D日 HH:mm', LLLL: 'YYYY年M月D日dddd HH:mm', l: 'YYYY/M/D', ll: 'YYYY年M月D日', lll: 'YYYY年M月D日 HH:mm', llll: 'YYYY年M月D日dddd HH:mm', }, meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, meridiemHour: function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { return hour; } else if (meridiem === '中午') { return hour >= 11 ? hour : hour + 12; } else if (meridiem === '下午' || meridiem === '晚上') { return hour + 12; } }, meridiem: function (hour, minute, isLower) { var hm = hour * 100 + minute; if (hm < 600) { return '凌晨'; } else if (hm < 900) { return '早上'; } else if (hm < 1130) { return '上午'; } else if (hm < 1230) { return '中午'; } else if (hm < 1800) { return '下午'; } else { return '晚上'; } }, calendar: { sameDay: '[今天] LT', nextDay: '[明天] LT', nextWeek: '[下]dddd LT', lastDay: '[昨天] LT', lastWeek: '[上]dddd LT', sameElse: 'L', }, dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, ordinal: function (number, period) { switch (period) { case 'd': case 'D': case 'DDD': return number + '日'; case 'M': return number + '月'; case 'w': case 'W': return number + '週'; default: return number; } }, relativeTime: { future: '%s後', past: '%s前', s: '幾秒', ss: '%d 秒', m: '1 分鐘', mm: '%d 分鐘', h: '1 小時', hh: '%d 小時', d: '1 天', dd: '%d 天', M: '1 個月', MM: '%d 個月', y: '1 年', yy: '%d 年', }, }); return zhTw; }))); /***/ }), /***/ 95093: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); //! moment.js //! version : 2.29.4 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com ;(function (global, factory) { true ? module.exports = factory() : 0 }(this, (function () { 'use strict'; var hookCallback; function hooks() { return hookCallback.apply(null, arguments); } // This is done to register the method called with moment() // without creating circular dependencies. function setHookCallback(callback) { hookCallback = callback; } function isArray(input) { return ( input instanceof Array || Object.prototype.toString.call(input) === '[object Array]' ); } function isObject(input) { // IE8 will treat undefined and null as object if it wasn't for // input != null return ( input != null && Object.prototype.toString.call(input) === '[object Object]' ); } function hasOwnProp(a, b) { return Object.prototype.hasOwnProperty.call(a, b); } function isObjectEmpty(obj) { if (Object.getOwnPropertyNames) { return Object.getOwnPropertyNames(obj).length === 0; } else { var k; for (k in obj) { if (hasOwnProp(obj, k)) { return false; } } return true; } } function isUndefined(input) { return input === void 0; } function isNumber(input) { return ( typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]' ); } function isDate(input) { return ( input instanceof Date || Object.prototype.toString.call(input) === '[object Date]' ); } function map(arr, fn) { var res = [], i, arrLen = arr.length; for (i = 0; i < arrLen; ++i) { res.push(fn(arr[i], i)); } return res; } function extend(a, b) { for (var i in b) { if (hasOwnProp(b, i)) { a[i] = b[i]; } } if (hasOwnProp(b, 'toString')) { a.toString = b.toString; } if (hasOwnProp(b, 'valueOf')) { a.valueOf = b.valueOf; } return a; } function createUTC(input, format, locale, strict) { return createLocalOrUTC(input, format, locale, strict, true).utc(); } function defaultParsingFlags() { // We need to deep clone this object. return { empty: false, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: false, invalidEra: null, invalidMonth: null, invalidFormat: false, userInvalidated: false, iso: false, parsedDateParts: [], era: null, meridiem: null, rfc2822: false, weekdayMismatch: false, }; } function getParsingFlags(m) { if (m._pf == null) { m._pf = defaultParsingFlags(); } return m._pf; } var some; if (Array.prototype.some) { some = Array.prototype.some; } else { some = function (fun) { var t = Object(this), len = t.length >>> 0, i; for (i = 0; i < len; i++) { if (i in t && fun.call(this, t[i], i, t)) { return true; } } return false; }; } function isValid(m) { if (m._isValid == null) { var flags = getParsingFlags(m), parsedParts = some.call(flags.parsedDateParts, function (i) { return i != null; }), isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || (flags.meridiem && parsedParts)); if (m._strict) { isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; } if (Object.isFrozen == null || !Object.isFrozen(m)) { m._isValid = isNowValid; } else { return isNowValid; } } return m._isValid; } function createInvalid(flags) { var m = createUTC(NaN); if (flags != null) { extend(getParsingFlags(m), flags); } else { getParsingFlags(m).userInvalidated = true; } return m; } // Plugins that add properties should also add the key here (null value), // so we can properly clone ourselves. var momentProperties = (hooks.momentProperties = []), updateInProgress = false; function copyConfig(to, from) { var i, prop, val, momentPropertiesLen = momentProperties.length; if (!isUndefined(from._isAMomentObject)) { to._isAMomentObject = from._isAMomentObject; } if (!isUndefined(from._i)) { to._i = from._i; } if (!isUndefined(from._f)) { to._f = from._f; } if (!isUndefined(from._l)) { to._l = from._l; } if (!isUndefined(from._strict)) { to._strict = from._strict; } if (!isUndefined(from._tzm)) { to._tzm = from._tzm; } if (!isUndefined(from._isUTC)) { to._isUTC = from._isUTC; } if (!isUndefined(from._offset)) { to._offset = from._offset; } if (!isUndefined(from._pf)) { to._pf = getParsingFlags(from); } if (!isUndefined(from._locale)) { to._locale = from._locale; } if (momentPropertiesLen > 0) { for (i = 0; i < momentPropertiesLen; i++) { prop = momentProperties[i]; val = from[prop]; if (!isUndefined(val)) { to[prop] = val; } } } return to; } // Moment prototype object function Moment(config) { copyConfig(this, config); this._d = new Date(config._d != null ? config._d.getTime() : NaN); if (!this.isValid()) { this._d = new Date(NaN); } // Prevent infinite loop in case updateOffset creates new moment // objects. if (updateInProgress === false) { updateInProgress = true; hooks.updateOffset(this); updateInProgress = false; } } function isMoment(obj) { return ( obj instanceof Moment || (obj != null && obj._isAMomentObject != null) ); } function warn(msg) { if ( hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn ) { console.warn('Deprecation warning: ' + msg); } } function deprecate(msg, fn) { var firstTime = true; return extend(function () { if (hooks.deprecationHandler != null) { hooks.deprecationHandler(null, msg); } if (firstTime) { var args = [], arg, i, key, argLen = arguments.length; for (i = 0; i < argLen; i++) { arg = ''; if (typeof arguments[i] === 'object') { arg += '\n[' + i + '] '; for (key in arguments[0]) { if (hasOwnProp(arguments[0], key)) { arg += key + ': ' + arguments[0][key] + ', '; } } arg = arg.slice(0, -2); // Remove trailing comma and space } else { arg = arguments[i]; } args.push(arg); } warn( msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + new Error().stack ); firstTime = false; } return fn.apply(this, arguments); }, fn); } var deprecations = {}; function deprecateSimple(name, msg) { if (hooks.deprecationHandler != null) { hooks.deprecationHandler(name, msg); } if (!deprecations[name]) { warn(msg); deprecations[name] = true; } } hooks.suppressDeprecationWarnings = false; hooks.deprecationHandler = null; function isFunction(input) { return ( (typeof Function !== 'undefined' && input instanceof Function) || Object.prototype.toString.call(input) === '[object Function]' ); } function set(config) { var prop, i; for (i in config) { if (hasOwnProp(config, i)) { prop = config[i]; if (isFunction(prop)) { this[i] = prop; } else { this['_' + i] = prop; } } } this._config = config; // Lenient ordinal parsing accepts just a number in addition to // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. // TODO: Remove "ordinalParse" fallback in next major release. this._dayOfMonthOrdinalParseLenient = new RegExp( (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source ); } function mergeConfigs(parentConfig, childConfig) { var res = extend({}, parentConfig), prop; for (prop in childConfig) { if (hasOwnProp(childConfig, prop)) { if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { res[prop] = {}; extend(res[prop], parentConfig[prop]); extend(res[prop], childConfig[prop]); } else if (childConfig[prop] != null) { res[prop] = childConfig[prop]; } else { delete res[prop]; } } } for (prop in parentConfig) { if ( hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop]) ) { // make sure changes to properties don't modify parent config res[prop] = extend({}, res[prop]); } } return res; } function Locale(config) { if (config != null) { this.set(config); } } var keys; if (Object.keys) { keys = Object.keys; } else { keys = function (obj) { var i, res = []; for (i in obj) { if (hasOwnProp(obj, i)) { res.push(i); } } return res; }; } var defaultCalendar = { sameDay: '[Today at] LT', nextDay: '[Tomorrow at] LT', nextWeek: 'dddd [at] LT', lastDay: '[Yesterday at] LT', lastWeek: '[Last] dddd [at] LT', sameElse: 'L', }; function calendar(key, mom, now) { var output = this._calendar[key] || this._calendar['sameElse']; return isFunction(output) ? output.call(mom, now) : output; } function zeroFill(number, targetLength, forceSign) { var absNumber = '' + Math.abs(number), zerosToFill = targetLength - absNumber.length, sign = number >= 0; return ( (sign ? (forceSign ? '+' : '') : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber ); } var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, formatFunctions = {}, formatTokenFunctions = {}; // token: 'M' // padded: ['MM', 2] // ordinal: 'Mo' // callback: function () { this.month() + 1 } function addFormatToken(token, padded, ordinal, callback) { var func = callback; if (typeof callback === 'string') { func = function () { return this[callback](); }; } if (token) { formatTokenFunctions[token] = func; } if (padded) { formatTokenFunctions[padded[0]] = function () { return zeroFill(func.apply(this, arguments), padded[1], padded[2]); }; } if (ordinal) { formatTokenFunctions[ordinal] = function () { return this.localeData().ordinal( func.apply(this, arguments), token ); }; } } function removeFormattingTokens(input) { if (input.match(/\[[\s\S]/)) { return input.replace(/^\[|\]$/g, ''); } return input.replace(/\\/g, ''); } function makeFormatFunction(format) { var array = format.match(formattingTokens), i, length; for (i = 0, length = array.length; i < length; i++) { if (formatTokenFunctions[array[i]]) { array[i] = formatTokenFunctions[array[i]]; } else { array[i] = removeFormattingTokens(array[i]); } } return function (mom) { var output = '', i; for (i = 0; i < length; i++) { output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; } return output; }; } // format date using native date object function formatMoment(m, format) { if (!m.isValid()) { return m.localeData().invalidDate(); } format = expandFormat(format, m.localeData()); formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); return formatFunctions[format](m); } function expandFormat(format, locale) { var i = 5; function replaceLongDateFormatTokens(input) { return locale.longDateFormat(input) || input; } localFormattingTokens.lastIndex = 0; while (i >= 0 && localFormattingTokens.test(format)) { format = format.replace( localFormattingTokens, replaceLongDateFormatTokens ); localFormattingTokens.lastIndex = 0; i -= 1; } return format; } var defaultLongDateFormat = { LTS: 'h:mm:ss A', LT: 'h:mm A', L: 'MM/DD/YYYY', LL: 'MMMM D, YYYY', LLL: 'MMMM D, YYYY h:mm A', LLLL: 'dddd, MMMM D, YYYY h:mm A', }; function longDateFormat(key) { var format = this._longDateFormat[key], formatUpper = this._longDateFormat[key.toUpperCase()]; if (format || !formatUpper) { return format; } this._longDateFormat[key] = formatUpper .match(formattingTokens) .map(function (tok) { if ( tok === 'MMMM' || tok === 'MM' || tok === 'DD' || tok === 'dddd' ) { return tok.slice(1); } return tok; }) .join(''); return this._longDateFormat[key]; } var defaultInvalidDate = 'Invalid date'; function invalidDate() { return this._invalidDate; } var defaultOrdinal = '%d', defaultDayOfMonthOrdinalParse = /\d{1,2}/; function ordinal(number) { return this._ordinal.replace('%d', number); } var defaultRelativeTime = { future: 'in %s', past: '%s ago', s: 'a few seconds', ss: '%d seconds', m: 'a minute', mm: '%d minutes', h: 'an hour', hh: '%d hours', d: 'a day', dd: '%d days', w: 'a week', ww: '%d weeks', M: 'a month', MM: '%d months', y: 'a year', yy: '%d years', }; function relativeTime(number, withoutSuffix, string, isFuture) { var output = this._relativeTime[string]; return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); } function pastFuture(diff, output) { var format = this._relativeTime[diff > 0 ? 'future' : 'past']; return isFunction(format) ? format(output) : format.replace(/%s/i, output); } var aliases = {}; function addUnitAlias(unit, shorthand) { var lowerCase = unit.toLowerCase(); aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; } function normalizeUnits(units) { return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; } function normalizeObjectUnits(inputObject) { var normalizedInput = {}, normalizedProp, prop; for (prop in inputObject) { if (hasOwnProp(inputObject, prop)) { normalizedProp = normalizeUnits(prop); if (normalizedProp) { normalizedInput[normalizedProp] = inputObject[prop]; } } } return normalizedInput; } var priorities = {}; function addUnitPriority(unit, priority) { priorities[unit] = priority; } function getPrioritizedUnits(unitsObj) { var units = [], u; for (u in unitsObj) { if (hasOwnProp(unitsObj, u)) { units.push({ unit: u, priority: priorities[u] }); } } units.sort(function (a, b) { return a.priority - b.priority; }); return units; } function isLeapYear(year) { return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; } function absFloor(number) { if (number < 0) { // -0 -> 0 return Math.ceil(number) || 0; } else { return Math.floor(number); } } function toInt(argumentForCoercion) { var coercedNumber = +argumentForCoercion, value = 0; if (coercedNumber !== 0 && isFinite(coercedNumber)) { value = absFloor(coercedNumber); } return value; } function makeGetSet(unit, keepTime) { return function (value) { if (value != null) { set$1(this, unit, value); hooks.updateOffset(this, keepTime); return this; } else { return get(this, unit); } }; } function get(mom, unit) { return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; } function set$1(mom, unit, value) { if (mom.isValid() && !isNaN(value)) { if ( unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29 ) { value = toInt(value); mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit]( value, mom.month(), daysInMonth(value, mom.month()) ); } else { mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); } } } // MOMENTS function stringGet(units) { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](); } return this; } function stringSet(units, value) { if (typeof units === 'object') { units = normalizeObjectUnits(units); var prioritized = getPrioritizedUnits(units), i, prioritizedLen = prioritized.length; for (i = 0; i < prioritizedLen; i++) { this[prioritized[i].unit](units[prioritized[i].unit]); } } else { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](value); } } return this; } var match1 = /\d/, // 0 - 9 match2 = /\d\d/, // 00 - 99 match3 = /\d{3}/, // 000 - 999 match4 = /\d{4}/, // 0000 - 9999 match6 = /[+-]?\d{6}/, // -999999 - 999999 match1to2 = /\d\d?/, // 0 - 99 match3to4 = /\d\d\d\d?/, // 999 - 9999 match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999 match1to3 = /\d{1,3}/, // 0 - 999 match1to4 = /\d{1,4}/, // 0 - 9999 match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999 matchUnsigned = /\d+/, // 0 - inf matchSigned = /[+-]?\d+/, // -inf - inf matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 // any word (or two) characters or numbers including two/three word month in arabic. // includes scottish gaelic two word and hyphenated months matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, regexes; regexes = {}; function addRegexToken(token, regex, strictRegex) { regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { return isStrict && strictRegex ? strictRegex : regex; }; } function getParseRegexForToken(token, config) { if (!hasOwnProp(regexes, token)) { return new RegExp(unescapeFormat(token)); } return regexes[token](config._strict, config._locale); } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript function unescapeFormat(s) { return regexEscape( s .replace('\\', '') .replace( /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; } ) ); } function regexEscape(s) { return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); } var tokens = {}; function addParseToken(token, callback) { var i, func = callback, tokenLen; if (typeof token === 'string') { token = [token]; } if (isNumber(callback)) { func = function (input, array) { array[callback] = toInt(input); }; } tokenLen = token.length; for (i = 0; i < tokenLen; i++) { tokens[token[i]] = func; } } function addWeekParseToken(token, callback) { addParseToken(token, function (input, array, config, token) { config._w = config._w || {}; callback(input, config._w, config, token); }); } function addTimeToArrayFromToken(token, input, config) { if (input != null && hasOwnProp(tokens, token)) { tokens[token](input, config._a, config, token); } } var YEAR = 0, MONTH = 1, DATE = 2, HOUR = 3, MINUTE = 4, SECOND = 5, MILLISECOND = 6, WEEK = 7, WEEKDAY = 8; function mod(n, x) { return ((n % x) + x) % x; } var indexOf; if (Array.prototype.indexOf) { indexOf = Array.prototype.indexOf; } else { indexOf = function (o) { // I know var i; for (i = 0; i < this.length; ++i) { if (this[i] === o) { return i; } } return -1; }; } function daysInMonth(year, month) { if (isNaN(year) || isNaN(month)) { return NaN; } var modMonth = mod(month, 12); year += (month - modMonth) / 12; return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - ((modMonth % 7) % 2); } // FORMATTING addFormatToken('M', ['MM', 2], 'Mo', function () { return this.month() + 1; }); addFormatToken('MMM', 0, 0, function (format) { return this.localeData().monthsShort(this, format); }); addFormatToken('MMMM', 0, 0, function (format) { return this.localeData().months(this, format); }); // ALIASES addUnitAlias('month', 'M'); // PRIORITY addUnitPriority('month', 8); // PARSING addRegexToken('M', match1to2); addRegexToken('MM', match1to2, match2); addRegexToken('MMM', function (isStrict, locale) { return locale.monthsShortRegex(isStrict); }); addRegexToken('MMMM', function (isStrict, locale) { return locale.monthsRegex(isStrict); }); addParseToken(['M', 'MM'], function (input, array) { array[MONTH] = toInt(input) - 1; }); addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. if (month != null) { array[MONTH] = month; } else { getParsingFlags(config).invalidMonth = input; } }); // LOCALES var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split( '_' ), defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, defaultMonthsShortRegex = matchWord, defaultMonthsRegex = matchWord; function localeMonths(m, format) { if (!m) { return isArray(this._months) ? this._months : this._months['standalone']; } return isArray(this._months) ? this._months[m.month()] : this._months[ (this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone' ][m.month()]; } function localeMonthsShort(m, format) { if (!m) { return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone']; } return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[ MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone' ][m.month()]; } function handleStrictParse(monthName, format, strict) { var i, ii, mom, llc = monthName.toLocaleLowerCase(); if (!this._monthsParse) { // this is not used this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; for (i = 0; i < 12; ++i) { mom = createUTC([2000, i]); this._shortMonthsParse[i] = this.monthsShort( mom, '' ).toLocaleLowerCase(); this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); } } if (strict) { if (format === 'MMM') { ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } } else { if (format === 'MMM') { ii = indexOf.call(this._shortMonthsParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } } } function localeMonthsParse(monthName, format, strict) { var i, mom, regex; if (this._monthsParseExact) { return handleStrictParse.call(this, monthName, format, strict); } if (!this._monthsParse) { this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; } // TODO: add sorting // Sorting makes sure if one month (or abbr) is a prefix of another // see sorting in computeMonthsParse for (i = 0; i < 12; i++) { // make the regex if we don't have it already mom = createUTC([2000, i]); if (strict && !this._longMonthsParse[i]) { this._longMonthsParse[i] = new RegExp( '^' + this.months(mom, '').replace('.', '') + '$', 'i' ); this._shortMonthsParse[i] = new RegExp( '^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i' ); } if (!strict && !this._monthsParse[i]) { regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex if ( strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName) ) { return i; } else if ( strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName) ) { return i; } else if (!strict && this._monthsParse[i].test(monthName)) { return i; } } } // MOMENTS function setMonth(mom, value) { var dayOfMonth; if (!mom.isValid()) { // No op return mom; } if (typeof value === 'string') { if (/^\d+$/.test(value)) { value = toInt(value); } else { value = mom.localeData().monthsParse(value); // TODO: Another silent failure? if (!isNumber(value)) { return mom; } } } dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); return mom; } function getSetMonth(value) { if (value != null) { setMonth(this, value); hooks.updateOffset(this, true); return this; } else { return get(this, 'Month'); } } function getDaysInMonth() { return daysInMonth(this.year(), this.month()); } function monthsShortRegex(isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, '_monthsRegex')) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsShortStrictRegex; } else { return this._monthsShortRegex; } } else { if (!hasOwnProp(this, '_monthsShortRegex')) { this._monthsShortRegex = defaultMonthsShortRegex; } return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; } } function monthsRegex(isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, '_monthsRegex')) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsStrictRegex; } else { return this._monthsRegex; } } else { if (!hasOwnProp(this, '_monthsRegex')) { this._monthsRegex = defaultMonthsRegex; } return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; } } function computeMonthsParse() { function cmpLenRev(a, b) { return b.length - a.length; } var shortPieces = [], longPieces = [], mixedPieces = [], i, mom; for (i = 0; i < 12; i++) { // make the regex if we don't have it already mom = createUTC([2000, i]); shortPieces.push(this.monthsShort(mom, '')); longPieces.push(this.months(mom, '')); mixedPieces.push(this.months(mom, '')); mixedPieces.push(this.monthsShort(mom, '')); } // Sorting makes sure if one month (or abbr) is a prefix of another it // will match the longer piece. shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i = 0; i < 12; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); } for (i = 0; i < 24; i++) { mixedPieces[i] = regexEscape(mixedPieces[i]); } this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._monthsShortRegex = this._monthsRegex; this._monthsStrictRegex = new RegExp( '^(' + longPieces.join('|') + ')', 'i' ); this._monthsShortStrictRegex = new RegExp( '^(' + shortPieces.join('|') + ')', 'i' ); } // FORMATTING addFormatToken('Y', 0, 0, function () { var y = this.year(); return y <= 9999 ? zeroFill(y, 4) : '+' + y; }); addFormatToken(0, ['YY', 2], 0, function () { return this.year() % 100; }); addFormatToken(0, ['YYYY', 4], 0, 'year'); addFormatToken(0, ['YYYYY', 5], 0, 'year'); addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES addUnitAlias('year', 'y'); // PRIORITIES addUnitPriority('year', 1); // PARSING addRegexToken('Y', matchSigned); addRegexToken('YY', match1to2, match2); addRegexToken('YYYY', match1to4, match4); addRegexToken('YYYYY', match1to6, match6); addRegexToken('YYYYYY', match1to6, match6); addParseToken(['YYYYY', 'YYYYYY'], YEAR); addParseToken('YYYY', function (input, array) { array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); }); addParseToken('YY', function (input, array) { array[YEAR] = hooks.parseTwoDigitYear(input); }); addParseToken('Y', function (input, array) { array[YEAR] = parseInt(input, 10); }); // HELPERS function daysInYear(year) { return isLeapYear(year) ? 366 : 365; } // HOOKS hooks.parseTwoDigitYear = function (input) { return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); }; // MOMENTS var getSetYear = makeGetSet('FullYear', true); function getIsLeapYear() { return isLeapYear(this.year()); } function createDate(y, m, d, h, M, s, ms) { // can't just apply() to create a date: // https://stackoverflow.com/q/181348 var date; // the date constructor remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0) { // preserve leap years using a full 400 year cycle, then reset date = new Date(y + 400, m, d, h, M, s, ms); if (isFinite(date.getFullYear())) { date.setFullYear(y); } } else { date = new Date(y, m, d, h, M, s, ms); } return date; } function createUTCDate(y) { var date, args; // the Date.UTC function remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0) { args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset args[0] = y + 400; date = new Date(Date.UTC.apply(null, args)); if (isFinite(date.getUTCFullYear())) { date.setUTCFullYear(y); } } else { date = new Date(Date.UTC.apply(null, arguments)); } return date; } // start-of-first-week - start-of-year function firstWeekOffset(year, dow, doy) { var // first-week day -- which january is always in the first week (4 for iso, 1 for other) fwd = 7 + dow - doy, // first-week day local weekday -- which local weekday is fwd fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; return -fwdlw + fwd - 1; } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday function dayOfYearFromWeeks(year, week, weekday, dow, doy) { var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear; if (dayOfYear <= 0) { resYear = year - 1; resDayOfYear = daysInYear(resYear) + dayOfYear; } else if (dayOfYear > daysInYear(year)) { resYear = year + 1; resDayOfYear = dayOfYear - daysInYear(year); } else { resYear = year; resDayOfYear = dayOfYear; } return { year: resYear, dayOfYear: resDayOfYear, }; } function weekOfYear(mom, dow, doy) { var weekOffset = firstWeekOffset(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear; if (week < 1) { resYear = mom.year() - 1; resWeek = week + weeksInYear(resYear, dow, doy); } else if (week > weeksInYear(mom.year(), dow, doy)) { resWeek = week - weeksInYear(mom.year(), dow, doy); resYear = mom.year() + 1; } else { resYear = mom.year(); resWeek = week; } return { week: resWeek, year: resYear, }; } function weeksInYear(year, dow, doy) { var weekOffset = firstWeekOffset(year, dow, doy), weekOffsetNext = firstWeekOffset(year + 1, dow, doy); return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; } // FORMATTING addFormatToken('w', ['ww', 2], 'wo', 'week'); addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES addUnitAlias('week', 'w'); addUnitAlias('isoWeek', 'W'); // PRIORITIES addUnitPriority('week', 5); addUnitPriority('isoWeek', 5); // PARSING addRegexToken('w', match1to2); addRegexToken('ww', match1to2, match2); addRegexToken('W', match1to2); addRegexToken('WW', match1to2, match2); addWeekParseToken( ['w', 'ww', 'W', 'WW'], function (input, week, config, token) { week[token.substr(0, 1)] = toInt(input); } ); // HELPERS // LOCALES function localeWeek(mom) { return weekOfYear(mom, this._week.dow, this._week.doy).week; } var defaultLocaleWeek = { dow: 0, // Sunday is the first day of the week. doy: 6, // The week that contains Jan 6th is the first week of the year. }; function localeFirstDayOfWeek() { return this._week.dow; } function localeFirstDayOfYear() { return this._week.doy; } // MOMENTS function getSetWeek(input) { var week = this.localeData().week(this); return input == null ? week : this.add((input - week) * 7, 'd'); } function getSetISOWeek(input) { var week = weekOfYear(this, 1, 4).week; return input == null ? week : this.add((input - week) * 7, 'd'); } // FORMATTING addFormatToken('d', 0, 'do', 'day'); addFormatToken('dd', 0, 0, function (format) { return this.localeData().weekdaysMin(this, format); }); addFormatToken('ddd', 0, 0, function (format) { return this.localeData().weekdaysShort(this, format); }); addFormatToken('dddd', 0, 0, function (format) { return this.localeData().weekdays(this, format); }); addFormatToken('e', 0, 0, 'weekday'); addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES addUnitAlias('day', 'd'); addUnitAlias('weekday', 'e'); addUnitAlias('isoWeekday', 'E'); // PRIORITY addUnitPriority('day', 11); addUnitPriority('weekday', 11); addUnitPriority('isoWeekday', 11); // PARSING addRegexToken('d', match1to2); addRegexToken('e', match1to2); addRegexToken('E', match1to2); addRegexToken('dd', function (isStrict, locale) { return locale.weekdaysMinRegex(isStrict); }); addRegexToken('ddd', function (isStrict, locale) { return locale.weekdaysShortRegex(isStrict); }); addRegexToken('dddd', function (isStrict, locale) { return locale.weekdaysRegex(isStrict); }); addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid if (weekday != null) { week.d = weekday; } else { getParsingFlags(config).invalidWeekday = input; } }); addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { week[token] = toInt(input); }); // HELPERS function parseWeekday(input, locale) { if (typeof input !== 'string') { return input; } if (!isNaN(input)) { return parseInt(input, 10); } input = locale.weekdaysParse(input); if (typeof input === 'number') { return input; } return null; } function parseIsoWeekday(input, locale) { if (typeof input === 'string') { return locale.weekdaysParse(input) % 7 || 7; } return isNaN(input) ? null : input; } // LOCALES function shiftWeekdays(ws, n) { return ws.slice(n, 7).concat(ws.slice(0, n)); } var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord; function localeWeekdays(m, format) { var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[ m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone' ]; return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays; } function localeWeekdaysShort(m) { return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort; } function localeWeekdaysMin(m) { return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin; } function handleStrictParse$1(weekdayName, format, strict) { var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); if (!this._weekdaysParse) { this._weekdaysParse = []; this._shortWeekdaysParse = []; this._minWeekdaysParse = []; for (i = 0; i < 7; ++i) { mom = createUTC([2000, 1]).day(i); this._minWeekdaysParse[i] = this.weekdaysMin( mom, '' ).toLocaleLowerCase(); this._shortWeekdaysParse[i] = this.weekdaysShort( mom, '' ).toLocaleLowerCase(); this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); } } if (strict) { if (format === 'dddd') { ii = indexOf.call(this._weekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format === 'ddd') { ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } } else { if (format === 'dddd') { ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format === 'ddd') { ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } } } function localeWeekdaysParse(weekdayName, format, strict) { var i, mom, regex; if (this._weekdaysParseExact) { return handleStrictParse$1.call(this, weekdayName, format, strict); } if (!this._weekdaysParse) { this._weekdaysParse = []; this._minWeekdaysParse = []; this._shortWeekdaysParse = []; this._fullWeekdaysParse = []; } for (i = 0; i < 7; i++) { // make the regex if we don't have it already mom = createUTC([2000, 1]).day(i); if (strict && !this._fullWeekdaysParse[i]) { this._fullWeekdaysParse[i] = new RegExp( '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i' ); this._shortWeekdaysParse[i] = new RegExp( '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i' ); this._minWeekdaysParse[i] = new RegExp( '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i' ); } if (!this._weekdaysParse[i]) { regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex if ( strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName) ) { return i; } else if ( strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName) ) { return i; } else if ( strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName) ) { return i; } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { return i; } } } // MOMENTS function getSetDayOfWeek(input) { if (!this.isValid()) { return input != null ? this : NaN; } var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); if (input != null) { input = parseWeekday(input, this.localeData()); return this.add(input - day, 'd'); } else { return day; } } function getSetLocaleDayOfWeek(input) { if (!this.isValid()) { return input != null ? this : NaN; } var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; return input == null ? weekday : this.add(input - weekday, 'd'); } function getSetISODayOfWeek(input) { if (!this.isValid()) { return input != null ? this : NaN; } // behaves the same as moment#day except // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) // as a setter, sunday should belong to the previous week. if (input != null) { var weekday = parseIsoWeekday(input, this.localeData()); return this.day(this.day() % 7 ? weekday : weekday - 7); } else { return this.day() || 7; } } function weekdaysRegex(isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysStrictRegex; } else { return this._weekdaysRegex; } } else { if (!hasOwnProp(this, '_weekdaysRegex')) { this._weekdaysRegex = defaultWeekdaysRegex; } return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; } } function weekdaysShortRegex(isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysShortStrictRegex; } else { return this._weekdaysShortRegex; } } else { if (!hasOwnProp(this, '_weekdaysShortRegex')) { this._weekdaysShortRegex = defaultWeekdaysShortRegex; } return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; } } function weekdaysMinRegex(isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysMinStrictRegex; } else { return this._weekdaysMinRegex; } } else { if (!hasOwnProp(this, '_weekdaysMinRegex')) { this._weekdaysMinRegex = defaultWeekdaysMinRegex; } return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; } } function computeWeekdaysParse() { function cmpLenRev(a, b) { return b.length - a.length; } var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp; for (i = 0; i < 7; i++) { // make the regex if we don't have it already mom = createUTC([2000, 1]).day(i); minp = regexEscape(this.weekdaysMin(mom, '')); shortp = regexEscape(this.weekdaysShort(mom, '')); longp = regexEscape(this.weekdays(mom, '')); minPieces.push(minp); shortPieces.push(shortp); longPieces.push(longp); mixedPieces.push(minp); mixedPieces.push(shortp); mixedPieces.push(longp); } // Sorting makes sure if one weekday (or abbr) is a prefix of another it // will match the longer piece. minPieces.sort(cmpLenRev); shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._weekdaysShortRegex = this._weekdaysRegex; this._weekdaysMinRegex = this._weekdaysRegex; this._weekdaysStrictRegex = new RegExp( '^(' + longPieces.join('|') + ')', 'i' ); this._weekdaysShortStrictRegex = new RegExp( '^(' + shortPieces.join('|') + ')', 'i' ); this._weekdaysMinStrictRegex = new RegExp( '^(' + minPieces.join('|') + ')', 'i' ); } // FORMATTING function hFormat() { return this.hours() % 12 || 12; } function kFormat() { return this.hours() || 24; } addFormatToken('H', ['HH', 2], 0, 'hour'); addFormatToken('h', ['hh', 2], 0, hFormat); addFormatToken('k', ['kk', 2], 0, kFormat); addFormatToken('hmm', 0, 0, function () { return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); }); addFormatToken('hmmss', 0, 0, function () { return ( '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2) ); }); addFormatToken('Hmm', 0, 0, function () { return '' + this.hours() + zeroFill(this.minutes(), 2); }); addFormatToken('Hmmss', 0, 0, function () { return ( '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2) ); }); function meridiem(token, lowercase) { addFormatToken(token, 0, 0, function () { return this.localeData().meridiem( this.hours(), this.minutes(), lowercase ); }); } meridiem('a', true); meridiem('A', false); // ALIASES addUnitAlias('hour', 'h'); // PRIORITY addUnitPriority('hour', 13); // PARSING function matchMeridiem(isStrict, locale) { return locale._meridiemParse; } addRegexToken('a', matchMeridiem); addRegexToken('A', matchMeridiem); addRegexToken('H', match1to2); addRegexToken('h', match1to2); addRegexToken('k', match1to2); addRegexToken('HH', match1to2, match2); addRegexToken('hh', match1to2, match2); addRegexToken('kk', match1to2, match2); addRegexToken('hmm', match3to4); addRegexToken('hmmss', match5to6); addRegexToken('Hmm', match3to4); addRegexToken('Hmmss', match5to6); addParseToken(['H', 'HH'], HOUR); addParseToken(['k', 'kk'], function (input, array, config) { var kInput = toInt(input); array[HOUR] = kInput === 24 ? 0 : kInput; }); addParseToken(['a', 'A'], function (input, array, config) { config._isPm = config._locale.isPM(input); config._meridiem = input; }); addParseToken(['h', 'hh'], function (input, array, config) { array[HOUR] = toInt(input); getParsingFlags(config).bigHour = true; }); addParseToken('hmm', function (input, array, config) { var pos = input.length - 2; array[HOUR] = toInt(input.substr(0, pos)); array[MINUTE] = toInt(input.substr(pos)); getParsingFlags(config).bigHour = true; }); addParseToken('hmmss', function (input, array, config) { var pos1 = input.length - 4, pos2 = input.length - 2; array[HOUR] = toInt(input.substr(0, pos1)); array[MINUTE] = toInt(input.substr(pos1, 2)); array[SECOND] = toInt(input.substr(pos2)); getParsingFlags(config).bigHour = true; }); addParseToken('Hmm', function (input, array, config) { var pos = input.length - 2; array[HOUR] = toInt(input.substr(0, pos)); array[MINUTE] = toInt(input.substr(pos)); }); addParseToken('Hmmss', function (input, array, config) { var pos1 = input.length - 4, pos2 = input.length - 2; array[HOUR] = toInt(input.substr(0, pos1)); array[MINUTE] = toInt(input.substr(pos1, 2)); array[SECOND] = toInt(input.substr(pos2)); }); // LOCALES function localeIsPM(input) { // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays // Using charAt should be more compatible. return (input + '').toLowerCase().charAt(0) === 'p'; } var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, // Setting the hour should keep the time, because the user explicitly // specified which hour they want. So trying to maintain the same hour (in // a new timezone) makes sense. Adding/subtracting hours does not follow // this rule. getSetHour = makeGetSet('Hours', true); function localeMeridiem(hours, minutes, isLower) { if (hours > 11) { return isLower ? 'pm' : 'PM'; } else { return isLower ? 'am' : 'AM'; } } var baseConfig = { calendar: defaultCalendar, longDateFormat: defaultLongDateFormat, invalidDate: defaultInvalidDate, ordinal: defaultOrdinal, dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, relativeTime: defaultRelativeTime, months: defaultLocaleMonths, monthsShort: defaultLocaleMonthsShort, week: defaultLocaleWeek, weekdays: defaultLocaleWeekdays, weekdaysMin: defaultLocaleWeekdaysMin, weekdaysShort: defaultLocaleWeekdaysShort, meridiemParse: defaultLocaleMeridiemParse, }; // internal storage for locale config files var locales = {}, localeFamilies = {}, globalLocale; function commonPrefix(arr1, arr2) { var i, minl = Math.min(arr1.length, arr2.length); for (i = 0; i < minl; i += 1) { if (arr1[i] !== arr2[i]) { return i; } } return minl; } function normalizeLocale(key) { return key ? key.toLowerCase().replace('_', '-') : key; } // pick the locale from the array // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root function chooseLocale(names) { var i = 0, j, next, locale, split; while (i < names.length) { split = normalizeLocale(names[i]).split('-'); j = split.length; next = normalizeLocale(names[i + 1]); next = next ? next.split('-') : null; while (j > 0) { locale = loadLocale(split.slice(0, j).join('-')); if (locale) { return locale; } if ( next && next.length >= j && commonPrefix(split, next) >= j - 1 ) { //the next array item is better than a shallower substring of this one break; } j--; } i++; } return globalLocale; } function isLocaleNameSane(name) { // Prevent names that look like filesystem paths, i.e contain '/' or '\' return name.match('^[^/\\\\]*$') != null; } function loadLocale(name) { var oldLocale = null, aliasedRequire; // TODO: Find a better way to register and load all the locales in Node if ( locales[name] === undefined && "object" !== 'undefined' && module && module.exports && isLocaleNameSane(name) ) { try { oldLocale = globalLocale._abbr; aliasedRequire = undefined; __webpack_require__(46520)("./" + name); getSetGlobalLocale(oldLocale); } catch (e) { // mark as not found to avoid repeating expensive file require call causing high CPU // when trying to find en-US, en_US, en-us for every format call locales[name] = null; // null means not found } } return locales[name]; } // This function will load locale and then set the global locale. If // no arguments are passed in, it will simply return the current global // locale key. function getSetGlobalLocale(key, values) { var data; if (key) { if (isUndefined(values)) { data = getLocale(key); } else { data = defineLocale(key, values); } if (data) { // moment.duration._locale = moment._locale = data; globalLocale = data; } else { if (typeof console !== 'undefined' && console.warn) { //warn user if arguments are passed but the locale could not be set console.warn( 'Locale ' + key + ' not found. Did you forget to load it?' ); } } } return globalLocale._abbr; } function defineLocale(name, config) { if (config !== null) { var locale, parentConfig = baseConfig; config.abbr = name; if (locales[name] != null) { deprecateSimple( 'defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' ); parentConfig = locales[name]._config; } else if (config.parentLocale != null) { if (locales[config.parentLocale] != null) { parentConfig = locales[config.parentLocale]._config; } else { locale = loadLocale(config.parentLocale); if (locale != null) { parentConfig = locale._config; } else { if (!localeFamilies[config.parentLocale]) { localeFamilies[config.parentLocale] = []; } localeFamilies[config.parentLocale].push({ name: name, config: config, }); return null; } } } locales[name] = new Locale(mergeConfigs(parentConfig, config)); if (localeFamilies[name]) { localeFamilies[name].forEach(function (x) { defineLocale(x.name, x.config); }); } // backwards compat for now: also set the locale // make sure we set the locale AFTER all child locales have been // created, so we won't end up with the child locale set. getSetGlobalLocale(name); return locales[name]; } else { // useful for testing delete locales[name]; return null; } } function updateLocale(name, config) { if (config != null) { var locale, tmpLocale, parentConfig = baseConfig; if (locales[name] != null && locales[name].parentLocale != null) { // Update existing child locale in-place to avoid memory-leaks locales[name].set(mergeConfigs(locales[name]._config, config)); } else { // MERGE tmpLocale = loadLocale(name); if (tmpLocale != null) { parentConfig = tmpLocale._config; } config = mergeConfigs(parentConfig, config); if (tmpLocale == null) { // updateLocale is called for creating a new locale // Set abbr so it will have a name (getters return // undefined otherwise). config.abbr = name; } locale = new Locale(config); locale.parentLocale = locales[name]; locales[name] = locale; } // backwards compat for now: also set the locale getSetGlobalLocale(name); } else { // pass null for config to unupdate, useful for tests if (locales[name] != null) { if (locales[name].parentLocale != null) { locales[name] = locales[name].parentLocale; if (name === getSetGlobalLocale()) { getSetGlobalLocale(name); } } else if (locales[name] != null) { delete locales[name]; } } } return locales[name]; } // returns locale data function getLocale(key) { var locale; if (key && key._locale && key._locale._abbr) { key = key._locale._abbr; } if (!key) { return globalLocale; } if (!isArray(key)) { //short-circuit everything else locale = loadLocale(key); if (locale) { return locale; } key = [key]; } return chooseLocale(key); } function listLocales() { return keys(locales); } function checkOverflow(m) { var overflow, a = m._a; if (a && getParsingFlags(m).overflow === -2) { overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; if ( getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE) ) { overflow = DATE; } if (getParsingFlags(m)._overflowWeeks && overflow === -1) { overflow = WEEK; } if (getParsingFlags(m)._overflowWeekday && overflow === -1) { overflow = WEEKDAY; } getParsingFlags(m).overflow = overflow; } return m; } // iso 8601 regex // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, isoDates = [ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/], ['YYYYMM', /\d{6}/, false], ['YYYY', /\d{4}/, false], ], // iso time formats and regexes isoTimes = [ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/], ], aspNetJsonRegex = /^\/?Date\((-?\d+)/i, // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, obsOffsets = { UT: 0, GMT: 0, EDT: -4 * 60, EST: -5 * 60, CDT: -5 * 60, CST: -6 * 60, MDT: -6 * 60, MST: -7 * 60, PDT: -7 * 60, PST: -8 * 60, }; // date from iso format function configFromISO(config) { var i, l, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat, isoDatesLen = isoDates.length, isoTimesLen = isoTimes.length; if (match) { getParsingFlags(config).iso = true; for (i = 0, l = isoDatesLen; i < l; i++) { if (isoDates[i][1].exec(match[1])) { dateFormat = isoDates[i][0]; allowTime = isoDates[i][2] !== false; break; } } if (dateFormat == null) { config._isValid = false; return; } if (match[3]) { for (i = 0, l = isoTimesLen; i < l; i++) { if (isoTimes[i][1].exec(match[3])) { // match[2] should be 'T' or space timeFormat = (match[2] || ' ') + isoTimes[i][0]; break; } } if (timeFormat == null) { config._isValid = false; return; } } if (!allowTime && timeFormat != null) { config._isValid = false; return; } if (match[4]) { if (tzRegex.exec(match[4])) { tzFormat = 'Z'; } else { config._isValid = false; return; } } config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); configFromStringAndFormat(config); } else { config._isValid = false; } } function extractFromRFC2822Strings( yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr ) { var result = [ untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10), ]; if (secondStr) { result.push(parseInt(secondStr, 10)); } return result; } function untruncateYear(yearStr) { var year = parseInt(yearStr, 10); if (year <= 49) { return 2000 + year; } else if (year <= 999) { return 1900 + year; } return year; } function preprocessRFC2822(s) { // Remove comments and folding whitespace and replace multiple-spaces with a single space return s .replace(/\([^()]*\)|[\n\t]/g, ' ') .replace(/(\s\s+)/g, ' ') .replace(/^\s\s*/, '') .replace(/\s\s*$/, ''); } function checkWeekday(weekdayStr, parsedInput, config) { if (weekdayStr) { // TODO: Replace the vanilla JS Date object with an independent day-of-week check. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), weekdayActual = new Date( parsedInput[0], parsedInput[1], parsedInput[2] ).getDay(); if (weekdayProvided !== weekdayActual) { getParsingFlags(config).weekdayMismatch = true; config._isValid = false; return false; } } return true; } function calculateOffset(obsOffset, militaryOffset, numOffset) { if (obsOffset) { return obsOffsets[obsOffset]; } else if (militaryOffset) { // the only allowed military tz is Z return 0; } else { var hm = parseInt(numOffset, 10), m = hm % 100, h = (hm - m) / 100; return h * 60 + m; } } // date and time from ref 2822 format function configFromRFC2822(config) { var match = rfc2822.exec(preprocessRFC2822(config._i)), parsedArray; if (match) { parsedArray = extractFromRFC2822Strings( match[4], match[3], match[2], match[5], match[6], match[7] ); if (!checkWeekday(match[1], parsedArray, config)) { return; } config._a = parsedArray; config._tzm = calculateOffset(match[8], match[9], match[10]); config._d = createUTCDate.apply(null, config._a); config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); getParsingFlags(config).rfc2822 = true; } else { config._isValid = false; } } // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict function configFromString(config) { var matched = aspNetJsonRegex.exec(config._i); if (matched !== null) { config._d = new Date(+matched[1]); return; } configFromISO(config); if (config._isValid === false) { delete config._isValid; } else { return; } configFromRFC2822(config); if (config._isValid === false) { delete config._isValid; } else { return; } if (config._strict) { config._isValid = false; } else { // Final attempt, use Input Fallback hooks.createFromInputFallback(config); } } hooks.createFromInputFallback = deprecate( 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); } ); // Pick the first defined of two or three arguments. function defaults(a, b, c) { if (a != null) { return a; } if (b != null) { return b; } return c; } function currentDateArray(config) { // hooks is actually the exported moment object var nowValue = new Date(hooks.now()); if (config._useUTC) { return [ nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate(), ]; } return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; } // convert an array to a date. // the array should mirror the parameters below // note: all values past the year are optional and will default to the lowest possible value. // [year, month, day , hour, minute, second, millisecond] function configFromArray(config) { var i, date, input = [], currentDate, expectedWeekday, yearToUse; if (config._d) { return; } currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { dayOfYearFromWeekInfo(config); } //if the day of the year is set, figure out what it is if (config._dayOfYear != null) { yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); if ( config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0 ) { getParsingFlags(config)._overflowDayOfYear = true; } date = createUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH] = date.getUTCMonth(); config._a[DATE] = date.getUTCDate(); } // Default to current date. // * if no year, month, day of month are given, default to today // * if day of month is given, default month and year // * if month is given, default only year // * if year is given, don't default anything for (i = 0; i < 3 && config._a[i] == null; ++i) { config._a[i] = input[i] = currentDate[i]; } // Zero out whatever was not defaulted, including time for (; i < 7; i++) { config._a[i] = input[i] = config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i]; } // Check for 24:00:00.000 if ( config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0 ) { config._nextDay = true; config._a[HOUR] = 0; } config._d = (config._useUTC ? createUTCDate : createDate).apply( null, input ); expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed // with parseZone. if (config._tzm != null) { config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); } if (config._nextDay) { config._a[HOUR] = 24; } // check for mismatching day of week if ( config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday ) { getParsingFlags(config).weekdayMismatch = true; } } function dayOfYearFromWeekInfo(config) { var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek; w = config._w; if (w.GG != null || w.W != null || w.E != null) { dow = 1; doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on // how we interpret now (local, utc, fixed offset). So create // a now version of current config (take local/utc/offset flags, and // create now). weekYear = defaults( w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year ); week = defaults(w.W, 1); weekday = defaults(w.E, 1); if (weekday < 1 || weekday > 7) { weekdayOverflow = true; } } else { dow = config._locale._week.dow; doy = config._locale._week.doy; curWeek = weekOfYear(createLocal(), dow, doy); weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. week = defaults(w.w, curWeek.week); if (w.d != null) { // weekday -- low day numbers are considered next week weekday = w.d; if (weekday < 0 || weekday > 6) { weekdayOverflow = true; } } else if (w.e != null) { // local weekday -- counting starts from beginning of week weekday = w.e + dow; if (w.e < 0 || w.e > 6) { weekdayOverflow = true; } } else { // default to beginning of week weekday = dow; } } if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { getParsingFlags(config)._overflowWeeks = true; } else if (weekdayOverflow != null) { getParsingFlags(config)._overflowWeekday = true; } else { temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); config._a[YEAR] = temp.year; config._dayOfYear = temp.dayOfYear; } } // constant that refers to the ISO standard hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form hooks.RFC_2822 = function () {}; // date from string and format string function configFromStringAndFormat(config) { // TODO: Move this to another part of the creation flow to prevent circular deps if (config._f === hooks.ISO_8601) { configFromISO(config); return; } if (config._f === hooks.RFC_2822) { configFromRFC2822(config); return; } config._a = []; getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` var string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0, era, tokenLen; tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; tokenLen = tokens.length; for (i = 0; i < tokenLen; i++) { token = tokens[i]; parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; if (parsedInput) { skipped = string.substr(0, string.indexOf(parsedInput)); if (skipped.length > 0) { getParsingFlags(config).unusedInput.push(skipped); } string = string.slice( string.indexOf(parsedInput) + parsedInput.length ); totalParsedInputLength += parsedInput.length; } // don't parse if it's not a known token if (formatTokenFunctions[token]) { if (parsedInput) { getParsingFlags(config).empty = false; } else { getParsingFlags(config).unusedTokens.push(token); } addTimeToArrayFromToken(token, parsedInput, config); } else if (config._strict && !parsedInput) { getParsingFlags(config).unusedTokens.push(token); } } // add remaining unparsed input length to the string getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; if (string.length > 0) { getParsingFlags(config).unusedInput.push(string); } // clear _12h flag if hour is <= 12 if ( config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0 ) { getParsingFlags(config).bigHour = undefined; } getParsingFlags(config).parsedDateParts = config._a.slice(0); getParsingFlags(config).meridiem = config._meridiem; // handle meridiem config._a[HOUR] = meridiemFixWrap( config._locale, config._a[HOUR], config._meridiem ); // handle era era = getParsingFlags(config).era; if (era !== null) { config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]); } configFromArray(config); checkOverflow(config); } function meridiemFixWrap(locale, hour, meridiem) { var isPm; if (meridiem == null) { // nothing to do return hour; } if (locale.meridiemHour != null) { return locale.meridiemHour(hour, meridiem); } else if (locale.isPM != null) { // Fallback isPm = locale.isPM(meridiem); if (isPm && hour < 12) { hour += 12; } if (!isPm && hour === 12) { hour = 0; } return hour; } else { // this is not supposed to happen return hour; } } // date from string and array of format strings function configFromStringAndArray(config) { var tempConfig, bestMoment, scoreToBeat, i, currentScore, validFormatFound, bestFormatIsValid = false, configfLen = config._f.length; if (configfLen === 0) { getParsingFlags(config).invalidFormat = true; config._d = new Date(NaN); return; } for (i = 0; i < configfLen; i++) { currentScore = 0; validFormatFound = false; tempConfig = copyConfig({}, config); if (config._useUTC != null) { tempConfig._useUTC = config._useUTC; } tempConfig._f = config._f[i]; configFromStringAndFormat(tempConfig); if (isValid(tempConfig)) { validFormatFound = true; } // if there is any input that was not parsed add a penalty for that format currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; getParsingFlags(tempConfig).score = currentScore; if (!bestFormatIsValid) { if ( scoreToBeat == null || currentScore < scoreToBeat || validFormatFound ) { scoreToBeat = currentScore; bestMoment = tempConfig; if (validFormatFound) { bestFormatIsValid = true; } } } else { if (currentScore < scoreToBeat) { scoreToBeat = currentScore; bestMoment = tempConfig; } } } extend(config, bestMoment || tempConfig); } function configFromObject(config) { if (config._d) { return; } var i = normalizeObjectUnits(config._i), dayOrDate = i.day === undefined ? i.date : i.day; config._a = map( [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], function (obj) { return obj && parseInt(obj, 10); } ); configFromArray(config); } function createFromConfig(config) { var res = new Moment(checkOverflow(prepareConfig(config))); if (res._nextDay) { // Adding is smart enough around DST res.add(1, 'd'); res._nextDay = undefined; } return res; } function prepareConfig(config) { var input = config._i, format = config._f; config._locale = config._locale || getLocale(config._l); if (input === null || (format === undefined && input === '')) { return createInvalid({ nullInput: true }); } if (typeof input === 'string') { config._i = input = config._locale.preparse(input); } if (isMoment(input)) { return new Moment(checkOverflow(input)); } else if (isDate(input)) { config._d = input; } else if (isArray(format)) { configFromStringAndArray(config); } else if (format) { configFromStringAndFormat(config); } else { configFromInput(config); } if (!isValid(config)) { config._d = null; } return config; } function configFromInput(config) { var input = config._i; if (isUndefined(input)) { config._d = new Date(hooks.now()); } else if (isDate(input)) { config._d = new Date(input.valueOf()); } else if (typeof input === 'string') { configFromString(config); } else if (isArray(input)) { config._a = map(input.slice(0), function (obj) { return parseInt(obj, 10); }); configFromArray(config); } else if (isObject(input)) { configFromObject(config); } else if (isNumber(input)) { // from milliseconds config._d = new Date(input); } else { hooks.createFromInputFallback(config); } } function createLocalOrUTC(input, format, locale, strict, isUTC) { var c = {}; if (format === true || format === false) { strict = format; format = undefined; } if (locale === true || locale === false) { strict = locale; locale = undefined; } if ( (isObject(input) && isObjectEmpty(input)) || (isArray(input) && input.length === 0) ) { input = undefined; } // object construction must be done this way. // https://github.com/moment/moment/issues/1423 c._isAMomentObject = true; c._useUTC = c._isUTC = isUTC; c._l = locale; c._i = input; c._f = format; c._strict = strict; return createFromConfig(c); } function createLocal(input, format, locale, strict) { return createLocalOrUTC(input, format, locale, strict, false); } var prototypeMin = deprecate( 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other < this ? this : other; } else { return createInvalid(); } } ), prototypeMax = deprecate( 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other > this ? this : other; } else { return createInvalid(); } } ); // Pick a moment m from moments so that m[fn](other) is true for all // other. This relies on the function fn to be transitive. // // moments should either be an array of moment objects or an array, whose // first element is an array of moment objects. function pickBy(fn, moments) { var res, i; if (moments.length === 1 && isArray(moments[0])) { moments = moments[0]; } if (!moments.length) { return createLocal(); } res = moments[0]; for (i = 1; i < moments.length; ++i) { if (!moments[i].isValid() || moments[i][fn](res)) { res = moments[i]; } } return res; } // TODO: Use [].sort instead? function min() { var args = [].slice.call(arguments, 0); return pickBy('isBefore', args); } function max() { var args = [].slice.call(arguments, 0); return pickBy('isAfter', args); } var now = function () { return Date.now ? Date.now() : +new Date(); }; var ordering = [ 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond', ]; function isDurationValid(m) { var key, unitHasDecimal = false, i, orderLen = ordering.length; for (key in m) { if ( hasOwnProp(m, key) && !( indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])) ) ) { return false; } } for (i = 0; i < orderLen; ++i) { if (m[ordering[i]]) { if (unitHasDecimal) { return false; // only allow non-integers for smallest unit } if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { unitHasDecimal = true; } } } return true; } function isValid$1() { return this._isValid; } function createInvalid$1() { return createDuration(NaN); } function Duration(duration) { var normalizedInput = normalizeObjectUnits(duration), years = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months = normalizedInput.month || 0, weeks = normalizedInput.week || normalizedInput.isoWeek || 0, days = normalizedInput.day || 0, hours = normalizedInput.hour || 0, minutes = normalizedInput.minute || 0, seconds = normalizedInput.second || 0, milliseconds = normalizedInput.millisecond || 0; this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 minutes * 6e4 + // 1000 * 60 hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 // Because of dateAddRemove treats 24 hours as different from a // day when working around DST, we need to store them separately this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing // which months you are are talking about, so we have to store // it separately. this._months = +months + quarters * 3 + years * 12; this._data = {}; this._locale = getLocale(); this._bubble(); } function isDuration(obj) { return obj instanceof Duration; } function absRound(number) { if (number < 0) { return Math.round(-1 * number) * -1; } else { return Math.round(number); } } // compare two arrays, return the number of differences function compareArrays(array1, array2, dontConvert) { var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i; for (i = 0; i < len; i++) { if ( (dontConvert && array1[i] !== array2[i]) || (!dontConvert && toInt(array1[i]) !== toInt(array2[i])) ) { diffs++; } } return diffs + lengthDiff; } // FORMATTING function offset(token, separator) { addFormatToken(token, 0, 0, function () { var offset = this.utcOffset(), sign = '+'; if (offset < 0) { offset = -offset; sign = '-'; } return ( sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2) ); }); } offset('Z', ':'); offset('ZZ', ''); // PARSING addRegexToken('Z', matchShortOffset); addRegexToken('ZZ', matchShortOffset); addParseToken(['Z', 'ZZ'], function (input, array, config) { config._useUTC = true; config._tzm = offsetFromString(matchShortOffset, input); }); // HELPERS // timezone chunker // '+10:00' > ['10', '00'] // '-1530' > ['-15', '30'] var chunkOffset = /([\+\-]|\d\d)/gi; function offsetFromString(matcher, string) { var matches = (string || '').match(matcher), chunk, parts, minutes; if (matches === null) { return null; } chunk = matches[matches.length - 1] || []; parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; minutes = +(parts[1] * 60) + toInt(parts[2]); return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; } // Return a moment from input, that is local/utc/zone equivalent to model. function cloneWithOffset(input, model) { var res, diff; if (model._isUTC) { res = model.clone(); diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. res._d.setTime(res._d.valueOf() + diff); hooks.updateOffset(res, false); return res; } else { return createLocal(input).local(); } } function getDateOffset(m) { // On Firefox.24 Date#getTimezoneOffset returns a floating point. // https://github.com/moment/moment/pull/1871 return -Math.round(m._d.getTimezoneOffset()); } // HOOKS // This function will be called whenever a moment is mutated. // It is intended to keep the offset in sync with the timezone. hooks.updateOffset = function () {}; // MOMENTS // keepLocalTime = true means only change the timezone, without // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset // +0200, so we adjust the time as needed, to be valid. // // Keeping the time actually adds/subtracts (one hour) // from the actual represented time. That is why we call updateOffset // a second time. In case it wants us to change the offset again // _changeInProgress == true case, then we have to adjust, because // there is no such time in the given timezone. function getSetOffset(input, keepLocalTime, keepMinutes) { var offset = this._offset || 0, localAdjust; if (!this.isValid()) { return input != null ? this : NaN; } if (input != null) { if (typeof input === 'string') { input = offsetFromString(matchShortOffset, input); if (input === null) { return this; } } else if (Math.abs(input) < 16 && !keepMinutes) { input = input * 60; } if (!this._isUTC && keepLocalTime) { localAdjust = getDateOffset(this); } this._offset = input; this._isUTC = true; if (localAdjust != null) { this.add(localAdjust, 'm'); } if (offset !== input) { if (!keepLocalTime || this._changeInProgress) { addSubtract( this, createDuration(input - offset, 'm'), 1, false ); } else if (!this._changeInProgress) { this._changeInProgress = true; hooks.updateOffset(this, true); this._changeInProgress = null; } } return this; } else { return this._isUTC ? offset : getDateOffset(this); } } function getSetZone(input, keepLocalTime) { if (input != null) { if (typeof input !== 'string') { input = -input; } this.utcOffset(input, keepLocalTime); return this; } else { return -this.utcOffset(); } } function setOffsetToUTC(keepLocalTime) { return this.utcOffset(0, keepLocalTime); } function setOffsetToLocal(keepLocalTime) { if (this._isUTC) { this.utcOffset(0, keepLocalTime); this._isUTC = false; if (keepLocalTime) { this.subtract(getDateOffset(this), 'm'); } } return this; } function setOffsetToParsedOffset() { if (this._tzm != null) { this.utcOffset(this._tzm, false, true); } else if (typeof this._i === 'string') { var tZone = offsetFromString(matchOffset, this._i); if (tZone != null) { this.utcOffset(tZone); } else { this.utcOffset(0, true); } } return this; } function hasAlignedHourOffset(input) { if (!this.isValid()) { return false; } input = input ? createLocal(input).utcOffset() : 0; return (this.utcOffset() - input) % 60 === 0; } function isDaylightSavingTime() { return ( this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() ); } function isDaylightSavingTimeShifted() { if (!isUndefined(this._isDSTShifted)) { return this._isDSTShifted; } var c = {}, other; copyConfig(c, this); c = prepareConfig(c); if (c._a) { other = c._isUTC ? createUTC(c._a) : createLocal(c._a); this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; } else { this._isDSTShifted = false; } return this._isDSTShifted; } function isLocal() { return this.isValid() ? !this._isUTC : false; } function isUtcOffset() { return this.isValid() ? this._isUTC : false; } function isUtc() { return this.isValid() ? this._isUTC && this._offset === 0 : false; } // ASP.NET json date format regex var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere // and further modified to allow for strings containing both week and day isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function createDuration(input, key) { var duration = input, // matching against regexp is expensive, do it on demand match = null, sign, ret, diffRes; if (isDuration(input)) { duration = { ms: input._milliseconds, d: input._days, M: input._months, }; } else if (isNumber(input) || !isNaN(+input)) { duration = {}; if (key) { duration[key] = +input; } else { duration.milliseconds = +input; } } else if ((match = aspNetRegex.exec(input))) { sign = match[1] === '-' ? -1 : 1; duration = { y: 0, d: toInt(match[DATE]) * sign, h: toInt(match[HOUR]) * sign, m: toInt(match[MINUTE]) * sign, s: toInt(match[SECOND]) * sign, ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match }; } else if ((match = isoRegex.exec(input))) { sign = match[1] === '-' ? -1 : 1; duration = { y: parseIso(match[2], sign), M: parseIso(match[3], sign), w: parseIso(match[4], sign), d: parseIso(match[5], sign), h: parseIso(match[6], sign), m: parseIso(match[7], sign), s: parseIso(match[8], sign), }; } else if (duration == null) { // checks for null or undefined duration = {}; } else if ( typeof duration === 'object' && ('from' in duration || 'to' in duration) ) { diffRes = momentsDifference( createLocal(duration.from), createLocal(duration.to) ); duration = {}; duration.ms = diffRes.milliseconds; duration.M = diffRes.months; } ret = new Duration(duration); if (isDuration(input) && hasOwnProp(input, '_locale')) { ret._locale = input._locale; } if (isDuration(input) && hasOwnProp(input, '_isValid')) { ret._isValid = input._isValid; } return ret; } createDuration.fn = Duration.prototype; createDuration.invalid = createInvalid$1; function parseIso(inp, sign) { // We'd normally use ~~inp for this, but unfortunately it also // converts floats to ints. // inp may be undefined, so careful calling replace on it. var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it return (isNaN(res) ? 0 : res) * sign; } function positiveMomentsDifference(base, other) { var res = {}; res.months = other.month() - base.month() + (other.year() - base.year()) * 12; if (base.clone().add(res.months, 'M').isAfter(other)) { --res.months; } res.milliseconds = +other - +base.clone().add(res.months, 'M'); return res; } function momentsDifference(base, other) { var res; if (!(base.isValid() && other.isValid())) { return { milliseconds: 0, months: 0 }; } other = cloneWithOffset(other, base); if (base.isBefore(other)) { res = positiveMomentsDifference(base, other); } else { res = positiveMomentsDifference(other, base); res.milliseconds = -res.milliseconds; res.months = -res.months; } return res; } // TODO: remove 'name' arg after deprecation is removed function createAdder(direction, name) { return function (val, period) { var dur, tmp; //invert the arguments, but complain about it if (period !== null && !isNaN(+period)) { deprecateSimple( name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.' ); tmp = val; val = period; period = tmp; } dur = createDuration(val, period); addSubtract(this, dur, direction); return this; }; } function addSubtract(mom, duration, isAdding, updateOffset) { var milliseconds = duration._milliseconds, days = absRound(duration._days), months = absRound(duration._months); if (!mom.isValid()) { // No op return; } updateOffset = updateOffset == null ? true : updateOffset; if (months) { setMonth(mom, get(mom, 'Month') + months * isAdding); } if (days) { set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); } if (milliseconds) { mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); } if (updateOffset) { hooks.updateOffset(mom, days || months); } } var add = createAdder(1, 'add'), subtract = createAdder(-1, 'subtract'); function isString(input) { return typeof input === 'string' || input instanceof String; } // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined function isMomentInput(input) { return ( isMoment(input) || isDate(input) || isString(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === undefined ); } function isMomentInputObject(input) { var objectTest = isObject(input) && !isObjectEmpty(input), propertyTest = false, properties = [ 'years', 'year', 'y', 'months', 'month', 'M', 'days', 'day', 'd', 'dates', 'date', 'D', 'hours', 'hour', 'h', 'minutes', 'minute', 'm', 'seconds', 'second', 's', 'milliseconds', 'millisecond', 'ms', ], i, property, propertyLen = properties.length; for (i = 0; i < propertyLen; i += 1) { property = properties[i]; propertyTest = propertyTest || hasOwnProp(input, property); } return objectTest && propertyTest; } function isNumberOrStringArray(input) { var arrayTest = isArray(input), dataTypeTest = false; if (arrayTest) { dataTypeTest = input.filter(function (item) { return !isNumber(item) && isString(input); }).length === 0; } return arrayTest && dataTypeTest; } function isCalendarSpec(input) { var objectTest = isObject(input) && !isObjectEmpty(input), propertyTest = false, properties = [ 'sameDay', 'nextDay', 'lastDay', 'nextWeek', 'lastWeek', 'sameElse', ], i, property; for (i = 0; i < properties.length; i += 1) { property = properties[i]; propertyTest = propertyTest || hasOwnProp(input, property); } return objectTest && propertyTest; } function getCalendarFormat(myMoment, now) { var diff = myMoment.diff(now, 'days', true); return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; } function calendar$1(time, formats) { // Support for single parameter, formats only overload to the calendar function if (arguments.length === 1) { if (!arguments[0]) { time = undefined; formats = undefined; } else if (isMomentInput(arguments[0])) { time = arguments[0]; formats = undefined; } else if (isCalendarSpec(arguments[0])) { formats = arguments[0]; time = undefined; } } // We want to compare the start of today, vs this. // Getting start-of-today depends on whether we're local/utc/offset or not. var now = time || createLocal(), sod = cloneWithOffset(now, this).startOf('day'), format = hooks.calendarFormat(this, sod) || 'sameElse', output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); return this.format( output || this.localeData().calendar(format, this, createLocal(now)) ); } function clone() { return new Moment(this); } function isAfter(input, units) { var localInput = isMoment(input) ? input : createLocal(input); if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(units) || 'millisecond'; if (units === 'millisecond') { return this.valueOf() > localInput.valueOf(); } else { return localInput.valueOf() < this.clone().startOf(units).valueOf(); } } function isBefore(input, units) { var localInput = isMoment(input) ? input : createLocal(input); if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(units) || 'millisecond'; if (units === 'millisecond') { return this.valueOf() < localInput.valueOf(); } else { return this.clone().endOf(units).valueOf() < localInput.valueOf(); } } function isBetween(from, to, units, inclusivity) { var localFrom = isMoment(from) ? from : createLocal(from), localTo = isMoment(to) ? to : createLocal(to); if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { return false; } inclusivity = inclusivity || '()'; return ( (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)) ); } function isSame(input, units) { var localInput = isMoment(input) ? input : createLocal(input), inputMs; if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(units) || 'millisecond'; if (units === 'millisecond') { return this.valueOf() === localInput.valueOf(); } else { inputMs = localInput.valueOf(); return ( this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf() ); } } function isSameOrAfter(input, units) { return this.isSame(input, units) || this.isAfter(input, units); } function isSameOrBefore(input, units) { return this.isSame(input, units) || this.isBefore(input, units); } function diff(input, units, asFloat) { var that, zoneDelta, output; if (!this.isValid()) { return NaN; } that = cloneWithOffset(input, this); if (!that.isValid()) { return NaN; } zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; units = normalizeUnits(units); switch (units) { case 'year': output = monthDiff(this, that) / 12; break; case 'month': output = monthDiff(this, that); break; case 'quarter': output = monthDiff(this, that) / 3; break; case 'second': output = (this - that) / 1e3; break; // 1000 case 'minute': output = (this - that) / 6e4; break; // 1000 * 60 case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60 case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst default: output = this - that; } return asFloat ? output : absFloor(output); } function monthDiff(a, b) { if (a.date() < b.date()) { // end-of-month calculations work correct when the start month has more // days than the end month. return -monthDiff(b, a); } // difference in months var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), // b is in (anchor - 1 month, anchor + 1 month) anchor = a.clone().add(wholeMonthDiff, 'months'), anchor2, adjust; if (b - anchor < 0) { anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month adjust = (b - anchor) / (anchor - anchor2); } else { anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month adjust = (b - anchor) / (anchor2 - anchor); } //check for negative zero, return zero if negative zero return -(wholeMonthDiff + adjust) || 0; } hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; function toString() { return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); } function toISOString(keepOffset) { if (!this.isValid()) { return null; } var utc = keepOffset !== true, m = utc ? this.clone().utc() : this; if (m.year() < 0 || m.year() > 9999) { return formatMoment( m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ' ); } if (isFunction(Date.prototype.toISOString)) { // native implementation is ~50x faster, use it when we can if (utc) { return this.toDate().toISOString(); } else { return new Date(this.valueOf() + this.utcOffset() * 60 * 1000) .toISOString() .replace('Z', formatMoment(m, 'Z')); } } return formatMoment( m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ' ); } /** * Return a human readable representation of a moment that can * also be evaluated to get a new moment which is the same * * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects */ function inspect() { if (!this.isValid()) { return 'moment.invalid(/* ' + this._i + ' */)'; } var func = 'moment', zone = '', prefix, year, datetime, suffix; if (!this.isLocal()) { func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; zone = 'Z'; } prefix = '[' + func + '("]'; year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; datetime = '-MM-DD[T]HH:mm:ss.SSS'; suffix = zone + '[")]'; return this.format(prefix + year + datetime + suffix); } function format(inputString) { if (!inputString) { inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; } var output = formatMoment(this, inputString); return this.localeData().postformat(output); } function from(time, withoutSuffix) { if ( this.isValid() && ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) ) { return createDuration({ to: this, from: time }) .locale(this.locale()) .humanize(!withoutSuffix); } else { return this.localeData().invalidDate(); } } function fromNow(withoutSuffix) { return this.from(createLocal(), withoutSuffix); } function to(time, withoutSuffix) { if ( this.isValid() && ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) ) { return createDuration({ from: this, to: time }) .locale(this.locale()) .humanize(!withoutSuffix); } else { return this.localeData().invalidDate(); } } function toNow(withoutSuffix) { return this.to(createLocal(), withoutSuffix); } // If passed a locale key, it will set the locale for this // instance. Otherwise, it will return the locale configuration // variables for this instance. function locale(key) { var newLocaleData; if (key === undefined) { return this._locale._abbr; } else { newLocaleData = getLocale(key); if (newLocaleData != null) { this._locale = newLocaleData; } return this; } } var lang = deprecate( 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { if (key === undefined) { return this.localeData(); } else { return this.locale(key); } } ); function localeData() { return this._locale; } var MS_PER_SECOND = 1000, MS_PER_MINUTE = 60 * MS_PER_SECOND, MS_PER_HOUR = 60 * MS_PER_MINUTE, MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970): function mod$1(dividend, divisor) { return ((dividend % divisor) + divisor) % divisor; } function localStartOfDate(y, m, d) { // the date constructor remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0) { // preserve leap years using a full 400 year cycle, then reset return new Date(y + 400, m, d) - MS_PER_400_YEARS; } else { return new Date(y, m, d).valueOf(); } } function utcStartOfDate(y, m, d) { // Date.UTC remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0) { // preserve leap years using a full 400 year cycle, then reset return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; } else { return Date.UTC(y, m, d); } } function startOf(units) { var time, startOfDate; units = normalizeUnits(units); if (units === undefined || units === 'millisecond' || !this.isValid()) { return this; } startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; switch (units) { case 'year': time = startOfDate(this.year(), 0, 1); break; case 'quarter': time = startOfDate( this.year(), this.month() - (this.month() % 3), 1 ); break; case 'month': time = startOfDate(this.year(), this.month(), 1); break; case 'week': time = startOfDate( this.year(), this.month(), this.date() - this.weekday() ); break; case 'isoWeek': time = startOfDate( this.year(), this.month(), this.date() - (this.isoWeekday() - 1) ); break; case 'day': case 'date': time = startOfDate(this.year(), this.month(), this.date()); break; case 'hour': time = this._d.valueOf(); time -= mod$1( time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR ); break; case 'minute': time = this._d.valueOf(); time -= mod$1(time, MS_PER_MINUTE); break; case 'second': time = this._d.valueOf(); time -= mod$1(time, MS_PER_SECOND); break; } this._d.setTime(time); hooks.updateOffset(this, true); return this; } function endOf(units) { var time, startOfDate; units = normalizeUnits(units); if (units === undefined || units === 'millisecond' || !this.isValid()) { return this; } startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; switch (units) { case 'year': time = startOfDate(this.year() + 1, 0, 1) - 1; break; case 'quarter': time = startOfDate( this.year(), this.month() - (this.month() % 3) + 3, 1 ) - 1; break; case 'month': time = startOfDate(this.year(), this.month() + 1, 1) - 1; break; case 'week': time = startOfDate( this.year(), this.month(), this.date() - this.weekday() + 7 ) - 1; break; case 'isoWeek': time = startOfDate( this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7 ) - 1; break; case 'day': case 'date': time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; break; case 'hour': time = this._d.valueOf(); time += MS_PER_HOUR - mod$1( time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR ) - 1; break; case 'minute': time = this._d.valueOf(); time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; break; case 'second': time = this._d.valueOf(); time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; break; } this._d.setTime(time); hooks.updateOffset(this, true); return this; } function valueOf() { return this._d.valueOf() - (this._offset || 0) * 60000; } function unix() { return Math.floor(this.valueOf() / 1000); } function toDate() { return new Date(this.valueOf()); } function toArray() { var m = this; return [ m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond(), ]; } function toObject() { var m = this; return { years: m.year(), months: m.month(), date: m.date(), hours: m.hours(), minutes: m.minutes(), seconds: m.seconds(), milliseconds: m.milliseconds(), }; } function toJSON() { // new Date(NaN).toJSON() === null return this.isValid() ? this.toISOString() : null; } function isValid$2() { return isValid(this); } function parsingFlags() { return extend({}, getParsingFlags(this)); } function invalidAt() { return getParsingFlags(this).overflow; } function creationData() { return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict, }; } addFormatToken('N', 0, 0, 'eraAbbr'); addFormatToken('NN', 0, 0, 'eraAbbr'); addFormatToken('NNN', 0, 0, 'eraAbbr'); addFormatToken('NNNN', 0, 0, 'eraName'); addFormatToken('NNNNN', 0, 0, 'eraNarrow'); addFormatToken('y', ['y', 1], 'yo', 'eraYear'); addFormatToken('y', ['yy', 2], 0, 'eraYear'); addFormatToken('y', ['yyy', 3], 0, 'eraYear'); addFormatToken('y', ['yyyy', 4], 0, 'eraYear'); addRegexToken('N', matchEraAbbr); addRegexToken('NN', matchEraAbbr); addRegexToken('NNN', matchEraAbbr); addRegexToken('NNNN', matchEraName); addRegexToken('NNNNN', matchEraNarrow); addParseToken( ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (input, array, config, token) { var era = config._locale.erasParse(input, token, config._strict); if (era) { getParsingFlags(config).era = era; } else { getParsingFlags(config).invalidEra = input; } } ); addRegexToken('y', matchUnsigned); addRegexToken('yy', matchUnsigned); addRegexToken('yyy', matchUnsigned); addRegexToken('yyyy', matchUnsigned); addRegexToken('yo', matchEraYearOrdinal); addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR); addParseToken(['yo'], function (input, array, config, token) { var match; if (config._locale._eraYearOrdinalRegex) { match = input.match(config._locale._eraYearOrdinalRegex); } if (config._locale.eraYearOrdinalParse) { array[YEAR] = config._locale.eraYearOrdinalParse(input, match); } else { array[YEAR] = parseInt(input, 10); } }); function localeEras(m, format) { var i, l, date, eras = this._eras || getLocale('en')._eras; for (i = 0, l = eras.length; i < l; ++i) { switch (typeof eras[i].since) { case 'string': // truncate time date = hooks(eras[i].since).startOf('day'); eras[i].since = date.valueOf(); break; } switch (typeof eras[i].until) { case 'undefined': eras[i].until = +Infinity; break; case 'string': // truncate time date = hooks(eras[i].until).startOf('day').valueOf(); eras[i].until = date.valueOf(); break; } } return eras; } function localeErasParse(eraName, format, strict) { var i, l, eras = this.eras(), name, abbr, narrow; eraName = eraName.toUpperCase(); for (i = 0, l = eras.length; i < l; ++i) { name = eras[i].name.toUpperCase(); abbr = eras[i].abbr.toUpperCase(); narrow = eras[i].narrow.toUpperCase(); if (strict) { switch (format) { case 'N': case 'NN': case 'NNN': if (abbr === eraName) { return eras[i]; } break; case 'NNNN': if (name === eraName) { return eras[i]; } break; case 'NNNNN': if (narrow === eraName) { return eras[i]; } break; } } else if ([name, abbr, narrow].indexOf(eraName) >= 0) { return eras[i]; } } } function localeErasConvertYear(era, year) { var dir = era.since <= era.until ? +1 : -1; if (year === undefined) { return hooks(era.since).year(); } else { return hooks(era.since).year() + (year - era.offset) * dir; } } function getEraName() { var i, l, val, eras = this.localeData().eras(); for (i = 0, l = eras.length; i < l; ++i) { // truncate time val = this.clone().startOf('day').valueOf(); if (eras[i].since <= val && val <= eras[i].until) { return eras[i].name; } if (eras[i].until <= val && val <= eras[i].since) { return eras[i].name; } } return ''; } function getEraNarrow() { var i, l, val, eras = this.localeData().eras(); for (i = 0, l = eras.length; i < l; ++i) { // truncate time val = this.clone().startOf('day').valueOf(); if (eras[i].since <= val && val <= eras[i].until) { return eras[i].narrow; } if (eras[i].until <= val && val <= eras[i].since) { return eras[i].narrow; } } return ''; } function getEraAbbr() { var i, l, val, eras = this.localeData().eras(); for (i = 0, l = eras.length; i < l; ++i) { // truncate time val = this.clone().startOf('day').valueOf(); if (eras[i].since <= val && val <= eras[i].until) { return eras[i].abbr; } if (eras[i].until <= val && val <= eras[i].since) { return eras[i].abbr; } } return ''; } function getEraYear() { var i, l, dir, val, eras = this.localeData().eras(); for (i = 0, l = eras.length; i < l; ++i) { dir = eras[i].since <= eras[i].until ? +1 : -1; // truncate time val = this.clone().startOf('day').valueOf(); if ( (eras[i].since <= val && val <= eras[i].until) || (eras[i].until <= val && val <= eras[i].since) ) { return ( (this.year() - hooks(eras[i].since).year()) * dir + eras[i].offset ); } } return this.year(); } function erasNameRegex(isStrict) { if (!hasOwnProp(this, '_erasNameRegex')) { computeErasParse.call(this); } return isStrict ? this._erasNameRegex : this._erasRegex; } function erasAbbrRegex(isStrict) { if (!hasOwnProp(this, '_erasAbbrRegex')) { computeErasParse.call(this); } return isStrict ? this._erasAbbrRegex : this._erasRegex; } function erasNarrowRegex(isStrict) { if (!hasOwnProp(this, '_erasNarrowRegex')) { computeErasParse.call(this); } return isStrict ? this._erasNarrowRegex : this._erasRegex; } function matchEraAbbr(isStrict, locale) { return locale.erasAbbrRegex(isStrict); } function matchEraName(isStrict, locale) { return locale.erasNameRegex(isStrict); } function matchEraNarrow(isStrict, locale) { return locale.erasNarrowRegex(isStrict); } function matchEraYearOrdinal(isStrict, locale) { return locale._eraYearOrdinalRegex || matchUnsigned; } function computeErasParse() { var abbrPieces = [], namePieces = [], narrowPieces = [], mixedPieces = [], i, l, eras = this.eras(); for (i = 0, l = eras.length; i < l; ++i) { namePieces.push(regexEscape(eras[i].name)); abbrPieces.push(regexEscape(eras[i].abbr)); narrowPieces.push(regexEscape(eras[i].narrow)); mixedPieces.push(regexEscape(eras[i].name)); mixedPieces.push(regexEscape(eras[i].abbr)); mixedPieces.push(regexEscape(eras[i].narrow)); } this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i'); this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i'); this._erasNarrowRegex = new RegExp( '^(' + narrowPieces.join('|') + ')', 'i' ); } // FORMATTING addFormatToken(0, ['gg', 2], 0, function () { return this.weekYear() % 100; }); addFormatToken(0, ['GG', 2], 0, function () { return this.isoWeekYear() % 100; }); function addWeekYearFormatToken(token, getter) { addFormatToken(0, [token, token.length], 0, getter); } addWeekYearFormatToken('gggg', 'weekYear'); addWeekYearFormatToken('ggggg', 'weekYear'); addWeekYearFormatToken('GGGG', 'isoWeekYear'); addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES addUnitAlias('weekYear', 'gg'); addUnitAlias('isoWeekYear', 'GG'); // PRIORITY addUnitPriority('weekYear', 1); addUnitPriority('isoWeekYear', 1); // PARSING addRegexToken('G', matchSigned); addRegexToken('g', matchSigned); addRegexToken('GG', match1to2, match2); addRegexToken('gg', match1to2, match2); addRegexToken('GGGG', match1to4, match4); addRegexToken('gggg', match1to4, match4); addRegexToken('GGGGG', match1to6, match6); addRegexToken('ggggg', match1to6, match6); addWeekParseToken( ['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { week[token.substr(0, 2)] = toInt(input); } ); addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { week[token] = hooks.parseTwoDigitYear(input); }); // MOMENTS function getSetWeekYear(input) { return getSetWeekYearHelper.call( this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy ); } function getSetISOWeekYear(input) { return getSetWeekYearHelper.call( this, input, this.isoWeek(), this.isoWeekday(), 1, 4 ); } function getISOWeeksInYear() { return weeksInYear(this.year(), 1, 4); } function getISOWeeksInISOWeekYear() { return weeksInYear(this.isoWeekYear(), 1, 4); } function getWeeksInYear() { var weekInfo = this.localeData()._week; return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); } function getWeeksInWeekYear() { var weekInfo = this.localeData()._week; return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy); } function getSetWeekYearHelper(input, week, weekday, dow, doy) { var weeksTarget; if (input == null) { return weekOfYear(this, dow, doy).year; } else { weeksTarget = weeksInYear(input, dow, doy); if (week > weeksTarget) { week = weeksTarget; } return setWeekAll.call(this, input, week, weekday, dow, doy); } } function setWeekAll(weekYear, week, weekday, dow, doy) { var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); this.year(date.getUTCFullYear()); this.month(date.getUTCMonth()); this.date(date.getUTCDate()); return this; } // FORMATTING addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES addUnitAlias('quarter', 'Q'); // PRIORITY addUnitPriority('quarter', 7); // PARSING addRegexToken('Q', match1); addParseToken('Q', function (input, array) { array[MONTH] = (toInt(input) - 1) * 3; }); // MOMENTS function getSetQuarter(input) { return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + (this.month() % 3)); } // FORMATTING addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES addUnitAlias('date', 'D'); // PRIORITY addUnitPriority('date', 9); // PARSING addRegexToken('D', match1to2); addRegexToken('DD', match1to2, match2); addRegexToken('Do', function (isStrict, locale) { // TODO: Remove "ordinalParse" fallback in next major release. return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient; }); addParseToken(['D', 'DD'], DATE); addParseToken('Do', function (input, array) { array[DATE] = toInt(input.match(match1to2)[0]); }); // MOMENTS var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES addUnitAlias('dayOfYear', 'DDD'); // PRIORITY addUnitPriority('dayOfYear', 4); // PARSING addRegexToken('DDD', match1to3); addRegexToken('DDDD', match3); addParseToken(['DDD', 'DDDD'], function (input, array, config) { config._dayOfYear = toInt(input); }); // HELPERS // MOMENTS function getSetDayOfYear(input) { var dayOfYear = Math.round( (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5 ) + 1; return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); } // FORMATTING addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES addUnitAlias('minute', 'm'); // PRIORITY addUnitPriority('minute', 14); // PARSING addRegexToken('m', match1to2); addRegexToken('mm', match1to2, match2); addParseToken(['m', 'mm'], MINUTE); // MOMENTS var getSetMinute = makeGetSet('Minutes', false); // FORMATTING addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES addUnitAlias('second', 's'); // PRIORITY addUnitPriority('second', 15); // PARSING addRegexToken('s', match1to2); addRegexToken('ss', match1to2, match2); addParseToken(['s', 'ss'], SECOND); // MOMENTS var getSetSecond = makeGetSet('Seconds', false); // FORMATTING addFormatToken('S', 0, 0, function () { return ~~(this.millisecond() / 100); }); addFormatToken(0, ['SS', 2], 0, function () { return ~~(this.millisecond() / 10); }); addFormatToken(0, ['SSS', 3], 0, 'millisecond'); addFormatToken(0, ['SSSS', 4], 0, function () { return this.millisecond() * 10; }); addFormatToken(0, ['SSSSS', 5], 0, function () { return this.millisecond() * 100; }); addFormatToken(0, ['SSSSSS', 6], 0, function () { return this.millisecond() * 1000; }); addFormatToken(0, ['SSSSSSS', 7], 0, function () { return this.millisecond() * 10000; }); addFormatToken(0, ['SSSSSSSS', 8], 0, function () { return this.millisecond() * 100000; }); addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { return this.millisecond() * 1000000; }); // ALIASES addUnitAlias('millisecond', 'ms'); // PRIORITY addUnitPriority('millisecond', 16); // PARSING addRegexToken('S', match1to3, match1); addRegexToken('SS', match1to3, match2); addRegexToken('SSS', match1to3, match3); var token, getSetMillisecond; for (token = 'SSSS'; token.length <= 9; token += 'S') { addRegexToken(token, matchUnsigned); } function parseMs(input, array) { array[MILLISECOND] = toInt(('0.' + input) * 1000); } for (token = 'S'; token.length <= 9; token += 'S') { addParseToken(token, parseMs); } getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING addFormatToken('z', 0, 0, 'zoneAbbr'); addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS function getZoneAbbr() { return this._isUTC ? 'UTC' : ''; } function getZoneName() { return this._isUTC ? 'Coordinated Universal Time' : ''; } var proto = Moment.prototype; proto.add = add; proto.calendar = calendar$1; proto.clone = clone; proto.diff = diff; proto.endOf = endOf; proto.format = format; proto.from = from; proto.fromNow = fromNow; proto.to = to; proto.toNow = toNow; proto.get = stringGet; proto.invalidAt = invalidAt; proto.isAfter = isAfter; proto.isBefore = isBefore; proto.isBetween = isBetween; proto.isSame = isSame; proto.isSameOrAfter = isSameOrAfter; proto.isSameOrBefore = isSameOrBefore; proto.isValid = isValid$2; proto.lang = lang; proto.locale = locale; proto.localeData = localeData; proto.max = prototypeMax; proto.min = prototypeMin; proto.parsingFlags = parsingFlags; proto.set = stringSet; proto.startOf = startOf; proto.subtract = subtract; proto.toArray = toArray; proto.toObject = toObject; proto.toDate = toDate; proto.toISOString = toISOString; proto.inspect = inspect; if (typeof Symbol !== 'undefined' && Symbol.for != null) { proto[Symbol.for('nodejs.util.inspect.custom')] = function () { return 'Moment<' + this.format() + '>'; }; } proto.toJSON = toJSON; proto.toString = toString; proto.unix = unix; proto.valueOf = valueOf; proto.creationData = creationData; proto.eraName = getEraName; proto.eraNarrow = getEraNarrow; proto.eraAbbr = getEraAbbr; proto.eraYear = getEraYear; proto.year = getSetYear; proto.isLeapYear = getIsLeapYear; proto.weekYear = getSetWeekYear; proto.isoWeekYear = getSetISOWeekYear; proto.quarter = proto.quarters = getSetQuarter; proto.month = getSetMonth; proto.daysInMonth = getDaysInMonth; proto.week = proto.weeks = getSetWeek; proto.isoWeek = proto.isoWeeks = getSetISOWeek; proto.weeksInYear = getWeeksInYear; proto.weeksInWeekYear = getWeeksInWeekYear; proto.isoWeeksInYear = getISOWeeksInYear; proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear; proto.date = getSetDayOfMonth; proto.day = proto.days = getSetDayOfWeek; proto.weekday = getSetLocaleDayOfWeek; proto.isoWeekday = getSetISODayOfWeek; proto.dayOfYear = getSetDayOfYear; proto.hour = proto.hours = getSetHour; proto.minute = proto.minutes = getSetMinute; proto.second = proto.seconds = getSetSecond; proto.millisecond = proto.milliseconds = getSetMillisecond; proto.utcOffset = getSetOffset; proto.utc = setOffsetToUTC; proto.local = setOffsetToLocal; proto.parseZone = setOffsetToParsedOffset; proto.hasAlignedHourOffset = hasAlignedHourOffset; proto.isDST = isDaylightSavingTime; proto.isLocal = isLocal; proto.isUtcOffset = isUtcOffset; proto.isUtc = isUtc; proto.isUTC = isUtc; proto.zoneAbbr = getZoneAbbr; proto.zoneName = getZoneName; proto.dates = deprecate( 'dates accessor is deprecated. Use date instead.', getSetDayOfMonth ); proto.months = deprecate( 'months accessor is deprecated. Use month instead', getSetMonth ); proto.years = deprecate( 'years accessor is deprecated. Use year instead', getSetYear ); proto.zone = deprecate( 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone ); proto.isDSTShifted = deprecate( 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted ); function createUnix(input) { return createLocal(input * 1000); } function createInZone() { return createLocal.apply(null, arguments).parseZone(); } function preParsePostFormat(string) { return string; } var proto$1 = Locale.prototype; proto$1.calendar = calendar; proto$1.longDateFormat = longDateFormat; proto$1.invalidDate = invalidDate; proto$1.ordinal = ordinal; proto$1.preparse = preParsePostFormat; proto$1.postformat = preParsePostFormat; proto$1.relativeTime = relativeTime; proto$1.pastFuture = pastFuture; proto$1.set = set; proto$1.eras = localeEras; proto$1.erasParse = localeErasParse; proto$1.erasConvertYear = localeErasConvertYear; proto$1.erasAbbrRegex = erasAbbrRegex; proto$1.erasNameRegex = erasNameRegex; proto$1.erasNarrowRegex = erasNarrowRegex; proto$1.months = localeMonths; proto$1.monthsShort = localeMonthsShort; proto$1.monthsParse = localeMonthsParse; proto$1.monthsRegex = monthsRegex; proto$1.monthsShortRegex = monthsShortRegex; proto$1.week = localeWeek; proto$1.firstDayOfYear = localeFirstDayOfYear; proto$1.firstDayOfWeek = localeFirstDayOfWeek; proto$1.weekdays = localeWeekdays; proto$1.weekdaysMin = localeWeekdaysMin; proto$1.weekdaysShort = localeWeekdaysShort; proto$1.weekdaysParse = localeWeekdaysParse; proto$1.weekdaysRegex = weekdaysRegex; proto$1.weekdaysShortRegex = weekdaysShortRegex; proto$1.weekdaysMinRegex = weekdaysMinRegex; proto$1.isPM = localeIsPM; proto$1.meridiem = localeMeridiem; function get$1(format, index, field, setter) { var locale = getLocale(), utc = createUTC().set(setter, index); return locale[field](utc, format); } function listMonthsImpl(format, index, field) { if (isNumber(format)) { index = format; format = undefined; } format = format || ''; if (index != null) { return get$1(format, index, field, 'month'); } var i, out = []; for (i = 0; i < 12; i++) { out[i] = get$1(format, i, field, 'month'); } return out; } // () // (5) // (fmt, 5) // (fmt) // (true) // (true, 5) // (true, fmt, 5) // (true, fmt) function listWeekdaysImpl(localeSorted, format, index, field) { if (typeof localeSorted === 'boolean') { if (isNumber(format)) { index = format; format = undefined; } format = format || ''; } else { format = localeSorted; index = format; localeSorted = false; if (isNumber(format)) { index = format; format = undefined; } format = format || ''; } var locale = getLocale(), shift = localeSorted ? locale._week.dow : 0, i, out = []; if (index != null) { return get$1(format, (index + shift) % 7, field, 'day'); } for (i = 0; i < 7; i++) { out[i] = get$1(format, (i + shift) % 7, field, 'day'); } return out; } function listMonths(format, index) { return listMonthsImpl(format, index, 'months'); } function listMonthsShort(format, index) { return listMonthsImpl(format, index, 'monthsShort'); } function listWeekdays(localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); } function listWeekdaysShort(localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); } function listWeekdaysMin(localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); } getSetGlobalLocale('en', { eras: [ { since: '0001-01-01', until: +Infinity, offset: 1, name: 'Anno Domini', narrow: 'AD', abbr: 'AD', }, { since: '0000-12-31', until: -Infinity, offset: 1, name: 'Before Christ', narrow: 'BC', abbr: 'BC', }, ], dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: function (number) { var b = number % 10, output = toInt((number % 100) / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; return number + output; }, }); // Side effect imports hooks.lang = deprecate( 'moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale ); hooks.langData = deprecate( 'moment.langData is deprecated. Use moment.localeData instead.', getLocale ); var mathAbs = Math.abs; function abs() { var data = this._data; this._milliseconds = mathAbs(this._milliseconds); this._days = mathAbs(this._days); this._months = mathAbs(this._months); data.milliseconds = mathAbs(data.milliseconds); data.seconds = mathAbs(data.seconds); data.minutes = mathAbs(data.minutes); data.hours = mathAbs(data.hours); data.months = mathAbs(data.months); data.years = mathAbs(data.years); return this; } function addSubtract$1(duration, input, value, direction) { var other = createDuration(input, value); duration._milliseconds += direction * other._milliseconds; duration._days += direction * other._days; duration._months += direction * other._months; return duration._bubble(); } // supports only 2.0-style add(1, 's') or add(duration) function add$1(input, value) { return addSubtract$1(this, input, value, 1); } // supports only 2.0-style subtract(1, 's') or subtract(duration) function subtract$1(input, value) { return addSubtract$1(this, input, value, -1); } function absCeil(number) { if (number < 0) { return Math.floor(number); } else { return Math.ceil(number); } } function bubble() { var milliseconds = this._milliseconds, days = this._days, months = this._months, data = this._data, seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first // check: https://github.com/moment/moment/issues/2166 if ( !( (milliseconds >= 0 && days >= 0 && months >= 0) || (milliseconds <= 0 && days <= 0 && months <= 0) ) ) { milliseconds += absCeil(monthsToDays(months) + days) * 864e5; days = 0; months = 0; } // The following code bubbles up values, see the tests for // examples of what that means. data.milliseconds = milliseconds % 1000; seconds = absFloor(milliseconds / 1000); data.seconds = seconds % 60; minutes = absFloor(seconds / 60); data.minutes = minutes % 60; hours = absFloor(minutes / 60); data.hours = hours % 24; days += absFloor(hours / 24); // convert days to months monthsFromDays = absFloor(daysToMonths(days)); months += monthsFromDays; days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year years = absFloor(months / 12); months %= 12; data.days = days; data.months = months; data.years = years; return this; } function daysToMonths(days) { // 400 years have 146097 days (taking into account leap year rules) // 400 years have 12 months === 4800 return (days * 4800) / 146097; } function monthsToDays(months) { // the reverse of daysToMonths return (months * 146097) / 4800; } function as(units) { if (!this.isValid()) { return NaN; } var days, months, milliseconds = this._milliseconds; units = normalizeUnits(units); if (units === 'month' || units === 'quarter' || units === 'year') { days = this._days + milliseconds / 864e5; months = this._months + daysToMonths(days); switch (units) { case 'month': return months; case 'quarter': return months / 3; case 'year': return months / 12; } } else { // handle milliseconds separately because of floating point math errors (issue #1867) days = this._days + Math.round(monthsToDays(this._months)); switch (units) { case 'week': return days / 7 + milliseconds / 6048e5; case 'day': return days + milliseconds / 864e5; case 'hour': return days * 24 + milliseconds / 36e5; case 'minute': return days * 1440 + milliseconds / 6e4; case 'second': return days * 86400 + milliseconds / 1000; // Math.floor prevents floating point math errors here case 'millisecond': return Math.floor(days * 864e5) + milliseconds; default: throw new Error('Unknown unit ' + units); } } } // TODO: Use this.as('ms')? function valueOf$1() { if (!this.isValid()) { return NaN; } return ( this._milliseconds + this._days * 864e5 + (this._months % 12) * 2592e6 + toInt(this._months / 12) * 31536e6 ); } function makeAs(alias) { return function () { return this.as(alias); }; } var asMilliseconds = makeAs('ms'), asSeconds = makeAs('s'), asMinutes = makeAs('m'), asHours = makeAs('h'), asDays = makeAs('d'), asWeeks = makeAs('w'), asMonths = makeAs('M'), asQuarters = makeAs('Q'), asYears = makeAs('y'); function clone$1() { return createDuration(this); } function get$2(units) { units = normalizeUnits(units); return this.isValid() ? this[units + 's']() : NaN; } function makeGetter(name) { return function () { return this.isValid() ? this._data[name] : NaN; }; } var milliseconds = makeGetter('milliseconds'), seconds = makeGetter('seconds'), minutes = makeGetter('minutes'), hours = makeGetter('hours'), days = makeGetter('days'), months = makeGetter('months'), years = makeGetter('years'); function weeks() { return absFloor(this.days() / 7); } var round = Math.round, thresholds = { ss: 44, // a few seconds to seconds s: 45, // seconds to minute m: 45, // minutes to hour h: 22, // hours to day d: 26, // days to month/week w: null, // weeks to month M: 11, // months to year }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); } function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) { var duration = createDuration(posNegDuration).abs(), seconds = round(duration.as('s')), minutes = round(duration.as('m')), hours = round(duration.as('h')), days = round(duration.as('d')), months = round(duration.as('M')), weeks = round(duration.as('w')), years = round(duration.as('y')), a = (seconds <= thresholds.ss && ['s', seconds]) || (seconds < thresholds.s && ['ss', seconds]) || (minutes <= 1 && ['m']) || (minutes < thresholds.m && ['mm', minutes]) || (hours <= 1 && ['h']) || (hours < thresholds.h && ['hh', hours]) || (days <= 1 && ['d']) || (days < thresholds.d && ['dd', days]); if (thresholds.w != null) { a = a || (weeks <= 1 && ['w']) || (weeks < thresholds.w && ['ww', weeks]); } a = a || (months <= 1 && ['M']) || (months < thresholds.M && ['MM', months]) || (years <= 1 && ['y']) || ['yy', years]; a[2] = withoutSuffix; a[3] = +posNegDuration > 0; a[4] = locale; return substituteTimeAgo.apply(null, a); } // This function allows you to set the rounding function for relative time strings function getSetRelativeTimeRounding(roundingFunction) { if (roundingFunction === undefined) { return round; } if (typeof roundingFunction === 'function') { round = roundingFunction; return true; } return false; } // This function allows you to set a threshold for relative time strings function getSetRelativeTimeThreshold(threshold, limit) { if (thresholds[threshold] === undefined) { return false; } if (limit === undefined) { return thresholds[threshold]; } thresholds[threshold] = limit; if (threshold === 's') { thresholds.ss = limit - 1; } return true; } function humanize(argWithSuffix, argThresholds) { if (!this.isValid()) { return this.localeData().invalidDate(); } var withSuffix = false, th = thresholds, locale, output; if (typeof argWithSuffix === 'object') { argThresholds = argWithSuffix; argWithSuffix = false; } if (typeof argWithSuffix === 'boolean') { withSuffix = argWithSuffix; } if (typeof argThresholds === 'object') { th = Object.assign({}, thresholds, argThresholds); if (argThresholds.s != null && argThresholds.ss == null) { th.ss = argThresholds.s - 1; } } locale = this.localeData(); output = relativeTime$1(this, !withSuffix, th, locale); if (withSuffix) { output = locale.pastFuture(+this, output); } return locale.postformat(output); } var abs$1 = Math.abs; function sign(x) { return (x > 0) - (x < 0) || +x; } function toISOString$1() { // for ISO strings we do not use the normal bubbling rules: // * milliseconds bubble up until they become hours // * days do not bubble at all // * months bubble up until they become years // This is because there is no context-free conversion between hours and days // (think of clock changes) // and also not between days and months (28-31 days per month) if (!this.isValid()) { return this.localeData().invalidDate(); } var seconds = abs$1(this._milliseconds) / 1000, days = abs$1(this._days), months = abs$1(this._months), minutes, hours, years, s, total = this.asSeconds(), totalSign, ymSign, daysSign, hmsSign; if (!total) { // this is the same as C#'s (Noda) and python (isodate)... // but not other JS (goog.date) return 'P0D'; } // 3600 seconds -> 60 minutes -> 1 hour minutes = absFloor(seconds / 60); hours = absFloor(minutes / 60); seconds %= 60; minutes %= 60; // 12 months -> 1 year years = absFloor(months / 12); months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; totalSign = total < 0 ? '-' : ''; ymSign = sign(this._months) !== sign(total) ? '-' : ''; daysSign = sign(this._days) !== sign(total) ? '-' : ''; hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; return ( totalSign + 'P' + (years ? ymSign + years + 'Y' : '') + (months ? ymSign + months + 'M' : '') + (days ? daysSign + days + 'D' : '') + (hours || minutes || seconds ? 'T' : '') + (hours ? hmsSign + hours + 'H' : '') + (minutes ? hmsSign + minutes + 'M' : '') + (seconds ? hmsSign + s + 'S' : '') ); } var proto$2 = Duration.prototype; proto$2.isValid = isValid$1; proto$2.abs = abs; proto$2.add = add$1; proto$2.subtract = subtract$1; proto$2.as = as; proto$2.asMilliseconds = asMilliseconds; proto$2.asSeconds = asSeconds; proto$2.asMinutes = asMinutes; proto$2.asHours = asHours; proto$2.asDays = asDays; proto$2.asWeeks = asWeeks; proto$2.asMonths = asMonths; proto$2.asQuarters = asQuarters; proto$2.asYears = asYears; proto$2.valueOf = valueOf$1; proto$2._bubble = bubble; proto$2.clone = clone$1; proto$2.get = get$2; proto$2.milliseconds = milliseconds; proto$2.seconds = seconds; proto$2.minutes = minutes; proto$2.hours = hours; proto$2.days = days; proto$2.weeks = weeks; proto$2.months = months; proto$2.years = years; proto$2.humanize = humanize; proto$2.toISOString = toISOString$1; proto$2.toString = toISOString$1; proto$2.toJSON = toISOString$1; proto$2.locale = locale; proto$2.localeData = localeData; proto$2.toIsoString = deprecate( 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1 ); proto$2.lang = lang; // FORMATTING addFormatToken('X', 0, 0, 'unix'); addFormatToken('x', 0, 0, 'valueOf'); // PARSING addRegexToken('x', matchSigned); addRegexToken('X', matchTimestamp); addParseToken('X', function (input, array, config) { config._d = new Date(parseFloat(input) * 1000); }); addParseToken('x', function (input, array, config) { config._d = new Date(toInt(input)); }); //! moment.js hooks.version = '2.29.4'; setHookCallback(createLocal); hooks.fn = proto; hooks.min = min; hooks.max = max; hooks.now = now; hooks.utc = createUTC; hooks.unix = createUnix; hooks.months = listMonths; hooks.isDate = isDate; hooks.locale = getSetGlobalLocale; hooks.invalid = createInvalid; hooks.duration = createDuration; hooks.isMoment = isMoment; hooks.weekdays = listWeekdays; hooks.parseZone = createInZone; hooks.localeData = getLocale; hooks.isDuration = isDuration; hooks.monthsShort = listMonthsShort; hooks.weekdaysMin = listWeekdaysMin; hooks.defineLocale = defineLocale; hooks.updateLocale = updateLocale; hooks.locales = listLocales; hooks.weekdaysShort = listWeekdaysShort; hooks.normalizeUnits = normalizeUnits; hooks.relativeTimeRounding = getSetRelativeTimeRounding; hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; hooks.calendarFormat = getCalendarFormat; hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats hooks.HTML5_FMT = { DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // DATE: 'YYYY-MM-DD', // TIME: 'HH:mm', // TIME_SECONDS: 'HH:mm:ss', // TIME_MS: 'HH:mm:ss.SSS', // WEEK: 'GGGG-[W]WW', // MONTH: 'YYYY-MM', // }; return hooks; }))); /***/ }), /***/ 58859: /***/ ((module, __unused_webpack_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 hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; var booleanValueOf = Boolean.prototype.valueOf; var objectToString = Object.prototype.toString; var functionToString = Function.prototype.toString; var $match = String.prototype.match; var $slice = String.prototype.slice; var $replace = String.prototype.replace; var $toUpperCase = String.prototype.toUpperCase; var $toLowerCase = String.prototype.toLowerCase; var $test = RegExp.prototype.test; var $concat = Array.prototype.concat; var $join = Array.prototype.join; var $arrSlice = Array.prototype.slice; var $floor = Math.floor; var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; var gOPS = Object.getOwnPropertySymbols; var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; // ie, `has-tostringtag/shams var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') ? Symbol.toStringTag : null; var isEnumerable = Object.prototype.propertyIsEnumerable; var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( [].__proto__ === Array.prototype // eslint-disable-line no-proto ? function (O) { return O.__proto__; // eslint-disable-line no-proto } : null ); function addNumericSeparator(num, str) { if ( num === Infinity || num === -Infinity || num !== num || (num && num > -1000 && num < 1000) || $test.call(/e/, str) ) { return str; } var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; if (typeof num === 'number') { var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) if (int !== num) { var intStr = String(int); var dec = $slice.call(str, intStr.length + 1); return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); } } return $replace.call(str, sepRegex, '$&_'); } var utilInspect = __webpack_require__(42634); var inspectCustom = utilInspect.custom; var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; var quotes = { __proto__: null, 'double': '"', single: "'" }; var quoteREs = { __proto__: null, 'double': /(["\\])/g, single: /(['\\])/g }; module.exports = function inspect_(obj, options, depth, seen) { var opts = options || {}; if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) { throw new TypeError('option "quoteStyle" must be "single" or "double"'); } if ( has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null ) ) { throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); } var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); } if ( has(opts, 'indent') && opts.indent !== null && opts.indent !== '\t' && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) ) { throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); } if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); } var numericSeparator = opts.numericSeparator; 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'; } var str = String(obj); return numericSeparator ? addNumericSeparator(obj, str) : str; } if (typeof obj === 'bigint') { var bigIntStr = String(obj) + 'n'; return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; } var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; if (typeof depth === 'undefined') { depth = 0; } if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { return isArray(obj) ? '[Array]' : '[Object]'; } var indent = getIndent(opts, depth); if (typeof seen === 'undefined') { seen = []; } else if (indexOf(seen, obj) >= 0) { return '[Circular]'; } function inspect(value, from, noIndent) { if (from) { seen = $arrSlice.call(seen); seen.push(from); } if (noIndent) { var newOpts = { depth: opts.depth }; if (has(opts, 'quoteStyle')) { newOpts.quoteStyle = opts.quoteStyle; } return inspect_(value, newOpts, depth + 1, seen); } return inspect_(value, opts, depth + 1, seen); } if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable var name = nameOf(obj); var keys = arrObjKeys(obj, inspect); return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); } if (isSymbol(obj)) { var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; } if (isElement(obj)) { var s = '<' + $toLowerCase.call(String(obj.nodeName)); 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 += ''; return s; } if (isArray(obj)) { if (obj.length === 0) { return '[]'; } var xs = arrObjKeys(obj, inspect); if (indent && !singleLineValues(xs)) { return '[' + indentedJoin(xs, indent) + ']'; } return '[ ' + $join.call(xs, ', ') + ' ]'; } if (isError(obj)) { var parts = arrObjKeys(obj, inspect); if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; } if (parts.length === 0) { return '[' + String(obj) + ']'; } return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; } if (typeof obj === 'object' && customInspect) { if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { return utilInspect(obj, { depth: maxDepth - depth }); } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { return obj.inspect(); } } if (isMap(obj)) { var mapParts = []; if (mapForEach) { mapForEach.call(obj, function (value, key) { mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); }); } return collectionOf('Map', mapSize.call(obj), mapParts, indent); } if (isSet(obj)) { var setParts = []; if (setForEach) { setForEach.call(obj, function (value) { setParts.push(inspect(value, obj)); }); } return collectionOf('Set', setSize.call(obj), setParts, indent); } if (isWeakMap(obj)) { return weakCollectionOf('WeakMap'); } if (isWeakSet(obj)) { return weakCollectionOf('WeakSet'); } if (isWeakRef(obj)) { return weakCollectionOf('WeakRef'); } 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))); } // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other /* eslint-env browser */ if ( true && obj === window) { return '{ [object Window] }'; } if ( (typeof globalThis !== 'undefined' && obj === globalThis) || (typeof __webpack_require__.g !== 'undefined' && obj === __webpack_require__.g) ) { return '{ [object globalThis] }'; } if (!isDate(obj) && !isRegExp(obj)) { var ys = arrObjKeys(obj, inspect); var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; var protoTag = obj instanceof Object ? '' : 'null prototype'; var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); if (ys.length === 0) { return tag + '{}'; } if (indent) { return tag + '{' + indentedJoin(ys, indent) + '}'; } return tag + '{ ' + $join.call(ys, ', ') + ' }'; } return String(obj); }; function wrapQuotes(s, defaultStyle, opts) { var style = opts.quoteStyle || defaultStyle; var quoteChar = quotes[style]; return quoteChar + s + quoteChar; } function quote(s) { return $replace.call(String(s), /"/g, '"'); } function canTrustToString(obj) { return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined')); } function isArray(obj) { return toStr(obj) === '[object Array]' && canTrustToString(obj); } function isDate(obj) { return toStr(obj) === '[object Date]' && canTrustToString(obj); } function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && canTrustToString(obj); } function isError(obj) { return toStr(obj) === '[object Error]' && canTrustToString(obj); } function isString(obj) { return toStr(obj) === '[object String]' && canTrustToString(obj); } function isNumber(obj) { return toStr(obj) === '[object Number]' && canTrustToString(obj); } function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && canTrustToString(obj); } // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives function isSymbol(obj) { if (hasShammedSymbols) { return obj && typeof obj === 'object' && obj instanceof Symbol; } if (typeof obj === 'symbol') { return true; } if (!obj || typeof obj !== 'object' || !symToString) { return false; } try { symToString.call(obj); return true; } catch (e) {} return false; } function isBigInt(obj) { if (!obj || typeof obj !== 'object' || !bigIntValueOf) { return false; } try { bigIntValueOf.call(obj); return true; } catch (e) {} return false; } 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 = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); if (m) { return m[1]; } return null; } 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 || !x || typeof x !== 'object') { 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 isWeakMap(x) { if (!weakMapHas || !x || typeof x !== 'object') { return false; } try { weakMapHas.call(x, weakMapHas); try { weakSetHas.call(x, weakSetHas); } catch (s) { return true; } return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 } catch (e) {} return false; } function isWeakRef(x) { if (!weakRefDeref || !x || typeof x !== 'object') { return false; } try { weakRefDeref.call(x); return true; } catch (e) {} return false; } function isSet(x) { if (!setSize || !x || typeof x !== 'object') { 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 isWeakSet(x) { if (!weakSetHas || !x || typeof x !== 'object') { return false; } try { weakSetHas.call(x, weakSetHas); try { weakMapHas.call(x, weakMapHas); } catch (s) { return true; } return x instanceof WeakSet; // 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) { if (str.length > opts.maxStringLength) { var remaining = str.length - opts.maxStringLength; var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; } var quoteRE = quoteREs[opts.quoteStyle || 'single']; quoteRE.lastIndex = 0; // eslint-disable-next-line no-control-regex var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\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' : '') + $toUpperCase.call(n.toString(16)); } function markBoxed(str) { return 'Object(' + str + ')'; } function weakCollectionOf(type) { return type + ' { ? }'; } function collectionOf(type, size, entries, indent) { var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); return type + ' (' + size + ') {' + joinedEntries + '}'; } function singleLineValues(xs) { for (var i = 0; i < xs.length; i++) { if (indexOf(xs[i], '\n') >= 0) { return false; } } return true; } function getIndent(opts, depth) { var baseIndent; if (opts.indent === '\t') { baseIndent = '\t'; } else if (typeof opts.indent === 'number' && opts.indent > 0) { baseIndent = $join.call(Array(opts.indent + 1), ' '); } else { return null; } return { base: baseIndent, prev: $join.call(Array(depth + 1), baseIndent) }; } function indentedJoin(xs, indent) { if (xs.length === 0) { return ''; } var lineJoiner = '\n' + indent.prev + indent.base; return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; } 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) : ''; } } var syms = typeof gOPS === 'function' ? gOPS(obj) : []; var symMap; if (hasShammedSymbols) { symMap = {}; for (var k = 0; k < syms.length; k++) { symMap['$' + syms[k]] = syms[k]; } } for (var key in obj) { // eslint-disable-line no-restricted-syntax if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section continue; // eslint-disable-line no-restricted-syntax, no-continue } else if ($test.call(/[^\w$]/, key)) { xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); } else { xs.push(key + ': ' + inspect(obj[key], obj)); } } if (typeof gOPS === 'function') { for (var j = 0; j < syms.length; j++) { if (isEnumerable.call(obj, syms[j])) { xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); } } } return xs; } /***/ }), /***/ 76578: /***/ ((module) => { "use strict"; /** @type {import('.')} */ module.exports = [ 'Float16Array', 'Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'BigInt64Array', 'BigUint64Array' ]; /***/ }), /***/ 65606: /***/ ((module) => { // 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; }; /***/ }), /***/ 2694: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = __webpack_require__(6925); function emptyFunction() {} function emptyFunctionWithReset() {} emptyFunctionWithReset.resetWarningCache = emptyFunction; module.exports = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; }; shim.isRequired = shim; function getShim() { return shim; }; // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, elementType: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim, checkPropTypes: emptyFunctionWithReset, resetWarningCache: emptyFunction }; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /***/ 5556: /***/ ((module, __unused_webpack_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, ReactIs; } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(2694)(); } /***/ }), /***/ 6925: /***/ ((module) => { "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; /***/ }), /***/ 9655: /***/ (function(module, exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { /** Detect free variables */ var freeExports = true && exports && !exports.nodeType && exports; var freeModule = true && module && !module.nodeType && module; var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g; if ( freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal ) { root = freeGlobal; } /** * The `punycode` object. * @name punycode * @type Object */ var punycode, /** Highest positive signed 32-bit float value */ maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 /** Bootstring parameters */ base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, // 0x80 delimiter = '-', // '\x2D' /** Regular expressions */ regexPunycode = /^xn--/, regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators /** Error messages */ errors = { 'overflow': 'Overflow: input needs wider integers to process', 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', 'invalid-input': 'Invalid input' }, /** Convenience shortcuts */ baseMinusTMin = base - tMin, floor = Math.floor, stringFromCharCode = String.fromCharCode, /** Temporary variable */ key; /*--------------------------------------------------------------------------*/ /** * A generic error utility function. * @private * @param {String} type The error type. * @returns {Error} Throws a `RangeError` with the applicable error message. */ function error(type) { throw new RangeError(errors[type]); } /** * A generic `Array#map` utility function. * @private * @param {Array} array The array to iterate over. * @param {Function} callback The function that gets called for every array * item. * @returns {Array} A new array of values returned by the callback function. */ function map(array, fn) { var length = array.length; var result = []; while (length--) { result[length] = fn(array[length]); } return result; } /** * A simple `Array#map`-like wrapper to work with domain name strings or email * addresses. * @private * @param {String} domain The domain name or email address. * @param {Function} callback The function that gets called for every * character. * @returns {Array} A new string of characters returned by the callback * function. */ function mapDomain(string, fn) { var parts = string.split('@'); var result = ''; if (parts.length > 1) { // In email addresses, only the domain name should be punycoded. Leave // the local part (i.e. everything up to `@`) intact. result = parts[0] + '@'; string = parts[1]; } // Avoid `split(regex)` for IE8 compatibility. See #17. string = string.replace(regexSeparators, '\x2E'); var labels = string.split('.'); var encoded = map(labels, fn).join('.'); return result + encoded; } /** * Creates an array containing the numeric code points of each Unicode * character in the string. While JavaScript uses UCS-2 internally, * this function will convert a pair of surrogate halves (each of which * UCS-2 exposes as separate characters) into a single code point, * matching UTF-16. * @see `punycode.ucs2.encode` * @see * @memberOf punycode.ucs2 * @name decode * @param {String} string The Unicode input string (UCS-2). * @returns {Array} The new array of code points. */ function ucs2decode(string) { var output = [], counter = 0, length = string.length, value, extra; while (counter < length) { value = string.charCodeAt(counter++); if (value >= 0xD800 && value <= 0xDBFF && counter < length) { // high surrogate, and there is a next character extra = string.charCodeAt(counter++); if ((extra & 0xFC00) == 0xDC00) { // low surrogate output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); } else { // unmatched surrogate; only append this code unit, in case the next // code unit is the high surrogate of a surrogate pair output.push(value); counter--; } } else { output.push(value); } } return output; } /** * Creates a string based on an array of numeric code points. * @see `punycode.ucs2.decode` * @memberOf punycode.ucs2 * @name encode * @param {Array} codePoints The array of numeric code points. * @returns {String} The new Unicode string (UCS-2). */ function ucs2encode(array) { return map(array, function(value) { var output = ''; if (value > 0xFFFF) { value -= 0x10000; output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); value = 0xDC00 | value & 0x3FF; } output += stringFromCharCode(value); return output; }).join(''); } /** * Converts a basic code point into a digit/integer. * @see `digitToBasic()` * @private * @param {Number} codePoint The basic numeric code point value. * @returns {Number} The numeric value of a basic code point (for use in * representing integers) in the range `0` to `base - 1`, or `base` if * the code point does not represent a value. */ function basicToDigit(codePoint) { if (codePoint - 48 < 10) { return codePoint - 22; } if (codePoint - 65 < 26) { return codePoint - 65; } if (codePoint - 97 < 26) { return codePoint - 97; } return base; } /** * Converts a digit/integer into a basic code point. * @see `basicToDigit()` * @private * @param {Number} digit The numeric value of a basic code point. * @returns {Number} The basic code point whose value (when used for * representing integers) is `digit`, which needs to be in the range * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is * used; else, the lowercase form is used. The behavior is undefined * if `flag` is non-zero and `digit` has no uppercase form. */ function digitToBasic(digit, flag) { // 0..25 map to ASCII a..z or A..Z // 26..35 map to ASCII 0..9 return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); } /** * Bias adaptation function as per section 3.4 of RFC 3492. * https://tools.ietf.org/html/rfc3492#section-3.4 * @private */ function adapt(delta, numPoints, firstTime) { var k = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { delta = floor(delta / baseMinusTMin); } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); } /** * Converts a Punycode string of ASCII-only symbols to a string of Unicode * symbols. * @memberOf punycode * @param {String} input The Punycode string of ASCII-only symbols. * @returns {String} The resulting string of Unicode symbols. */ function decode(input) { // Don't use UCS-2 var output = [], inputLength = input.length, out, i = 0, n = initialN, bias = initialBias, basic, j, index, oldi, w, k, digit, t, /** Cached calculation results */ baseMinusT; // Handle the basic code points: let `basic` be the number of input code // points before the last delimiter, or `0` if there is none, then copy // the first basic code points to the output. basic = input.lastIndexOf(delimiter); if (basic < 0) { basic = 0; } for (j = 0; j < basic; ++j) { // if it's not a basic code point if (input.charCodeAt(j) >= 0x80) { error('not-basic'); } output.push(input.charCodeAt(j)); } // Main decoding loop: start just after the last delimiter if any basic code // points were copied; start at the beginning otherwise. for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { // `index` is the index of the next character to be consumed. // Decode a generalized variable-length integer into `delta`, // which gets added to `i`. The overflow checking is easier // if we increase `i` as we go, then subtract off its starting // value at the end to obtain `delta`. for (oldi = i, w = 1, k = base; /* no condition */; k += base) { if (index >= inputLength) { error('invalid-input'); } digit = basicToDigit(input.charCodeAt(index++)); if (digit >= base || digit > floor((maxInt - i) / w)) { error('overflow'); } i += digit * w; t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); if (digit < t) { break; } baseMinusT = base - t; if (w > floor(maxInt / baseMinusT)) { error('overflow'); } w *= baseMinusT; } out = output.length + 1; bias = adapt(i - oldi, out, oldi == 0); // `i` was supposed to wrap around from `out` to `0`, // incrementing `n` each time, so we'll fix that now: if (floor(i / out) > maxInt - n) { error('overflow'); } n += floor(i / out); i %= out; // Insert `n` at position `i` of the output output.splice(i++, 0, n); } return ucs2encode(output); } /** * Converts a string of Unicode symbols (e.g. a domain name label) to a * Punycode string of ASCII-only symbols. * @memberOf punycode * @param {String} input The string of Unicode symbols. * @returns {String} The resulting Punycode string of ASCII-only symbols. */ function encode(input) { var n, delta, handledCPCount, basicLength, bias, j, m, q, k, t, currentValue, output = [], /** `inputLength` will hold the number of code points in `input`. */ inputLength, /** Cached calculation results */ handledCPCountPlusOne, baseMinusT, qMinusT; // Convert the input in UCS-2 to Unicode input = ucs2decode(input); // Cache the length inputLength = input.length; // Initialize the state n = initialN; delta = 0; bias = initialBias; // Handle the basic code points for (j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue < 0x80) { output.push(stringFromCharCode(currentValue)); } } handledCPCount = basicLength = output.length; // `handledCPCount` is the number of code points that have been handled; // `basicLength` is the number of basic code points. // Finish the basic string - if it is not empty - with a delimiter if (basicLength) { output.push(delimiter); } // Main encoding loop: while (handledCPCount < inputLength) { // All non-basic code points < n have been handled already. Find the next // larger one: for (m = maxInt, j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue >= n && currentValue < m) { m = currentValue; } } // Increase `delta` enough to advance the decoder's state to , // but guard against overflow handledCPCountPlusOne = handledCPCount + 1; if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { error('overflow'); } delta += (m - n) * handledCPCountPlusOne; n = m; for (j = 0; j < inputLength; ++j) { currentValue = input[j]; if (currentValue < n && ++delta > maxInt) { error('overflow'); } if (currentValue == n) { // Represent delta as a generalized variable-length integer for (q = delta, k = base; /* no condition */; k += base) { t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); if (q < t) { break; } qMinusT = q - t; baseMinusT = base - t; output.push( stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) ); q = floor(qMinusT / baseMinusT); } output.push(stringFromCharCode(digitToBasic(q, 0))); bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); delta = 0; ++handledCPCount; } } ++delta; ++n; } return output.join(''); } /** * Converts a Punycode string representing a domain name or an email address * to Unicode. Only the Punycoded parts of the input will be converted, i.e. * it doesn't matter if you call it on a string that has already been * converted to Unicode. * @memberOf punycode * @param {String} input The Punycoded domain name or email address to * convert to Unicode. * @returns {String} The Unicode representation of the given Punycode * string. */ function toUnicode(input) { return mapDomain(input, function(string) { return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; }); } /** * Converts a Unicode string representing a domain name or an email address to * Punycode. Only the non-ASCII parts of the domain name will be converted, * i.e. it doesn't matter if you call it with a domain that's already in * ASCII. * @memberOf punycode * @param {String} input The domain name or email address to convert, as a * Unicode string. * @returns {String} The Punycode representation of the given domain name or * email address. */ function toASCII(input) { return mapDomain(input, function(string) { return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; }); } /*--------------------------------------------------------------------------*/ /** Define the public API */ punycode = { /** * A string representing the current Punycode.js version number. * @memberOf punycode * @type String */ 'version': '1.4.1', /** * An object of methods to convert from JavaScript's internal character * representation (UCS-2) to Unicode code points, and back. * @see * @memberOf punycode * @type Object */ 'ucs2': { 'decode': ucs2decode, 'encode': ucs2encode }, 'decode': decode, 'encode': encode, 'toASCII': toASCII, 'toUnicode': toUnicode }; /** Expose `punycode` */ // Some AMD build optimizers, like r.js, check for specific condition patterns // like the following: if ( true ) { !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return punycode; }).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }(this)); /***/ }), /***/ 74765: /***/ ((module) => { "use strict"; var replace = String.prototype.replace; var percentTwenties = /%20/g; var Format = { RFC1738: 'RFC1738', RFC3986: 'RFC3986' }; module.exports = { 'default': Format.RFC3986, formatters: { RFC1738: function (value) { return replace.call(value, percentTwenties, '+'); }, RFC3986: function (value) { return String(value); } }, RFC1738: Format.RFC1738, RFC3986: Format.RFC3986 }; /***/ }), /***/ 55373: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var stringify = __webpack_require__(98636); var parse = __webpack_require__(62642); var formats = __webpack_require__(74765); module.exports = { formats: formats, parse: parse, stringify: stringify }; /***/ }), /***/ 62642: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var utils = __webpack_require__(37720); var has = Object.prototype.hasOwnProperty; var isArray = Array.isArray; var defaults = { allowDots: false, allowPrototypes: false, allowSparse: false, arrayLimit: 20, charset: 'utf-8', charsetSentinel: false, comma: false, decoder: utils.decode, delimiter: '&', depth: 5, ignoreQueryPrefix: false, interpretNumericEntities: false, parameterLimit: 1000, parseArrays: true, plainObjects: false, strictNullHandling: false }; var interpretNumericEntities = function (str) { return str.replace(/&#(\d+);/g, function ($0, numberStr) { return String.fromCharCode(parseInt(numberStr, 10)); }); }; var parseArrayValue = function (val, options) { if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { return val.split(','); } return val; }; // This is what browsers will submit when the ✓ character occurs in an // application/x-www-form-urlencoded body and the encoding of the page containing // the form is iso-8859-1, or when the submitted form has an accept-charset // attribute of iso-8859-1. Presumably also with other charsets that do not contain // the ✓ character, such as us-ascii. var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') var parseValues = function parseQueryStringValues(str, options) { var obj = { __proto__: null }; var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; var parts = cleanStr.split(options.delimiter, limit); var skipIndex = -1; // Keep track of where the utf8 sentinel was found var i; var charset = options.charset; if (options.charsetSentinel) { for (i = 0; i < parts.length; ++i) { if (parts[i].indexOf('utf8=') === 0) { if (parts[i] === charsetSentinel) { charset = 'utf-8'; } else if (parts[i] === isoSentinel) { charset = 'iso-8859-1'; } skipIndex = i; i = parts.length; // The eslint settings do not allow break; } } } for (i = 0; i < parts.length; ++i) { if (i === skipIndex) { continue; } var part = parts[i]; var bracketEqualsPos = part.indexOf(']='); var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; var key, val; if (pos === -1) { key = options.decoder(part, defaults.decoder, charset, 'key'); val = options.strictNullHandling ? null : ''; } else { key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); val = utils.maybeMap( parseArrayValue(part.slice(pos + 1), options), function (encodedVal) { return options.decoder(encodedVal, defaults.decoder, charset, 'value'); } ); } if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { val = interpretNumericEntities(val); } if (part.indexOf('[]=') > -1) { val = isArray(val) ? [val] : val; } if (has.call(obj, key)) { obj[key] = utils.combine(obj[key], val); } else { obj[key] = val; } } return obj; }; var parseObject = function (chain, val, options, valuesParsed) { var leaf = valuesParsed ? val : parseArrayValue(val, options); for (var i = chain.length - 1; i >= 0; --i) { var obj; var root = chain[i]; if (root === '[]' && options.parseArrays) { obj = [].concat(leaf); } else { obj = options.plainObjects ? Object.create(null) : {}; var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; var index = parseInt(cleanRoot, 10); if (!options.parseArrays && cleanRoot === '') { obj = { 0: leaf }; } else if ( !isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit) ) { obj = []; obj[index] = leaf; } else if (cleanRoot !== '__proto__') { obj[cleanRoot] = leaf; } } leaf = obj; } return leaf; }; var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { if (!givenKey) { return; } // Transform dot notation to bracket notation var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; // The regex chunks var brackets = /(\[[^[\]]*])/; var child = /(\[[^[\]]*])/g; // Get the parent var segment = options.depth > 0 && brackets.exec(key); var parent = segment ? key.slice(0, segment.index) : key; // Stash the parent if it exists var keys = []; if (parent) { // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties if (!options.plainObjects && has.call(Object.prototype, parent)) { if (!options.allowPrototypes) { return; } } keys.push(parent); } // Loop through children appending to the array until we hit depth var i = 0; while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { return; } } keys.push(segment[1]); } // If there's a remainder, just add whatever is left if (segment) { keys.push('[' + key.slice(segment.index) + ']'); } return parseObject(keys, val, options, valuesParsed); }; var normalizeParseOptions = function normalizeParseOptions(opts) { if (!opts) { return defaults; } if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') { throw new TypeError('Decoder has to be a function.'); } if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); } var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; return { allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, charset: charset, charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, // eslint-disable-next-line no-implicit-coercion, no-extra-parens depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, ignoreQueryPrefix: opts.ignoreQueryPrefix === true, interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, parseArrays: opts.parseArrays !== false, plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling }; }; module.exports = function (str, opts) { var options = normalizeParseOptions(opts); if (str === '' || str === null || typeof str === 'undefined') { return options.plainObjects ? Object.create(null) : {}; } var tempObj = typeof str === 'string' ? parseValues(str, options) : str; var obj = options.plainObjects ? Object.create(null) : {}; // Iterate over the keys and setup the new object var keys = Object.keys(tempObj); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); obj = utils.merge(obj, newObj, options); } if (options.allowSparse === true) { return obj; } return utils.compact(obj); }; /***/ }), /***/ 98636: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var getSideChannel = __webpack_require__(920); var utils = __webpack_require__(37720); var formats = __webpack_require__(74765); var has = Object.prototype.hasOwnProperty; var arrayPrefixGenerators = { brackets: function brackets(prefix) { return prefix + '[]'; }, comma: 'comma', indices: function indices(prefix, key) { return prefix + '[' + key + ']'; }, repeat: function repeat(prefix) { return prefix; } }; var isArray = Array.isArray; var push = Array.prototype.push; var pushToArray = function (arr, valueOrArray) { push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); }; var toISO = Date.prototype.toISOString; var defaultFormat = formats['default']; var defaults = { addQueryPrefix: false, allowDots: false, charset: 'utf-8', charsetSentinel: false, delimiter: '&', encode: true, encoder: utils.encode, encodeValuesOnly: false, format: defaultFormat, formatter: formats.formatters[defaultFormat], // deprecated indices: false, serializeDate: function serializeDate(date) { return toISO.call(date); }, skipNulls: false, strictNullHandling: false }; var isNonNullishPrimitive = function isNonNullishPrimitive(v) { return typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean' || typeof v === 'symbol' || typeof v === 'bigint'; }; var sentinel = {}; var stringify = function stringify( object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel ) { var obj = object; var tmpSc = sideChannel; var step = 0; var findFlag = false; while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { // Where object last appeared in the ref tree var pos = tmpSc.get(object); step += 1; if (typeof pos !== 'undefined') { if (pos === step) { throw new RangeError('Cyclic object value'); } else { findFlag = true; // Break while } } if (typeof tmpSc.get(sentinel) === 'undefined') { step = 0; } } if (typeof filter === 'function') { obj = filter(prefix, obj); } else if (obj instanceof Date) { obj = serializeDate(obj); } else if (generateArrayPrefix === 'comma' && isArray(obj)) { obj = utils.maybeMap(obj, function (value) { if (value instanceof Date) { return serializeDate(value); } return value; }); } if (obj === null) { if (strictNullHandling) { return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; } obj = ''; } if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { if (encoder) { var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; } return [formatter(prefix) + '=' + formatter(String(obj))]; } var values = []; if (typeof obj === 'undefined') { return values; } var objKeys; if (generateArrayPrefix === 'comma' && isArray(obj)) { // we need to join elements in if (encodeValuesOnly && encoder) { obj = utils.maybeMap(obj, encoder); } objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; } else if (isArray(filter)) { objKeys = filter; } else { var keys = Object.keys(obj); objKeys = sort ? keys.sort(sort) : keys; } var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix; for (var j = 0; j < objKeys.length; ++j) { var key = objKeys[j]; var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key]; if (skipNulls && value === null) { continue; } var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']'); sideChannel.set(object, step); var valueSideChannel = getSideChannel(); valueSideChannel.set(sentinel, sideChannel); pushToArray(values, stringify( value, keyPrefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel )); } return values; }; var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { if (!opts) { return defaults; } if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { throw new TypeError('Encoder has to be a function.'); } var charset = opts.charset || defaults.charset; if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); } var format = formats['default']; if (typeof opts.format !== 'undefined') { if (!has.call(formats.formatters, opts.format)) { throw new TypeError('Unknown format option provided.'); } format = opts.format; } var formatter = formats.formatters[format]; var filter = defaults.filter; if (typeof opts.filter === 'function' || isArray(opts.filter)) { filter = opts.filter; } return { addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, charset: charset, charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, filter: filter, format: format, formatter: formatter, serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, sort: typeof opts.sort === 'function' ? opts.sort : null, strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling }; }; module.exports = function (object, opts) { var obj = object; var options = normalizeStringifyOptions(opts); var objKeys; var filter; if (typeof options.filter === 'function') { filter = options.filter; obj = filter('', obj); } else if (isArray(options.filter)) { filter = options.filter; objKeys = filter; } var keys = []; if (typeof obj !== 'object' || obj === null) { return ''; } var arrayFormat; if (opts && opts.arrayFormat in arrayPrefixGenerators) { arrayFormat = opts.arrayFormat; } else if (opts && 'indices' in opts) { arrayFormat = opts.indices ? 'indices' : 'repeat'; } else { arrayFormat = 'indices'; } var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); } var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip; if (!objKeys) { objKeys = Object.keys(obj); } if (options.sort) { objKeys.sort(options.sort); } var sideChannel = getSideChannel(); for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; if (options.skipNulls && obj[key] === null) { continue; } pushToArray(keys, stringify( obj[key], key, generateArrayPrefix, commaRoundTrip, options.strictNullHandling, options.skipNulls, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel )); } var joined = keys.join(options.delimiter); var prefix = options.addQueryPrefix === true ? '?' : ''; if (options.charsetSentinel) { if (options.charset === 'iso-8859-1') { // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark prefix += 'utf8=%26%2310003%3B&'; } else { // encodeURIComponent('✓') prefix += 'utf8=%E2%9C%93&'; } } return joined.length > 0 ? prefix + joined : ''; }; /***/ }), /***/ 37720: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var formats = __webpack_require__(74765); var has = Object.prototype.hasOwnProperty; var isArray = Array.isArray; var hexTable = (function () { var array = []; for (var i = 0; i < 256; ++i) { array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); } return array; }()); var compactQueue = function compactQueue(queue) { while (queue.length > 1) { var item = queue.pop(); var obj = item.obj[item.prop]; if (isArray(obj)) { var compacted = []; for (var j = 0; j < obj.length; ++j) { if (typeof obj[j] !== 'undefined') { compacted.push(obj[j]); } } item.obj[item.prop] = compacted; } } }; var arrayToObject = function arrayToObject(source, options) { var obj = options && options.plainObjects ? Object.create(null) : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { obj[i] = source[i]; } } return obj; }; var merge = function merge(target, source, options) { /* eslint no-param-reassign: 0 */ if (!source) { return target; } if (typeof source !== 'object') { if (isArray(target)) { target.push(source); } else if (target && typeof target === 'object') { if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { target[source] = true; } } else { return [target, source]; } return target; } if (!target || typeof target !== 'object') { return [target].concat(source); } var mergeTarget = target; if (isArray(target) && !isArray(source)) { mergeTarget = arrayToObject(target, options); } if (isArray(target) && isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { var targetItem = target[i]; if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { target[i] = merge(targetItem, item, options); } else { target.push(item); } } else { target[i] = item; } }); return target; } return Object.keys(source).reduce(function (acc, key) { var value = source[key]; if (has.call(acc, key)) { acc[key] = merge(acc[key], value, options); } else { acc[key] = value; } return acc; }, mergeTarget); }; var assign = function assignSingleSource(target, source) { return Object.keys(source).reduce(function (acc, key) { acc[key] = source[key]; return acc; }, target); }; var decode = function (str, decoder, charset) { var strWithoutPlus = str.replace(/\+/g, ' '); if (charset === 'iso-8859-1') { // unescape never throws, no try...catch needed: return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); } // utf-8 try { return decodeURIComponent(strWithoutPlus); } catch (e) { return strWithoutPlus; } }; var encode = function encode(str, defaultEncoder, charset, kind, format) { // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { return str; } var string = str; if (typeof str === 'symbol') { string = Symbol.prototype.toString.call(str); } else if (typeof str !== 'string') { string = String(str); } if (charset === 'iso-8859-1') { return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; }); } var out = ''; for (var i = 0; i < string.length; ++i) { var c = string.charCodeAt(i); if ( c === 0x2D // - || c === 0x2E // . || c === 0x5F // _ || c === 0x7E // ~ || (c >= 0x30 && c <= 0x39) // 0-9 || (c >= 0x41 && c <= 0x5A) // a-z || (c >= 0x61 && c <= 0x7A) // A-Z || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) ) { out += string.charAt(i); continue; } if (c < 0x80) { out = out + hexTable[c]; continue; } if (c < 0x800) { out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); continue; } if (c < 0xD800 || c >= 0xE000) { out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); continue; } i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); /* eslint operator-linebreak: [2, "before"] */ out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; } return out; }; var compact = function compact(value) { var queue = [{ obj: { o: value }, prop: 'o' }]; var refs = []; for (var i = 0; i < queue.length; ++i) { var item = queue[i]; var obj = item.obj[item.prop]; var keys = Object.keys(obj); for (var j = 0; j < keys.length; ++j) { var key = keys[j]; var val = obj[key]; if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { queue.push({ obj: obj, prop: key }); refs.push(val); } } } compactQueue(queue); return value; }; var isRegExp = function isRegExp(obj) { return Object.prototype.toString.call(obj) === '[object RegExp]'; }; var isBuffer = function isBuffer(obj) { if (!obj || typeof obj !== 'object') { return false; } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; var combine = function combine(a, b) { return [].concat(a, b); }; var maybeMap = function maybeMap(val, fn) { if (isArray(val)) { var mapped = []; for (var i = 0; i < val.length; i += 1) { mapped.push(fn(val[i])); } return mapped; } return fn(val); }; module.exports = { arrayToObject: arrayToObject, assign: assign, combine: combine, compact: compact, decode: decode, encode: encode, isBuffer: isBuffer, isRegExp: isRegExp, maybeMap: maybeMap, merge: merge }; /***/ }), /***/ 86663: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; const strictUriEncode = __webpack_require__(24280); const decodeComponent = __webpack_require__(30454); const splitOnFirst = __webpack_require__(528); const filterObject = __webpack_require__(73055); const isNullOrUndefined = value => value === null || value === undefined; const encodeFragmentIdentifier = Symbol('encodeFragmentIdentifier'); function encoderForArrayFormat(options) { switch (options.arrayFormat) { case 'index': return key => (result, value) => { const index = result.length; if ( value === undefined || (options.skipNull && value === null) || (options.skipEmptyString && value === '') ) { return result; } if (value === null) { return [...result, [encode(key, options), '[', index, ']'].join('')]; } return [ ...result, [encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('') ]; }; case 'bracket': return key => (result, value) => { if ( value === undefined || (options.skipNull && value === null) || (options.skipEmptyString && value === '') ) { return result; } if (value === null) { return [...result, [encode(key, options), '[]'].join('')]; } return [...result, [encode(key, options), '[]=', encode(value, options)].join('')]; }; case 'colon-list-separator': return key => (result, value) => { if ( value === undefined || (options.skipNull && value === null) || (options.skipEmptyString && value === '') ) { return result; } if (value === null) { return [...result, [encode(key, options), ':list='].join('')]; } return [...result, [encode(key, options), ':list=', encode(value, options)].join('')]; }; case 'comma': case 'separator': case 'bracket-separator': { const keyValueSep = options.arrayFormat === 'bracket-separator' ? '[]=' : '='; return key => (result, value) => { if ( value === undefined || (options.skipNull && value === null) || (options.skipEmptyString && value === '') ) { return result; } // Translate null to an empty string so that it doesn't serialize as 'null' value = value === null ? '' : value; if (result.length === 0) { return [[encode(key, options), keyValueSep, encode(value, options)].join('')]; } return [[result, encode(value, options)].join(options.arrayFormatSeparator)]; }; } default: return key => (result, value) => { if ( value === undefined || (options.skipNull && value === null) || (options.skipEmptyString && value === '') ) { return result; } if (value === null) { return [...result, encode(key, options)]; } return [...result, [encode(key, options), '=', encode(value, options)].join('')]; }; } } function parserForArrayFormat(options) { let result; switch (options.arrayFormat) { case 'index': return (key, value, accumulator) => { result = /\[(\d*)\]$/.exec(key); key = key.replace(/\[\d*\]$/, ''); if (!result) { accumulator[key] = value; return; } if (accumulator[key] === undefined) { accumulator[key] = {}; } accumulator[key][result[1]] = value; }; case 'bracket': return (key, value, accumulator) => { result = /(\[\])$/.exec(key); key = key.replace(/\[\]$/, ''); if (!result) { accumulator[key] = value; return; } if (accumulator[key] === undefined) { accumulator[key] = [value]; return; } accumulator[key] = [].concat(accumulator[key], value); }; case 'colon-list-separator': return (key, value, accumulator) => { result = /(:list)$/.exec(key); key = key.replace(/:list$/, ''); if (!result) { accumulator[key] = value; return; } if (accumulator[key] === undefined) { accumulator[key] = [value]; return; } accumulator[key] = [].concat(accumulator[key], value); }; case 'comma': case 'separator': return (key, value, accumulator) => { const isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator); const isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator)); value = isEncodedArray ? decode(value, options) : value; const newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options); accumulator[key] = newValue; }; case 'bracket-separator': return (key, value, accumulator) => { const isArray = /(\[\])$/.test(key); key = key.replace(/\[\]$/, ''); if (!isArray) { accumulator[key] = value ? decode(value, options) : value; return; } const arrayValue = value === null ? [] : value.split(options.arrayFormatSeparator).map(item => decode(item, options)); if (accumulator[key] === undefined) { accumulator[key] = arrayValue; return; } accumulator[key] = [].concat(accumulator[key], arrayValue); }; default: return (key, value, accumulator) => { if (accumulator[key] === undefined) { accumulator[key] = value; return; } accumulator[key] = [].concat(accumulator[key], value); }; } } function validateArrayFormatSeparator(value) { if (typeof value !== 'string' || value.length !== 1) { throw new TypeError('arrayFormatSeparator must be single character string'); } } function encode(value, options) { if (options.encode) { return options.strict ? strictUriEncode(value) : encodeURIComponent(value); } return value; } function decode(value, options) { if (options.decode) { return decodeComponent(value); } return value; } function keysSorter(input) { if (Array.isArray(input)) { return input.sort(); } if (typeof input === 'object') { return keysSorter(Object.keys(input)) .sort((a, b) => Number(a) - Number(b)) .map(key => input[key]); } return input; } function removeHash(input) { const hashStart = input.indexOf('#'); if (hashStart !== -1) { input = input.slice(0, hashStart); } return input; } function getHash(url) { let hash = ''; const hashStart = url.indexOf('#'); if (hashStart !== -1) { hash = url.slice(hashStart); } return hash; } function extract(input) { input = removeHash(input); const queryStart = input.indexOf('?'); if (queryStart === -1) { return ''; } return input.slice(queryStart + 1); } function parseValue(value, options) { if (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) { value = Number(value); } else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) { value = value.toLowerCase() === 'true'; } return value; } function parse(query, options) { options = Object.assign({ decode: true, sort: true, arrayFormat: 'none', arrayFormatSeparator: ',', parseNumbers: false, parseBooleans: false }, options); validateArrayFormatSeparator(options.arrayFormatSeparator); const formatter = parserForArrayFormat(options); // Create an object with no prototype const ret = Object.create(null); if (typeof query !== 'string') { return ret; } query = query.trim().replace(/^[?#&]/, ''); if (!query) { return ret; } for (const param of query.split('&')) { if (param === '') { continue; } let [key, value] = splitOnFirst(options.decode ? param.replace(/\+/g, ' ') : param, '='); // Missing `=` should be `null`: // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters value = value === undefined ? null : ['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options); formatter(decode(key, options), value, ret); } for (const key of Object.keys(ret)) { const value = ret[key]; if (typeof value === 'object' && value !== null) { for (const k of Object.keys(value)) { value[k] = parseValue(value[k], options); } } else { ret[key] = parseValue(value, options); } } if (options.sort === false) { return ret; } return (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => { const value = ret[key]; if (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) { // Sort object keys, not values result[key] = keysSorter(value); } else { result[key] = value; } return result; }, Object.create(null)); } exports.extract = extract; exports.parse = parse; exports.stringify = (object, options) => { if (!object) { return ''; } options = Object.assign({ encode: true, strict: true, arrayFormat: 'none', arrayFormatSeparator: ',' }, options); validateArrayFormatSeparator(options.arrayFormatSeparator); const shouldFilter = key => ( (options.skipNull && isNullOrUndefined(object[key])) || (options.skipEmptyString && object[key] === '') ); const formatter = encoderForArrayFormat(options); const objectCopy = {}; for (const key of Object.keys(object)) { if (!shouldFilter(key)) { objectCopy[key] = object[key]; } } const keys = Object.keys(objectCopy); if (options.sort !== false) { keys.sort(options.sort); } return keys.map(key => { const value = object[key]; if (value === undefined) { return ''; } if (value === null) { return encode(key, options); } if (Array.isArray(value)) { if (value.length === 0 && options.arrayFormat === 'bracket-separator') { return encode(key, options) + '[]'; } return value .reduce(formatter(key), []) .join('&'); } return encode(key, options) + '=' + encode(value, options); }).filter(x => x.length > 0).join('&'); }; exports.parseUrl = (url, options) => { options = Object.assign({ decode: true }, options); const [url_, hash] = splitOnFirst(url, '#'); return Object.assign( { url: url_.split('?')[0] || '', query: parse(extract(url), options) }, options && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {} ); }; exports.stringifyUrl = (object, options) => { options = Object.assign({ encode: true, strict: true, [encodeFragmentIdentifier]: true }, options); const url = removeHash(object.url).split('?')[0] || ''; const queryFromUrl = exports.extract(object.url); const parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false}); const query = Object.assign(parsedQueryFromUrl, object.query); let queryString = exports.stringify(query, options); if (queryString) { queryString = `?${queryString}`; } let hash = getHash(object.url); if (object.fragmentIdentifier) { hash = `#${options[encodeFragmentIdentifier] ? encode(object.fragmentIdentifier, options) : object.fragmentIdentifier}`; } return `${url}${queryString}${hash}`; }; exports.pick = (input, filter, options) => { options = Object.assign({ parseFragmentIdentifier: true, [encodeFragmentIdentifier]: false }, options); const {url, query, fragmentIdentifier} = exports.parseUrl(input, options); return exports.stringifyUrl({ url, query: filterObject(query, filter), fragmentIdentifier }, options); }; exports.exclude = (input, filter, options) => { const exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value); return exports.pick(input, exclusionFilter, options); }; /***/ }), /***/ 11630: /***/ ((module) => { "use strict"; // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // If obj.hasOwnProperty has been overridden, then calling // obj.hasOwnProperty(prop) will break. // See: https://github.com/joyent/node/issues/1707 function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } module.exports = function(qs, sep, eq, options) { sep = sep || '&'; eq = eq || '='; var obj = {}; if (typeof qs !== 'string' || qs.length === 0) { return obj; } var regexp = /\+/g; qs = qs.split(sep); var maxKeys = 1000; if (options && typeof options.maxKeys === 'number') { maxKeys = options.maxKeys; } var len = qs.length; // maxKeys <= 0 means that we should not limit keys count if (maxKeys > 0 && len > maxKeys) { len = maxKeys; } for (var i = 0; i < len; ++i) { var x = qs[i].replace(regexp, '%20'), idx = x.indexOf(eq), kstr, vstr, k, v; if (idx >= 0) { kstr = x.substr(0, idx); vstr = x.substr(idx + 1); } else { kstr = x; vstr = ''; } k = decodeURIComponent(kstr); v = decodeURIComponent(vstr); if (!hasOwnProperty(obj, k)) { obj[k] = v; } else if (Array.isArray(obj[k])) { obj[k].push(v); } else { obj[k] = [obj[k], v]; } } return obj; }; /***/ }), /***/ 59106: /***/ ((module) => { "use strict"; // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var stringifyPrimitive = function(v) { switch (typeof v) { case 'string': return v; case 'boolean': return v ? 'true' : 'false'; case 'number': return isFinite(v) ? v : ''; default: return ''; } }; module.exports = function(obj, sep, eq, name) { sep = sep || '&'; eq = eq || '='; if (obj === null) { obj = undefined; } if (typeof obj === 'object') { return Object.keys(obj).map(function(k) { var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; if (Array.isArray(obj[k])) { return obj[k].map(function(v) { return ks + encodeURIComponent(stringifyPrimitive(v)); }).join(sep); } else { return ks + encodeURIComponent(stringifyPrimitive(obj[k])); } }).filter(Boolean).join(sep); } if (!name) return ''; return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); }; /***/ }), /***/ 47186: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; exports.decode = exports.parse = __webpack_require__(11630); exports.encode = exports.stringify = __webpack_require__(59106); /***/ }), /***/ 17633: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /** * @license React * react-dom-server-legacy.browser.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var aa=__webpack_require__(96540);function l(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c